浏览代码

update

tmp
DengBiao 8 个月前
父节点
当前提交
798263bd6d
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. +5
    -5
      app/admin/svc/svc_data_statisstics.go

+ 5
- 5
app/admin/svc/svc_data_statisstics.go 查看文件

@@ -848,10 +848,10 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
sess.And("central_kitchen_for_school_package_ord.enterprise_id =?", req.EnterpriseId)
}
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 != "" {
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 {
sess.And("enterprise.kind = ?", req.EnterPriseKind)
@@ -1759,7 +1759,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
for _, v := range m {
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)
if err != nil {
logx.Error(err)
@@ -1818,10 +1818,10 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
sess.And("central_kitchen_for_school_package_ord.enterprise_id =?", req.EnterpriseId)
}
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 != "" {
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 {
sess.And("enterprise.kind = ?", req.EnterPriseKind)


正在加载...
取消
保存