parent
51342a465f
commit
8183536705
|
@ -52,12 +52,15 @@ public class BondSelectEntryOrgPlugin extends AbstractBillPlugIn implements Plug
|
||||||
List<QFilter> dataFilter = new ArrayList<>();
|
List<QFilter> dataFilter = new ArrayList<>();
|
||||||
if("shkd_loanbill".equals(name)){
|
if("shkd_loanbill".equals(name)){
|
||||||
DynamicObject shkdEnryborrower = (DynamicObject)this.getView().getModel().getValue("shkd_enryborrower");
|
DynamicObject shkdEnryborrower = (DynamicObject)this.getView().getModel().getValue("shkd_enryborrower");
|
||||||
Date startdate = (Date)this.getView().getModel().getValue("startdate");
|
|
||||||
if(shkdEnryborrower == null){
|
if(shkdEnryborrower == null){
|
||||||
this.getView().showTipNotification("请先选择借款人。");
|
this.getView().showTipNotification("请先选择借款人。");
|
||||||
evt.setCancel(true);
|
evt.setCancel(true);
|
||||||
return;
|
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 accountQFilter = new QFilter("org.id", QCP.equals, shkdEnryborrower.getPkValue());
|
||||||
//发行日期 >= 提款单放款日期
|
//发行日期 >= 提款单放款日期
|
||||||
QFilter accountQFilter2 = new QFilter("bizdate", QCP.less_equals, startdate);
|
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();
|
String name = e.getProperty().getName();
|
||||||
int rowIndex = e.getChangeSet()[0].getRowIndex();
|
int rowIndex = e.getChangeSet()[0].getRowIndex();
|
||||||
if ("shkd_entrybillno".equals(name)) {
|
if ("shkd_entrybillno".equals(name)) {
|
||||||
//FIXME:修改值改变方案,当前方案不支持多选展示
|
DynamicObjectCollection shkdBankcontractEntry = this.getModel().getEntryEntity("shkd_bondissue_entry");
|
||||||
// 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++) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//获取每一行的数据,反写到每一行
|
|
||||||
DynamicObject temp = shkdBankcontractEntry.get(rowIndex);
|
DynamicObject temp = shkdBankcontractEntry.get(rowIndex);
|
||||||
DynamicObject shkdLoanbill = temp.getDynamicObject("shkd_loanbill");
|
DynamicObject cfm_loanbill_bond = temp.getDynamicObject("shkd_entrybillno");
|
||||||
if (shkdLoanbill == null) {
|
if (cfm_loanbill_bond == null) {
|
||||||
//借款人
|
//债券简码
|
||||||
this.getModel().setValue("shkd_enryborrower", null, rowIndex);
|
this.getModel().setValue("shkd_shortname", null, rowIndex);
|
||||||
//贷款人
|
//债券发行人
|
||||||
this.getModel().setValue("shkd_textcreditor", 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_entryexpiredate",null, rowIndex);
|
||||||
//提款金额
|
//发行金额
|
||||||
this.getModel().setValue("shkd_drawamount", null, rowIndex);
|
this.getModel().setValue("shkd_entryamount", null, rowIndex);
|
||||||
//融资利率
|
//发行利率
|
||||||
this.getModel().setValue("shkd_startloanrate1", null, rowIndex);
|
this.getModel().setValue("shkd_startloanrate", null, rowIndex);
|
||||||
//融资余额
|
//融资余额
|
||||||
this.getModel().setValue("shkd_notrepayamount1", null, rowIndex);
|
this.getModel().setValue("shkd_notrepayamount", null, rowIndex);
|
||||||
} else {
|
} 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);
|
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);
|
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
|
@Override
|
||||||
public void afterAddRow(AfterAddRowEventArgs e) {
|
public void afterAddRow(AfterAddRowEventArgs e) {
|
||||||
String name = e.getEntryProp().getName();
|
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)) {
|
if ("shkd_bankcontract_entry".equals(name)) {
|
||||||
RowDataEntity[] rowDataEntities = e.getRowDataEntities();
|
RowDataEntity[] rowDataEntities = e.getRowDataEntities();
|
||||||
for (RowDataEntity rowDataEntity : rowDataEntities) {
|
for (RowDataEntity rowDataEntity : rowDataEntities) {
|
||||||
|
|
Loading…
Reference in New Issue