From 1525740ab5a3beec8c89ea4d6c6525ea5a92391b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Thu, 14 May 2026 00:05:47 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#435:=20=E9=97=A8=E8=AF=8A=E6=89=8B?= =?UTF-8?q?=E6=9C=AF=E5=AE=89=E6=8E=92=E7=BC=96=E8=BE=91=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E8=B4=B9=E7=94=A8=E7=B1=BB=E5=88=AB=E5=AD=97=E6=AE=B5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9C=AA=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:op_schedule 表缺少 fee_type 字段,导致编辑时无法从数据库读取费用类别。 - 新增 fee_type 列到 op_schedule 表并回填历史数据 - OpSchedule 实体类新增 feeType 字段 - 详情查询SQL改为直接从 op_schedule.fee_type 读取,替代原脆弱的 fin_contract 关联链 Co-Authored-By: Claude Opus 4.7 --- .../mapper/clinicalmanage/SurgicalScheduleAppMapper.xml | 5 +---- .../java/com/openhis/surgicalschedule/domain/OpSchedule.java | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/clinicalmanage/SurgicalScheduleAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/clinicalmanage/SurgicalScheduleAppMapper.xml index 42c1a6d50..305c3e8e3 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/clinicalmanage/SurgicalScheduleAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/clinicalmanage/SurgicalScheduleAppMapper.xml @@ -89,15 +89,12 @@ cs.apply_doctor_name AS apply_doctor_name, drf.create_time AS apply_time, os.surgery_nature AS surgeryType, - fc.contract_name AS feeType, + os.fee_type AS feeType, COALESCE(pi.identifier_no, ap.bus_no, '') AS identifierNo FROM op_schedule os LEFT JOIN adm_patient ap ON os.patient_id = ap.id INNER JOIN cli_surgery cs ON os.oper_code = cs.surgery_no AND cs.delete_flag = '0' LEFT JOIN adm_organization o ON cs.org_id = o.id - LEFT JOIN adm_encounter ae ON ae.id = cs.encounter_id AND ae.delete_flag = '0' - LEFT JOIN adm_account aa ON aa.encounter_id = ae.id AND aa.delete_flag = '0' - LEFT JOIN fin_contract fc ON fc.bus_no = aa.contract_no AND fc.delete_flag = '0' LEFT JOIN doc_request_form drf ON drf.prescription_no=cs.surgery_no LEFT JOIN ( SELECT patient_id, identifier_no diff --git a/openhis-server-new/openhis-domain/src/main/java/com/openhis/surgicalschedule/domain/OpSchedule.java b/openhis-server-new/openhis-domain/src/main/java/com/openhis/surgicalschedule/domain/OpSchedule.java index 0846f921b..99936b218 100755 --- a/openhis-server-new/openhis-domain/src/main/java/com/openhis/surgicalschedule/domain/OpSchedule.java +++ b/openhis-server-new/openhis-domain/src/main/java/com/openhis/surgicalschedule/domain/OpSchedule.java @@ -193,6 +193,9 @@ public class OpSchedule extends HisBaseEntity { /** 外请专家姓名 */ private String externalExpertName; + /** 费用类别 */ + private String feeType; + /** 备注信息 */ private String remark;