chulibug
This commit is contained in:
@@ -3880,7 +3880,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
preCommandDTOList.add(preCommandDTO);
|
preCommandDTOList.add(preCommandDTO);
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
//调用重启设备接口先删除设备,在重启设备
|
//调用重启设备接口先删除设备,在新增,在修改在重启设备
|
||||||
List<String> deleteDevIds = new ArrayList<>();
|
List<String> deleteDevIds = new ArrayList<>();
|
||||||
Map<String, List<PqsTerminalPushLogDTO>> collect = tempPqsTerminalPushLogDTOList.stream().collect(Collectors.groupingBy(PqsTerminalPushLogDTO::getOperateType));
|
Map<String, List<PqsTerminalPushLogDTO>> collect = tempPqsTerminalPushLogDTOList.stream().collect(Collectors.groupingBy(PqsTerminalPushLogDTO::getOperateType));
|
||||||
if(collect.containsKey(DeviceRebootType.DELETE_TERMINAL)){
|
if(collect.containsKey(DeviceRebootType.DELETE_TERMINAL)){
|
||||||
@@ -3900,23 +3900,11 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
preCommandDTOList.add(preCommandDTO);
|
preCommandDTOList.add(preCommandDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(collect.containsKey(DeviceRebootType.LEDGER_MODIFY)){
|
|
||||||
List<PqsTerminalPushLogDTO> pqsTerminalPushLogDTOList1 = collect.get(DeviceRebootType.LEDGER_MODIFY);
|
|
||||||
deleteDevIds = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevId).distinct().collect(Collectors.toList());
|
|
||||||
String devNameString = deleteDevIds.stream().map(temp->{return lineMap.get(temp).getName();}).collect(Collectors.joining(","));
|
|
||||||
PreCommandDTO preCommandDTO = new PreCommandDTO();
|
|
||||||
String guid = IdUtil.simpleUUID();
|
|
||||||
String command = "修改前置机:"+pqsTerminalPushLogDTO.getNodeName()+"下进程:"+processId+"下终端"+devNameString;
|
|
||||||
preCommandDTO.setGuid(guid);
|
|
||||||
preCommandDTO.setCommand(command);
|
|
||||||
preCommandDTO.setResult("2");
|
|
||||||
//调用重启进程接口
|
|
||||||
this.askRestartDevice(guid,pqsTerminalPushLogDTO.getNodeId(),deleteDevIds,DeviceRebootType.LEDGER_MODIFY,processId);
|
|
||||||
preCommandDTOList.add(preCommandDTO);
|
|
||||||
}
|
|
||||||
if(collect.containsKey(DeviceRebootType.ADD_TERMINAL)){
|
if(collect.containsKey(DeviceRebootType.ADD_TERMINAL)){
|
||||||
List<PqsTerminalPushLogDTO> pqsTerminalPushLogDTOList1 = collect.get(DeviceRebootType.ADD_TERMINAL);
|
List<PqsTerminalPushLogDTO> pqsTerminalPushLogDTOList1 = collect.get(DeviceRebootType.ADD_TERMINAL);
|
||||||
deleteDevIds = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevId).distinct().collect(Collectors.toList());
|
List<String> addDevIds = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevId).distinct().collect(Collectors.toList());
|
||||||
|
addDevIds.removeAll(deleteDevIds);
|
||||||
|
if(!CollectionUtils.isEmpty(addDevIds)){
|
||||||
String devNameString = deleteDevIds.stream().map(temp->{return lineMap.get(temp).getName();}).collect(Collectors.joining(","));
|
String devNameString = deleteDevIds.stream().map(temp->{return lineMap.get(temp).getName();}).collect(Collectors.joining(","));
|
||||||
PreCommandDTO preCommandDTO = new PreCommandDTO();
|
PreCommandDTO preCommandDTO = new PreCommandDTO();
|
||||||
String guid = IdUtil.simpleUUID();
|
String guid = IdUtil.simpleUUID();
|
||||||
@@ -3931,6 +3919,27 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
preCommandDTOList.add(preCommandDTO);
|
preCommandDTOList.add(preCommandDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(collect.containsKey(DeviceRebootType.LEDGER_MODIFY)){
|
||||||
|
List<PqsTerminalPushLogDTO> pqsTerminalPushLogDTOList1 = collect.get(DeviceRebootType.LEDGER_MODIFY);
|
||||||
|
List<String> modifyDevIds = pqsTerminalPushLogDTOList1.stream().map(PqsTerminalPushLogDTO::getDevId).distinct().collect(Collectors.toList());
|
||||||
|
modifyDevIds.removeAll(deleteDevIds);
|
||||||
|
if(!CollectionUtils.isEmpty(modifyDevIds)){
|
||||||
|
String devNameString = modifyDevIds.stream().map(temp->{return lineMap.get(temp).getName();}).collect(Collectors.joining(","));
|
||||||
|
PreCommandDTO preCommandDTO = new PreCommandDTO();
|
||||||
|
String guid = IdUtil.simpleUUID();
|
||||||
|
String command = "修改前置机:"+pqsTerminalPushLogDTO.getNodeName()+"下进程:"+processId+"下终端"+devNameString;
|
||||||
|
preCommandDTO.setGuid(guid);
|
||||||
|
preCommandDTO.setCommand(command);
|
||||||
|
preCommandDTO.setResult("2");
|
||||||
|
//调用重启进程接口
|
||||||
|
this.askRestartDevice(guid,pqsTerminalPushLogDTO.getNodeId(),deleteDevIds,DeviceRebootType.LEDGER_MODIFY,processId);
|
||||||
|
preCommandDTOList.add(preCommandDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user