新增问诊记录列表
This commit is contained in:
@@ -150,6 +150,55 @@ func GetOrderInquiryListDto(m []*model.OrderInquiry) []*OrderInquiryDto {
|
||||
return responses
|
||||
}
|
||||
|
||||
func GetOrderInquiryRecordListDto(m []*model.OrderInquiry) []*OrderInquiryDto {
|
||||
// 处理返回值
|
||||
responses := make([]*OrderInquiryDto, len(m))
|
||||
|
||||
if len(m) > 0 {
|
||||
for i, v := range m {
|
||||
response := &OrderInquiryDto{
|
||||
OrderInquiryId: fmt.Sprintf("%d", v.OrderInquiryId),
|
||||
UserId: fmt.Sprintf("%d", v.UserId),
|
||||
PatientId: fmt.Sprintf("%d", v.PatientId),
|
||||
DoctorId: fmt.Sprintf("%d", v.DoctorId),
|
||||
FamilyId: fmt.Sprintf("%d", v.FamilyId),
|
||||
InquiryType: v.InquiryType,
|
||||
InquiryMode: v.InquiryMode,
|
||||
InquiryStatus: v.InquiryStatus,
|
||||
IsDelete: v.IsDelete,
|
||||
InquiryRefundStatus: v.InquiryRefundStatus,
|
||||
InquiryPayChannel: v.InquiryPayChannel,
|
||||
InquiryPayStatus: v.InquiryPayStatus,
|
||||
InquiryNo: v.InquiryNo,
|
||||
EscrowTradeNo: v.EscrowTradeNo,
|
||||
ReceptionTime: v.ReceptionTime,
|
||||
CompleteTime: v.CompleteTime,
|
||||
FinishTime: v.FinishTime,
|
||||
CancelTime: v.CancelTime,
|
||||
CancelReason: v.CancelReason,
|
||||
CancelRemarks: v.CancelRemarks,
|
||||
PatientName: v.PatientName,
|
||||
PatientNameMask: v.PatientNameMask,
|
||||
PatientSex: v.PatientSex,
|
||||
PatientAge: v.PatientAge,
|
||||
PatientMobile: v.User.Mobile,
|
||||
CreatedAt: v.CreatedAt,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
}
|
||||
|
||||
// 加载医生名称
|
||||
if v.UserDoctor != nil {
|
||||
response = response.LoadDoctorName(v.UserDoctor)
|
||||
}
|
||||
|
||||
// 将转换后的结构体添加到新切片中
|
||||
responses[i] = response
|
||||
}
|
||||
}
|
||||
|
||||
return responses
|
||||
}
|
||||
|
||||
// LoadDoctorName 加载医生名称
|
||||
func (r *OrderInquiryDto) LoadDoctorName(m *model.UserDoctor) *OrderInquiryDto {
|
||||
if m != nil {
|
||||
|
||||
Reference in New Issue
Block a user