Commit 2174042b by guo_minglei@163.com

修改查询快照条件

parent f32d55e8
...@@ -174,7 +174,7 @@ public interface RunRecordingMapper { ...@@ -174,7 +174,7 @@ public interface RunRecordingMapper {
RunRecording findMaxByFlowId(@Param("flowId")Integer flowId); RunRecording findMaxByFlowId(@Param("flowId")Integer flowId);
/** /**
* 查询过去一小时的运行实例 * 查询过去一个小时的和未完成的工作流实例
* @param preHourDate * @param preHourDate
* @param flowId * @param flowId
* @return * @return
......
...@@ -86,6 +86,7 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper { ...@@ -86,6 +86,7 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
flowStatusSnapshoot.setUnstartNode(flow.getFlowNodeCount()); flowStatusSnapshoot.setUnstartNode(flow.getFlowNodeCount());
flowStatusSnapshootList.add(flowStatusSnapshoot); flowStatusSnapshootList.add(flowStatusSnapshoot);
} else { //存在工作流的运行实例 } else { //存在工作流的运行实例
//查询过去一个小时的和未完成的工作流实例
List<RunRecording> runRecordingList = runRecordingMapper.findByPreTime(new Date(preHourTime), flow.getFlowId()); List<RunRecording> runRecordingList = runRecordingMapper.findByPreTime(new Date(preHourTime), flow.getFlowId());
runRecordingList.forEach(runRecording -> { runRecordingList.forEach(runRecording -> {
FlowStatusSnapshoot hourFlowStatusSnapshoot = new FlowStatusSnapshoot(); FlowStatusSnapshoot hourFlowStatusSnapshoot = new FlowStatusSnapshoot();
......
...@@ -181,7 +181,10 @@ ...@@ -181,7 +181,10 @@
<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 start_time &gt;= #{preHourDate} and (
start_time &gt;= #{preHourDate}
or flow_status != '4'
)
</select> </select>
<delete id="deleteById" parameterType="java.lang.Integer"> <delete id="deleteById" parameterType="java.lang.Integer">
......
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