|
@@ -656,7 +656,7 @@ func GetDataExportSelectResult(bidding mg.MongodbSim, biddingName string, scd *S
|
|
|
"_id": 1, "title": 1, "detail": 1, "area": 1, "city": 1, "publishtime": 1, "projectname": 1, "buyer": 1, "s_winner": 1, "bidamount": 1, "subtype": 1, "toptype": 1, "filetext": 1, "purchasing": 1,
|
|
|
}
|
|
|
if dataType == "2" {
|
|
|
- for _, key := range []string{"href", "projectcode", "buyerperson", "buyertel", "budget", "bidopentime", "agency", "projectscope", "winnerperson", "winnertel", "bidendtime"} {
|
|
|
+ for _, key := range []string{"href", "projectcode", "buyerperson", "buyertel", "budget", "bidopentime", "agency", "projectscope", "winnerperson", "winnertel", "bidendtime", "district", "signendtime", "buyeraddr"} {
|
|
|
selectMap[key] = 1
|
|
|
}
|
|
|
}
|
|
@@ -889,11 +889,6 @@ func FormatExportData(entmg mg.MongodbSim, data *[]map[string]interface{}, webdo
|
|
|
for _, v := range *data {
|
|
|
//有中标企业 且 高级字段查询
|
|
|
if dataType == "2" {
|
|
|
- if qutil.Int64All(v["bidendtime"]) > 0 {
|
|
|
- v["bidendtime"] = strings.Split(time.Unix(qutil.Int64All(v["bidendtime"]), 0).Format("2006-01-02 15:04:05"), " ")[0]
|
|
|
- } else {
|
|
|
- v["bidendtime"] = ""
|
|
|
- }
|
|
|
//查询企业公示 法人 公司电话 公司邮箱地址
|
|
|
s_winner, ok := v["s_winner"].(string) //改为entidlistxx?
|
|
|
if ok && s_winner != "" {
|
|
@@ -988,6 +983,14 @@ func FormatExportData(entmg mg.MongodbSim, data *[]map[string]interface{}, webdo
|
|
|
date := v["bidopentime"]
|
|
|
v["bidopentime"] = FormatDateWithObj(&date, Date_Short_Layout)
|
|
|
}
|
|
|
+ if v["signendtime"] != nil {
|
|
|
+ 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 v["_id"] != nil {
|
|
|
encodeId := CommonEncodeArticle("content", v["_id"].(string))
|
|
|
v["url"] = webdomain + "/article/content/" + encodeId + ".html"
|
|
@@ -1050,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"`
|
|
|
+ dataexport_field += `,"href","projectcode","buyerperson","buyertel","budget","bidopentime","agency","projectscope","winnerperson","winnertel","bidendtime", "district", "signendtime", "buyeraddr"`
|
|
|
}
|
|
|
sql = sql[:len(sql)-1] + `,"_source":[` + dataexport_field + "]}"
|
|
|
}
|