zhangjinkun 5 years ago
parent
commit
9fdf0a29d2

+ 4 - 4
src/config.json

@@ -10,8 +10,8 @@
     "elasticPoolSize": 30,
     "mergetable": "projectset",
     "mergetablealias": "projectset_v1",
-    "saveresult": false,
-    "fieldsfind":false,
+    "saveresult": true,
+    "fieldsfind": false,
     "qualityaudit": false,
     "saveblock": false,
     "filelength": 100000,
@@ -59,9 +59,9 @@
             }
         ]
     },
-	"isSaveTag":false,
+    "isSaveTag": false,
     "tomail": "zhangjinkun@topnet.net.cn,chenmingzhu@topnet.net.cn,zhaolongyue@topnet.net.cn",
     "api": "http://10.171.112.160:19281/_send/_mail",
-    "deleteInstanceTimeHour":1,
+    "deleteInstanceTimeHour": 1,
     "jsondata_extweight": 1
 } 

+ 4 - 0
src/jy/extract/extract.go

@@ -289,6 +289,10 @@ func (e *ExtractTask) PreInfo(doc map[string]interface{}) (j, jf *ju.Job, isSite
 	if subtype == "" {
 		subtype = "all"
 	}
+	if toptype == "其它" || subtype == "其它" || subtype == "其他" || subtype == "结果变更" {
+		toptype = "all"
+		subtype = "all"
+	}
 	toMap := qu.ObjToMap(doc["jsondata"])
 	//log.Debug("toMap", toMap)
 	if (*toMap) != nil {

+ 7 - 5
versioncomparison/config.json

@@ -1,10 +1,10 @@
 {
-    "premgo": "192.168.3.207:27082",
+    "premgo": "192.168.3.207:27092",
     "predb": "extract_kf",
-    "prec": "result_v3",
-    "newmgo": "192.168.3.207:27082",
+    "prec": "datainfo_dev3.2",
+    "newmgo": "192.168.3.207:27092",
     "newdb": "extract_kf",
-    "newc": "result_data",
+    "newc": "datainfo_dev3.4",
     "fields": [
         "projectname",
         "projectcode",
@@ -18,6 +18,8 @@
         "buyeraddr",
         "agencyperson",
         "agencytel",
-        "agencyaddr"
+        "agencyaddr",
+        "winnertel",
+        "winnerperson"
     ]
 }

+ 6 - 7
versioncomparison/main.go

@@ -8,7 +8,6 @@ import (
 	"fmt"
 	"jy/mongodbutil"
 	"log"
-	"qfw/common/src/qfw/util"
 	qu "qfw/util"
 	"strings"
 
@@ -41,8 +40,8 @@ type Data struct {
 }
 
 func init() {
-	flag.StringVar(&Sid, "sid", "5cc87219a5cb26b9b719a6be", "开始id")
-	flag.StringVar(&Eid, "eid", "5d0c876aa5cb26b9b7078df8", "结束id")
+	flag.StringVar(&Sid, "sid", "5e17deb150b5ea296ec939d3", "开始id")
+	flag.StringVar(&Eid, "eid", "5e17e1e685a9271abf08616d", "结束id")
 	flag.Parse()
 	qu.ReadConfig(&SysConfig)
 	Premgo = mongodbutil.MgoFactory(1, 3, 120, qu.ObjToString(SysConfig["premgo"]), qu.ObjToString(SysConfig["predb"]))
@@ -83,12 +82,12 @@ func createXlsx() {
 				(*row).Cells[2].SetStyle(style)
 				(*row).Cells[3].SetStyle(style)
 				(*row).Cells[4].SetStyle(style)
-				if Compares[field] == nil{
+				if Compares[field] == nil {
 					(*row).Cells[1].SetInt(0)
 					(*row).Cells[2].SetInt(0)
 					(*row).Cells[3].SetInt(0)
 					(*row).Cells[4].SetInt(0)
-				}else {
+				} else {
 					(*row).Cells[1].SetInt(Compares[field].PreExtNum)
 					(*row).Cells[2].SetInt(Compares[field].NewExtNum)
 					(*row).Cells[3].SetInt(Compares[field].EqNum)
@@ -135,7 +134,7 @@ func getVersionData() {
 			if rd == nil {
 				rd = map[string]*Data{}
 			}
-			if v[key] == nil && strings.TrimSpace(util.ObjToString(v[key])) == ""{
+			if v[key] == nil && strings.TrimSpace(qu.ObjToString(v[key])) == "" {
 				continue
 			}
 			rd[qu.BsonIdToSId(v["_id"])] = &Data{
@@ -154,7 +153,7 @@ func getVersionData() {
 			if rd == nil {
 				rd = map[string]*Data{}
 			}
-			if v[field] == nil && strings.TrimSpace(util.ObjToString(v[field])) == ""{
+			if v[field] == nil && strings.TrimSpace(qu.ObjToString(v[field])) == "" {
 				continue
 			}
 			_id := qu.BsonIdToSId(v["_id"])

BIN
versioncomparison/template.xlsx