Merge branch 'master' into docker_package
This commit is contained in:
commit
d63a28e73e
|
@ -32,7 +32,11 @@ import io.swagger.annotations.Api;
|
|||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.activiti.engine.HistoryService;
|
||||
import org.activiti.engine.history.HistoricProcessInstance;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -55,6 +59,7 @@ import java.util.stream.Collectors;
|
|||
@RequestMapping("processForm/tabilityapplication")
|
||||
@Api(tags = "能力申请表单")
|
||||
public class TAbilityApplicationController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(TAbilityApplicationController.class);
|
||||
@Autowired
|
||||
private TAbilityApplicationService tAbilityApplicationService;
|
||||
@Autowired
|
||||
|
@ -69,6 +74,8 @@ public class TAbilityApplicationController {
|
|||
private CameraChannelMapper cameraChannelMapper;
|
||||
@Autowired
|
||||
private SysDeptService sysDeptService;
|
||||
@Autowired
|
||||
protected HistoryService historyService;
|
||||
@Value("${project.place}")
|
||||
private Integer projectPlace;
|
||||
|
||||
|
@ -169,6 +176,21 @@ public class TAbilityApplicationController {
|
|||
return new Result<String>().ok(LocalDateTime.now().toString());
|
||||
}
|
||||
|
||||
// 获取流程内参数
|
||||
// @GetMapping("test")
|
||||
// public Result<String> tt(String id) {
|
||||
// HistoricProcessInstance processInstanceDTO =
|
||||
// historyService.createHistoricProcessInstanceQuery().processInstanceId(id).includeProcessVariables().singleResult();
|
||||
// if (processInstanceDTO != null) {
|
||||
// logger.info(processInstanceDTO.getProcessVariables().toString());
|
||||
// if (processInstanceDTO.getProcessVariables().containsKey("backToFirst")) {
|
||||
// logger.info(processInstanceDTO.getProcessVariables().getOrDefault("backToFirst", "false") + "");
|
||||
// }
|
||||
// return new Result<String>().ok(JSON.toJSONString(processInstanceDTO.getProcessVariables()));
|
||||
// }
|
||||
// return new Result<String>().ok(LocalDateTime.now().toString());
|
||||
// }
|
||||
|
||||
@GetMapping("getByApplyFlag/{applyFlag}")
|
||||
@ApiOperation("根据申请标识获取能力申请信息")
|
||||
@LogOperation("根据申请标识获取能力申请信息")
|
||||
|
@ -226,6 +248,23 @@ public class TAbilityApplicationController {
|
|||
camera = cameraList;
|
||||
|
||||
List<Object> finalCamera = camera;
|
||||
|
||||
boolean backToFirst = false;
|
||||
|
||||
HistoricProcessInstance processInstanceDTO =
|
||||
historyService.createHistoricProcessInstanceQuery().processInstanceId(tAbilityApplicationDTOList.get(0).getInstanceId()).includeProcessVariables().singleResult();
|
||||
if (processInstanceDTO != null) {
|
||||
logger.info(JSON.toJSONString(processInstanceDTO.getProcessVariables()));
|
||||
if (processInstanceDTO.getProcessVariables().containsKey("backToFirst")) {
|
||||
try {
|
||||
backToFirst = Boolean.parseBoolean(processInstanceDTO.getProcessVariables().getOrDefault("backToFirst", "false").toString());
|
||||
} catch (Exception exception) {
|
||||
logger.info("{}未被驳回", tAbilityApplicationDTOList.get(0).getInstanceId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean finalBackToFirst = backToFirst;
|
||||
return new HashMap<String, Object>() {
|
||||
{
|
||||
put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id
|
||||
|
@ -241,6 +280,7 @@ public class TAbilityApplicationController {
|
|||
if (!finalCamera.isEmpty()) {
|
||||
put("camera", finalCamera); // 流程详情
|
||||
}
|
||||
put("backToFirst", finalBackToFirst);
|
||||
}
|
||||
};
|
||||
}).filter(Objects::nonNull).collect(Collectors.groupingBy(t -> {
|
||||
|
|
Loading…
Reference in New Issue