补充提前结清流程

This commit is contained in:
tangfutang 2018-08-26 18:43:06 +08:00
parent 0cb97b322d
commit acdf6b2468
4 changed files with 100 additions and 10 deletions

View File

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

View File

@ -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"%>
<script type="text/javascript">
function newRecord(){
AsDialog.OpenSelector("SelectEbankData","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
sReturn = sReturn.split("@");
var id = sReturn[0];
var ebank_sn = sReturn[1];
var result = AsControl.RunJsp("/Tenwa/Lease/Flow/Fund/FundCollection/CheckEbankID.jsp","EBANKID="+id);
if("FALSE" == result){
alert("此笔网银已发起收款流程!");
return;
}
var message = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","copyLCEbankTemp","flowunid=<%=flowunid%>,contractId="+id);
reloadSelf();
},"请选择收款网银");
}
function viewAndEdit(){
var sUrl = "/Tenwa/Lease/Flow/Fund/FundCollection/LCEbankTempInfo.jsp";
var sPara = "<%=flowunid%>";
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
AsControl.OpenView(sUrl,'FlowUnid=' +sPara ,'_self','');
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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<String,String> fromCondtion = new HashMap<String, String>();
fromCondtion.put("id",contractId);
Map<String,String> otherProperty = new HashMap<String,String>();
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;
}

View File

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