|
|
@@ -643,12 +643,12 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
if req.EnterpriseId != 0 { |
|
|
|
sess.And("central_kitchen_for_school_package_ord_for_reserve.enterprise_id =?", req.EnterpriseId) |
|
|
|
} |
|
|
|
if req.StartDate != "" { |
|
|
|
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate) |
|
|
|
} |
|
|
|
if req.EndDate != "" { |
|
|
|
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.EndDate) |
|
|
|
} |
|
|
|
//if req.StartDate != "" { |
|
|
|
// sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate) |
|
|
|
//} |
|
|
|
//if req.EndDate != "" { |
|
|
|
// sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.EndDate) |
|
|
|
//} |
|
|
|
if len(req.MealKindList) > 0 { |
|
|
|
sess.In("central_kitchen_for_school_package_ord_for_reserve.kind", req.MealKindList) |
|
|
|
} |
|
|
@@ -682,13 +682,15 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
list[v.Enterprise.Name][v.Grade.Name][v.Class.Name] = make(map[string]int64) |
|
|
|
} |
|
|
|
|
|
|
|
count, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNo(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
count, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNo( |
|
|
|
v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayStateForCancel, |
|
|
|
req.StartDate, req.EndDate) |
|
|
|
if err2 != nil { |
|
|
|
logx.Error(err) |
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
time.Sleep(50 * time.Millisecond) // 50毫秒 |
|
|
|
time.Sleep(20 * time.Millisecond) // 20毫秒 |
|
|
|
|
|
|
|
if v.CentralKitchenForSchoolPackageOrdForReserve.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast { |
|
|
|
list[v.Enterprise.Name][v.Grade.Name][v.Class.Name]["breakfast"] += count |
|
|
@@ -809,12 +811,12 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
if req.EnterpriseId != 0 { |
|
|
|
sess.And("central_kitchen_for_school_package_ord_for_reserve.enterprise_id =?", req.EnterpriseId) |
|
|
|
} |
|
|
|
if req.StartDate != "" { |
|
|
|
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate) |
|
|
|
} |
|
|
|
if req.EndDate != "" { |
|
|
|
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.EndDate) |
|
|
|
} |
|
|
|
//if req.StartDate != "" { |
|
|
|
// sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate) |
|
|
|
//} |
|
|
|
//if req.EndDate != "" { |
|
|
|
// sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.EndDate) |
|
|
|
//} |
|
|
|
if len(req.MealKindList) > 0 { |
|
|
|
sess.In("central_kitchen_for_school_package_ord_for_reserve.kind", req.MealKindList) |
|
|
|
} |
|
|
@@ -852,13 +854,15 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
list[v.Enterprise.Name][v.Grade.Name][v.Class.Name][v.UserIdentity.Name] = make(map[string]int64) |
|
|
|
} |
|
|
|
|
|
|
|
count, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNo(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
count, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNo( |
|
|
|
v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayStateForCancel, |
|
|
|
req.StartDate, req.EndDate) |
|
|
|
if err2 != nil { |
|
|
|
logx.Error(err) |
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
time.Sleep(50 * time.Millisecond) // 50毫秒 |
|
|
|
time.Sleep(20 * time.Millisecond) // 20毫秒 |
|
|
|
|
|
|
|
if v.CentralKitchenForSchoolPackageOrdForReserve.Kind == enum.CentralKitchenForSchoolUserWithDayKindForBreakfast { |
|
|
|
list[v.Enterprise.Name][v.Grade.Name][v.Class.Name][v.UserIdentity.Name]["breakfast"] += count |
|
|
@@ -1453,7 +1457,9 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
if list[v.Enterprise.Name] == nil { |
|
|
|
list[v.Enterprise.Name] = map[string]int64{} |
|
|
|
} |
|
|
|
count, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNo(v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayStateForCancel) |
|
|
|
count, err2 := centralKitchenForSchoolUserWithDayDb.CountCentralKitchenForSchoolUserWithDayByOrdNo( |
|
|
|
v.CentralKitchenForSchoolPackageOrdForReserve.OutTradeNo, enum.CentralKitchenForSchoolUserWithDayStateForCancel, |
|
|
|
req.StartDate, req.EndDate) |
|
|
|
if err2 != nil { |
|
|
|
logx.Error(err) |
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error()) |
|
|
@@ -1483,7 +1489,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD |
|
|
|
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(50 * time.Millisecond) // 50毫秒 |
|
|
|
time.Sleep(20 * time.Millisecond) // 20毫秒 |
|
|
|
} |
|
|
|
|
|
|
|
titleList = []string{startDate.Format("2006-01-02") + "~~" + endDate.Format("2006-01-02") + " 预定数量统计表"} |
|
|
|