罚息减免申请流程审批页面【租金回笼计划】-生成罚息减免速度优化
This commit is contained in:
parent
17d27d75ba
commit
fd7a12904f
@ -1,27 +1,38 @@
|
||||
<%@page import="com.amarsoft.are.jbo.BizObject"%>
|
||||
<%@page import="jbo.app.tenwa.calc.VI_LC_RENT_PLAN"%>
|
||||
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
|
||||
<%@page import="com.amarsoft.are.jbo.JBOTransaction"%>
|
||||
<%@page import="java.math.BigDecimal"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
|
||||
String flowunid = CurPage.getParameter("flowunid");
|
||||
String planIDs = CurPage.getParameter("planIDs");
|
||||
String overPenaltys = CurPage.getParameter("overPenaltys");
|
||||
String[] planID = planIDs.split("@");
|
||||
String[] overPenalty = overPenaltys.split("@");
|
||||
boolean flag = true;
|
||||
for(int i=0;i<planID.length;i++){
|
||||
String sql = "select case when penalty_over!='"+overPenalty[i]+"' then 0 else 1 end from vi_lc_rent_plan where id='"+planID[i]+"'";
|
||||
SqlObject so = new SqlObject(sql);
|
||||
String result = Sqlca.getString(so);
|
||||
if("0".equals(result)){
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
out.println("ERROR");
|
||||
}else{
|
||||
out.println("SUCCESS");
|
||||
}
|
||||
%><%@ include file="/IncludeEndAJAX.jsp"%>
|
||||
<%@page import="com.amarsoft.are.jbo.BizObject" %>
|
||||
<%@page import="jbo.app.tenwa.calc.VI_LC_RENT_PLAN" %>
|
||||
<%@page import="com.amarsoft.are.jbo.JBOFactory" %>
|
||||
<%@page import="com.amarsoft.are.jbo.JBOTransaction" %>
|
||||
<%@page import="java.math.BigDecimal" %>
|
||||
<%@ page import="com.tenwa.util.SqlRunnerUtil" %>
|
||||
<%@ page import="com.google.common.collect.ImmutableMap" %>
|
||||
<%@ page import="cn.hutool.db.handler.NumberHandler" %>
|
||||
<%@ page contentType="text/html; charset=GBK" %>
|
||||
<%@ include file="/IncludeBeginMDAJAX.jsp" %>
|
||||
<%
|
||||
String flowunid = CurPage.getParameter("flowunid");
|
||||
String planIDs = CurPage.getParameter("planIDs");
|
||||
String overPenaltys = CurPage.getParameter("overPenaltys");
|
||||
String[] planID = planIDs.split("@");
|
||||
String[] overPenalty = overPenaltys.split("@");
|
||||
boolean flag = true;
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
for (int i = 0; i < planID.length; i++) {
|
||||
paramMap.put("planId", planID[i]);
|
||||
BigDecimal overPenaltyTmp = (BigDecimal) SqlRunnerUtil.query(Sqlca, "flow.PenaltyReductionFlow.queryRentPlanRemainPenalty", paramMap, new NumberHandler());
|
||||
if (new BigDecimal(overPenalty[i]).compareTo(overPenaltyTmp) != 0) {
|
||||
flag = false;
|
||||
}
|
||||
// String sql = "select case when penalty_over!='"+overPenalty[i]+"' then 0 else 1 end from vi_lc_rent_plan where id='"+planID[i]+"'";
|
||||
// SqlObject so = new SqlObject(sql);
|
||||
// String result = Sqlca.getString(so);
|
||||
// if("0".equals(result)){
|
||||
// flag = false;
|
||||
// }
|
||||
}
|
||||
if (!flag) {
|
||||
out.println("ERROR");
|
||||
} else {
|
||||
out.println("SUCCESS");
|
||||
}
|
||||
%>
|
||||
<%@ include file="/IncludeEndAJAX.jsp" %>
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fenixs namespace="flow.PenaltyReductionFlow.pagelist">
|
||||
<fenixs namespace="flow.PenaltyReductionFlow">
|
||||
<!-- 审批页面-租金回笼计划 -->
|
||||
<fenix id="queryRentPlanList">
|
||||
select lcf.ID AS id,
|
||||
@ -67,7 +67,8 @@
|
||||
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="paymentNumber" match="?paymentNumber != empty" />
|
||||
<andEqual field="plan_id" value="planId" match="?planId != 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 +84,14 @@
|
||||
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="paymentNumber" match="?paymentNumber != empty" />
|
||||
<andEqual field="plan_id" value="planId" match="?planId != 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="paymentNumber" match="?paymentNumber != empty" />
|
||||
<andEqual field="lcf.ID" value="planId" match="?planId != empty" />
|
||||
</trimWhere>
|
||||
</fenix>
|
||||
|
||||
<fenix id="queryRentPlanRemainPenalty">
|
||||
@ -100,7 +105,7 @@
|
||||
where lri.PAYMENT_NUMBER = lrp.PAYMENT_NUMBER
|
||||
and lri.PLAN_LIST = lrp.PLAN_LIST
|
||||
), 0),
|
||||
2) as plan_penalty
|
||||
2) as over_penalty
|
||||
from lc_rent_plan lrp
|
||||
where lrp.id = #{planId}
|
||||
</fenix>
|
||||
|
||||
@ -11,6 +11,9 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.hutool.db.handler.NumberHandler;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.tenwa.util.SqlRunnerUtil;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
@ -766,26 +769,28 @@ public class RentIncomeMethod {
|
||||
/**
|
||||
* ·£Ï¢¼õÃâ
|
||||
*/
|
||||
public String setPenaltyDataToRentIncome(JBOTransaction tx) throws JBOException{
|
||||
try{
|
||||
String[] Penaltys = overPenaltys.split("@");
|
||||
Boolean flag = false;
|
||||
if("Y".equals(isChanged)){
|
||||
flag = true;
|
||||
}
|
||||
public String setPenaltyDataToRentIncome(JBOTransaction tx) throws JBOException {
|
||||
try {
|
||||
// String[] Penaltys = overPenaltys.split("@");
|
||||
// Boolean flag = false;
|
||||
// if ("Y".equals(isChanged)) {
|
||||
// flag = true;
|
||||
// }
|
||||
String[] ids = planIDs.split("@");
|
||||
for(int i=0;i<ids.length;i++){
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
BizObject boVLR = JBOFactory.createBizObjectQuery(LC_RENT_PLAN.CLASS_NAME, "ID=:ID").setParameter("ID", ids[i])
|
||||
.getSingleResult(false);
|
||||
BizObject boVLRP = JBOFactory.createBizObjectQuery(VI_LC_RENT_PLAN.CLASS_NAME, "ID=:ID").setParameter("ID", ids[i])
|
||||
.getSingleResult(false);
|
||||
|
||||
// BizObject boVLRP = JBOFactory.createBizObjectQuery(VI_LC_RENT_PLAN.CLASS_NAME, "ID=:ID").setParameter("ID", ids[i])
|
||||
// .getSingleResult(false);
|
||||
Transaction tran = Transaction.createTransaction(tx);
|
||||
BigDecimal penaltyOver = (BigDecimal)SqlRunnerUtil.query(tran, "flow.PenaltyReductionFlow.queryRentPlanRemainPenalty", ImmutableMap.of("planId", ids[i]), new NumberHandler());
|
||||
|
||||
BizObjectManager boLRI = JBOFactory.getBizObjectManager(LC_RENT_INCOME_TEMP.CLASS_NAME);
|
||||
BizObjectManager bomLORL = JBOFactory.getBizObjectManager(LC_OCCUPY_RENT_LIST.CLASS_NAME,tx);
|
||||
BizObjectManager bomLORL = JBOFactory.getBizObjectManager(LC_OCCUPY_RENT_LIST.CLASS_NAME, tx);
|
||||
BizObject boLORL = bomLORL.newObject();
|
||||
boLORL.setAttributeValue("ID", UUIDUtil.getUUID());
|
||||
boLORL.setAttributeValue("PAYMENT_NUMBER", boVLRP.getAttribute("PAYMENT_NUMBER").getString());
|
||||
boLORL.setAttributeValue("PLAN_LIST", boVLRP.getAttribute("PLAN_LIST").getString());
|
||||
boLORL.setAttributeValue("PAYMENT_NUMBER", boVLR.getAttribute(LC_RENT_PLAN.PAYMENT_NUMBER).getString());
|
||||
boLORL.setAttributeValue("PLAN_LIST", boVLR.getAttribute(LC_RENT_PLAN.PLAN_LIST).getString());
|
||||
boLORL.setAttributeValue("FLOW_NAME", "·£Ï¢¼õÃâÁ÷³Ì");
|
||||
boLORL.setAttributeValue("FLOWUNID", flowunid);
|
||||
bomLORL.saveObject(boLORL);
|
||||
@ -803,11 +808,15 @@ public class RentIncomeMethod {
|
||||
boLRIT.setAttributeValue("PLAN_LIST", boVLR.getAttribute("PLAN_LIST").getString());
|
||||
boLRIT.setAttributeValue("INTEREST_ADJUST", 0);
|
||||
boLRIT.setAttributeValue("SETTLE_METHOD", "settlemethod12");
|
||||
List<BizObject> boLCRI = JBOFactory.createBizObjectQuery(LC_RENT_INCOME.CLASS_NAME, "PLAN_ID=:PLAN_ID and ROLL_BACK='0'").setParameter("PLAN_ID", ids[i])
|
||||
List<BizObject> boLCRI = JBOFactory.createBizObjectQuery(LC_RENT_INCOME.CLASS_NAME, "PAYMENT_NUMBER=:paymentNumber AND PLAN_LIST = :planList and ROLL_BACK='0'")
|
||||
.setParameter("paymentNumber", boVLR.getAttribute(LC_RENT_PLAN.PAYMENT_NUMBER).getString())
|
||||
.setParameter("planList", boVLR.getAttribute(LC_RENT_PLAN.PLAN_LIST).getString())
|
||||
.getResultList(false);
|
||||
List<BizObject> boLCRIT = JBOFactory.createBizObjectQuery(LC_RENT_INCOME_TEMP.CLASS_NAME, "PLAN_ID=:PLAN_ID and IS_FLOWING = 0 and ROLL_BACK='0'").setParameter("PLAN_ID", ids[i])
|
||||
List<BizObject> boLCRIT = JBOFactory.createBizObjectQuery(LC_RENT_INCOME_TEMP.CLASS_NAME, "PAYMENT_NUMBER=:paymentNumber AND PLAN_LIST = :planList and IS_FLOWING = 0 and ROLL_BACK='0'")
|
||||
.setParameter("paymentNumber", boVLR.getAttribute(LC_RENT_PLAN.PAYMENT_NUMBER).getString())
|
||||
.setParameter("planList", boVLR.getAttribute(LC_RENT_PLAN.PLAN_LIST).getString())
|
||||
.getResultList(false);
|
||||
boLRIT.setAttributeValue("HIRE_LIST", boLCRI.size()+boLCRIT.size()+1);
|
||||
boLRIT.setAttributeValue("HIRE_LIST", boLCRI.size() + boLCRIT.size() + 1);
|
||||
boLRIT.setAttributeValue("HIRE_DATE", StringFunction.getToday());
|
||||
boLRIT.setAttributeValue("ACCOUNTING_DATE", StringFunction.getToday());
|
||||
boLRIT.setAttributeValue("RENT", 0);
|
||||
@ -816,14 +825,14 @@ public class RentIncomeMethod {
|
||||
boLRIT.setAttributeValue("INTEREST_ADJUST", 0);
|
||||
boLRIT.setAttributeValue("PENALTY", 0);
|
||||
boLRIT.setAttributeValue("CORPUS_ADJUST", 0);
|
||||
boLRIT.setAttributeValue("PENALTY_ADJUST", flag?boVLRP.getAttribute("PENALTY_OVER").getString():Penaltys[i]);
|
||||
boLRIT.setAttributeValue("PENALTY_ADJUST", penaltyOver);
|
||||
boLRIT.setAttributeValue("ROLL_BACK", 0);
|
||||
boLRIT.setAttributeValue("COIN", boVLR.getAttribute("COIN").getString());
|
||||
boLRIT.setAttributeValue("IS_FLOWING", 0);
|
||||
boLRIT.setAttributeValue("FLOWUNID", flowunid);
|
||||
boLRI.saveObject(boLRIT);
|
||||
}
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "ERROR";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user