2025-12-10 08:24:27 +00:00
|
|
|
|
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
|
|
|
|
|
|
|
|
|
|
|
import kd.bos.dataentity.OperateOption;
|
|
|
|
|
|
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.logging.Log;
|
|
|
|
|
|
import kd.bos.logging.LogFactory;
|
|
|
|
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|
|
|
|
|
import kd.bos.servicehelper.operation.OperationServiceHelper;
|
2025-12-10 09:50:15 +00:00
|
|
|
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
2025-12-10 08:24:27 +00:00
|
|
|
|
import kd.sdk.plugin.Plugin;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 单据操作插件
|
|
|
|
|
|
* 物料保存操作后,将是否个性字段置为false
|
|
|
|
|
|
*/
|
|
|
|
|
|
public class MaterialSaveOp extends AbstractOperationServicePlugIn implements Plugin {
|
|
|
|
|
|
private static final Log log = LogFactory.getLog(MaterialSaveOp.class);
|
|
|
|
|
|
@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_checkboxfield", false);
|
2025-12-10 09:50:15 +00:00
|
|
|
|
SaveServiceHelper.save(new DynamicObject[]{material});
|
2025-12-10 08:24:27 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|