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 @@