Explorar o código

中标预测抽取

zhangjinkun %!s(int64=4) %!d(string=hai) anos
pai
achega
8fe5357b93

+ 3 - 2
src/config.json

@@ -21,15 +21,16 @@
     "elasticPoolSize": 1,
     "mergetable": "projectset",
     "mergetablealias": "projectset_v1",
+ 	"ffield": true,
     "saveresult": false,
     "fieldsfind": false,
     "qualityaudit": false,
     "saveblock": false,
-    "filelength": 100000,
+    "filelength": 500000,
     "iscltlog": false,
     "brandgoods": false,
     "pricenumber":true,
-    "udptaskid": "5cdd3025698414032c8322b1",
+    "udptaskid": "5eda01b0c566ca08409370bb",
     "udpport": "1484",
     "nextNode": [
         {

+ 3 - 2
src/jy/extract/extract.go

@@ -1959,8 +1959,9 @@ func AnalysisSaveResult(j, jf *ju.Job, e *ExtractTask) {
 			tmp["projectname"] = j.Title
 		}
 		tmp["repeat"] = 0
-		e.ResultTmp = tmp
-		e.ResultFTmp = ffield
+		if ju.Ffield {
+			tmp["ffield"] = ffield
+		}
 		if e.TaskInfo.TestColl == "" {
 			if len(tmp) > 0 { //保存抽取结果
 				/*	if len(e.SiteFields) <= 0 {

+ 0 - 2
src/jy/extract/extractInit.go

@@ -145,8 +145,6 @@ type ExtractTask struct {
 	Luacodes            *sync.Map      //站点规则
 	SiteMerge           *sync.Map      //抽取合并
 
-	ResultTmp  map[string]interface{} //最终抽取结果
-	ResultFTmp map[string]interface{} //最终抽取结果(附件)
 }
 
 type SiteCity struct {

+ 1 - 2
src/jy/extract/extractudp.go

@@ -317,7 +317,6 @@ func ExtractByBidForecast(infoid string, ossid ...string) map[string]interface{}
 	}(&wg, j, jf)
 	wg.Wait()
 	exF.BidSave(false)
-	fmt.Println(exF.ResultTmp)
-	fmt.Println(exF.ResultFTmp)
+
 	return nil
 }

+ 2 - 2
src/jy/util/util.go

@@ -37,7 +37,7 @@ var GoodsGet *DFA     //商品
 var BrandGet *DFA     //品牌
 var IsBrandGoods bool //是否开启品牌抽取
 
-var SaveResult, FieldsFind, IsSaveTag, SaveBlock, QualityAudit bool
+var SaveResult, FieldsFind, IsSaveTag, SaveBlock, QualityAudit, Ffield bool
 
 func init() {
 	syncint = make(chan bool, 1)
@@ -54,7 +54,7 @@ func UtilInit() {
 	IsSaveTag, _ = Config["iscltlog"].(bool)
 	SaveBlock, _ = Config["saveblock"].(bool)
 	QualityAudit, _ = Config["qualityaudit"].(bool)
-
+	Ffield, _ = Config["ffield"].(bool)
 	PriceNumberReg = make(map[string]*regexp.Regexp)
 	for k, v := range PriceNumberConfig {
 		PriceNumberReg[k] = regexp.MustCompile(v)