| | |
| | | if(ObjectUtil.isNull(cellCodeList) || cellCodeList.size() != 4 ){ |
| | | result = 23; |
| | | }else{ |
| | | if(Constants.OP020.contains(device)) { |
| | | 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 (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 (!cellCode4.isEmpty() && cellCode3.isEmpty()) { |
| | | result = 23; |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build()); |
| | | return; |
| | | } |
| | | |
| | | 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()) || (cellCode1.isEmpty() && !cellCode2.isEmpty()) |
| | | || (!cellCode3.isEmpty() && cellCode4.isEmpty()) || (!cellCode4.isEmpty() && cellCode3.isEmpty())) { |
| | | result = 23; |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build()); |
| | | return; |
| | | } |
| | | |
| | | result = savePassingStation(thoroughfare, device,cellCodeList);//保存过站 |