diff --git a/wms/common/excelkit.go b/wms/common/excelkit.go index 8eea2b4..de6864e 100644 --- a/wms/common/excelkit.go +++ b/wms/common/excelkit.go @@ -13,7 +13,7 @@ import ( func GenExcelFile(m1 map[string]*service.HighOptLossUnder, m2 map[string]*service.HighOptLossHistory) { // Open the Excel file - f, err := excelize.OpenFile("/Users/leo/Documents/光衰通报/光衰/2025/光衰通报(4月16日).xlsx") + f, err := excelize.OpenFile("/Users/leo/Documents/光衰通报/光衰/2025/光衰通报(5月30日).xlsx") if err != nil { fmt.Println(err) return @@ -281,10 +281,10 @@ func GenExcelFile(m1 map[string]*service.HighOptLossUnder, m2 map[string]*servic f.SetCellValue("汇总", sumCell, cast.ToInt(value)) } } - //TODO 2行 + //TODO 3行 done, _ := f.GetCellValue("汇总", "K24") total, _ := f.GetCellValue("汇总", "L24") - f.SetCellValue("汇总", "M23", mathkit.FloatRound(cast.ToFloat64(done)/cast.ToFloat64(total), 4)) + f.SetCellValue("汇总", "M24", mathkit.FloatRound(cast.ToFloat64(done)/cast.ToFloat64(total), 4)) //设置表头 content := fmt.Sprintf("西湖智家光衰通报:%s", time.Now().Format("1月2日"))