|
|
|
@ -226,11 +226,18 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
@Override |
|
|
|
|
public IPage<DistributionStockupEntity> pageList(IPage<Object> page, Map<String, Object> distributionStockup) { |
|
|
|
|
DistributionStockupEntity distributionStockupEntity = JSON.parseObject(JSON.toJSONString(distributionStockup), DistributionStockupEntity.class); |
|
|
|
|
//获取当前登录人仓库
|
|
|
|
|
List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); |
|
|
|
|
//取出id
|
|
|
|
|
List<Long> collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); |
|
|
|
|
distributionStockupEntity.setWarehouseIdList(collect); |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
if(ObjectUtils.isNotNull(myCurrentWarehouse)){ |
|
|
|
|
//获取当前登录人仓库
|
|
|
|
|
distributionStockupEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
}else{ |
|
|
|
|
//获取当前登录人仓库
|
|
|
|
|
List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); |
|
|
|
|
//取出id
|
|
|
|
|
List<Long> collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); |
|
|
|
|
distributionStockupEntity.setWarehouseIdList(collect); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
distributionStockupEntity.setTenantId(AuthUtil.getTenantId()); |
|
|
|
|
if (distributionStockupEntity.getTypeService().equals("3")) { |
|
|
|
|
return baseMapper.pageOweList(page, distributionStockupEntity); |
|
|
|
|