自动化立体仓库 - WMS系统
zhangchao
2024-11-11 6cb215cfe38528ecdecb915f598a6214a5bf2ec9
自由项参数
4个文件已修改
61 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/OpenController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/param/OrderProdSyncParam.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -354,8 +354,9 @@
            //orderDetl.setbFree1(childInfo.getBFree1());
            orderDetl.setId(Cools.isEmpty(childInfo.getIPOsID()) ? childInfo.getId() : childInfo.getIPOsID());
            orderDetl.setIvouchrowno(childInfo.getIvouchrowno());
            if (!Cools.isEmpty(childInfo.getCFree1())) {
                orderDetl.setBFree1(childInfo.getCFree1());
            }
            orderDetls.add(orderDetl);
        }
        orderSyncParam.setChildren(orderDetls);
@@ -384,6 +385,9 @@
            orderDetl.setCsocode(param.getCsocode());
            orderDetl.setId(childInfo.getIds());
            //orderDetl.setIvouchrowno(childInfo.getIvouchrowno());
            if (!Cools.isEmpty(childInfo.getCFree1())) {
                orderDetl.setBFree1(childInfo.getCFree1());
            }
            orderDetls.add(orderDetl);
        }
        orderSyncParam.setChildren(orderDetls);
src/main/java/com/zy/asrs/entity/param/OrderProdSyncParam.java
@@ -104,6 +104,8 @@
        private String csocode;
        //规格(自由项1)
        private String bFree1;
        //规格(自由项1)
        private String cFree1;
        //采购订单子表标识
        private String id;
        //销售订单子表标识
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -77,8 +77,7 @@
        DocType docType = docTypeService.selectOrAdd(param.getOrderType(), Boolean.TRUE);
        Date now = new Date();
        // 单据主档
        order = new Order(
                String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
        order = new Order(String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
                param.getOrderNo(),    // 订单编号
                DateUtils.convert(now),    // 单据日期
                docType.getDocId(),    // 单据类型
@@ -156,8 +155,7 @@
        }
// 生成调拨单
        if (docType.getDocId().intValue() == 32) {
            order = new Order(
                    String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
            order = new Order(String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
                    "DB" + param.getOrderNo(),    // 订单编号
                    DateUtils.convert(now),    // 单据日期
                    33L,    // 单据类型
@@ -294,8 +292,7 @@
        DocType docType = docTypeService.selectOrAdd(param.getOrderType(), Boolean.FALSE);
        Date now = new Date();
        // 单据主档
        order = new Order(
                String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
        order = new Order(String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
                param.getOrderNo(),    // 订单编号
                DateUtils.convert(now),    // 单据日期
                docType.getDocId(),    // 单据类型
@@ -369,8 +366,7 @@
            }
        }
        if (docType.getDocId().intValue() == 32) {
            order = new Order(
                    String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
            order = new Order(String.valueOf(snowflakeIdWorker.nextId()),    // 编号[非空]
                    "DB" + param.getOrderNo(),    // 订单编号
                    DateUtils.convert(now),    // 单据日期
                    33L,    // 单据类型
@@ -509,8 +505,7 @@
            throw new CoolException(param.getBarcode() + "重复提交");
        }
        Date now = new Date();
        pack = new Pack(
                param.getBarcode(),    // 条码[非空]
        pack = new Pack(param.getBarcode(),    // 条码[非空]
                analyse.getMatnr(),    // 物料号
                analyse.getBarcode(),    // 序列码
                1L,    // 订单状态
@@ -537,8 +532,7 @@
                    Tag top = tagService.getTop();
                    NodeUtils nodeUtils = new NodeUtils();
                    nodeUtils.executePath(top.getId());
                    priTag = new Tag(
                            null,    // 编号
                    priTag = new Tag(null,    // 编号
                            param.getGroupCode(),    // 名称
                            top.getId(),    // 父级
                            top.getName(),    // 父级名称
@@ -567,8 +561,7 @@
                if (secTag == null) {
                    NodeUtils nodeUtils = new NodeUtils();
                    nodeUtils.executePath(priTag.getId());
                    secTag = new Tag(
                            null,    // 编号
                    secTag = new Tag(null,    // 编号
                            param.getGroupName(),    // 名称
                            priTag.getId(),    // 父级
                            priTag.getName(),    // 父级名称
@@ -665,9 +658,7 @@
    }
    public void callApiLogSave(Mat mat, String tableName, String response, Boolean bool) {
        apiLogService.save("ERP下发商品信息", tableName, "null", "10.10.10.1",
                "物料编码:" + mat.getMatnr() + "、物料名称:" + mat.getMaktx() + "、规格:" + mat.getSpecs() + "、备注:" + mat.getMemo(),
                response, bool);
        apiLogService.save("ERP下发商品信息", tableName, "null", "10.10.10.1", "物料编码:" + mat.getMatnr() + "、物料名称:" + mat.getMaktx() + "、规格:" + mat.getSpecs() + "、备注:" + mat.getMemo(), response, bool);
    }
@@ -684,8 +675,7 @@
            throw new CoolException("条码长度不是8位===>>" + param.getBarcode());
        }
        // 判断是否有相同条码的数据
        if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
                eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) {
        if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) {
            callApiLogSaveMES(param, null, param.getBarcode() + "数据正在进行入库", false);
            throw new CoolException(param.getBarcode() + "数据正在进行入库");
        }
@@ -746,17 +736,11 @@
    public void callApiLogSaveMES(CombParam combParam, CombParam.CombMat combMat, String response, Boolean bool) {
        if (Cools.isEmpty(combParam)) {
            apiLogService.save("MES下发入库通知单", "/open/asrs/comb/v1", "null", "10.10.10.1",
                    "",
                    response, bool);
            apiLogService.save("MES下发入库通知单", "/open/asrs/comb/v1", "null", "10.10.10.1", "", response, bool);
        } else if (Cools.isEmpty(combMat)) {
            apiLogService.save("MES下发入库通知单", "/open/asrs/comb/v1", "null", "10.10.10.1",
                    "托盘码:" + combParam.getBarcode(),
                    response, bool);
            apiLogService.save("MES下发入库通知单", "/open/asrs/comb/v1", "null", "10.10.10.1", "托盘码:" + combParam.getBarcode(), response, bool);
        } else {
            apiLogService.save("MES下发入库通知单", "/open/asrs/comb/v1", "null", "10.10.10.1",
                    "托盘码:" + combParam.getBarcode() + "、物料编号:" + combMat.getMatnr() + "、数量:" + combMat.getAnfme(),
                    response, bool);
            apiLogService.save("MES下发入库通知单", "/open/asrs/comb/v1", "null", "10.10.10.1", "托盘码:" + combParam.getBarcode() + "、物料编号:" + combMat.getMatnr() + "、数量:" + combMat.getAnfme(), response, bool);
        }
    }
@@ -1037,7 +1021,7 @@
        //销售订单号
        od.setThreeCode(odParam.getCDefine22());
        //自由项
        od.setBatch(Cools.isEmpty(odParam.getBatch()) ? "" : odParam.getBatch() + "__" + (Cools.isEmpty(odParam.getBFree1()) ? "" : odParam.getBFree1()));
        od.setBatch((Cools.isEmpty(odParam.getBatch()) ? "" : odParam.getBatch()) + "__" + (Cools.isEmpty(odParam.getBFree1()) ? "" : odParam.getBFree1()));
        //IDs
        od.setSku(odParam.getId());
@@ -1064,14 +1048,11 @@
    public void callApiLogSave(MatInfoParam matParam, String tableName, String response, Boolean bool) {
        apiLogService.save("ERP下发商品信息", tableName, "null", "10.10.10.1",
                "物料编码:" + matParam.getCinvcode() + "、物料名称:" + matParam.getCinvname() + "、规格:" + matParam.getCInvStd() + "、备注:" + matParam.getMemo(),
                response, bool);
        apiLogService.save("ERP下发商品信息", tableName, "null", "10.10.10.1", "物料编码:" + matParam.getCinvcode() + "、物料名称:" + matParam.getCinvname() + "、规格:" + matParam.getCInvStd() + "、备注:" + matParam.getMemo(), response, bool);
    }
    public void callApiLogSave(OrderSyncParam param, String tableName, String response, Boolean bool) {
        apiLogService.save("ERP订单同步", tableName, "null", "10.10.10.1",
                param.toString(), response, bool);
        apiLogService.save("ERP订单同步", tableName, "null", "10.10.10.1", param.toString(), response, bool);
    }
    public static void main(String[] args) {
src/main/resources/application.yml
@@ -1,3 +1,3 @@
spring:
  profiles:
    active: loc
    active: dev