From 8deefd2cb15c4bfa1fc90e2185a9749cd67513db Mon Sep 17 00:00:00 2001 From: yangkexiang <1677036288@qq.com> Date: Thu, 9 Apr 2026 18:15:26 +0800 Subject: [PATCH] =?UTF-8?q?bug338:=E9=97=A8=E8=AF=8A=E5=88=92=E4=BB=B7?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=B6=E6=9C=AA=E6=A0=A1=E9=AA=8C=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E5=B0=B1=E8=AF=8A=E8=AE=B0=E5=BD=95=E5=8F=8A=E8=AF=8A?= =?UTF-8?q?=E6=96=AD=E8=AE=B0=E5=BD=95=EF=BC=8C=E6=9C=AA=E6=8E=A5=E8=AF=8A?= =?UTF-8?q?=E6=82=A3=E8=80=85=E4=B9=9F=E5=8F=AF=E6=96=B0=E5=A2=9E=E5=88=92?= =?UTF-8?q?=E4=BB=B7=E9=A1=B9=E7=9B=AE=E3=80=82=20bug339:=E3=80=90?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=95=86=E5=93=81=E6=98=8E=E7=BB=86=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8A=A5=E8=A1=A8=E3=80=91=E2=80=9C=E8=8D=AF=E6=88=BF?= =?UTF-8?q?=E2=80=9D=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=E5=A4=B1=E6=95=88?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E7=BB=93=E6=9E=9C=E4=B8=AD=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E9=9D=9E=E9=80=89=E4=B8=AD=E8=8D=AF=E6=88=BF=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InventoryProductReportAppServiceImpl.java | 9 +- .../InventoryProductReportSearchParam.java | 3 + .../mapper/InventoryProductReportMapper.java | 3 +- .../InventoryProductReportMapper.xml | 12 ++- .../clinicmanagement/bargain/component/api.js | 20 ++++ .../bargain/component/prescriptionlist.vue | 98 ++++++++++++++++--- .../inventoryProductDetails.vue | 4 +- 7 files changed, 131 insertions(+), 18 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/appservice/impl/InventoryProductReportAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/appservice/impl/InventoryProductReportAppServiceImpl.java index cbd882dd..2d972e1a 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/appservice/impl/InventoryProductReportAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/appservice/impl/InventoryProductReportAppServiceImpl.java @@ -68,6 +68,9 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe // 库存范围 Integer inventoryScope = inventoryProductReportSearchParam.getInventoryScope(); inventoryProductReportSearchParam.setInventoryScope(null); + // 药房:在 XML 内层按 wor_inventory_item.location_id 过滤,不能走外层 ew(子查询结果列不含 location_id) + Long purposeLocationId = inventoryProductReportSearchParam.getPurposeLocationId(); + inventoryProductReportSearchParam.setPurposeLocationId(null); // 设置模糊查询的字段名 HashSet searchFields = new HashSet<>(); @@ -80,7 +83,7 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe // 查询库存商品明细分页列表 Page productReportPage = inventoryProductReportMapper.selectProductReportPage( new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString(), - inventoryScope); + inventoryScope, purposeLocationId); productReportPage.getRecords().forEach(e -> { // 药品类型 @@ -110,6 +113,8 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe // 库存范围 Integer inventoryScope = inventoryProductReportSearchParam.getInventoryScope(); inventoryProductReportSearchParam.setInventoryScope(null); + Long purposeLocationId = inventoryProductReportSearchParam.getPurposeLocationId(); + inventoryProductReportSearchParam.setPurposeLocationId(null); // 设置模糊查询的字段名 HashSet searchFields = new HashSet<>(); @@ -122,7 +127,7 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe // 查询库存商品明细分页列表 Page productReportPage = inventoryProductReportMapper.selectProductReportPage( new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString(), - inventoryScope); + inventoryScope, purposeLocationId); productReportPage.getRecords().forEach(e -> { // 药品类型 diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/dto/InventoryProductReportSearchParam.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/dto/InventoryProductReportSearchParam.java index 0e541cd7..28241b3b 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/dto/InventoryProductReportSearchParam.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/dto/InventoryProductReportSearchParam.java @@ -33,6 +33,9 @@ public class InventoryProductReportSearchParam { /** 药房类型 */ private Integer purposeTypeEnum; + /** 药房/库房位置(对应 wor_inventory_item.location_id、adm_location.id) */ + private Long purposeLocationId; + /** 库存范围 */ private Integer inventoryScope; diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/mapper/InventoryProductReportMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/mapper/InventoryProductReportMapper.java index 6bffd0f6..1057a9fa 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/mapper/InventoryProductReportMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/reportmanage/mapper/InventoryProductReportMapper.java @@ -32,5 +32,6 @@ public interface InventoryProductReportMapper { Page selectProductReportPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper, @Param("lotNumber") String lotNumber, - @Param("inventoryScope") Integer inventoryScope); + @Param("inventoryScope") Integer inventoryScope, + @Param("purposeLocationId") Long purposeLocationId); } diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/reportmanage/InventoryProductReportMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/reportmanage/InventoryProductReportMapper.xml index e42767ca..98b07a93 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/reportmanage/InventoryProductReportMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/reportmanage/InventoryProductReportMapper.xml @@ -66,7 +66,11 @@ LEFT JOIN adm_location T7 ON T1.location_store_id = T7.id AND T7.delete_flag = '0' - WHERE T1.delete_flag = '0') AS T8 + WHERE T1.delete_flag = '0' + + AND T1.location_id = #{purposeLocationId} + + ) AS T8 UNION SELECT T10.id, --ID T10.bus_no, --器材编码 @@ -129,7 +133,11 @@ LEFT JOIN adm_location T7 ON T1.location_store_id = T7.id AND T7.delete_flag = '0' - WHERE T1.delete_flag = '0') AS T10 + WHERE T1.delete_flag = '0' + + AND T1.location_id = #{purposeLocationId} + + ) AS T10 ) AS combined_result diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/api.js b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/api.js index 494c2330..1aff1fdc 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/api.js +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/api.js @@ -61,6 +61,26 @@ export function getPrescriptionList(encounterId) { method: 'get', }) } + +/** + * 门诊病历详情(与医生站一致,无记录时 data 为 null) + */ +export function getEmrDetail(encounterId) { + return request({ + url: '/doctor-station/emr/emr-detail?encounterId=' + encounterId, + method: 'get', + }) +} + +/** + * 当前就诊诊断列表 + */ +export function getEncounterDiagnosis(encounterId) { + return request({ + url: '/doctor-station/diagnosis/get-encounter-diagnosis?encounterId=' + encounterId, + method: 'get', + }) +} /** * 获取科室列表 */ diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue index 911d8b4e..aa662dca 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue @@ -335,7 +335,15 @@