Commit 709b3987 authored by zhengyi's avatar zhengyi

海空运出货列表查询bug修复

parent a0e9e33b
...@@ -153,6 +153,8 @@ public interface WarehouseService { ...@@ -153,6 +153,8 @@ public interface WarehouseService {
*/ */
List<WarehouseDO> findByCountryIdList(List<Long> countryIdList); List<WarehouseDO> findByCountryIdList(List<Long> countryIdList);
List<WarehouseDO> findByCountryIdListAndCityIdList(List<Long> countryIdList, List<Long> cityIdList);
List<WarehouseDO> getByIdList(List<Long> idList); List<WarehouseDO> getByIdList(List<Long> idList);
List<WarehouseDO> getAvailableWarehouseAdjustmentList(Long id); List<WarehouseDO> getAvailableWarehouseAdjustmentList(Long id);
......
...@@ -444,6 +444,14 @@ public class WarehouseServiceImpl implements WarehouseService { ...@@ -444,6 +444,14 @@ public class WarehouseServiceImpl implements WarehouseService {
); );
} }
@Override
public List<WarehouseDO> findByCountryIdListAndCityIdList(List<Long> countryIdList, List<Long> cityIdList) {
return warehouseMapper.selectList(new LambdaQueryWrapperX<WarehouseDO>()
.in(StringUtils.isNotEmpty(countryIdList), WarehouseDO::getGuojia, countryIdList)
.in(StringUtils.isNotEmpty(cityIdList), WarehouseDO::getShi, cityIdList)
);
}
@Override @Override
public List<WarehouseDO> getAvailableWarehouseAdjustmentList(Long id) { public List<WarehouseDO> getAvailableWarehouseAdjustmentList(Long id) {
WarehouseDO currentWarehouseDO = warehouseMapper.selectById(id); WarehouseDO currentWarehouseDO = warehouseMapper.selectById(id);
......
...@@ -1577,11 +1577,19 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements ...@@ -1577,11 +1577,19 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
warehouseIdList = warehouseList.stream().map(WarehouseDO::getId).collect(Collectors.toList()); warehouseIdList = warehouseList.stream().map(WarehouseDO::getId).collect(Collectors.toList());
query.setWarehouseIdList(warehouseIdList); query.setWarehouseIdList(warehouseIdList);
} }
if (CollectionUtil.isNotEmpty(query.getCountryIdList())) {
if (CollectionUtil.isNotEmpty(query.getCountryIdList()) || CollectionUtil.isNotEmpty(query.getDestCityIdList())) {
List<WarehouseDO> warehouseList = List<WarehouseDO> warehouseList =
warehouseService.findByCountryIdList(query.getCountryIdList()); warehouseService.findByCountryIdListAndCityIdList(query.getCountryIdList(), query.getDestCityIdList());
warehouseIdList = warehouseList.stream().map(WarehouseDO::getId).collect(Collectors.toList()); if (CollectionUtil.isNotEmpty(warehouseList)){
query.setWarehouseIdList(warehouseIdList); warehouseIdList = warehouseList.stream().map(WarehouseDO::getId).collect(Collectors.toList());
Set<Long> destWarehouseIdSet = new HashSet<>();
if (CollectionUtil.isNotEmpty(query.getDestWarehouseIdList())) {
destWarehouseIdSet.addAll(query.getDestWarehouseIdList());
}
destWarehouseIdSet.addAll(warehouseIdList);
query.setDestWarehouseIdList(new ArrayList<>(destWarehouseIdSet));
}
} }
//上面都是处理查询条件相关逻辑 //上面都是处理查询条件相关逻辑
return boxInfoQuery1(boxMapper.selectPage2(page, query), false); return boxInfoQuery1(boxMapper.selectPage2(page, query), false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment