Commit 72f267d1 by huangfusuper

暂停BUG

parent 6b3ed7aa
......@@ -1699,18 +1699,19 @@ public class ApiFlowServiceImpl implements ApiFlowService {
return;
}
RunRecording mainRunRecording = runRecordList.stream().filter(runRecording -> flowName.equals(runRecording.getFlowName())).findFirst().orElse(null);
Integer stopCount = 0;
Integer stopCount;
if (mainRunRecording != null) {
stopCount = mainRunRecording.getStopCount();
stopCount = stopCount - 1;
if (stopCount > 0 && "1".equals(stopFlowParam.getAllStartFlow())) {
mainRunRecording.setStopCount(stopCount);
runRecordingMapper.updateRunRecordingById(mainRunRecording);
} else {
runRecordingMapper.startByRunIdAndFlowId(runId, mainRunRecording.getFlowId());
jobTaskMapper.startByRunIdAndFlowId(runId, mainRunRecording.getFlowId());
}
}
stopCount = stopCount - 1;
if (stopCount != null && stopCount > 0 && "1".equals(stopFlowParam.getAllStartFlow())) {
mainRunRecording.setStopCount(stopCount);
runRecordingMapper.updateRunRecordingById(mainRunRecording);
} else {
runRecordingMapper.startByRunIdAndFlowId(runId, mainRunRecording.getFlowId());
jobTaskMapper.startByRunIdAndFlowId(runId, mainRunRecording.getFlowId());
}
}
}
......
......@@ -100,18 +100,22 @@ public class ScriptExecutorJobTask implements TimerTask {
if (ScheduleTypeEnum.NORMAL.getCode().equals(mythJobTaskSchedule.getScheduleType())
|| ScheduleTypeEnum.REAL.getCode().equals(mythJobTaskSchedule.getScheduleType())) {
privateParam = PlaceholderUtils.formatBizDateParam(privateParam, PlaceholderEnum.DATE_PLACEHOLDER.getName(), 1);
ScriptParamAndPlaceholderDto scriptParamAndPlaceholderDto = JSON.parseObject(privateParam,ScriptParamAndPlaceholderDto.class);
Map<String, String> placeholder = scriptParamAndPlaceholderDto.getPlaceholder();
if(CollectionUtil.isNotEmpty(placeholder)) {
if(placeholder.containsKey(PlaceholderEnum.NOW_DATE_PLACEHOLDER.getName())){
String nowDateFormatName = placeholder.get(PlaceholderEnum.NOW_DATE_PLACEHOLDER.getName());
String dateFormat = DateUtil.dateFormat(new Date(), nowDateFormatName);
privateParam = PlaceholderUtils.formatBizDateParam(privateParam, PlaceholderEnum.NOW_DATE_PLACEHOLDER.getName(), dateFormat,0);
if(StringUtils.isNoneBlank(privateParam)) {
ScriptParamAndPlaceholderDto scriptParamAndPlaceholderDto = JSON.parseObject(privateParam,ScriptParamAndPlaceholderDto.class);
Map<String, String> placeholder = scriptParamAndPlaceholderDto.getPlaceholder();
if(CollectionUtil.isNotEmpty(placeholder)) {
if(placeholder.containsKey(PlaceholderEnum.NOW_DATE_PLACEHOLDER.getName())){
String nowDateFormatName = placeholder.get(PlaceholderEnum.NOW_DATE_PLACEHOLDER.getName());
String dateFormat = DateUtil.dateFormat(new Date(), nowDateFormatName);
privateParam = PlaceholderUtils.formatBizDateParam(privateParam, PlaceholderEnum.NOW_DATE_PLACEHOLDER.getName(), dateFormat,0);
}
}
runParamWrapped.setPrivateParam(privateParam);
mythJobTaskSchedule.setRunParam(JSON.toJSONString(runParamWrapped));
}
runParamWrapped.setPrivateParam(privateParam);
mythJobTaskSchedule.setRunParam(JSON.toJSONString(runParamWrapped));
}
//获取到公有参数
Map<String,String> publicParam = runParamWrapped.getPublicParamMap();
......
......@@ -177,7 +177,7 @@
<include refid="Base_Column_List" />
from run_recording
where run_id = #{runId,jdbcType=VARCHAR}
and flow_status = '3' and schedule_type != 4
and schedule_type != 4
</select>
<select id="findUnFinishByRunId" resultMap="BaseResultMap">
......
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