DengBiao преди 8 месеца
родител
ревизия
fd55152f5a
променени са 1 файла, в които са добавени 16 реда и са изтрити 11 реда
  1. +16
    -11
      app/admin/svc/svc_data_statisstics.go

+ 16
- 11
app/admin/svc/svc_data_statisstics.go Целия файл

@@ -427,19 +427,24 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta
xlsx.CopySheet(1, sheetIndex)
xlsx.SetSheetRow(k, "A1", &[]interface{}{"商 家 分 餐 数 据 统 计 表 " + "(" + req.StartDate + "至" + req.EndDate + ")"})
j := 4 //表头前三行被占用了,只能从第四行开始
for kk, vv := range v {
if kk == "" {
kk = k
for _, device := range deviceList {
for kk, vv := range v {
if kk == "" {
kk = k
}
if device.Name == kk {
xlsx.SetSheetRow(k, "A"+strconv.Itoa(j), &[]interface{}{kk,
vv["早餐"]["num"], vv["早餐"]["amount"],
vv["午餐"]["num"], vv["午餐"]["amount"],
vv["晚餐"]["num"], vv["晚餐"]["amount"],
vv["夜宵"]["num"], vv["夜宵"]["amount"],
vv["合计"]["num"], vv["合计"]["amount"],
})
j++
}
}
xlsx.SetSheetRow(k, "A"+strconv.Itoa(j), &[]interface{}{kk,
vv["早餐"]["num"], vv["早餐"]["amount"],
vv["午餐"]["num"], vv["午餐"]["amount"],
vv["晚餐"]["num"], vv["晚餐"]["amount"],
vv["夜宵"]["num"], vv["夜宵"]["amount"],
vv["合计"]["num"], vv["合计"]["amount"],
})
j++
}

sheetIndex++
}
xlsx.DeleteSheet("template") //删除模板表


Зареждане…
Отказ
Запис