DengBiao преди 9 месеца
родител
ревизия
7aaf3d1116
променени са 2 файла, в които са добавени 12 реда и са изтрити 11 реда
  1. +3
    -2
      app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go
  2. +9
    -9
      app/admin/svc/svc_data_statisstics.go

+ 3
- 2
app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go Целия файл

@@ -1012,8 +1012,9 @@ func CentralKitchenForSchoolReserveUpdateStudent(c *gin.Context) {
}

//2、修改 central_kitchen_for_school_user_with_day
sql := "update central_kitchen_for_school_user_with_day set identity_id = %d where identity_id = %d and kind = %d and date >= '%s' and date <= '%s'"
sql = fmt.Sprintf(sql, req.UserIdentityId, req.OriginalUserIdentityId, centralKitchenForSchoolPackageOrdForReserve.Kind, centralKitchenForSchoolPackageOrdForReserve.MealTimeStart, centralKitchenForSchoolPackageOrdForReserve.MealTimeEnd)
sql := "update central_kitchen_for_school_user_with_day set identity_id = %d where identity_id = %d and kind = %d and date >= '%s' and date <= '%s' and ord_no = '%s'"
sql = fmt.Sprintf(sql, req.UserIdentityId, req.OriginalUserIdentityId, centralKitchenForSchoolPackageOrdForReserve.Kind, centralKitchenForSchoolPackageOrdForReserve.MealTimeStart,
centralKitchenForSchoolPackageOrdForReserve.MealTimeEnd, centralKitchenForSchoolPackageOrdForReserve.OutTradeNo)
fmt.Println("sql >>>>>", sql)
_, err = db.ExecuteOriginalSql(db.Db, sql)
if err != nil {


+ 9
- 9
app/admin/svc/svc_data_statisstics.go Целия файл

@@ -787,7 +787,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
}
var m []*db.CentralKitchenForSchoolPackageOrdWithUserIdentity
_, err := sess.
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord_for_reserve.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
Join("LEFT", "class_with_user", "class_with_user.user_identity_id = user_identity.id").
@@ -1026,7 +1026,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
}
_, err := sess.
Join("LEFT", "central_kitchen_for_school_package_ord", "central_kitchen_for_school_package_ord_for_reserve.out_trade_no = central_kitchen_for_school_package_ord.out_trade_no").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord_for_reserve.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
Join("LEFT", "class_with_user", "class_with_user.user_identity_id = user_identity.id").
@@ -1237,7 +1237,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
}
_, err := sess.
Join("LEFT", "central_kitchen_for_school_package_ord", "central_kitchen_for_school_package_ord_for_reserve.out_trade_no = central_kitchen_for_school_package_ord.out_trade_no").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord_for_reserve.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
Join("LEFT", "class_with_user", "class_with_user.user_identity_id = user_identity.id").
@@ -1274,8 +1274,8 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
enum.CentralKitchenForSchoolUserWithDayStateForCancel, enum.CentralKitchenForSchoolUserWithDayStateForCanceling,
req.StartDate, req.EndDate, []int{v.CentralKitchenForSchoolPackageOrdForReserve.Kind})
if err2 != nil {
logx.Error(err)
println("<<<<SelfSupportForSchoolDataStatisticsExport3>>>>>Error:::", err.Error())
logx.Error(err2)
println("<<<<SelfSupportForSchoolDataStatistics Export3>>>>>Error:::", err2.Error())
return
}
if count == 0 {
@@ -1689,7 +1689,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
}
var m []*db.CentralKitchenForSchoolPackageOrdWithUserIdentity
_, err := sess.
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord_for_reserve.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
Join("LEFT", "class_with_user", "class_with_user.user_identity_id = user_identity.id").
@@ -1896,7 +1896,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
}
_, err := sess.
Join("LEFT", "central_kitchen_for_school_package_ord", "central_kitchen_for_school_package_ord_for_reserve.out_trade_no = central_kitchen_for_school_package_ord.out_trade_no").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord_for_reserve.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
FindAndCount(&m)
if err != nil {
@@ -2145,7 +2145,7 @@ func CentralKitchenForSchoolDataStatisticsContrast(req md.CentralKitchenForSchoo

_, err := sess.
Join("LEFT", "central_kitchen_for_school_package_ord", "central_kitchen_for_school_package_ord_for_reserve.out_trade_no = central_kitchen_for_school_package_ord.out_trade_no").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord_for_reserve.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
Join("LEFT", "class_with_user", "class_with_user.user_identity_id = user_identity.id").
@@ -2176,7 +2176,7 @@ func CentralKitchenForSchoolDataStatisticsContrast(req md.CentralKitchenForSchoo
}
_, err1 := sess1.
Join("LEFT", "central_kitchen_for_school_package_ord", "central_kitchen_for_school_package_ord_for_reserve.out_trade_no = central_kitchen_for_school_package_ord.out_trade_no").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord_for_reserve.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
Join("LEFT", "class_with_user", "class_with_user.user_identity_id = user_identity.id").


Зареждане…
Отказ
Запис