Parcourir la source

update

add_mode
DengBiao il y a 1 an
Parent
révision
1bd5f813f0
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. +4
    -0
      app/admin/svc/svc_data_statisstics.go

+ 4
- 0
app/admin/svc/svc_data_statisstics.go Voir le fichier

@@ -828,6 +828,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
Join("LEFT", "class_with_user", "class_with_user.user_identity_id = user_identity.id").
Join("LEFT", "class", "class_with_user.class_id = class.id").
Join("LEFT", "grade", "class.grade_id = grade.id").
Asc("class.id").
FindAndCount(&m)
if err != nil {
logx.Error(err)
@@ -928,6 +929,9 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
var sumBreakfast, sumLunch, sumDinner = int64(0), int64(0), int64(0)
j := 3 //表头前两行用了,只能从第三行开始
for k4, v4 := range v3 {
if v4["breakfast"] == 0 && v4["lunch"] == 0 && v4["dinner"] == 0 {
continue
}
xlsx.SetSheetRow(k3, "A"+strconv.Itoa(j), &[]interface{}{
k4, v4["breakfast"], v4["lunch"], v4["dinner"]})
sumBreakfast += v4["breakfast"]


Chargement…
Annuler
Enregistrer