From 65ee65cd30e95ced83adeed577f5d1354dcd6656 Mon Sep 17 00:00:00 2001 From: weiyunlong Date: Thu, 14 Nov 2024 15:00:44 +0800 Subject: [PATCH] =?UTF-8?q?OA=E5=9C=B0=E5=9D=80=E6=94=B9=E4=B8=BA=E5=A4=96?= =?UTF-8?q?=E7=BD=91,=E5=A4=96=E7=BD=91=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=90=BA=E5=B8=A6=E5=88=B0=E6=BD=9C=E5=9C=A8?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86,=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E7=94=BB=E5=83=8F=E5=8A=A8=E6=80=81=E5=8A=A0=E8=BD=BD=E6=AD=A3?= =?UTF-8?q?=E5=BC=8F=E4=BE=9B=E5=BA=94=E5=95=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../formplugin/PortraitBasicsFormPlugin.java | 39 +++++---------- .../resm/formplugin/RegisteredFormPlugin.java | 48 +++++++++++++++++++ main/java/shkd/utils/OAUtils.java | 2 +- 3 files changed, 61 insertions(+), 28 deletions(-) create mode 100644 main/java/shkd/repc/resm/formplugin/RegisteredFormPlugin.java diff --git a/main/java/shkd/repc/resm/formplugin/PortraitBasicsFormPlugin.java b/main/java/shkd/repc/resm/formplugin/PortraitBasicsFormPlugin.java index 50adbce..879a4b5 100644 --- a/main/java/shkd/repc/resm/formplugin/PortraitBasicsFormPlugin.java +++ b/main/java/shkd/repc/resm/formplugin/PortraitBasicsFormPlugin.java @@ -24,38 +24,23 @@ public class PortraitBasicsFormPlugin extends AbstractFormPlugin { QFilter q1 = new QFilter("id", QCP.equals, supplierid); DynamicObject supplier1 = BusinessDataServiceHelper.loadSingle("resm_official_supplier", new QFilter[]{q1}); - String qeug_historynames = supplier1.getString("qeug_historynames");//曾用名 - String qeug_regnumber = supplier1.getString("qeug_regnumber");//企业注册号 - String qeug_orgnumber = supplier1.getString("qeug_orgnumber");//组织机构代码 - String qeug_reginstitute = supplier1.getString("qeug_reginstitute");//登记机关 - String qeug_regstatus = supplier1.getString("qeug_regstatus");//经营状态 - String qeug_companyorgtype = supplier1.getString("qeug_companyorgtype");//企业类型 - String qeug_canceldate = supplier1.getString("qeug_canceldate");//注销日期 - String qeug_bases = supplier1.getString("qeug_bases");//省 - String qeug_city = supplier1.getString("qeug_city");//城市 - String qeug_socialstaffnum = supplier1.getString("qeug_socialstaffnum");//参保人数 + String qeug_controllingperses = supplier1.getString("qeug_controllingperses");//公司实际控制人/权(股份公司) + String qeug_regnumberes = supplier1.getString("qeug_regnumberes");//企业注册号 + String qeug_orgnumberes = supplier1.getString("qeug_orgnumberes");//组织机构代码 + String qeug_regstatuses = supplier1.getString("qeug_regstatuses");//经营状态 + String qeug_linkman = supplier1.getString("qeug_linkman");//外部联系人 - this.getView().getModel().setValue("qeug_historynames", qeug_historynames); - this.getView().getModel().setValue("qeug_regnumber", qeug_regnumber); - this.getView().getModel().setValue("qeug_orgnumber", qeug_orgnumber); - this.getView().getModel().setValue("qeug_reginstitute", qeug_reginstitute); - this.getView().getModel().setValue("qeug_regstatus", qeug_regstatus); - this.getView().getModel().setValue("qeug_companyorgtype", qeug_companyorgtype); - this.getView().getModel().setValue("qeug_canceldate", qeug_canceldate); - this.getView().getModel().setValue("qeug_bases", qeug_bases); - this.getView().getModel().setValue("qeug_city", qeug_city); - this.getView().getModel().setValue("qeug_socialstaffnum", qeug_socialstaffnum); - this.getView().updateView("qeug_historynames"); + this.getView().getModel().setValue("qeug_controllingperson", qeug_controllingperses); + this.getView().getModel().setValue("qeug_regnumber", qeug_regnumberes); + this.getView().getModel().setValue("qeug_orgnumber", qeug_orgnumberes); + this.getView().getModel().setValue("qeug_regstatus", qeug_regstatuses); + this.getView().getModel().setValue("qeug_linkman", qeug_linkman); + this.getView().updateView("qeug_controllingperson"); this.getView().updateView("qeug_regnumber"); this.getView().updateView("qeug_orgnumber"); - this.getView().updateView("qeug_reginstitute"); this.getView().updateView("qeug_regstatus"); - this.getView().updateView("qeug_companyorgtype"); - this.getView().updateView("qeug_canceldate"); - this.getView().updateView("qeug_bases"); - this.getView().updateView("qeug_city"); - this.getView().updateView("qeug_socialstaffnum"); + this.getView().updateView("qeug_linkman"); // this.getView().updateView(); } diff --git a/main/java/shkd/repc/resm/formplugin/RegisteredFormPlugin.java b/main/java/shkd/repc/resm/formplugin/RegisteredFormPlugin.java new file mode 100644 index 0000000..d839335 --- /dev/null +++ b/main/java/shkd/repc/resm/formplugin/RegisteredFormPlugin.java @@ -0,0 +1,48 @@ +package shkd.repc.resm.formplugin; + +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.form.events.AfterDoOperationEventArgs; +import kd.bos.form.plugin.AbstractFormPlugin; +import kd.bos.servicehelper.BusinessDataServiceHelper; +import kd.bos.servicehelper.operation.SaveServiceHelper; +import shkd.utils.DobeDWUtils; + +/** + * 供应商注册表单插件 + * qeug_resp_registered_ext + */ +public class RegisteredFormPlugin extends AbstractFormPlugin { + + @Override + public void afterDoOperation(AfterDoOperationEventArgs args) { + super.afterDoOperation(args); + String operateKey = args.getOperateKey(); + switch (operateKey) { + // 注册完成时将信息携带到潜在供应商 + case "finishregistered": + DynamicObject dataEntity = this.getModel().getDataEntity(); + //注册供应商 + 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"));//外部联系人 + SaveServiceHelper.save(new DynamicObject[]{regSupplier}); + DobeDWUtils.saveLog("注册供应商", + "注册供应商",null, null, + true,"注册供应商成功带入潜在供应商"); + } + } + break; + default: + break; + } + } +} diff --git a/main/java/shkd/utils/OAUtils.java b/main/java/shkd/utils/OAUtils.java index 9f42b36..cbfc203 100644 --- a/main/java/shkd/utils/OAUtils.java +++ b/main/java/shkd/utils/OAUtils.java @@ -28,7 +28,7 @@ import static shkd.repc.resm.opplugin.PushOASupplierOPPlugin.assembleBody; public class OAUtils { private static final Log logger = LogFactory.getLog(OAUtils.class); - public static final String oaUrl = System.getProperty("oaurl");//(测试环境外网地址) + public static final String oaUrl = System.getProperty("oaurl");//(测试环境外网地址)http://140.206.96.138:9091 // public static final String oaUrl = "http://172.31.254.240:9090";//本地(内网地址) //致远服务前获取token接口