|
|
|
@ -278,25 +278,20 @@ public class StockOrderController {
|
|
|
|
|
}
|
|
|
|
|
List<StockOrderEntity> stockOrderEntityList;
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(stockOrderFilterRequest.getCorpId())) {
|
|
|
|
|
Integer userId = customerService.getUserId();
|
|
|
|
|
stockOrderFilterRequest.setUnitIdFk(null);
|
|
|
|
|
stockOrderFilterRequest.setUserId(customerService.getUserId());
|
|
|
|
|
if (StrUtil.isNotEmpty(stockOrderFilterRequest.getLocStorageCode())) {
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseService.selectByCode(stockOrderFilterRequest.getLocStorageCode());
|
|
|
|
|
FilterInvUserRequest filterInvUserRequest = new FilterInvUserRequest();
|
|
|
|
|
filterInvUserRequest.setCode(invWarehouseEntity.getCode());
|
|
|
|
|
filterInvUserRequest.setUserid(userId.longValue());
|
|
|
|
|
filterInvUserRequest.setIsDirector(true);
|
|
|
|
|
List<WarehouseUserEntity> warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest);
|
|
|
|
|
if (CollUtil.isEmpty(warehouseUserEntities)) {
|
|
|
|
|
stockOrderFilterRequest.setUnionUser(userId);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "请先选择当前仓库");
|
|
|
|
|
}
|
|
|
|
|
stockOrderFilterRequest.setCorpId(null);
|
|
|
|
|
Integer userId = customerService.getUserId();
|
|
|
|
|
stockOrderFilterRequest.setUnitIdFk(null);
|
|
|
|
|
stockOrderFilterRequest.setUserId(customerService.getUserId());
|
|
|
|
|
if (StrUtil.isNotEmpty(stockOrderFilterRequest.getLocStorageCode())) {
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseService.selectByCode(stockOrderFilterRequest.getLocStorageCode());
|
|
|
|
|
FilterInvUserRequest filterInvUserRequest = new FilterInvUserRequest();
|
|
|
|
|
filterInvUserRequest.setCode(invWarehouseEntity.getCode());
|
|
|
|
|
filterInvUserRequest.setUserid(userId.longValue());
|
|
|
|
|
filterInvUserRequest.setIsDirector(true);
|
|
|
|
|
List<WarehouseUserEntity> warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest);
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "请先选择当前仓库");
|
|
|
|
|
}
|
|
|
|
|
stockOrderFilterRequest.setCorpId(null);
|
|
|
|
|
|
|
|
|
|
stockOrderEntityList = stockOrderService.filterListOr(stockOrderFilterRequest);
|
|
|
|
|
PageInfo<StockOrderEntity> pageInfo;
|
|
|
|
|