32 lines
1.5 KiB
Java
32 lines
1.5 KiB
Java
|
|
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
||
|
|
|
||
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
||
|
|
import kd.bos.entity.operate.result.OperationResult;
|
||
|
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||
|
|
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||
|
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||
|
|
import kd.sdk.plugin.Plugin;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 单据操作插件
|
||
|
|
* 物料反审核 将是否推送广州、北京、W、业务中台的复选框置为false
|
||
|
|
*/
|
||
|
|
public class MaterialUnauditOp extends AbstractOperationServicePlugIn implements Plugin {
|
||
|
|
@Override
|
||
|
|
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||
|
|
super.afterExecuteOperationTransaction(e);
|
||
|
|
OperationResult operationResult = this.getOperationResult();
|
||
|
|
if (operationResult.isSuccess()) {
|
||
|
|
DynamicObject[] dataEntities = e.getDataEntities();
|
||
|
|
for (DynamicObject material : dataEntities) {
|
||
|
|
material = BusinessDataServiceHelper.loadSingle(material.getPkValue(), material.getDynamicObjectType().getName());
|
||
|
|
material.set("tqq9_pushgz", false);//是否推送广州
|
||
|
|
material.set("tqq9_pushbj", false);//是否推送北京
|
||
|
|
material.set("tqq9_pushw", false);//是否推送W
|
||
|
|
material.set("tqq9_pushywzt", false);//是否推送业务中台
|
||
|
|
SaveServiceHelper.save(new DynamicObject[]{material});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|