From 52eaea8db5d42bb0f1ab7eee50adb68740639ac7 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 16 Feb 2024 10:37:57 +0800 Subject: [PATCH] update --- app/admin/svc/svc_data_statisstics.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/admin/svc/svc_data_statisstics.go b/app/admin/svc/svc_data_statisstics.go index 0363d49..bcc8cf0 100644 --- a/app/admin/svc/svc_data_statisstics.go +++ b/app/admin/svc/svc_data_statisstics.go @@ -761,9 +761,9 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD var fileName, downloadPath string var now = time.Now() for _, kind := range req.Kinds { - xlsx := excelize.NewFile() switch kind { case 1: + xlsx := excelize.NewFile() //订单列表 fileName = "订单列表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" downloadPath = "/export/central_kitchen_for_school/" + fileName @@ -891,6 +891,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD xlsx.SaveAs("./static" + downloadPath) break case 2: + xlsx := excelize.NewFile() //退款申请表 fileName = "退款申请表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" downloadPath = "/export/central_kitchen_for_school/" + fileName @@ -985,6 +986,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD xlsx.SaveAs("./static" + downloadPath) break case 3: + xlsx := excelize.NewFile() //学校预定统计表 fileName = "学校预定统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" downloadPath = "/export/central_kitchen_for_school/" + fileName @@ -1197,6 +1199,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD } break case 4: + xlsx := excelize.NewFile() //班级明细表 fileName = "班级明细表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" downloadPath = "/export/central_kitchen_for_school/" + fileName @@ -1279,7 +1282,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD if count == 0 { continue } - time.Sleep(20 * time.Millisecond) // 20毫秒 + time.Sleep(2 * time.Millisecond) // 2毫秒 if v.CentralKitchenForSchoolPackageOrdForReserve.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast { list[v.Enterprise.Name][v.Grade.Name][v.Class.Name][v.UserIdentity.Name]["breakfast"] += count @@ -1415,6 +1418,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD } break case 5: + xlsx := excelize.NewFile() //退款明细表 fileName = "退款明细表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" downloadPath = "/export/central_kitchen_for_school/" + fileName @@ -1579,6 +1583,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD } break case 6: + xlsx := excelize.NewFile() //收款统计表 fileName = "收款统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" downloadPath = "/export/central_kitchen_for_school/" + fileName @@ -1663,6 +1668,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD xlsx.SaveAs("./static" + downloadPath) break case 7: + xlsx := excelize.NewFile() //班级收款明细表 fileName = "班级收款明细表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" downloadPath = "/export/central_kitchen_for_school/" + fileName @@ -1848,6 +1854,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD } break case 8: + xlsx := excelize.NewFile() //学校预定数量统计表 fileName = "学校预定数量统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" downloadPath = "/export/central_kitchen_for_school/" + fileName