From 85d9ceb61ce726e64418956ee61c17d131f97c79 Mon Sep 17 00:00:00 2001 From: "chaojie.li" Date: Wed, 18 Dec 2024 11:15:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=9A=E6=81=AF=E5=87=8F=E5=85=8D=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=B5=81=E7=A8=8B=E5=AE=A1=E6=89=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E3=80=90=E7=A7=9F=E9=87=91=E5=9B=9E=E7=AC=BC=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E3=80=91=E9=A1=B5=E9=9D=A2=E5=8A=A0=E8=BD=BD=E9=80=9F=E5=BA=A6?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Frame/page/js/ow/as_dw_list_page.js | 2 +- .../VILCRentPlanForReductionList.jsp | 12 +- config/fenix/flow/PenaltyReductionFlow.xml | 165 ++++++++---------- 3 files changed, 87 insertions(+), 92 deletions(-) diff --git a/WebContent/Frame/page/js/ow/as_dw_list_page.js b/WebContent/Frame/page/js/ow/as_dw_list_page.js index 08b9f948d..354811106 100644 --- a/WebContent/Frame/page/js/ow/as_dw_list_page.js +++ b/WebContent/Frame/page/js/ow/as_dw_list_page.js @@ -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); diff --git a/WebContent/Tenwa/Lease/Flow/Rent/PenaltyReduction/VILCRentPlanForReductionList.jsp b/WebContent/Tenwa/Lease/Flow/Rent/PenaltyReduction/VILCRentPlanForReductionList.jsp index 4eb921e21..19f3cfce8 100644 --- a/WebContent/Tenwa/Lease/Flow/Rent/PenaltyReduction/VILCRentPlanForReductionList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Rent/PenaltyReduction/VILCRentPlanForReductionList.jsp @@ -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 + "的数据已添加到罚息减免计划中!"); diff --git a/config/fenix/flow/PenaltyReductionFlow.xml b/config/fenix/flow/PenaltyReductionFlow.xml index a479c805e..1b99266eb 100644 --- a/config/fenix/flow/PenaltyReductionFlow.xml +++ b/config/fenix/flow/PenaltyReductionFlow.xml @@ -2,94 +2,83 @@ - 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' - - 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' - - 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 - - - - 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