Commit 6c07e60b by huangfusuper

增加运行实例过滤条件 过滤立即运行状态的实例

parent a2df52fd
......@@ -38,15 +38,13 @@
<select id="findAll" parameterType="com.byit.dto.FlowConditionDto" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from run_recording
<trim prefix="WHERE" prefixOverrides="AND |OR">
from run_recording where schedule_type != 4
<if test="workspaceId != null">
and workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
<if test="flowName != null and flowName != ''">
and flow_name = #{flowName,jdbcType=VARCHAR}
</if>
</trim>
</select>
<select id="findAllError" parameterType="com.byit.dto.FlowConditionDto" resultMap="BaseResultMap">
......@@ -54,7 +52,7 @@
<include refid="Base_Column_List" />
from run_recording
where (flow_run_result = '2' or flow_run_result = '4'
or flow_run_result = '5')
or flow_run_result = '5') and schedule_type != 4
<if test="workspaceId != null">
and workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
......@@ -69,6 +67,7 @@
<include refid="Base_Column_List" />
from run_recording
where (flow_status = '2' or flow_status = '3')
and schedule_type != 4
<if test="workspaceId != null">
AND workspace_id = #{workspaceId,jdbcType=INTEGER}
</if>
......@@ -82,41 +81,41 @@
select
<include refid="Base_Column_List" />
from run_recording
where flow_status ='4' and is_alarm = '1'
where flow_status ='4' and is_alarm = '1' and schedule_type != 4
</select>
<select id="findAllByRunID" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from run_recording
where run_id=#{runId,jdbcType=VARCHAR} and is_inner = '1'
where run_id=#{runId,jdbcType=VARCHAR} and is_inner = '1' and schedule_type != 4
</select>
<!--查询运行中的-->
<select id="findRunningRunRecording" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from run_recording
where flow_status = '2'
where flow_status = '2' and schedule_type != 4
</select>
<select id="findRunRecordingByFlowId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from run_recording where flow_id = #{flowId,jdbcType=INTEGER}
from run_recording where flow_id = #{flowId,jdbcType=INTEGER} and schedule_type != 4
</select>
<select id="findRunRecordingByFlowIdAndRunId" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
from run_recording
where run_id = #{runId,jdbcType=VARCHAR} and flow_id = #{flowId,jdbcType=INTEGER}
where run_id = #{runId,jdbcType=VARCHAR} and flow_id = #{flowId,jdbcType=INTEGER} and schedule_type != 4
</select>
<select id="findRunRecordingById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from run_recording
where recording_id = #{recordingId,jdbcType=INTEGER}
where recording_id = #{recordingId,jdbcType=INTEGER} and schedule_type != 4
</select>
<select id="findOnScheduleByFlowId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -124,7 +123,7 @@
<include refid="Base_Column_List" />
from run_recording
where flow_id = #{flowId,jdbcType=INTEGER}
and flow_status not in ('1','4')
and flow_status not in ('1','4') and schedule_type != 4
</select>
<select id="findUnStartByFlowId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -132,7 +131,7 @@
<include refid="Base_Column_List" />
from run_recording
where flow_id = #{flowId,jdbcType=INTEGER}
and flow_status = '1'
and flow_status = '1' and schedule_type != 4
</select>
<select id="findStopRunCordByRunId" parameterType="string" resultMap="BaseResultMap">
......@@ -140,7 +139,7 @@
<include refid="Base_Column_List" />
from run_recording
where run_id = #{runId,jdbcType=VARCHAR}
and flow_status = '3'
and flow_status = '3' and schedule_type != 4
</select>
<select id="findUnFinishByRunId" resultMap="BaseResultMap">
......@@ -148,7 +147,7 @@
<include refid="Base_Column_List" />
from run_recording
where run_id = #{runId,jdbcType=VARCHAR}
and flow_status != '4'
and flow_status != '4' and schedule_type != 4
<if test="flowIdList != null">
and flow_id in (
<foreach collection="flowIdList" item="flowId" separator=",">
......@@ -163,6 +162,7 @@
from run_recording
where trigger_time &gt;= #{startDate}
and trigger_time &lt;= #{endDate}
and schedule_type != 4
<if test="flowIds != null">
and flow_id in (
<foreach collection="flowIds" item="flowId" separator=",">
......@@ -192,14 +192,14 @@
select
<include refid="Base_Column_List" />
from run_recording
where run_id = #{runId,jdbcType=VARCHAR} and flow_name = #{flowName,jdbcType=VARCHAR}
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" />
from run_recording
where flow_id = #{flowId}
and flow_status != '4'
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,
......@@ -210,7 +210,7 @@
sum(case when flow_run_result='5' then 1 else 0 end ) 'kill'
from run_recording
where (end_time &lt;= #{endTime} or start_time &lt;= #{endTime})
and start_time &gt;= #{startTime}
and start_time &gt;= #{startTime} and schedule_type != 4
<if test="flowIdList != null">
and flow_id in (
<foreach collection="flowIdList" item="flowId" separator=",">
......@@ -223,6 +223,7 @@
select <include refid="Base_Column_List" />
from run_recording
where flow_id = #{flowId}
and schedule_type != 4
and start_time = (select max(start_time)
from run_recording
where flow_id = #{flowId}
......@@ -233,6 +234,7 @@
<include refid="Base_Column_List" />
from run_recording
where flow_id = #{flowId}
and schedule_type != 4
and (
start_time &gt;= #{preHourDate}
or end_time &gt;= #{preHourDate}
......@@ -245,6 +247,7 @@
<include refid="Base_Column_List" />
from run_recording
where flow_id = #{flowId}
and schedule_type != 4
and trigger_time = (
select max(trigger_time)
from run_recording
......@@ -258,6 +261,7 @@
from run_recording
where start_time &gt;= #{startTime}
and start_time &lt;= #{endTime}
and schedule_type != 4
<if test="flowIdList != null">
and flow_id in (
<foreach collection="flowIdList" item="flowId" separator=",">
......
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