优化代码

This commit is contained in:
xiaoshi 2024-12-14 17:06:07 +08:00
parent ad571b823a
commit 718f345f16
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ public class DynamicSetPMApprovalFlowPlugin implements IWorkflowPlugin {
// 获取单据体中的经理字段将用户设置为当前单据的当前节点的审批人 // 获取单据体中的经理字段将用户设置为当前单据的当前节点的审批人
DynamicObject obj = BusinessDataServiceHelper.loadSingle(pkId, entityNumber); DynamicObject obj = BusinessDataServiceHelper.loadSingle(pkId, entityNumber);
DynamicObject project = obj.getDynamicObject("project"); DynamicObject project = obj.getDynamicObject("project");
DynamicObject zcgjManger = project.getDynamicObject("zcgj_pm"); DynamicObject projectInfo = BusinessDataServiceHelper.loadSingle(project.getLong("id"), "ec_project");
DynamicObject zcgjManger = projectInfo.getDynamicObject("zcgj_pm");
long userId = zcgjManger.getLong("id"); long userId = zcgjManger.getLong("id");
ApproversIdList.add(userId); ApproversIdList.add(userId);
// 返回审批人的id集合 // 返回审批人的id集合