Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
cbd636cdb6
1 changed files with 20 additions and 4 deletions
  1. +20
    -4
      app/admin/svc/svc_data_statisstics.go

+ 20
- 4
app/admin/svc/svc_data_statisstics.go View File

@@ -1642,8 +1642,14 @@ func CentralKitchenForSchoolDataStatisticsContrast(req md.CentralKitchenForSchoo
if req.EnterpriseId != 0 {
sess.And("central_kitchen_for_school_package_ord_for_reserve.enterprise_id =?", req.EnterpriseId)
}
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.Date1[0])
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.Date1[1])
if req.Date1[0] != "" {
startDate, _ := time.ParseInLocation("2006-01-02 15:04:05", req.Date1[0], time.Local)
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", startDate.Format("2006-01-02"))
}
if req.Date1[1] != "" {
endDate, _ := time.ParseInLocation("2006-01-02 15:04:05", req.Date1[0], time.Local)
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", endDate.Format("2006-01-02"))
}
if len(req.MealKindList) > 0 {
sess.In("central_kitchen_for_school_package_ord_for_reserve.kind", req.MealKindList)
}
@@ -1667,8 +1673,14 @@ func CentralKitchenForSchoolDataStatisticsContrast(req md.CentralKitchenForSchoo
if req.EnterpriseId != 0 {
sess1.And("central_kitchen_for_school_package_ord_for_reserve.enterprise_id =?", req.EnterpriseId)
}
sess1.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.Date2[0])
sess1.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.Date2[1])
if req.Date2[0] != "" {
startDate, _ := time.ParseInLocation("2006-01-02 15:04:05", req.Date1[0], time.Local)
sess1.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", startDate.Format("2006-01-02"))
}
if req.Date2[1] != "" {
endDate, _ := time.ParseInLocation("2006-01-02 15:04:05", req.Date1[0], time.Local)
sess1.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", endDate.Format("2006-01-02"))
}
if len(req.MealKindList) > 0 {
sess1.In("central_kitchen_for_school_package_ord_for_reserve.kind", req.MealKindList)
}
@@ -1767,6 +1779,10 @@ func CentralKitchenForSchoolDataStatisticsContrast(req md.CentralKitchenForSchoo
j := 2 //表头被第一行用了,只能从第二行开始
for k4, v4 := range v3 {
//TODO::判断当前用户是否在新的月份里面
fmt.Println("11111111111111", list1[k1])
fmt.Println("22222222222222", list1[k1][k2])
fmt.Println("33333333333333", list1[k1][k2][k3])
fmt.Println("44444444444444", list1[k1][k2][k3][k4])
if list1[k1] == nil || list1[k1][k2] == nil || list1[k1][k2][k3] == nil || list1[k1][k2][k3][k4] == "" {
xlsx.SetSheetRow(k3, "A"+strconv.Itoa(j), &[]interface{}{
k4, v4})


Loading…
Cancel
Save