Commit 0ff927b5 by guominglei

补批添加要补批的时间

parent 185bea57
......@@ -1004,6 +1004,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
waitingRecord.setFlowNodeCount(nodeList.size());
waitingRecord.setOperator(userName);
waitingRecord.setScheduleType(ScheduleTypeEnum.REPAIR.getCode());
waitingRecord.setRepeatTime(repairTime);
waitingRecord.setWaitOrder(++order);
//需要按着时间先后来设置时间
waitingRecord.setTriggerTime(System.currentTimeMillis());
......
......@@ -160,6 +160,12 @@ public class RunRecording implements Serializable {
private Integer workspaceId;
/**
* 补批时间
*/
@ApiModelProperty("补批时间")
private String repeatTime;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -113,6 +113,11 @@ public class WaitingRecord implements Serializable {
private String runId;
/**
* 补批时间
*/
@ApiModelProperty("补批时间")
private String repeatTime;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -26,12 +26,13 @@
<result column="operator" jdbcType="VARCHAR" property="operator" />
<result column="re_run_id" jdbcType="VARCHAR" property="reRunId" />
<result column="workspace_id" jdbcType="INTEGER" property="workspaceId" />
<result column="repeat_time" jdbcType="VARCHAR" property="repeatTime" />
</resultMap>
<sql id="Base_Column_List">
recording_id, run_id, alarm_email, dispatch_ip, flow_name, flow_run_result, flow_status,
flow_timeout, flow_version_name, alarml_action, priority, trigger_time, principal,
flow_id, start_time, end_time, is_alarm,is_inner,fail_fast, flow_node_count, schedule_type, operator, re_run_id
,workspace_id
,workspace_id, repeat_time
</sql>
<select id="findAll" parameterType="com.byit.dto.FlowConditionDto" resultMap="BaseResultMap">
......@@ -187,12 +188,12 @@
</select>
<select id="findByRunIdAndFlowName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from run_recording
where run_id = #{runId,jdbcType=VARCHAR} and flow_name = #{flowName,jdbcType=VARCHAR}
</select>
<select id="findByRunIdAndFlowName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from run_recording
where run_id = #{runId,jdbcType=VARCHAR} and flow_name = #{flowName,jdbcType=VARCHAR}
</select>
<select id="findUnFinishByFlowId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
......@@ -208,8 +209,8 @@
sum(case when flow_status='4' and (flow_run_result = '2' or flow_run_result = '4') then 1 else 0 end ) fail,
sum(case when flow_run_result='5' then 1 else 0 end ) 'kill'
from run_recording
where start_time &gt;= #{startTime}
and start_time &lt;= #{endTime}
where (end_time &lt;= #{endTime} or start_time &lt;= #{endTime})
and start_time &gt;= #{startTime}
<if test="flowIdList != null">
and flow_id in (
<foreach collection="flowIdList" item="flowId" separator=",">
......@@ -355,6 +356,9 @@
<if test="workspaceId != null">
workspace_id,
</if>
<if test="repeatTime != null">
repeat_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordingId != null">
......@@ -429,6 +433,9 @@
<if test="workspaceId != null">
#{workspaceId,jdbcType=INTEGER},
</if>
<if test="repeatTime != null">
#{repeatTime,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateRunRecordingById" parameterType="com.byit.model.RunRecording">
......@@ -503,6 +510,9 @@
<if test="workspaceId != null">
workspace_id = #{workspaceId,jdbcType=INTEGER},
</if>
<if test="repeatTime != null">
repeat_time = #{repeatTime,jdbcType=VARCHAR},
</if>
</set>
where recording_id = #{recordingId,jdbcType=INTEGER}
</update>
......@@ -579,6 +589,9 @@
<if test="workspaceId != null">
workspace_id = #{workspaceId,jdbcType=INTEGER},
</if>
<if test="repeatTime != null">
repeat_time = #{repeatTime,jdbcType=VARCHAR},
</if>
</set>
where flow_id = #{flowId,jdbcType=INTEGER} and run_id = #{runId,jdbcType=VARCHAR}
</update>
......
......@@ -19,12 +19,13 @@
<result column="operator" jdbcType="VARCHAR" property="operator" />
<result column="wait_order" jdbcType="INTEGER" property="waitOrder" />
<result column="run_id" jdbcType="VARCHAR" property="runId" />
<result column="repeat_time" jdbcType="VARCHAR" property="repeatTime" />
</resultMap>
<sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2020-03-12 -->
wait_id, flow_id, flow_name, flow_version_name, flow_timeout, alarm_email, alarml_action,
priority, trigger_time, principal, is_inner, flow_node_count, schedule_type, `operator`,
wait_order, run_id
wait_order, run_id, repeat_time
</sql>
<select id="findAllByTriggerTime" resultMap="BaseResultMap">
......@@ -125,6 +126,9 @@
<if test="runId != null">
run_id,
</if>
<if test="repeatTime != null">
repeat_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="waitId != null">
......@@ -175,6 +179,9 @@
<if test="runId != null">
#{runId,jdbcType=VARCHAR},
</if>
<if test="repeatTime != null">
#{repeatTime,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByIdSelective" parameterType="com.byit.model.WaitingRecord">
......@@ -226,6 +233,9 @@
<if test="runId != null">
run_id = #{runId,jdbcType=VARCHAR},
</if>
<if test="repeatTime != null">
repeat_time = #{repeatTime,jdbcType=VARCHAR},
</if>
</set>
where wait_id = #{waitId,jdbcType=INTEGER}
</update>
......
package com.byit.dto.plugin;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......@@ -125,6 +126,11 @@ public class RunRecording implements Serializable {
*/
private String operator;
/**
* 补批时间
*/
private String repeatTime;
/**
*/
......
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