From 81835367051834a7bdbd987215ac4c8558fa5097 Mon Sep 17 00:00:00 2001 From: 16358 <1635849544@qq.com> Date: Fri, 9 May 2025 12:44:10 +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/09=2010?= =?UTF-8?q?=EF=BC=9A58=20=E5=86=85=E5=AE=B9=EF=BC=9A1=E3=80=81=E8=B5=84?= =?UTF-8?q?=E9=87=91=E7=94=A8=E9=80=94=E5=88=86=E5=BD=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/tmc/BondSelectEntryOrgPlugin.java | 5 +- .../plugin/tmc/inputBondEntryDataPlugin.java | 144 ++++++++++-------- 2 files changed, 83 insertions(+), 66 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/BondSelectEntryOrgPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/BondSelectEntryOrgPlugin.java index 671a36f..46beab9 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/BondSelectEntryOrgPlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/BondSelectEntryOrgPlugin.java @@ -52,12 +52,15 @@ public class BondSelectEntryOrgPlugin extends AbstractBillPlugIn implements Plug List dataFilter = new ArrayList<>(); if("shkd_loanbill".equals(name)){ DynamicObject shkdEnryborrower = (DynamicObject)this.getView().getModel().getValue("shkd_enryborrower"); - Date startdate = (Date)this.getView().getModel().getValue("startdate"); if(shkdEnryborrower == null){ this.getView().showTipNotification("请先选择借款人。"); evt.setCancel(true); return; } + Date startdate = (Date)this.getView().getModel().getValue("startdate"); + if(startdate == null){ + startdate = (Date)this.getView().getModel().getValue("bizdate"); + } QFilter accountQFilter = new QFilter("org.id", QCP.equals, shkdEnryborrower.getPkValue()); //发行日期 >= 提款单放款日期 QFilter accountQFilter2 = new QFilter("bizdate", QCP.less_equals, startdate); 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 84875e7..98b56af 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 @@ -20,76 +20,26 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug String name = e.getProperty().getName(); int rowIndex = e.getChangeSet()[0].getRowIndex(); if ("shkd_entrybillno".equals(name)) { - //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 entrybillno = temp.getDynamicObject("shkd_entrybillno"); - DynamicObject cfm_loanbill_bond = BusinessDataServiceHelper.loadSingle(entrybillno.get("id"), "cfm_loanbill_bond"); - //债券简码 - this.getModel().setValue("shkd_shortname", cfm_loanbill_bond.get("shortname"), i); - //债券发行人 - this.getModel().setValue("shkd_entryorg", cfm_loanbill_bond.get("org"), i); - //起息日期 - this.getModel().setValue("shkd_startintdate", cfm_loanbill_bond.get("startintdate"), i); - //到期日期 - this.getModel().setValue("shkd_entryexpiredate", cfm_loanbill_bond.get("expiredate"), i); - //发行金额 - this.getModel().setValue("shkd_entryamount", cfm_loanbill_bond.get("drawamount"), i); - //发行利率 - this.getModel().setValue("shkd_startloanrate", cfm_loanbill_bond.get("startloanrate"), i); - //融资余额 - this.getModel().setValue("shkd_notrepayamount", cfm_loanbill_bond.get("notrepayamount"), i); - } - } - if ("shkd_loanbill".equals(name)) { - //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 = this.getModel().getEntryEntity("shkd_bankcontract_entry"); -// for (int i = 0; i < shkdBankcontractEntry.size(); i++) { -// -// } - //获取每一行的数据,反写到每一行 + DynamicObjectCollection shkdBankcontractEntry = this.getModel().getEntryEntity("shkd_bondissue_entry"); DynamicObject temp = shkdBankcontractEntry.get(rowIndex); - DynamicObject shkdLoanbill = temp.getDynamicObject("shkd_loanbill"); - if (shkdLoanbill == null) { - //借款人 - this.getModel().setValue("shkd_enryborrower", null, rowIndex); - //贷款人 - this.getModel().setValue("shkd_textcreditor", null, rowIndex); + DynamicObject cfm_loanbill_bond = temp.getDynamicObject("shkd_entrybillno"); + if (cfm_loanbill_bond == null) { + //债券简码 + this.getModel().setValue("shkd_shortname", null, rowIndex); + //债券发行人 + this.getModel().setValue("shkd_entryorg", null, rowIndex); //起息日期 - this.getModel().setValue("shkd_startintdate1", null, rowIndex); + this.getModel().setValue("shkd_startintdate", null, rowIndex); //到期日期 - this.getModel().setValue("shkd_entryexpiredate1", null, rowIndex); - //提款金额 - this.getModel().setValue("shkd_drawamount", null, rowIndex); - //融资利率 - this.getModel().setValue("shkd_startloanrate1", null, rowIndex); + this.getModel().setValue("shkd_entryexpiredate",null, rowIndex); + //发行金额 + this.getModel().setValue("shkd_entryamount", null, rowIndex); + //发行利率 + this.getModel().setValue("shkd_startloanrate", null, rowIndex); //融资余额 - this.getModel().setValue("shkd_notrepayamount1", null, rowIndex); + this.getModel().setValue("shkd_notrepayamount", null, rowIndex); } else { - DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(shkdLoanbill.get("id"), "cfm_loanbill"); + DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(cfm_loanbill_bond.get("id"), "cfm_loanbill_bond"); //借款人 this.getModel().setValue("shkd_enryborrower", cfm_loancontractbill.get("org"), rowIndex); //贷款人 @@ -106,11 +56,75 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug this.getModel().setValue("shkd_notrepayamount1", cfm_loancontractbill.get("notrepayamount"), rowIndex); } } + if ("shkd_loanbill".equals(name)) { + DynamicObjectCollection shkdBankcontractEntry = this.getModel().getEntryEntity("shkd_bankcontract_entry"); + DynamicObject temp = shkdBankcontractEntry.get(rowIndex); + DynamicObject shkdLoanbill = temp.getDynamicObject("shkd_loanbill"); + if (shkdLoanbill == null) { + //债券简码 + this.getModel().setValue("shkd_shortname", null, rowIndex); + //债券发行人 + this.getModel().setValue("shkd_entryorg", null, rowIndex); + //起息日期 + this.getModel().setValue("shkd_startintdate", null, rowIndex); + //到期日期 + this.getModel().setValue("shkd_entryexpiredate", null, rowIndex); + //发行金额 + this.getModel().setValue("shkd_entryamount", null, rowIndex); + //发行利率 + this.getModel().setValue("shkd_startloanrate", null, rowIndex); + //融资余额 + this.getModel().setValue("shkd_notrepayamount", null, rowIndex); + } else { + DynamicObject cfm_loanbill_bond = BusinessDataServiceHelper.loadSingle(shkdLoanbill.get("id"), "cfm_loanbill_bond"); + //债券简码 + this.getModel().setValue("shkd_shortname", cfm_loanbill_bond.get("shortname"), rowIndex); + //债券发行人 + this.getModel().setValue("shkd_entryorg", cfm_loanbill_bond.get("org"), rowIndex); + //起息日期 + this.getModel().setValue("shkd_startintdate", cfm_loanbill_bond.get("startintdate"), rowIndex); + //到期日期 + this.getModel().setValue("shkd_entryexpiredate", cfm_loanbill_bond.get("expiredate"), rowIndex); + //发行金额 + this.getModel().setValue("shkd_entryamount", cfm_loanbill_bond.get("drawamount"), rowIndex); + //发行利率 + this.getModel().setValue("shkd_startloanrate", cfm_loanbill_bond.get("startloanrate"), rowIndex); + //融资余额 + this.getModel().setValue("shkd_notrepayamount", cfm_loanbill_bond.get("notrepayamount"), rowIndex); + } + } } @Override public void afterAddRow(AfterAddRowEventArgs e) { String name = e.getEntryProp().getName(); + if ("shkd_bondissue_entry".equals(name)) { + RowDataEntity[] rowDataEntities = e.getRowDataEntities(); + for (RowDataEntity rowDataEntity : rowDataEntities) { + int rowIndex = rowDataEntity.getRowIndex(); + DynamicObject entry = rowDataEntity.getDataEntity(); + + DynamicObject entrybillno = entry.getDynamicObject("shkd_entrybillno"); + if (entrybillno != null) { + this.getModel(); + DynamicObject cfm_loanbill_bond = BusinessDataServiceHelper.loadSingle(entrybillno.getPkValue(), "cfm_loanbill_bond"); + //债券简码 + this.getModel().setValue("shkd_shortname", cfm_loanbill_bond.get("shortname"), rowIndex); + //债券发行人 + this.getModel().setValue("shkd_entryorg", cfm_loanbill_bond.get("org"), rowIndex); + //起息日期 + this.getModel().setValue("shkd_startintdate", cfm_loanbill_bond.get("startintdate"), rowIndex); + //到期日期 + this.getModel().setValue("shkd_entryexpiredate", cfm_loanbill_bond.get("expiredate"), rowIndex); + //发行金额 + this.getModel().setValue("shkd_entryamount", cfm_loanbill_bond.get("drawamount"), rowIndex); + //发行利率 + this.getModel().setValue("shkd_startloanrate", cfm_loanbill_bond.get("startloanrate"), rowIndex); + //融资余额 + this.getModel().setValue("shkd_notrepayamount", cfm_loanbill_bond.get("notrepayamount"), rowIndex); + } + } + } if ("shkd_bankcontract_entry".equals(name)) { RowDataEntity[] rowDataEntities = e.getRowDataEntities(); for (RowDataEntity rowDataEntity : rowDataEntities) {