parent
							
								
									a95ad33359
								
							
						
					
					
						commit
						ae665f29dc
					
				|  | @ -31,6 +31,20 @@ public class BdimbondBuildEntryPlugin extends AbstractFormPlugin implements Plug | ||||||
|     @Override |     @Override | ||||||
|     public void afterBindData(EventObject e) { |     public void afterBindData(EventObject e) { | ||||||
|         this.getView().setVisible(false, "shkd_bondissue","shkd_bankcontract"); |         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"); |         DecimalEdit attch= (DecimalEdit)this.getControl("e_underwriteratio"); | ||||||
|         AmountEdit attch2= (AmountEdit)this.getControl("e_underwriteamount"); |         AmountEdit attch2= (AmountEdit)this.getControl("e_underwriteamount"); | ||||||
|  |  | ||||||
|  | @ -15,10 +15,7 @@ import kd.bos.servicehelper.org.OrgUnitServiceHelper; | ||||||
| import kd.bos.servicehelper.org.OrgViewType; | import kd.bos.servicehelper.org.OrgViewType; | ||||||
| import kd.sdk.plugin.Plugin; | import kd.sdk.plugin.Plugin; | ||||||
| 
 | 
 | ||||||
| import java.util.ArrayList; | import java.util.*; | ||||||
| import java.util.Collections; |  | ||||||
| import java.util.EventObject; |  | ||||||
| import java.util.List; |  | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 债券发行/发行计划单据  债券发行,银行借款合同分录 选择F7时过滤 |  * 债券发行/发行计划单据  债券发行,银行借款合同分录 选择F7时过滤 | ||||||
|  | @ -30,8 +27,8 @@ public class BondSelectEntryOrgPlugin extends AbstractBillPlugIn implements Plug | ||||||
|         //债券发行编码 |         //债券发行编码 | ||||||
|         RefBillEdit edit = this.getView().getControl("shkd_entrybillno"); |         RefBillEdit edit = this.getView().getControl("shkd_entrybillno"); | ||||||
|         edit.addBeforeF7SelectListener(this); |         edit.addBeforeF7SelectListener(this); | ||||||
|         //借款合同单据编码 |         //提款单编号 | ||||||
|         RefBillEdit edit2 = this.getView().getControl("shkd_entrycontractnum"); |         RefBillEdit edit2 = this.getView().getControl("shkd_loanbill"); | ||||||
|         edit2.addBeforeF7SelectListener(this); |         edit2.addBeforeF7SelectListener(this); | ||||||
|         //借款人 |         //借款人 | ||||||
|         OrgEdit edit3 = this.getView().getControl("shkd_enryborrower"); |         OrgEdit edit3 = this.getView().getControl("shkd_enryborrower"); | ||||||
|  | @ -53,15 +50,21 @@ public class BondSelectEntryOrgPlugin extends AbstractBillPlugIn implements Plug | ||||||
|         IDataEntityProperty property = evt.getProperty(); |         IDataEntityProperty property = evt.getProperty(); | ||||||
|         String name = property.getName(); |         String name = property.getName(); | ||||||
|         List<QFilter> dataFilter = new ArrayList<>(); |         List<QFilter> dataFilter = new ArrayList<>(); | ||||||
|         if("shkd_entrycontractnum".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; | ||||||
|             } |             } | ||||||
|             QFilter accountQFilter = new QFilter("org.id", QCP.equals, shkdEnryborrower.getPkValue()); |             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)){ |         if("shkd_entrybillno".equals(name)){ | ||||||
|             QFilter accountQFilter = new QFilter("org.id", QCP.equals, orgId); |             QFilter accountQFilter = new QFilter("org.id", QCP.equals, orgId); | ||||||
|  |  | ||||||
|  | @ -34,17 +34,22 @@ public class inputBondEntryDataPlugin extends AbstractBillPlugIn implements Plug | ||||||
|             for (int i = 0; i < bondissueEntry.size(); i++) { |             for (int i = 0; i < bondissueEntry.size(); i++) { | ||||||
|                 //获取每一行的数据,反写到每一行 |                 //获取每一行的数据,反写到每一行 | ||||||
|                 DynamicObject temp = bondissueEntry.get(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_entryorg", cfm_loanbill_bond.get("org"),i); | ||||||
|                 //发行总额 |                 //起息日期 | ||||||
|                 this.getModel().setValue("shkd_entrytotalmount", cfm_loanbill_bond.get("amount"),i); |                 this.getModel().setValue("shkd_startintdate", cfm_loanbill_bond.get("startintdate"),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); |                 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)) { |         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); | //            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++) { |             for (int i = 0; i < shkdBankcontractEntry.size(); i++) { | ||||||
|                 //获取每一行的数据,反写到每一行 |                 //获取每一行的数据,反写到每一行 | ||||||
|                 DynamicObject temp = shkdBankcontractEntry.get(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_enryborrower", cfm_loancontractbill.get("org"), i); | ||||||
|                 //借款金额 |                 //债权人 | ||||||
|                 this.getModel().setValue("shkd_borrowamount", cfm_loancontractbill.get("amount"),i); |                 this.getModel().setValue("shkd_entryorg", cfm_loancontractbill.get("textcreditor"), i); | ||||||
|                 //合同开始日期 |                 //起息日期 | ||||||
|                 this.getModel().setValue("shkd_contractstartdate", cfm_loancontractbill.get("startdate"),i); |                 this.getModel().setValue("shkd_startintdate1", cfm_loancontractbill.get("startintdate"), i); | ||||||
|                 //合同结束日期 |                 //到期日期 | ||||||
|                 this.getModel().setValue("shkd_contractenddate", cfm_loancontractbill.get("enddate"),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); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue