From 3a87c7381d8728a6b4e5a40dc3e8cab78a2ccfb2 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 1 Dec 2022 15:47:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=83=BD=E5=8A=9B=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=20=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8=E5=AD=90?= =?UTF-8?q?=E5=8D=95=E9=A9=B3=E5=9B=9E=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TAbilityApplicationController.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java index fe7742c3..a3c7502f 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java @@ -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> inStanceIds = jdbcTemplate.queryForList(inStanceIdsSql); + index.setBackToFirst(inStanceIds.stream().map(inStanceId_ -> { + List 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()); // 子单内是否存在驳回流程 + /** * 处理催办条件与催办信息 */