From a1a5d62bc0b05ccc56992454c3ada9ad6f0de4f6 Mon Sep 17 00:00:00 2001 From: weiyunlong Date: Tue, 10 Dec 2024 17:17:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=88=E5=90=8C=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E5=8F=97=E4=BA=A7=E5=80=BC=E7=A1=AE=E8=AE=A4=E7=89=B5?= =?UTF-8?q?=E8=BF=9E=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repc/recon/formplugin/TestFormPlugin.java | 66 ++++++++++++++++++- .../opplugin/WorkloadcfSubmitOPPlugin.java | 5 ++ 2 files changed, 69 insertions(+), 2 deletions(-) diff --git a/main/java/shkd/repc/recon/formplugin/TestFormPlugin.java b/main/java/shkd/repc/recon/formplugin/TestFormPlugin.java index 8bc94e1..6449f88 100644 --- a/main/java/shkd/repc/recon/formplugin/TestFormPlugin.java +++ b/main/java/shkd/repc/recon/formplugin/TestFormPlugin.java @@ -1,24 +1,86 @@ package shkd.repc.recon.formplugin; +import com.apusic.aas.util.digester.Digester; +import com.apusic.aas.util.digester.Rule; +import com.apusic.aas.util.digester.Rules; import kd.bos.bill.BillShowParameter; import kd.bos.form.ShowType; import kd.bos.form.events.AfterDoOperationEventArgs; import kd.bos.form.plugin.AbstractFormPlugin; -public class TestFormPlugin extends AbstractFormPlugin { +import java.util.List; + +public class TestFormPlugin extends AbstractFormPlugin implements Rules { @Override public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) { super.afterDoOperation(afterDoOperationEventArgs); String operateKey = afterDoOperationEventArgs.getOperateKey(); - if ("testoperate".equals(operateKey)) { + if ("save".equals(operateKey)) { BillShowParameter billShowParameter = new BillShowParameter(); billShowParameter.setFormId("recos_conplan");// 合约规划 billShowParameter.getOpenStyle().setShowType(ShowType.Modal); billShowParameter.getOpenStyle().setTargetKey("tabap"); this.getView().showForm(billShowParameter); } + List rules = this.rules(); + this.getControl("rules"); + this.getView().getModel(); + + Rule rule = null; + rule.getNamespaceURI(); } + + @Override + public Digester getDigester() { + System.out.println(""); + System.out.println(""); + System.out.println(""); + System.out.println(""); + return null; + } + + @Override + public void setDigester(Digester digester) { + System.out.println(""); + System.out.println(""); + System.out.println(""); + System.out.println(""); + } + + @Override + public void add(String s, Rule rule) { + System.out.println(""); + System.out.println(""); + System.out.println(""); + System.out.println(""); + } + + @Override + public void clear() { + System.out.println(""); + System.out.println(""); + System.out.println(""); + System.out.println(""); + } + + @Override + public List match(String s, String s1) { + System.out.println(""); + System.out.println(""); + System.out.println(""); + System.out.println(""); + return null; + } + + @Override + public List rules() { + System.out.println(""); + System.out.println(""); + System.out.println(""); + System.out.println(""); + return null; + } } diff --git a/main/java/shkd/repc/recon/opplugin/WorkloadcfSubmitOPPlugin.java b/main/java/shkd/repc/recon/opplugin/WorkloadcfSubmitOPPlugin.java index 2d9b71e..ea2fe4b 100644 --- a/main/java/shkd/repc/recon/opplugin/WorkloadcfSubmitOPPlugin.java +++ b/main/java/shkd/repc/recon/opplugin/WorkloadcfSubmitOPPlugin.java @@ -3,11 +3,15 @@ package shkd.repc.recon.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 java.math.BigDecimal; import java.math.RoundingMode; +/** + * 产值 + */ public class WorkloadcfSubmitOPPlugin extends AbstractOperationServicePlugIn { @Override @@ -18,6 +22,7 @@ public class WorkloadcfSubmitOPPlugin extends AbstractOperationServicePlugIn { if ("submit".equals(operationKey)){ DynamicObject[] dataEntities = e.getDataEntities(); DynamicObject dataEntity = dataEntities[0]; + dataEntity = BusinessDataServiceHelper.loadSingle(dataEntity.getPkValue(), "recon_workloadcfmbill"); BigDecimal latestoriprice = dataEntity.getBigDecimal("latestoriprice"); // 合同最新造价 BigDecimal sumworkloadamt = dataEntity.getBigDecimal("sumworkloadamt"); // 累计已完成产值(含税)