|
@@ -299,7 +299,7 @@ func UpdateHistoryState(state int, s_pushid string, count int) {
|
|
|
"$set": map[string]interface{}{
|
|
|
"state": state,
|
|
|
"result_count": count,
|
|
|
- "finishtime":time.Now().Unix(),
|
|
|
+ "finishtime": time.Now().Unix(),
|
|
|
},
|
|
|
}, false, false)
|
|
|
return
|
|
@@ -467,7 +467,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
|
|
|
row.AddCell().SetValue(v["company_email"])
|
|
|
}
|
|
|
xf.Sheets = xf.Sheets[1:2]
|
|
|
- } else {
|
|
|
+ } else if dataType == 3 {
|
|
|
sh := xf.Sheets[2]
|
|
|
for i, v := range mMap {
|
|
|
row := sh.AddRow()
|
|
@@ -507,6 +507,56 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
|
|
|
row.AddCell().SetValue(v["id"])
|
|
|
}
|
|
|
xf.Sheets = xf.Sheets[2:3]
|
|
|
+ } else if dataType == 4 {
|
|
|
+ sh := xf.Sheets[3]
|
|
|
+ for i, v := range mMap {
|
|
|
+ row := sh.AddRow()
|
|
|
+ row.AddCell().SetInt(i + 1)
|
|
|
+ row.AddCell().SetValue(v["departname"])
|
|
|
+ row.AddCell().SetValue(v["rulename"])
|
|
|
+ row.AddCell().SetValue(v["matchkey"])
|
|
|
+ row.AddCell().SetValue(v["area"])
|
|
|
+ row.AddCell().SetValue(v["city"])
|
|
|
+ row.AddCell().SetValue(v["title"])
|
|
|
+ row.AddCell().SetValue(v["subtype"])
|
|
|
+ row.AddCell().SetValue(v["detail"])
|
|
|
+ if v["publishtime"] != nil {
|
|
|
+ row.AddCell().SetValue(time.Unix(qu.Int64All(v["publishtime"]), 0).Format("2006-01-02"))
|
|
|
+ } else {
|
|
|
+ row.AddCell()
|
|
|
+ }
|
|
|
+ row.AddCell().SetValue(v["href"])
|
|
|
+ row.AddCell().SetValue(v["s_jyhref"])
|
|
|
+ row.AddCell().SetValue(v["projectcode"])
|
|
|
+ row.AddCell().SetValue(v["projectname"])
|
|
|
+ row.AddCell().SetValue(v["projectscope"])
|
|
|
+ if v["budget"] != nil {
|
|
|
+ row.AddCell().SetFloat(qu.Float64All(v["budget"]) / 10000)
|
|
|
+ } else {
|
|
|
+ row.AddCell()
|
|
|
+ }
|
|
|
+ if v["bidamount"] != nil {
|
|
|
+ row.AddCell().SetFloat(qu.Float64All(v["bidamount"]) / 10000)
|
|
|
+ } else {
|
|
|
+ row.AddCell()
|
|
|
+ }
|
|
|
+ if v["bidopentime"] != nil {
|
|
|
+ row.AddCell().SetValue(time.Unix(qu.Int64All(v["bidopentime"]), 0).Format("2006-01-02"))
|
|
|
+ } else {
|
|
|
+ row.AddCell()
|
|
|
+ }
|
|
|
+ row.AddCell().SetValue(v["buyer"])
|
|
|
+ row.AddCell().SetValue(v["buyerperson"])
|
|
|
+ row.AddCell().SetValue(v["buyertel"])
|
|
|
+ row.AddCell().SetValue(v["agency"])
|
|
|
+ row.AddCell().SetValue(v["winner"])
|
|
|
+ row.AddCell().SetValue(v["winnerperson"])
|
|
|
+ row.AddCell().SetValue(v["winnertel"])
|
|
|
+ row.AddCell().SetValue(v["legal_person"])
|
|
|
+ row.AddCell().SetValue(v["company_phone"])
|
|
|
+ row.AddCell().SetValue(v["company_email"])
|
|
|
+ }
|
|
|
+ xf.Sheets = xf.Sheets[3:4]
|
|
|
}
|
|
|
//生文件
|
|
|
t := strconv.FormatInt(time.Now().Unix(), 10)
|
|
@@ -585,7 +635,7 @@ func (s *SecondPush) SecondPushClone(hid string) {
|
|
|
(*data)["result_count"] = nil
|
|
|
(*data)["createtime"] = time.Now().Unix()
|
|
|
(*data)["updatetime"] = time.Now().Unix()
|
|
|
- delete((*data),"finishtime")
|
|
|
+ delete((*data), "finishtime")
|
|
|
Mgo.Save("second_push", *data)
|
|
|
}
|
|
|
}
|