Commit 0b8ad423 by guo_minglei@163.com

修改参数类型

parent f2b2c046
...@@ -748,7 +748,7 @@ public class ApiFlowServiceImpl implements ApiFlowService { ...@@ -748,7 +748,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
} }
//如果工作空间下面有数据 //如果工作空间下面有数据
if (flowIdList.size() > 0){ if (flowIdList.size() > 0){
StatisticData flowStatisticData = runRecordingMapper.findStatusByStartAndEndTime(startTime, endTime, flowIdList); StatisticData flowStatisticData = runRecordingMapper.findStatusByStartAndEndTime(new Date(startTime), new Date(endTime), flowIdList);
StatisticData unstartflowStatisticData = waitingRecordMapper.findStatusByStartAndEndTime(flowIdList); StatisticData unstartflowStatisticData = waitingRecordMapper.findStatusByStartAndEndTime(flowIdList);
if (null != unstartflowStatisticData){ if (null != unstartflowStatisticData){
flowStatisticData.setUnstart(flowStatisticData.getUnstart() + unstartflowStatisticData.getUnstart()); flowStatisticData.setUnstart(flowStatisticData.getUnstart() + unstartflowStatisticData.getUnstart());
...@@ -972,7 +972,8 @@ public class ApiFlowServiceImpl implements ApiFlowService { ...@@ -972,7 +972,8 @@ public class ApiFlowServiceImpl implements ApiFlowService {
waitingRecord.setOperator(userName); waitingRecord.setOperator(userName);
waitingRecord.setScheduleType(ScheduleTypeEnum.REPAIR.getCode()); waitingRecord.setScheduleType(ScheduleTypeEnum.REPAIR.getCode());
waitingRecord.setWaitOrder(++order); waitingRecord.setWaitOrder(++order);
waitingRecord.setTriggerTime(triggerTime); //需要按着时间先后来设置时间
waitingRecord.setTriggerTime(System.currentTimeMillis());
//设置实例 //设置实例
BeanUtils.copyProperties(waitingRecord, runRecording); BeanUtils.copyProperties(waitingRecord, runRecording);
runRecording.setFlowStatus("1"); runRecording.setFlowStatus("1");
...@@ -991,6 +992,14 @@ public class ApiFlowServiceImpl implements ApiFlowService { ...@@ -991,6 +992,14 @@ public class ApiFlowServiceImpl implements ApiFlowService {
} }
public static void main(String[] args) throws InterruptedException {
Long triggerTime = System.currentTimeMillis();
for (int i =0; i< 10; i++ ){
Thread.sleep(100);
System.out.println(triggerTime);
}
}
private Map<String, List<WaitingTask>> buildTask(List<Node> nodeList, List<String> nodeNameList, List<String> repairTimeList, Long triggerTime, String flowName){ private Map<String, List<WaitingTask>> buildTask(List<Node> nodeList, List<String> nodeNameList, List<String> repairTimeList, Long triggerTime, String flowName){
Map<String, List<WaitingTask>> result = new HashMap<>(); Map<String, List<WaitingTask>> result = new HashMap<>();
String usernName = currentUserUtils.account(); String usernName = currentUserUtils.account();
......
...@@ -167,8 +167,8 @@ public interface RunRecordingMapper { ...@@ -167,8 +167,8 @@ public interface RunRecordingMapper {
* @param flowIdList * @param flowIdList
* @return * @return
*/ */
StatisticData findStatusByStartAndEndTime(@Param("startTime")Long startTime, StatisticData findStatusByStartAndEndTime(@Param("startTime")Date startTime,
@Param("endTime")Long endTime, @Param("endTime")Date endTime,
@Param("flowIdList")List<Integer> flowIdList); @Param("flowIdList")List<Integer> flowIdList);
RunRecording findMaxByFlowId(@Param("flowId")Integer flowId); RunRecording findMaxByFlowId(@Param("flowId")Integer flowId);
......
...@@ -129,8 +129,8 @@ ...@@ -129,8 +129,8 @@
sum(case when run_code = '2' or run_code = '4' or run_code = '6' then 1 else 0 end) as fail, sum(case when run_code = '2' or run_code = '4' or run_code = '6' then 1 else 0 end) as fail,
sum(case when run_code = '5' then 1 else 0 end) as 'kill' sum(case when run_code = '5' then 1 else 0 end) as 'kill'
from job_task_run_log from job_task_run_log
where start_time &gt;= #{startDate} where start_time &gt;= #{startTime}
and end_time &lt;= #{endDate} and end_time &lt;= #{endTime}
<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=",">
......
...@@ -157,8 +157,8 @@ ...@@ -157,8 +157,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_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' sum(case when flow_run_result='5' then 1 else 0 end ) 'kill'
from run_recording from run_recording
where start_time &gt;= #{startDate} where start_time &gt;= #{startTime}
and end_time &lt;= #{endDate} and end_time &lt;= #{endTime}
<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