From 256b986c0ed3da7b20f805d487cc4b92899f95ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Mon, 11 May 2026 14:03:40 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#477:=20=E4=BD=8F=E9=99=A2=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E7=94=B3=E8=AF=B7=E8=AF=A6=E6=83=85=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=B8=AD"=E5=8F=91=E5=BE=80=E7=A7=91=E5=AE=A4"?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA=E4=B8=BA=E7=9F=AD=E6=A8=AA?= =?UTF-8?q?=E7=BA=BF=EF=BC=88-=EF=BC=89=EF=BC=8C=E6=9C=AA=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E8=8E=B7=E5=8F=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:handleViewDetail 为同步方法,点击详情时 getLocationInfo 尚未返回, orgOptions 为空导致 recursionFun 无法将 targetDepartment ID 解析为科室名称。 修复: 1. 前端(4个申请组件):handleViewDetail 改为 async,解析 descJson 前确保 orgOptions 已加载 2. 前端:watch encounterId 改为 Promise.all 并行加载数据和科室列表 3. 后端:新增 keyword 关键字筛选参数(申请单号/检查项目模糊匹配) Co-Authored-By: Claude Opus 4.7 --- .../IRequestFormManageAppService.java | 15 ++++++- .../impl/RequestFormManageAppServiceImpl.java | 7 +-- .../RequestFormManageController.java | 6 ++- .../mapper/RequestFormManageAppMapper.java | 4 +- .../RequestFormManageAppMapper.xml | 10 +++++ .../bloodTtransfusionAapplication.vue | 19 ++++---- .../applicationShow/examineApplication.vue | 19 ++++---- .../applicationShow/surgeryApplication.vue | 19 ++++---- .../applicationShow/testApplication.vue | 44 ++++++++++++++----- 9 files changed, 100 insertions(+), 43 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/IRequestFormManageAppService.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/IRequestFormManageAppService.java index c972faa0..f67aeeee 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/IRequestFormManageAppService.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/IRequestFormManageAppService.java @@ -33,7 +33,7 @@ public interface IRequestFormManageAppService { List getRequestForm(Long encounterId, String typeCode); /** - * 查询申请单(支持筛选) + * 查询申请单(支持日期和状态筛选) * * @param encounterId 就诊id * @param typeCode 申请单类型 @@ -44,6 +44,19 @@ public interface IRequestFormManageAppService { */ List getRequestForm(Long encounterId, String typeCode, String startDate, String endDate, String status); + /** + * 查询申请单(支持日期、状态和关键字筛选) + * + * @param encounterId 就诊id + * @param typeCode 申请单类型 + * @param startDate 开始日期(可选,格式:yyyy-MM-dd) + * @param endDate 结束日期(可选,格式:yyyy-MM-dd) + * @param status 单据状态(可选) + * @param keyword 关键字(可选,申请单号/检查项目名称模糊匹配) + * @return 申请单列表 + */ + List getRequestForm(Long encounterId, String typeCode, String startDate, String endDate, String status, String keyword); + /** * 分页查询申请单 * diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java index d07df036..eb61dd26 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java @@ -415,7 +415,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer @Override public List getRequestForm(Long encounterId, String typeCode) { // 调用重载方法,不传筛选参数 - return getRequestForm(encounterId, typeCode, null, null, null); + return getRequestForm(encounterId, typeCode, null, null, null, null); } /** @@ -426,16 +426,17 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer * @param startDate 开始日期(可选,格式:yyyy-MM-dd) * @param endDate 结束日期(可选,格式:yyyy-MM-dd) * @param status 单据状态(可选) + * @param keyword 关键字(可选,申请单号/检查项目名称模糊匹配) * @return 申请单列表 */ @Override - public List getRequestForm(Long encounterId, String typeCode, String startDate, String endDate, String status) { + public List getRequestForm(Long encounterId, String typeCode, String startDate, String endDate, String status, String keyword) { // 检查参数 if (encounterId == null) { return new java.util.ArrayList<>(); // 返回空列表而不是查询数据库 } - List requestFormList = requestFormManageAppMapper.getRequestForm(encounterId, typeCode, startDate, endDate, status); + List requestFormList = requestFormManageAppMapper.getRequestForm(encounterId, typeCode, startDate, endDate, status, keyword); for (RequestFormQueryDto requestFormQueryDto : requestFormList) { // 查询处方详情 List requestFormDetail = diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/controller/RequestFormManageController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/controller/RequestFormManageController.java index 0ff63615..f135ff44 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/controller/RequestFormManageController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/controller/RequestFormManageController.java @@ -84,6 +84,7 @@ public class RequestFormManageController { * @param startDate 开始日期(可选,格式:yyyy-MM-dd) * @param endDate 结束日期(可选,格式:yyyy-MM-dd) * @param status 单据状态(可选) + * @param keyword 关键字(可选,申请单号/检查项目名称模糊匹配) * @return 检查申请单 */ @GetMapping(value = "/get-check") @@ -91,11 +92,12 @@ public class RequestFormManageController { @RequestParam(required = false) Long encounterId, @RequestParam(required = false) String startDate, @RequestParam(required = false) String endDate, - @RequestParam(required = false) String status) { + @RequestParam(required = false) String status, + @RequestParam(required = false) String keyword) { if (encounterId == null) { return R.fail("就诊ID不能为空"); } - return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.TEST.getCode(), startDate, endDate, status)); + return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.TEST.getCode(), startDate, endDate, status, keyword)); } /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/mapper/RequestFormManageAppMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/mapper/RequestFormManageAppMapper.java index 540689d1..fd0b8da5 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/mapper/RequestFormManageAppMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/mapper/RequestFormManageAppMapper.java @@ -37,13 +37,15 @@ public interface RequestFormManageAppMapper { * @param startDate 开始日期(可选,格式:yyyy-MM-dd) * @param endDate 结束日期(可选,格式:yyyy-MM-dd) * @param status 单据状态(可选) + * @param keyword 关键字(可选,申请单号/检查项目名称模糊匹配) * @return 申请单列表 */ List getRequestForm(@Param("encounterId") Long encounterId, @Param("typeCode") String typeCode, @Param("startDate") String startDate, @Param("endDate") String endDate, - @Param("status") String status); + @Param("status") String status, + @Param("keyword") String keyword); /** * 查询申请单详情 diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml index a32de713..fa786303 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml @@ -31,6 +31,16 @@ AND drf.status = #{status}::integer + + AND (drf.prescription_no LIKE CONCAT('%', #{keyword}, '%') + OR EXISTS ( + SELECT 1 FROM wor_service_request wsr_kw + LEFT JOIN wor_activity_definition wad_kw ON wad_kw.id = wsr_kw.activity_id + WHERE wsr_kw.prescription_no = drf.prescription_no + AND wsr_kw.delete_flag = '0' + AND wad_kw.name LIKE CONCAT('%', #{keyword}, '%') + )) +