修复租金休眠测算bug
This commit is contained in:
parent
58ce9376cd
commit
f00fc45f21
@ -172,7 +172,7 @@ function cancelChange(){
|
|||||||
|
|
||||||
function run()
|
function run()
|
||||||
{
|
{
|
||||||
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runRentdormant","flowunid=<%=flowunid%>,plannumber=<%=paymentNumber%>,productId=<%=ProductId%>,calType=pay_process");
|
var result = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","runRentdormant","flowunid=<%=flowunid%>,plannumber=<%=paymentNumber%>,productId=<%=ProductId%>,calType=pay_process");
|
||||||
window.location.href=window.location.href;
|
window.location.href=window.location.href;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -806,12 +806,10 @@ public class CreateTransactionExecutor implements Transaction {
|
|||||||
* 租金计划休眠
|
* 租金计划休眠
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String runRentdormant() throws Exception{
|
public String runRentdormant(JBOTransaction tx) throws Exception{
|
||||||
|
this.reloadConditon(tx);
|
||||||
JSONObject jsonObject = JSONObject.createObject();
|
JSONObject jsonObject = JSONObject.createObject();
|
||||||
JBOTransaction tx=null;
|
|
||||||
try {
|
try {
|
||||||
tx=JBOFactory.createJBOTransaction();
|
|
||||||
//组装实体bean
|
//组装实体bean
|
||||||
TabCalBean bean = TbBeanTools.getTabInfo(calType, flowunid,plannumber,productId);
|
TabCalBean bean = TbBeanTools.getTabInfo(calType, flowunid,plannumber,productId);
|
||||||
ConditionBean cb = bean.getCb();
|
ConditionBean cb = bean.getCb();
|
||||||
@ -899,7 +897,7 @@ public class CreateTransactionExecutor implements Transaction {
|
|||||||
bomLRPT.saveObject(bolLRPT.get(i));
|
bomLRPT.saveObject(bolLRPT.get(i));
|
||||||
}
|
}
|
||||||
String irr = this.createCashFlow(bean,tx);
|
String irr = this.createCashFlow(bean,tx);
|
||||||
BizObjectManager bomLCCT = JBOFactory.getFactory().getManager(LC_CALC_CONDITION_TEMP.CLASS_NAME);
|
BizObjectManager bomLCCT = JBOFactory.getFactory().getManager(LC_CALC_CONDITION_TEMP.CLASS_NAME,tx);
|
||||||
BizObject boLCCT = bomLCCT.createQuery("flowunid =:flowunid and payment_number=:payment_number").setParameter("flowunid", flowunid).setParameter("payment_number", plannumber).getSingleResult(true);
|
BizObject boLCCT = bomLCCT.createQuery("flowunid =:flowunid and payment_number=:payment_number").setParameter("flowunid", flowunid).setParameter("payment_number", plannumber).getSingleResult(true);
|
||||||
boLCCT.setAttributeValue("IRR",irr);
|
boLCCT.setAttributeValue("IRR",irr);
|
||||||
bomLCCT.saveObject(boLCCT);
|
bomLCCT.saveObject(boLCCT);
|
||||||
@ -908,7 +906,7 @@ public class CreateTransactionExecutor implements Transaction {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
tx.rollback();
|
tx.rollback();
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
jsonObject.appendElement("result", "false");
|
jsonObject.appendElement("result", "false");
|
||||||
}finally{
|
}finally{
|
||||||
if(tx!=null){
|
if(tx!=null){
|
||||||
tx.commit();
|
tx.commit();
|
||||||
@ -916,6 +914,20 @@ public class CreateTransactionExecutor implements Transaction {
|
|||||||
}
|
}
|
||||||
return JSONEncoder.encode(jsonObject);
|
return JSONEncoder.encode(jsonObject);
|
||||||
}
|
}
|
||||||
|
public void reloadConditon(JBOTransaction tx) throws Exception {
|
||||||
|
//重新复制正式表租金计划到临时表
|
||||||
|
Map<String, String> fromCondition = new HashMap<String, String>();
|
||||||
|
Map<String,String> toCondition=new HashMap<String, String>();
|
||||||
|
toCondition.put("flowunid", this.getFlowunid());
|
||||||
|
toCondition.put("payment_number", this.getPlannumber());
|
||||||
|
Map<String, String> otherProperty = new HashMap<String, String>();
|
||||||
|
fromCondition.put("payment_number",this.getPlannumber());
|
||||||
|
otherProperty.put("flowunid", flowunid);
|
||||||
|
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_TEMP.CLASS_NAME ,toCondition, otherProperty,null, tx);
|
||||||
|
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME ,toCondition, otherProperty,null, tx);
|
||||||
|
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN.CLASS_NAME, fromCondition,LC_FUND_PLAN_TEMP.CLASS_NAME ,toCondition, otherProperty,null, tx);
|
||||||
|
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW.CLASS_NAME, fromCondition,LC_CASH_FLOW_TEMP.CLASS_NAME ,toCondition, otherProperty,null, tx);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 租金计划变更
|
* 租金计划变更
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -48,7 +48,7 @@ public interface Transaction {
|
|||||||
* ×â½ð¼Æ»®ÐÝÃß
|
* ×â½ð¼Æ»®ÐÝÃß
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String runRentdormant() throws Exception;
|
public String runRentdormant(JBOTransaction tx) throws Exception;
|
||||||
/**
|
/**
|
||||||
* ×â½ð¼Æ»®±ä¸ü
|
* ×â½ð¼Æ»®±ä¸ü
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user