xuzhiheng 5 éve
szülő
commit
48dbfc5874
3 módosított fájl, 14 hozzáadás és 15 törlés
  1. 8 9
      src/history/util_history.go
  2. 6 6
      src/service/second_push.go
  3. BIN
      src/web/res/fields.xlsx

+ 8 - 9
src/history/util_history.go

@@ -856,7 +856,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile bool)
 					row.AddCell().SetValue(v["buyer"])
 					row.AddCell().SetValue(v["winner"])
 					if v["bidamount"] != nil {
-						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]) / 10000)
+						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]))
 					} else {
 						row.AddCell()
 					}
@@ -875,9 +875,9 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile bool)
 					cell.SetValue("附件")
 					cell.SetStyle(style)
 				}
-				for i, v := range mMap {
+				for _, v := range mMap {
 					row := sh.AddRow()
-					row.AddCell().SetInt(i + 1)
+					// row.AddCell().SetInt(i + 1)
 					row.AddCell().SetValue(v["matchkey"])
 					row.AddCell().SetValue(v["area"])
 					row.AddCell().SetValue(v["city"])
@@ -895,12 +895,12 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile bool)
 					row.AddCell().SetValue(v["projectname"])
 					row.AddCell().SetValue(v["projectscope"])
 					if v["budget"] != nil {
-						row.AddCell().SetFloat(qu.Float64All(v["budget"]) / 10000)
+						row.AddCell().SetFloat(qu.Float64All(v["budget"]))
 					} else {
 						row.AddCell()
 					}
 					if v["bidamount"] != nil {
-						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]) / 10000)
+						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]))
 					} else {
 						row.AddCell()
 					}
@@ -976,9 +976,8 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile bool)
 				xf.Sheets = xf.Sheets[2:3]
 			} else if dataType == 4 {
 				sh := xf.Sheets[3]
-				for i, v := range mMap {
+				for _, 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"])
@@ -998,12 +997,12 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile bool)
 					row.AddCell().SetValue(v["projectname"])
 					row.AddCell().SetValue(v["projectscope"])
 					if v["budget"] != nil {
-						row.AddCell().SetFloat(qu.Float64All(v["budget"]) / 10000)
+						row.AddCell().SetFloat(qu.Float64All(v["budget"]))
 					} else {
 						row.AddCell()
 					}
 					if v["bidamount"] != nil {
-						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]) / 10000)
+						row.AddCell().SetFloat(qu.Float64All(v["bidamount"]))
 					} else {
 						row.AddCell()
 					}

+ 6 - 6
src/service/second_push.go

@@ -424,9 +424,9 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 				xf.Sheets = xf.Sheets[0:1]
 			} else if dataType == 2 {
 				sh := xf.Sheets[1]
-				for i, v := range mMap {
+				for _, v := range mMap {
 					row := sh.AddRow()
-					row.AddCell().SetInt(i + 1)
+					// row.AddCell().SetInt(i + 1)
 					row.AddCell().SetValue(v["matchkey"])
 					row.AddCell().SetValue(v["area"])
 					row.AddCell().SetValue(v["city"])
@@ -472,9 +472,9 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 				xf.Sheets = xf.Sheets[1:2]
 			} else if dataType == 3 {
 				sh := xf.Sheets[2]
-				for i, v := range mMap {
+				for _, v := range mMap {
 					row := sh.AddRow()
-					row.AddCell().SetInt(i + 1)
+					// row.AddCell().SetInt(i + 1)
 					row.AddCell().SetValue(v["matchkey"])
 					row.AddCell().SetValue(v["area"])
 					row.AddCell().SetValue(v["city"])
@@ -513,9 +513,9 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 				xf.Sheets = xf.Sheets[2:3]
 			} else if dataType == 4 {
 				sh := xf.Sheets[3]
-				for i, v := range mMap {
+				for _, v := range mMap {
 					row := sh.AddRow()
-					row.AddCell().SetInt(i + 1)
+					// row.AddCell().SetInt(i + 1)
 					row.AddCell().SetValue(v["departname"])
 					row.AddCell().SetValue(v["rulename"])
 					row.AddCell().SetValue(v["matchkey"])

BIN
src/web/res/fields.xlsx