cy
2023-11-30 d57e7e224382c953e904094bff8823106fd5b214
consum-base/src/main/java/com/consum/base/service/LWhFormTransferCoreService.java
@@ -127,6 +127,10 @@
        String nickName = currentUser.getNick_name();
        // 出库单流水id
        Long outWarehouseFlowId = lWhFormTransfer.getOutWarehouseFlowId();
        if (outWarehouseFlowId == null){
            log.error("调拨失败!未找到出库单");
            return;
        }
        // 入库仓库类型 0机构1部门
        Integer inWarehouseType = lWhFormTransfer.getInWarehouseType();
        Long inWarehouseId = lWhFormTransfer.getInWarehouseId();
@@ -183,6 +187,10 @@
            synchronized (warehouseModelLockObj) {
                // 根据出库流水ID 查询 出库的物品ID
                outGoodsIds = getGoodsidByFlowId(outWarehouseFlowId, oldRecordId);
                if (CollectionUtils.isEmpty(outGoodsIds)){
                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                    throw new RuntimeException("入库单失败,未查询到物品!");
                }
                // 库存物品详情(L_WH_GOODS)中 状态设置为1
                lWhGoodsService.modGoodsTransfering(outGoodsIds, inWarehouseType, inWarehouseId, inWarehouseName, goodsStatus);