32 lines
1.4 KiB
Java
32 lines
1.4 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.bos.servicehelper.user.UserServiceHelper;
|
|
import kd.sdk.plugin.Plugin;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 单据操作插件
|
|
* 物料提交 将修改人 赋给 物料修改人
|
|
*/
|
|
public class MaterialSubmitOp extends AbstractOperationServicePlugIn implements Plugin {
|
|
@Override
|
|
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
|
// super.afterExecuteOperationTransaction(e);
|
|
// OperationResult operationResult = this.getOperationResult();
|
|
// List<Object> successPkIds = operationResult.getSuccessPkIds();
|
|
// for (Object successPkId : successPkIds) {
|
|
// long userID = UserServiceHelper.getCurrentUserId();
|
|
// DynamicObject material = BusinessDataServiceHelper.loadSingle(successPkId, "bd_material");
|
|
// DynamicObject user = BusinessDataServiceHelper.loadSingle(userID, "bos_user");
|
|
// material.set("tqq9_auditor", user);
|
|
// SaveServiceHelper.save(new DynamicObject[]{material});
|
|
// }
|
|
}
|
|
} |