Prechádzať zdrojové kódy

Merge branch 'dev2.0' of http://192.168.3.207:10080/qmx/jy into dev2.0

liuxiaolu 8 rokov pred
rodič
commit
1fdd8a7339

+ 4 - 1
src/jfw/modules/push/src/qfw/push/dopush/dopush.go

@@ -297,7 +297,10 @@ func SendFmail(email, subject, html string, dataexport int, fmdatas []map[string
 	}
 	log.Println(email, dataexport)
 	b := mail.GSendMail("剑鱼-招标订阅", email, "", "", subject, html, fname, GmailMap)
-	if b && fname != "" {
+	if !b {
+		log.Println(email, "邮件发送失败")
+	}
+	if fname != "" {
 		os.Remove(fname)
 	}
 }

+ 13 - 12
src/jfw/modules/push/src/qfw/push/dopush/excel.go

@@ -31,26 +31,18 @@ func GetBidInfoXlsx(data []map[string]interface{}) string {
 	//信息
 	for _, v := range data {
 		row := sheet.AddRow()
-		pt := v["publishtime"]
-		publishtime := qu.FormatDateWithObj(&pt, qu.Date_Short_Layout)
-		cell := row.AddCell()
-		cell.SetValue(publishtime)
-
-		cell = row.AddCell()
-		cell.SetValue(v["subtype"])
-
-		cell = row.AddCell()
-		cell.SetValue(v["buyer"])
-		cell.SetStyle(style)
 
 		projectname := qu.ObjToString(v["projectname"])
 		if projectname == "" {
 			projectname = qu.ObjToString(v["title"])
 		}
-		cell = row.AddCell()
+		cell := row.AddCell()
 		cell.SetValue(projectname)
 		cell.SetStyle(style)
 
+		cell = row.AddCell()
+		cell.SetValue(v["subtype"])
+
 		budget := qu.Float64All(v["budget"]) / float64(10000)
 		cell = row.AddCell()
 		if budget != 0 {
@@ -59,6 +51,10 @@ func GetBidInfoXlsx(data []map[string]interface{}) string {
 			cell.SetValue("")
 		}
 
+		cell = row.AddCell()
+		cell.SetValue(v["buyer"])
+		cell.SetStyle(style)
+
 		bpt := v["bidopentime"]
 		bidopentime := qu.FormatDateWithObj(&bpt, "2006-01-02 15:04")
 		cell = row.AddCell()
@@ -75,6 +71,11 @@ func GetBidInfoXlsx(data []map[string]interface{}) string {
 		} else {
 			cell.SetValue("")
 		}
+
+		pt := v["publishtime"]
+		publishtime := qu.FormatDateWithObj(&pt, qu.Date_Short_Layout)
+		cell = row.AddCell()
+		cell.SetValue(publishtime)
 	}
 	fx.AppendSheet(sheet, "剑鱼")
 	fname := time.Now().Format("20060102150405")

BIN
src/jfw/modules/push/src/xlsx/temp.xlsx