【物料个性字段修改】保存和提交后 将【是否修改个性字段】设置为false
This commit is contained in:
parent
1c1d3a478b
commit
4e50e8db08
|
|
@ -0,0 +1,29 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料保存或者提交后,将是否修改个性字段修改为false 锁定住物料自行字段
|
||||||
|
*/
|
||||||
|
public class MaterialSaveAndSubmitOp extends AbstractOperationServicePlugIn {
|
||||||
|
|
||||||
|
|
||||||
|
@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);
|
||||||
|
SaveServiceHelper.save(new DynamicObject[]{material});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -55,17 +55,4 @@ public class MaterialSaveOp extends AbstractOperationServicePlugIn implements Pl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@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);
|
|
||||||
SaveServiceHelper.save(new DynamicObject[]{material});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue