jiaojiao7 пре 4 година
родитељ
комит
c291967337
4 измењених фајлова са 11 додато и 7 уклоњено
  1. 4 0
      customerdata/src/util.go
  2. 1 2
      src/history/historytask.go
  3. 6 5
      src/history/util_history.go
  4. BIN
      src/web/res/fields.xlsx

+ 4 - 0
customerdata/src/util.go

@@ -28,6 +28,8 @@ var MatchType = map[string]interface{}{
 	"5": "projectname",
 	"6": "buyer",
 	"7": "s_winner",
+	"8": "buyer",
+	"9": "s_winner",
 }
 
 //加载排除词、附加词、关键词
@@ -576,6 +578,8 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, a
 		if projectId != "" {
 			//projectIds := strings.Split(projectId, ",")
 			tmp["projectId"] = projectId
+		} else {
+			tmp["projectId"] = ""
 		}
 	}
 	redis.Put("datag", appid+"_"+id, 1, 3*24*60*60)

+ 1 - 2
src/history/historytask.go

@@ -30,7 +30,6 @@ func (this *HistoryData) HistoryTask(history_id string) {
 	log.Println("history_id", history_id)
 	//是否根据项目id去重
 	isFilter, _ := this.GetInteger("isFilter")
-	log.Println(isFilter)
 	customer, _ := Mgo.Find("historylog", map[string]interface{}{"_id": mongoutil.StringTOBsonId(history_id)}, nil, nil, false, -1, -1)
 	if len(*customer) == 1 {
 		c := (*customer)[0]
@@ -49,7 +48,6 @@ func (this *HistoryData) HistoryTask(history_id string) {
 		if DisPackageAppidMap[appId] {
 			isHenanMobile = true
 		}
-		log.Println(isfile, isHenanMobile)
 		cus := &Customer{}
 		cus.SaveDataMap = map[string]map[string]interface{}{}
 		cus.SaveDataArr = []map[string]interface{}{}
@@ -87,6 +85,7 @@ func (this *HistoryData) HistoryTask(history_id string) {
 		}
 		tag_rules := qu.ObjArrToMapArr(tag_rule)
 		dep_rules := qu.ObjArrToMapArr(dep_rule)
+		log.Println(tag_rules,"*********************")
 		cus.GetTagRules(tag_rules)               //获取客户打标签规则
 		cus.GetDepartments("history", dep_rules) //获取客户信息
 		qu.Debug("customer:", cus.ID, cus.Name, cus.PushModel, cus.AppId, cus.IsTagRule, cus.IsSearchHosp, cus.IsSearchEnps, len(cus.TagRules), len(cus.Departments))

+ 6 - 5
src/history/util_history.go

@@ -65,7 +65,7 @@ func GetNotkeyAndKeyAddWord(list []map[string]interface{}, fieldMap map[string]i
 					tmp_nkw := nkw_addArr[0]
 					if tmp_nkw != "" {
 						cr := &CommonReg{}
-						cr.CsVal = tmp_nkw                   //记录原值
+						cr.CsVal = tmp_nkw //记录原值
 						if LetterCase.MatchString(tmp_nkw) { //判断附加词中是否有英文
 							tmp_nkw = strings.ToUpper(tmp_nkw) //附加词中有英文全部转为大写
 							cr.IsLetter = true                 //含字母
@@ -117,7 +117,7 @@ func GetNotkeyAndKeyAddWord(list []map[string]interface{}, fieldMap map[string]i
 				tmp_aw := aw_addArr[0]
 				if tmp_aw != "" {
 					cr := &CommonReg{}
-					cr.CsVal = tmp_aw                   //记录原值
+					cr.CsVal = tmp_aw //记录原值
 					if LetterCase.MatchString(tmp_aw) { //判断附加词中是否有英文
 						tmp_aw = strings.ToUpper(tmp_aw) //附加词中有英文全部转为大写
 						cr.IsLetter = true               //含字母
@@ -494,6 +494,8 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
 		if projectId != "" {
 			//projectIds := strings.Split(projectId, ",")
 			tmp["projectId"] = projectId
+		} else {
+			tmp["projectId"] = ""
 		}
 	}
 	if DisPackageAppidMap[appid] {
@@ -529,7 +531,6 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
 									SearchEnterpriseInfo(s_data)
 									indexdata = append(indexdata, s_data)
 									log.Println("index", index, " ", id, " ", w)
-									log.Println("indexdata", len(indexdata))
 								} else {
 									tmp["s_winner"] = w
 									GetWinnerType(w, tmp)
@@ -1136,8 +1137,8 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile, isHen
 					row.AddCell().SetValue(v["district"])    //县区
 					row.AddCell().SetValue(v["projectname"]) //项目名称
 					row.AddCell().SetValue(v["buyer"])       //采购单位
-					row.AddCell().SetValue(v[""])            //采购单位类别---私有标签tagname
-					if v["bidamount"] != nil {               //中标金额
+					row.AddCell().SetValue(v["tagname"])     //采购单位类别---私有标签tagname
+					if v["bidamount"] != nil { //中标金额
 						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]))
 					} else {
 						row.AddCell()

BIN
src/web/res/fields.xlsx