From 83b557d8e0f55062be5295b71e86a00f3e68cb42 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Fri, 12 Jun 2020 18:17:49 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8F=90=E5=89=8D=E7=BB=93=E6=B8=85=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E5=90=8E=E4=B8=8D=E5=86=8D=E5=8D=A1=E6=89=A3=E3=80=82?= =?UTF-8?q?=E5=8D=A1=E6=89=A3=E4=B8=AD=E4=B8=8D=E8=83=BD=E6=8F=90=E5=89=8D?= =?UTF-8?q?=E7=BB=93=E6=B8=85=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LCContractTerminateInfo.jsp | 12 +++++ .../Flow/Rent/RentIncome/VILCRentPlanList.jsp | 7 ++- .../tenwa/reckon/executor/RentCalHelper.java | 44 +++++++++++++++++-- 3 files changed, 59 insertions(+), 4 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp index 837948576..7c659c5db 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp @@ -212,6 +212,18 @@ alert("该合同有保证金代偿,无法发起提前结清!"); return ; } + //校验是否正在卡扣中 + var isAutoBuckle = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","isAutoBuckle","contractId=<%=contractId%>"); + if("false" == isAutoBuckle){ + alert("该合同有正在卡扣的租金,无法发起提前结清!"); + return ; + } + //校验是否有租金占用情况 + var isOccupyRent = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","isOccupyRent","paymentnumber=<%=paymentnumber%>"); + if("false" == isOccupyRent){ + alert("该合同有正在收款的信息,无法发起提前结清!"); + return ; + } //检查是否进行过变更 var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","checkIsRentChange","flowunid=<%=flowunid%>,plannumber=<%=paymentnumber%>"); if(result == 'true'){ diff --git a/WebContent/Tenwa/Lease/Flow/Rent/RentIncome/VILCRentPlanList.jsp b/WebContent/Tenwa/Lease/Flow/Rent/RentIncome/VILCRentPlanList.jsp index 7aea66640..18ced88d2 100644 --- a/WebContent/Tenwa/Lease/Flow/Rent/RentIncome/VILCRentPlanList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Rent/RentIncome/VILCRentPlanList.jsp @@ -196,13 +196,18 @@ var overPenaltys = getItemValueArray(0,"penalty_over")+","+TablePage.getCheckedItemValueArrayWithOtherPage("penalty_over",s_c_p[0]); overCorpuss = overCorpuss.replace(/,/ig,"@"); overInterests = overInterests.replace(/,/ig,"@"); - overPenaltys = overPenaltys.replace(/,/ig,"@") + overPenaltys = overPenaltys.replace(/,/ig,"@"); if(id.startsWith("@")){ id = id.substring(1); overCorpuss = overCorpuss.substring(1); overInterests = overInterests.substring(1); overPenaltys = overPenaltys.substring(1); } + var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper", "isAutoBuckleByPlanId", "planId="+id); + if(result="false"){ + alert("选中的租金有正在卡扣中!请稍后再试!"); + return; + } var sReturn = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/RentIncome/CheckPlanOverMoney.jsp","planIDs="+id+"&overCorpuss="+overCorpuss+"&overInterests="+overInterests+"&overPenaltys="+overPenaltys+"&flowunid=<%=flowunid%>&mayopeMoney="+mayopeMoney+"&factDate=<%=factDate%>"); var message = ""; var flag = false; diff --git a/calc/com/tenwa/reckon/executor/RentCalHelper.java b/calc/com/tenwa/reckon/executor/RentCalHelper.java index 7111d27f9..69f3a52d3 100644 --- a/calc/com/tenwa/reckon/executor/RentCalHelper.java +++ b/calc/com/tenwa/reckon/executor/RentCalHelper.java @@ -10,6 +10,7 @@ import jbo.app.tenwa.calc.LC_RENT_INCOME; import jbo.app.tenwa.calc.LC_RENT_PLAN; import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; import jbo.com.tenwa.lease.comm.LC_CAR_DISPOSE; +import jbo.com.tenwa.lease.comm.LC_OCCUPY_RENT_LIST; import com.amarsoft.app.awe.config.InitDBType; import com.amarsoft.are.jbo.BizObject; @@ -34,7 +35,9 @@ public class RentCalHelper { private String startList; private String paydayAdjust; private String paymentnumber; + private String planId; + /** * 获取开始期次是否回笼 * @return @@ -333,7 +336,7 @@ public class RentCalHelper { Map map = dates.get(0); if("null".equals(map.get("date"))){ BizObjectManager lccMange = JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME); - BizObject lcc = lccMange.createQuery("contract_id=:contractid").setParameter("contractid", this.contractId).getSingleResult(false); + BizObject lcc = lccMange.createQuery("contract_id=:contractid").setParameter("contractid", this.contractId).getSingleResult(false); return lcc==null?"error":lcc.getAttribute("START_DATE").getString(); }else{ return map.get("date"); @@ -354,7 +357,35 @@ public class RentCalHelper { } return "true"; } - + //校验合同是否有正在卡扣中 + public String isAutoBuckle() throws Exception{ + BizObjectManager lrpManage = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME); + List lrps = lrpManage.createQuery(" contract_id=:contractId AND batch_status='process' and (collect_status in ('代偿','未收款','部分收款','') or collect_status is null)").setParameter("contractId", contractId).getResultList(false); + if(lrps.size()>0){ + return "false"; + } + return "true"; + } + //校验合同是否有正在卡扣中 + public String isAutoBuckleByPlanId() throws Exception{ + String [] planIds = planId.split("@"); + BizObjectManager lrpManage = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME); + for(int i= 0;i lrps = lrpManage.createQuery(" id=:planId AND batch_status='process' and (collect_status in ('代偿','未收款','部分收款','') or collect_status is null)").setParameter("planId", planIds[i]).getResultList(false); + if(lrps.size()>0){ + return "false"; + } + } + return "true"; + } + //检验合同是否正在网银收款中 + public String isOccupyRent() throws Exception{ + List bol = JBOFactory.createBizObjectQuery(LC_OCCUPY_RENT_LIST.CLASS_NAME,"FLOW_NAME in ('网银收款','微信银联收款','微信支付收款','合同中途终止') and payment_number=:payment_number").setParameter("payment_number", paymentnumber).getResultList(false); + if(bol.size()>0){ + return "false"; + } + return "true"; + } public String getContractId() { return contractId; } @@ -387,6 +418,13 @@ public class RentCalHelper { public void setPaymentnumber(String paymentnumber) { this.paymentnumber = paymentnumber; } - + + public String getPlanId() { + return planId; + } + + public void setPlanId(String planId) { + this.planId = planId; + } }