zhangjinkun 5 years ago
parent
commit
08bff0cb43
2 changed files with 13 additions and 11 deletions
  1. 4 3
      fullproject/src_dev5/project.go
  2. 9 8
      fullproject/src_dev5/task.go

+ 4 - 3
fullproject/src_dev5/project.go

@@ -489,12 +489,13 @@ var INFOFIELDS = []string{
 	"topscopeclass",
 	"subscopclass",
 	"infoformat",
+	"buyerperson",
+	"buyertel",
 }
 
 //项目中list的信息
 func (p *ProjectTask) PushListInfo(tmp map[string]interface{}) bson.M {
 	res := bson.M{
-
 		"infoid": qu.BsonIdToSId(tmp["_id"]),
 	}
 	for _, k := range INFOFIELDS {
@@ -614,12 +615,12 @@ func (p *ProjectTask) UpdateProject(tmp map[string]interface{}, thisinfo *Info,
 	}
 	//9--采购单位联系人
 	if thisinfo.Buyerperson != "" && strings.Index(pInfo.Buyerperson, thisinfo.Buyerperson) < 0 {
-		pInfo.Buyerperson += thisinfo.Buyerperson
+		pInfo.Buyerperson = thisinfo.Buyerperson
 		set["buyerperson"] = pInfo.Buyerperson
 	}
 	//10--采购单位電話
 	if thisinfo.Buyertel != "" && strings.Index(pInfo.Buyertel, thisinfo.Buyertel) < 0 {
-		pInfo.Buyertel += thisinfo.Buyertel
+		pInfo.Buyertel = thisinfo.Buyertel
 		set["buyertel"] = pInfo.Buyertel
 	}
 

+ 9 - 8
fullproject/src_dev5/task.go

@@ -189,18 +189,19 @@ func (p *ProjectTask) taskQl(udpInfo map[string]interface{}) {
 	if coll == "" {
 		coll = ExtractColl
 	}
-	sess := MongoTool.GetMgoConn()
-	bcon := false
-	if sess.DB(db).C(coll).EnsureIndexKey("publishtime_1", "publishtime_-1") == nil {
-		bcon = true
-	} else {
-		log.Println("publishtime_1索引不存在")
-	}
-	MongoTool.DestoryMongoConn(sess)
+	//	sess := MongoTool.GetMgoConn()
+	//	bcon := false
+	//	if sess.DB(db).C(coll).EnsureIndexKey("publishtime_1", "publishtime_-1") == nil {
+	//		bcon = true
+	//	} else {
+	//		log.Println("publishtime_1索引不存在")
+	//	}
+	//	MongoTool.DestoryMongoConn(sess)
 	thread := util.IntAllDef(udpInfo["thread"], 3)
 	if thread > 0 {
 		p.thread = thread
 	}
+	bcon := true
 	if bcon {
 		//生成查询语句执行
 		p.enter(db, coll, map[string]interface{}{})