From 0be2ab4ed0cea9786d4867a80c3f9d7f77094285 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 22 Sep 2023 21:18:55 +0800 Subject: [PATCH] update --- app/admin/svc/svc_data_statisstics.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/admin/svc/svc_data_statisstics.go b/app/admin/svc/svc_data_statisstics.go index f50dc6c..687c614 100644 --- a/app/admin/svc/svc_data_statisstics.go +++ b/app/admin/svc/svc_data_statisstics.go @@ -676,7 +676,15 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD titleList = []string{"年级", "班级", "早餐", "午餐", "晚餐"} xlsx.SetSheetRow("Sheet1", "A2", &titleList) xlsx.MergeCell("Sheet1", "A1", "E1") //合并单元格 - j := 3 //表头前两行用了,只能从第三行开始 + style, err := xlsx.NewStyle(`{"fill":{"type":"pattern","color":["FF0000"],"pattern":1}}`) + if err != nil { + logx.Error(err) + println("<<<>>>>Error:::", err.Error()) + panic(err) + } + xlsx.SetCellStyle("Sheet1", "A1", "E1", style) + + j := 3 //表头前两行用了,只能从第三行开始 for k2, v2 := range v1 { if k2 == "" { //若年级为空,则为教师餐