增加能力申请 是否存在子单驳回的情况
This commit is contained in:
parent
bf684bacbb
commit
3a87c7381d
|
@ -180,6 +180,23 @@ public class TAbilityApplicationController {
|
|||
Boolean ended = jdbcTemplate.queryForObject(sql, Boolean.class);
|
||||
index.setEnded(Boolean.TRUE.equals(ended));
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断该次申请是否存在驳回的子单
|
||||
*/
|
||||
// 该条申请的实例id列表
|
||||
String inStanceIdsSql = String.format("SELECT DISTINCT instance_id FROM t_ability_application WHERE apply_flag = '%s';", index.getApplyFlag());
|
||||
List<Map<String, Object>> inStanceIds = jdbcTemplate.queryForList(inStanceIdsSql);
|
||||
index.setBackToFirst(inStanceIds.stream().map(inStanceId_ -> {
|
||||
List<Task> listTask = taskService.createTaskQuery().processInstanceId(inStanceId_.get("instance_id").toString())
|
||||
.includeProcessVariables().includeTaskLocalVariables().list();
|
||||
return listTask.stream().anyMatch(task ->
|
||||
task.getProcessVariables().containsKey("backToFirst") ?
|
||||
(task.getProcessVariables().get("backToFirst") != null ? Boolean.valueOf(task.getProcessVariables().get("backToFirst").toString()) : Boolean.FALSE)
|
||||
: Boolean.FALSE
|
||||
);
|
||||
}).filter(i -> i).findAny().isPresent()); // 子单内是否存在驳回流程
|
||||
|
||||
/**
|
||||
* 处理催办条件与催办信息
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue