|
@@ -3,7 +3,6 @@ package pretreated
|
|
import (
|
|
import (
|
|
"fmt"
|
|
"fmt"
|
|
u "jy/util"
|
|
u "jy/util"
|
|
- "log"
|
|
|
|
qutil "qfw/util"
|
|
qutil "qfw/util"
|
|
"regexp"
|
|
"regexp"
|
|
"strings"
|
|
"strings"
|
|
@@ -237,7 +236,6 @@ func (table *Table) KVFilter() {
|
|
as.AddKey(k, v)
|
|
as.AddKey(k, v)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
//处理值是数组的kv放入标准化kv中//处理table.SortKV.value为数组的情况
|
|
//处理值是数组的kv放入标准化kv中//处理table.SortKV.value为数组的情况
|
|
table.sortKVArr(as, winnertag)
|
|
table.sortKVArr(as, winnertag)
|
|
//
|
|
//
|
|
@@ -315,9 +313,6 @@ func (table *Table) KVFilter() {
|
|
func (table *Table) sortKVArr(as *SortMap, winnertag bool) {
|
|
func (table *Table) sortKVArr(as *SortMap, winnertag bool) {
|
|
checkKey := map[int]bool{}
|
|
checkKey := map[int]bool{}
|
|
for kn, k := range as.Keys { //遍历table.SortKV.value为数组的key
|
|
for kn, k := range as.Keys { //遍历table.SortKV.value为数组的key
|
|
- if len(table.StandKV[k]) == 0 || strings.TrimSpace(table.StandKV[k][0].Value) != "" {
|
|
|
|
- continue
|
|
|
|
- }
|
|
|
|
v := as.Map[k]
|
|
v := as.Map[k]
|
|
if vm, ok := v.([]map[string]interface{}); ok && k == NullTxtBid {
|
|
if vm, ok := v.([]map[string]interface{}); ok && k == NullTxtBid {
|
|
if table.WinnerOrder == nil {
|
|
if table.WinnerOrder == nil {
|
|
@@ -790,7 +785,6 @@ func (tn *Table) AnalyTables(contactFormat *u.ContactFormat) []*Table {
|
|
table.TdContactFormat(contactFormat) //contactFormat,处理采购单位,代理机构
|
|
table.TdContactFormat(contactFormat) //contactFormat,处理采购单位,代理机构
|
|
//开始查找kv,核心模块,table.SortKV
|
|
//开始查找kv,核心模块,table.SortKV
|
|
table.FindKV()
|
|
table.FindKV()
|
|
- log.Println(table.SortKV.Map)
|
|
|
|
//table中抽取品牌,table.BrandData
|
|
//table中抽取品牌,table.BrandData
|
|
if u.IsBrandGoods {
|
|
if u.IsBrandGoods {
|
|
table.analyBrand()
|
|
table.analyBrand()
|