起租导入租金计划修改

This commit is contained in:
yjf 2022-07-27 11:06:49 +08:00
parent 03b6bc90a9
commit face89cbd9
5 changed files with 43 additions and 22 deletions

View File

@ -83,7 +83,7 @@
}else{
url="/Accounting/LoanSimulation_change/LoanBasicInfoBusiness.jsp";
}
dwTemp.replaceColumn("pay_condition", "<iframe type='iframe' id='pay_condition' name=\"pay_condition\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+url+"?CompClientID="+compClientID+"&flowunid="+flowunid+"&plannumber="+plannumber+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+sRightType+"&calType="+calType+"&TaskNo="+taskno+"\"></iframe>", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("pay_condition", "<iframe type='iframe' id='pay_condition' name=\"pay_condition\" width=\"100%\" height=\"610px\" frameborder=\"0\" src=\""+sWebRootPath+url+"?CompClientID="+compClientID+"&flowunid="+flowunid+"&plannumber="+plannumber+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+sRightType+"&calType="+calType+"&TaskNo="+taskno+"\"></iframe>", CurPage.getObjectWindowOutput());
String sButtons[][] = {
{"true","","Button","×â½ð±ä¸ü","×â½ð±ä¸ü","saveRecord()","","","","btn_icon_rentchange"},
{"true","","Button","±ä¸ü³·Ïú","±ä¸ü³·Ïú","cancelChange()","","","","btn_icon_delete"}

View File

@ -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(){

View File

@ -59,7 +59,7 @@
<script type="text/javascript">
alert("上传失败<%=cmessage%>");//上传文件失败!
window.close();
parent.AsDialog.ClosePage();
parent.AsDialog.ClosePage('fail');
</script>
<%
}

View File

@ -553,6 +553,28 @@
</manager>
</class>
<class name="VI_RENT_PLAN_TEMP" label="测算租金计划临时视图" >
<attributes>
<attribute name="PAYMENT_NUMBER" label="投放编号" type="STRING" length="32"/>
<attribute name="PLAN_LIST" label="期次" type="INT" length="10"/>
<attribute name="PLAN_DATE" label="计划日期" type="STRING" length="32"/>
<attribute name="RENT" label="租金" type="DOUBLE" length="18" scale="2"/>
<attribute name="CORPUS" label="财务本金" type="DOUBLE" length="18" scale="2"/>
<attribute name="INTEREST" label="财务租息" type="DOUBLE" length="18" scale="2"/>
<attribute name="CORPUS_BUSINESS" label="业务本金" type="DOUBLE" length="18" scale="2"/>
<attribute name="INTEREST_BUSINESS" label="业务租息" type="DOUBLE" length="18" scale="2"/>
<attribute name="ID" label="标识" type="STRING" length="32"/>
<attribute name="PLANSTATUS" label="回笼状态" type="STRING" length="32"/>
<attribute name="ALL_REMAIN_CORPUS" label="剩余本金" type="DOUBLE" length="18" scale="2"/>
<attribute name="FLOWUNID" label="流程标识" type="STRING" length="60"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="VI_RENT_PLAN_TEMP"/>
</managerProperties>
</manager>
</class>
<class name="LC_RENT_PLAN_SP_TEMP" label="测算租金计划临时表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识" type="STRING" length="32"/>

View File

@ -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)