更新研发
This commit is contained in:
+49
-1
@@ -15,12 +15,29 @@ var analyseCtr = Ctr{
|
||||
this.Display(3, "参数错误")
|
||||
return
|
||||
}
|
||||
res := this.Db.Get("org_analyse", "*", Map{"org_id": orgId})
|
||||
res := this.Db.Get("org_analyse", "home_data", Map{"org_id": orgId})
|
||||
if res == nil {
|
||||
this.Display(4, "找不到该数据")
|
||||
return
|
||||
}
|
||||
res["home_data"] = res.GetMap("home_data")
|
||||
//res["six_item_data"] = res.GetMap("six_item_data")
|
||||
//res["three_item_data"] = res.GetMap("three_item_data")
|
||||
//res["n_item_data"] = res.GetMap("n_item_data")
|
||||
this.Display(0, res)
|
||||
},
|
||||
"home1_data": func(this *Context) {
|
||||
orgId := ObjToInt(this.Req.FormValue("org_id"))
|
||||
if orgId == 0 {
|
||||
this.Display(3, "参数错误")
|
||||
return
|
||||
}
|
||||
res := this.Db.Get("org_analyse", "*", Map{"org_id": orgId})
|
||||
if res == nil {
|
||||
this.Display(4, "找不到该数据")
|
||||
return
|
||||
}
|
||||
res["home1_data"] = res.GetMap("home1_data")
|
||||
res["six_item_data"] = res.GetMap("six_item_data")
|
||||
res["three_item_data"] = res.GetMap("three_item_data")
|
||||
res["n_item_data"] = res.GetMap("n_item_data")
|
||||
@@ -246,6 +263,7 @@ var analyseCtr = Ctr{
|
||||
return
|
||||
}
|
||||
analyse := res.GetMap("analyse")
|
||||
|
||||
if analyse != nil {
|
||||
for k, v := range analyse {
|
||||
if ADataType[k] != nil {
|
||||
@@ -254,6 +272,15 @@ var analyseCtr = Ctr{
|
||||
}
|
||||
res["analyse"] = analyse
|
||||
}
|
||||
analyse1 := res.GetMap("analyse1")
|
||||
if analyse1 != nil {
|
||||
for k, v := range analyse1 {
|
||||
if ADataType[k] != nil {
|
||||
analyse1[ADataType.GetString(k)] = v
|
||||
}
|
||||
}
|
||||
res["analyse1"] = analyse1
|
||||
}
|
||||
|
||||
res["upload_data"] = res.GetMap("upload_data")
|
||||
res["collect_data"] = res.GetMap("collect_data")
|
||||
@@ -271,4 +298,25 @@ var analyseCtr = Ctr{
|
||||
this.Display(0, res)
|
||||
|
||||
},
|
||||
"company_upload": func(this *Context) {
|
||||
id := ObjToInt(this.Req.FormValue("id"))
|
||||
if id == 0 {
|
||||
this.Display(3, "参数错误")
|
||||
return
|
||||
}
|
||||
|
||||
res := this.Db.Get("company", "upload_data", Map{"id": id})
|
||||
if res == nil {
|
||||
this.Display(4, "找不到该数据")
|
||||
return
|
||||
}
|
||||
|
||||
uploadData := res.GetMap("upload_data")
|
||||
tags := this.Db.Select("tag", "name,sn,`unit`,description", Map{"type": 0})
|
||||
for _, v := range tags {
|
||||
v["value"] = uploadData[v.GetString("sn")]
|
||||
}
|
||||
this.Display(0, tags)
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user