parent
51342a465f
commit
8183536705
|
@ -52,12 +52,15 @@ public class BondSelectEntryOrgPlugin extends AbstractBillPlugIn implements Plug
|
|||
List<QFilter> 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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue