|
@@ -343,6 +343,35 @@ func syncJyData(source, tid, pid string) int {
|
|
|
tmp = make(map[string]interface{})
|
|
|
}
|
|
|
wg.Wait()
|
|
|
+ } else if pid == "676a624edadb2b5c6413bdee" || pid == "676a6230dadb2b5c6413b691" {
|
|
|
+ // 江苏联通 招标/中标
|
|
|
+ q = bson.M{"s_grouptaskid": tid, "is_repeat": 1}
|
|
|
+ query := sess.DB(util.Mgo.DbName).C(source).Find(q).Select(nil).Iter()
|
|
|
+ for tmp := make(map[string]interface{}); query.Next(&tmp); count++ {
|
|
|
+ ch <- true
|
|
|
+ wg.Add(1)
|
|
|
+ go func(tmp map[string]interface{}) {
|
|
|
+ defer func() {
|
|
|
+ <-ch
|
|
|
+ wg.Done()
|
|
|
+ }()
|
|
|
+ info := tmp["v_baseinfo"].(map[string]interface{})
|
|
|
+ info["createtime"] = time.Now().Unix()
|
|
|
+ if qu.ObjToString(info["id"]) == "" {
|
|
|
+ info["id"] = tmp["id"]
|
|
|
+ }
|
|
|
+
|
|
|
+ info["isOptimization"] = qu.IntAll(tmp["is_push"])
|
|
|
+ info["ispanchong"] = 1
|
|
|
+ info["earliestDay"] = qu.IntAll(tmp["earliestDay"])
|
|
|
+ //util.MgoJy.Save(util.JYPushColl, info)
|
|
|
+ util.MgoJy.Save("usermail_tmp_js", info)
|
|
|
+ util.Mgo.UpdateById(source, tmp["_id"], bson.M{"$set": bson.M{"sendflag": true}})
|
|
|
+
|
|
|
+ }(tmp)
|
|
|
+ tmp = make(map[string]interface{})
|
|
|
+ }
|
|
|
+ wg.Wait()
|
|
|
} else {
|
|
|
q = bson.M{"s_grouptaskid": tid, "sendflag": nil}
|
|
|
query := sess.DB(util.Mgo.DbName).C(source).Find(q).Select(nil).Iter()
|
|
@@ -517,6 +546,14 @@ func checkStat(sourceinfo, groupTaskId, pid string, mp map[string]interface{}) {
|
|
|
mp["pEffNum"] = pEffNum
|
|
|
}
|
|
|
|
|
|
+// 江苏联通 联合体、牵头人、牵头方
|
|
|
+func checkDetail(tmp map[string]interface{}) {
|
|
|
+ if strings.Contains(qu.ObjToString(tmp["detail"]), "联合体") || strings.Contains(qu.ObjToString(tmp["detail"]), "牵头人") ||
|
|
|
+ strings.Contains(qu.ObjToString(tmp["detail"]), "牵头方") {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
var modelpath string = "web/model/任务详情%d.xlsx"
|
|
|
|
|
|
// GroupTaskExport 用户组任务导出
|
|
@@ -1082,10 +1119,11 @@ func (f *Front) GroupImportData() {
|
|
|
update["is_push"] = 1
|
|
|
}
|
|
|
lastid = id
|
|
|
+
|
|
|
if len(del) > 0 {
|
|
|
- util.Mgo.UpdateById(sourceinfo, id, bson.M{"$set": update, "$unset": del})
|
|
|
+ util.Mgo.Update(sourceinfo, bson.M{"id": id}, bson.M{"$set": update, "$unset": del}, false, false)
|
|
|
} else {
|
|
|
- util.Mgo.UpdateById(sourceinfo, id, bson.M{"$set": update})
|
|
|
+ util.Mgo.Update(sourceinfo, bson.M{"id": id}, bson.M{"$set": update}, false, false)
|
|
|
}
|
|
|
}
|
|
|
}
|