From a95ad33359fb6fc1cbb693608de5877e0b82224a Mon Sep 17 00:00:00 2001 From: 16358 <1635849544@qq.com> Date: Thu, 8 May 2025 11:05:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A=E5=88=98?= =?UTF-8?q?=E6=A3=AE=E6=BE=B3=20=E6=97=A5=E6=9C=9F=EF=BC=9A2025/5/08=2011?= =?UTF-8?q?=EF=BC=9A05=20=E5=86=85=E5=AE=B9=EF=BC=9A1=E3=80=81=E5=80=BA?= =?UTF-8?q?=E5=88=B8=E5=8F=91=E8=A1=8C=E8=AE=A1=E5=88=92=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=8D=A0=E7=94=A8=E9=A2=9D=E5=BA=A6=E8=BF=87=E6=BB=A4=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E4=BF=AE=E6=94=B9=EF=BC=9B=202=E3=80=81=E5=80=BA?= =?UTF-8?q?=E5=88=B8=E5=8F=91=E8=A1=8C=E5=88=86=E5=BD=95=EF=BC=8C=E9=93=B6?= =?UTF-8?q?=E8=A1=8C=E5=80=9F=E6=AC=BE=E5=90=88=E5=90=8C=E5=88=86=E5=BD=95?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=9A=E9=80=89=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/plugin/tmc/LoancontractF7Plugin.java | 15 ++-- .../plugin/tmc/inputBondEntryDataPlugin.java | 75 +++++++++++++------ 2 files changed, 62 insertions(+), 28 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/LoancontractF7Plugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/LoancontractF7Plugin.java index 4fde0c3..a4d2c01 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/LoancontractF7Plugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/LoancontractF7Plugin.java @@ -100,12 +100,12 @@ public class LoancontractF7Plugin extends AbstractBillPlugIn implements Plugin, return; } //结束日期 - Date enddate = (Date)this.getModel().getValue("enddate"); - if(enddate == null){ - this.getView().showTipNotification("请先选择结束日期。"); - evt.setCancel(true); - return; - } +// Date enddate = (Date)this.getModel().getValue("enddate"); +// if(enddate == null){ +// this.getView().showTipNotification("请先选择结束日期。"); +// evt.setCancel(true); +// return; +// } //发行人 DynamicObject org = (DynamicObject)this.getModel().getValue("org"); if(org == null){ @@ -124,7 +124,8 @@ public class LoancontractF7Plugin extends AbstractBillPlugIn implements Plugin, dataFilter.add(accountQFilter2); //发行日期与结束日期要在注册额度的生效日期和失效日期之间 - QFilter accountQFilter3 = new QFilter("expirydate", QCP.large_equals,enddate).and(new QFilter("effectdate", QCP.less_equals,startdate)); + //FIXME:逻辑修改,只需要发行日期在注册额度的生效日期和失效日期之间 + QFilter accountQFilter3 = new QFilter("expirydate", QCP.large_equals,startdate).and(new QFilter("effectdate", QCP.less_equals,startdate)); dataFilter.add(accountQFilter3); diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/inputBondEntryDataPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/inputBondEntryDataPlugin.java index 97debb2..4c053c8 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/inputBondEntryDataPlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/inputBondEntryDataPlugin.java @@ -2,6 +2,7 @@ package shkd.sys.sys.plugin.tmc; import kd.bos.bill.AbstractBillPlugIn; import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.dataentity.entity.DynamicObjectCollection; import kd.bos.entity.datamodel.events.PropertyChangedArgs; import kd.bos.form.plugin.AbstractFormPlugin; import kd.bos.servicehelper.BusinessDataServiceHelper; @@ -16,29 +17,61 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug String name = e.getProperty().getName(); int rowIndex = e.getChangeSet()[0].getRowIndex(); if("shkd_entrybillno".equals(name)) { - DynamicObject shkdEntrybillno = (DynamicObject) this.getView().getModel().getValue("shkd_entrybillno"); - DynamicObject cfm_loanbill_bond = BusinessDataServiceHelper.loadSingle(shkdEntrybillno.get("id"), "cfm_loanbill_bond"); - //债券发行人 - this.getModel().setValue("shkd_entryorg", cfm_loanbill_bond.get("org"),rowIndex); - //发行总额 - this.getModel().setValue("shkd_entrytotalmount", cfm_loanbill_bond.get("amount"),rowIndex); - //发行金额 - this.getModel().setValue("shkd_entryamount", cfm_loanbill_bond.get("drawamount"),rowIndex); - //发行日期 - this.getModel().setValue("shkd_entrystartdate", cfm_loanbill_bond.get("bizdate"),rowIndex); - //到期日期 - this.getModel().setValue("shkd_entryexpiredate", cfm_loanbill_bond.get("expiredate"),rowIndex); - + //FIXME:修改值改变方案,当前方案不支持多选展示 +// DynamicObject shkdEntrybillno = (DynamicObject) this.getView().getModel().getValue("shkd_entrybillno"); +// DynamicObject cfm_loanbill_bond = BusinessDataServiceHelper.loadSingle(shkdEntrybillno.get("id"), "cfm_loanbill_bond"); +// //债券发行人 +// this.getModel().setValue("shkd_entryorg", cfm_loanbill_bond.get("org"),rowIndex); +// //发行总额 +// this.getModel().setValue("shkd_entrytotalmount", cfm_loanbill_bond.get("amount"),rowIndex); +// //发行金额 +// this.getModel().setValue("shkd_entryamount", cfm_loanbill_bond.get("drawamount"),rowIndex); +// //发行日期 +// this.getModel().setValue("shkd_entrystartdate", cfm_loanbill_bond.get("bizdate"),rowIndex); +// //到期日期 +// this.getModel().setValue("shkd_entryexpiredate", cfm_loanbill_bond.get("expiredate"),rowIndex); + DynamicObjectCollection bondissueEntry = (DynamicObjectCollection)this.getView().getModel().getValue("shkd_bondissue_entry"); + for (int i = 0; i < bondissueEntry.size(); i++) { + //获取每一行的数据,反写到每一行 + DynamicObject temp = bondissueEntry.get(i); + DynamicObject cfm_loanbill_bond = BusinessDataServiceHelper.loadSingle(temp.get("id"), "cfm_loanbill_bond"); + //债券发行人 + this.getModel().setValue("shkd_entryorg", cfm_loanbill_bond.get("org"),i); + //发行总额 + this.getModel().setValue("shkd_entrytotalmount", cfm_loanbill_bond.get("amount"),i); + //发行金额 + this.getModel().setValue("shkd_entryamount", cfm_loanbill_bond.get("drawamount"),i); + //发行日期 + this.getModel().setValue("shkd_entrystartdate", cfm_loanbill_bond.get("bizdate"),i); + //到期日期 + this.getModel().setValue("shkd_entryexpiredate", cfm_loanbill_bond.get("expiredate"),i); + } } if("shkd_entrycontractnum".equals(name)) { - DynamicObject shkd_entrycontractnum = (DynamicObject) this.getView().getModel().getValue("shkd_entrycontractnum"); - DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(shkd_entrycontractnum.get("id"), "cfm_loancontractbill"); - //借款金额 - this.getModel().setValue("shkd_borrowamount", cfm_loancontractbill.get("amount"),rowIndex); - //合同开始日期 - this.getModel().setValue("shkd_contractstartdate", cfm_loancontractbill.get("startdate"),rowIndex); - //合同结束日期 - this.getModel().setValue("shkd_contractenddate", cfm_loancontractbill.get("enddate"),rowIndex); + //FIXME:修改值改变方案,当前方案不支持多选展示 +// DynamicObject shkd_entrycontractnum = (DynamicObject) this.getView().getModel().getValue("shkd_entrycontractnum"); +// DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(shkd_entrycontractnum.get("id"), "cfm_loancontractbill"); +// //借款金额 +// this.getModel().setValue("shkd_borrowamount", cfm_loancontractbill.get("amount"),rowIndex); +// //合同开始日期 +// this.getModel().setValue("shkd_contractstartdate", cfm_loancontractbill.get("startdate"),rowIndex); +// //合同结束日期 +// this.getModel().setValue("shkd_contractenddate", cfm_loancontractbill.get("enddate"),rowIndex); + + DynamicObjectCollection shkdBankcontractEntry = (DynamicObjectCollection)this.getView().getModel().getValue("shkd_bankcontract_entry"); + for (int i = 0; i < shkdBankcontractEntry.size(); i++) { + //获取每一行的数据,反写到每一行 + DynamicObject temp = shkdBankcontractEntry.get(i); + DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(temp.get("id"), "cfm_loancontractbill"); + //借款人 + this.getModel().setValue("shkd_enryborrower", cfm_loancontractbill.get("org"),i); + //借款金额 + this.getModel().setValue("shkd_borrowamount", cfm_loancontractbill.get("amount"),i); + //合同开始日期 + this.getModel().setValue("shkd_contractstartdate", cfm_loancontractbill.get("startdate"),i); + //合同结束日期 + this.getModel().setValue("shkd_contractenddate", cfm_loancontractbill.get("enddate"),i); + } } }