修改报表管理-》院内库房情况查询报表-》库存商品明细查询报表,选择库存范围条件检索报错。
This commit is contained in:
@@ -68,6 +68,11 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
|
||||
public R<?> getPage(InventoryProductReportSearchParam inventoryProductReportSearchParam, Integer pageNo,
|
||||
Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||
|
||||
// 数据初始化,不使用eq条件拼接
|
||||
// 库存范围
|
||||
Integer inventoryScope = inventoryProductReportSearchParam.getInventoryScope();
|
||||
inventoryProductReportSearchParam.setInventoryScope(null);
|
||||
|
||||
// 设置模糊查询的字段名
|
||||
HashSet<String> searchFields = new HashSet<>();
|
||||
searchFields.add(CommonConstants.FieldName.BusNo);
|
||||
@@ -76,6 +81,19 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
|
||||
QueryWrapper<InventoryProductReportSearchParam> queryWrapper =
|
||||
HisQueryUtils.buildQueryWrapper(inventoryProductReportSearchParam, searchKey, searchFields, request);
|
||||
|
||||
// 库存范围:无限制(1)、数量等于0(2)、数量大于0(3)、数量小于等于20(4)、数量小于等于50(5)
|
||||
if (inventoryScope != null) {
|
||||
if (inventoryScope.equals(2)) {
|
||||
queryWrapper.eq("item_quantity", 0);
|
||||
} else if (inventoryScope.equals(3)) {
|
||||
queryWrapper.gt("item_quantity", 0);
|
||||
} else if (inventoryScope.equals(4)) {
|
||||
queryWrapper.le("item_quantity", 20);
|
||||
} else if (inventoryScope.equals(5)) {
|
||||
queryWrapper.le("item_quantity", 50);
|
||||
}
|
||||
}
|
||||
|
||||
// 查询库存商品明细分页列表
|
||||
Page<InventoryProductReportPageDto> productReportPage = inventoryProductReportMapper.selectProductReportPage(
|
||||
new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString());
|
||||
@@ -104,6 +122,11 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
|
||||
Integer pageSize, String searchKey, HttpServletRequest request, HttpServletResponse response) {
|
||||
pageNo = 1;
|
||||
pageSize = 10000;
|
||||
// 数据初始化,不使用eq条件拼接
|
||||
// 库存范围
|
||||
Integer inventoryScope = inventoryProductReportSearchParam.getInventoryScope();
|
||||
inventoryProductReportSearchParam.setInventoryScope(null);
|
||||
|
||||
// 设置模糊查询的字段名
|
||||
HashSet<String> searchFields = new HashSet<>();
|
||||
searchFields.add(CommonConstants.FieldName.BusNo);
|
||||
@@ -112,6 +135,19 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
|
||||
QueryWrapper<InventoryProductReportSearchParam> queryWrapper =
|
||||
HisQueryUtils.buildQueryWrapper(inventoryProductReportSearchParam, searchKey, searchFields, request);
|
||||
|
||||
// 库存范围:无限制(1)、数量等于0(2)、数量大于0(3)、数量小于等于20(4)、数量小于等于50(5)
|
||||
if (inventoryScope != null) {
|
||||
if (inventoryScope.equals(2)) {
|
||||
queryWrapper.eq("item_quantity", 0);
|
||||
} else if (inventoryScope.equals(3)) {
|
||||
queryWrapper.gt("item_quantity", 0);
|
||||
} else if (inventoryScope.equals(4)) {
|
||||
queryWrapper.le("item_quantity", 20);
|
||||
} else if (inventoryScope.equals(5)) {
|
||||
queryWrapper.le("item_quantity", 50);
|
||||
}
|
||||
}
|
||||
|
||||
// 查询库存商品明细分页列表
|
||||
Page<InventoryProductReportPageDto> productReportPage = inventoryProductReportMapper.selectProductReportPage(
|
||||
new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString());
|
||||
|
||||
Reference in New Issue
Block a user