Commit 6c07e60b by huangfusuper

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

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