修改了新增医生服务设置
This commit is contained in:
parent
ab378ee21d
commit
1a341fe77d
@ -2,6 +2,7 @@ package service
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"gorm.io/gorm"
|
||||
"hospital-admin-api/api/dao"
|
||||
"hospital-admin-api/api/dto"
|
||||
@ -509,6 +510,7 @@ func (r *DoctorInquiryConfigService) AddDoctorInquiryConfig(req requests.AddDoct
|
||||
tx := global.Db.Begin()
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
fmt.Println(r)
|
||||
tx.Rollback()
|
||||
}
|
||||
}()
|
||||
@ -527,7 +529,7 @@ func (r *DoctorInquiryConfigService) AddDoctorInquiryConfig(req requests.AddDoct
|
||||
doctorInquiryConfig, err = doctorInquiryConfigDao.AddDoctorInquiryConfig(tx, doctorInquiryConfig)
|
||||
if err != nil || doctorInquiryConfig == nil {
|
||||
tx.Rollback()
|
||||
return false, errors.New(err.Error())
|
||||
return false, errors.New("失败")
|
||||
}
|
||||
|
||||
// 处理医生问诊时间
|
||||
@ -584,7 +586,7 @@ func (r *DoctorInquiryConfigService) AddDoctorInquiryConfig(req requests.AddDoct
|
||||
}
|
||||
|
||||
// 新增医生服务设置-疑难会诊
|
||||
if req.InquiryType == 1 || req.InquiryMode == 6 {
|
||||
if req.InquiryType == 1 && req.InquiryMode == 6 {
|
||||
doctorInquiryConfigServiceDao := dao.DoctorInquiryConfigServiceDao{}
|
||||
|
||||
doctorInquiryConfigService := &model.DoctorInquiryConfigService{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user