diff --git a/app/admin/hdl/enterprise_manage/hdl_nursing_home.go b/app/admin/hdl/enterprise_manage/hdl_nursing_home.go index ef9f834..c0299c3 100644 --- a/app/admin/hdl/enterprise_manage/hdl_nursing_home.go +++ b/app/admin/hdl/enterprise_manage/hdl_nursing_home.go @@ -111,15 +111,15 @@ func SetNursingHomeWithSpec(c *gin.Context) { now := time.Now() if spec != nil { insertConfirm, err1 := nursingHomeWithSpec.NursingHomeWithSpecInsert(&model.NursingHomeWithSpec{ - IsOpenBreakfast: spec.IsOpenBreakfast, - IsOpenLunch: spec.IsOpenLunch, - IsOpenDinner: spec.IsOpenDinner, - EnterpriseId: req.EnterpriseId, - BreakfastUnitPrice: req.BreakfastUnitPrice, - LunchUnitPrice: req.LunchUnitPrice, - DinnerUnitPrice: req.DinnerUnitPrice, - CreateAt: now.Format("2006-01-02 15:04:05"), - UpdateAt: now.Format("2006-01-02 15:04:05"), + IsOpenBreakfast: spec.IsOpenBreakfast, + IsOpenLunch: spec.IsOpenLunch, + IsOpenDinner: spec.IsOpenDinner, + EnterpriseId: req.EnterpriseId, + BreakfastUnitPrice: req.BreakfastUnitPrice, + LunchUnitPrice: req.LunchUnitPrice, + DinnerUnitPrice: req.DinnerUnitPrice, + CreateAt: now.Format("2006-01-02 15:04:05"), + UpdateAt: now.Format("2006-01-02 15:04:05"), }) if err1 != nil { e.OutErr(c, e.ERR_DB_ORM, err1.Error()) @@ -131,12 +131,12 @@ func SetNursingHomeWithSpec(c *gin.Context) { } } else { insertConfirm, err1 := nursingHomeWithSpec.NursingHomeWithSpecInsert(&model.NursingHomeWithSpec{ - EnterpriseId: req.EnterpriseId, - BreakfastUnitPrice: req.BreakfastUnitPrice, - LunchUnitPrice: req.LunchUnitPrice, - DinnerUnitPrice: req.DinnerUnitPrice, - CreateAt: now.Format("2006-01-02 15:04:05"), - UpdateAt: now.Format("2006-01-02 15:04:05"), + EnterpriseId: req.EnterpriseId, + BreakfastUnitPrice: req.BreakfastUnitPrice, + LunchUnitPrice: req.LunchUnitPrice, + DinnerUnitPrice: req.DinnerUnitPrice, + CreateAt: now.Format("2006-01-02 15:04:05"), + UpdateAt: now.Format("2006-01-02 15:04:05"), }) if err1 != nil { e.OutErr(c, e.ERR_DB_ORM, err1.Error()) @@ -453,7 +453,7 @@ func NursingHomeOrdList(c *gin.Context) { "total": total, "kind_list": []map[string]string{ { - "name": "按学期购买", + "name": "按年购买", "value": "1", }, { diff --git a/app/admin/hdl/hdl_user.go b/app/admin/hdl/hdl_user.go index 079452a..71a9399 100644 --- a/app/admin/hdl/hdl_user.go +++ b/app/admin/hdl/hdl_user.go @@ -71,6 +71,10 @@ func UserList(c *gin.Context) { "name": enum.EnterprisePvd.String(enum.EnterprisePvdBySelfSupportForFactory), "value": enum.EnterprisePvdBySelfSupportForFactory, }, + { + "name": enum.EnterprisePvd.String(enum.EnterprisePvdByNursingHome), + "value": enum.EnterprisePvdByNursingHome, + }, }, }, nil) return diff --git a/app/admin/md/md_enterprise_manage.go b/app/admin/md/md_enterprise_manage.go index d4571aa..a1915c7 100644 --- a/app/admin/md/md_enterprise_manage.go +++ b/app/admin/md/md_enterprise_manage.go @@ -598,17 +598,14 @@ type SetBasicNursingHomeReq struct { IsOpenDinner int `json:"is_open_dinner" label:"是否开启晚餐"` IsOpenReportMealForDay int `json:"is_open_report_meal_for_day" label:"开启按天报餐(1:开启 2:关闭)"` IsOpenReportMealForMonth int `json:"is_open_report_meal_for_month" label:"开启按月报餐(1:开启 2:关闭)"` - IsOpenReportMealForYear int `json:"is_open_report_meal_for_semester" label:"开启按年报餐(1:开启 2:关闭)"` + IsOpenReportMealForYear int `json:"is_open_report_meal_for_year" label:"开启按年报餐(1:开启 2:关闭)"` } type SetNursingHomeWithSpecReq struct { - EnterpriseId int `json:"enterprise_id" binding:"required" label:"企业id"` - BreakfastUnitPrice string `json:"breakfast_unit_price" binding:"required" label:"早餐-单价"` - BreakfastUnitPriceForTeacher string `json:"breakfast_unit_price_for_teacher" binding:"required" label:"教师-早餐-单价"` - LunchUnitPrice string `json:"lunch_unit_price" binding:"required" label:"午餐-单价"` - LunchUnitPriceForTeacher string `json:"lunch_unit_price_for_teacher" binding:"required" label:"教师-午餐-单价"` - DinnerUnitPrice string `json:"dinner_unit_price" binding:"required" label:"晚餐-单价"` - DinnerUnitPriceForTeacher string `json:"dinner_unit_price_for_teacher" binding:"required" label:"教师-晚餐-单价"` + EnterpriseId int `json:"enterprise_id" binding:"required" label:"企业id"` + BreakfastUnitPrice string `json:"breakfast_unit_price" binding:"required" label:"早餐-单价"` + LunchUnitPrice string `json:"lunch_unit_price" binding:"required" label:"午餐-单价"` + DinnerUnitPrice string `json:"dinner_unit_price" binding:"required" label:"晚餐-单价"` } type SaveNursingHomePackageReq struct { @@ -626,4 +623,4 @@ type SaveNursingHomePackageReq struct { IsOpenDinner int32 `json:"is_open_dinner"` IsOpenReplenish int32 `json:"is_open_replenish"` } `json:"date_list" binding:"required" label:"日期"` -} \ No newline at end of file +} diff --git a/app/customer/hdl/hdl_enterprise.go b/app/customer/hdl/hdl_enterprise.go index f4258b2..28da2b0 100644 --- a/app/customer/hdl/hdl_enterprise.go +++ b/app/customer/hdl/hdl_enterprise.go @@ -113,6 +113,10 @@ func EnterpriseInfo(c *gin.Context) { "name": enum.EnterprisePvd.String(enum.EnterprisePvdBySelfSupportForFactory), "value": enum.EnterprisePvdBySelfSupportForFactory, }, + { + "name": enum.EnterprisePvd.String(enum.EnterprisePvdByNursingHome), + "value": enum.EnterprisePvdByNursingHome, + }, }, }, nil) return diff --git a/app/customer/hdl/hdl_nursing_home_for_school_order.go b/app/customer/hdl/hdl_nursing_home_for_school_order.go index 0f8aa25..152ae46 100644 --- a/app/customer/hdl/hdl_nursing_home_for_school_order.go +++ b/app/customer/hdl/hdl_nursing_home_for_school_order.go @@ -65,7 +65,7 @@ func NursingHomeOrderList(c *gin.Context) { }, "kind_list": []map[string]string{ { - "name": "按学期购买", + "name": "按年购买", "value": "1", }, { @@ -162,7 +162,7 @@ func NursingHomeOrderDetail(c *gin.Context) { }, "kind_list": []map[string]string{ { - "name": "按学期购买", + "name": "按年购买", "value": "1", }, { diff --git a/app/customer/md/md_pay.go b/app/customer/md/md_pay.go index f8eb51c..ebe4e3d 100644 --- a/app/customer/md/md_pay.go +++ b/app/customer/md/md_pay.go @@ -22,7 +22,7 @@ type NursingHomeBuyPackageReq struct { UserIdentityId int `json:"user_identity_id" binding:"required" label:"用户身份id"` PackageId int `json:"package_id" label:"套餐ID"` PackageIds []int `json:"package_ids" label:"套餐ID"` - Kind int `json:"kind" binding:"required" label:"购买类型(1:按学期购买 2:按月购买 3:按天购买 4:补餐)"` + Kind int `json:"kind" binding:"required" label:"购买类型(1:按年购买 2:按月购买 3:按天购买 4:补餐)"` IsBuyBreakfast int `json:"is_buy_breakfast" label:"是否购买早餐(1:是 2:否)"` IsBuyLunch int `json:"is_buy_lunch" label:"是否购买午餐(1:是 2:否)"` IsBuyDinner int `json:"is_buy_dinner" label:"是否购买晚餐(1:是 2:否)"` diff --git a/app/customer/svc/svc_pay.go b/app/customer/svc/svc_pay.go index b6ac15e..99f90e0 100644 --- a/app/customer/svc/svc_pay.go +++ b/app/customer/svc/svc_pay.go @@ -144,7 +144,7 @@ func NursingHomeBuyPackageReq(c *gin.Context, req md.NursingHomeBuyPackageReq) ( return } - //1、计算数据(1:按学期购买 2:按月购买 3:按天购买 4:补餐) + //1、计算数据(1:按年购买 2:按月购买 3:按天购买 4:补餐) var totalPrice float64 var data []*model.NursingHomeUserWithDay if req.Kind == 1 {