|
|
@@ -1054,7 +1054,8 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
} |
|
|
|
|
|
|
|
count, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNo( |
|
|
|
v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayStateForCancel, |
|
|
|
v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayStateForCancel, enum.CentralKitchenForSchoolUserWithDayStateForCanceling, |
|
|
|
req.StartDate, req.EndDate, req.MealKindList) |
|
|
|
if err2 != nil { |
|
|
|
logx.Error(err) |
|
|
@@ -1267,7 +1268,8 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
} |
|
|
|
|
|
|
|
count, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNo( |
|
|
|
v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayStateForCancel, |
|
|
|
v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayStateForCancel, enum.CentralKitchenForSchoolUserWithDayStateForCanceling, |
|
|
|
req.StartDate, req.EndDate, req.MealKindList) |
|
|
|
if err2 != nil { |
|
|
|
logx.Error(err) |
|
|
@@ -1904,7 +1906,8 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
list[v.Enterprise.Name] = map[string]int64{} |
|
|
|
} |
|
|
|
count, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNo( |
|
|
|
v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayStateForCancel, |
|
|
|
v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayStateForCancel, enum.CentralKitchenForSchoolUserWithDayStateForCanceling, |
|
|
|
req.StartDate, req.EndDate, req.MealKindList) |
|
|
|
if err2 != nil { |
|
|
|
logx.Error(err) |
|
|
@@ -1914,7 +1917,11 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
|
|
|
|
for _, value := range req.MealKindList { |
|
|
|
if value == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast { |
|
|
|
count1, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, req.StartDate, req.EndDate, enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
count1, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, req.StartDate, |
|
|
|
req.EndDate, enum.CentralKitchenForSchoolUserWithDayKindForBreakfast, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayStateForCancel, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayStateForCanceling, |
|
|
|
) |
|
|
|
if err2 != nil { |
|
|
|
logx.Error(err) |
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
@@ -1923,7 +1930,11 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
list[v.Enterprise.Name][enum.CentralKitchenForSchoolUserWithDayKind(enum.CentralKitchenForSchoolUserWithDayKindForBreakfast).String()] += count1 |
|
|
|
} |
|
|
|
if value == enum.CentralKitchenForSchoolUserWithDayKindForLunch { |
|
|
|
count2, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, req.StartDate, req.EndDate, enum.CentralKitchenForSchoolUserWithDayKindForLunch, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
count2, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, req.StartDate, req.EndDate, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayKindForLunch, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayStateForCancel, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayStateForCanceling, |
|
|
|
) |
|
|
|
if err2 != nil { |
|
|
|
logx.Error(err) |
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
@@ -1932,7 +1943,11 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
list[v.Enterprise.Name][enum.CentralKitchenForSchoolUserWithDayKind(enum.CentralKitchenForSchoolUserWithDayKindForLunch).String()] += count2 |
|
|
|
} |
|
|
|
if value == enum.CentralKitchenForSchoolUserWithDayKindForDinner { |
|
|
|
count3, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, req.StartDate, req.EndDate, enum.CentralKitchenForSchoolUserWithDayKindForDinner, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
count3, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNoAndKind(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, req.StartDate, req.EndDate, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayKindForDinner, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayStateForCancel, |
|
|
|
enum.CentralKitchenForSchoolUserWithDayStateForCanceling, |
|
|
|
) |
|
|
|
if err2 != nil { |
|
|
|
logx.Error(err) |
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
@@ -2006,13 +2021,13 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
dateName := date.Format("2006-01-02") |
|
|
|
dates = append(dates, dateName) |
|
|
|
for _, vv := range req.MealKindList { |
|
|
|
tmpSum, err := centralKitchenForSchoolUserWithDayDb.SumCentralKitchenForSchoolUserWithDayByKind(req.EnterpriseId, dateName, dateName, vv, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
tmpSum, err := centralKitchenForSchoolUserWithDayDb.SumCentralKitchenForSchoolUserWithDayByKind(req.EnterpriseId, dateName, dateName, vv, enum.CentralKitchenForSchoolUserWithDayStateForCancel, enum.CentralKitchenForSchoolUserWithDayStateForCanceling) |
|
|
|
if err != nil { |
|
|
|
logx.Error(err) |
|
|
|
println("<<<<CentralKitchenForSchoolDataStatisticsExport9>>>>>Error:::", err.Error()) |
|
|
|
panic(err) |
|
|
|
} |
|
|
|
tmpCount, err := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByKind(req.EnterpriseId, dateName, dateName, vv, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
tmpCount, err := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByKind(req.EnterpriseId, dateName, dateName, vv, enum.CentralKitchenForSchoolUserWithDayStateForCancel, enum.CentralKitchenForSchoolUserWithDayStateForCanceling) |
|
|
|
if err != nil { |
|
|
|
logx.Error(err) |
|
|
|
println("<<<<CentralKitchenForSchoolDataStatisticsExport9>>>>>Error:::", err.Error()) |
|
|
|