优化代码 项目更新项目经理
This commit is contained in:
parent
afa260f40d
commit
97416d354f
|
@ -0,0 +1,23 @@
|
|||
package zcgj.zcdev.zcdev.pr.plugin.operate;
|
||||
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.entity.operate.result.OperationResult;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
|
||||
public class ProjectUpdateOp extends AbstractOperationServicePlugIn {
|
||||
@Override
|
||||
public void onAddValidators(AddValidatorsEventArgs e) {
|
||||
super.onAddValidators(e);
|
||||
|
||||
DynamicObject[] dataEntities1 = e.getDataEntities();
|
||||
DynamicObject object = dataEntities1[0];
|
||||
DynamicObject pm = object.getDynamicObject("zcgj_pm");
|
||||
if (pm == null) {
|
||||
DynamicObject project = object.getDynamicObject("project");
|
||||
project.set("zcgj_pm",pm);
|
||||
OperationResult saveOperationResult = SaveServiceHelper.saveOperate("ec_project", new DynamicObject[]{project}, null);//项目实体
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue