bug338:门诊划价新增时未校验当前就诊记录及诊断记录,未接诊患者也可新增划价项目。
bug339:【库存商品明细查询报表】“药房”筛选条件失效,查询结果中包含非选中药房的数据
This commit is contained in:
@@ -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<String> searchFields = new HashSet<>();
|
||||
@@ -80,7 +83,7 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
|
||||
// 查询库存商品明细分页列表
|
||||
Page<InventoryProductReportPageDto> 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<String> searchFields = new HashSet<>();
|
||||
@@ -122,7 +127,7 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
|
||||
// 查询库存商品明细分页列表
|
||||
Page<InventoryProductReportPageDto> productReportPage = inventoryProductReportMapper.selectProductReportPage(
|
||||
new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString(),
|
||||
inventoryScope);
|
||||
inventoryScope, purposeLocationId);
|
||||
|
||||
productReportPage.getRecords().forEach(e -> {
|
||||
// 药品类型
|
||||
|
||||
@@ -33,6 +33,9 @@ public class InventoryProductReportSearchParam {
|
||||
/** 药房类型 */
|
||||
private Integer purposeTypeEnum;
|
||||
|
||||
/** 药房/库房位置(对应 wor_inventory_item.location_id、adm_location.id) */
|
||||
private Long purposeLocationId;
|
||||
|
||||
/** 库存范围 */
|
||||
private Integer inventoryScope;
|
||||
|
||||
|
||||
@@ -32,5 +32,6 @@ public interface InventoryProductReportMapper {
|
||||
Page<InventoryProductReportPageDto> selectProductReportPage(@Param("page") Page<InventoryProductReportPageDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<InventoryProductReportSearchParam> queryWrapper,
|
||||
@Param("lotNumber") String lotNumber,
|
||||
@Param("inventoryScope") Integer inventoryScope);
|
||||
@Param("inventoryScope") Integer inventoryScope,
|
||||
@Param("purposeLocationId") Long purposeLocationId);
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
<if test="purposeLocationId != null">
|
||||
AND T1.location_id = #{purposeLocationId}
|
||||
</if>
|
||||
) 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'
|
||||
<if test="purposeLocationId != null">
|
||||
AND T1.location_id = #{purposeLocationId}
|
||||
</if>
|
||||
) AS T10
|
||||
) AS combined_result
|
||||
<where>
|
||||
<if test="inventoryScope != null">
|
||||
|
||||
Reference in New Issue
Block a user