瀏覽代碼

过滤拟建的信息

zhengkun 2 年之前
父節點
當前提交
27d768f13e
共有 4 個文件被更改,包括 10 次插入5 次删除
  1. 2 2
      src/datamap.go
  2. 1 1
      src/fullDataRepeat.go
  3. 1 1
      src/historyRepeat.go
  4. 6 1
      src/increaseRepeat.go

+ 2 - 2
src/datamap.go

@@ -75,7 +75,7 @@ func TimedTaskDatamap(days int, lasttime int64, numIndex int) *datamap {
 		//	log.Println("当前 n:", n, "数量:", continuSum, tmp["_id"], tmp["publishtime"])
 		//}
 		if qutil.IntAll(tmp["repeat"]) == 1 || qutil.IntAll(tmp["repeat"]) == -1 ||
-			qutil.IntAll(tmp["dataging"]) == 1 {
+			qutil.IntAll(tmp["dataging"]) == 1 || qutil.ObjToString(tmp["subtype"]) == "拟建" {
 
 		} else {
 			if fmt.Sprint(reflect.TypeOf(tmp["publishtime"])) == "string" {
@@ -143,7 +143,7 @@ func NewDatamap(days int, lastid string) *datamap {
 	nowTime := time.Now().Unix() //当前时间的时间戳
 	n, continuSum := 0, 0
 	for tmp := make(map[string]interface{}); it.Next(&tmp); n++ {
-		if qutil.IntAll(tmp["repeat"]) == 1 || qutil.IntAll(tmp["repeat"]) == -1 {
+		if qutil.IntAll(tmp["repeat"]) == 1 || qutil.IntAll(tmp["repeat"]) == -1 || qutil.ObjToString(tmp["subtype"]) == "拟建" {
 
 		} else {
 			if fmt.Sprint(reflect.TypeOf(tmp["publishtime"])) == "string" {

+ 1 - 1
src/fullDataRepeat.go

@@ -59,7 +59,7 @@ func dealWithfullData(query map[string]interface{}, time_str string) {
 	total, isok, repeatN := 0, 0, 0
 	dataAllDict := make(map[string][]map[string]interface{}, 0)
 	for tmp := make(map[string]interface{}); it.Next(&tmp); total++ {
-		if qu.IntAll(tmp["repeat"]) == 1 || qu.IntAll(tmp["repeat"]) == -1 {
+		if qu.IntAll(tmp["repeat"]) == 1 || qu.IntAll(tmp["repeat"]) == -1 || qu.ObjToString(tmp["subtype"]) == "拟建" {
 			tmp = make(map[string]interface{})
 			continue
 		}

+ 1 - 1
src/historyRepeat.go

@@ -83,7 +83,7 @@ func historyRepeat() {
 			//取-符合-发布时间X年内的数据
 			if util.IntAll(tmp["dataging"]) == 1 {
 				pubtime := util.Int64All(tmp["publishtime"])
-				if pubtime > 0 && pubtime >= between_time {
+				if pubtime > 0 && pubtime >= between_time && qu.ObjToString(tmp["subtype"]) != "拟建" {
 					oknum++
 					if deterTime == 0 {
 						log.Println("找到第一条符合条件的数据")

+ 6 - 1
src/increaseRepeat.go

@@ -41,6 +41,11 @@ func increaseRepeat(mapInfo map[string]interface{}) {
 			tmp = make(map[string]interface{})
 			continue
 		}
+		if qu.ObjToString(tmp["subtype"]) == "拟建" {
+			tmp = make(map[string]interface{})
+			continue
+		}
+
 		//数据分组-按照类别分组
 		isok++
 		subtype := qu.ObjToString(tmp["subtype"])
@@ -159,7 +164,7 @@ func increaseRepeat(mapInfo map[string]interface{}) {
 	wg.Wait()
 	fmt.Println("")
 	log.Println("当前~判重~结束~", total, "重复~", repeatN)
-	//更新Ocr的标记
+	//更新流程记录表
 	//updateOcrFileData(mapInfo["lteid"].(string))
 	updateProcessUdpIdsInfo(qu.ObjToString(mapInfo["gtid"]), qu.ObjToString(mapInfo["lteid"]))