自动化立体仓库 - WMS系统
zhangchao
2024-11-04 2ef2837d37c5ec956de05ea3ddf49b8f655aed58
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -214,6 +214,24 @@
        // 获取单据
        Order order = orderService.selectByNo(orderNo);
        if (order == null) {
            int i = 30;
            while (i >= 0) {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
                order = orderService.selectByNo(orderNo);
                if (order != null) {
                    break;
                }
                i--;
            }
        }
        if (order == null) {
            return R.parse("单据不存在:" + orderNo);
        }
        // 获取单据明细
        List<OrderDetl> orderDetlList = orderDetlService.selectByOrderId(order.getId());
@@ -287,6 +305,8 @@
        }
        return R.ok("出库成功");
    }
    @Override
    @Transactional
@@ -679,12 +699,12 @@
    @Override
    @Transactional
    public void syncMat(MatSyncParam param) {
        if (Cools.isEmpty(param.getMatDetails()) || param.getMatDetails().size() <=0 ) {
        if (Cools.isEmpty(param.getMatDetails()) || param.getMatDetails().size() <= 0) {
            throw new CoolException("商品数据为空");
        }
        for(MatSyncParam.MatParam matParam : param.getMatDetails()){
            if(Cools.isEmpty(matParam.getMatnr())){
        for (MatSyncParam.MatParam matParam : param.getMatDetails()) {
            if (Cools.isEmpty(matParam.getMatnr())) {
                throw new CoolException("商品编码不能为空");
            }
@@ -777,7 +797,7 @@
                }
            } else {
                mat.sync(param);
                if (!matService.update(mat, new EntityWrapper<Mat>().eq("matnr",matParam.getMatnr()))) {
                if (!matService.update(mat, new EntityWrapper<Mat>().eq("matnr", matParam.getMatnr()))) {
                    throw new CoolException("更新已存在商品信息失败,请联系管理员");
                }
            }