提交人:刘森澳

日期:2025/5/08 16:15
内容:1、资金用途分录调整
This commit is contained in:
16358 2025-05-08 16:16:25 +08:00
parent a95ad33359
commit ae665f29dc
3 changed files with 53 additions and 25 deletions

View File

@ -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");

View File

@ -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<QFilter> 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<String> 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);

View File

@ -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)) {
@ -62,17 +67,23 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug
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_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);
}
}
}
}