dengbiao 3 달 전
부모
커밋
37e2c358ca
5개의 변경된 파일68개의 추가작업 그리고 21개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

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

+ 4
- 0
docs/swagger.yaml 파일 보기

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

불러오는 중...
취소
저장