| | |
| | | |
| | | lWhFormTransfer.setBusinessFormCode(codeGeneratorService.createBusinessFormCode(codeGeneratorEnum)); |
| | | |
| | | Long warehouseId = param.getInWarehouseId(); |
| | | // 调拨类型单据 |
| | | if (businessType == TransferBusinessType.STOCK_TRANSFER.getValue()) { |
| | | // 入库仓库为当前用户的默认仓库 |
| | |
| | | if (finSysTenant == null) { |
| | | log.error("调拨机构不存在"); |
| | | } |
| | | lWhFormTransfer.setOutAgencyId(finSysTenant.getId()); |
| | | Long outAgencyId = finSysTenant.getId(); |
| | | lWhFormTransfer.setOutAgencyId(outAgencyId); |
| | | lWhFormTransfer.setOutAgencyName(finSysTenant.getName()); |
| | | lWhFormTransfer.setOperatorId(sysInfo.getId()); |
| | | lWhFormTransfer.setOperatorName(sysInfo.getUserName()); |
| | |
| | | if (businessType == TransferBusinessType.STOCK_TRANSFER.getValue()) { |
| | | lWhProcureModel.setBusinessType(2); |
| | | // 根据物品型号查询物品库存 |
| | | int goodsNum = lWhGoodsService.queryGoodsModelNum(0, warehouseId, baseGoodsModelsId, 1, null); |
| | | // 调拨申请时没有仓库id 查询上级机构的所有仓库 |
| | | List<BaseWarehouse> baseWareHouseList = |
| | | baseWarehouseService.getBaseWareHouseList(outAgencyId, null, (short)1); |
| | | List<Long> warehouseIdList = |
| | | baseWareHouseList.stream().map(BaseWarehouse::getId).collect(Collectors.toList()); |
| | | int goodsNum = lWhGoodsService.queryGoodsModelNum(0, warehouseIdList, baseGoodsModelsId, 1, null); |
| | | lWhProcureModel.setWorehouseCount(goodsNum); |
| | | } |
| | | if (businessType == TransferBusinessType.DEPARTMENT_PROCURE.getValue()) { |