更新提前结清流程显示页面值

This commit is contained in:
tangfutang 2018-08-27 21:06:54 +08:00
parent e7c3da4431
commit 4e128b311c
6 changed files with 120 additions and 16 deletions

View File

@ -15,7 +15,7 @@
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","生成产权证书","生成产权证书","saveRecord()","","","","btn_icon_save"},
{"true","All","Button","써헌聯츠","써헌聯츠","saveRecord()","","","","btn_icon_save"},
};
sButtonPosition = "north";
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
@ -44,7 +44,8 @@
var tempParam={};
var sparam="";
var contract = getItemValue(0,getRow(0),"CONTRACT_ID");
param["templateNo"]="a9335f5624124b6db29f0d721fc8b61c";
// param["templateNo"]="a9335f5624124b6db29f0d721fc8b61c";
param["templateNo"]="dc3a7c204da74515bc6d27771928a95d";
//生成文件关联关系
tempParam["OBJECTTYPE"]="rights";

View File

@ -25,6 +25,7 @@
doTemp.setDefaultValue("PAYMENT_NUMBER", paymentnumber);
doTemp.setHtmlEvent("PAYDAY_ADJUST","onchange","getTerminateInfo");
doTemp.setHtmlEvent("ADJUST_TYPE","onchange","changeInfo");
doTemp.setHtmlEvent("OTHER_IN","onchange","changeContract");
doTemp.setHtmlEvent("REPURCHASE_RATIO","onchange","getRepurchaseMoney");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
@ -55,6 +56,7 @@
var adjusttype = getItemValue(0,0,"ADJUST_TYPE");
if(adjusttype.length==0){
alert("请先选择变更类型!!!");
setItemValue(0,getRow(),"PAYDAY_ADJUST","");
return;
}
//检查约定终止日是否合法
@ -70,9 +72,10 @@
var overduerent = terminateInfo.overduerent;
var remainfpenalty = terminateInfo.remainfpenalty;
var surplusinterest = terminateInfo.remaininterest;
var sumpenalty = terminateInfo.sumpenalty;
//逾期利息暂时赋值为0FIST_RENT
// setItemValue(0,getRow(),"DUN_PENALTY","0");
setItemValue(0,getRow(),"DUN_PENALTY",remainfpenalty);
setItemValue(0,getRow(),"DUN_PENALTY",sumpenalty);
setItemValue(0,getRow(),"AGREED_PENALTY","0");
//已到期租金
setItemValue(0,getRow(),"DUN_RENT",overduerent);
@ -92,6 +95,7 @@
setItemValue(0,getRow(),"REPAYMENT_INTEREST","0");
setItemValue(0,getRow(),"SDNOMINAL_PRICE","0");
setItemValue(0,getRow(),"SDHANDLING_CHARGE","0");
setItemValue(0,getRow(),"OTHER_OUT","<%=cautionmoney%>");
//计算合同债券总计
// setItemValue(0,getRow(),"CONTRACT_TOTAL",getContractBondTotal());
@ -101,13 +105,15 @@
var fessMoneys = fessMoney.split("@");
setItemValue(0,getRow(),"COLLECT_FEES",fessMoneys[0]);
setItemValue(0,getRow(),"DISPOSE_MONEY",fessMoneys[1]);
setItemValue(0,getRow(),"SURPLUSINTEREST",surplusinterest);
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(),"COLLECT_FEES","0.00");
setItemValue(0,getRow(),"DISPOSE_MONEY","0.00");
}
setItemValue(0,getRow(),"SURPLUSINTEREST",surplusinterest);
setItemValue(0,getRow(),"GUARANTEEMONEY","<%=cautionmoney%>");
setItemValue(0,getRow(),"CONTRACT_TOTAL",parseFloat(getItemValue(0,getRow(),"DUN_RENT"))+parseFloat(getItemValue(0,getRow(),"COLLECT_FEES"))+parseFloat(remaincorpus));
}else{
setItemValue(0,getRow(),"OTHER_IN","200");
setItemValue(0,getRow(),"OTHER_OUT","<%=cautionmoney%>");
setItemValue(0,getRow(),"OTHER_IN","0.00");
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));
}
}
@ -200,7 +206,9 @@
//其他应收和其他应退
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","getTerminateOtherInfoFinish","contractId=<%=contractId%>,paymentnumber=<%=paymentnumber%>");
for(var p in result){
setItemValue(0,getRow(),p,result[p]);
if(result[p]!=null){
setItemValue(0,getRow(),p,result[p]);
}
}
}
changeInfo();
@ -215,7 +223,7 @@
$("#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_1303").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;");
@ -227,12 +235,19 @@
$("#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_1303").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;");
}
var paydayadjust = getItemValue(0,0,"PAYDAY_ADJUST");
if(!(typeof(paydayadjust) == "undefined" || paydayadjust.length == 0)){
getTerminateInfo();
}
}
function changeContract(){
setItemValue(0,0,"CONTRACT_TOTAL",(Number(getItemValue(0,getRow(),"CONTRACT_TOTAL"))+Number(getItemValue(0,getRow(),"OTHER_IN"))).toFixed(2));
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -6,6 +6,9 @@
History Log:
*/
String flowunid = CurPage.getParameter("FlowUnid");
String flowName = CurPage.getParameter("FlowName");
String userID = CurUser.getUserID();
String orgID = CurUser.getOrgID();
ASObjectModel doTemp = new ASObjectModel("LCEbankTempList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
@ -17,7 +20,7 @@
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",""},
{"true","","Button","删除","删除","do_delete()","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
@ -34,7 +37,7 @@
alert("此笔网银已发起收款流程!");
return;
}
var message = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","copyLCEbankTemp","flowunid=<%=flowunid%>,contractId="+id);
var message = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","copyLCEbankTemp","flowunid=<%=flowunid%>,userID=<%=userID%>,orgID=<%=orgID%>,flow_name=<%=flowName%>,contractId="+id);
reloadSelf();
},"请选择收款网银");
}
@ -47,5 +50,22 @@
}
AsControl.OpenView(sUrl,'FlowUnid=' +sPara ,'_self','');
}
function do_delete(){
var ebanknumber = getItemValue(0,getRow(0),"EBANK_SN");
if(typeof(ebanknumber) == "undefined" || ebanknumber.length == 0 ){
alert("请选择一条信息!");
return ;
}
if(confirm('确实要删除吗?')){
debugger;
var message = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","deleteLCEbankTemp","flowunid=<%=flowunid%>,ebanknumber="+ebanknumber);
if("true"==message){
as_delete(0,'alert(删除成功!)');
}else{
alert("删除失败!");
}
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

Binary file not shown.

View File

@ -20,12 +20,15 @@ import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP;
import jbo.app.tenwa.calc.LC_CALC_RULES_TEMP;
import jbo.app.tenwa.calc.LC_CASH_FLOW;
import jbo.app.tenwa.calc.LC_CASH_FLOW_TEMP;
import jbo.app.tenwa.calc.LC_EBANK;
import jbo.app.tenwa.calc.LC_EBANK_PROCESS;
import jbo.app.tenwa.calc.LC_FUND_PLAN;
import jbo.app.tenwa.calc.LC_FUND_PLAN_TEMP;
import jbo.app.tenwa.calc.LC_FUND_RENT_ADJUST_TEMP;
import jbo.app.tenwa.calc.LC_RENT_PLAN;
import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.com.tenwa.lease.comm.LC_OCCUPY_RENT_LIST;
import jbo.com.tenwa.lease.comm.LC_PAY_CONDTION_TEMP;
import jbo.sys.CODE_LIBRARY;
@ -80,6 +83,10 @@ public class CreateTransactionExecutor implements Transaction {
private String productId;
private String planCName;
private String startDate;
private String userID;
private String orgID;
private String flow_name;
private String ebanknumber;
public String getStartDate() {
return startDate;
@ -951,9 +958,34 @@ public class CreateTransactionExecutor implements Transaction {
// otherProperty.put("ID", id);
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
service.copyEbankInfo(tx, fromCondtion, null,otherProperty, ServiceOperatorEnum.FormalToTemp);
//网银考临时表
Map<String,String> fromCondtion1 = new HashMap<String, String>();
fromCondtion1.put("id",contractId);
fromCondtion1.put("userID",userID);
fromCondtion1.put("orgID",orgID);
Map<String,String> otherProperty1 = new HashMap<String,String>();
otherProperty1.put("FlowUnid", flowunid);
otherProperty1.put("flow_name", flow_name);
LeaseFlowBaseService service1=new LeaseFlowBaseServiceImp();
service1.copyEbankInfoToProcess(tx, fromCondtion1, null,otherProperty1, ServiceOperatorEnum.FormalToTemp);
String sMessage="true";
return "";
}
/**
* 删除对应核销过程表
* @param tx
* @return
* @throws Exception
*/
public String deleteLCEbankTemp(JBOTransaction tx) throws Exception {
BizObjectManager leManage = JBOFactory.getBizObjectManager(LC_EBANK.CLASS_NAME, tx);
BizObject le = leManage.createQuery("EBANK_SN=:EBANK_SN").setParameter("EBANK_SN", ebanknumber).getSingleResult(false);
BizObjectManager lepManage = JBOFactory.getBizObjectManager(LC_EBANK_PROCESS.CLASS_NAME, tx);
lepManage.createQuery("delete from O where flowunid=:flowunid and EBANK_NUMBER=:ebanknumber").setParameter("flowunid", flowunid).setParameter("ebanknumber", le.getAttribute("ID").getString()).executeUpdate();
return "true";
}
public String getCalType() {
return calType;
}
@ -1039,6 +1071,38 @@ public class CreateTransactionExecutor implements Transaction {
this.planCName = planCName;
}
public String getUserID() {
return userID;
}
public void setUserID(String userID) {
this.userID = userID;
}
public String getOrgID() {
return orgID;
}
public void setOrgID(String orgID) {
this.orgID = orgID;
}
public String getFlow_name() {
return flow_name;
}
public void setFlow_name(String flow_name) {
this.flow_name = flow_name;
}
public String getEbanknumber() {
return ebanknumber;
}
public void setEbanknumber(String ebanknumber) {
this.ebanknumber = ebanknumber;
}
}

View File

@ -157,10 +157,14 @@ public class RentCalHelper {
+ "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)"
+ "+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 and DATE_FORMAT( t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.interest else 0 end)"
+ "+sum(case when t.cou=t.planlist and t.planlist-t.cou<=12-t.cou and DATE_FORMAT( t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') 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"
+ " max( case when DATE_FORMAT(t.plandate, '%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.plandate else '0' end) plandate,"
+ "sum(CASE WHEN DATE_FORMAT(t.plandate,'%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') THEN "
+ " getRentPenalty('"+this.getPaymentnumber()+"',t.planlist,DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d'))"
+ " else 0 end"
+ ") sumpenalty "
+ " from ("
+ " select "
+ " t1.corpus-ifnull(t2.sumincomecorpus,0) remaincorpus,"