Bladeren bron

调整清洗方法等

zhengkun 8 maanden geleden
bovenliggende
commit
a637919e68
10 gewijzigde bestanden met toevoegingen van 215 en 140 verwijderingen
  1. 0 3
      clean/c_all.go
  2. 16 7
      clean/c_pcode.go
  3. 12 7
      clean/c_time.go
  4. 3 3
      clean/c_unit.go
  5. 3 1
      extract/extension.go
  6. 2 2
      extract/test.go
  7. 5 34
      main.go
  8. 3 2
      prompt/prompt_field.go
  9. 48 48
      tool/tool.go
  10. 123 33
      ul/global.go

+ 0 - 3
clean/c_all.go

@@ -111,9 +111,6 @@ func CleanFieldInfo(zhipu map[string]interface{}, fns []string) map[string]inter
 			delete(data, "s_budget")
 		}
 	}
-	if s_subtype != "合同" {
-		delete(data, "s_contractcode")
-	}
 
 	return data
 }

+ 16 - 7
clean/c_pcode.go

@@ -7,21 +7,27 @@ import (
 	"unicode/utf8"
 )
 
-// 编号
+// 限制
 var codeUnConReg *regexp.Regexp = regexp.MustCompile("(null|勘察|包件|测试|设计|设备|项目|标段|工程|监理|范围|分包|月|日|天)")
 var codeUnLenReg *regexp.Regexp = regexp.MustCompile("([\u4e00-\u9fa5]{7,})")
 
