forked from golang/hotime
政企超链接开始集成
This commit is contained in:
parent
6d9f89a1d4
commit
751ed0003d
@ -483,10 +483,10 @@ func decodeData2Sql(table [][]string, this *Context, orgId int) error {
|
|||||||
companyData["industry_id"] = industry.GetCeilInt("id")
|
companyData["industry_id"] = industry.GetCeilInt("id")
|
||||||
}
|
}
|
||||||
|
|
||||||
company := this.Db.Get("company", "id", Map{"sn": companyData["sn"]})
|
company := this.Db.Get("company", "id", Map{"name": companyData["name"]})
|
||||||
//没有则创建
|
//没有则创建
|
||||||
if company == nil {
|
if company == nil && companyData.GetString("sn") != "暂无" {
|
||||||
company = this.Db.Get("company", "id", Map{"name": companyData["name"]})
|
company = this.Db.Get("company", "id", Map{"sn": companyData["sn"]})
|
||||||
}
|
}
|
||||||
|
|
||||||
//没有则创建
|
//没有则创建
|
||||||
|
@ -495,9 +495,16 @@ func ctgAnalyse(datas []Map, totalAnalyse Map) Map {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resTotal["区域经营收入"] = resTotal.GetFloat64("区域经营收入") + uploadData.GetFloat64("IEDC2NYYSR")
|
resTotal["区域经营收入"] = resTotal.GetFloat64("区域经营收入") + uploadData.GetFloat64("IEDC2NYYSR")
|
||||||
resTotal["区域纳税总值"] = resTotal.GetFloat64("区域纳税总值") + +uploadData.GetFloat64("IEDCYNSJ") +
|
if uploadData.GetFloat64("IEDCYNSJ") != 0 {
|
||||||
uploadData.GetFloat64("IEDC2NYJSJ") + uploadData.GetFloat64("IEDCNSZE") +
|
resTotal["区域纳税总值"] = resTotal.GetFloat64("区域纳税总值") + uploadData.GetFloat64("IEDCYNSJ")
|
||||||
|
} else {
|
||||||
|
resTotal["区域纳税总值"] = resTotal.GetFloat64("区域纳税总值") + uploadData.GetFloat64("IEDC2NYJSJ") +
|
||||||
|
uploadData.GetFloat64("IEDCNSZE") +
|
||||||
uploadData.GetFloat64("IEDC2NSJSJ") + uploadData.GetFloat64("IEDCYJSJ")
|
uploadData.GetFloat64("IEDC2NSJSJ") + uploadData.GetFloat64("IEDCYJSJ")
|
||||||
|
}
|
||||||
|
//resTotal["区域纳税总值"] = resTotal.GetFloat64("区域纳税总值") + +uploadData.GetFloat64("IEDCYNSJ") +
|
||||||
|
// uploadData.GetFloat64("IEDC2NYJSJ") + uploadData.GetFloat64("IEDCNSZE") +
|
||||||
|
// uploadData.GetFloat64("IEDC2NSJSJ") + uploadData.GetFloat64("IEDCYJSJ")
|
||||||
resTotal["区域资产总额"] = resTotal.GetFloat64("区域资产总额") + uploadData.GetFloat64("IEDCZCZE")
|
resTotal["区域资产总额"] = resTotal.GetFloat64("区域资产总额") + uploadData.GetFloat64("IEDCZCZE")
|
||||||
|
|
||||||
resTotal["独角兽企业数"] = resTotal.GetInt("独角兽企业数") + uploadData.GetInt("IEDCDJSQY") +
|
resTotal["独角兽企业数"] = resTotal.GetInt("独角兽企业数") + uploadData.GetInt("IEDCDJSQY") +
|
||||||
@ -778,9 +785,13 @@ func totalAnalyse(datas []Map) (Map, Map, Map, Map) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resTotal["区域经营收入"] = resTotal.GetFloat64("区域经营收入") + uploadData.GetFloat64("IEDC2NYYSR")
|
resTotal["区域经营收入"] = resTotal.GetFloat64("区域经营收入") + uploadData.GetFloat64("IEDC2NYYSR")
|
||||||
resTotal["区域纳税总值"] = resTotal.GetFloat64("区域纳税总值") + uploadData.GetFloat64("IEDCYNSJ") +
|
if uploadData.GetFloat64("IEDCYNSJ") != 0 {
|
||||||
uploadData.GetFloat64("IEDC2NYJSJ") + uploadData.GetFloat64("IEDCNSZE") +
|
resTotal["区域纳税总值"] = resTotal.GetFloat64("区域纳税总值") + uploadData.GetFloat64("IEDCYNSJ")
|
||||||
|
} else {
|
||||||
|
resTotal["区域纳税总值"] = resTotal.GetFloat64("区域纳税总值") + uploadData.GetFloat64("IEDC2NYJSJ") +
|
||||||
|
uploadData.GetFloat64("IEDCNSZE") +
|
||||||
uploadData.GetFloat64("IEDC2NSJSJ") + uploadData.GetFloat64("IEDCYJSJ")
|
uploadData.GetFloat64("IEDC2NSJSJ") + uploadData.GetFloat64("IEDCYJSJ")
|
||||||
|
}
|
||||||
|
|
||||||
resTotal["区域资产总额"] = resTotal.GetFloat64("区域资产总额") + uploadData.GetFloat64("IEDCZCZE")
|
resTotal["区域资产总额"] = resTotal.GetFloat64("区域资产总额") + uploadData.GetFloat64("IEDCZCZE")
|
||||||
|
|
||||||
@ -923,7 +934,15 @@ func totalAnalyse(datas []Map) (Map, Map, Map, Map) {
|
|||||||
|
|
||||||
//6
|
//6
|
||||||
resTotal[level+"类企业营业收入"] = resTotal.GetFloat64(level+"类企业营业收入") + uploadData.GetFloat64("IEDC2NYYSR") + uploadData.GetFloat64("IEDCYYSR")
|
resTotal[level+"类企业营业收入"] = resTotal.GetFloat64(level+"类企业营业收入") + uploadData.GetFloat64("IEDC2NYYSR") + uploadData.GetFloat64("IEDCYYSR")
|
||||||
resTotal[level+"类企业税收"] = resTotal.GetFloat64(level+"类企业税收") + uploadData.GetFloat64("IEDCYNSJ") + uploadData.GetFloat64("IEDCYJSJ")
|
//resTotal[level+"类企业税收"] = resTotal.GetFloat64(level+"类企业税收") +
|
||||||
|
// uploadData.GetFloat64("IEDCYNSJ") + uploadData.GetFloat64("IEDCYJSJ")
|
||||||
|
if uploadData.GetFloat64("IEDCYNSJ") != 0 {
|
||||||
|
resTotal[level+"类企业税收"] = resTotal.GetFloat64("区域纳税总值") + uploadData.GetFloat64("IEDCYNSJ")
|
||||||
|
} else {
|
||||||
|
resTotal[level+"类企业税收"] = resTotal.GetFloat64("区域纳税总值") + uploadData.GetFloat64("IEDC2NYJSJ") +
|
||||||
|
uploadData.GetFloat64("IEDCNSZE") +
|
||||||
|
uploadData.GetFloat64("IEDC2NSJSJ") + uploadData.GetFloat64("IEDCYJSJ")
|
||||||
|
}
|
||||||
resTotal[level+"类企业占地面积"] = resTotal.GetFloat64(level+"类企业占地面积") + uploadData.GetFloat64("IEDCYDMJ") +
|
resTotal[level+"类企业占地面积"] = resTotal.GetFloat64(level+"类企业占地面积") + uploadData.GetFloat64("IEDCYDMJ") +
|
||||||
uploadData.GetFloat64("IEDCZDMJ")
|
uploadData.GetFloat64("IEDCZDMJ")
|
||||||
resTotal[level+"类企业社保人数"] = resTotal.GetInt(level+"类企业社保人数") + uploadData.GetInt("IEDCSBRS")
|
resTotal[level+"类企业社保人数"] = resTotal.GetInt(level+"类企业社保人数") + uploadData.GetInt("IEDCSBRS")
|
||||||
|
@ -374,23 +374,23 @@ var analyseCtr = Ctr{
|
|||||||
res["upload_data"] = res.GetMap("upload_data")
|
res["upload_data"] = res.GetMap("upload_data")
|
||||||
res["collect_data"] = res.GetMap("collect_data")
|
res["collect_data"] = res.GetMap("collect_data")
|
||||||
res["collect_data"] = res.GetMap("collect_data")
|
res["collect_data"] = res.GetMap("collect_data")
|
||||||
//if res.GetMap("collect_data") == nil && page == 1 {
|
if res.GetMap("collect_data") == nil && page == 1 {
|
||||||
// go func(res Map, this *Context) {
|
go func(res Map, this *Context) {
|
||||||
// path := "company/" + Md5(res.GetString("name")) + time.Now().Format("/200601021504.json")
|
path := "company/" + Md5(res.GetString("name")) + time.Now().Format("/200601021504.json")
|
||||||
//
|
|
||||||
// data := getCompany(res.GetString("name"), this.Config.GetString("tpt")+"/"+path)
|
data := getCompany(res.GetString("name"), this.Config.GetString("tpt")+"/"+path)
|
||||||
//
|
|
||||||
// if len(data) != 0 {
|
if len(data) != 0 {
|
||||||
// data["path"] = path
|
data["path"] = path
|
||||||
// this.Db.Update("company", Map{"collect_data": data.ToJsonString(),
|
this.Db.Update("company", Map{"collect_data": data.ToJsonString(),
|
||||||
// "address": data.GetString("companyAddress"),
|
"address": data.GetString("companyAddress"),
|
||||||
// "sn": data.GetString("creditNo"),
|
"sn": data.GetString("creditNo"),
|
||||||
// "unit": data.GetString("authority"),
|
"unit": data.GetString("authority"),
|
||||||
// }, Map{"id": res.GetCeilInt("id")})
|
}, Map{"id": res.GetCeilInt("id")})
|
||||||
// res["collect_data"] = data
|
res["collect_data"] = data
|
||||||
// }
|
}
|
||||||
// }(res, this)
|
}(res, this)
|
||||||
//}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
example/iedc.exe
BIN
example/iedc.exe
Binary file not shown.
Loading…
Reference in New Issue
Block a user