cl
2024-08-14 46b20f92401ec475e3d3b655df1e5cfa780525ac
修改采集参数
已修改3个文件
17 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/constant/Constants.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/constant/Constants.java
@@ -19,7 +19,9 @@
    public static final List<String> ModuleList = new ArrayList<>();//模组工位,用于校验是否传入模组码
    public static final Map<String,String> materialMap = new HashMap();//人工工位
    public static final Map<String,String> materialMap = new HashMap();//物料集合
    public static final Map<String,String> facMaterialMap = new HashMap();//生产物料转工厂物料请求工单
    public static final Map<String,String> thoroughfareMap = new HashMap();//人工工位
    public static final String YES = "Y";
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -54,8 +54,11 @@
    public void run(ApplicationArguments args) throws Exception {
        //PLC到MES物料转换
        Constants.materialMap.put("1","9900200461");//微卡电驱动系统总成
        Constants.materialMap.put("2","9900207783");//微面电驱动系统总成
        Constants.materialMap.put("1","9900200461");//微卡电驱动系统总成(9999276636)//9900200461
        Constants.materialMap.put("2","9900207783");//微面电驱动系统总成(9999276639)//9900207783
        Constants.materialMap.put("9900200461","9999276636");//生产物料转工厂物料请求工单
        Constants.materialMap.put("9900207783","9999276639");//生产物料转工厂物料请求工单
        //通道
        Constants.thoroughfareMap.put(Constants.OP010,"JCDM035-1");
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -388,7 +388,8 @@
                OmProductionOrdeInfo lastOrder = omProductionOrdeInfoService.getLastOrder();
                log.info("请求工厂MES工单:入参device{},materialCode:{}", device, materialCode);
                String orderJsonString = RestfulService.getProductionWorkOrderRequest(lastOrder.getProductNum(), "OP010",materialCode);
                String facMaterialCode = Constants.facMaterialMap.get(materialCode);
                String orderJsonString = RestfulService.getProductionWorkOrderRequest(lastOrder.getProductNum(), "OP010",facMaterialCode);
                log.info("请求工厂MES工单:出参pack:{}", orderJsonString);
                JSONObject jsonObject = new JSONObject(orderJsonString);
@@ -401,7 +402,8 @@
                    omProductionOrdeInfo.setWorkOrderNo(dataObject.getStr("productionOrderNum"));
                    omProductionOrdeInfo.setProductNum(dataObject.getStr("productNum"));
                    omProductionOrdeInfo.setStationCode(device);
                    omProductionOrdeInfo.setProductCode(dataObject.getStr("materialCode"));
                    omProductionOrdeInfo.setProductCode(materialCode);
                    omProductionOrdeInfo.setMaterialCode(dataObject.getStr("materialCode"));
                    omProductionOrdeInfo.setPlanQty(Long.valueOf(dataObject.getStr("plannedQuantity")));
                    omProductionOrdeInfo.setOnlineCompletionMark("0");
                    omProductionOrdeInfo.setSfResult("0");