Browse Source

Merge branch 'dev3.4.1' of http://192.168.3.207:10080/qmx/jy-data-extract into dev3.4.1

apple 4 years ago
parent
commit
dc90a6070e

+ 6 - 1
fullproject/src_v1/config.json

@@ -15,6 +15,11 @@
         "to": "wangjianghan@topnet.net.cn",
         "api": "http://172.17.145.179:19281/_send/_mail"
     },
+    "bidding": {
+        "addr": "192.168.3.207:27092",
+        "dbname": "qfw",
+        "dbsize": 5
+    },
     "es": {
         "addr": "http://192.168.3.128:9800",
         "index": "projectset",
@@ -30,7 +35,7 @@
         },
         {
             "addr": "127.0.0.1",
-            "port": 1483,
+            "port": 17833,
             "memo": "修改项目创建new"
         }
     ],

+ 10 - 11
fullproject/src_v1/init.go

@@ -13,18 +13,13 @@ import (
 	"go.mongodb.org/mongo-driver/bson/primitive"
 )
 
-const (
-	ProjectCache = "info" //存放每条项目信息,key为项目ID
-)
-
 var (
 	Sysconfig                                      map[string]interface{} //读取配置文件
-	MongoTool                                      *MongodbSim            //mongodb连接
+	MongoTool, MgoBidding                          *MongodbSim            //mongodb连接
 	ExtractColl, ProjectColl, BackupColl, SiteColl string                 //抽取表、项目表、项目快照表、站点表
 	Thread                                         int                    //配置项线程数
-	//NextNode                 []interface{}
-	BlackList    								   []interface{}
-	BlaskListMap								   map[string]bool
+	BlackList                                      []interface{}
+	BlaskListMap                                   map[string]bool
 )
 
 var (
@@ -62,6 +57,13 @@ func init() {
 		DbName:      Sysconfig["mongodbName"].(string),
 	}
 	MongoTool.InitPool()
+	bidding, _ := Sysconfig["bidding"].(map[string]interface{})
+	MgoBidding = &MongodbSim{
+		MongodbAddr: bidding["addr"].(string),
+		Size:        util.IntAll(bidding["dbsize"]),
+		DbName:      bidding["dbname"].(string),
+	}
+	MgoBidding.InitPool()
 
 	ExtractColl = Sysconfig["extractColl"].(string)
 	ProjectColl = Sysconfig["projectColl"].(string)
@@ -416,7 +418,6 @@ func CosineSimilar(srcWords1, dstWords1 string) float64 {
 	return v1
 }
 
-
 func initWinnerRegexp() {
 	winRegMap := Sysconfig["winner"].(map[string]interface{})
 	preRegexps := winRegMap["pre_regexp"].([]interface{})
@@ -458,7 +459,6 @@ func initWinnerRegexp() {
 	BlackRegexp["winner"] = winBlackRegexps
 }
 
-
 func initBuyerRegexp() {
 	buyRegMap := Sysconfig["buyer"].(map[string]interface{})
 	preRegexps := buyRegMap["pre_regexp"].([]interface{})
@@ -540,4 +540,3 @@ func initAgencyRegexp() {
 	}
 	BlackRegexp["agency"] = winBlackRegexps
 }
-

+ 2 - 2
fullproject/src_v1/main.go

@@ -90,8 +90,8 @@ func main() {
 
 //测试组人员使用
 func mainT() {
-	sid = "5eddb9189e628c5991654802"
-	eid = "5f9670aa50cded0641b30736"
+	sid = "5fe07b07f0f9d716c179e2aa"
+	eid = "5fe57be8f0f9d716c17d95e8"
 	//flag.StringVar(&sid, "sid", "", "开始id")
 	//flag.StringVar(&eid, "eid", "", "结束id")
 	//flag.Parse()

+ 1 - 1
fullproject/src_v1/project.go

@@ -685,7 +685,7 @@ func (p *ProjectTask) NewCachePinfo(id primitive.ObjectID, thisinfo *Info, bidty
 func (p *ProjectTask) UpdateProject(tmp map[string]interface{}, thisinfo *Info, pInfo *ProjectInfo, weight int, comStr string, ex int) {
 	if p.currentType != "updateInfo" {
 		if BinarySearch(pInfo.Ids, thisinfo.Id) > -1 {
-			log.Println("repeat", thisinfo.Id)
+			log.Println("repeat", thisinfo.Id, ",pid", pInfo.Id)
 			return
 		}
 	}

+ 4 - 3
fullproject/src_v1/task.go

@@ -339,7 +339,7 @@ func (p *ProjectTask) taskZl(udpInfo map[string]interface{}) {
 func (p *ProjectTask) taskUpdateInfo(udpInfo map[string]interface{}) {
 	defer util.Catch()
 	infoid := udpInfo["infoid"].(string)
-	infoMap := MongoTool.FindById(ExtractColl, infoid)
+	infoMap := MgoBidding.FindById(util.ObjToString(udpInfo["coll"]), infoid)
 	if infoMap["modifyinfo"] == nil {
 		util.Debug("does not exist modifyinfo ---,", infoid)
 		return
@@ -461,7 +461,7 @@ func (p *ProjectTask) enter(db, coll string, q map[string]interface{}) {
 	countRepeat := 0
 
 	pool := make(chan bool, p.thread)
-	log.Println("start project", q)
+	log.Println("start project", q, p.pici)
 	sess := MongoTool.GetMgoConn()
 	defer MongoTool.DestoryMongoConn(sess)
 	infoPool := make(chan map[string]interface{}, 2000)
@@ -481,8 +481,10 @@ func (p *ProjectTask) enter(db, coll string, q map[string]interface{}) {
 						if P_QL.currentType == "project" && util.IntAll(tmp["dataging"]) == 1 {
 							//增量	dataging为1不参与合并
 							util.Debug("增量   dataging == 1 ", tmp["_id"])
+							countRepeat++
 							return
 						}
+
 						p.fillInPlace(tmp)
 						info := ParseInfo(tmp)
 						p.currentTime = info.Publishtime
@@ -490,7 +492,6 @@ func (p *ProjectTask) enter(db, coll string, q map[string]interface{}) {
 						p.CommonMerge(tmp, info)
 					} else {
 						//信息错误,进行更新
-						util.Debug(tmp["_id"])
 						countRepeat++
 					}
 				}(tmp)

+ 31 - 52
fullproject/src_v1/update.go

@@ -43,18 +43,7 @@ func (p *ProjectTask) modifyUpdate(pid string, index, position int, tmpPro, modi
 		_ = udpclient.WriteUdp(by, mu.OP_TYPE_DATA, toaddr[1])
 	}
 	// 修改内存
-	var pro ProjectInfo
-	err := mapstructure.Decode(tmpPro, &pro)
-	if err != nil {
-		qu.Debug(err)
-	}
-	p.AllIdsMapLock.Lock()
-	if v, ok := p.AllIdsMap[pid]; ok {
-		v.P = &pro
-	}
-	p.AllIdsMapLock.Unlock()
-
-	p.printMemPro(pid)
+	p.modifyMem(tmpPro)
 }
 
 func (p *ProjectTask) mergeAndModify(pInfoId string, index, position int, tmp map[string]interface{}, tmpPro map[string]interface{}, modifyMap map[string]interface{}) {
@@ -79,16 +68,7 @@ func (p *ProjectTask) mergeAndModify(pInfoId string, index, position int, tmp ma
 			//没有合并到新项目中
 			p.modifyUpdate(pInfoId, index, position, tmpPro, modifyMap)
 			// 修改内存
-			var pro ProjectInfo
-			err := mapstructure.Decode(tmpPro, &pro)
-			if err != nil {
-				qu.Debug(err)
-			}
-			p.AllIdsMapLock.Lock()
-			if v, ok := p.AllIdsMap[pInfoId]; ok {
-				v.P = &pro
-			}
-			p.AllIdsMapLock.Unlock()
+			p.modifyMem(tmpPro)
 		}
 	}else if index == 0 {
 		// 招标公告信息在原有项目中位于第1个
@@ -146,16 +126,7 @@ func (p *ProjectTask) mergeAndModify(pInfoId string, index, position int, tmp ma
 			//没有合并到新项目中,更新list字段,有条件更新项目外围字段
 			p.modifyUpdate(pInfoId, index, position, tmpPro, modifyMap)
 			// 修改内存
-			var pro ProjectInfo
-			err := mapstructure.Decode(tmpPro, &pro)
-			if err != nil {
-				qu.Debug(err)
-			}
-			p.AllIdsMapLock.Lock()
-			if v, ok := p.AllIdsMap[pInfoId]; ok {
-				v.P = &pro
-			}
-			p.AllIdsMapLock.Unlock()
+			p.modifyMem(tmpPro)
 		}
 	}else if index == 1 {
 		// 招标公告信息在原有项目中处于中间某一条
@@ -182,16 +153,7 @@ func (p *ProjectTask) mergeAndModify(pInfoId string, index, position int, tmp ma
 			// 未合并到新项目中
 			p.modifyUpdate(pInfoId, index, position, tmpPro, modifyMap)
 			// 修改内存
-			var pro ProjectInfo
-			err := mapstructure.Decode(tmpPro, &pro)
-			if err != nil {
-				qu.Debug(err)
-			}
-			p.AllIdsMapLock.Lock()
-			if v, ok := p.AllIdsMap[pInfoId]; ok {
-				v.P = &pro
-			}
-			p.AllIdsMapLock.Unlock()
+			p.modifyMem(tmpPro)
 		}
 	}else if index == 2 {
 		// 招标公告信息在原有项目中位于最后一条
@@ -220,16 +182,7 @@ func (p *ProjectTask) mergeAndModify(pInfoId string, index, position int, tmp ma
 			// 未合并到新项目中
 			p.modifyUpdate(pInfoId, index, position, tmpPro, modifyMap)
 			// 修改内存
-			var pro ProjectInfo
-			err := mapstructure.Decode(tmpPro, &pro)
-			if err != nil {
-				qu.Debug(err)
-			}
-			p.AllIdsMapLock.Lock()
-			if v, ok := p.AllIdsMap[pInfoId]; ok {
-				v.P = &pro
-			}
-			p.AllIdsMapLock.Unlock()
+			p.modifyMem(tmpPro)
 		}
 	}
 }
@@ -1218,6 +1171,32 @@ func delOldPro(pid string) {
 	}
 }
 
+// 修改内存中的数据
+func (p *ProjectTask) modifyMem(tmpPro map[string]interface{})  {
+	pid := qu.ObjToString(tmpPro["_id"])
+	var pro ProjectInfo
+	err := mapstructure.Decode(tmpPro, &pro)
+	if err != nil {
+		qu.Debug(err)
+	}
+	pro.Id = StringTOBsonId(pid)
+	tmpMap := make(map[string]InfoField)
+	infoMap := tmpPro["infofield"].(map[string]interface{})
+	for _, v := range infoMap {
+		var field InfoField
+		b, _ := json.Marshal(v)
+		_ = json.Unmarshal(b, &field)
+		tmpMap[pid] = field
+	}
+	pro.InfoFiled = tmpMap
+	p.AllIdsMapLock.Lock()
+	if v, ok := p.AllIdsMap[pid]; ok {
+		v.P = &pro
+	}
+	p.AllIdsMapLock.Unlock()
+	p.printMemPro(pid)
+}
+
 // 打印内存中的项目信息
 func (p *ProjectTask) printMemPro(pid string) {
 	p.AllIdsMapLock.Lock()

+ 1 - 1
projectinfo/src/task.go

@@ -39,7 +39,7 @@ const ESMODEL = `
                 "type": "phrase",
                 "fields": [
                   "purchasing",
-                  "s_projectname",
+                  "projectname.pname",
                   "title"
                 ]
               }

+ 4 - 1
qyxy_change/qy_baidu/task.go

@@ -175,7 +175,10 @@ func findEnt(tmp map[string]interface{}) {
 	changeData := util.ObjToMap((*data)["changeRecordData"])
 	infoList := (*changeData)["list"].([]interface{})
 	currentTime := time.Now().Unix()
-	q := bson.M{"company_name": (*ent)["entName"]}
+	m := util.ObjToString((*ent)["entName"])
+	m = strings.ReplaceAll(m, "(", "(")
+	m = strings.ReplaceAll(m, ")", ")")
+	q := bson.M{"company_name": m}
 	changeEnt, _ := MgoMix.FindOne(CollSave, q)
 	update := map[string]interface{}{}
 	if changeEnt != nil && len(*changeEnt) > 0 {

+ 97 - 11
src/jy/extract/extract.go

@@ -315,9 +315,8 @@ func (e *ExtractTask) PreInfo(doc map[string]interface{}) (j, jf *ju.Job, isSite
 	if subtype == "" {
 		subtype = "all"
 	}
-	if toptype == "其它" || subtype == "其它" || subtype == "其他" || subtype == "结果变更" {
-		toptype = "all"
-		subtype = "all"
+	if subtype == "其他" {
+		subtype = "其它"
 	}
 	toMap := qu.ObjToMap(doc["jsondata"])
 	//log.Debug("toMap", toMap)
@@ -988,6 +987,11 @@ func ExtRuleCoreByReg(extfrom string, doc map[string]interface{}, j *ju.Job, in
 			if len(extinfo) > 0 {
 				AddExtLog("extract", j.SourceMid, nil, extinfo, in, et.TaskInfo) //抽取日志
 			}
+		} else if in.Field == "qualifies" {
+			extinfo := extRegCoreToResult(extfrom,pretreated.HtmlToText(qu.ObjToString(doc[extfrom]) ), &map[string]string{}, j, in, isSite)
+			if len(extinfo) > 0 {
+				AddExtLog("extract", j.SourceMid, nil, extinfo, in, et.TaskInfo) //抽取日志
+			}
 		} else {
 			for _, v := range j.Block {
 				btag := make(map[string]string)
@@ -1256,16 +1260,48 @@ func getKvByLuaFields(vc *RuleCore, j *ju.Job, et *ExtractTask) (map[string][]ma
 		if field != vc.Field {
 			continue
 		}
-		extractFromKv(field, fieldname, j.Block, vc, kvmap)
+		extractFromKv(field, fieldname, j.Block, vc, kvmap, j.Category)
 	}
 	AddExtLog("extract", j.SourceMid, nil, kvmap, &RegLuaInfo{Field: vc.Field}, et.TaskInfo) //抽取日志
 	return kvmap, true
 }
 
-func extractFromKv(field, fieldname string, blocks []*ju.Block, vc *RuleCore, kvmap map[string][]map[string]interface{}) {
+func extractFromKv(field, fieldname string, blocks []*ju.Block, vc *RuleCore, kvmap map[string][]map[string]interface{}, Category string) {
 	//qu.Debug("fieldname+++", fieldname)
 	for _, bl := range blocks {
 		tp := ""
+		if strings.Contains(bl.Title, "保证金") && (field == "bid_bond" || field == "contract_bond") {
+			if text := ju.TrimLRSpace(bl.Text, ""); text != "" {
+				if Category == "招标" || Category == "拟建" || Category == "预告" {
+					kvmap[field] = append(kvmap[field], map[string]interface{}{
+						"code":        "CL_块内容",
+						"field":       field,
+						"ruletext":    "投标保证金",
+						"extfrom":     "投标保证金_块内容",
+						"sourcevalue": bl.Text,
+						"value":       text,
+						"type":        "投标保证金_块内容",
+						"matchtype":   "tag_string",
+						"blocktag":    bl.Classify,
+						"weight":      0,
+					})
+				} else if Category == "结果" {
+					kvmap[field] = append(kvmap[field], map[string]interface{}{
+						"code":        "CL_",
+						"field":       field,
+						"ruletext":    "履约保证金",
+						"extfrom":     "履约保证金_块内容",
+						"sourcevalue": bl.Text,
+						"value":       text,
+						"type":        "履约保证金_块内容",
+						"matchtype":   "tag_string",
+						"blocktag":    bl.Classify,
+						"weight":      0,
+					})
+				}
+			}
+			return
+		}
 		for k, v := range []*ju.JobKv{bl.ColonKV, bl.SpaceKV, bl.TableKV} {
 			if k == 0 {
 				tp = "colon"
@@ -1299,7 +1335,7 @@ func extractFromKv(field, fieldname string, blocks []*ju.Block, vc *RuleCore, kv
 			}
 		}
 		if len(kvmap[field]) == 0 {
-			extractFromKv(field, fieldname, bl.Block, vc, kvmap)
+			extractFromKv(field, fieldname, bl.Block, vc, kvmap, Category)
 		}
 	}
 }
@@ -1369,7 +1405,6 @@ func extRegCoreToResult(extfrom, text string, tag *map[string]string, j *ju.Job,
 					}
 				}
 			}
-			//fmt.Println(text)
 			tmps := []map[string]interface{}{}
 			for i := 0; i < len(apos); i++ {
 				if strings.TrimSpace(rep[vre.Field+"_"+fmt.Sprint(i)]) != "" {
@@ -1384,8 +1419,6 @@ func extRegCoreToResult(extfrom, text string, tag *map[string]string, j *ju.Job,
 						"blocktag":  *tag,
 						"score":     score,
 					}
-					tmps = append(tmps, tmp)
-
 					exfield := ju.ExtField{
 						BlockTag:    *tag,
 						Field:       vre.Field,
@@ -1396,7 +1429,15 @@ func extRegCoreToResult(extfrom, text string, tag *map[string]string, j *ju.Job,
 						ExtFrom:     extfrom,
 						SourceValue: rep[vre.Field+"_"+fmt.Sprint(i)],
 						Value:       rep[vre.Field+"_"+fmt.Sprint(i)],
-						Score:       score}
+						Score:       score,
+					}
+					if vre.Field == "qualifies" {
+						if len(rep) >= 2 {
+							tmp["ruletext"] = rep[vre.Field+"_key_"+fmt.Sprint(i)]
+							exfield.RuleText = rep[vre.Field+"_key_"+fmt.Sprint(i)]
+						}
+					}
+					tmps = append(tmps, tmp)
 					if tmp["blocktag"] != nil {
 						exfield.BlockTag = tmp["blocktag"].(map[string]string)
 					}
@@ -1780,7 +1821,37 @@ func AnalysisSaveResult(j, jf *ju.Job, e *ExtractTask) {
 		if len(*j.Jsondata) > 0 {
 			tmp["jsondata"] = j.Jsondata
 		}
-		for _, val := range result {
+		for k, val := range result {
+			if k == "qualifies" {
+				squalifies := make([]interface{}, 0)
+				squalifiesMap := make(map[string]*scoreIndex, 0)
+				for _, kv := range val {
+					skey := kv.RuleText
+					if kv.Score > 0 {
+						if squalifiesMap[skey] == nil {
+							squalifiesMap = map[string]*scoreIndex{
+								skey: &scoreIndex{
+									Score: kv.Score,
+									Index: len(squalifies),
+								},
+							}
+							squalifies = append(squalifies, map[string]interface{}{
+								"key":   skey,
+								"value": kv.Value,
+							})
+						} else {
+							if squalifiesMap[skey].Score < kv.Score {
+								squalifies[squalifiesMap[skey].Index] = map[string]interface{}{
+									"key":   skey,
+									"value": kv.Value,
+								}
+							}
+						}
+					}
+				}
+				tmp[k] = squalifies
+				continue
+			}
 			for _, v := range val { //取第一个非负数,项目名称除外
 				//存0是否有效
 				if (v.Field == "bidamount" || v.Field == "budget") && v.IsTrue && v.Score > -1 {
@@ -2111,6 +2182,16 @@ func checkFields(tmp map[string]interface{}) map[string]interface{} {
 		delete(tmp, "supervisorrate")
 	}
 	for k, v := range tmp {
+		if k == "qualifies" {
+			continue
+		}
+		if k == "contract_guarantee" || k == "bid_guarantee" {
+			if len(fmt.Sprint(v)) > 0 {
+				tmp[k] = true
+			} else {
+				delete(tmp, k)
+			}
+		}
 		if v == "" || len(strings.TrimSpace(fmt.Sprint(v))) == 0 || strings.Contains(fmt.Sprint(v), "**") {
 			delete(tmp, k)
 		}
@@ -2476,3 +2557,8 @@ func RemoveReplicaSliceString(slc []string) []string {
 	}
 	return result
 }
+
+type scoreIndex struct {
+	Score float64
+	Index int
+}

+ 173 - 0
src/res/fieldscore.json

@@ -873,5 +873,178 @@
                 ]
             }
         ]
+    },
+    "bid_bond": {
+        "type": "string",
+        "positivewords": [
+            {
+                "describe": "包含关键字",
+                "regstr": "(交纳|投标)",
+                "score": 3
+            },
+            {
+                "describe": "金额",
+                "regstr": "(金额|元|¥)",
+                "score": 1
+            },
+            {
+                "describe": "数字金额",
+                "regstr": "([\\d,.,万]*元|人民币)",
+                "score": 1
+            }
+        ],
+        "negativewords": [
+            {
+                "describe": "包含负分",
+                "regstr": "(注[::]|详见|test|null|公告|原因|测试|未知|收费|标注|流标|不满?足|终止原因|([::??]|帐号|申请表|修改|清单|变更|公告|凭证|缴纳|澄清|答疑)$)",
+                "score": -8
+            }
+        ],
+        "length": [
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    0,
+                    7,
+                    -5
+                ]
+            },
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    7,
+                    20,
+                    2
+                ]
+            },
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    20,
+                    500,
+                    4
+                ]
+            },
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    500,
+                    -1,
+                    -10
+                ]
+            }
+        ]
+    },
+    "contract_guarantee": {
+        "type": "string",
+        "positivewords": [
+            {
+                "describe": "包含关键字",
+                "regstr": "(履约保证金额?|合同履约金)",
+                "score": 3
+            },
+            {
+                "describe": "金额",
+                "regstr": "(金额|元|¥)",
+                "score": 1
+            },
+            {
+                "describe": "数字金额",
+                "regstr": "([\\d,.,万]*元|人民币)",
+                "score": 1
+            }
+        ],
+        "negativewords": [
+            {
+                "describe": "包含负分",
+                "regstr": "(注[::]|投标(保证|担保)金|详见|test|null|公告|原因|测试|未知|收费|标注|流标|不满?足|终止原因|([::??]|帐号|申请表|修改|清单|变更|公告|凭证|缴纳|澄清|答疑)$)",
+                "score": -8
+            }
+        ],
+        "length": [
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    0,
+                    7,
+                    -5
+                ]
+            },
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    7,
+                    20,
+                    2
+                ]
+            },
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    20,
+                    500,
+                    4
+                ]
+            },
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    500,
+                    -1,
+                    -10
+                ]
+            }
+        ]
+    },
+    "qualifies": {
+        "type": "string",
+        "positivewords": [
+        ],
+        "negativewords": [
+            {
+                "describe": "包含负分",
+                "regstr": "(注[::]|详见|test|null|公告|原因|测试|未知|流标|终止原因|([::??])$)",
+                "score": -8
+            },
+            {
+                "describe": "包空格",
+                "regstr": "\\s",
+                "score": -2
+            }
+        ],
+        "length": [
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    0,
+                    36,
+                    -10
+                ]
+            },
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    36,
+                    150,
+                    3
+                ]
+            },
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    150,
+                    500,
+                    2
+                ]
+            },
+            {
+                "describe": "[gt,lte,score]",
+                "range": [
+                    500,
+                    -1,
+                    -10
+                ]
+            }
+        ]
     }
 }

+ 1 - 1
udpcreateindex/src/biddingall.go

@@ -228,7 +228,7 @@ func biddingAllTask(data []byte, mapInfo map[string]interface{}) {
 				tmp["projectscope"] = string(([]rune(ps))[:4000])
 			}
 			//对标的物为空处理
-			if filetext := getFileText(tmp); len(filetext) > 0 { //attach_text
+			if filetext := getFileText(tmp); len(filetext) > 10 { //attach_text
 				tmp["filetext"] = filetext
 			}
 			if purchasing, ok := tmp["purchasing"].(string); ok && purchasing == "" {

+ 1 - 1
udpcreateindex/src/config.json

@@ -48,7 +48,7 @@
         "projectinfo":"approvecode,approvecontent,approvestatus,approvetime,approvedept,approvenumber,projecttype,approvecity", 
      	"projectinfomap":{"approvecode":"string","approvecontent":"string","approvestatus":"string","approvetime":"string","approvedept":"string","approvenumber":"string","projecttype":"string","approvecity":"string"},
         "purchasinglist": "itemname,brandname,model,unitname,number",
-        "purchasinglistmap":{"itemname":"string","brandname": "string","model":"string","unitname":"string","number":"float64"},
+        "purchasinglistmap":{"itemname":"string","brandname": "string","model":"string","unitname":"string","number":"float64","unitprice":"float64","totalprice":"float64"},
         "winnerorder": "sort,sortstr,entname",
         "winnerordermap": {"sort":"int","sortstr":"string","entname":"string"},
         "multiIndex": ""

+ 5 - 5
udpcreateindex/src/main.go

@@ -46,8 +46,8 @@ var (
 
 func init() {
 	util.ReadConfig(&Sysconfig)
-	//inits()
-	//go checkMapJob()
+	inits()
+	go checkMapJob()
 	detailLength = util.IntAllDef(Sysconfig["detaillength"], 50000)
 	fileLength = util.IntAllDef(Sysconfig["filelength"], 50000)
 	updport, _ = Sysconfig["updport"].(string)
@@ -65,7 +65,7 @@ func init() {
 		MongodbAddr: mconf["addr"].(string),
 		Size:        util.IntAllDef(mconf["pool"], 5),
 		DbName:      mconf["db"].(string),
-		//ReplSet:     "bidding",
+		ReplSet:     "bidding",
 	}
 	mgo.InitPool()
 
@@ -101,7 +101,7 @@ func init() {
 	}
 	mgostandard = &mongodb.MongodbSim{
 		MongodbAddr: standard["addr"].(string),
-		//ReplSet:     "bidding",
+		ReplSet:     "bidding",
 		Size:        util.IntAllDef(standard["pool"], 5),
 		DbName:      standard["db"].(string),
 	}
@@ -182,7 +182,7 @@ func init() {
 }
 
 func main() {
-	//go task_index()
+	go task_index()
 	updport := Sysconfig["udpport"].(string)
 	udpclient = mu.UdpClient{Local: updport, BufSize: 1024}
 	udpclient.Listen(processUdpMsg)