|
@@ -1574,29 +1574,36 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
count1, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
|
|
if err2 != nil { |
|
|
|
|
|
logx.Error(err) |
|
|
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
count2, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayKindForLunch, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
|
|
if err2 != nil { |
|
|
|
|
|
logx.Error(err) |
|
|
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
count3, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayKindForDinner, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
|
|
if err2 != nil { |
|
|
|
|
|
logx.Error(err) |
|
|
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
for _, value := range req.MealKindList { |
|
|
|
|
|
if value == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast { |
|
|
|
|
|
count1, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
|
|
if err2 != nil { |
|
|
|
|
|
logx.Error(err) |
|
|
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
list[v.Enterprise.Name][enum.CentralKitchenForSchoolUserWithDayKind(enum.CentralKitchenForSchoolUserWithDayKindForBreakfast).String()] += count1 |
|
|
|
|
|
} |
|
|
|
|
|
if value == enum.CentralKitchenForSchoolUserWithDayKindForLunch { |
|
|
|
|
|
count2, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayKindForLunch, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
|
|
if err2 != nil { |
|
|
|
|
|
logx.Error(err) |
|
|
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
list[v.Enterprise.Name][enum.CentralKitchenForSchoolUserWithDayKind(enum.CentralKitchenForSchoolUserWithDayKindForLunch).String()] += count2 |
|
|
|
|
|
} |
|
|
|
|
|
if value == enum.CentralKitchenForSchoolUserWithDayKindForDinner { |
|
|
|
|
|
count3, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayKindForDinner, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
|
|
if err2 != nil { |
|
|
|
|
|
logx.Error(err) |
|
|
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
list[v.Enterprise.Name][enum.CentralKitchenForSchoolUserWithDayKind(enum.CentralKitchenForSchoolUserWithDayKindForDinner).String()] += count3 |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
list[v.Enterprise.Name]["count"] += count |
|
|
list[v.Enterprise.Name]["count"] += count |
|
|
list[v.Enterprise.Name][enum.CentralKitchenForSchoolUserWithDayKind(enum.CentralKitchenForSchoolUserWithDayKindForBreakfast).String()] += count1 |
|
|
|
|
|
list[v.Enterprise.Name][enum.CentralKitchenForSchoolUserWithDayKind(enum.CentralKitchenForSchoolUserWithDayKindForLunch).String()] += count2 |
|
|
|
|
|
list[v.Enterprise.Name][enum.CentralKitchenForSchoolUserWithDayKind(enum.CentralKitchenForSchoolUserWithDayKindForDinner).String()] += count3 |
|
|
|
|
|
time.Sleep(20 * time.Millisecond) // 20毫秒 |
|
|
time.Sleep(20 * time.Millisecond) // 20毫秒 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|