wcj 6 жил өмнө
parent
commit
8a3c3689cb

+ 3 - 1
src/jy/pretreated/analystep.go

@@ -6,6 +6,7 @@ package pretreated
 import (
 import (
 	"encoding/json"
 	"encoding/json"
 	"jy/util"
 	"jy/util"
+	"log"
 	//"log"
 	//"log"
 	"strings"
 	"strings"
 
 
@@ -88,7 +89,7 @@ func processTableInBlock(bl *util.Block, job *util.Job) {
 		job.HasTable = 1
 		job.HasTable = 1
 		//添加标识:文本中有table
 		//添加标识:文本中有table
 		tabres := AnalyTableV2(tab, job.Category, bl.Title, tab.Text(), 2, job.SourceMid, job.RuleBlock) //解析表格入口 返回:汇总表格对象
 		tabres := AnalyTableV2(tab, job.Category, bl.Title, tab.Text(), 2, job.SourceMid, job.RuleBlock) //解析表格入口 返回:汇总表格对象
-		processTableResult(tabres, bl, job)                                                                 //分析table解析结果
+		processTableResult(tabres, bl, job)                                                              //分析table解析结果
 		if bl.Title == "" && tabres.BlockTag != "" {
 		if bl.Title == "" && tabres.BlockTag != "" {
 			bl.Title = tabres.BlockTag
 			bl.Title = tabres.BlockTag
 		}
 		}
@@ -178,6 +179,7 @@ func processTableResult(tabres *TableResult, block *util.Block, job *util.Job) {
 	}
 	}
 	//处理中标人排序
 	//处理中标人排序
 	wror := []map[string]interface{}{}
 	wror := []map[string]interface{}{}
+	log.Println(tabres.WinnerOrder)
 	for _, v := range tabres.WinnerOrder {
 	for _, v := range tabres.WinnerOrder {
 		entName, _ := v["entname"].(string)
 		entName, _ := v["entname"].(string)
 		v["entname"] = winnerOrderEntity.clear("中标单位", entName)
 		v["entname"] = winnerOrderEntity.clear("中标单位", entName)

+ 0 - 6
src/jy/pretreated/analytable.go

@@ -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()