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

This commit is contained in:
chaojie.li 2024-12-17 16:40:11 +08:00
parent 408ca1cc76
commit 902192190d
3 changed files with 9 additions and 90 deletions

View File

@ -11,8 +11,9 @@
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");
CustomASObjectModel doTemp = new CustomASObjectModel("VILCRentPlanForReductionList", "flow.PenaltyReductionFlow.queryRentPlanList" , false);
// 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"; //只读模式

View File

@ -67,7 +67,7 @@
sum(lc_rent_income.PENALTY_ADJUST) AS penalty_adjust
from lc_rent_income
where lc_rent_income.ROLL_BACK = '0'
and PAYMENT_NUMBER = #{paymentNumber}
<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
@ -83,10 +83,13 @@
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}
<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
where lcf.PAYMENT_NUMBER = #{paymentNumber}
<trimWhere>
<andEqual field="lcf.PAYMENT_NUMBER" value="paramstr" match="?paramstr != empty" />
</trimWhere>
order by lcf.payment_number, lcf.plan_list
</fenix>
<fenix id="queryRentPlanRemainPenalty">

View File

@ -1,85 +0,0 @@
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;
}
}