|
@@ -544,7 +544,9 @@ func GetNextDataId(id, coll, tid string) string {
|
|
|
qu.Debug(nextIdQuery)
|
|
|
one, _ = util.Mgo.Find(coll, nextIdQuery, `{"_id":1}`, `{"_id":1}`, true, 0, 1)
|
|
|
if len(*one) == 1 && len((*one)[0]) > 0 {
|
|
|
- qu.Debug((*one))
|
|
|
+ if mgo.BsonIdToSId((*one)[0]["_id"]) == id {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
return mgo.BsonIdToSId((*one)[0]["_id"])
|
|
|
}
|
|
|
}
|
|
@@ -573,6 +575,9 @@ func GetNextDataId1(id, coll, tid string) string {
|
|
|
delete(nextIdQuery, "_id")
|
|
|
one, _ = util.Mgo.Find(coll, nextIdQuery, `{"_id":1}`, `{"_id":1}`, true, 0, 1)
|
|
|
if len(*one) == 1 && len((*one)[0]) > 0 {
|
|
|
+ if mgo.BsonIdToSId((*one)[0]["_id"]) == id {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
return mgo.BsonIdToSId((*one)[0]["_id"])
|
|
|
}
|
|
|
}
|
|
@@ -947,11 +952,11 @@ func (f *Front) CheckResult() {
|
|
|
sourceinfo := f.GetString("s_sourceinfo")
|
|
|
stype := f.GetString("stype")
|
|
|
datatype, _ := f.GetInteger("datatype")
|
|
|
- task, _ := util.Mgo.FindById(util.TASKCOLLNAME, tid, map[string]interface{}{"i_givenum": 1})
|
|
|
+ var allNum int
|
|
|
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})
|
|
|
//checkCount := util.Mgo.Count(sourceinfo, map[string]interface{}{"s_grouptaskid": tid, "b_check": true})
|
|
|
- allNum := (*task)["i_givenum"] //任务数据量
|
|
|
+
|
|
|
markNum, checkNum, checkNumR := 0, 0, 0 // 标注数量, 审核数据量, 审核数据完全正确的数据量
|
|
|
cmaps := make(map[string]int) // 标注字段整体准确率
|
|
|
umaps := make(map[string]interface{}) // 按人员 字段准确率
|
|
@@ -962,6 +967,7 @@ func (f *Front) CheckResult() {
|
|
|
defer util.Mgo.DestoryMongoConn(sess)
|
|
|
query := make(map[string]interface{})
|
|
|
if tid == "" {
|
|
|
+ allNum = util.Mgo.Count(util.PROJECTCOLLNAME, map[string]interface{}{"b_check": true})
|
|
|
query1 := make(map[string]interface{})
|
|
|
if stype == "all" {
|
|
|
query1["i_ckdata"] = 2
|
|
@@ -981,6 +987,8 @@ func (f *Front) CheckResult() {
|
|
|
}
|
|
|
f.T["taskNum"] = util.Mgo.Count(sourceinfo, query1)
|
|
|
} else {
|
|
|
+ task, _ := util.Mgo.FindById(util.TASKCOLLNAME, tid, map[string]interface{}{"i_givenum": 1})
|
|
|
+ allNum = qu.IntAll((*task)["i_givenum"]) //任务数据量
|
|
|
if stype == "group" {
|
|
|
query["s_grouptaskid"] = tid
|
|
|
} else {
|