From aef7266a659f24e24a125b295f0445091ebc319d Mon Sep 17 00:00:00 2001 From: xiaoshi <2272816786@qq.com> Date: Tue, 10 Dec 2024 16:08:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=8F=E7=90=86=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pr/plugin/workflow/DynamicSetPMApprovalFlowPlugin.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/DynamicSetPMApprovalFlowPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/DynamicSetPMApprovalFlowPlugin.java index 6ef761e..a445601 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/DynamicSetPMApprovalFlowPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/workflow/DynamicSetPMApprovalFlowPlugin.java @@ -20,9 +20,11 @@ public class DynamicSetPMApprovalFlowPlugin implements IWorkflowPlugin { List ApproversIdList = new ArrayList<>(); // 获取单据id String pkId = execution.getBusinessKey(); + String entityNumber = execution.getEntityNumber(); // 获取单据体中的【经理】字段,,将用户设置为当前单据的当前节点的审批人 - DynamicObject obj = BusinessDataServiceHelper.loadSingle(pkId, "zcgj_test_work_bill"); - DynamicObject zcgjManger = obj.getDynamicObject("zcgj_manger"); + DynamicObject obj = BusinessDataServiceHelper.loadSingle(pkId, entityNumber); + DynamicObject project = obj.getDynamicObject("project"); + DynamicObject zcgjManger = project.getDynamicObject("zcgj_pm"); long userId = zcgjManger.getLong("id"); ApproversIdList.add(userId); // 返回审批人的id集合