浏览代码

update

add_mode
DengBiao 1年前
父节点
当前提交
e19416305d
共有 7 个文件被更改,包括 34 次插入29 次删除
  1. +16
    -16
      app/admin/hdl/enterprise_manage/hdl_nursing_home.go
  2. +4
    -0
      app/admin/hdl/hdl_user.go
  3. +6
    -9
      app/admin/md/md_enterprise_manage.go
  4. +4
    -0
      app/customer/hdl/hdl_enterprise.go
  5. +2
    -2
      app/customer/hdl/hdl_nursing_home_for_school_order.go
  6. +1
    -1
      app/customer/md/md_pay.go
  7. +1
    -1
      app/customer/svc/svc_pay.go

+ 16
- 16
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",
},
{


+ 4
- 0
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


+ 6
- 9
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:"日期"`
}
}

+ 4
- 0
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


+ 2
- 2
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",
},
{


+ 1
- 1
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:否)"`


+ 1
- 1
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 {


正在加载...
取消
保存