dobe_comic8/main/java/shkd/repc/resm/opplugin/RegisteredFinishregOPPlugin...

50 lines
2.6 KiB
Java

package shkd.repc.resm.opplugin;
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 shkd.utils.DobeDWUtils;
/**
* 注册完成时将信息携带到潜在供应商
* qeug_resp_registered_ext
*/
public class RegisteredFinishregOPPlugin extends AbstractOperationServicePlugIn {
@Override
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
super.afterExecuteOperationTransaction(e);
String operationKey = e.getOperationKey();
if ("finishregistered".equals(operationKey)) {
// DynamicObject dataEntity = this.getModel().getDataEntity();
DynamicObject[] dataEntities1 = e.getDataEntities();
DynamicObject dataEntity = dataEntities1[0];
//注册供应商
DynamicObject resp_registered = BusinessDataServiceHelper.loadSingle(dataEntity.getPkValue(), "resp_registered");
if (null != resp_registered) {
DynamicObject regSupplier = resp_registered.getDynamicObject("regsuppplier");
//潜在供应商
if (regSupplier != null) {
regSupplier = BusinessDataServiceHelper.loadSingle(regSupplier.getPkValue(), "resm_regsupplier");
regSupplier.set("qeug_controllingperses",resp_registered.getString("qeug_controllingperses"));//公司实际控制人/权(股份公司)
regSupplier.set("qeug_regnumberes",resp_registered.getString("qeug_regnumberes"));//企业注册号
regSupplier.set("qeug_orgnumberes",resp_registered.getString("qeug_orgnumberes"));//组织机构代码
regSupplier.set("qeug_regstatuses",resp_registered.getString("qeug_regstatuses"));//经营状态
regSupplier.set("qeug_linkman",resp_registered.getString("qeug_linkman"));//外部联系人
// regSupplier.set("recommender",resp_registered.getDynamicObject("recommender"));//外部联系人
regSupplier.set("qeug_recommender",resp_registered.getString("qeug_recommender"));//内部推荐人
SaveServiceHelper.save(new DynamicObject[]{regSupplier});
DobeDWUtils.saveLog("注册供应商",
"注册供应商",null, null,
true,"注册供应商成功带入潜在供应商");
}
}
}
}
}