|
@@ -63,7 +63,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 //含字母
|
|
@@ -115,7 +115,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 //含字母
|
|
@@ -309,11 +309,13 @@ func CheckLetter(text string, reg *regexp.Regexp, indexArr [][]int) (flag bool)
|
|
|
//匹配
|
|
|
func RegMatch(fieldText map[string]interface{}, matchType []string, matchReg *Reg, matchKey map[string]bool, matchKeyType map[string]bool, goon, isAddWord bool) (match bool) {
|
|
|
defer qu.Catch()
|
|
|
+ fmt.Println("*************", fieldText, matchType, matchReg, matchKey, matchKeyType, goon, isAddWord)
|
|
|
if len(matchType) == 0 && isAddWord { //特殊处理附加词为空的情况
|
|
|
match = true
|
|
|
return
|
|
|
}
|
|
|
for _, mt := range matchType {
|
|
|
+
|
|
|
if text := qu.ObjToString(fieldText[mt]); text != "" {
|
|
|
for _, cr := range matchReg.CReg { //逗号分隔,任意一个匹配表示匹配成功
|
|
|
if goon && matchKey[cr.CsVal] { //matchkey已存在不在匹配
|
|
@@ -487,7 +489,7 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
}
|
|
|
}
|
|
|
//河南移动
|
|
|
- if CheckBidHrefAppidMap[appid] {
|
|
|
+ if DisPackageAppidMap[appid] {
|
|
|
projectId := GetProjectId(id)
|
|
|
if projectId != "" {
|
|
|
//projectIds := strings.Split(projectId, ",")
|
|
@@ -555,6 +557,9 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if index == 1 {
|
|
|
+ GetWinnerType(qu.ObjToString(tmp["s_winner"]), tmp)
|
|
|
+ }
|
|
|
if len(indexdata) > 0 {
|
|
|
for _, v := range indexdata {
|
|
|
MgoSaveCache <- v
|
|
@@ -562,6 +567,8 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
xlsxCount++
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ log.Println("查result为空id:", id)
|
|
|
}
|
|
|
}
|
|
|
if isDup == 1 {
|
|
@@ -1130,7 +1137,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile, isHen
|
|
|
row.AddCell().SetValue(v["projectname"]) //项目名称
|
|
|
row.AddCell().SetValue(v["buyer"]) //采购单位
|
|
|
row.AddCell().SetValue(v[""]) //采购单位类别---私有标签tagname
|
|
|
- if v["bidamount"] != nil { //中标金额
|
|
|
+ if v["bidamount"] != nil { //中标金额
|
|
|
row.AddCell().SetFloat(qu.Float64All(v["bidamount"]))
|
|
|
} else {
|
|
|
row.AddCell()
|
|
@@ -1169,8 +1176,8 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile, isHen
|
|
|
ids := SE.EncodeString(qu.ObjToString(v["id"])) //唯一标识
|
|
|
row.AddCell().SetValue(ids)
|
|
|
row.AddCell().SetValue(SE.EncodeString(qu.ObjToString(v["projectId"]))) //项目标识
|
|
|
+ row.AddCell().SetValue(v["jybxhref"]) //剑鱼标讯地址
|
|
|
|
|
|
- //row.AddCell().SetValue(v["jybxhref"])
|
|
|
//row.AddCell().SetValue(v["projectcode"])
|
|
|
}
|
|
|
xf.Sheets = xf.Sheets[4:5]
|
|
@@ -1272,29 +1279,33 @@ func checkBidId(appid, id string) bool {
|
|
|
|
|
|
func GetWinnerType(s_winner string, v map[string]interface{}) {
|
|
|
isMatch := false
|
|
|
- for _, vs := range Sysconfig["dis_package_config"].(map[string]interface{}) {
|
|
|
- vvs := vs.(map[string]interface{})
|
|
|
- keyWord := qu.ObjToString(vvs["keyWord"])
|
|
|
- exclued := qu.ObjToString(vvs["exclued"])
|
|
|
- name := qu.ObjToString(vvs["name"])
|
|
|
- for _, key := range strings.Split(keyWord, ",") {
|
|
|
- if strings.Contains(s_winner, key) {
|
|
|
- isMatch = true
|
|
|
- if exclued != "" {
|
|
|
- for _, keys := range strings.Split(exclued, ",") {
|
|
|
- if strings.Contains(s_winner, keys) {
|
|
|
- isMatch = false
|
|
|
+ if s_winner != "" {
|
|
|
+ for _, vs := range Sysconfig["dis_package_config"].(map[string]interface{}) {
|
|
|
+ vvs := vs.(map[string]interface{})
|
|
|
+ keyWord := qu.ObjToString(vvs["keyWord"])
|
|
|
+ exclued := qu.ObjToString(vvs["exclued"])
|
|
|
+ name := qu.ObjToString(vvs["name"])
|
|
|
+ for _, key := range strings.Split(keyWord, ",") {
|
|
|
+ if strings.Contains(s_winner, key) {
|
|
|
+ isMatch = true
|
|
|
+ if exclued != "" {
|
|
|
+ for _, keys := range strings.Split(exclued, ",") {
|
|
|
+ if strings.Contains(s_winner, keys) {
|
|
|
+ isMatch = false
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if isMatch {
|
|
|
+ v["winner_type"] = name
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
- if isMatch {
|
|
|
- v["winner_type"] = name
|
|
|
- break
|
|
|
+ if !isMatch {
|
|
|
+ v["winner_type"] = "集成商"
|
|
|
}
|
|
|
- }
|
|
|
- if !isMatch {
|
|
|
- v["winner_type"] = "集成商"
|
|
|
+ } else {
|
|
|
+ v["winner_type"] = ""
|
|
|
}
|
|
|
}
|