duxin 2 жил өмнө
parent
commit
a2f4d9ce62

+ 2 - 2
common/src/qfw/util/dataexport/dataexport.go

@@ -983,7 +983,7 @@ func FormatExportData(entmg mg.MongodbSim, data *[]map[string]interface{}, webdo
 			date := v["bidopentime"]
 			v["bidopentime"] = FormatDateWithObj(&date, Date_Short_Layout)
 		}
-		if v["signendtime"] != nil {
+		if qutil.IntAll(v["signendtime"]) != 0 {
 			date := v["signendtime"]
 			v["signendtime"] = FormatDateWithObj(&date, Date_Short_Layout)
 		}
@@ -1053,7 +1053,7 @@ func doSearch(sql string, start, count int, dataType string) *[]map[string]inter
 		if dataType != "" {
 			dataexport_field := `"_id","title","detail","area","city","publishtime","projectname","buyer","s_winner","bidamount","subtype","toptype","filetext","purchasing"`
 			if dataType == "2" {
-				dataexport_field += `,"href","projectcode","buyerperson","buyertel","budget","bidopentime","agency","projectscope","winnerperson","winnertel","bidendtime", "district", "signendtime", "buyeraddr"`
+				dataexport_field += `,"href","projectcode","buyerperson","buyertel","budget","bidopentime","agency","projectscope","winnerperson","winnertel","bidendtime","district","signendtime","buyeraddr"`
 			}
 			sql = sql[:len(sql)-1] + `,"_source":[` + dataexport_field + "]}"
 		}

+ 5 - 5
common/src/qfw/util/dataexport/entdataexport.go

@@ -54,13 +54,13 @@ func GetEntDataExportCount(sim, bid mg.MongodbSim, bidMgoDBName, elasticAddress,
 		insertFlag = "true"
 	}
 	for _, v := range *res {
-		if v["signendtime"] != nil {
+		if util.IntAll(v["signendtime"]) != 0 {
 			date := v["signendtime"]
 			v["signendtime"] = FormatDateWithObj(&date, Date_Short_Layout)
 		}
-		if v["bidendtime"] != nil {
-			date := v["bidendtime"]
-			v["bidendtime"] = FormatDateWithObj(&date, Date_Short_Layout)
+		if util.IntAll(v["signendtime"]) != 0 {
+			date := v["signendtime"]
+			v["signendtime"] = FormatDateWithObj(&date, Date_Short_Layout)
 		}
 		id := util.ObjToString(v["_id"])
 		if m[id] {
@@ -224,7 +224,7 @@ func FormatExportDatas(Mgo_Ent mongodb.MongodbSim, data *[]map[string]interface{
 				date := v["bidopentime"]
 				v["bidopentime"] = FormatDateWithObj(&date, Date_Short_Layout)
 			}
-			if v["signendtime"] != nil {
+			if util.IntAll(v["signendtime"]) != 0 {
 				date := v["signendtime"]
 				v["signendtime"] = FormatDateWithObj(&date, Date_Short_Layout)
 			}