罚息减免申请流程审批页面【租金回笼计划】页面加载速度优化
This commit is contained in:
parent
93c6a6cd3b
commit
17d27d75ba
@ -20,7 +20,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
AsDialog.OpenSelector("SelectPaymentHavePenaltyNew","businessType,"+businessType,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
AsDialog.OpenSelector("SelectPaymentHavePenalty","businessType,"+businessType,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"){
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
|
||||
@ -1,72 +1,75 @@
|
||||
<%@page import="java.math.BigDecimal"%>
|
||||
<%@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 contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
|
||||
String phaseNo = CurPage.getParameter("PhaseNo");
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String rightType = CurPage.getParameter("RightType");
|
||||
String paymentNumber = JBOFactory.createBizObjectQuery(FLOW_BUSSINESS_OBJECT.CLASS_NAME, "flow_unid=:flowunid")
|
||||
.setParameter("flowunid", flowunid).getSingleResult(false).getAttribute("flow_key").getString();
|
||||
ASObjectModel doTemp = new ASObjectModel("VILCRentPlanForReductionList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.MultiSelect = true;
|
||||
if("ReadOnly".equals(rightType)){
|
||||
dwTemp.MultiSelect = false;
|
||||
}
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow(paymentNumber);
|
||||
<%@page import="java.math.BigDecimal" %>
|
||||
<%@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 contentType="text/html; charset=GBK" %>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf" %>
|
||||
<%
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"ReadOnly".equals(rightType)?"false":"true","","Button","生成罚息减免","生成罚息减免","createPenaltyAdjust()","","","","btn_icon_add",""}
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
String phaseNo = CurPage.getParameter("PhaseNo");
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String rightType = CurPage.getParameter("RightType");
|
||||
String paymentNumber = JBOFactory.createBizObjectQuery(FLOW_BUSSINESS_OBJECT.CLASS_NAME, "flow_unid=:flowunid")
|
||||
.setParameter("flowunid", flowunid).getSingleResult(false).getAttribute("flow_key").getString();
|
||||
ASObjectModel doTemp = new ASObjectModel("VILCRentPlanForReductionList");
|
||||
doTemp.setDataQueryClass("com.tenwa.flow.rent.penalty_reduction.page.RentPlanListHtmlGenerator");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp, request);
|
||||
dwTemp.Style = "1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.MultiSelect = true;
|
||||
if ("ReadOnly".equals(rightType)) {
|
||||
dwTemp.MultiSelect = false;
|
||||
}
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow(paymentNumber);
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"ReadOnly".equals(rightType) ? "false" : "true", "", "Button", "生成罚息减免", "生成罚息减免", "createPenaltyAdjust()", "", "", "", "btn_icon_add", ""}
|
||||
};
|
||||
%>
|
||||
<%@include file="/Frame/resources/include/ui/include_list.jspf" %>
|
||||
<script type="text/javascript">
|
||||
function createPenaltyAdjust(){
|
||||
var planIDs = getItemValueArray(0,"ID")+","+TablePage.getCheckedItemValueArrayWithOtherPage("ID",s_c_p[0]);
|
||||
if(planIDs == ","){
|
||||
alert("请选中一行数据!");
|
||||
return;
|
||||
}
|
||||
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);
|
||||
if("ERROR" == sReturn){
|
||||
if(confirm("罚息余额已产生变化,是否以最新的余额自动生成记录?")){
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.flow.rent.rentincome.RentIncomeMethod","setPenaltyDataToRentIncome","planIDs="+planIDs+",flowunid=<%=flowunid%>,isChanged=Y");
|
||||
if(sReturn == "SUCCESS"){
|
||||
planLists = planLists.split(",");
|
||||
var planList = "";
|
||||
for(var i=0;i<planLists.length;i++){
|
||||
planList += ",【"+planLists[i]+"】";
|
||||
}
|
||||
planList = planList.substring(1);
|
||||
alert("计划期项为"+planList+"的数据已添加到罚息减免计划中!");
|
||||
reloadSelf();
|
||||
}
|
||||
}else{
|
||||
reloadSelf();
|
||||
}
|
||||
}else{
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.flow.rent.rentincome.RentIncomeMethod","setPenaltyDataToRentIncome","planIDs="+planIDs+",overPenaltys="+overPenaltys+",flowunid=<%=flowunid%>,isChanged=N");
|
||||
if(sReturn == "SUCCESS"){
|
||||
planLists = planLists.split(",");
|
||||
var planList = "";
|
||||
for(var i=0;i<planLists.length;i++){
|
||||
planList += ",【"+planLists[i]+"】";
|
||||
}
|
||||
planList = planList.substring(1);
|
||||
alert("计划期项为"+planList+"的数据已添加到罚息减免计划中!");
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
}
|
||||
function createPenaltyAdjust() {
|
||||
var planIDs = getItemValueArray(0, "ID") + "," + TablePage.getCheckedItemValueArrayWithOtherPage("ID", s_c_p[0]);
|
||||
if (planIDs == ",") {
|
||||
alert("请选中一行数据!");
|
||||
return;
|
||||
}
|
||||
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);
|
||||
if ("ERROR" == sReturn) {
|
||||
if (confirm("罚息余额已产生变化,是否以最新的余额自动生成记录?")) {
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.flow.rent.rentincome.RentIncomeMethod", "setPenaltyDataToRentIncome", "planIDs=" + planIDs + ",flowunid=<%=flowunid%>,isChanged=Y");
|
||||
if (sReturn == "SUCCESS") {
|
||||
planLists = planLists.split(",");
|
||||
var planList = "";
|
||||
for (var i = 0; i < planLists.length; i++) {
|
||||
planList += ",【" + planLists[i] + "】";
|
||||
}
|
||||
planList = planList.substring(1);
|
||||
alert("计划期项为" + planList + "的数据已添加到罚息减免计划中!");
|
||||
reloadSelf();
|
||||
}
|
||||
} else {
|
||||
reloadSelf();
|
||||
}
|
||||
} else {
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.flow.rent.rentincome.RentIncomeMethod", "setPenaltyDataToRentIncome", "planIDs=" + planIDs + ",overPenaltys=" + overPenaltys + ",flowunid=<%=flowunid%>,isChanged=N");
|
||||
if (sReturn == "SUCCESS") {
|
||||
planLists = planLists.split(",");
|
||||
var planList = "";
|
||||
for (var i = 0; i < planLists.length; i++) {
|
||||
planList += ",【" + planLists[i] + "】";
|
||||
}
|
||||
planList = planList.substring(1);
|
||||
alert("计划期项为" + planList + "的数据已添加到罚息减免计划中!");
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf" %>
|
||||
107
config/fenix/flow/PenaltyReductionFlow.xml
Normal file
107
config/fenix/flow/PenaltyReductionFlow.xml
Normal file
@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fenixs namespace="flow.PenaltyReductionFlow.pagelist">
|
||||
<!-- 审批页面-租金回笼计划 -->
|
||||
<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'
|
||||
and PAYMENT_NUMBER = #{paymentNumber}
|
||||
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'
|
||||
and PAYMENT_NUMBER = #{paymentNumber}
|
||||
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
|
||||
where lcf.PAYMENT_NUMBER = #{paymentNumber}
|
||||
</fenix>
|
||||
|
||||
<fenix id="queryRentPlanRemainPenalty">
|
||||
select round(getRentPenalty(lrp.PAYMENT_NUMBER, lrp.PLAN_LIST, date_format(now(), '%Y/%m/%d')) -
|
||||
ifnull((select sum(lri.PENALTY + PENALTY_ADJUST)
|
||||
from lc_rent_income lri
|
||||
where lri.PAYMENT_NUMBER = lrp.PAYMENT_NUMBER
|
||||
and lri.PLAN_LIST = lrp.PLAN_LIST
|
||||
), 0) - ifnull((select sum(lri.PENALTY + PENALTY_ADJUST)
|
||||
from lc_rent_income_temp lri
|
||||
where lri.PAYMENT_NUMBER = lrp.PAYMENT_NUMBER
|
||||
and lri.PLAN_LIST = lrp.PLAN_LIST
|
||||
), 0),
|
||||
2) as plan_penalty
|
||||
from lc_rent_plan lrp
|
||||
where lrp.id = #{planId}
|
||||
</fenix>
|
||||
</fenixs>
|
||||
60
src_core/com/tenwa/util/SqlRunnerUtil.java
Normal file
60
src_core/com/tenwa/util/SqlRunnerUtil.java
Normal file
@ -0,0 +1,60 @@
|
||||
package com.tenwa.util;
|
||||
|
||||
import cn.hutool.db.*;
|
||||
import cn.hutool.db.dialect.impl.MysqlDialect;
|
||||
import cn.hutool.db.handler.RsHandler;
|
||||
import cn.hutool.db.sql.SqlBuilder;
|
||||
import cn.hutool.db.sql.SqlExecutor;
|
||||
import com.amarsoft.are.sql.Connection;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.blinkfox.fenix.bean.SqlInfo;
|
||||
import com.blinkfox.fenix.core.Fenix;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @program: apzl_leasing
|
||||
* @description:
|
||||
* @author: 李超杰
|
||||
* @create: 2024-12-12 09:23
|
||||
*/
|
||||
public class SqlRunnerUtil {
|
||||
|
||||
private static SqlConnRunner sqlConnRunner = DbUtil.newSqlConnRunner(new MysqlDialect());
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param transaction
|
||||
* @param fullFenixId
|
||||
* @param paramMap
|
||||
* @param page
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
public static PageResult<Entity> page(Transaction transaction, String fullFenixId, Map<String, Object> paramMap, Page page) throws SQLException {
|
||||
SqlInfo xmlSqlInfo = Fenix.getXmlSqlInfo(fullFenixId, paramMap);
|
||||
Connection connection = transaction.getConnection();
|
||||
SqlBuilder sqlBuilder = SqlBuilder.of(xmlSqlInfo.getSql());
|
||||
sqlBuilder.addParams(xmlSqlInfo.getParams());
|
||||
return sqlConnRunner.page(connection, sqlBuilder, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询对象、列表、值、值列表等
|
||||
* @param transaction
|
||||
* @param fullFenixId
|
||||
* @param paramMap
|
||||
* @param rsh
|
||||
* @return
|
||||
* @param <T>
|
||||
* @throws SQLException
|
||||
*/
|
||||
public static <T> T query(Transaction transaction, String fullFenixId, Map<String, Object> paramMap, RsHandler<T> rsh) throws SQLException {
|
||||
SqlInfo xmlSqlInfo = Fenix.getXmlSqlInfo(fullFenixId, paramMap);
|
||||
Connection connection = transaction.getConnection();
|
||||
SqlBuilder sqlBuilder = SqlBuilder.of(xmlSqlInfo.getSql());
|
||||
sqlBuilder.addParams(xmlSqlInfo.getParams());
|
||||
return SqlExecutor.query(connection, sqlBuilder, rsh);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
package com.tenwa.flow.rent.penalty_reduction.page;
|
||||
|
||||
import cn.hutool.db.*;
|
||||
import cn.hutool.db.dialect.impl.MysqlDialect;
|
||||
import cn.hutool.db.sql.SqlBuilder;
|
||||
import cn.hutool.db.sql.SqlExecutor;
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.sql.Connection;
|
||||
import com.amarsoft.awe.dw.handler.BusinessProcessData;
|
||||
import com.amarsoft.awe.dw.ui.htmlfactory.ListHtmlWithASDataObjectGenerator;
|
||||
import com.amarsoft.awe.dw.ui.htmlfactory.QueryParamObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.blinkfox.fenix.bean.SqlInfo;
|
||||
import com.blinkfox.fenix.core.Fenix;
|
||||
import com.tenwa.util.SqlRunnerUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @program: apzl_leasing
|
||||
* @description:
|
||||
* @author: 李超杰
|
||||
* @create: 2024-12-06 10:24
|
||||
*/
|
||||
public class RentPlanListHtmlGenerator extends ListHtmlWithASDataObjectGenerator {
|
||||
|
||||
@Override
|
||||
public void run(BusinessProcessData arg0) throws Exception {
|
||||
this.asObj.setParamstr(this.paramstr);
|
||||
System.out.println("SQL参数:" + this.paramstr);
|
||||
System.out.println("分页参数:pageSize=" + this.pageSize + ",curPage=" + this.curPage + ",pageCount=" + this.pageCount + ",rowCount="
|
||||
+ this.rowCount + "");
|
||||
//获得查询条件
|
||||
List<QueryParamObject> queryParams = this.getQeuryParmObjects();
|
||||
for (QueryParamObject queryParam : queryParams) {
|
||||
System.out.println("查询条件:[colname=" + queryParam.getColName() + ",option=" + queryParam.getOption() + ",value0=" + queryParam.getValue0()
|
||||
+ ",value1=" + queryParam.getValue1() + "]");
|
||||
}
|
||||
|
||||
Transaction transaction = Transaction.createTransaction(JBOFactory.createJBOTransaction());
|
||||
try {
|
||||
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("paymentNumber", this.paramstr);
|
||||
PageResult<Entity> pageResult = SqlRunnerUtil.page(transaction, "flow.PenaltyReductionFlow.queryRentPlanList", paramMap,
|
||||
Page.of(this.curPage, this.getPageSize()));
|
||||
this.rowCount = pageResult.getTotal();
|
||||
this.pageCount = pageResult.getTotalPage();
|
||||
|
||||
BizObjectManager manager = getBizObjectManager();
|
||||
this.searchedDataList = new ArrayList<BizObject>();
|
||||
for (Entity entity : pageResult) {
|
||||
this.searchedDataList.add(createBizObject(manager, entity));
|
||||
}
|
||||
transaction.commit();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
try {
|
||||
if (transaction != null) transaction.rollback();
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
if (transaction != null) {
|
||||
transaction.disConnect();
|
||||
}
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void calPageCount(BusinessProcessData businessProcessData) throws Exception {
|
||||
pageCount = (rowCount + this.pageSize - 1) / this.pageSize;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user