罚息减免申请流程审批页面【租金回笼计划】页面加载速度优化

This commit is contained in:
chaojie.li 2024-12-18 11:15:57 +08:00
parent 902192190d
commit 85d9ceb61c
3 changed files with 87 additions and 92 deletions

View File

@ -1,7 +1,7 @@
function TablePage(tableId,rowCount,displayPageSize,pageCount,curPage){
this.tableId = tableId;
this.rowCount = rowCount;
this.displayPageSize = 10;
this.displayPageSize = displayPageSize || 10;
this.pageCount = pageCount;
this.curPage = curPage+1;
//alert(this.curPage);

View File

@ -2,6 +2,7 @@
<%@page import="jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT" %>
<%@page import="jbo.app.tenwa.calc.LC_EBANK_PROCESS" %>
<%@page import="jbo.app.tenwa.calc.LC_EBANK_TEMP" %>
<%@ page import="cn.hutool.core.util.StrUtil" %>
<%@ page contentType="text/html; charset=GBK" %>
<%@ include file="/Frame/resources/include/include_begin_list.jspf" %>
<%
@ -21,7 +22,7 @@
if ("ReadOnly".equals(rightType)) {
dwTemp.MultiSelect = false;
}
dwTemp.setPageSize(10);
dwTemp.setPageSize(Integer.valueOf(StrUtil.blankToDefault(pageSize, "10")));
dwTemp.genHTMLObjectWindow(paymentNumber);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
@ -39,6 +40,7 @@
}
var overPenaltys = getItemValueArray(0, "PENALTY_OVER") + "," + TablePage.getCheckedItemValueArrayWithOtherPage("PENALTY_OVER", s_c_p[0]);
var planLists = getItemValueArray(0, "PLAN_LIST") + "," + TablePage.getCheckedItemValueArrayWithOtherPage("PLAN_LIST", s_c_p[0]);
planIDs = planIDs.replace(/,/ig, "@");
overPenaltys = overPenaltys.replace(/,/ig, "@");
var sReturn = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/PenaltyReduction/CheckPlanOverMoney.jsp", "planIDs=" + planIDs + "&flowunid=<%=flowunid%>&overPenaltys=" + overPenaltys);
@ -49,7 +51,9 @@
planLists = planLists.split(",");
var planList = "";
for (var i = 0; i < planLists.length; i++) {
planList += ",Ąž" + planLists[i] + "Ąż";
if(planLists[i]) {
planList += ",¡¾" + planLists[i] + "¡¿";
}
}
planList = planList.substring(1);
alert("计划期项为" + planList + "的数据已添加到罚息减免计划中!");
@ -64,7 +68,9 @@
planLists = planLists.split(",");
var planList = "";
for (var i = 0; i < planLists.length; i++) {
planList += ",Ąž" + planLists[i] + "Ąż";
if(planLists[i]) {
planList += ",¡¾" + planLists[i] + "¡¿";
}
}
planList = planList.substring(1);
alert("计划期项为" + planList + "的数据已添加到罚息减免计划中!");

View File

