| | |
| | | .eq(DaTestDeviceInterfaceTemp::getStationCode, device) |
| | | .eq(DaTestDeviceInterfaceTemp::getProductNum,cellCode)); |
| | | if (CollUtil.isNotEmpty(list)){ |
| | | DaTestDeviceInterfaceTemp daTestDeviceInterfaceTemp = list.get(0); |
| | | DaTestDeviceInterfaceTemp daTestDeviceInterfaceTemp = list.get(list.size()-1); |
| | | if (Constants.ONE.equals(daTestDeviceInterfaceTemp.getTotalResult())){ |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".CellStatus_1").value(1).build()); |
| | | }else { |
| | | flag = false; |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".CellStatus_1").value(2).build()); |
| | | } |
| | | daTestDeviceInterfaceTempService.deleteDaTestDeviceInterfaceTempById(daTestDeviceInterfaceTemp.getId()); |
| | | daTestDeviceInterfaceTempService.deleteDaTestDeviceInterfaceTempByProductNum(cellCode); |
| | | |
| | | } |
| | | return flag; |
| | | } |