Commit 0b8ad423 by guo_minglei@163.com

修改参数类型

parent f2b2c046
......@@ -748,7 +748,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
//如果工作空间下面有数据
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);
if (null != unstartflowStatisticData){
flowStatisticData.setUnstart(flowStatisticData.getUnstart() + unstartflowStatisticData.getUnstart());
......@@ -972,7 +972,8 @@ public class ApiFlowServiceImpl implements ApiFlowService {
waitingRecord.setOperator(userName);
waitingRecord.setScheduleType(ScheduleTypeEnum.REPAIR.getCode());
waitingRecord.setWaitOrder(++order);
waitingRecord.setTriggerTime(triggerTime);
//需要按着时间先后来设置时间
waitingRecord.setTriggerTime(System.currentTimeMillis());
//设置实例
BeanUtils.copyProperties(waitingRecord, runRecording);
runRecording.setFlowStatus("1");
......@@ -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){
Map<String, List<WaitingTask>> result = new HashMap<>();
String usernName = currentUserUtils.account();
......
......@@ -167,8 +167,8 @@ public interface RunRecordingMapper {
* @param flowIdList
* @return
*/
StatisticData findStatusByStartAndEndTime(@Param("startTime")Long startTime,
@Param("endTime")Long endTime,
StatisticData findStatusByStartAndEndTime(@Param("startTime")Date startTime,
@Param("endTime")Date endTime,
@Param("flowIdList")List<Integer> flowIdList);
RunRecording findMaxByFlowId(@Param("flowId")Integer flowId);
......
......@@ -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 = '5' then 1 else 0 end) as 'kill'
from job_task_run_log
where start_time &gt;= #{startDate}
and end_time &lt;= #{endDate}
where start_time &gt;= #{startTime}
and end_time &lt;= #{endTime}
<if test="flowIdList != null">
and flow_id in (
<foreach collection="flowIdList" item="flowId" separator=",">
......
......@@ -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_run_result='5' then 1 else 0 end ) 'kill'
from run_recording
where start_time &gt;= #{startDate}
and end_time &lt;= #{endDate}
where start_time &gt;= #{startTime}
and end_time &lt;= #{endTime}
<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