|
@@ -352,7 +352,7 @@ func (table *Table) KVFilter(isSite bool, codeSite string) {
|
|
|
}
|
|
|
|
|
|
var winMoneyReg *regexp.Regexp = regexp.MustCompile("(报价|投标价|投标总价)")
|
|
|
-
|
|
|
+var winNoMoneyReg *regexp.Regexp = regexp.MustCompile("(得分)")
|
|
|
//处理table.SortKV.value为数组的情况
|
|
|
func (table *Table) sortKVArr(as *SortMap, isSite bool, codeSite string) {
|
|
|
winnertag := iswinnertabletag.MatchString(table.Tag) && !nswinnertabletag.MatchString(table.Tag) //table标签
|
|
@@ -425,7 +425,7 @@ func (table *Table) sortKVArr(as *SortMap, isSite bool, codeSite string) {
|
|
|
if entname != "" {
|
|
|
tmpEntname[vsk] = entname
|
|
|
}
|
|
|
- } else if winMoneyReg.MatchString(k) && len(tmpPrice[vsk]) == 0 {
|
|
|
+ } else if winMoneyReg.MatchString(k) && !winNoMoneyReg.MatchString(k) && len(tmpPrice[vsk]) == 0 {
|
|
|
kv = "中标金额"
|
|
|
}else { //验证val时如果数组中的第一条数据既不满足sort或者entname 判定此数组数据错误
|
|
|
break
|
|
@@ -528,7 +528,7 @@ func (table *Table) sortKVArr(as *SortMap, isSite bool, codeSite string) {
|
|
|
if (len(table.WinnerOrder) > 0 && table.WinnerOrder[0]["price"] == nil && len(vsss) == len(table.WinnerOrder)) ||
|
|
|
(len(table.WinnerOrder) > 0 && strings.Contains(k,"总报价") && len(vsss) == len(table.WinnerOrder)){
|
|
|
kv := ""
|
|
|
- if winMoneyReg.MatchString(k) {
|
|
|
+ if winMoneyReg.MatchString(k) && !winNoMoneyReg.MatchString(k) {
|
|
|
kv = "中标金额"
|
|
|
} else {
|
|
|
kt := u.GetTags(k, isSite, codeSite)
|
|
@@ -2264,6 +2264,25 @@ func (tn *Table) CheckMultiPackageByTable(isSite bool, codeSite string) (b bool,
|
|
|
|
|
|
}
|
|
|
|
|
|
+ }else { //新增 - 特殊情况 - 查找sortKV - 预算
|
|
|
+ for k,v := range tn.SortKV.Map {
|
|
|
+ if strings.Contains(k,"预算") {
|
|
|
+ if vs, ok := v.([]string); ok {
|
|
|
+ if len(index)==len(vs) {
|
|
|
+ moneys := clear.ObjToMoney([]interface{}{vs[nk], ""})
|
|
|
+ if len(moneys) > 0 {
|
|
|
+ if vf, ok := moneys[0].(float64); ok {
|
|
|
+ bp.Budget = vf
|
|
|
+ bp.IsTrueBudget = moneys[len(moneys)-1].(bool)
|
|
|
+ } else if vi, ok := moneys[0].(int); ok {
|
|
|
+ bp.Budget = float64(vi)
|
|
|
+ bp.IsTrueBudget = moneys[len(moneys)-1].(bool)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
tn.BlockPackage.AddKey(v, bp) //table子包数组
|
|
|
}
|