From 465cfa55f07de0de29c1f82378f3e5e95d9ca0f8 Mon Sep 17 00:00:00 2001 From: fang <123456> Date: Wed, 7 May 2025 18:08:13 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=8D=A2=E4=B8=BB?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/midservice/servicehandler/BacklogServiceHandle.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java index 5dc1392..be34df5 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java @@ -163,7 +163,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler { List userIds = todoInfo.getUserIds(); DynamicObjectCollection query = QueryServiceHelper.query("bos_user", "id,name,number" + ",phone,username", new QFilter[]{new QFilter("id", "in", userIds)}); - DynamicObject dynamicObject = QueryServiceHelper.queryOne("wf_hitaskinst", "billno,startname,id,name", + DynamicObject dynamicObject = QueryServiceHelper.queryOne("wf_hitaskinst", "billno,startname,subject,id,name", new QFilter[]{new QFilter("id", "=", todoInfo.getTaskId())}); logger.info("####待办taskid:" + todoInfo.getTaskId()); for (DynamicObject query_one : query) { @@ -180,7 +180,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler { // BacklogMessage backlogMessage = new BacklogMessage(); form.append("{"); form.append("\"title\":"); - form.append("\"").append(todoInfo.getTitle()).append("\","); + form.append("\"").append(dynamicObject.getString("subject")).append("\","); form.append("\"bName\":"); form.append("\"").append("司库").append("\","); form.append("\"bussinessCode\":"); @@ -274,7 +274,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler { // BacklogMessage backlogMessage = new BacklogMessage(); form.append("{"); form.append("\"title\":"); - form.append("\"").append(todoInfo.getTitle()).append("\","); + form.append("\"").append(dynamicObject.getString("subject")).append("\","); form.append("\"bName\":"); form.append("\"").append("司库").append("\","); form.append("\"bussinessCode\":"); From e13894afe91fae068e97ac34d58926ad361ce9b1 Mon Sep 17 00:00:00 2001 From: fang <123456> Date: Wed, 7 May 2025 18:10:07 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=A1=A5=E5=8F=91=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=8D=A2=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shkd/sys/sys/midservice/backlogTack/ToDoResendTack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/backlogTack/ToDoResendTack.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/backlogTack/ToDoResendTack.java index b16896b..0656324 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/backlogTack/ToDoResendTack.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/backlogTack/ToDoResendTack.java @@ -189,7 +189,7 @@ public class ToDoResendTack extends AbstractTask { switch (t_status) { case "0": //标题 - String title = "请处理" + next.getString("fstartname") + "提交的" + next.getString("fentityname"); + String title = next.getString("fsubject"); //PC地址 String pcUrl = GetUrlUtils.getInstance().getPcUrl(next.getString("fprocessingpage"), next.getString("fprocessingmobilepage"), From 8e8b9dd8b4e87808547faf52ed16bbcbf0e81a46 Mon Sep 17 00:00:00 2001 From: fang <123456> Date: Thu, 8 May 2025 10:27:34 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=8D=A2=E4=B8=BB?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/sys/midservice/servicehandler/BacklogServiceHandle.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java index be34df5..04dca3f 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/midservice/servicehandler/BacklogServiceHandle.java @@ -257,7 +257,7 @@ public class BacklogServiceHandle extends AbstractServiceHandler { List userIds = todoInfo.getUserIds(); DynamicObjectCollection query = QueryServiceHelper.query("bos_user", "id,name,number" + ",phone,username", new QFilter[]{new QFilter("id", "in", userIds)}); - DynamicObject dynamicObject = QueryServiceHelper.queryOne("wf_hitaskinst", "billno,startname,id,name", + DynamicObject dynamicObject = QueryServiceHelper.queryOne("wf_hitaskinst", "billno,subject,startname,id,name", new QFilter[]{new QFilter("id", "=", todoInfo.getTaskId())}); logger.info("####待办taskid:" + todoInfo.getTaskId()); for (DynamicObject query_one : query) { 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 4/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A?= =?UTF-8?q?=E5=88=98=E6=A3=AE=E6=BE=B3=20=E6=97=A5=E6=9C=9F=EF=BC=9A2025/5?= =?UTF-8?q?/08=2011=EF=BC=9A05=20=E5=86=85=E5=AE=B9=EF=BC=9A1=E3=80=81?= =?UTF-8?q?=E5=80=BA=E5=88=B8=E5=8F=91=E8=A1=8C=E8=AE=A1=E5=88=92=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=8D=A0=E7=94=A8=E9=A2=9D=E5=BA=A6=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E4=BF=AE=E6=94=B9=EF=BC=9B=202=E3=80=81?= =?UTF-8?q?=E5=80=BA=E5=88=B8=E5=8F=91=E8=A1=8C=E5=88=86=E5=BD=95=EF=BC=8C?= =?UTF-8?q?=E9=93=B6=E8=A1=8C=E5=80=9F=E6=AC=BE=E5=90=88=E5=90=8C=E5=88=86?= =?UTF-8?q?=E5=BD=95=E6=95=B0=E6=8D=AE=E5=A4=9A=E9=80=89=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=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); + } } } From ae665f29dc7838887f1af88bd0d74a5d286bdbf7 Mon Sep 17 00:00:00 2001 From: 16358 <1635849544@qq.com> Date: Thu, 8 May 2025 16:16:25 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A?= =?UTF-8?q?=E5=88=98=E6=A3=AE=E6=BE=B3=20=E6=97=A5=E6=9C=9F=EF=BC=9A2025/5?= =?UTF-8?q?/08=2016=EF=BC=9A15=20=E5=86=85=E5=AE=B9=EF=BC=9A1=E3=80=81?= =?UTF-8?q?=E8=B5=84=E9=87=91=E7=94=A8=E9=80=94=E5=88=86=E5=BD=95=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/tmc/BdimbondBuildEntryPlugin.java | 14 ++++++ .../plugin/tmc/BondSelectEntryOrgPlugin.java | 19 ++++---- .../plugin/tmc/inputBondEntryDataPlugin.java | 45 ++++++++++++------- 3 files changed, 53 insertions(+), 25 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/BdimbondBuildEntryPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/BdimbondBuildEntryPlugin.java index c6f904e..6354d35 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/BdimbondBuildEntryPlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/tmc/BdimbondBuildEntryPlugin.java @@ -31,6 +31,20 @@ public class BdimbondBuildEntryPlugin extends AbstractFormPlugin implements Plug @Override public void afterBindData(EventObject e) { this.getView().setVisible(false, "shkd_bondissue","shkd_bankcontract"); + DynamicObjectCollection loanuse = (DynamicObjectCollection )this.getModel().getValue("shkd_loanuse"); + if (loanuse != null){ + for (DynamicObject dObj : loanuse) { + DynamicObject shkdLoanuse = (DynamicObject)dObj.getDynamicObject("fbasedataid"); + + if("0001".equals(shkdLoanuse.get("number"))) { + this.getView().setVisible(true, "shkd_bondissue"); + } + + if("0002".equals(shkdLoanuse.get("number"))) { + this.getView().setVisible(true, "shkd_bankcontract"); + } + } + } //前端去掉星号,前端不一定会校验 DecimalEdit attch= (DecimalEdit)this.getControl("e_underwriteratio"); AmountEdit attch2= (AmountEdit)this.getControl("e_underwriteamount"); 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 00af45d..671a36f 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 @@ -15,10 +15,7 @@ import kd.bos.servicehelper.org.OrgUnitServiceHelper; import kd.bos.servicehelper.org.OrgViewType; import kd.sdk.plugin.Plugin; -import java.util.ArrayList; -import java.util.Collections; -import java.util.EventObject; -import java.util.List; +import java.util.*; /** * 债券发行/发行计划单据 债券发行,银行借款合同分录 选择F7时过滤 @@ -30,8 +27,8 @@ public class BondSelectEntryOrgPlugin extends AbstractBillPlugIn implements Plug //债券发行编码 RefBillEdit edit = this.getView().getControl("shkd_entrybillno"); edit.addBeforeF7SelectListener(this); - //借款合同单据编码 - RefBillEdit edit2 = this.getView().getControl("shkd_entrycontractnum"); + //提款单编号 + RefBillEdit edit2 = this.getView().getControl("shkd_loanbill"); edit2.addBeforeF7SelectListener(this); //借款人 OrgEdit edit3 = this.getView().getControl("shkd_enryborrower"); @@ -53,15 +50,21 @@ public class BondSelectEntryOrgPlugin extends AbstractBillPlugIn implements Plug IDataEntityProperty property = evt.getProperty(); String name = property.getName(); List dataFilter = new ArrayList<>(); - if("shkd_entrycontractnum".equals(name)){ + 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; } QFilter accountQFilter = new QFilter("org.id", QCP.equals, shkdEnryborrower.getPkValue()); - dataFilter.add(accountQFilter); + //发行日期 >= 提款单放款日期 + QFilter accountQFilter2 = new QFilter("bizdate", QCP.less_equals, startdate); + //只能选择 已提款 和 已部分还款 的单据 + List temps = Arrays.asList("drawed","partpayment"); + QFilter accountQFilter3 = new QFilter("drawtype", QCP.in, temps); + dataFilter.add(accountQFilter.and(accountQFilter2).and(accountQFilter3)); } if("shkd_entrybillno".equals(name)){ QFilter accountQFilter = new QFilter("org.id", QCP.equals, orgId); 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 4c053c8..4d33396 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 @@ -34,17 +34,22 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug 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"); + 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_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_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_entrycontractnum".equals(name)) { @@ -58,21 +63,27 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug // //合同结束日期 // this.getModel().setValue("shkd_contractenddate", cfm_loancontractbill.get("enddate"),rowIndex); - DynamicObjectCollection shkdBankcontractEntry = (DynamicObjectCollection)this.getView().getModel().getValue("shkd_bankcontract_entry"); + 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"); + DynamicObject shkdLoanbill = temp.getDynamicObject("shkd_loanbill"); + DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(shkdLoanbill.get("id"), "cfm_loanbill"); //借款人 - 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); + this.getModel().setValue("shkd_enryborrower", cfm_loancontractbill.get("org"), i); + //债权人 + this.getModel().setValue("shkd_entryorg", cfm_loancontractbill.get("textcreditor"), i); + //起息日期 + this.getModel().setValue("shkd_startintdate1", cfm_loancontractbill.get("startintdate"), i); + //到期日期 + this.getModel().setValue("shkd_entryexpiredate1", cfm_loancontractbill.get("expiredate"), i); + //提款金额 + this.getModel().setValue("shkd_entryamount", cfm_loancontractbill.get("drawamount"), i); + //融资利率 + this.getModel().setValue("shkd_startloanrate", cfm_loancontractbill.get("startloanrate"), i); + //融资余额 + this.getModel().setValue("shkd_notrepayamount", cfm_loancontractbill.get("notrepayamount"), i); } } - } } \ No newline at end of file From 51342a465f14901682b2cb36df456d106f4883ff Mon Sep 17 00:00:00 2001 From: 16358 <1635849544@qq.com> Date: Fri, 9 May 2025 10:58:43 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A?= =?UTF-8?q?=E5=88=98=E6=A3=AE=E6=BE=B3=20=E6=97=A5=E6=9C=9F=EF=BC=9A2025/5?= =?UTF-8?q?/09=2010=EF=BC=9A58=20=E5=86=85=E5=AE=B9=EF=BC=9A1=E3=80=81?= =?UTF-8?q?=E8=B5=84=E9=87=91=E7=94=A8=E9=80=94=E5=88=86=E5=BD=95=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/tmc/inputBondEntryDataPlugin.java | 99 ++++++++++++++----- 1 file changed, 76 insertions(+), 23 deletions(-) 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 4d33396..84875e7 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 @@ -3,6 +3,9 @@ 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.IDataModel; +import kd.bos.entity.datamodel.RowDataEntity; +import kd.bos.entity.datamodel.events.AfterAddRowEventArgs; import kd.bos.entity.datamodel.events.PropertyChangedArgs; import kd.bos.form.plugin.AbstractFormPlugin; import kd.bos.servicehelper.BusinessDataServiceHelper; @@ -16,7 +19,7 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug public void propertyChanged(PropertyChangedArgs e) { String name = e.getProperty().getName(); int rowIndex = e.getChangeSet()[0].getRowIndex(); - if("shkd_entrybillno".equals(name)) { + 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"); @@ -30,29 +33,29 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug // 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"); + 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_shortname", cfm_loanbill_bond.get("shortname"), i); //债券发行人 - this.getModel().setValue("shkd_entryorg", cfm_loanbill_bond.get("org"),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_startintdate", cfm_loanbill_bond.get("startintdate"), i); //到期日期 - this.getModel().setValue("shkd_entryexpiredate", cfm_loanbill_bond.get("expiredate"),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_entryamount", cfm_loanbill_bond.get("drawamount"), i); //发行利率 - this.getModel().setValue("shkd_startloanrate", cfm_loanbill_bond.get("startloanrate"),i); + this.getModel().setValue("shkd_startloanrate", cfm_loanbill_bond.get("startloanrate"), i); //融资余额 - this.getModel().setValue("shkd_notrepayamount", cfm_loanbill_bond.get("notrepayamount"),i); + this.getModel().setValue("shkd_notrepayamount", cfm_loanbill_bond.get("notrepayamount"), i); } } - if("shkd_entrycontractnum".equals(name)) { + 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"); @@ -63,26 +66,76 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug // //合同结束日期 // 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 shkdLoanbill = temp.getDynamicObject("shkd_loanbill"); + DynamicObjectCollection shkdBankcontractEntry = this.getModel().getEntryEntity("shkd_bankcontract_entry"); +// for (int i = 0; i < shkdBankcontractEntry.size(); i++) { +// +// } + //获取每一行的数据,反写到每一行 + 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); + //起息日期 + this.getModel().setValue("shkd_startintdate1", 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_notrepayamount1", null, rowIndex); + } else { DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(shkdLoanbill.get("id"), "cfm_loanbill"); //借款人 - this.getModel().setValue("shkd_enryborrower", cfm_loancontractbill.get("org"), i); - //债权人 - this.getModel().setValue("shkd_entryorg", cfm_loancontractbill.get("textcreditor"), i); + this.getModel().setValue("shkd_enryborrower", cfm_loancontractbill.get("org"), rowIndex); + //贷款人 + this.getModel().setValue("shkd_textcreditor", cfm_loancontractbill.get("textcreditor"), rowIndex); //起息日期 - this.getModel().setValue("shkd_startintdate1", cfm_loancontractbill.get("startintdate"), i); + this.getModel().setValue("shkd_startintdate1", cfm_loancontractbill.get("startintdate"), rowIndex); //到期日期 - this.getModel().setValue("shkd_entryexpiredate1", cfm_loancontractbill.get("expiredate"), i); + this.getModel().setValue("shkd_entryexpiredate1", cfm_loancontractbill.get("expiredate"), rowIndex); //提款金额 - this.getModel().setValue("shkd_entryamount", cfm_loancontractbill.get("drawamount"), i); + this.getModel().setValue("shkd_drawamount", cfm_loancontractbill.get("drawamount"), rowIndex); //融资利率 - this.getModel().setValue("shkd_startloanrate", cfm_loancontractbill.get("startloanrate"), i); + this.getModel().setValue("shkd_startloanrate1", cfm_loancontractbill.get("startloanrate"), rowIndex); //融资余额 - this.getModel().setValue("shkd_notrepayamount", cfm_loancontractbill.get("notrepayamount"), i); + this.getModel().setValue("shkd_notrepayamount1", cfm_loancontractbill.get("notrepayamount"), rowIndex); + } + } + } + + @Override + public void afterAddRow(AfterAddRowEventArgs e) { + String name = e.getEntryProp().getName(); + if ("shkd_bankcontract_entry".equals(name)) { + RowDataEntity[] rowDataEntities = e.getRowDataEntities(); + for (RowDataEntity rowDataEntity : rowDataEntities) { + int rowIndex = rowDataEntity.getRowIndex(); + DynamicObject entry = rowDataEntity.getDataEntity(); + + DynamicObject loanBill = entry.getDynamicObject("shkd_loanbill"); + if (loanBill != null) { + IDataModel model = this.getModel(); + DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(loanBill.getPkValue(), "cfm_loanbill"); + //借款人 + model.setValue("shkd_enryborrower", cfm_loancontractbill.get("org"), rowIndex); + //贷款人 + model.setValue("shkd_textcreditor", cfm_loancontractbill.get("textcreditor"), rowIndex); + //起息日期 + model.setValue("shkd_startintdate1", cfm_loancontractbill.get("startintdate"), rowIndex); + //到期日期 + model.setValue("shkd_entryexpiredate1", cfm_loancontractbill.get("expiredate"), rowIndex); + //提款金额 + model.setValue("shkd_drawamount", cfm_loancontractbill.get("drawamount"), rowIndex); + //融资利率 + model.setValue("shkd_startloanrate1", cfm_loancontractbill.get("startloanrate"), rowIndex); + //融资余额 + model.setValue("shkd_notrepayamount1", cfm_loancontractbill.get("notrepayamount"), rowIndex); + } } } } 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 7/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A?= =?UTF-8?q?=E5=88=98=E6=A3=AE=E6=BE=B3=20=E6=97=A5=E6=9C=9F=EF=BC=9A2025/5?= =?UTF-8?q?/09=2010=EF=BC=9A58=20=E5=86=85=E5=AE=B9=EF=BC=9A1=E3=80=81?= =?UTF-8?q?=E8=B5=84=E9=87=91=E7=94=A8=E9=80=94=E5=88=86=E5=BD=95=E8=B0=83?= =?UTF-8?q?=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) {