|
@@ -893,7 +893,7 @@ func (f *Front) CheckResult() {
|
|
|
pid := f.GetString("pid")
|
|
|
tid := f.GetString("tid")
|
|
|
sourceinfo := f.GetString("s_sourceinfo")
|
|
|
- qu.Debug("----------", tid, pid)
|
|
|
+ stype := f.GetString("stype")
|
|
|
task, _ := util.Mgo.FindById(util.TASKCOLLNAME, tid, map[string]interface{}{"i_givenum": 1})
|
|
|
projcet, _ := util.Mgo.FindById(util.PROJECTCOLLNAME, pid, map[string]interface{}{"v_fields": 1})
|
|
|
//tagCount := util.Mgo.Count(sourceinfo, map[string]interface{}{"s_grouptaskid": tid, "b_istag": true})
|
|
@@ -907,13 +907,24 @@ func (f *Front) CheckResult() {
|
|
|
}
|
|
|
sess := util.Mgo.GetMgoConn()
|
|
|
defer util.Mgo.DestoryMongoConn(sess)
|
|
|
+ query := make(map[string]interface{})
|
|
|
if tid == "" {
|
|
|
|
|
|
} else {
|
|
|
-
|
|
|
+ if stype == "group" {
|
|
|
+ query["s_grouptaskid"] = tid
|
|
|
+ } else {
|
|
|
+ query["s_usertaskid"] = tid
|
|
|
+ }
|
|
|
}
|
|
|
- query := map[string]interface{}{"s_grouptaskid": tid, "b_istag": true}
|
|
|
+ query["b_check"] = true
|
|
|
+ qu.Debug(query)
|
|
|
+ checkNum = util.Mgo.Count(sourceinfo, query)
|
|
|
result := sess.DB(util.Mgo.DbName).C(sourceinfo).Find(query).Iter()
|
|
|
+ if checkNum == 0 {
|
|
|
+ f.ServeJson(map[string]interface{}{"rep": false, "msg": "无质检审核数据!"})
|
|
|
+ return
|
|
|
+ }
|
|
|
for tmp := make(map[string]interface{}); result.Next(&tmp); markNum++ {
|
|
|
user := qu.ObjToString(tmp["s_login"])
|
|
|
var up map[string]int
|
|
@@ -925,7 +936,6 @@ func (f *Front) CheckResult() {
|
|
|
up["ck_count"] += 1
|
|
|
umaps[user] = up
|
|
|
if tmp["b_check"].(bool) {
|
|
|
- checkNum++
|
|
|
if f, ok := tmp["v_checkinfo"].(map[string]interface{}); ok {
|
|
|
flag := true // 数据整体准确率
|
|
|
// 按人员统计字段准备率
|
|
@@ -952,10 +962,7 @@ func (f *Front) CheckResult() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if checkNum == 0 {
|
|
|
- f.ServeJson(map[string]interface{}{"rep": false, "msg": "无质检审核数据!"})
|
|
|
- return
|
|
|
- }
|
|
|
+
|
|
|
qu.Debug(cmaps)
|
|
|
qu.Debug(umaps)
|
|
|
// 前台页面数据
|
|
@@ -970,9 +977,9 @@ func (f *Front) CheckResult() {
|
|
|
tmp["num3"] = checkNumR
|
|
|
tmp["num4"] = CountPr(checkNumR, checkNum)
|
|
|
dataSelect = append(dataSelect, tmp)
|
|
|
- for k := range (*projcet)["v_fields"].(map[string]interface{}) {
|
|
|
+ for k, v := range (*projcet)["v_fields"].(map[string]interface{}) {
|
|
|
tmp1 := make(map[string]interface{})
|
|
|
- tmp1["name"] = k
|
|
|
+ tmp1["name"] = v
|
|
|
tmp1["num1"] = markNum
|
|
|
tmp1["num2"] = checkNum
|
|
|
tmp1["num3"] = cmaps[k]
|
|
@@ -991,9 +998,9 @@ func (f *Front) CheckResult() {
|
|
|
tmp2["num3"] = v2["re_rg_count"]
|
|
|
tmp2["num4"] = CountPr(v2["re_rg_count"], v2["re_count"])
|
|
|
dataSelect1 = append(dataSelect1, tmp2)
|
|
|
- for k := range (*projcet)["v_fields"].(map[string]interface{}) {
|
|
|
+ for k, v := range (*projcet)["v_fields"].(map[string]interface{}) {
|
|
|
tmp1 := make(map[string]interface{})
|
|
|
- tmp1["name"] = k
|
|
|
+ tmp1["name"] = v
|
|
|
tmp1["num1"] = v2["ck_count"]
|
|
|
tmp1["num2"] = v2["re_count"]
|
|
|
tmp1["num3"] = v2[k]
|