|
@@ -86,6 +86,7 @@ var (
|
|
|
|
|
|
//格式化中标金额换行
|
|
//格式化中标金额换行
|
|
winnerReg100 = regexp.MustCompile("中标金额:[\\s]+([0-9\\.万元]+)")
|
|
winnerReg100 = regexp.MustCompile("中标金额:[\\s]+([0-9\\.万元]+)")
|
|
|
|
+ winnerReg101 = regexp.MustCompile("(含税总价)([\\d]+)")
|
|
|
|
|
|
//清洗影响候选人-抽取的文本
|
|
//清洗影响候选人-抽取的文本
|
|
cleanWinnerReg1 = regexp.MustCompile("第[一二三123]中标候选人项目业绩[::]")
|
|
cleanWinnerReg1 = regexp.MustCompile("第[一二三123]中标候选人项目业绩[::]")
|
|
@@ -112,10 +113,12 @@ var (
|
|
findCandidate3 = regexp.MustCompile("(^.{4,}(公司|集团|[大中小]学|单位|机构|企业|设计|厂|场|院|所|店|中心|局|站|城|处|行|部|队|联合[会体]((成员|牵头人)[))]?)?|工作室|有限司)([((]第一中标候选人[))])$)")
|
|
findCandidate3 = regexp.MustCompile("(^.{4,}(公司|集团|[大中小]学|单位|机构|企业|设计|厂|场|院|所|店|中心|局|站|城|处|行|部|队|联合[会体]((成员|牵头人)[))]?)?|工作室|有限司)([((]第一中标候选人[))])$)")
|
|
clearSpace1 = regexp.MustCompile("([((][\\d一二三四五六七八九十][))][\\s\u3000\u2003\u00a0\\t]*|<[^>].+?>)")
|
|
clearSpace1 = regexp.MustCompile("([((][\\d一二三四五六七八九十][))][\\s\u3000\u2003\u00a0\\t]*|<[^>].+?>)")
|
|
clearSpace2 = regexp.MustCompile("</?[^>]+>")
|
|
clearSpace2 = regexp.MustCompile("</?[^>]+>")
|
|
- offerReg = regexp.MustCompile("(中标|磋商|投标|报\\n|报|单|成交)总?(价|金额)")
|
|
|
|
|
|
+ offerReg = regexp.MustCompile("(中标|磋商|含税|投标|报\\n|报|单|成交)总?(价|金额)")
|
|
nofferReg = regexp.MustCompile("(费率|折扣率)")
|
|
nofferReg = regexp.MustCompile("(费率|折扣率)")
|
|
- nobidValReg = regexp.MustCompile("^(\\d{2}%|[0-9]+\\.[0-9]+%)$")
|
|
|
|
- noKeyValReg = regexp.MustCompile("(采购项目信息|担保机构)")
|
|
|
|
|
|
+ nobidValReg1 = regexp.MustCompile("^(\\d{2}%|[0-9]+\\.[0-9]+%)$")
|
|
|
|
+ nobidValReg2 = regexp.MustCompile("^(折扣[::]?0\\.[\\d]+)$")
|
|
|
|
+
|
|
|
|
+ noKeyValReg = regexp.MustCompile("(采购项目信息|担保机构)")
|
|
//特殊 - 不分割
|
|
//特殊 - 不分割
|
|
winnerNoSplitReg = regexp.MustCompile("^(第[一二三四五六七八九十]中[选|标]?候选人)[::]([\u4E00-\u9FA5]{4,20}([((]集团[))])?(有限公司|公司))[,,]([\u4E00-\u9FA5]{4,20}([((]集团[))])?(有限公司|公司))$")
|
|
winnerNoSplitReg = regexp.MustCompile("^(第[一二三四五六七八九十]中[选|标]?候选人)[::]([\u4E00-\u9FA5]{4,20}([((]集团[))])?(有限公司|公司))[,,]([\u4E00-\u9FA5]{4,20}([((]集团[))])?(有限公司|公司))$")
|
|
)
|
|
)
|
|
@@ -178,6 +181,8 @@ func (wo *WinnerOrderEntity) Find(text string, flag bool, from int, isSite bool,
|
|
|
|
|
|
//中标金额格式化
|
|
//中标金额格式化
|
|
text = winnerReg100.ReplaceAllString(text, "中标金额:${1}")
|
|
text = winnerReg100.ReplaceAllString(text, "中标金额:${1}")
|
|
|
|
+ text = winnerReg101.ReplaceAllString(text, "${1}:${2}")
|
|
|
|
+
|
|
//特殊格式
|
|
//特殊格式
|
|
text = winnerReg14_1.ReplaceAllString(text, "\n中标候选人${1}名:${2}\n中标金额:${3}\n")
|
|
text = winnerReg14_1.ReplaceAllString(text, "\n中标候选人${1}名:${2}\n中标金额:${3}\n")
|
|
|
|
|
|
@@ -397,10 +402,14 @@ func (wo *WinnerOrderEntity) findByReg(content string, blocks []string, reg_2 *r
|
|
findOfferFlag = true
|
|
findOfferFlag = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //异常不合理值过滤
|
|
|
|
+ if nobidValReg2.MatchString(qutil.ObjToString(v)) {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
//找到了中标金额
|
|
//找到了中标金额
|
|
if findOfferFlag && object["entname"] != nil {
|
|
if findOfferFlag && object["entname"] != nil {
|
|
val := wo.clear("中标金额", v+GetMoneyUnit(k, v))
|
|
val := wo.clear("中标金额", v+GetMoneyUnit(k, v))
|
|
- if val != nil && !nobidValReg.MatchString(qutil.ObjToString(val)) {
|
|
|
|
|
|
+ if val != nil && !nobidValReg1.MatchString(qutil.ObjToString(val)) {
|
|
moneys := clear.ObjToMoney([]interface{}{val, ""})
|
|
moneys := clear.ObjToMoney([]interface{}{val, ""})
|
|
if len(moneys) > 0 {
|
|
if len(moneys) > 0 {
|
|
if vf, ok := moneys[0].(float64); ok && moneys[len(moneys)-1].(bool) {
|
|
if vf, ok := moneys[0].(float64); ok && moneys[len(moneys)-1].(bool) {
|