|
@@ -287,7 +287,7 @@ func (s *SecondPush) SecondPushTask() {
|
|
|
log.Println("查询数据为空")
|
|
|
} else {
|
|
|
log.Println(len(xlsxArr))
|
|
|
- GetXlsxs(xlsxArr, customer_name, email, s_pushid)
|
|
|
+ GetXlsxs(xlsxArr, customer_name, email, s_pushid, qu.ObjToString(c["s_appid"]))
|
|
|
go UpdateHistoryState(2, s_pushid, len(xlsxArr))
|
|
|
s.ServeJson(map[string]interface{}{
|
|
|
"status": true,
|
|
@@ -444,7 +444,7 @@ func (s *SecondPush) HistoryRuleEdit() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
|
|
|
+func GetXlsxs(mMap []map[string]interface{}, fn, email, id, appid string) {
|
|
|
if id != "" {
|
|
|
query := bson.M{
|
|
|
"_id": bson.ObjectIdHex(id),
|
|
@@ -570,6 +570,40 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
|
|
|
row.AddCell().SetValue(v["company_email"])
|
|
|
ids := SE.EncodeString(qu.ObjToString(v["id"]))
|
|
|
row.AddCell().SetValue(ids)
|
|
|
+ if history.NeedFilehrefAppidMap[appid] == true {
|
|
|
+ if v["filehref"] != nil {
|
|
|
+ if filelist, ok := v["filehref"].([]interface{}); ok {
|
|
|
+ index := 0
|
|
|
+ for _, url := range filelist {
|
|
|
+ if urlMap, ok := url.(map[string]interface{}); ok {
|
|
|
+ if urlMap["url"] != nil {
|
|
|
+ if history.FilterFilehrefAppidMap[appid] {
|
|
|
+ if strings.Contains(urlMap["url"].(string), "jy-datafile.oss-cn-beijing.aliyuncs.com") {
|
|
|
+ if index > 0 {
|
|
|
+ cell := row.AddCell()
|
|
|
+ //cell.SetStyle(style)
|
|
|
+ cell.SetValue(urlMap["url"])
|
|
|
+ } else {
|
|
|
+ row.AddCell().SetValue(urlMap["url"])
|
|
|
+ }
|
|
|
+ index++
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if index > 0 {
|
|
|
+ cell := row.AddCell()
|
|
|
+ //cell.SetStyle(style)
|
|
|
+ cell.SetValue(urlMap["url"])
|
|
|
+ } else {
|
|
|
+ row.AddCell().SetValue(urlMap["url"])
|
|
|
+ }
|
|
|
+ index++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//xf.Sheets = xf.Sheets[1:2]
|
|
@@ -728,7 +762,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
|
|
|
row.AddCell().SetValue(v["projectname"]) //项目名称
|
|
|
row.AddCell().SetValue(v["buyer"]) //采购单位
|
|
|
row.AddCell().SetValue(v["buyer_type"]) //采购单位类别---私有标签tagname
|
|
|
- if v["bidamount"] != nil { //中标金额
|
|
|
+ if v["bidamount"] != nil { //中标金额
|
|
|
row.AddCell().SetFloat(qu.Float64All(v["bidamount"]))
|
|
|
} else {
|
|
|
row.AddCell()
|