diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp index f6245f354..a5369073c 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp @@ -15,6 +15,7 @@ BizObject condition=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); String paymentnumber=condition.getAttribute("payment_number").getString(); String contractId=condition.getAttribute("contract_id").getString(); + String cautionmoney = Sqlca.getString("select caution_money from lc_calc_condition where CONTRACT_ID='"+contractId+"'"); BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid); String productId=flow.getAttribute("productId").getString(); @@ -69,7 +70,7 @@ var overduerent = terminateInfo.overduerent; var remainfpenalty = terminateInfo.remainfpenalty; var surplusinterest = terminateInfo.remaininterest; - //逾期利息暂时赋值为0 + //逾期利息暂时赋值为0FIST_RENT // setItemValue(0,getRow(),"DUN_PENALTY","0"); setItemValue(0,getRow(),"DUN_PENALTY",remainfpenalty); setItemValue(0,getRow(),"AGREED_PENALTY","0"); @@ -101,10 +102,13 @@ setItemValue(0,getRow(),"COLLECT_FEES",fessMoneys[0]); setItemValue(0,getRow(),"DISPOSE_MONEY",fessMoneys[1]); setItemValue(0,getRow(),"SURPLUSINTEREST",surplusinterest); - setItemValue(0,getRow(),"CONTRACT_TOTAL",parseFloat(getItemValue(0,getRow(),"DUN_RENT"))+parseFloat(fessMoneys[0])); + setItemValue(0,getRow(),"GUARANTEEMONEY","<%=cautionmoney%>"); + setItemValue(0,getRow(),"CONTRACT_TOTAL",parseFloat(getItemValue(0,getRow(),"DUN_RENT"))+parseFloat(fessMoneys[0])+parseFloat(remaincorpus)); } }else{ - setItemValue(0,getRow(),"CONTRACT_TOTAL",getItemValue(0,getRow(),"DUN_RENT")); + setItemValue(0,getRow(),"OTHER_IN","200"); + setItemValue(0,getRow(),"OTHER_OUT","<%=cautionmoney%>"); + setItemValue(0,getRow(),"CONTRACT_TOTAL",Number(overduerent)+Number(remainfpenalty)+Number(remaincorpus)+Number(terminateInfo.fist_rent)+Number(remaincorpus*0.05)+Number(getItemValue(0,getRow(),"OTHER_IN"))+Number(getItemValue(0,getRow(),"NOMINAL_PRICE"))-Number(getItemValue(0,getRow(),"OTHER_OUT")).toFixed(2)); } } } @@ -134,9 +138,9 @@ var otherin = getItemValue(0,getRow(),"OTHER_IN"); var otherout = getItemValue(0,getRow(),"OTHER_OUT"); var sdnominalPrice=getItemValue(0,getRow(),"SDNOMINAL_PRICE"); - return Number(dunrent ? dunrent : 0 ) + Number(agreedPenalty ? agreedPenalty : 0 ) + Number(corpusOverage ? corpusOverage : 0 ) + return (Number(dunrent ? dunrent : 0 ) + Number(agreedPenalty ? agreedPenalty : 0 ) + Number(corpusOverage ? corpusOverage : 0 ) + Number(fistCorpus ? fistCorpus : 0 ) + Number(sdhandlingCharge ? sdhandlingCharge : 0 ) + Number(otherin ? otherin : 0 ) - - Number(otherout ? otherout : 0 ) + Number(sdnominalPrice ? sdnominalPrice : 0 ) ; + - Number(otherout ? otherout : 0 ) + Number(sdnominalPrice ? sdnominalPrice : 0 )).toFixed(2) ; } //计算债券总计 /* function getContractBondTotal(){ @@ -171,7 +175,7 @@ //检查是否进行过变更 var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","checkIsRentChange","flowunid=<%=flowunid%>,plannumber=<%=paymentnumber%>"); if(result == 'true'){ - setItemValue(0,getRow(),"CONTRACT_TOTAL",updateContractBondTotal()); + setItemValue(0,getRow(),"MAXIMUM_TOTAL",updateContractBondTotal()); as_save("myiframe0","run()"); }else{ alert('请先撤销变更,再进行变更操作!!!'); @@ -208,10 +212,26 @@ $("#A_div_1698").attr("style","display:block;"); $("#A_div_1896").attr("style","display:block;"); $("#A_div_2094").attr("style","display:block;"); + $("#A_div_2712").attr("style","display:block;"); + $("#A_div_1061").attr("style","display:none;"); + $("#A_div_1062").attr("style","display:none;"); + $("#A_div_1301").attr("style","display:none;"); + $("#A_div_1302").attr("style","display:none;"); + $("#A_div_1064").attr("style","display:none;"); + $("#A_div_1065").attr("style","display:none;"); + $("#A_div_2506").attr("style","display:none;"); }else{ $("#A_div_1698").attr("style","display:none;"); $("#A_div_1896").attr("style","display:none;"); $("#A_div_2094").attr("style","display:none;"); + $("#A_div_2712").attr("style","display:none;"); + $("#A_div_1061").attr("style","display:block;"); + $("#A_div_1062").attr("style","display:block;"); + $("#A_div_1301").attr("style","display:block;"); + $("#A_div_1302").attr("style","display:block;"); + $("#A_div_1064").attr("style","display:block;"); + $("#A_div_1065").attr("style","display:block;"); + $("#A_div_2506").attr("style","display:block;"); } } diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCEbankTempList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCEbankTempList.jsp new file mode 100644 index 000000000..b78bb95c3 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCEbankTempList.jsp @@ -0,0 +1,51 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2018-08-26 + Content: + History Log: + */ + String flowunid = CurPage.getParameter("FlowUnid"); + ASObjectModel doTemp = new ASObjectModel("LCEbankTempList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(flowunid); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"true","","Button","新增","新增","newRecord()","","","","btn_icon_add",""}, + {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, + {"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert('删除成功!')')","","","","btn_icon_delete",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java index 2506e99d9..1a3996cd0 100644 --- a/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java +++ b/calc/com/tenwa/reckon/executor/CreateTransactionExecutor.java @@ -40,6 +40,9 @@ import com.amarsoft.are.util.json.JSONObject; import com.amarsoft.awe.util.SqlObject; import com.tenwa.comm.exception.BusinessException; import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService; +import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum; +import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp; import com.tenwa.officetempalte.util.ExcelVersionEnum; import com.tenwa.quartz.StringUtil; import com.tenwa.reckon.bean.AdjustBean; @@ -934,7 +937,21 @@ public class CreateTransactionExecutor implements Transaction { } return "true"; } - + /** + * 提前结清网银考表操作 + * @return + */ + public String copyLCEbankTemp(JBOTransaction tx) throws Exception { + Map fromCondtion = new HashMap(); + fromCondtion.put("id",contractId); + Map otherProperty = new HashMap(); + otherProperty.put("FlowUnid", flowunid); + // otherProperty.put("ID", id); + LeaseFlowBaseService service=new LeaseFlowBaseServiceImp(); + service.copyEbankInfo(tx, fromCondtion, null,otherProperty, ServiceOperatorEnum.FormalToTemp); + String sMessage="true"; + return ""; + } public String getCalType() { return calType; } diff --git a/calc/com/tenwa/reckon/executor/RentCalHelper.java b/calc/com/tenwa/reckon/executor/RentCalHelper.java index a6a0ba54d..f9a441eeb 100644 --- a/calc/com/tenwa/reckon/executor/RentCalHelper.java +++ b/calc/com/tenwa/reckon/executor/RentCalHelper.java @@ -154,9 +154,11 @@ public class RentCalHelper { String sql = "select sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.remaincorpus else 0 end ) remaincorpus," + " sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.remaininterest else 0 end ) remaininterest, " +" sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.corpus else 0 end ) remainfincorpus," - + "sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.penalty else 0 end ) remainfpenalty," + + "sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.penalty else 0 end ) remainfpenalty," +" sum(case when DATE_FORMAT( t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.interest else 0 end ) remainfininterest," - +" sum(case when DATE_FORMAT( t.plandate,'%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.overduerent else 0 end ) overduerent,sum(case when t.cou< t.planlist and t.planlist-t.cou<=12-t.cou then t.interest else 0 end) fist_rent," + +" sum(case when DATE_FORMAT( t.plandate,'%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.overduerent else 0 end ) overduerent," + + "sum(case when t.cou< t.planlist and t.planlist-t.cou<=12-t.cou then t.interest else 0 end)" + + "+sum(case when t.cou=t.planlist and t.planlist-t.cou<=12-t.cou then t.remainint else 0 end) fist_rent," + " sum(case when t.cou< t.planlist and t.planlist-t.cou>12-t.cou then t.corpus else 0 end) fist_corpus," + " max( case when DATE_FORMAT(t.plandate, '%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.plandate else '0' end) plandate" + " from (" @@ -165,7 +167,7 @@ public class RentCalHelper { + " t1.interestbusiness - ifnull(t2.sumincomeinterest,0) remaininterest," + " t1.rent - ifnull(t2.sumincomerent,0) overduerent, t1.rent," + " t1.corpus," - + " t1.interest," + + " t1.interest, t1.interest-ifnull(t2.sumincomeinterest,0) remainint," + " IFNULL(t1.penalty,0)-ifnull(t2.sumincomepenalty,0) penalty," + " t1.plandate," + " t1.planlist,IFNULL(t2.planlist,0) cou"