From dc7e3c1de8fb3dc4dca2672d565c710d70aaba24 Mon Sep 17 00:00:00 2001 From: guanyu Date: Fri, 24 Apr 2026 15:17:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Bug=20#432=20=E9=97=A8=E8=AF=8A=E6=89=8B?= =?UTF-8?q?=E6=9C=AF=E5=AE=89=E6=8E=92=E6=96=B0=E5=A2=9E=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20-=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=94=A8=E6=88=B7null=E6=A0=A1=E9=AA=8C=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E5=AF=BC=E8=87=B4NPE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appservice/impl/SurgicalScheduleAppServiceImpl.java | 8 +++++--- .../mapper/datadictionary/ItemDefinitionAppMapper.xml | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/clinicalmanage/appservice/impl/SurgicalScheduleAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/clinicalmanage/appservice/impl/SurgicalScheduleAppServiceImpl.java index 26fee113..b96d2c07 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/clinicalmanage/appservice/impl/SurgicalScheduleAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/clinicalmanage/appservice/impl/SurgicalScheduleAppServiceImpl.java @@ -136,9 +136,11 @@ public class SurgicalScheduleAppServiceImpl implements ISurgicalScheduleAppServi } } - LoginUser loginUser = new LoginUser(); - //获取当前登录用户信息 - loginUser = SecurityUtils.getLoginUser(); + // Bug #432 修复:获取当前登录用户信息,增加null校验防止NPE + LoginUser loginUser = SecurityUtils.getLoginUser(); + if (loginUser == null) { + return R.fail("用户未登录或登录已过期"); + } // 当前登录用户ID Long userId = loginUser.getUserId(); diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/datadictionary/ItemDefinitionAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/datadictionary/ItemDefinitionAppMapper.xml index faec20e5..640e3c74 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/datadictionary/ItemDefinitionAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/datadictionary/ItemDefinitionAppMapper.xml @@ -34,13 +34,13 @@ AND T2.delete_flag = '0' WHERE T1.delete_flag = '0' - + AND T1.instance_table = #{MED_MEDICATION_DEFINITION} - + AND T1.instance_table = #{ADM_DEVICE_DEFINITION} - + AND (T1.instance_table = #{WOR_ACTIVITY_DEFINITION} OR T1.instance_table = #{ADM_HEALTHCARE_SERVICE}) GROUP BY T1.tenant_id,