新增审核-医生列表-详情
This commit is contained in:
@@ -436,3 +436,15 @@ func (r *UserService) GetUserCardNum(userId, familyId int64) (string, error) {
|
||||
|
||||
return cardNum, nil
|
||||
}
|
||||
|
||||
// GetUserBankNumByDoctorId 获取银行卡号
|
||||
func (r *UserService) GetUserBankNumByDoctorId(doctorId int64) (string, error) {
|
||||
// 获取用户数据
|
||||
doctorBankCardDao := dao.DoctorBankCardDao{}
|
||||
doctorBankCard, err := doctorBankCardDao.GetDoctorBankCardByDoctorId(doctorId)
|
||||
if err != nil || doctorBankCard == nil {
|
||||
return "", errors.New("错误数据")
|
||||
}
|
||||
|
||||
return doctorBankCard.BankCardCode, nil
|
||||
}
|
||||
|
||||
@@ -92,6 +92,7 @@ func (r *UserDoctorService) GetUserDoctor(doctorId int64) (getUserDoctorResponse
|
||||
IsImgWelfareReception: userDoctor.IsImgWelfareReception,
|
||||
IsImgQuickReception: userDoctor.IsImgQuickReception,
|
||||
IsPlatformDeepCooperation: userDoctor.IsPlatformDeepCooperation,
|
||||
IsSysDiagnoCooperation: userDoctor.IsSysDiagnoCooperation,
|
||||
QrCode: config.C.Oss.OssCustomDomainName + userDoctor.QrCode,
|
||||
BeGoodAt: userDoctor.BeGoodAt,
|
||||
BriefIntroduction: userDoctor.BriefIntroduction,
|
||||
@@ -192,6 +193,16 @@ func (r *UserDoctorService) PutUserDoctor(doctorId int64, putUserDoctorRequest r
|
||||
userDoctorData["department_custom_id"] = putUserDoctorRequest.HospitalId
|
||||
}
|
||||
|
||||
// 处理深度合作医生
|
||||
if userDoctor.IsPlatformDeepCooperation != putUserDoctorRequest.IsPlatformDeepCooperation {
|
||||
userDoctorData["is_platform_deep_cooperation"] = putUserDoctorRequest.IsPlatformDeepCooperation
|
||||
}
|
||||
|
||||
// 处理是否先思达合作医生
|
||||
if userDoctor.IsSysDiagnoCooperation != putUserDoctorRequest.IsSysDiagnoCooperation {
|
||||
userDoctorData["is_sys_diagno_cooperation"] = putUserDoctorRequest.IsSysDiagnoCooperation
|
||||
}
|
||||
|
||||
// 处理擅长
|
||||
if userDoctor.BeGoodAt != putUserDoctorRequest.BeGoodAt {
|
||||
userDoctorData["be_good_at"] = putUserDoctorRequest.BeGoodAt
|
||||
@@ -721,6 +732,7 @@ func (r *UserDoctorService) AddUserDoctor(userId string, a requests.AddUserDocto
|
||||
DepartmentCustomMobile: a.DepartmentCustomMobile,
|
||||
HospitalID: hospitalId,
|
||||
IsPlatformDeepCooperation: a.IsPlatformDeepCooperation,
|
||||
IsSysDiagnoCooperation: a.IsSysDiagnoCooperation,
|
||||
BeGoodAt: a.BeGoodAt,
|
||||
BriefIntroduction: a.BriefIntroduction,
|
||||
}
|
||||
@@ -843,3 +855,66 @@ func (r *UserDoctorService) GetUserDoctorBankByDoctorId(doctorId int64) (*doctor
|
||||
|
||||
return doctorExpertisesResponse, nil
|
||||
}
|
||||
|
||||
// GetUserDoctorPending 医生详情-审核
|
||||
func (r *UserDoctorService) GetUserDoctorPending(doctorId int64) (g *userDoctorResponse.GetUserDoctorPending, err error) {
|
||||
// 获取医生数据
|
||||
userDoctorDao := dao.UserDoctorDao{}
|
||||
userDoctor, err := userDoctorDao.GetUserDoctorPreloadById(doctorId)
|
||||
if err != nil || userDoctor == nil {
|
||||
return nil, errors.New("用户数据错误")
|
||||
}
|
||||
|
||||
userDoctorService := UserDoctorService{}
|
||||
|
||||
// 获取医生专长
|
||||
doctorExpertise, err := userDoctorService.GetUserDoctorExpertiseByDoctorId(doctorId)
|
||||
if err != nil {
|
||||
return nil, errors.New(err.Error())
|
||||
}
|
||||
|
||||
// 处理返回值
|
||||
var userDoctorInfo *userDoctorInfoResponse.UserDoctorInfo
|
||||
if userDoctor.UserDoctorInfo != nil {
|
||||
userDoctorInfo = userDoctorInfoResponse.UserDoctorInfoResponse(userDoctor.UserDoctorInfo)
|
||||
}
|
||||
|
||||
// 医院
|
||||
var hospital *hospitalResponse.Hospital
|
||||
if userDoctor.Hospital != nil {
|
||||
hospital = hospitalResponse.HospitalResponse(userDoctor.Hospital)
|
||||
}
|
||||
|
||||
// 用户
|
||||
var user *userResponse.User
|
||||
if userDoctor.User != nil {
|
||||
user = userResponse.UserResponse(userDoctor.User)
|
||||
}
|
||||
|
||||
g = &userDoctorResponse.GetUserDoctorPending{
|
||||
DoctorID: strconv.Itoa(int(userDoctor.DoctorId)),
|
||||
UserID: strconv.Itoa(int(userDoctor.UserId)),
|
||||
UserName: userDoctor.UserName,
|
||||
Status: userDoctor.Status,
|
||||
IDCardStatus: userDoctor.Status,
|
||||
IdenAuthStatus: userDoctor.IdenAuthStatus,
|
||||
IdenAuthTime: userDoctor.IdenAuthTime,
|
||||
IdenAuthFailReason: userDoctor.IdenAuthFailReason,
|
||||
Avatar: config.C.Oss.OssCustomDomainName + userDoctor.Avatar,
|
||||
DoctorTitle: userDoctor.DoctorTitle,
|
||||
DepartmentCustomID: strconv.Itoa(int(userDoctor.DepartmentCustomId)),
|
||||
DepartmentCustomName: userDoctor.DepartmentCustomName,
|
||||
DepartmentCustomMobile: userDoctor.DepartmentCustomMobile,
|
||||
HospitalID: strconv.Itoa(int(userDoctor.HospitalID)),
|
||||
BeGoodAt: userDoctor.BeGoodAt,
|
||||
BriefIntroduction: userDoctor.BriefIntroduction,
|
||||
CreatedAt: userDoctor.CreatedAt,
|
||||
UpdatedAt: userDoctor.UpdatedAt,
|
||||
User: user,
|
||||
Hospital: hospital,
|
||||
UserDoctorInfo: userDoctorInfo,
|
||||
DoctorExpertise: doctorExpertise, // 专长
|
||||
}
|
||||
|
||||
return g, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user