Commit c0d36ed8 by guominglei

将暂停放宽到未运行的也可以暂停

parent 0f1e69bf
......@@ -1490,7 +1490,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
ValidationUtil.dataNotNull(flow, flowName + "工作流不存在");
ValidationUtil.isTrueValidation(FlowPropertyEnum.IS_INNER.getCode().equals(flow.getIsInner()), "内嵌工作流不允许停止调度!");
//判断是否在调度中
List<RunRecording> recordingList = runRecordingMapper.findOnScheduleByFlowId(flow.getFlowId());
List<RunRecording> recordingList = runRecordingMapper.findUnFinishByFlowId(flow.getFlowId());
ValidationUtil.isTrueValidation(null == recordingList || recordingList.size() == 0 , flowName + "工作流没有正在运行的调度!");
StringBuffer runids = new StringBuffer();
//暂停工作流调度
......
......@@ -209,6 +209,7 @@
from run_recording
where run_id = #{runId,jdbcType=VARCHAR} and flow_name = #{flowName,jdbcType=VARCHAR} and schedule_type != 4
</select>
<select id="findUnFinishByFlowId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
......@@ -216,6 +217,7 @@
where flow_id = #{flowId}
and flow_status != '4' and schedule_type != 4
</select>
<select id="findStatusByStartAndEndTime" resultType="com.byit.dto.plugin.StatisticData" useCache="false" flushCache="true">
select sum(case when flow_status = '1' then 1 else 0 end ) unstart,
sum(case when flow_status='2' then 1 else 0 end ) runIng,
......@@ -234,6 +236,7 @@
)
</if>
</select>
<select id="findMaxByFlowId" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from run_recording
......
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