|
@@ -738,17 +738,17 @@ func CentralKitchenForSchoolReserveList(req md.CentralKitchenForSchoolReserveLis |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//var centralKitchenForSchoolUserWithDayIds []string |
|
|
|
|
|
//if req.StartDate != "" && req.EndDate != "" { |
|
|
|
|
|
// var m []model.CentralKitchenForSchoolUserWithDay |
|
|
|
|
|
// if err1 := db.Db.In("state", []int{enum2.CentralKitchenForSchoolUserWithDayStateForWait, enum2.CentralKitchenForSchoolUserWithDayStateForAlready}). |
|
|
|
|
|
// And("date >= ? And date <= ?", req.StartDate, req.EndDate).Asc("date").Find(&m); err != nil { |
|
|
|
|
|
// return nil, 0, err1 |
|
|
|
|
|
// } |
|
|
|
|
|
// for _, v := range m { |
|
|
|
|
|
// centralKitchenForSchoolUserWithDayIds = append(centralKitchenForSchoolUserWithDayIds, v.OrdNo) |
|
|
|
|
|
// } |
|
|
|
|
|
//} |
|
|
|
|
|
|
|
|
var centralKitchenForSchoolUserWithDayIds []string |
|
|
|
|
|
if req.StartDate != "" && req.EndDate != "" { |
|
|
|
|
|
var m []model.CentralKitchenForSchoolUserWithDay |
|
|
|
|
|
if err1 := db.Db.In("state", []int{enum2.CentralKitchenForSchoolUserWithDayStateForWait, enum2.CentralKitchenForSchoolUserWithDayStateForAlready}). |
|
|
|
|
|
And("date >= ? And date <= ?", req.StartDate, req.EndDate).Asc("date").Find(&m); err != nil { |
|
|
|
|
|
return nil, 0, err1 |
|
|
|
|
|
} |
|
|
|
|
|
for _, v := range m { |
|
|
|
|
|
centralKitchenForSchoolUserWithDayIds = append(centralKitchenForSchoolUserWithDayIds, v.OrdNo) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var months []time.Month |
|
|
var months []time.Month |
|
|
if req.StartDate != "" { |
|
|
if req.StartDate != "" { |
|
@@ -791,9 +791,9 @@ func CentralKitchenForSchoolReserveList(req md.CentralKitchenForSchoolReserveLis |
|
|
if len(classWithUserIdentityIdsTwo) > 0 { |
|
|
if len(classWithUserIdentityIdsTwo) > 0 { |
|
|
sess.In("user_identity.id", classWithUserIdentityIdsTwo) |
|
|
sess.In("user_identity.id", classWithUserIdentityIdsTwo) |
|
|
} |
|
|
} |
|
|
//if len(centralKitchenForSchoolUserWithDayIds) > 0 { |
|
|
|
|
|
// sess.In("central_kitchen_for_school_package_ord.out_trade_no", centralKitchenForSchoolUserWithDayIds) |
|
|
|
|
|
//} |
|
|
|
|
|
|
|
|
if len(centralKitchenForSchoolUserWithDayIds) > 0 { |
|
|
|
|
|
sess.In("central_kitchen_for_school_package_ord.out_trade_no", centralKitchenForSchoolUserWithDayIds) |
|
|
|
|
|
} |
|
|
if len(months) > 0 { |
|
|
if len(months) > 0 { |
|
|
sess.In("central_kitchen_for_school_package_ord_for_reserve.reserve_month", months) |
|
|
sess.In("central_kitchen_for_school_package_ord_for_reserve.reserve_month", months) |
|
|
} |
|
|
} |
|
|