自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-04-23 b8975f62b72528006a840e63810f1644560ac4fd
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -316,6 +316,7 @@
    @Override
    @Transactional
    public void packageUp(String barcode) {
        Mat analyse = MatUtils.analyseMat(barcode);
        Pack pack = packService.selectByBarcode(barcode);
        if (null != pack) {
            throw new CoolException(barcode + "重复提交");
@@ -323,8 +324,8 @@
        Date now = new Date();
        pack = new Pack(
                barcode,    // 条码[非空]
                null,    // 商品编号
                null,    // 批号
                analyse.getMatnr(),    // 商品编号
                analyse.getBarcode(),    // 批号
                1L,    // 订单状态
                1,    // 状态
                now,    // 添加时间
@@ -337,7 +338,6 @@
            throw new CoolException("服务器内部错误,请联系管理员");
        }
        Mat analyse = MatUtils.analyseMat(barcode);
        Mat mat = matService.selectByMatnr(analyse.getMatnr());
        if (mat == null) {
            mat = new Mat();
@@ -351,6 +351,8 @@
            mat.setMemo("打包上线");
            if (!matService.insert(mat)) {
                throw new CoolException("服务器内部错误,请联系管理员");
            } else {
                log.info("打包上线添加新物料[商品编号:{}]", mat.getMatnr());
            }
        }
    }