春风项目四线(合箱线、总装线)
wujian
2024-07-26 778d3d8b387ca0a8d1b51ef68f783fb0b407ef20
fix6
已修改3个文件
33 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/controller/DaTileMatchMiddlewareController.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java
@@ -1,5 +1,6 @@
package com.jcdm.main.da.opcuaconfig.controller;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
@@ -198,6 +199,8 @@
                    TileMatchMiddleware.setCrankshaftNo(barcode);
                    TileMatchMiddleware.setCylinder(i);
                    TileMatchMiddleware.setState(1);
                    TileMatchMiddleware.setCreateTime(new Date());
                    TileMatchMiddleware.setUpdateTime(new Date());
                    daTileMatchMiddlewareService.insertDaTileMatchMiddleware(TileMatchMiddleware);
                }
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/controller/DaTileMatchMiddlewareController.java
@@ -1,6 +1,8 @@
package com.jcdm.main.da.tileMatchMiddleware.controller;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
@@ -158,7 +160,8 @@
        rMiddleware.setState(1);
        List<DaTileMatchMiddleware> TileMatchMiddlewareList=daTileMatchMiddlewareService.selectDaTileMatchMiddlewareList(rMiddleware);
        String SNCode="";
        if(TileMatchMiddlewareList.size()>0){
        if(CollUtil.isNotEmpty(TileMatchMiddlewareList)){
            TileMatchMiddlewareList = TileMatchMiddlewareList.stream().sorted(Comparator.comparing(DaTileMatchMiddleware::getCreateTime)).collect(Collectors.toList());
            rMiddleware=TileMatchMiddlewareList.get(0);
            rMiddleware.setPalletNo(locationCode);
            rMiddleware.setConnectingrodNo(barcode);
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -169,6 +169,29 @@
                            Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP020.Code").getValue();
                            if (ObjectUtil.isNotEmpty(SNCodeObject)){
                                String snCode = SNCodeObject.toString();
                                DaPassingStationCollection passingStationCollectionCheck = new DaPassingStationCollection();
                                passingStationCollectionCheck.setLocationCode("OP020");
                                passingStationCollectionCheck.setSfcCode(snCode);
                                List<DaPassingStationCollection> checkList = passingStationCollectionServiceImpl.selectDaPassingStationCollectionList(passingStationCollectionCheck);
                                if (CollUtil.isNotEmpty(checkList)){
                                    if (snCode.startsWith("380")){
                                        log.info("enter-380");
                                        String[] split = snCode.split(StrUtil.SPACE);
                                        if (split.length>1){
                                            ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP020.PrintSN1", split[0]);
                                            OPCUaSubscription.miloService.writeToOpcUa(entity);//写完成
                                            ReadWriteEntity entity2 = new ReadWriteEntity("CFL4HX.OP020.PrintSN2", "☆"+split[1]+"☆");
                                            OPCUaSubscription.miloService.writeToOpcUa(entity2);//写完成
                                            ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.OP020.SendSNDone", 2);
                                            OPCUaSubscription.miloService.writeToOpcByte(entity3);//写完成
                                        }
                                    } else {
                                        ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP020.PrintSN1", snCode);
                                        OPCUaSubscription.miloService.writeToOpcByte(entity);//写完成
                                        ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.OP020.SendSNDone", 2);
                                        OPCUaSubscription.miloService.writeToOpcByte(entity3);//写完成
                                    }
                                } else {
                                if (snCode.startsWith("380")){
                                    log.info("enter-380");
                                    String[] split = snCode.split(StrUtil.SPACE);
@@ -187,6 +210,8 @@
                                    OPCUaSubscription.miloService.writeToOpcByte(entity3);//写完成
                                }
                            }
                            }
                        } else if (OPCElement.OP030_SAVE_REQUEST.equals(identifier)) {
                            cleanForm("CFL4HX.OP030.SaveFeed");
                            ReadWriteEntity entity2 = new ReadWriteEntity("CFL4HX.OP030.SaveFeed", 1);