DengBiao преди 1 година
родител
ревизия
4652e35849
променени са 1 файла, в които са добавени 5 реда и са изтрити 6 реда
  1. +5
    -6
      app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go

+ 5
- 6
app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go Целия файл

@@ -800,10 +800,9 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
if len(classWithUserIdentityIdsTwo) > 0 {
sess.In("user_identity.id", classWithUserIdentityIdsTwo)
}
var sess1, sess2, sess3, sess4, sess5 = sess, sess, sess, sess, sess

var m []*db.CentralKitchenForSchoolPackageOrdWithUserIdentity
personNum, err = sess1.
personNum, err = sess.
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
@@ -816,7 +815,7 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
return 0, 0, 0, 0, 0, err
}

orderCountByTerm, err = sess2.And("central_kitchen_for_school_package_ord.kind = ?", 1).
orderCountByTerm, err = sess.And("central_kitchen_for_school_package_ord.kind = ?", 1).
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
@@ -827,7 +826,7 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
if err != nil {
return 0, 0, 0, 0, 0, err
}
orderCountByMonth, err = sess3.And("central_kitchen_for_school_package_ord.kind = ?", 2).
orderCountByMonth, err = sess.And("central_kitchen_for_school_package_ord.kind = ?", 2).
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
@@ -838,7 +837,7 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
if err != nil {
return 0, 0, 0, 0, 0, err
}
orderCountByDay, err = sess4.And("central_kitchen_for_school_package_ord.kind = ?", 3).
orderCountByDay, err = sess.And("central_kitchen_for_school_package_ord.kind = ?", 3).
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
@@ -851,7 +850,7 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
}

var mm db.CentralKitchenForSchoolPackageOrdWithUserIdentity
consumeAmount, err = sess5.
consumeAmount, err = sess.
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").


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