76 lines
3.4 KiB
Plaintext
76 lines
3.4 KiB
Plaintext
<%@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="cn.hutool.db.Entity" %>
|
|
<%@ page import="cn.hutool.db.handler.EntityHandler" %>
|
|
<%@ page contentType="text/html; charset=GBK" %>
|
|
<%@ include file="/IncludeBeginMDAJAX.jsp" %>
|
|
<%
|
|
String flowunid = CurPage.getParameter("flowunid");
|
|
String factDate = CurPage.getParameter("factDate");
|
|
String planIDs = CurPage.getParameter("planIDs");
|
|
String overCorpuss = CurPage.getParameter("overCorpuss");
|
|
String overInterests = CurPage.getParameter("overInterests");
|
|
String overPenaltys = CurPage.getParameter("overPenaltys");
|
|
String mayopeMoney = CurPage.getParameter("mayopeMoney");
|
|
String[] planID = planIDs.split("@");
|
|
String[] overCorpus = overCorpuss.split("@");
|
|
String[] overInterest = overInterests.split("@");
|
|
String[] overPenalty = overPenaltys.split("@");
|
|
boolean flag = true;
|
|
SqlObject so = new SqlObject("select case when mayope_money != " + mayopeMoney + " then 0 else 1 end from lc_ebank_temp where flowunid='" + flowunid + "'");
|
|
if ("0".equals(Sqlca.getString(so))) {
|
|
flag = false;
|
|
}
|
|
boolean flagR = true;
|
|
boolean flagP = true;
|
|
Map<String, Object> sqlParamMap = new HashMap<>();
|
|
for (int i = 0; i < planID.length; i++) {
|
|
sqlParamMap.clear();
|
|
sqlParamMap.put("planId", planID[i]);
|
|
Entity entity1 = SqlRunnerUtil.query(Sqlca, "flow.FundCollectionFlow.queryRentPlanList", sqlParamMap, new EntityHandler());
|
|
// String sql = "select case when (corpus_over != " + overCorpus[i] + " or interest_over != " + overInterest[i] + ") then 0 else 1 end from vi_lc_rent_plan where id='" + planID[i] + "'";
|
|
// so = new SqlObject(sql);
|
|
// String result = Sqlca.getString(so);
|
|
if(new BigDecimal(overCorpus[i]).compareTo(entity1.getBigDecimal("corpus_over")) != 0 || new BigDecimal(overInterest[i]).compareTo(entity1.getBigDecimal("interest_over")) != 0) {
|
|
flagR = false;
|
|
}
|
|
// if ("0".equals(result)) {
|
|
// flagR = false;
|
|
// }
|
|
sqlParamMap.put("factDate", factDate.replaceAll("-", "/"));
|
|
Entity entity2 = SqlRunnerUtil.query(Sqlca, "flow.FundCollectionFlow.getRentPlanPenaltyByPlanId", sqlParamMap, new EntityHandler());
|
|
if(new BigDecimal(overPenalty[i]).compareTo(entity2.getBigDecimal("penalty_over")) != 0) {
|
|
flagP = false;
|
|
}
|
|
|
|
// sql = "select case when round(getRentPenalty(payment_number,plan_list,'" + factDate + "')-fact_penalty,2) != " + overPenalty[i] + " then 0 else 1 end from vi_lc_rent_plan where id='" + planID[i] + "'";
|
|
// so = new SqlObject(sql);
|
|
// result = Sqlca.getString(so);
|
|
|
|
// if ("0".equals(result)) {
|
|
// flagP = false;
|
|
// }
|
|
}
|
|
String outResult = "";
|
|
if (!flagR) {
|
|
outResult += "ERROR";
|
|
} else {
|
|
outResult += "SUCCESS";
|
|
}
|
|
if (!flagP) {
|
|
outResult += "@ERROR";
|
|
} else {
|
|
outResult += "@SUCCESS";
|
|
}
|
|
if (!flag) {
|
|
outResult += "@ERROR";
|
|
} else {
|
|
outResult += "@SUCCESS";
|
|
}
|
|
out.println(outResult);
|
|
%>
|
|
<%@ include file="/IncludeEndAJAX.jsp" %> |