diff --git a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/VIActualFundPlan.jsp b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/VIActualFundPlan.jsp index 3194e31fd..780c37f0d 100644 --- a/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/VIActualFundPlan.jsp +++ b/WebContent/Tenwa/Lease/Flow/Fund/ActualPayment/VIActualFundPlan.jsp @@ -47,7 +47,15 @@ AsDebug.showMessage("提示","每次只能生成放款方式相同的合同!","","",true); return; } - contractIds += "@"+getItemValue(0,rows[i],"ID"); + var result0 = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","check","flowunid=<%=flowunid%>"+",payType="+payType); + if(result0=="0"){ + contractIds += "@"+getItemValue(0,rows[i],"ID"); + }else{ + AsDebug.showMessage("提示","每次只能生成放款方式相同的合同!","","",true); + return; + } + + } contractIds = contractIds.substring(1); var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","createActualPayment","contractIds="+contractIds+",flowunid=<%=flowunid%>,userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>"+",payType="+payType); diff --git a/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java b/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java index 9f7c0c0e2..e6e155706 100644 --- a/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java +++ b/src_tenwa/com/tenwa/flow/fund/fundcollection/FundIncomeMethod.java @@ -13,6 +13,7 @@ import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; import jbo.app.tenwa.calc.LC_FUND_PLAN; import jbo.app.tenwa.calc.VI_LC_FUND_PLAN; import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT; +import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; @@ -447,6 +448,26 @@ public class FundIncomeMethod { // double CerificationMoney= Double.valueOf(corpus)+Double.valueOf(interest)+Double.valueOf(penalty); return c.doubleValue()+""; } - + public String check(JBOTransaction tx) throws Exception{ + String sql = "SELECT lfit.project_id,lpi.product_id,psl.paytype AS payType FROM"+ + "lc_fund_income_temp lfit "+ + "LEFT JOIN lb_project_info lpi ON lfit.project_id=lpi.id "+ + "LEFT JOIN PRD_SPECIFIC_LIBRARY psl ON psl.productid=lpi.product_id"+ + "WHERE lfit.flowunid=:flowunid"; + Map params=new HashMap(); + params.put("flowunid", flowunid); + List> payTypeList = DataOperatorUtil.getDataBySql(tx,sql,params); + if(payTypeList.size()<1){ + return "0"; + } + for(Map payType:payTypeList){ + String paytype = payType.get("payType"); + if(this.payType.equals(paytype)){ + return "0"; + } + return "1"; + } + return "1"; + } }