parent
ae665f29dc
commit
51342a465f
|
@ -3,6 +3,9 @@ package shkd.sys.sys.plugin.tmc;
|
||||||
import kd.bos.bill.AbstractBillPlugIn;
|
import kd.bos.bill.AbstractBillPlugIn;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
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.entity.datamodel.events.PropertyChangedArgs;
|
||||||
import kd.bos.form.plugin.AbstractFormPlugin;
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
@ -52,7 +55,7 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug
|
||||||
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:修改值改变方案,当前方案不支持多选展示
|
//FIXME:修改值改变方案,当前方案不支持多选展示
|
||||||
// DynamicObject shkd_entrycontractnum = (DynamicObject) this.getView().getModel().getValue("shkd_entrycontractnum");
|
// DynamicObject shkd_entrycontractnum = (DynamicObject) this.getView().getModel().getValue("shkd_entrycontractnum");
|
||||||
// DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(shkd_entrycontractnum.get("id"), "cfm_loancontractbill");
|
// 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);
|
// this.getModel().setValue("shkd_contractenddate", cfm_loancontractbill.get("enddate"),rowIndex);
|
||||||
|
|
||||||
DynamicObjectCollection shkdBankcontractEntry = (DynamicObjectCollection) this.getView().getModel().getValue("shkd_bankcontract_entry");
|
DynamicObjectCollection shkdBankcontractEntry = this.getModel().getEntryEntity("shkd_bankcontract_entry");
|
||||||
for (int i = 0; i < shkdBankcontractEntry.size(); i++) {
|
// for (int i = 0; i < shkdBankcontractEntry.size(); i++) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
//获取每一行的数据,反写到每一行
|
//获取每一行的数据,反写到每一行
|
||||||
DynamicObject temp = shkdBankcontractEntry.get(i);
|
DynamicObject temp = shkdBankcontractEntry.get(rowIndex);
|
||||||
DynamicObject shkdLoanbill = temp.getDynamicObject("shkd_loanbill");
|
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");
|
DynamicObject cfm_loancontractbill = BusinessDataServiceHelper.loadSingle(shkdLoanbill.get("id"), "cfm_loanbill");
|
||||||
//借款人
|
//借款人
|
||||||
this.getModel().setValue("shkd_enryborrower", cfm_loancontractbill.get("org"), i);
|
this.getModel().setValue("shkd_enryborrower", cfm_loancontractbill.get("org"), rowIndex);
|
||||||
//债权人
|
//贷款人
|
||||||
this.getModel().setValue("shkd_entryorg", cfm_loancontractbill.get("textcreditor"), i);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue