Commit 7e4be0f4 by huangfusuper

修改停止调度的报错信息

parent 2f91a636
...@@ -2,10 +2,7 @@ package com.byit.service.mapservice.impl; ...@@ -2,10 +2,7 @@ package com.byit.service.mapservice.impl;
import com.byit.enums.RunRecordingEnum; import com.byit.enums.RunRecordingEnum;
import com.byit.enums.task.RunResultEnum; import com.byit.enums.task.RunResultEnum;
import com.byit.model.JobTaskRunLog; import com.byit.model.*;
import com.byit.model.JobTaskRunLogWithBLOBs;
import com.byit.model.NodeVersion;
import com.byit.model.RunRecording;
import com.byit.service.JobTaskRunLogService; import com.byit.service.JobTaskRunLogService;
import com.byit.service.JobTaskService; import com.byit.service.JobTaskService;
import com.byit.service.NodeVersionService; import com.byit.service.NodeVersionService;
...@@ -45,12 +42,13 @@ public class RunRecordingAndLogServiceImpl implements RunRecordingAndLogService ...@@ -45,12 +42,13 @@ public class RunRecordingAndLogServiceImpl implements RunRecordingAndLogService
//查询该实例对应的所由日志节点 //查询该实例对应的所由日志节点
List<JobTaskRunLogWithBLOBs> jobTaskRunLog = jobTaskRunLogService.findJobTaskRunLogWithBLOBsByFlowIdAndRunId(flowId, runId); List<JobTaskRunLogWithBLOBs> jobTaskRunLog = jobTaskRunLogService.findJobTaskRunLogWithBLOBsByFlowIdAndRunId(flowId, runId);
List<Integer> logNodeId = jobTaskRunLog.stream().map(JobTaskRunLog::getNodeId).collect(Collectors.toList()); List<Integer> logNodeId = jobTaskRunLog.stream().map(JobTaskRunLog::getNodeId).collect(Collectors.toList());
List<NodeVersion> allByFlowId = nodeVersionService.findAllByFlowId(flowId); //List<NodeVersion> allByFlowId = nodeVersionService.findAllByFlowId(flowId);
//筛选没在日志里面的节点 //筛选没在日志里面的节点
List<NodeVersion> notLogNode = allByFlowId.stream().filter(nodeVersion -> !(logNodeId.contains(nodeVersion.getNodeId()))).collect(Collectors.toList()); //List<NodeVersion> notLogNode = allByFlowId.stream().filter(nodeVersion -> !(logNodeId.contains(nodeVersion.getNodeId()))).collect(Collectors.toList());
//将这些节点置为失败并将实例也置为失败 //将这些节点置为失败并将实例也置为失败
List<JobTask> jobTaskByRunId = jobTaskService.findJobTaskByRunId(runId, flowId);
//保存错误日志节点 //保存错误日志节点
notLogNode.forEach(node ->{ jobTaskByRunId.forEach(node ->{
JobTaskRunLogWithBLOBs log = new JobTaskRunLogWithBLOBs(); JobTaskRunLogWithBLOBs log = new JobTaskRunLogWithBLOBs();
BeanUtils.copyProperties(node,log); BeanUtils.copyProperties(node,log);
log.setTriggerCode(RunResultEnum.TRIGGER_ERROR.getCode()); log.setTriggerCode(RunResultEnum.TRIGGER_ERROR.getCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment