From 2ed76b5de3cab450008b35dec7d8c5ecf78d7a8f Mon Sep 17 00:00:00 2001 From: xiaosuonian <913474402@qq.com> Date: Sat, 16 Nov 2024 13:29:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=B4=E8=BF=9C=E5=AE=A1=E6=89=B9=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=90=8E=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=AE=A1=E6=89=B9=E9=A1=B5=E9=9D=A2=20--xief?= =?UTF-8?q?eng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shkd/todotask/closeTaskPagePlugin.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/main/java/shkd/todotask/closeTaskPagePlugin.java b/main/java/shkd/todotask/closeTaskPagePlugin.java index d1ccbdb..4135eed 100644 --- a/main/java/shkd/todotask/closeTaskPagePlugin.java +++ b/main/java/shkd/todotask/closeTaskPagePlugin.java @@ -1,10 +1,13 @@ package shkd.todotask; +import kd.bos.form.FormShowParameter; import kd.bos.logging.Log; import kd.bos.logging.LogFactory; +import kd.bos.mvc.form.FormView; import kd.bos.workflow.taskcenter.plugin.validate.IApprovalSubPlugin; import shkd.utils.OAUtils; +import java.util.HashMap; import java.util.Map; /** @@ -15,8 +18,24 @@ public class closeTaskPagePlugin implements IApprovalSubPlugin { @Override public boolean executeClosePageAfterSubmitTask(boolean isPCShow, Map customParams) { logger.info("进入页面关闭方法"); - logger.info("进入页面关闭方法"); - return false; + boolean flag = false; + FormView view = (FormView) customParams.get("formView"); + FormShowParameter parameter = view.getFormShowParameter(); + logger.info("获取view对象成功"); + HashMap map = new HashMap<>(); + if (parameter.getCustomParams().containsKey("apptype")) { + String apptype = parameter.getCustomParam("apptype"); + if ("zhiyuan".equals(apptype)) { + try { + view.close(); + }catch (Exception e) { + logger.info("发送指令时异常" + e.getMessage()); + throw new RuntimeException(e); + } + flag = true; + } + } + return flag; } }