| | |
| | | if (StringUtils.isEmpty(param.getWarehouseName())) { |
| | | return ResponseValue.error("仓库名称为空"); |
| | | } |
| | | // TODO 加权限 省级管理员录入所有仓库信息 |
| | | Long agencyId = param.getAgencyId(); |
| | | BaseWarehouse baseWarehouse = new BaseWarehouse(); |
| | | baseWarehouse.setAgencyId(agencyId); |
| | | List<BaseWarehouse> select = baseWarehouseService.select(baseWarehouse); |
| | | if (!CollectionUtils.isEmpty(select)) { |
| | | return ResponseValue.error("该机构已有仓库不能继续新增!"); |
| | | } |
| | | |
| | | int result = baseWarehouseService.add(param); |
| | | if (result > 0) { |
| | |
| | | if (agencyId == null) { |
| | | return ResponseValue.success(new ArrayList<>()); |
| | | } |
| | | List<BaseWarehouse> list = baseWarehouseService.getBaseWareHouseList(agencyId, null, null); |
| | | List<BaseWarehouse> list = baseWarehouseService.getBaseWareHouseList(agencyId, null); |
| | | if (list == null) { |
| | | return ResponseValue.error("查询失败!"); |
| | | } |
| | |
| | | warehouseQry = param2; |
| | | |
| | | Long agencyId = warehouseQry.getAgencyId(); |
| | | List<BaseWarehouse> baseWarehouseList = baseWarehouseService.getBaseWareHouseList(agencyId, null, (short)1); |
| | | List<BaseWarehouse> baseWarehouseList = baseWarehouseService.getBaseWareHouseList(agencyId, (short)1); |
| | | List<Long> warehouseIdList = baseWarehouseList.stream().map(BaseWarehouse::getId).collect(Collectors.toList()); |
| | | |
| | | Long baseGoodsModelsId = warehouseQry.getBaseGoodsModelsId(); |