Commit ee6ea4ed by guo_minglei@163.com

补充参数

parent 0cf7c83e
......@@ -948,7 +948,10 @@ public class ApiFlowServiceImpl implements ApiFlowService {
ValidationUtil.dataNotNull(flow, flowName + "工作流不存在");
List<Node> nodeList = nodeMapper.findByFlowIdAndName(flow.getFlowId(), nodeNameList);
Map<String, List<WaitingTask>> waitTaskMap = buildTask(nodeList, nodeNameList, repairTimeList);
//设置触发时间
Long triggerTime = System.currentTimeMillis();
Map<String, List<WaitingTask>> waitTaskMap = buildTask(nodeList, nodeNameList, repairTimeList, triggerTime);
//将时间排序
Collections.sort(repairTimeList);
//查看当前排队的工作流最大排队序号
......@@ -969,6 +972,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
waitingRecord.setOperator(userName);
waitingRecord.setScheduleType(ScheduleTypeEnum.REPAIR.getCode());
waitingRecord.setWaitOrder(++order);
waitingRecord.setTriggerTime(triggerTime);
//设置实例
BeanUtils.copyProperties(waitingRecord, runRecording);
runRecording.setFlowStatus("1");
......@@ -987,7 +991,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
private Map<String, List<WaitingTask>> buildTask(List<Node> nodeList, List<String> nodeNameList, List<String> repairTimeList){
private Map<String, List<WaitingTask>> buildTask(List<Node> nodeList, List<String> nodeNameList, List<String> repairTimeList, Long triggerTime){
Map<String, List<WaitingTask>> result = new HashMap<>();
String usernName = currentUserUtils.account();
List<WaitingTask> waitingTaskList = new ArrayList<>();
......@@ -1004,6 +1008,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
});
waitingTask.setNodeDepend(Joiner.on(",").join(dependNodeNameList));
}
waitingTask.setTriggerTime(triggerTime);
waitingTask.setOperator(usernName);
waitingTask.setScheduleType(ScheduleTypeEnum.REPAIR.getCode());
waitingTaskList.add(waitingTask);
......
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