|
|
|
|
@ -2,6 +2,7 @@ package org.springblade.plugin.homepage.service.impl; |
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import liquibase.pro.packaged.E; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
|
|
import org.flowable.engine.HistoryService; |
|
|
|
|
@ -172,13 +173,16 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
|
|
|
|
|
|
for(Task task : listNeedDo){ |
|
|
|
|
String executionId = task.getExecutionId(); |
|
|
|
|
System.out.println("executionid--" + executionId); |
|
|
|
|
Map<String, Object> variables = runtimeService.getVariables(task.getExecutionId()); |
|
|
|
|
|
|
|
|
|
Date qiwangwanchengshijian = DateUtil.parse(variables.get("qiwangwanchengshijian").toString(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
Duration between = DateUtil.between(qiwangwanchengshijian, DateUtil.now()); |
|
|
|
|
if(!between.isNegative()){ //between.isNegative() true ,现在时间小于任务结束时间,false消灾时间大于任务结束时间
|
|
|
|
|
expireNum ++; |
|
|
|
|
try { |
|
|
|
|
Date qiwangwanchengshijian = DateUtil.parse(variables.get("qiwangwanchengshijian").toString(), "yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
Duration between = DateUtil.between(qiwangwanchengshijian, DateUtil.now()); |
|
|
|
|
if (!between.isNegative()) { //between.isNegative() true ,现在时间小于任务结束时间,false消灾时间大于任务结束时间
|
|
|
|
|
expireNum++; |
|
|
|
|
} |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -474,7 +478,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
|
if(StringUtils.contains(historicActivityInstance.getActivityName(), "审批")){ |
|
|
|
|
map.put("审批中", map.get("审批中") == null ? 1 : map.get("审批中") + 1); |
|
|
|
|
}else{ |
|
|
|
|
map.put("运行中", map.get("运行中") == null ? 1 : map.get("运行中") + 1); |
|
|
|
|
map.put("进行中", map.get("进行中") == null ? 1 : map.get("进行中") + 1); |
|
|
|
|
} |
|
|
|
|
// map.put(historicActivityInstance.getActivityName(), map.get(historicActivityInstance.getActivityName()) == null ? 1 : map.get(historicActivityInstance.getActivityName()) + 1);
|
|
|
|
|
} |
|
|
|
|
|