Browse Source

update

tmp
DengBiao 8 months ago
parent
commit
798263bd6d
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      app/admin/svc/svc_data_statisstics.go

+ 5
- 5
app/admin/svc/svc_data_statisstics.go View File

@@ -848,10 +848,10 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
sess.And("central_kitchen_for_school_package_ord.enterprise_id =?", req.EnterpriseId) sess.And("central_kitchen_for_school_package_ord.enterprise_id =?", req.EnterpriseId)
} }
if req.StartDate != "" { if req.StartDate != "" {
sess.And("central_kitchen_for_school_package_ord.create_at >= ?", req.StartDate)
sess.And("central_kitchen_for_school_package_ord.pay_at >= ?", req.StartDate)
} }
if req.EndDate != "" { if req.EndDate != "" {
sess.And("central_kitchen_for_school_package_ord.create_at <= ?", req.EndDate)
sess.And("central_kitchen_for_school_package_ord.pay_at <= ?", req.EndDate)
} }
if req.EnterPriseKind != 0 { if req.EnterPriseKind != 0 {
sess.And("enterprise.kind = ?", req.EnterPriseKind) sess.And("enterprise.kind = ?", req.EnterPriseKind)
@@ -1759,7 +1759,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
for _, v := range m { for _, v := range m {
var income, refund string var income, refund string
//统计收入 //统计收入
sql1 := fmt.Sprintf("SELECT sum(total_price) as total FROM central_kitchen_for_school_package_ord where state = 1 and enterprise_id = %d and create_at >= '%s' and create_at < '%s'", v.Id, req.StartDate, req.EndDate)
sql1 := fmt.Sprintf("SELECT sum(total_price) as total FROM central_kitchen_for_school_package_ord where state = 1 and enterprise_id = %d and pay_at >= '%s' and pay_at < '%s'", v.Id, req.StartDate, req.EndDate)
mapArr1, err := db.QueryNativeString(db.Db, sql1) mapArr1, err := db.QueryNativeString(db.Db, sql1)
if err != nil { if err != nil {
logx.Error(err) logx.Error(err)
@@ -1818,10 +1818,10 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
sess.And("central_kitchen_for_school_package_ord.enterprise_id =?", req.EnterpriseId) sess.And("central_kitchen_for_school_package_ord.enterprise_id =?", req.EnterpriseId)
} }
if req.StartDate != "" { if req.StartDate != "" {
sess.And("central_kitchen_for_school_package_ord.create_at >= ?", req.StartDate)
sess.And("central_kitchen_for_school_package_ord.pay_at >= ?", req.StartDate)
} }
if req.EndDate != "" { if req.EndDate != "" {
sess.And("central_kitchen_for_school_package_ord.create_at <= ?", req.EndDate)
sess.And("central_kitchen_for_school_package_ord.pay_at <= ?", req.EndDate)
} }
if req.EnterPriseKind != 0 { if req.EnterPriseKind != 0 {
sess.And("enterprise.kind = ?", req.EnterPriseKind) sess.And("enterprise.kind = ?", req.EnterPriseKind)


Loading…
Cancel
Save