xuzhiheng 5 anos atrás
pai
commit
c71446cc33
1 arquivos alterados com 11 adições e 7 exclusões
  1. 11 7
      src/service/second_push.go

+ 11 - 7
src/service/second_push.go

@@ -10,7 +10,6 @@ import (
 	"qfw/util/mail"
 	"strconv"
 	"strings"
-	"sync"
 	"time"
 	. "util"
 
@@ -21,8 +20,10 @@ import (
 	"gopkg.in/mgo.v2/bson"
 )
 
-var projectIdMap = sync.Map{}
-var xlsxArr []map[string]interface{}
+var (
+	xlsxArr []map[string]interface{}
+	SE      = qu.SimpleEncrypt{Key: "topJYBX2019"}
+)
 
 type SecondPush struct {
 	*xweb.Action
@@ -418,7 +419,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					}
 					row.AddCell().SetValue(v["projectname"])
 					row.AddCell().SetValue(v["detail"])
-					row.AddCell().SetValue(v["s_jyhref"])
+					row.AddCell().SetValue(v["jybxhref"])
 				}
 				xf.Sheets = xf.Sheets[0:1]
 			} else if dataType == 2 {
@@ -438,7 +439,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 						row.AddCell()
 					}
 					row.AddCell().SetValue(v["href"])
-					row.AddCell().SetValue(v["s_jyhref"])
+					row.AddCell().SetValue(v["jybxhref"])
 					row.AddCell().SetValue(v["projectcode"])
 					row.AddCell().SetValue(v["projectname"])
 					row.AddCell().SetValue(v["projectscope"])
@@ -506,7 +507,8 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					row.AddCell().SetValue(v["stock_name"])
 					row.AddCell().SetValue(v["buyer_credit_no"])
 					row.AddCell().SetValue(v["winner_credit_no"])
-					row.AddCell().SetValue(v["id"])
+					ids := SE.EncodeString(qu.ObjToString(v["id"]))
+					row.AddCell().SetValue(ids)
 				}
 				xf.Sheets = xf.Sheets[2:3]
 			} else if dataType == 4 {
@@ -528,7 +530,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 						row.AddCell()
 					}
 					row.AddCell().SetValue(v["href"])
-					row.AddCell().SetValue(v["s_jyhref"])
+					row.AddCell().SetValue(v["jybxhref"])
 					row.AddCell().SetValue(v["projectcode"])
 					row.AddCell().SetValue(v["projectname"])
 					row.AddCell().SetValue(v["projectscope"])
@@ -557,6 +559,8 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					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[3:4]
 			}