Kaynağa Gözat

update

add_mode
DengBiao 1 yıl önce
ebeveyn
işleme
0b57dbe661
2 değiştirilmiş dosya ile 48 ekleme ve 12 silme
  1. +33
    -0
      app/admin/hdl/hdl_data_statistics.go
  2. +15
    -12
      app/admin/md/md_central_kitchen_for_school_export_records.go

+ 33
- 0
app/admin/hdl/hdl_data_statistics.go Dosyayı Görüntüle

@@ -106,6 +106,17 @@ func CentralKitchenForSchoolDataStatisticsExport(c *gin.Context) {
e.OutErr(c, err1.Code, err1.Error())
return
}
if req.EnterpriseId != 0 {
enterpriseDb := db.EnterpriseDb{}
enterpriseDb.Set()
enterprise, err1 := enterpriseDb.GetEnterprise(req.EnterpriseId)
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
req.EnterpriseName = enterprise.Name
}

e.OutSuc(c, map[string]interface{}{
"msg": "导出成功,请稍后刷新数据列表",
}, nil)
@@ -190,6 +201,17 @@ func NursingHomeDataStatisticsExport(c *gin.Context) {
return
}

if req.EnterpriseId != 0 {
enterpriseDb := db.EnterpriseDb{}
enterpriseDb.Set()
enterprise, err1 := enterpriseDb.GetEnterprise(req.EnterpriseId)
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
req.EnterpriseName = enterprise.Name
}

go svc.NursingHomeDataStatisticsExport(req)

e.OutSuc(c, map[string]interface{}{
@@ -276,6 +298,17 @@ func SelfSupportForSchoolDataStatisticsExport(c *gin.Context) {
return
}

if req.EnterpriseId != 0 {
enterpriseDb := db.EnterpriseDb{}
enterpriseDb.Set()
enterprise, err1 := enterpriseDb.GetEnterprise(req.EnterpriseId)
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
req.EnterpriseName = enterprise.Name
}

go svc.SelfSupportForSchoolDataStatisticsExport(req)

e.OutSuc(c, map[string]interface{}{


+ 15
- 12
app/admin/md/md_central_kitchen_for_school_export_records.go Dosyayı Görüntüle

@@ -9,10 +9,11 @@ type CentralKitchenForSchoolExportRecordsListReq struct {
}

type CentralKitchenForSchoolDataStatisticsExportReq struct {
Kind int `json:"kind" binding:"required" label:"导出类型"`
StartDate string `json:"start_date" binding:"required" label:"起始时间"`
EndDate string `json:"end_date" binding:"required" label:"截止时间"`
EnterpriseId int `json:"enterprise_id" label:"校企id"`
Kind int `json:"kind" binding:"required" label:"导出类型"`
StartDate string `json:"start_date" binding:"required" label:"起始时间"`
EndDate string `json:"end_date" binding:"required" label:"截止时间"`
EnterpriseId int `json:"enterprise_id" label:"校企id"`
EnterpriseName string `json:"enterprise_name" label:"校企名称"`
}

type NursingHomeExportRecordsListReq struct {
@@ -24,10 +25,11 @@ type NursingHomeExportRecordsListReq struct {
}

type NursingHomeDataStatisticsExportReq struct {
Kind int `json:"kind" binding:"required" label:"导出类型"`
StartDate string `json:"start_date" binding:"required" label:"起始时间"`
EndDate string `json:"end_date" binding:"required" label:"截止时间"`
EnterpriseId int `json:"enterprise_id" binding:"required" label:"校企id"`
Kind int `json:"kind" binding:"required" label:"导出类型"`
StartDate string `json:"start_date" binding:"required" label:"起始时间"`
EndDate string `json:"end_date" binding:"required" label:"截止时间"`
EnterpriseId int `json:"enterprise_id" label:"校企id"`
EnterpriseName string `json:"enterprise_name" label:"校企名称"`
}

type SelfSupportForSchoolExportRecordsListReq struct {
@@ -39,8 +41,9 @@ type SelfSupportForSchoolExportRecordsListReq struct {
}

type SelfSupportForSchoolDataStatisticsExportReq struct {
Kind int `json:"kind" binding:"required" label:"导出类型"`
StartDate string `json:"start_date" binding:"required" label:"起始时间"`
EndDate string `json:"end_date" binding:"required" label:"截止时间"`
EnterpriseId int `json:"enterprise_id" label:"校企id"`
Kind int `json:"kind" binding:"required" label:"导出类型"`
StartDate string `json:"start_date" binding:"required" label:"起始时间"`
EndDate string `json:"end_date" binding:"required" label:"截止时间"`
EnterpriseId int `json:"enterprise_id" label:"校企id"`
EnterpriseName string `json:"enterprise_name" label:"校企名称"`
}

Yükleniyor…
İptal
Kaydet