品牌、供应商保存后操作设置中台id
This commit is contained in:
parent
49168a1a58
commit
07300e443a
|
|
@ -3,15 +3,26 @@ package tqq9.lc123.cloud.app.plugin.operate.sys;
|
|||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
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;
|
||||
import oadd.org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 单据操作插件
|
||||
* 品牌保存后设置中台品牌id
|
||||
*/
|
||||
public class BrandSaveAfterOp extends AbstractOperationServicePlugIn implements Plugin {
|
||||
@Override
|
||||
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||||
super.afterExecuteOperationTransaction(e);
|
||||
|
||||
DynamicObject[] dataEntities = e.getDataEntities();
|
||||
for (DynamicObject dataEntity : dataEntities) {
|
||||
String tqq9_ztsupplierid = dataEntity.getString("tqq9_ztbrandid");
|
||||
if (StringUtils.isBlank(tqq9_ztsupplierid)) {
|
||||
dataEntity.set("tqq9_ztbrandid", dataEntity.getPkValue());
|
||||
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +1,29 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
||||
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
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;
|
||||
import oadd.org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 单据操作插件
|
||||
* 供应商保存后设置中台供应商id
|
||||
*/
|
||||
public class SupSaveAfterOp extends AbstractOperationServicePlugIn implements Plugin {
|
||||
|
||||
@Override
|
||||
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||||
super.afterExecuteOperationTransaction(e);
|
||||
DynamicObject[] dataEntities = e.getDataEntities();
|
||||
for (DynamicObject dataEntity : dataEntities) {
|
||||
String tqq9_ztsupplierid = dataEntity.getString("tqq9_ztsupplierid");
|
||||
if (StringUtils.isBlank(tqq9_ztsupplierid)) {
|
||||
dataEntity.set("tqq9_ztsupplierid", dataEntity.getPkValue());
|
||||
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue