Merge branch 'master' into docker_package
This commit is contained in:
commit
359df7a17b
|
@ -35,8 +35,6 @@ import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.activiti.engine.HistoryService;
|
import org.activiti.engine.HistoryService;
|
||||||
import org.activiti.engine.RuntimeService;
|
import org.activiti.engine.RuntimeService;
|
||||||
import org.activiti.engine.history.HistoricProcessInstance;
|
|
||||||
import org.activiti.engine.history.HistoricProcessInstanceQuery;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -47,7 +45,10 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -108,26 +109,7 @@ public class TAbilityApplicationController {
|
||||||
if (inStanceId == null) {
|
if (inStanceId == null) {
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery().processInstanceIds(new HashSet<String>() {
|
|
||||||
{
|
|
||||||
add(inStanceId + "");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
HistoricProcessInstance historicProcessInstance = query.singleResult();
|
|
||||||
if (historicProcessInstance != null && historicProcessInstance.getEndTime() != null) {
|
|
||||||
index.setEnded(true);
|
|
||||||
} else {
|
|
||||||
index.setEnded(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExecutionEntity execution = (ExecutionEntity) runtimeService.createExecutionQuery().processInstanceId(inStanceId + "").singleResult();
|
|
||||||
// if (execution != null) {
|
|
||||||
// index.setEnded(execution.isEnded()); // 流程引擎内是否已结束
|
|
||||||
// } else {
|
|
||||||
// if (params.containsKey("ended")) {
|
|
||||||
// index.setEnded(Boolean.valueOf(params.get("ended").toString()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
List<TAbilityApplicationDTO> dtos =
|
List<TAbilityApplicationDTO> dtos =
|
||||||
tAbilityApplicationService.getByInstanceId(inStanceId + "");
|
tAbilityApplicationService.getByInstanceId(inStanceId + "");
|
||||||
if (!dtos.isEmpty()) {
|
if (!dtos.isEmpty()) {
|
||||||
|
@ -145,6 +127,11 @@ public class TAbilityApplicationController {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (params.containsKey("ended")) {
|
||||||
|
index.setEnded(Boolean.valueOf(params.get("ended").toString()));
|
||||||
|
} else {
|
||||||
|
index.setEnded(false);
|
||||||
|
}
|
||||||
return index;
|
return index;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
|
@ -228,18 +215,12 @@ public class TAbilityApplicationController {
|
||||||
camera = cameraList;
|
camera = cameraList;
|
||||||
|
|
||||||
List<Object> finalCamera = camera;
|
List<Object> finalCamera = camera;
|
||||||
HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery().processInstanceIds(new HashSet<String>() {
|
|
||||||
{
|
|
||||||
add(tAbilityApplicationDTOList.get(0).getInstanceId() + "");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
HistoricProcessInstance historicProcessInstance = query.singleResult();
|
|
||||||
Map<String, Object> resourceApplication = new HashMap<String, Object>() {
|
Map<String, Object> resourceApplication = new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id
|
put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id
|
||||||
put("resourceOwnerDept", tAbilityApplicationDTOList.get(0).getResourceOwnerDept()); // 资源所属部门信息
|
put("resourceOwnerDept", tAbilityApplicationDTOList.get(0).getResourceOwnerDept()); // 资源所属部门信息
|
||||||
put("resources", resourceDTOS);//申请的该部门的能力资源
|
put("resources", resourceDTOS);//申请的该部门的能力资源
|
||||||
if (historicProcessInstance != null && historicProcessInstance.getEndTime() != null) {
|
if (tAbilityApplicationDTOList.get(0).getApplyFlag().equals("通过")) {
|
||||||
put("ended", true);
|
put("ended", true);
|
||||||
} else {
|
} else {
|
||||||
put("ended", false);
|
put("ended", false);
|
||||||
|
|
Loading…
Reference in New Issue