自动化立体仓库 - WMS系统
ZY
2024-09-21 01824c5104590b96a3040faa317969bcd812bcca
src/main/java/com/zy/third/erp/task/ERPInOrOutService.java
@@ -57,7 +57,7 @@
        // 如果单据不存在则添加;如果单据存在,作业中无法修改,反之则修改单据
        if (!Cools.isEmpty(order)) {
            if (order.getSettle() > 1L) {
                throw new CoolException(inHedTB.getBillNo() + "正在出库,无法修改单据");
                throw new CoolException(inHedTB.getBillNo() + "正在入库,无法修改单据");
            }
            orderService.remove(order.getId());
        }
@@ -67,7 +67,7 @@
        order = new Order(
                String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
                inHedTB.getBillNo(),    // 订单编号
                DateUtils.convert(inHedTB.getMakeDate()),    // 单据日期
                DateUtils.convert(inHedTB.getBillDate()),    // 单据日期
                docType.getDocId(),    // 单据类型
                null,    // 项目编号
                null,    //
@@ -143,6 +143,7 @@
            if (!orderDetlService.insert(orderDetl)) {
                throw new CoolException("生成单据明细失败,请联系管理员");
            }
            log.info("入库单据成功详情,{}", orderDetl);
        }
        return true;
    }
@@ -244,6 +245,7 @@
            if (!orderDetlService.insert(orderDetl)) {
                throw new CoolException("生成单据明细失败,请联系管理员");
            }
            log.info("出库单据成功详情,{}", orderDetl);
        }
        return true;
    }