|
@@ -761,9 +761,9 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
var fileName, downloadPath string |
|
|
var fileName, downloadPath string |
|
|
var now = time.Now() |
|
|
var now = time.Now() |
|
|
for _, kind := range req.Kinds { |
|
|
for _, kind := range req.Kinds { |
|
|
xlsx := excelize.NewFile() |
|
|
|
|
|
switch kind { |
|
|
switch kind { |
|
|
case 1: |
|
|
case 1: |
|
|
|
|
|
xlsx := excelize.NewFile() |
|
|
//订单列表 |
|
|
//订单列表 |
|
|
fileName = "订单列表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" |
|
|
fileName = "订单列表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
@@ -891,6 +891,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
xlsx.SaveAs("./static" + downloadPath) |
|
|
xlsx.SaveAs("./static" + downloadPath) |
|
|
break |
|
|
break |
|
|
case 2: |
|
|
case 2: |
|
|
|
|
|
xlsx := excelize.NewFile() |
|
|
//退款申请表 |
|
|
//退款申请表 |
|
|
fileName = "退款申请表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" |
|
|
fileName = "退款申请表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
@@ -985,6 +986,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
xlsx.SaveAs("./static" + downloadPath) |
|
|
xlsx.SaveAs("./static" + downloadPath) |
|
|
break |
|
|
break |
|
|
case 3: |
|
|
case 3: |
|
|
|
|
|
xlsx := excelize.NewFile() |
|
|
//学校预定统计表 |
|
|
//学校预定统计表 |
|
|
fileName = "学校预定统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" |
|
|
fileName = "学校预定统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
@@ -1197,6 +1199,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
} |
|
|
} |
|
|
break |
|
|
break |
|
|
case 4: |
|
|
case 4: |
|
|
|
|
|
xlsx := excelize.NewFile() |
|
|
//班级明细表 |
|
|
//班级明细表 |
|
|
fileName = "班级明细表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" |
|
|
fileName = "班级明细表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
@@ -1279,7 +1282,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
if count == 0 { |
|
|
if count == 0 { |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|
time.Sleep(20 * time.Millisecond) // 20毫秒 |
|
|
|
|
|
|
|
|
time.Sleep(2 * time.Millisecond) // 2毫秒 |
|
|
|
|
|
|
|
|
if v.CentralKitchenForSchoolPackageOrdForReserve.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast { |
|
|
if v.CentralKitchenForSchoolPackageOrdForReserve.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast { |
|
|
list[v.Enterprise.Name][v.Grade.Name][v.Class.Name][v.UserIdentity.Name]["breakfast"] += count |
|
|
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 |
|
|
break |
|
|
case 5: |
|
|
case 5: |
|
|
|
|
|
xlsx := excelize.NewFile() |
|
|
//退款明细表 |
|
|
//退款明细表 |
|
|
fileName = "退款明细表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" |
|
|
fileName = "退款明细表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
@@ -1579,6 +1583,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
} |
|
|
} |
|
|
break |
|
|
break |
|
|
case 6: |
|
|
case 6: |
|
|
|
|
|
xlsx := excelize.NewFile() |
|
|
//收款统计表 |
|
|
//收款统计表 |
|
|
fileName = "收款统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" |
|
|
fileName = "收款统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
@@ -1663,6 +1668,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
xlsx.SaveAs("./static" + downloadPath) |
|
|
xlsx.SaveAs("./static" + downloadPath) |
|
|
break |
|
|
break |
|
|
case 7: |
|
|
case 7: |
|
|
|
|
|
xlsx := excelize.NewFile() |
|
|
//班级收款明细表 |
|
|
//班级收款明细表 |
|
|
fileName = "班级收款明细表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" |
|
|
fileName = "班级收款明细表_" + utils.Int64ToStr(now.UnixMilli()) + ".zip" |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
@@ -1848,6 +1854,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
} |
|
|
} |
|
|
break |
|
|
break |
|
|
case 8: |
|
|
case 8: |
|
|
|
|
|
xlsx := excelize.NewFile() |
|
|
//学校预定数量统计表 |
|
|
//学校预定数量统计表 |
|
|
fileName = "学校预定数量统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" |
|
|
fileName = "学校预定数量统计表_" + utils.Int64ToStr(now.UnixMilli()) + ".xlsx" |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|
downloadPath = "/export/central_kitchen_for_school/" + fileName |
|
|