提前结清网银核销没有本次核销金额
This commit is contained in:
parent
6a0958188f
commit
a1fadc0690
@ -196,8 +196,27 @@
|
||||
alert('最终还款金额大于网银核销金额!!!');
|
||||
return;
|
||||
}
|
||||
//更新lc_ebank_temp中的值
|
||||
var mage = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","updateEbank","flowunid=<%=flowunid%>,cleanLeasemoney="+maximumtotal);
|
||||
if("Success"!=mage){
|
||||
alert('提前结清失败!!!');
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
var contractTotal = getItemValue(0,0,"CONTRACT_TOTAL");
|
||||
if(Number(contractTotal)>Number(<%=mayopemoney%>)){
|
||||
alert('最终还款金额大于网银核销金额!!!');
|
||||
return;
|
||||
}
|
||||
//更新lc_ebank_temp中的值
|
||||
var mage = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","updateEbank","flowunid=<%=flowunid%>,cleanLeasemoney="+contractTotal);
|
||||
if("Success"!=mage){
|
||||
alert('提前结清失败!!!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
as_save("myiframe0","run()");
|
||||
|
||||
}else{
|
||||
alert('请先撤销变更,再进行变更操作!!!');
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ import jbo.app.tenwa.calc.LC_CASH_FLOW;
|
||||
import jbo.app.tenwa.calc.LC_CASH_FLOW_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_EBANK;
|
||||
import jbo.app.tenwa.calc.LC_EBANK_PROCESS;
|
||||
import jbo.app.tenwa.calc.LC_EBANK_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_FUND_PLAN;
|
||||
import jbo.app.tenwa.calc.LC_FUND_PLAN_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_FUND_RENT_ADJUST_TEMP;
|
||||
@ -664,6 +665,10 @@ public class CreateTransactionExecutor implements Transaction {
|
||||
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);
|
||||
String mage = deleteEbank(tx);
|
||||
if(!"Success".equals(mage)){
|
||||
return "false";
|
||||
}
|
||||
return "true";
|
||||
|
||||
}
|
||||
@ -992,6 +997,43 @@ public class CreateTransactionExecutor implements Transaction {
|
||||
lepManage.createQuery("delete from O where flowunid=:flowunid and EBANK_NUMBER=:ebanknumber").setParameter("flowunid", flowunid).setParameter("ebanknumber", le.getAttribute("ID").getString()).executeUpdate();
|
||||
return "true";
|
||||
}
|
||||
//提前结清更新LC_EBANK_TEMP表
|
||||
public String updateEbank(JBOTransaction tx)throws Exception{
|
||||
BizObjectManager letManage = JBOFactory.getBizObjectManager(LC_EBANK_TEMP.CLASS_NAME, tx);
|
||||
List<BizObject> lets = letManage.createQuery(" flowunid=:flowunid ").setParameter("flowunid",flowunid).getResultList(true);
|
||||
for (BizObject let : lets) {
|
||||
Double mayopeMoney = new Double(let.getAttribute("MAYOPE_MONEY").getString());
|
||||
Double advanceMoney = new Double(cleanLeasemoney);
|
||||
if(mayopeMoney>=advanceMoney){
|
||||
let.setAttributeValue("HAD_MONEY", advanceMoney);
|
||||
let.setAttributeValue("MAYOPE_MONEY", mayopeMoney-advanceMoney);
|
||||
letManage.saveObject(let);
|
||||
break;
|
||||
}else{
|
||||
let.setAttributeValue("HAD_MONEY", advanceMoney-mayopeMoney);
|
||||
advanceMoney = advanceMoney-mayopeMoney;
|
||||
let.setAttributeValue("MAYOPE_MONEY", 0);
|
||||
letManage.saveObject(let);
|
||||
}
|
||||
}
|
||||
tx.commit();
|
||||
return "Success";
|
||||
}
|
||||
|
||||
//提前结清更新LC_EBANK_TEMP表
|
||||
public String deleteEbank(JBOTransaction tx)throws Exception{
|
||||
BizObjectManager letManage = JBOFactory.getBizObjectManager(LC_EBANK_TEMP.CLASS_NAME, tx);
|
||||
List<BizObject> lets = letManage.createQuery(" flowunid=:flowunid ").setParameter("flowunid",flowunid).getResultList(true);
|
||||
for (BizObject let : lets) {
|
||||
Double mayopeMoney = new Double(let.getAttribute("MAYOPE_MONEY").getString());
|
||||
Double hadMoney = new Double(let.getAttribute("HAD_MONEY").getString());
|
||||
let.setAttributeValue("HAD_MONEY", 0);
|
||||
let.setAttributeValue("MAYOPE_MONEY", mayopeMoney+hadMoney);
|
||||
letManage.saveObject(let);
|
||||
}
|
||||
tx.commit();
|
||||
return "Success";
|
||||
}
|
||||
|
||||
public String getCalType() {
|
||||
return calType;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user