微服务版本相关bug修改
This commit is contained in:
@@ -421,18 +421,14 @@ public class TerminalBaseController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
// @ApiOperation("请求前置重启进程")
|
||||
// @PostMapping(value = "askRestartProcess")
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "processNo", value = "进程号", required = true),
|
||||
// @ApiImplicitParam(name = "deviceRebootType", value = "重启类型", required = true)
|
||||
// })
|
||||
// public HttpResult<Object> askRestartProcess(@RequestParam("processNo")Integer processNo,@RequestParam("processType")String processType,@RequestParam("deviceRebootType")String deviceRebootType) {
|
||||
// String methodDescribe = getMethodDescribe("askRestartProcess");
|
||||
// terminalBaseService.askRestartProcess(processNo,processType,deviceRebootType);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
// }
|
||||
@ApiOperation("请求前置重启进程")
|
||||
@PostMapping(value = "askRestartProcess")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||
public HttpResult<Object> askRestartProcess(@RequestBody RestartParam restartParam) {
|
||||
String methodDescribe = getMethodDescribe("askRestartProcess");
|
||||
terminalBaseService.askRestartProcess(restartParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
}
|
||||
|
||||
// @ApiOperation("请求前置设备重启")
|
||||
// @PostMapping(value = "askRestartDevice")
|
||||
|
||||
@@ -6,10 +6,7 @@ import com.njcn.device.pq.pojo.bo.DeviceType;
|
||||
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
||||
import com.njcn.device.pq.pojo.dto.PreCommandDTO;
|
||||
import com.njcn.device.pq.pojo.dto.PushResultDTO;
|
||||
import com.njcn.device.pq.pojo.param.AddTerminalParam;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.param.SyncTerminalParam;
|
||||
import com.njcn.device.pq.pojo.param.UpdateTerminalParam;
|
||||
import com.njcn.device.pq.pojo.param.*;
|
||||
import com.njcn.device.pq.pojo.po.Line;
|
||||
import com.njcn.device.pq.pojo.vo.DevStatusNumVO;
|
||||
import com.njcn.device.pq.pojo.vo.LineWiringDiagramVO;
|
||||
@@ -297,4 +294,5 @@ public interface TerminalBaseService {
|
||||
PushResultDTO getPushResult(String guid);
|
||||
|
||||
|
||||
void askRestartProcess( RestartParam restartParam);
|
||||
}
|
||||
|
||||
@@ -4004,6 +4004,124 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public PushResultDTO getPushResult(String guid) {
|
||||
PushResultDTO pushResultDTO = new PushResultDTO();
|
||||
String stringByKey = redisUtil.getStringByKey(RedisKeyPrefix.TOPIC_REPLY.concat(guid));
|
||||
@@ -4022,6 +4140,32 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
return pushResultDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void askRestartProcess( RestartParam restartParam) {
|
||||
|
||||
ProcessRebootMessage procesRebootMessage = new ProcessRebootMessage();
|
||||
|
||||
Node nodeById = nodeService.getNodeById(restartParam.getNodeId());
|
||||
procesRebootMessage.setIndex(restartParam.getProcessNo());
|
||||
if(Objects.equals("1",restartParam.getDeviceRebootType())){
|
||||
procesRebootMessage.setFun("reset");
|
||||
procesRebootMessage.setProcessNum(nodeById.getMaxProcessNum());
|
||||
procesRebootMessage.setProcessNo(1);
|
||||
|
||||
}else {
|
||||
procesRebootMessage.setFun("delete");
|
||||
procesRebootMessage.setProcessNo(restartParam.getProcessNo());
|
||||
|
||||
}
|
||||
procesRebootMessage.setFrontType("all");
|
||||
procesRebootMessage.setNodeId(restartParam.getNodeId());
|
||||
String guid = IdUtil.simpleUUID();
|
||||
|
||||
procesRebootMessage.setGuid(guid);
|
||||
produceFeignClient.askRestartProcess(procesRebootMessage);
|
||||
|
||||
}
|
||||
|
||||
//反解析日志
|
||||
public List<String> parseTemplateValues(String template, String actualString) {
|
||||
List<String> values = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user