修正修改医生问题处理
This commit is contained in:
parent
2f047a88d2
commit
845ea4a000
@ -140,28 +140,32 @@ type GetMultiPage struct {
|
|||||||
|
|
||||||
// GetUserDoctorPending 身份审核-医生详情
|
// GetUserDoctorPending 身份审核-医生详情
|
||||||
type GetUserDoctorPending struct {
|
type GetUserDoctorPending struct {
|
||||||
DoctorID string `json:"doctor_id"` // 主键id
|
DoctorID string `json:"doctor_id"` // 主键id
|
||||||
UserID string `json:"user_id"` // 用户id
|
UserID string `json:"user_id"` // 用户id
|
||||||
UserName string `json:"user_name"` // 用户名称
|
UserName string `json:"user_name"` // 用户名称
|
||||||
Status int `json:"status"` // 状态(0:禁用 1:正常 2:删除)
|
Status int `json:"status"` // 状态(0:禁用 1:正常 2:删除)
|
||||||
IDCardStatus int `json:"idcard_status"` // 实名认证状态(0:未认证 1:认证通过 2:认证失败)
|
IDCardStatus int `json:"idcard_status"` // 实名认证状态(0:未认证 1:认证通过 2:认证失败)
|
||||||
IdenAuthStatus int `json:"iden_auth_status"` // 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
IdenAuthStatus int `json:"iden_auth_status"` // 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||||
IdenAuthTime model.LocalTime `json:"iden_auth_time"` // 审核时间
|
IdenAuthTime model.LocalTime `json:"iden_auth_time"` // 审核时间
|
||||||
IdenAuthFailReason *IdenAuthFailReason `json:"iden_auth_fail_reason"` // 身份认证失败原因
|
IdenAuthFailReason *IdenAuthFailReason `json:"iden_auth_fail_reason"` // 身份认证失败原因
|
||||||
Avatar string `json:"avatar"` // 头像
|
Avatar string `json:"avatar"` // 头像
|
||||||
DoctorTitle int `json:"doctor_title"` // 医生职称(1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师)
|
DoctorTitle int `json:"doctor_title"` // 医生职称(1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师)
|
||||||
DepartmentCustomID string `json:"department_custom_id"` // 科室id-自定义
|
DepartmentCustomID string `json:"department_custom_id"` // 科室id-自定义
|
||||||
DepartmentCustomName string `json:"department_custom_name"` // 科室名称(如未自己输入,填入标准科室名称)
|
DepartmentCustomName string `json:"department_custom_name"` // 科室名称(如未自己输入,填入标准科室名称)
|
||||||
DepartmentCustomMobile string `json:"department_custom_mobile"` // 科室电话
|
DepartmentCustomMobile string `json:"department_custom_mobile"` // 科室电话
|
||||||
HospitalID string `json:"hospital_id"` // 所属医院id
|
HospitalID string `json:"hospital_id"` // 所属医院id
|
||||||
BeGoodAt string `json:"be_good_at"` // 擅长
|
BeGoodAt string `json:"be_good_at"` // 擅长
|
||||||
BriefIntroduction string `json:"brief_introduction"` // 医生简介
|
BriefIntroduction string `json:"brief_introduction"` // 医生简介
|
||||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
IsPlatformDeepCooperation int `json:"is_platform_deep_cooperation"` // 是否平台深度合作医生(0:否 1:是)
|
||||||
UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间
|
IsEnterpriseDeepCooperation int `json:"is_enterprise_deep_cooperation"` // 是否企业深度合作医生(0:否 1:是)
|
||||||
User *userResponse.User `json:"user"` // 用户
|
IsSysDiagnoCooperation int `json:"is_sys_diagno_cooperation"` // 是否先思达合作医生(0:否 1:是)
|
||||||
Hospital *hospitalResponse.Hospital `json:"hospital"` // 医院
|
IsRecommend int `json:"is_recommend"` // 是否首页推荐(0:否 1:是)
|
||||||
UserDoctorInfo *userDoctorInfoResponse.UserDoctorInfo `json:"user_doctor_info"` // 医生详情
|
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||||
DoctorExpertise []*doctorExpertiseResponse.DoctorExpertise `json:"doctor_expertise"` // 医生专长
|
UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间
|
||||||
|
User *userResponse.User `json:"user"` // 用户
|
||||||
|
Hospital *hospitalResponse.Hospital `json:"hospital"` // 医院
|
||||||
|
UserDoctorInfo *userDoctorInfoResponse.UserDoctorInfo `json:"user_doctor_info"` // 医生详情
|
||||||
|
DoctorExpertise []*doctorExpertiseResponse.DoctorExpertise `json:"doctor_expertise"` // 医生专长
|
||||||
}
|
}
|
||||||
|
|
||||||
// IdenAuthFailReason 身份认证失败原因
|
// IdenAuthFailReason 身份认证失败原因
|
||||||
|
|||||||
@ -931,28 +931,32 @@ func (r *UserDoctorService) GetUserDoctorPending(doctorId int64) (g *userDoctorR
|
|||||||
}
|
}
|
||||||
|
|
||||||
g = &userDoctorResponse.GetUserDoctorPending{
|
g = &userDoctorResponse.GetUserDoctorPending{
|
||||||
DoctorID: strconv.Itoa(int(userDoctor.DoctorId)),
|
DoctorID: strconv.Itoa(int(userDoctor.DoctorId)),
|
||||||
UserID: strconv.Itoa(int(userDoctor.UserId)),
|
UserID: strconv.Itoa(int(userDoctor.UserId)),
|
||||||
UserName: userDoctor.UserName,
|
UserName: userDoctor.UserName,
|
||||||
Status: userDoctor.Status,
|
Status: userDoctor.Status,
|
||||||
IDCardStatus: userDoctor.Status,
|
IDCardStatus: userDoctor.Status,
|
||||||
IdenAuthStatus: userDoctor.IdenAuthStatus,
|
IdenAuthStatus: userDoctor.IdenAuthStatus,
|
||||||
IdenAuthTime: userDoctor.IdenAuthTime,
|
IdenAuthTime: userDoctor.IdenAuthTime,
|
||||||
IdenAuthFailReason: IdenAuthFailReason,
|
IdenAuthFailReason: IdenAuthFailReason,
|
||||||
Avatar: utils.AddOssDomain(userDoctor.Avatar),
|
Avatar: utils.AddOssDomain(userDoctor.Avatar),
|
||||||
DoctorTitle: userDoctor.DoctorTitle,
|
DoctorTitle: userDoctor.DoctorTitle,
|
||||||
DepartmentCustomID: strconv.Itoa(int(userDoctor.DepartmentCustomId)),
|
DepartmentCustomID: strconv.Itoa(int(userDoctor.DepartmentCustomId)),
|
||||||
DepartmentCustomName: userDoctor.DepartmentCustomName,
|
DepartmentCustomName: userDoctor.DepartmentCustomName,
|
||||||
DepartmentCustomMobile: userDoctor.DepartmentCustomMobile,
|
DepartmentCustomMobile: userDoctor.DepartmentCustomMobile,
|
||||||
HospitalID: strconv.Itoa(int(userDoctor.HospitalID)),
|
HospitalID: strconv.Itoa(int(userDoctor.HospitalID)),
|
||||||
BeGoodAt: userDoctor.BeGoodAt,
|
BeGoodAt: userDoctor.BeGoodAt,
|
||||||
BriefIntroduction: userDoctor.BriefIntroduction,
|
BriefIntroduction: userDoctor.BriefIntroduction,
|
||||||
CreatedAt: userDoctor.CreatedAt,
|
IsPlatformDeepCooperation: userDoctor.IsPlatformDeepCooperation,
|
||||||
UpdatedAt: userDoctor.UpdatedAt,
|
IsEnterpriseDeepCooperation: userDoctor.IsEnterpriseDeepCooperation,
|
||||||
User: user,
|
IsSysDiagnoCooperation: userDoctor.IsSysDiagnoCooperation,
|
||||||
Hospital: hospital,
|
IsRecommend: userDoctor.IsRecommend,
|
||||||
UserDoctorInfo: userDoctorInfo,
|
CreatedAt: userDoctor.CreatedAt,
|
||||||
DoctorExpertise: doctorExpertise, // 专长
|
UpdatedAt: userDoctor.UpdatedAt,
|
||||||
|
User: user,
|
||||||
|
Hospital: hospital,
|
||||||
|
UserDoctorInfo: userDoctorInfo,
|
||||||
|
DoctorExpertise: doctorExpertise, // 专长
|
||||||
}
|
}
|
||||||
|
|
||||||
return g, nil
|
return g, nil
|
||||||
@ -1259,6 +1263,10 @@ func (r *UserDoctorService) PutMulti(doctorId int64, req requests.PutMulti) (boo
|
|||||||
return false, errors.New("已审核成功,无法进行操作")
|
return false, errors.New("已审核成功,无法进行操作")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if userDoctor.IdenAuthStatus != 1 {
|
||||||
|
return false, errors.New("请先通过身份认证")
|
||||||
|
}
|
||||||
|
|
||||||
userDoctorData := make(map[string]interface{}) // 医生数据
|
userDoctorData := make(map[string]interface{}) // 医生数据
|
||||||
|
|
||||||
if userDoctor.MultiPointStatus == req.MultiPointStatus {
|
if userDoctor.MultiPointStatus == req.MultiPointStatus {
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"hospital-admin-api/config"
|
"hospital-admin-api/config"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -102,11 +103,12 @@ func postRequest(requestUrl string, formData url.Values, signature string) (map[
|
|||||||
body := make(map[string]interface{})
|
body := make(map[string]interface{})
|
||||||
if response.Body != nil || response.Body != "" {
|
if response.Body != nil || response.Body != "" {
|
||||||
bodyMap, ok := response.Body.(map[string]interface{})
|
bodyMap, ok := response.Body.(map[string]interface{})
|
||||||
if !ok {
|
if ok {
|
||||||
body = bodyMap
|
body = bodyMap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Println(body)
|
||||||
if len(body) == 0 {
|
if len(body) == 0 {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,7 @@ func EditCloudCert(d *EditCloudCertRequestData) (*EditCloudCertResponse, error)
|
|||||||
requestDataMap["orgName"] = d.OrgName
|
requestDataMap["orgName"] = d.OrgName
|
||||||
requestDataMap["orgNumber"] = d.OrgNumber
|
requestDataMap["orgNumber"] = d.OrgNumber
|
||||||
requestDataMap["pin"] = d.Pin
|
requestDataMap["pin"] = d.Pin
|
||||||
|
requestDataMap["orgDept"] = d.OrgDept
|
||||||
requestDataMap["province"] = d.Province
|
requestDataMap["province"] = d.Province
|
||||||
requestDataMap["locality"] = d.Locality
|
requestDataMap["locality"] = d.Locality
|
||||||
requestDataMap["authType"] = d.AuthType
|
requestDataMap["authType"] = d.AuthType
|
||||||
@ -114,6 +115,7 @@ func EditCloudCert(d *EditCloudCertRequestData) (*EditCloudCertResponse, error)
|
|||||||
formData.Set("orgName", d.OrgName)
|
formData.Set("orgName", d.OrgName)
|
||||||
formData.Set("orgNumber", d.OrgNumber)
|
formData.Set("orgNumber", d.OrgNumber)
|
||||||
formData.Set("pin", d.Pin)
|
formData.Set("pin", d.Pin)
|
||||||
|
formData.Set("orgDept", d.OrgDept)
|
||||||
formData.Set("province", d.Province)
|
formData.Set("province", d.Province)
|
||||||
formData.Set("locality", d.Locality)
|
formData.Set("locality", d.Locality)
|
||||||
formData.Set("authType", d.AuthType)
|
formData.Set("authType", d.AuthType)
|
||||||
@ -136,12 +138,12 @@ func EditCloudCert(d *EditCloudCertRequestData) (*EditCloudCertResponse, error)
|
|||||||
|
|
||||||
certP7, ok := response["certP7"]
|
certP7, ok := response["certP7"]
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, errors.New("返回数据错误")
|
return nil, errors.New("返回数据错误1")
|
||||||
}
|
}
|
||||||
|
|
||||||
certSerialnumber, ok := response["certSerialnumber"]
|
certSerialnumber, ok := response["certSerialnumber"]
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, errors.New("返回数据错误")
|
return nil, errors.New("返回数据错误2")
|
||||||
}
|
}
|
||||||
|
|
||||||
result := &EditCloudCertResponse{
|
result := &EditCloudCertResponse{
|
||||||
@ -168,6 +170,7 @@ func AddCloudCert(d *AddCloudCertRequest) (*AddCloudCertResponse, error) {
|
|||||||
requestDataMap["orgName"] = d.OrgName
|
requestDataMap["orgName"] = d.OrgName
|
||||||
requestDataMap["orgNumber"] = d.OrgNumber
|
requestDataMap["orgNumber"] = d.OrgNumber
|
||||||
requestDataMap["pin"] = d.Pin
|
requestDataMap["pin"] = d.Pin
|
||||||
|
requestDataMap["orgDept"] = d.OrgDept
|
||||||
requestDataMap["province"] = d.Province
|
requestDataMap["province"] = d.Province
|
||||||
requestDataMap["locality"] = d.Locality
|
requestDataMap["locality"] = d.Locality
|
||||||
requestDataMap["authType"] = d.AuthType
|
requestDataMap["authType"] = d.AuthType
|
||||||
@ -189,6 +192,7 @@ func AddCloudCert(d *AddCloudCertRequest) (*AddCloudCertResponse, error) {
|
|||||||
formData.Set("orgName", d.OrgName)
|
formData.Set("orgName", d.OrgName)
|
||||||
formData.Set("orgNumber", d.OrgNumber)
|
formData.Set("orgNumber", d.OrgNumber)
|
||||||
formData.Set("pin", d.Pin)
|
formData.Set("pin", d.Pin)
|
||||||
|
formData.Set("orgDept", d.OrgDept)
|
||||||
formData.Set("province", d.Province)
|
formData.Set("province", d.Province)
|
||||||
formData.Set("locality", d.Locality)
|
formData.Set("locality", d.Locality)
|
||||||
formData.Set("authType", d.AuthType)
|
formData.Set("authType", d.AuthType)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user