| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | private final DeviceGroupRelationService deviceGroupRelationService; |
| | | private final PlcTestWriteService plcTestWriteService; |
| | | private final ObjectMapper objectMapper; |
| | | |
| | | public enum PlcOperationType { |
| | | REQUEST("PLC请求", "PLC 请求发送成功", "PLC 请求发送失败"), |
| | | REPORT("PLC汇报", "PLC 汇报模拟成功", "PLC 汇报模拟失败"), |
| | | RESET("PLC重置", "PLC 状态已重置", "PLC 状态重置失败"); |
| | | |
| | | private final String display; |
| | | private final String successMsg; |
| | | private final String failedMsg; |
| | | |
| | | PlcOperationType(String display, String successMsg, String failedMsg) { |
| | | this.display = display; |
| | | this.successMsg = successMsg; |
| | | this.failedMsg = failedMsg; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public DevicePlcVO.OperationResult triggerRequest(Long deviceId) { |
| | |
| | | throw new IllegalStateException("无法解析设备的 PLC 项目标识, deviceId=" + device.getId()); |
| | | } |
| | | |
| | | public enum PlcOperationType { |
| | | REQUEST("PLC请求", "PLC 请求发送成功", "PLC 请求发送失败"), |
| | | REPORT("PLC汇报", "PLC 汇报模拟成功", "PLC 汇报模拟失败"), |
| | | RESET("PLC重置", "PLC 状态已重置", "PLC 状态重置失败"); |
| | | |
| | | private final String display; |
| | | private final String successMsg; |
| | | private final String failedMsg; |
| | | |
| | | PlcOperationType(String display, String successMsg, String failedMsg) { |
| | | this.display = display; |
| | | this.successMsg = successMsg; |
| | | this.failedMsg = failedMsg; |
| | | } |
| | | } |
| | | } |
| | | |