cl
2024-07-16 b590231a4d4cabde1a9452e87050adb9cee227d4
修改参数采集
已修改2个文件
31 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -194,9 +194,30 @@
                        Integer result = 21;
                        //读取电芯码
                        List<String> cellCodeList = readCellCodeList(thoroughfare, device);
                        if(ObjectUtil.isNull(cellCodeList) || cellCodeList.size() != 4){
                        if(ObjectUtil.isNull(cellCodeList) || cellCodeList.size() != 4 ){
                            result = 23;
                        }else{
                            String cellCode1 = cellCodeList.get(0);
                            String cellCode2 = cellCodeList.get(1);
                            String cellCode3 = cellCodeList.get(2);
                            String cellCode4 = cellCodeList.get(3);
                            if(cellCode1.isEmpty() || cellCode2.isEmpty()){
                                result = 23;
                                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build());
                                return;
                            }
                            if(!cellCode3.isEmpty() && cellCode4.isEmpty()){
                                result = 23;
                                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build());
                                return;
                            }
                            if(cellCode3.isEmpty() && !cellCode4.isEmpty()){
                                result = 23;
                                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build());
                                return;
                            }
                            result = savePassingStation(thoroughfare, device,cellCodeList);//保存过站
                            if(result == 21) {
                                result = saveParamCollection(device,cellCodeList);//保存参数,发送工厂MES
@@ -330,11 +351,11 @@
        try {
            List<ReadWriteEntity> readWriteEntityList = miloService.readFromOpcUa(readList);//电芯码
            for (ReadWriteEntity readWriteEntity : readWriteEntityList) {
                if (ObjectUtil.isNotNull(readWriteEntity.getValue()) && !"".equals(readWriteEntity.getValue().toString().trim())){
                if (ObjectUtil.isNotNull(readWriteEntity.getValue()) && !readWriteEntity.getValue().toString().trim().isEmpty()){
                    cellCodeList.add(readWriteEntity.getValue().toString());//封装电芯码
                }/*else{
                }else{
                    cellCodeList.add("");//封装电芯码
                }*/
                }
            }
        } catch (Exception e) {
jcdm-ui/package.json
@@ -1,5 +1,5 @@
{
  "name": "ruoyi",
  "name": "dema",
  "version": "3.8.6",
  "description": "江宸MES管理系统",
  "author": "江宸",