政企超链接开始集成
This commit is contained in:
parent
e1eca90835
commit
d847da7591
@ -483,7 +483,12 @@ 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{"name": companyData["name"]})
|
company := this.Db.Get("company", "id", Map{"sn": companyData["sn"]})
|
||||||
|
//没有则创建
|
||||||
|
if company == nil {
|
||||||
|
company = this.Db.Get("company", "id", Map{"name": companyData["name"]})
|
||||||
|
}
|
||||||
|
|
||||||
//没有则创建
|
//没有则创建
|
||||||
if company == nil {
|
if company == nil {
|
||||||
//更新两张表
|
//更新两张表
|
||||||
@ -493,7 +498,7 @@ func decodeData2Sql(table [][]string, this *Context, orgId int) error {
|
|||||||
company = Map{"id": id}
|
company = Map{"id": id}
|
||||||
} else {
|
} else {
|
||||||
//有则更新
|
//有则更新
|
||||||
this.Db.Update("company", companyData, Map{"name": companyData["name"]})
|
this.Db.Update("company", companyData, Map{"id": company.GetCeilInt("id")})
|
||||||
companyData["company_id"] = company.GetCeilInt("id")
|
companyData["company_id"] = company.GetCeilInt("id")
|
||||||
companyData["create_time"] = time.Now().Unix()
|
companyData["create_time"] = time.Now().Unix()
|
||||||
}
|
}
|
||||||
|
BIN
example/iedc.exe
BIN
example/iedc.exe
Binary file not shown.
Loading…
Reference in New Issue
Block a user