From 75f38dfd1ca34241d739fd4cf93842a018d53dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= Date: Fri, 29 May 2026 11:08:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(AdviceManageAppMapper):=20=E8=A1=A5?= =?UTF-8?q?=E5=85=85=203=20=E5=A4=84=20SQL=20=E7=BC=BA=E5=A4=B1=E9=80=97?= =?UTF-8?q?=E5=8F=B7=20=E2=80=94=20UNION=20ALL=20=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=B8=AD=20advice=5Fdefinition=5Fid=20=E5=90=8E=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=E9=80=97=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: - Bug #613 修复时在 AdviceManageAppMapper.xml 中新增了 advice_definition_id 字段 - 3 处 UNION ALL 子查询中该字段后缺少逗号,导致 SQL 语法错误 - Spring 启动时报 PersistenceException,系统无法启动 修复: - 第 1 子查询: medication_id AS advice_definition_id 后补逗号 - 第 2 子查询: device_def_id AS advice_definition_id 后补逗号 - 第 3 子查询: activity_id AS advice_definition_id 后补逗号 --- .../mapper/regdoctorstation/AdviceManageAppMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml index 4f043d89f..fc86b35cf 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/AdviceManageAppMapper.xml @@ -218,7 +218,7 @@ T1.therapy_enum AS therapyEnum, T1.sort_number AS sort_number, T1.based_on_id AS based_on_id, - T1.medication_id AS advice_definition_id + T1.medication_id AS advice_definition_id, T1.effective_dose_end AS stop_time, T1.update_by AS stop_user_name FROM med_medication_request AS T1 @@ -274,7 +274,7 @@ 99 AS sort_number, T1.req_authored_time AS start_time, T1.based_on_id AS based_on_id, - T1.device_def_id AS advice_definition_id + T1.device_def_id AS advice_definition_id, NULL AS stop_time, '' AS stop_user_name FROM wor_device_request AS T1 @@ -327,7 +327,7 @@ 99 AS sort_number, T1.occurrence_start_time AS start_time, T1.based_on_id AS based_on_id, - T1.activity_id AS advice_definition_id + T1.activity_id AS advice_definition_id, T1.occurrence_end_time AS stop_time, T1.update_by AS stop_user_name FROM wor_service_request AS T1