This commit is contained in:
haomingming 2026-01-06 17:24:05 +08:00
parent 9937ef8e0c
commit fce126bbbd

View File

@ -457,6 +457,9 @@ func (r *OrderPrescriptionDao) GetOrderTransferPrescriptionExportListSearch(req
// 关联抄方医生表
query = query.Joins("LEFT JOIN " + doctorTable + " ON " + inquiryTable + ".doctor_id = " + doctorTable + ".doctor_id")
// 关联抄方医生对应的用户表(用于按用户姓名查询)
query = query.Joins("LEFT JOIN " + userTable + " ON " + doctorTable + ".user_id = " + userTable + ".user_id")
// 患者表
query = query.Preload("UserPatient", func(db *gorm.DB) *gorm.DB {
return db.Omit("open_id", "union_id", "wx_session_key")