@ -2,94 +2,83 @@
<fenixs namespace="flow.PenaltyReductionFlow">
<!-- 审批页面-租金回笼计划 -->
<fenix id="queryRentPlanList">
select lcf.ID AS id,
lbc.PROJECT_ID AS project_id,
lbc.ID AS contract_id,
lbc.CONTRACT_STATUS AS contract_status,
lbc.BUSINESSTYPE AS businesstype,
lbc.SUBJECTID AS subjectid,
lbc.distributor_id AS distributor_id,
lbc.CONTRACT_NUMBER AS contract_number,
lcf.PAYMENT_NUMBER AS payment_number,
ifnull(lbu.customername, '') AS customername,
lbc.PROJECT_NAME AS project_name,
lcf.PLAN_LIST AS plan_list,
lcf.PLAN_DATE AS plan_date,
lcf.RENT AS rent,
lcf.CORPUS AS corpus,
lcf.INTEREST AS interest,
getRentPenalty(lcf.PAYMENT_NUMBER, lcf.PLAN_LIST, date_format(now(), '%Y/%m/%d')) AS penalty,
(ifnull(lcfd.rent, 0) + ifnull(lcfi.rent, 0)) AS fact_rent,
(ifnull(lcfd.corpus, 0) + ifnull(lcfi.corpus, 0)) AS fact_corpus,
(ifnull(lcfd.interest, 0) + ifnull(lcfi.interest, 0)) AS fact_interest,
(ifnull(lcfd.penalty, 0) + ifnull(lcfi.penalty, 0)) AS fact_penalty,
(ifnull(lcfd.corpus_adjust, 0) + ifnull(lcfi.corpus_adjust, 0)) AS corpus_adjust,
(ifnull(lcfd.interest_adjust, 0) + ifnull(lcfi.interest_adjust, 0)) AS interest_adjust,
(ifnull(lcfd.penalty_adjust, 0) + ifnull(lcfi.penalty_adjust, 0)) AS penalty_adjust,
(lcf.RENT - (ifnull(lcfd.rent, 0) + ifnull(lcfi.rent, 0))) AS rent_over,
(lcf.CORPUS -
(((ifnull(lcfd.corpus, 0) + ifnull(lcfi.corpus, 0)) + ifnull(lcfd.corpus_adjust, 0)) +
ifnull(lcfi.corpus_adjust, 0))) AS corpus_over,
(lcf.INTEREST -
(((ifnull(lcfd.interest, 0) + ifnull(lcfi.interest, 0)) + ifnull(lcfd.interest_adjust, 0)) +
ifnull(lcfi.interest_adjust, 0))) AS interest_over,
round((getRentPenalty(lcf.PAYMENT_NUMBER, lcf.PLAN_LIST, date_format(now(), '%Y/%m/%d')) -
((ifnull(lcfd.penalty, 0) + ifnull(lcfi.penalty, 0)) +
(ifnull(lcfd.penalty_adjust, 0) + ifnull(lcfi.penalty_adjust, 0)))), 2) AS penalty_over,
(case
when (((ifnull(lcfd.rent, 0) + ifnull(lcfi.rent, 0)) = lcf.RENT) and (round((getRentPenalty(
lcf.PAYMENT_NUMBER,
lcf.PLAN_LIST,
date_format(now(), '%Y/%m/%d')) -
((ifnull(lcfd.penalty, 0) + ifnull(lcfi.penalty, 0)) +
(ifnull(lcfd.penalty_adjust, 0) +
ifnull(lcfi.penalty_adjust, 0)))),
2) = '0.00'))
then '已回笼'
when ((ifnull(lcfd.rent, 0) + ifnull(lcfi.rent, 0)) > 0) then '部分回笼'
else '未回笼' end) AS planstatus
from lc_rent_plan lcf
left join lb_contract_info lbc
on lcf.CONTRACT_ID = lbc.ID
left join lc_calc_condition_status lccs
on lccs.PAYMENT_NUMBER = lcf.PAYMENT_NUMBER
left join lb_union_lessee_transfer lbu
on lcf.CONTRACT_ID = lbu.contract_id
left join (select lc_rent_income.PAYMENT_NUMBER AS payment_number,
lc_rent_income.PLAN_LIST AS plan_list,
lc_rent_income.PLAN_ID AS plan_id,
sum(lc_rent_income.RENT) AS rent,
sum(lc_rent_income.CORPUS) AS corpus,
sum(lc_rent_income.INTEREST) AS interest,
sum(lc_rent_income.PENALTY) AS penalty,
sum(lc_rent_income.CORPUS_ADJUST) AS corpus_adjust,
sum(lc_rent_income.INTEREST_ADJUST) AS interest_adjust,
sum(lc_rent_income.PENALTY_ADJUST) AS penalty_adjust
from lc_rent_income
where lc_rent_income.ROLL_BACK = '0'
<andEqual field="PAYMENT_NUMBER" value="paramstr" match="?paramstr != empty" />
group by lc_rent_income.PAYMENT_NUMBER, lc_rent_income.PLAN_LIST) lcfd
on lcf.PAYMENT_NUMBER = lcfd.payment_number and
lcf.PLAN_LIST = lcfd.plan_list
left join (select lc_rent_income_temp.PAYMENT_NUMBER AS payment_number,
lc_rent_income_temp.PLAN_LIST AS plan_list,
sum(lc_rent_income_temp.RENT) AS rent,
sum(lc_rent_income_temp.CORPUS) AS corpus,
sum(lc_rent_income_temp.INTEREST) AS interest,
sum(lc_rent_income_temp.PENALTY) AS penalty,
sum(lc_rent_income_temp.CORPUS_ADJUST) AS corpus_adjust,
sum(lc_rent_income_temp.INTEREST_ADJUST) AS interest_adjust,
sum(lc_rent_income_temp.PENALTY_ADJUST) AS penalty_adjust
from lc_rent_income_temp
where lc_rent_income_temp.IS_FLOWING = 0
and lc_rent_income_temp.ROLL_BACK = '0'
<andEqual field="PAYMENT_NUMBER" value="paramstr" match="?paramstr != empty" />
group by lc_rent_income_temp.PAYMENT_NUMBER, lc_rent_income_temp.PLAN_LIST) lcfi
on lcf.PAYMENT_NUMBER = lcfi.payment_number and lcf.PLAN_LIST = lcfi.plan_list
<trimWhere>
<andEqual field="lcf.PAYMENT_NUMBER" value="paramstr" match="?paramstr != empty" />
</trimWhere>
order by lcf.payment_number, lcf.plan_list
select tt.*,
tt.rent - tt.fact_rent as rent_over,
tt.corpus - tt.fact_corpus - tt.corpus_adjust as corpus_over,
tt.interest - tt.fact_interest - tt.interest_adjust as interest_over,
tt.penalty - tt.fact_penalty - tt.penalty_adjust as penalty_over,
case
when tt.rent = tt.fact_rent and tt.penalty = tt.fact_penalty + tt.penalty_adjust then '已回笼'
when tt.fact_rent > 0 then '部分回笼'
else '未回笼' end as planstatus
from (select lcf.id as id,
lbc.project_id as project_id,
lbc.id as contract_id,
lbc.contract_status as contract_status,
lbc.businesstype as businesstype,
lbc.subjectid as subjectid,
lbc.distributor_id as distributor_id,
lbc.contract_number as contract_number,
lcf.payment_number as payment_number,
ifnull(lbu.customername, '') as customername,
lbc.project_name as project_name,
lcf.plan_list as plan_list,
lcf.plan_date as plan_date,
lcf.rent as rent,
lcf.corpus as corpus,
lcf.interest as interest,
getrentpenalty(lcf.payment_number, lcf.plan_list, date_format(now(), '%Y/%m/%d')) as penalty,
round(ifnull(lcfd.rent, 0) + ifnull(lcfi.rent, 0), 2) as fact_rent,
round(ifnull(lcfd.corpus, 0) + ifnull(lcfi.corpus, 0), 2) as fact_corpus,
round(ifnull(lcfd.interest, 0) + ifnull(lcfi.interest, 0), 2) as fact_interest,
round(ifnull(lcfd.penalty, 0) + ifnull(lcfi.penalty, 0), 2) as fact_penalty,
round(ifnull(lcfd.corpus_adjust, 0) + ifnull(lcfi.corpus_adjust, 0), 2) as corpus_adjust,
round(ifnull(lcfd.interest_adjust, 0) + ifnull(lcfi.interest_adjust, 0), 2) as interest_adjust,
round(ifnull(lcfd.penalty_adjust, 0) + ifnull(lcfi.penalty_adjust, 0), 2) as penalty_adjust
from lc_rent_plan lcf
left join lb_contract_info lbc
on lcf.contract_id = lbc.id
left join lc_calc_condition_status lccs
on lccs.payment_number = lcf.payment_number
left join lb_union_lessee_transfer lbu
on lcf.contract_id = lbu.contract_id
left join (select lri.payment_number as payment_number,
lri.plan_list as plan_list,
lri.plan_id as plan_id,
sum(lri.rent) as rent,
sum(lri.corpus) as corpus,
sum(lri.interest) as interest,
sum(lri.penalty) as penalty,
sum(lri.corpus_adjust) as corpus_adjust,
sum(lri.interest_adjust) as interest_adjust,
sum(lri.penalty_adjust) as penalty_adjust
from lc_rent_income lri
where payment_number = #{paramstr}
and lri.roll_back = '0'
group by lri.payment_number, lri.plan_list
) lcfd
on lcf.payment_number = lcfd.payment_number and
lcf.plan_list = lcfd.plan_list
left join (select lrit.payment_number as payment_number,
lrit.plan_list as plan_list,
sum(lrit.rent) as rent,
sum(lrit.corpus) as corpus,
sum(lrit.interest) as interest,
sum(lrit.penalty) as penalty,
sum(lrit.corpus_adjust) as corpus_adjust,
sum(lrit.interest_adjust) as interest_adjust,
sum(lrit.penalty_adjust) as penalty_adjust
from lc_rent_income_temp lrit
where payment_number = #{paramstr}
and lrit.is_flowing = 0
and lrit.roll_back = '0'
group by lrit.payment_number, lrit.plan_list
) lcfi
on lcf.payment_number = lcfi.payment_number and lcf.plan_list = lcfi.plan_list
where lcf.payment_number = #{paramstr}
) tt
where tt.rent > tt.fact_rent or tt.penalty > tt.fact_penalty
order by tt.payment_number, tt.plan_list
</fenix>
<fenix id="queryRentPlanRemainPenalty">