xuzhiheng 4 lat temu
rodzic
commit
ddcb363495
2 zmienionych plików z 12 dodań i 3 usunięć
  1. 2 0
      src/history/util_history.go
  2. 10 3
      src/service/second_push.go

+ 2 - 0
src/history/util_history.go

@@ -866,6 +866,8 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile bool)
 					row.AddCell().SetValue(v["projectname"])
 					row.AddCell().SetValue(v["detail"])
 					row.AddCell().SetValue(v["jybxhref"])
+					ids := SE.EncodeString(qu.ObjToString(v["id"]))
+					row.AddCell().SetValue(ids)
 					if isfile {
 						row.AddCell().SetValue(v["filetext"])
 					}

+ 10 - 3
src/service/second_push.go

@@ -411,7 +411,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 						row.AddCell()
 					}
 					row.AddCell().SetValue(v["buyer"])
-					row.AddCell().SetValue(v["winner"])
+					row.AddCell().SetValue(v["s_winner"])
 					if v["bidamount"] != nil {
 						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]))
 					} else {
@@ -420,6 +420,8 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					row.AddCell().SetValue(v["projectname"])
 					row.AddCell().SetValue(v["detail"])
 					row.AddCell().SetValue(v["jybxhref"])
+					ids := SE.EncodeString(qu.ObjToString(v["id"]))
+					row.AddCell().SetValue(ids)
 				}
 				xf.Sheets = xf.Sheets[0:1]
 			} else if dataType == 2 {
@@ -462,12 +464,15 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					row.AddCell().SetValue(v["buyerperson"])
 					row.AddCell().SetValue(v["buyertel"])
 					row.AddCell().SetValue(v["agency"])
-					row.AddCell().SetValue(v["winner"])
+					row.AddCell().SetValue(v["s_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"])
+					ids := SE.EncodeString(qu.ObjToString(v["id"]))
+					row.AddCell().SetValue(ids)
+
 				}
 				xf.Sheets = xf.Sheets[1:2]
 			} else if dataType == 3 {
@@ -554,7 +559,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					row.AddCell().SetValue(v["buyerperson"])
 					row.AddCell().SetValue(v["buyertel"])
 					row.AddCell().SetValue(v["agency"])
-					row.AddCell().SetValue(v["winner"])
+					row.AddCell().SetValue(v["s_winner"])
 					row.AddCell().SetValue(v["winnerperson"])
 					row.AddCell().SetValue(v["winnertel"])
 					row.AddCell().SetValue(v["legal_person"])
@@ -638,11 +643,13 @@ func (s *SecondPush) SecondPushList() {
 
 func (s *SecondPush) SecondPushClone(hid string) {
 	data, ok := Mgo.FindOne("second_push", map[string]interface{}{"_id": mongoutil.StringTOBsonId(hid)})
+	user := s.GetSession("user").(map[string]interface{})
 	if ok && data != nil && *data != nil {
 		(*data)["state"] = 0
 		(*data)["result_count"] = nil
 		(*data)["createtime"] = time.Now().Unix()
 		(*data)["updatetime"] = time.Now().Unix()
+		(*data)["create_user"] = user["name"]
 		delete((*data), "finishtime")
 		Mgo.Save("second_push", *data)
 	}