+// 符合
+var codeMeetReg1 *regexp.Regexp = regexp.MustCompile("(第[0-9]+号)")
+
 // 清洗项目编号
 func CleanPcode(pcode string, fns []string) string {
-	if pcode == "无" {
+	if utf8.RuneCountInString(pcode) < 5 {
 		return ""
 	}
 	pcode = fieldReg1.ReplaceAllString(pcode, "")
 	pcode = pcodeReg1.ReplaceAllString(pcode, "")
 	pcode = pcodeReg2.ReplaceAllString(pcode, "")
-	if utf8.RuneCountInString(pcode) < 5 {
-		pcode = ""
+
+	//符合条件
+	if codeMeetReg1.MatchString(pcode) {
+		return pcode
 	}
+	//舍弃条件
 	if codeUnConReg.MatchString(pcode) || codeUnLenReg.MatchString(pcode) || !isAlphanumeric(pcode) || isRegTimeDateCode(pcode) {
 		return ""
 	}
@@ -38,15 +44,18 @@ func CleanPcode(pcode string, fns []string) string {
 
 // 清洗其他编号
 func CleanOtherCode(ocode string) string {
-	if ocode == "无" || ocode == "" {
+	if utf8.RuneCountInString(ocode) < 5 {
 		return ""
 	}
 	ocode = fieldReg1.ReplaceAllString(ocode, "")
 	ocode = pcodeReg1.ReplaceAllString(ocode, "")
 	ocode = pcodeReg2.ReplaceAllString(ocode, "")
-	if utf8.RuneCountInString(ocode) < 5 {
-		return ""
+
+	//符合条件
+	if codeMeetReg1.MatchString(ocode) {
+		return ocode
 	}
+	//舍弃条件
 	if codeUnConReg.MatchString(ocode) || codeUnLenReg.MatchString(ocode) || !isAlphanumeric(ocode) || isRegTimeDateCode(ocode) {
 		return ""
 	}

+ 12 - 7
clean/c_time.go

@@ -13,10 +13,11 @@ var numReg = regexp.MustCompile("[0-9.]+")
 var symbolReg = regexp.MustCompile("[%%﹪!!]")
 
 var YMD_Reg1 = regexp.MustCompile("(\\d{4}年\\d{1,2}月\\d{1,2}日)")
-var YMD_Reg2 = regexp.MustCompile("(\\d{4}[-]\\d{1,2}[-]\\d{1,2})")
+var YMD_Reg2 = regexp.MustCompile("((\\d{4})[-/](\\d{1,2})[-/](\\d{1,2}))")
 
 var HMS_Reg1 = regexp.MustCompile("(\\d{1,2}时\\d{1,2}分\\d{1,2}秒)")
 var HMS_Reg2 = regexp.MustCompile("(\\d{1,2}[:]\\d{1,2}[:]\\d{1,2})")
+var HMS_Reg3 = regexp.MustCompile("((\\d{1,2})[时点:]((\\d{1,2})[分:])?(\\d{1,2})?)")
 
 func fillPrefix(s string) string {
 	if len(s) == 2 {
@@ -42,12 +43,10 @@ func convertYMD(ymd string) string {
 		}
 	}
 	if ymd2 := YMD_Reg2.FindString(ymd); ymd2 != "" {
-		if arr := strings.Split(ymd2, "-"); len(arr) == 3 {
-			y, m, d := arr[0], arr[1], arr[2]
-			return y + "-" + fillPrefix(m) + "-" + fillPrefix(d)
-		} else {
-			return ""
-		}
+		y := YMD_Reg2.ReplaceAllString(ymd2, "${2}")
+		m := YMD_Reg2.ReplaceAllString(ymd2, "${3}")
+		d := YMD_Reg2.ReplaceAllString(ymd2, "${4}")
+		return y + "-" + fillPrefix(m) + "-" + fillPrefix(d)
 	}
 	return ""
 }
@@ -77,6 +76,12 @@ func convertHMS(hms string) string {
 		}
 		return fillPrefix(h) + ":" + fillPrefix(m) + ":" + fillPrefix(s)
 	}
+	if hms3 := HMS_Reg3.FindString(hms); hms3 != "" {
+		h := HMS_Reg3.ReplaceAllString(hms3, "${2}")
+		m := HMS_Reg3.ReplaceAllString(hms3, "${4}")
+		s := HMS_Reg3.ReplaceAllString(hms3, "${5}")
+		return fillPrefix(h) + ":" + fillPrefix(m) + ":" + fillPrefix(s)
+	}
 	return "00:00:00"
 }
 

+ 3 - 3
clean/c_unit.go

@@ -7,7 +7,7 @@ import (
 
 // 清洗采购单位
 func CleanBuyer(buyer string) string {
-	if buyer == "无" {
+	if buyer == "无" || buyer == "有限公司" {
 		return ""
 	}
 	buyer = fieldReg1.ReplaceAllString(buyer, "")
@@ -23,7 +23,7 @@ func CleanBuyer(buyer string) string {
 
 // 清洗中标单位
 func CleanWinner(s_winner string) string {
-	if s_winner == "无" {
+	if s_winner == "无" || s_winner == "有限公司" {
 		return ""
 	}
 	s_winner = fieldReg1.ReplaceAllString(s_winner, "")
@@ -35,7 +35,7 @@ func CleanWinner(s_winner string) string {
 
 // 清洗代理机构
 func CleanAgency(agency string) string {
-	if agency == "无" {
+	if agency == "无" || agency == "有限公司" {
 		return ""
 	}
 	agency = fieldReg1.ReplaceAllString(agency, "")

+ 3 - 1
extract/extension.go

@@ -60,7 +60,9 @@ func getpnsinfo(tmp map[string]interface{}) []string {
 func getDetailText(v map[string]interface{}, tmpid string) string {
 	detail := qu.ObjToString(v["detail"])
 	if ul.IsTool {
-		detail = qu.ObjToString(v["details"])
+		if details := qu.ObjToString(v["details"]); details != "" {
+			detail = details
+		}
 		filetext := qu.ObjToString(v["filetext"])
 		if utf8.RuneCountInString(detail) < 100 && filetext != "" {
 			detail = filetext

+ 2 - 2
extract/test.go

@@ -14,7 +14,7 @@ import (
 
 // 验证单条数据···
 func TestSingleFieldInfo(name string, tmpid string) {
-	log.Debug("测试单条数据数据···")
+	//log.Debug("测试单条数据数据···")
 	now := time.Now().Unix()
 	tmp := ul.BidMgo.FindById(name, tmpid)
 	if len(tmp) == 0 || tmp == nil {
@@ -24,7 +24,7 @@ func TestSingleFieldInfo(name string, tmpid string) {
 	data := ResolveInfo(tmp)
 	//最终结果...
 	if data != nil {
-
+		log.Debug(data["s_area"], "~", data["s_city"])
 	}
 	log.Debug("耗时···", time.Now().Unix()-now)
 }

+ 5 - 34
main.go

@@ -1,11 +1,9 @@
 package main
 
 import (
-	"data_ai/extract"
 	"data_ai/udp"
 	"data_ai/ul"
 	log "github.com/donnie4w/go-logger/logger"
-	"sync"
 )
 
 func init() {
@@ -20,47 +18,20 @@ func init() {
 			udp.InitProcessVar()
 		}
 	}
-	ul.InitOss(ul.IsLocal)
+	//ul.InitOss(ul.IsLocal)
 }
 
 func main() {
 	if ul.IsTool {
-		//tool.StartToolUpdateInfo()
+		//tool.StartToolInfo()
 		return
 	}
 	lock := make(chan bool)
 	<-lock
 }
-
 func test() {
-	log.Debug("···开始验证数据···")
-	q := map[string]interface{}{}
-	pool_mgo := make(chan bool, 500)
-	wg_mgo := &sync.WaitGroup{}
-	sess := ul.SourceMgo.GetMgoConn()
-	defer ul.SourceMgo.DestoryMongoConn(sess)
-	total, isok := 0, 0
-	it := sess.DB(ul.SourceMgo.DbName).C(ul.Bid_Name).Find(&q).Sort("_id").Iter()
-	for tmp := make(map[string]interface{}); it.Next(&tmp); total++ {
-		if total%100 == 0 {
-			log.Debug("cur index ", total)
-		}
-		isok++
-		pool_mgo <- true
-		wg_mgo.Add(1)
-		go func(tmp map[string]interface{}) {
-			defer func() {
-				<-pool_mgo
-				wg_mgo.Done()
-			}()
-			data := extract.ResolveInfo(tmp)
-			if len(data) > 0 {
-				tmp["ai_zhipu"] = data
-				ul.SourceMgo.Save("xxx-xxx", tmp)
-			}
-		}(tmp)
-		tmp = make(map[string]interface{})
+	arr := []string{}
+	for _, v := range arr {
+		log.Debug(v)
 	}
-	wg_mgo.Wait()
-	log.Debug("ai is over ...")
 }

+ 3 - 2
prompt/prompt_field.go

@@ -28,13 +28,13 @@ var pmt_field1 = `
 
 你在识别"项目所在地的省份"的时候,如果找不到,请去找项目信息的省份、采购单位的省份,如果还找不到,请根据上下文思考,给出你认为的最佳匹配的省份;
 你在识别"项目所在地的城市"的时候,如果找不到,请去找项目信息的城市、采购单位所在的城市,如果匹配到三级区县信息,请推导出具体城市。如果还找不到,请根据上下文思考,给出你认为的最佳匹配的城市;
-你在识别"采购单位"的时候,请根据上下文思考,输出最佳匹配结果;包括但不限于采购人,采购方,甲方等;不要使用:代理机构与中标单位;
+你在识别"采购单位"的时候,请根据上下文思考,输出最佳匹配结果;包括但不限于采购人,采购方,甲方,委托人,负责采购的单位名称等;不要使用:代理机构与中标单位;
 你在识别"项目的中标单位"的时候,中标单位包括但不限于成交供应商(注:当入围供应商/中标人存在多个,选择第一位为中标单位)、中标人、中标方、承包方、受让单位、中选单位、服务商、第一名中标候选人、第1名中标人(忽略其他中标候选人),如果正文明确指定了中标单位,请优先选正文的中标单位。联合体投标时,请列出所有单位名称使用","分割)。如果不能准确识别出"项目的中标单位",请填写"无";注:不要采购单位,不要代理机构;
 你在识别"代理机构"的时候,输出代理采购事务的机构名称,不能使用采购单位和中标单位;
 你在识别"采购单位联系人"的时候,输出负责采购的单位联系人,包括但不限于采购⼈或招标⼈或采购项目联系人;
 你在识别"采购单位联系方式"的时候,输出负责采购单位信息中的联系方式,包括但不限于采购⼈或招标⼈或采购单位信息的联系电话或联系方式,不能使用非电话号码;
 你在识别"中标单位联系人"的时候,输出项目的中标单位的联系人,通常为供应商或中标人;
-位联系方式"的时候,输出负责中标单位的联系方式,包括但不限于中标人的联系电话,中标单位联系人的联系电话等,不能使用非电话号码;
+你在识别"中标单位联系方式"的时候,输出负责中标单位的联系方式,包括但不限于中标人的联系电话,中标单位联系人的联系电话等,不能使用非电话号码;
 你在识别"代理机构联系人"的时候你在识别"中标单,输出代理采购事务的机构的联系人;
 你在识别"代理机构联系方式"的时候,输出代理机构的联系号码或联系电话或联系方式,不能使用非电话号码;
 请将上述的识别结果、信息分类结果,按照JSON格式输出,
@@ -55,6 +55,7 @@ var pmt_field1 = `
 
 请回答我的问题,不要联想,不要无中生有,不要生成解释,对于尚未确定或未明确的信息请在JSON对应的值填写:无
 正文内容:` + "\n" + `%s` + "\n结果JSON:"
+
 var pmt_field2 = `
 你是一个文本处理模型,专门用于分析文本提取信息,你具备以下能力:
 1、实体识别抽取

+ 48 - 48
tool/tool.go

@@ -65,54 +65,54 @@ func StartToolInfo() {
 }
 
 // 工具更新程序
-func StartToolUpdateInfo() {
-	log.Debug("工具开始大模型修正数据······")
-	q := map[string]interface{}{}
-	pool_mgo := make(chan bool, ul.Reading)
-	wg_mgo := &sync.WaitGroup{}
-	sess := ul.SourceMgo.GetMgoConn()
-	defer ul.SourceMgo.DestoryMongoConn(sess)
-	total, isok := 0, 0
-	it := sess.DB(ul.SourceMgo.DbName).C(ul.Ext_Name).Find(&q).Sort("_id").Iter()
-	for tmp := make(map[string]interface{}); it.Next(&tmp); total++ {
-		if total%100 == 0 {
-			log.Debug("cur index ", total)
-		}
-		isok++
-		pool_mgo <- true
-		wg_mgo.Add(1)
-		go func(tmp map[string]interface{}) {
-			defer func() {
-				<-pool_mgo
-				wg_mgo.Done()
-			}()
-			u_id := ul.BsonTOStringId(tmp["_id"])
-			b_id := qu.ObjToString(tmp["id"])
-			data := ul.BidMgo.FindById("bidding", b_id)
-			if len(data) > 0 && u_id != "" && b_id != "" && data["ai_zhipu"] != nil {
-				ai_zhipu := qu.ObjToMap(data["ai_zhipu"])
-				tmp["ai_zhipu"] = ai_zhipu
-				update_info := make(map[string]interface{}, 0)
-				is_unset := ul.ChooseCheckDataAI(tmp, &update_info)
-				update_info["ai_zhipu"] = ai_zhipu
-				//清洗与记录
-				if len(update_info) > 0 { //$set
-					ul.SourceMgo.UpdateById(ul.Ext_Name, u_id, map[string]interface{}{
-						"$set": update_info,
-					})
-				}
-				if is_unset { //"$unset"
-					ul.SourceMgo.UpdateById(ul.Ext_Name, u_id, map[string]interface{}{
-						"$unset": ul.Unset_Check,
-					})
-				}
-			}
-		}(tmp)
-		tmp = make(map[string]interface{})
-	}
-	wg_mgo.Wait()
-	log.Debug("ai update is over ...")
-}
+//func StartToolUpdateInfo() {
+//	log.Debug("工具开始大模型修正数据······")
+//	q := map[string]interface{}{}
+//	pool_mgo := make(chan bool, ul.Reading)
+//	wg_mgo := &sync.WaitGroup{}
+//	sess := ul.SourceMgo.GetMgoConn()
+//	defer ul.SourceMgo.DestoryMongoConn(sess)
+//	total, isok := 0, 0
+//	it := sess.DB(ul.SourceMgo.DbName).C(ul.Ext_Name).Find(&q).Sort("_id").Iter()
+//	for tmp := make(map[string]interface{}); it.Next(&tmp); total++ {
+//		if total%100 == 0 {
+//			log.Debug("cur index ", total)
+//		}
+//		isok++
+//		pool_mgo <- true
+//		wg_mgo.Add(1)
+//		go func(tmp map[string]interface{}) {
+//			defer func() {
+//				<-pool_mgo
+//				wg_mgo.Done()
+//			}()
+//			u_id := ul.BsonTOStringId(tmp["_id"])
+//			b_id := qu.ObjToString(tmp["id"])
+//			data := ul.BidMgo.FindById("bidding", b_id)
+//			if len(data) > 0 && u_id != "" && b_id != "" && data["ai_zhipu"] != nil {
+//				ai_zhipu := qu.ObjToMap(data["ai_zhipu"])
+//				tmp["ai_zhipu"] = ai_zhipu
+//				update_info := make(map[string]interface{}, 0)
+//				is_unset := ul.ChooseCheckDataAI(tmp, &update_info)
+//				update_info["ai_zhipu"] = ai_zhipu
+//				//清洗与记录
+//				if len(update_info) > 0 { //$set
+//					ul.SourceMgo.UpdateById(ul.Ext_Name, u_id, map[string]interface{}{
+//						"$set": update_info,
+//					})
+//				}
+//				if is_unset { //"$unset"
+//					ul.SourceMgo.UpdateById(ul.Ext_Name, u_id, map[string]interface{}{
+//						"$unset": ul.Unset_Check,
+//					})
+//				}
+//			}
+//		}(tmp)
+//		tmp = make(map[string]interface{})
+//	}
+//	wg_mgo.Wait()
+//	log.Debug("ai update is over ...")
+//}
 
 func CreatSingleFieldInfo(tmp map[string]interface{}, update_info map[string]interface{}) []map[string]interface{} {
 	pkgArr := []map[string]interface{}{}

+ 123 - 33
ul/global.go

@@ -21,9 +21,12 @@ func ChooseCheckDataAI(tmp map[string]interface{}, update_info *map[string]inter
 	ChooseTheBestCoreField(ai_zhipu, s_toptype, s_subtype, tmp, update_info, &ext_ai_record)
 	//选取分包
 	ChooseTheBestPackageField(ai_zhipu, s_toptype, s_subtype, tmp, update_info, &ext_ai_record)
-
 	//最终金额修正与选取
 	ChooseTheBestAmountField(tmp, update_info)
+	//最终单位修正与选取
+	ChooseTheBestUnitField(ai_zhipu, s_toptype, s_subtype, tmp, update_info, &ext_ai_record)
+	//其他字段选取
+	ChooseTheBestOtherField(ai_zhipu, tmp, update_info, &ext_ai_record)
 
 	//字段记录
 	(*update_info)["ext_ai_record"] = ext_ai_record
@@ -38,7 +41,6 @@ func ChooseCheckDataAI(tmp map[string]interface{}, update_info *map[string]inter
 			}
 		}
 	}
-
 	return false
 }
 
@@ -72,14 +74,14 @@ func ChooseTheBestClassField(ai_zhipu map[string]interface{}, tmp map[string]int
 
 // 选取字段
 func ChooseTheBestCoreField(ai_zhipu map[string]interface{}, s_toptype string, s_subtype string, tmp map[string]interface{}, update_info *map[string]interface{}, ext_ai_record *map[string]interface{}) {
-	//基础字段···
 	if s_buyer := qu.ObjToString(ai_zhipu["s_buyer"]); s_buyer != "" {
 		(*update_info)["buyer"] = s_buyer
 		(*ext_ai_record)["buyer"] = tmp["buyer"]
-		if agency := qu.ObjToString(tmp["agency"]); agency != "" && agency == s_buyer {
-			delete((*update_info), "buyer")
-			delete((*ext_ai_record), "buyer")
-		}
+	}
+	//基础字段···
+	if s_agency := qu.ObjToString(ai_zhipu["s_agency"]); s_agency != "" {
+		(*update_info)["agency"] = s_agency
+		(*ext_ai_record)["agency"] = tmp["agency"]
 	}
 	if s_projectname := qu.ObjToString(ai_zhipu["s_projectname"]); s_projectname != "" {
 		(*update_info)["projectname"] = s_projectname
@@ -93,25 +95,15 @@ func ChooseTheBestCoreField(ai_zhipu map[string]interface{}, s_toptype string, s
 		(*update_info)["budget"] = s_budget
 		(*ext_ai_record)["budget"] = tmp["budget"]
 	}
-	//地域字段···
-	o_area, o_district := qu.ObjToString(tmp["area"]), qu.ObjToString(tmp["district"])
+	//规则地域字段···
+	o_area, o_city, o_district := qu.ObjToString(tmp["area"]), qu.ObjToString(tmp["city"]), qu.ObjToString(tmp["district"])
 	s_area, s_city := qu.ObjToString(ai_zhipu["s_area"]), qu.ObjToString(ai_zhipu["s_city"])
 	if s_area != "" && s_area != "全国" {
 		(*update_info)["area"] = s_area
 		if s_city != "" {
 			(*update_info)["city"] = s_city
 			if o_district != "" {
-				//判断抽取的区县是否合理···
-				isT := false
-				if ds := S_DistrictDict[o_district]; ds != nil {
-					for _, v := range ds {
-						if v.C_Name == s_city && v.P_Name == s_area {
-							isT = true
-							break
-						}
-					}
-				}
-				if !isT {
+				if s_city != o_city || s_area != o_area {
 					(*update_info)["district"] = ""
 				}
 			}
@@ -260,6 +252,113 @@ func ChooseTheBestAmountField(tmp map[string]interface{}, update_info *map[strin
 	}
 }
 
+// 选择核对单位值
+func ChooseTheBestUnitField(ai_zhipu map[string]interface{}, s_toptype string, s_subtype string, tmp map[string]interface{}, update_info *map[string]interface{}, ext_ai_record *map[string]interface{}) {
+	buyer := qu.ObjToString((*update_info)["buyer"])
+	s_winner := qu.ObjToString((*update_info)["s_winner"])
+	agency := qu.ObjToString((*update_info)["agency"])
+	if buyer == "" {
+		buyer = qu.ObjToString(tmp["buyer"])
+	}
+	if s_winner == "" {
+		s_winner = qu.ObjToString(tmp["s_winner"])
+	}
+	if agency == "" {
+		agency = qu.ObjToString(tmp["agency"])
+	}
+
+	if buyer == s_winner && buyer != "" {
+		if strings.Contains(buyer, "公司") {
+			(*update_info)["buyer"] = ""
+			(*ext_ai_record)["buyer"] = tmp["buyer"]
+		} else {
+			if s_subtype == "单一" || s_subtype == "中标" || s_subtype == "成交" || s_subtype == "合同" {
+				(*update_info)["s_winner"] = ""
+				(*update_info)["winner"] = ""
+				(*ext_ai_record)["s_winner"] = tmp["s_winner"]
+				(*ext_ai_record)["winner"] = tmp["winner"]
+			}
+		}
+	}
+	if agency != "" {
+		if agency == buyer || agency == s_winner {
+			(*update_info)["agency"] = ""
+			(*ext_ai_record)["agency"] = tmp["buyer"]
+		}
+	}
+}
+
+// 选择其它字段
+func ChooseTheBestOtherField(ai_zhipu map[string]interface{}, tmp map[string]interface{}, update_info *map[string]interface{}, ext_ai_record *map[string]interface{}) {
+	if purchasinglist := ai_zhipu["purchasinglist"]; purchasinglist != nil {
+		(*update_info)["purchasinglist"] = purchasinglist
+		(*ext_ai_record)["purchasinglist"] = tmp["purchasinglist"]
+	}
+	//新增字段
+	if biddingcode := ai_zhipu["s_biddingcode"]; biddingcode != nil {
+		(*update_info)["biddingcode"] = biddingcode
+	}
+	if packagecode := ai_zhipu["s_packagecode"]; packagecode != nil {
+		(*update_info)["packagecode"] = packagecode
+	}
+
+	//替换字段
+	if contractcode := ai_zhipu["s_contractcode"]; contractcode != nil {
+		(*update_info)["contractcode"] = contractcode
+		(*ext_ai_record)["contractcode"] = tmp["contractcode"]
+	}
+	if bidopenaddress := ai_zhipu["s_bidopenaddress"]; bidopenaddress != nil {
+		(*update_info)["bidopenaddress"] = bidopenaddress
+		(*ext_ai_record)["bidopenaddress"] = tmp["bidopenaddress"]
+	}
+	if biddiscount := ai_zhipu["s_biddiscount"]; biddiscount != nil {
+		(*update_info)["biddiscount"] = biddiscount
+		(*ext_ai_record)["biddiscount"] = tmp["biddiscount"]
+	}
+	if bidopentime := ai_zhipu["s_bidopentime"]; bidopentime != nil {
+		(*update_info)["bidopentime"] = bidopentime
+		(*ext_ai_record)["bidopentime"] = tmp["bidopentime"]
+	}
+	if bidendtime := ai_zhipu["s_bidendtime"]; bidendtime != nil {
+		(*update_info)["bidendtime"] = bidendtime
+		(*ext_ai_record)["bidendtime"] = tmp["bidendtime"]
+	}
+	if docstarttime := ai_zhipu["s_docstarttime"]; docstarttime != nil {
+		(*update_info)["docstarttime"] = docstarttime
+		(*ext_ai_record)["docstarttime"] = tmp["docstarttime"]
+	}
+	if docendtime := ai_zhipu["s_docendtime"]; docendtime != nil {
+		(*update_info)["docendtime"] = docendtime
+		(*ext_ai_record)["docendtime"] = tmp["docendtime"]
+	}
+
+	//联系方式
+	if buyerperson := ai_zhipu["s_buyerperson"]; buyerperson != nil {
+		(*update_info)["buyerperson"] = buyerperson
+		(*ext_ai_record)["buyerperson"] = tmp["buyerperson"]
+	}
+	if buyertel := ai_zhipu["s_buyertel"]; buyertel != nil {
+		(*update_info)["buyertel"] = buyertel
+		(*ext_ai_record)["buyertel"] = tmp["buyertel"]
+	}
+	if agencyperson := ai_zhipu["s_agencyperson"]; agencyperson != nil {
+		(*update_info)["agencyperson"] = agencyperson
+		(*ext_ai_record)["agencyperson"] = tmp["agencyperson"]
+	}
+	if agencytel := ai_zhipu["s_agencytel"]; agencytel != nil {
+		(*update_info)["agencytel"] = agencytel
+		(*ext_ai_record)["agencytel"] = tmp["agencytel"]
+	}
+	if winnerperson := ai_zhipu["s_winnerperson"]; winnerperson != nil {
+		(*update_info)["winnerperson"] = winnerperson
+		(*ext_ai_record)["winnerperson"] = tmp["winnerperson"]
+	}
+	if winnertel := ai_zhipu["s_winnertel"]; winnertel != nil {
+		(*update_info)["winnertel"] = winnertel
+		(*ext_ai_record)["winnertel"] = tmp["winnertel"]
+	}
+}
+
 // 筛选金额
 func filterAmount(f1 float64, f2 float64) float64 {
 	//选取一个合适的金额 ...
@@ -326,20 +425,13 @@ func staffAiPackageInfo(com_package []map[string]interface{}, s_toptype string,
 
 // 核对分类
 func CheckClassByOtherFileds(toptype_ai, subtype_ai string, data map[string]interface{}) (string, string) {
-	/*
-		存在winnerorder
-		1、ai未识别出结果
-		2、规则结果-变更(66bf0b3a66cf0db42ad6ecc3)、结果-废标(66bf08fd66cf0db42ad6d9fc)
-		3、ai招标,规则结果-成交(66bef5d166cf0db42ad65cc1)
-		4、
-	*/
 	toptype_rule := qu.ObjToString(data["toptype"])
 	subtype_rule := qu.ObjToString(data["subtype"])
 	//1、结果类 中标和成交错误校正
 	s_winner := qu.ObjToString(data["s_winner"])
 	winnerorder := IsMarkInterfaceMap(data["winnerorder"])
-	if toptype_ai == "结果" && toptype_rule == "结果" { //会不会出现结果-废标、结果-变更中有中标候选人的情况?
-		if subtype_ai == "成交" && subtype_rule == "成交" && len(winnerorder) > 0 { //规则、大模型都错(66bef30966cf0db42ad64f4c)
+	if toptype_ai == "结果" && toptype_rule == "结果" {
+		if subtype_ai == "成交" && subtype_rule == "成交" && len(winnerorder) > 0 { //规则、大模型都错
 			return "结果", "中标"
 		}
 		if ((subtype_ai == "中标" || subtype_ai == "其它") && subtype_rule == "成交") || ((subtype_ai == "成交" || subtype_ai == "其它") && subtype_rule == "中标") {
@@ -354,10 +446,8 @@ func CheckClassByOtherFileds(toptype_ai, subtype_ai string, data map[string]inte
 	//2、招标、结果错误校正
 	if toptype_ai != "结果" && toptype_rule == "结果" {
 		//return toptype_rule,subtype_rule//默认规则为准
-		if len(winnerorder) > 0 {
-			return toptype_rule, "中标"
-		} else if s_winner != "" || data["bidamount"] != nil {
-			return toptype_rule, "成交"
+		if len(winnerorder) > 0 || s_winner != "" || data["bidamount"] != nil {
+			return toptype_rule, subtype_rule
 		} else {
 			return toptype_ai, subtype_ai
 		}