From 174ab6140210b1430041bf875dbd02c665e0255a Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Tue, 21 Nov 2023 10:06:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=BB=E7=94=9F=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/service/export.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/api/service/export.go b/api/service/export.go index 4ff322f..a586ea9 100644 --- a/api/service/export.go +++ b/api/service/export.go @@ -73,6 +73,8 @@ type UserDoctorData struct { Avatar string // 头像 DoctorTitle string // 医生职称(1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师) DepartmentCustomName string // 科室名称(如未自己输入,填入标准科室名称) + DepartmentName string // 标准科室名称 + DepartmentCode string // 标准科室编码 DepartmentCustomMobile string // 科室电话 HospitalName string // 医院名称 ServedPatientsNum string // 服务患者数量(订单结束时统计) @@ -583,7 +585,9 @@ func (r *ExportService) UserDoctor(userDoctors []*model.UserDoctor) (string, err {Value: "首页推荐", CellType: "string", NumberFmt: "", ColWidth: 18}, {Value: "头像", CellType: "string", NumberFmt: "", ColWidth: 50}, {Value: "医生职称", CellType: "string", NumberFmt: "", ColWidth: 18}, - {Value: "科室名称", CellType: "string", NumberFmt: "", ColWidth: 18}, + {Value: "自定义科室名称", CellType: "string", NumberFmt: "", ColWidth: 20}, + {Value: "标准科室名称", CellType: "string", NumberFmt: "", ColWidth: 20}, + {Value: "标准科室编码", CellType: "string", NumberFmt: "", ColWidth: 20}, {Value: "科室电话", CellType: "string", NumberFmt: "", ColWidth: 18}, {Value: "医院名称", CellType: "string", NumberFmt: "", ColWidth: 35}, {Value: "服务患者数量", CellType: "string", NumberFmt: "", ColWidth: 18}, @@ -852,6 +856,18 @@ func (r *ExportService) UserDoctor(userDoctors []*model.UserDoctor) (string, err userDoctorData.InquiryType = strings.Join(inquiryTypes, ",") } } + + // 科室 + if v.DepartmentCustomId != 0 { + // 获取自定义科室数据 + hospitalDepartmentCustomDao := dao.HospitalDepartmentCustomDao{} + hospitalDepartmentCustom, _ := hospitalDepartmentCustomDao.GetHospitalDepartmentCustomById(v.DepartmentCustomId) + if hospitalDepartmentCustom != nil { + userDoctorData.DepartmentName = hospitalDepartmentCustom.DepartmentName + userDoctorData.DepartmentCode = hospitalDepartmentCustom.DepartmentCode + } + } + interfaceSlice = append(interfaceSlice, userDoctorData) }