forked from golang/hotime
企业画像
This commit is contained in:
parent
a95b2fccd7
commit
527503b0d9
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/.idea/*
|
||||
.idea
|
||||
/example/config/app.json
|
@ -313,3 +313,269 @@ func excel(filePath string) [][][]string {
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
func companyAnalyse(data Map) Map {
|
||||
res := Map{}
|
||||
//亩均收入
|
||||
res["MJSR"] = data.GetFloat64("IEDC2NYYSR") / data.GetFloat64("IEDCYDMJ")
|
||||
res["MJSRDF"] = "" //亩均收入得分
|
||||
//亩均税收
|
||||
res["MJSS"] = data.GetFloat64("IEDCYNSJ") / data.GetFloat64("IEDCYDMJ")
|
||||
res["MJSSDF"] = "" //亩均税收得分
|
||||
|
||||
//人均收入
|
||||
res["RJSR"] = data.GetFloat64("IEDC2NYYSR") / data.GetFloat64("IEDCSBRS")
|
||||
res["RJSRDF"] = "" //人均收入得分
|
||||
|
||||
//研发经费投入强度
|
||||
res["YFJFTRQD"] = data.GetFloat64("IEDCNYFFY") / data.GetFloat64("IEDC2NYYSR")
|
||||
res["YFJFTRQDDF"] = "" //研发经费投入强度得分
|
||||
|
||||
//单位能耗税收
|
||||
res["DWNHSS"] = data.GetFloat64("IEDCYNSJ") / data.GetFloat64("IEDCZHNH")
|
||||
res["DWNHSSDF"] = "" //单位能耗税收得分
|
||||
|
||||
//主要污染物税收
|
||||
res[""] = data.GetFloat64("IEDCYNSJ") / data.GetFloat64("IEDCZHNH")
|
||||
res["DF"] = "" //单位能耗税收得分
|
||||
|
||||
//主要污染物税收
|
||||
//不足1按1计算
|
||||
if data.GetFloat64("IEDCZYWRWPFDL") < 1 {
|
||||
data["IEDCZYWRWPFDL"] = 1
|
||||
}
|
||||
|
||||
res["ZYWRWSS"] = data.GetFloat64("IEDCYNSJ") / data.GetFloat64("IEDCZYWRWPFDL")
|
||||
res["ZYWRWSSDF"] = "" //单位能耗税收得分
|
||||
|
||||
//独角兽、瞪羚企业得分,一个一分
|
||||
res["DJSDLQYDF"] = 0
|
||||
if data.GetString("IEDC“DJS”QY") != "" && data.GetString("IEDC“DJS”QY") != "无" {
|
||||
res["DJSDLQYDF"] = res.GetCeilInt("DJSDLQYDF") + 1
|
||||
}
|
||||
if data.GetString("IEDC“DL”QY") != "" && data.GetString("IEDC“DL”QY") != "无" {
|
||||
res["DJSDLQYDF"] = res.GetCeilInt("DJSDLQYDF") + 1
|
||||
}
|
||||
|
||||
//企业获得国家级、省级、市级企业技术中心,国家级,省级得1分,市级得0.5
|
||||
res["JSZXDF"] = 0
|
||||
//国家级及省级
|
||||
if (data.GetString("IEDCGJJQYJSZX") != "" && data.GetString("IEDCGJJQYJSZX") != "无") || //国家级
|
||||
(data.GetString("IEDCSJQYJSZX") != "" && data.GetString("IEDCSJQYJSZX") != "无") || //省级
|
||||
(data.GetString("IEDCGJJGCJSZX") != "" && data.GetString("IEDCGJJGCJSZX") != "无") || //国家级
|
||||
(data.GetString("IEDCSJGCJSZX") != "" && data.GetString("IEDCSJGCJSZX") != "无") { //省级
|
||||
res["JSZXDF"] = res.GetFloat64("JSZXDF") + 1
|
||||
} else
|
||||
|
||||
//市级
|
||||
if (data.GetString("IEDCSJQYJSZX0") != "" && data.GetString("IEDCSJQYJSZX0") != "无") ||
|
||||
(data.GetString("IEDCSJGCJSZX0") != "" && data.GetString("IEDCSJQYJSZX") != "无") {
|
||||
res["JSZXDF"] = res.GetFloat64("JSZXDF") + 0.5
|
||||
}
|
||||
|
||||
//研发费用得分
|
||||
res["YFFYDF"] = 0
|
||||
if data.GetString("IEDCTRQD1WHZ3YS") != "" && data.GetString("IEDCTRQD1WHZ3YS") != "否" {
|
||||
res["YFFYDF"] = 1
|
||||
}
|
||||
|
||||
//高新技术企业得分
|
||||
res["GXJSQYDF"] = 0
|
||||
if data.GetString("IEDCGXJSQY") != "" && data.GetString("IEDCGXJSQY") != "否" {
|
||||
res["GXJSQYDF"] = 1
|
||||
}
|
||||
|
||||
//首台(套)、首批次、首版次企业
|
||||
res["STTDF"] = 0
|
||||
if data.GetString("IEDCST(T)SPC、SBCQY") != "" && data.GetString("IEDCST(T)SPC、SBCQY") != "无" {
|
||||
res["STTDF"] = 1
|
||||
}
|
||||
|
||||
//专利得分
|
||||
res["ZLDF"] = 0
|
||||
|
||||
res["ZLDF"] = data.GetFloat64("IEDCPGJZL") +
|
||||
data.GetFloat64("IEDCFMZL")*0.5 +
|
||||
data.GetFloat64("IEDCSYXXZL")*0.1 +
|
||||
data.GetFloat64("IEDCWGSJZL")*0.1
|
||||
|
||||
if res.GetFloat64("ZLDF") > 1 {
|
||||
res["ZLDF"] = 1
|
||||
}
|
||||
|
||||
//推广目录得分
|
||||
res["TGMLDF"] = 0
|
||||
if data.GetString("IEDCQYCPJRBDQMYCPMLQY") != "" && data.GetString("IEDCQYCPJRBDQMYCPMLQY") != "无" {
|
||||
res["TGMLDF"] = 1
|
||||
}
|
||||
|
||||
//连续3年盈利得分
|
||||
res["LXSNYLDF"] = 3
|
||||
//18年
|
||||
if data.GetFloat64("IEDC1NLRZE") < 0 {
|
||||
res["LXSNYLDF"] = res.GetInt("LXSNYLDF") - 1
|
||||
}
|
||||
//19年
|
||||
if data.GetFloat64("IEDC1NLRZE0") < 0 {
|
||||
res["LXSNYLDF"] = res.GetInt("LXSNYLDF") - 1
|
||||
}
|
||||
//20年
|
||||
if data.GetFloat64("IEDC2NLRZE") < 0 {
|
||||
res["LXSNYLDF"] = res.GetInt("LXSNYLDF") - 1
|
||||
}
|
||||
|
||||
if res.GetInt("LXSNYLDF") == 3 {
|
||||
res["LXSNYLDF"] = 1
|
||||
} else if res.GetInt("LXSNYLDF") > 0 {
|
||||
res["LXSNYLDF"] = 0.5
|
||||
}
|
||||
|
||||
//当年利润总额得分
|
||||
res["DNLRZEDF"] = 0
|
||||
//企业利润率
|
||||
res["QYLRL"] = data.GetFloat64("IEDC2NLRZE") / data.GetFloat64("IEDC2NYYSR")
|
||||
if res.GetFloat64("QYLRL") > 0.1 {
|
||||
res["DNLRZEDF"] = 1
|
||||
} else if res.GetFloat64("QYLRL") > 0 {
|
||||
res["DNLRZEDF"] = 0.5
|
||||
}
|
||||
|
||||
//企业连续3年亏损得分
|
||||
res["KSDF"] = 3
|
||||
//18年
|
||||
if data.GetFloat64("IEDC1NLRZE") < 0 {
|
||||
res["KSDF"] = res.GetInt("LXSNYLDF") - 1
|
||||
}
|
||||
//19年
|
||||
if data.GetFloat64("IEDC1NLRZE0") < 0 {
|
||||
res["KSDF"] = res.GetInt("LXSNYLDF") - 1
|
||||
}
|
||||
//20年
|
||||
if data.GetFloat64("IEDC2NLRZE") < 0 {
|
||||
res["KSDF"] = res.GetInt("LXSNYLDF") - 1
|
||||
}
|
||||
|
||||
//先统一扣0.5分
|
||||
if res.GetInt("LXSNYLDF") == 0 {
|
||||
res["KSDF"] = 0.5
|
||||
}
|
||||
|
||||
//环保检查得分
|
||||
res["HBJCDF"] = 1
|
||||
|
||||
if data.GetString("IEDCHBJC、HBCCZBFXWT") == "一般" {
|
||||
res["HBJCDF"] = 0.5
|
||||
}
|
||||
if data.GetString("IEDCHBJC、HBCCZBFXWT") == "重大" {
|
||||
res["HBJCDF"] = 0
|
||||
}
|
||||
|
||||
//减排技术升级改造
|
||||
res["JPJSSJDF"] = 0
|
||||
|
||||
if data.GetString("IEDCJPJSSJGZ") != "" && data.GetString("IEDCJPJSSJGZ") != "无" {
|
||||
res["JPJSSJDF"] = 1
|
||||
}
|
||||
|
||||
//安全检查得分
|
||||
res["AQJCDF"] = 0
|
||||
|
||||
if data.GetString("IEDCFXAQFXYH") == "一般" {
|
||||
res["HBJCDF"] = -1
|
||||
}
|
||||
if data.GetString("IEDCFXAQFXYH") == "重大" {
|
||||
res["HBJCDF"] = -2
|
||||
}
|
||||
//安全事故得分
|
||||
res["AQSGDF"] = 0
|
||||
|
||||
if data.GetString("IEDCFSAQSG") == "轻微" {
|
||||
res["HBJCDF"] = -0.5
|
||||
}
|
||||
if data.GetString("IEDCFSAQSG") == "一般" {
|
||||
res["HBJCDF"] = -1
|
||||
}
|
||||
if data.GetString("IEDCFSAQSG") == "重大" {
|
||||
res["HBJCDF"] = -2
|
||||
}
|
||||
|
||||
//企业风险隐患双预控体系建设得分
|
||||
res["QYFXYHSKTXJSDF"] = 0
|
||||
|
||||
if data.GetString("IEDCFXYHSYKTXJS") != "" && data.GetString("IEDCFXYHSYKTXJS") != "无" {
|
||||
res["QYFXYHSKTXJSDF"] = 1
|
||||
}
|
||||
|
||||
//企业安全生产是否达标得分
|
||||
res["QYAQSCDBDF"] = 0
|
||||
|
||||
if data.GetString("IEDCQYSCBZHJS") == "达标" {
|
||||
res["QYAQSCDBDF"] = 1
|
||||
}
|
||||
|
||||
//产业链30户得分
|
||||
res["CYL30HDF"] = 0
|
||||
|
||||
if data.GetString("IEDCCYLLZ、SJZD、SJ3HLTQY") != "" && data.GetString("IEDCCYLLZ、SJZD、SJ3HLTQY") != "否" {
|
||||
res["CYL30HDF"] = 1
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
var ADataType = Map{
|
||||
|
||||
"CYL30HDF": "产业链30户得分",
|
||||
|
||||
"QYAQSCDBDF": "企业安全生产是否达标得分",
|
||||
|
||||
"QYFXYHSKTXJSDF": "企业风险隐患双预控体系建设得分",
|
||||
|
||||
"AQSGDF": "安全事故得分",
|
||||
|
||||
"AQJCDF": "安全检查得分",
|
||||
|
||||
"JPJSSJDF": "减排技术升级改造得分",
|
||||
|
||||
"HBJCDF": "环保检查得分",
|
||||
|
||||
"KSDF": "企业连续3年亏损得分",
|
||||
|
||||
"QYLRL": "企业利润率",
|
||||
|
||||
"DNLRZEDF": "当年利润总额得分",
|
||||
|
||||
"LXSNYLDF": "连续3年盈利得分",
|
||||
|
||||
"TGMLDF": "推广目录得分",
|
||||
|
||||
"ZLDF": "专利得分",
|
||||
|
||||
"STTDF": "首台(套)、首批次、首版次企业得分",
|
||||
|
||||
"MJSR": "亩均收入",
|
||||
"MJSRDF": "亩均收入得分",
|
||||
|
||||
"MJSS": "亩均税收",
|
||||
"MJSSDF": "亩均税收得分",
|
||||
|
||||
"RJSR": "人均收入",
|
||||
"RJSRDF": "人均收入得分",
|
||||
|
||||
"YFJFTRQD": "研发经费投入强度",
|
||||
"YFJFTRQDDF": "研发经费投入强度得分",
|
||||
|
||||
"DWNHSS": "单位能耗税收",
|
||||
"DWNHSSDF": "单位能耗税收得分",
|
||||
|
||||
"ZYWRWSS": "主要污染物税收",
|
||||
"ZYWRWSSDF": "主要污染物税收得分",
|
||||
|
||||
"DJSDLQYDF": "独角兽、瞪羚企业得分",
|
||||
|
||||
"JSZXDF": "企业获得技术中心得分",
|
||||
|
||||
"YFFYDF": "研发费用得分",
|
||||
|
||||
"GXJSQYDF": "高新技术企业得分",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user