From face89cbd9325712b38c42b60e6c6a84b99d717f Mon Sep 17 00:00:00 2001
From: yjf <2211675158@qq.com>
Date: Wed, 27 Jul 2022 11:06:49 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B5=B7=E7=A7=9F=E5=AF=BC=E5=85=A5=E7=A7=9F?=
=?UTF-8?q?=E9=87=91=E8=AE=A1=E5=88=92=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../LCRentChangeInfo.jsp | 2 +-
.../LoanSimulation_change/RentPlanList.jsp | 6 +++-
.../BFTemplateTest/uploadExcelOperator.jsp | 2 +-
WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 22 +++++++++++++
.../impl/LBRentPlanTempCallBack.java | 33 ++++++++-----------
5 files changed, 43 insertions(+), 22 deletions(-)
diff --git a/WebContent/Accounting/LoanSimulation_change/LCRentChangeInfo.jsp b/WebContent/Accounting/LoanSimulation_change/LCRentChangeInfo.jsp
index e630b962f..bfff08bcf 100644
--- a/WebContent/Accounting/LoanSimulation_change/LCRentChangeInfo.jsp
+++ b/WebContent/Accounting/LoanSimulation_change/LCRentChangeInfo.jsp
@@ -83,7 +83,7 @@
}else{
url="/Accounting/LoanSimulation_change/LoanBasicInfoBusiness.jsp";
}
- dwTemp.replaceColumn("pay_condition", "", CurPage.getObjectWindowOutput());
+ dwTemp.replaceColumn("pay_condition", "", CurPage.getObjectWindowOutput());
String sButtons[][] = {
{"true","","Button","租金变更","租金变更","saveRecord()","","","","btn_icon_rentchange"},
{"true","","Button","变更撤销","变更撤销","cancelChange()","","","","btn_icon_delete"}
diff --git a/WebContent/Accounting/LoanSimulation_change/RentPlanList.jsp b/WebContent/Accounting/LoanSimulation_change/RentPlanList.jsp
index 869e43bae..d6311e2d7 100644
--- a/WebContent/Accounting/LoanSimulation_change/RentPlanList.jsp
+++ b/WebContent/Accounting/LoanSimulation_change/RentPlanList.jsp
@@ -106,7 +106,11 @@
importCondition["plannumber"] = "<%=plannumber%>";
var sUrl = "/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcel.jsp";
var sparam = JSON.stringify(importCondition).replace(/,/g,"@");//生成模板的参数据
- AsDialog.PopView(sUrl,"importparam="+sparam,{width:"350px",height:"40px",title:"导入租金计划"},function(){reloadSelf();});
+ AsDialog.PopView(sUrl,"importparam="+sparam,{width:"350px",height:"40px",title:"导入租金计划"},function(retVal){
+ if('fail'!=retVal){
+ self.location.reload();
+ }
+ });
}
function downloadTemplate(){
diff --git a/WebContent/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcelOperator.jsp b/WebContent/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcelOperator.jsp
index 51c0eddec..ed8564ce1 100644
--- a/WebContent/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcelOperator.jsp
+++ b/WebContent/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcelOperator.jsp
@@ -59,7 +59,7 @@
<%
}
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml
index 8e2f1901e..55dd3eaeb 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml
@@ -553,6 +553,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src_core/com/tenwa/officetempalte/importcallback/impl/LBRentPlanTempCallBack.java b/src_core/com/tenwa/officetempalte/importcallback/impl/LBRentPlanTempCallBack.java
index d3f3bdc8b..fe49baf32 100644
--- a/src_core/com/tenwa/officetempalte/importcallback/impl/LBRentPlanTempCallBack.java
+++ b/src_core/com/tenwa/officetempalte/importcallback/impl/LBRentPlanTempCallBack.java
@@ -1,10 +1,6 @@
package com.tenwa.officetempalte.importcallback.impl;
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Map;
-
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
@@ -17,9 +13,11 @@ import com.amarsoft.context.ASUser;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.reckon.util.DateUtil;
import com.tenwa.reckon.util.NumberUtils;
-
import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP;
-import jbo.app.tenwa.calc.VI_LC_RENT_PLAN;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
public class LBRentPlanTempCallBack extends BaseImportExcelCallBack {
@@ -33,22 +31,19 @@ public class LBRentPlanTempCallBack extends BaseImportExcelCallBack {
BigDecimal rent=new BigDecimal(NumberUtils.round(importObject.getAttribute("rent").getDouble(),2)+"");
BigDecimal CORPUS=new BigDecimal(NumberUtils.round(importObject.getAttribute("CORPUS").getDouble(),2)+"");
BigDecimal INTEREST=new BigDecimal(NumberUtils.round(importObject.getAttribute("INTEREST").getDouble(),2)+"");
-
- BizObject virent=JBOFactory.createBizObjectQuery(VI_LC_RENT_PLAN.CLASS_NAME,"payment_number=:paymentnumber and plan_list=:planlist").setParameter("paymentnumber", paymentnumber).setParameter("planlist", planlist).getSingleResult(false);
- if(virent!=null&&!virent.getAttribute("planstatus").getString().equals("未回笼")){
- BigDecimal DB_CORPUS=new BigDecimal(NumberUtils.round(virent.getAttribute("CORPUS").getDouble(),2)+"");
- BigDecimal DB_INTEREST=new BigDecimal(NumberUtils.round(virent.getAttribute("INTEREST").getDouble(),2)+"");
- if (CORPUS.compareTo(DB_CORPUS) != 0) {
- throw new RuntimeException(" 第" + planlist + "期租金计划【已回笼】导入本金与系统不一致!");
- }
- if (INTEREST.compareTo(DB_INTEREST) != 0) {
- throw new RuntimeException(" 第" + planlist + "期租金计划【已回笼】导入利息与系统不一致!");
- }
- }
-
+
if(rent.compareTo(CORPUS.add(INTEREST))!=0){
throw new BusinessException("租金计划期次:"+planlist+"租金不等于本金加利息,请检查后再导入");
}
+
+ ASResultSet as = Sqlca.getASResultSet(new SqlObject("select RENT from lc_rent_plan where PAYMENT_NUMBER= :paymentNum and PLAN_LIST= :planList and getRentOver(PAYMENT_NUMBER, PLAN_LIST) < rent")
+ .setParameter("paymentNum", paymentnumber).setParameter("planList", planlist));
+ if (as.next()) {
+ if (BigDecimal.valueOf(as.getDouble("RENT")).compareTo(rent) != 0) {
+ throw new RuntimeException(" 第" + planlist + "期租金计划导入【回笼】数据与系统数据比较异常,请检查!");
+ }
+ }
+
BizObjectManager bm=JBOFactory.getBizObjectManager(LC_RENT_PLAN_TEMP.CLASS_NAME,tx);
BizObject rentBo=bm.createQuery("flowunid=:flowunid and payment_number=:paymentnumber and plan_list=:planlist")
.setParameter("flowunid", flowunid)