dengbiao 3 mesi fa
parent
commit
37e2c358ca
5 ha cambiato i file con 68 aggiunte e 21 eliminazioni
  1. +1
    -1
      app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go
  2. +21
    -20
      app/admin/svc/svc_data_statisstics.go
  3. +35
    -0
      docs/docs.go
  4. +7
    -0
      docs/swagger.json
  5. +4
    -0
      docs/swagger.yaml

+ 1
- 1
app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go Vedi File

@@ -1346,7 +1346,7 @@ func CentralKitchenForSchoolBatchAskForLeave(c *gin.Context) {
//TODO:: 加锁 Redis 锁,防并发
getString, _ := cache.GetString(md.BatchAskForLeaveLockKeyForCentralKitchen)
if getString != "" {
e.OutErr(c, e.ERR, "请稍等,存在其他退款处理中!")
e.OutErr(c, e.ERR, "请稍等,存在其他请假处理中!")
return
}
cache.Set(md.BatchAskForLeaveLockKeyForCentralKitchen, "running")


+ 21
- 20
app/admin/svc/svc_data_statisstics.go Vedi File

@@ -2045,28 +2045,29 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
if req.EnterpriseId != 0 {
sess.And("central_kitchen_for_school_package_ord_for_reserve.enterprise_id =?", req.EnterpriseId)
}
var months []time.Month
//var months []time.Month
//if req.StartDate != "" {
// sDate, _ := time.ParseInLocation("2006-01-02 15:04:05", req.StartDate, time.Local)
// eDate, _ := time.ParseInLocation("2006-01-02 15:04:05", req.EndDate, time.Local)
// _, sMonth, _ := sDate.Date()
// _, eMonth, _ := eDate.Date()
// diffMonth := sMonth - eMonth
// if diffMonth == 0 {
// //TODO::查询一个月
// months = append(months, sMonth)
// } else {
// for i := sMonth; i <= eMonth; i++ {
// months = append(months, i)
// }
// }
//}
//if len(months) > 0 {
// sess.In("central_kitchen_for_school_package_ord_for_reserve.reserve_month", months)
//}
if req.StartDate != "" {
sDate, _ := time.ParseInLocation("2006-01-02 15:04:05", req.StartDate, time.Local)
eDate, _ := time.ParseInLocation("2006-01-02 15:04:05", req.EndDate, time.Local)
_, sMonth, _ := sDate.Date()
_, eMonth, _ := eDate.Date()
diffMonth := sMonth - eMonth
if diffMonth == 0 {
//TODO::查询一个月
months = append(months, sMonth)
} else {
for i := sMonth; i <= eMonth; i++ {
months = append(months, i)
}
}
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.StartDate).
And("central_kitchen_for_school_package_ord_for_reserve.meal_time_end >= ?", req.StartDate)
}
if len(months) > 0 {
sess.In("central_kitchen_for_school_package_ord_for_reserve.reserve_month", months)
}
//if req.EndDate != "" {
// sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start <= ?", req.EndDate)
//}
if len(req.MealKindList) > 0 {
sess.In("central_kitchen_for_school_package_ord_for_reserve.kind", req.MealKindList)
}


+ 35
- 0
docs/docs.go Vedi File

@@ -0,0 +1,35 @@
// Code generated by swaggo/swag. DO NOT EDIT.

package docs

import "github.com/swaggo/swag"

const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {}
}`

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "",
Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
}

func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}

+ 7
- 0
docs/swagger.json Vedi File

@@ -0,0 +1,7 @@
{
"swagger": "2.0",
"info": {
"contact": {}
},
"paths": {}
}

+ 4
- 0
docs/swagger.yaml Vedi File

@@ -0,0 +1,4 @@
info:
contact: {}
paths: {}
swagger: "2.0"

Caricamento…
Annulla
Salva