cl
2024-07-19 9a5ab9f2f92f798fe15d7bad13428d9ddace83f9
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -163,7 +163,9 @@
                            String productType = productTypeObjcet.toString();//产品类型
                            String materialCode = Constants.materialMap.get(productType);
                            //调用工厂MES,保存到数据库,并且将工单传给PLC
                            receivingWorkOrders(thoroughfare, device,materialCode);
                            CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                                receivingWorkOrders(thoroughfare, device,materialCode);
                            });
                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(11).build());
                            log.info("写入到工位{}的RecordDataDone数据:{}",device,11);
                        }else{
@@ -265,7 +267,7 @@
        }
    }
    public void receivingWorkOrders(String thoroughfare ,String device ,String materialCode)
    public synchronized void receivingWorkOrders(String thoroughfare ,String device ,String materialCode)
    {
        String paramProductNum = "";
        try {
@@ -506,9 +508,9 @@
                    //插入参数采集表
                    daParamCollectionService.insertBatch(collectionList);
                    //如果220工位,进行报工
                    //如果220工位,进行报工,因为上层系统只支持6位,所有报工工位修改为M1P220
                    if("M1OP220".equals(device)) {
                        getWorkReportResultFeedback(moduleCode, "M1OP220", format.format(new Date()));
                        getWorkReportResultFeedback(moduleCode, "M1P220", format.format(new Date()));
                    }
                    //上传到工厂mes