cl
2024-08-16 b82de69efbfccdbbd81cda7ac1e57e550eef508c
修改采集参数
已修改3个文件
13 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -111,6 +111,7 @@
            String thoroughfare = Constants.thoroughfareMap.get(bsFormulaChildInfo.getProcessesCode());//获取通道
            String str = thoroughfare+"."+bsFormulaChildInfo.getProcessesCode()+".MESScrew";
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(stepNumber).build());//拧紧步骤
            if(bsFormulaChildInfo.getProcessesCode().equals("OP230")){
                //所有进站将进站时间写给PLC
                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -121,7 +122,7 @@
            }else if(bsFormulaChildInfo.getProcessesCode().equals("OP220")){
                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + bsFormulaChildInfo.getProcessesCode() + ".RecordDataDone").value(11).build());
            }
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(str).value(stepNumber).build());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -57,8 +57,8 @@
        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.facMaterialMap.put("9900200461","9999276636");//生产物料转工厂物料请求工单
        Constants.facMaterialMap.put("9900207783","9999276639");//生产物料转工厂物料请求工单
        //通道
        Constants.thoroughfareMap.put(Constants.OP010,"JCDM035-1");
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -185,7 +185,7 @@
                                        if(Constants.OP230.equals(device)){
                                            CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                                                updateOrderStatus(snCode, "5","");//OP230工位更新工单状态为已完成
                                                reportFactoryMes(snCode, device, format.format(new Date()));//工厂MES报工
                                                reportFactoryMes(snCode, "OP240", format.format(new Date()));//工厂MES报工   //暂时 OP240工位还没有好,在230报240的工
                                            });
                                        }
                                        if(result == 21){
@@ -387,8 +387,8 @@
                // 查询最新的工单信息
                OmProductionOrdeInfo lastOrder = omProductionOrdeInfoService.getLastOrder();
                String facMaterialCode = Constants.facMaterialMap.get(materialCode);
                log.info("请求工厂MES工单:入参device{},请求工厂物料编码facMaterialCode:{},产品物料编码{}MaterialCode", device, facMaterialCode,materialCode);
                String orderJsonString = RestfulService.getProductionWorkOrderRequest(lastOrder.getProductNum(), "OP010",facMaterialCode);
                log.info("请求工厂MES工单:入参device{},请求工厂物料编码facMaterialCode:{},产品物料编码MaterialCode{}", device, facMaterialCode,materialCode);
                String orderJsonString = RestfulService.getProductionWorkOrderRequest(lastOrder.getProductNum(), device,facMaterialCode);
                log.info("请求工厂MES工单:出参pack:{}", orderJsonString);
                JSONObject jsonObject = new JSONObject(orderJsonString);