提前结清调整

This commit is contained in:
zzk 2022-04-25 17:31:59 +08:00
parent b3fc2fce72
commit 6597c64581
3 changed files with 28 additions and 10 deletions

View File

@ -267,7 +267,8 @@
//保存数据
function saveRecord(sPostEvents)
{
{
debugger
//校验是否有保证金代偿
var isCompensation = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","isCompensation","contractId=<%=contractId%>");
if("false" == isCompensation){
@ -321,7 +322,6 @@
}
//更新lc_ebank_temp中的值
var mage = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","updateEbank","flowunid=<%=flowunid%>,cleanLeasemoney="+contractTotal);
var returns = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","setEquipmentTerminateStatus","flowunid=<%=flowunid%>,IDS="+IDS);
if("Success"!=mage){
alert('提前结清失败!!!');
return;
@ -472,6 +472,7 @@
var PROPROTION_NUMBER = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","getReductionRatio","flowunid=<%=flowunid%>,IDS="+IDS);
var NOMINAL_PRICE = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","getPrice","flowunid=<%=flowunid%>,IDS="+IDS);
setItemValue(0,0,'PROPROTION_NUMBER',PROPROTION_NUMBER);
var returns = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","setEquipmentTerminateStatus","flowunid=<%=flowunid%>,IDS="+IDS);
var YES_NO = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","getYesNo","flowunid=<%=flowunid%>,IDS="+IDS);
// 留购价
setItemValue(0,0,'NOMINAL_PRICE',NOMINAL_PRICE);
@ -530,8 +531,12 @@
// 逾期罚息
setItemValue(0,getRow(),"DUN_PENALTY",DUN_PENALTY);
// 应退金额
var OTHEROUT = <%=cautionmoney%>;
if(OTHEROUT == "" || OTHEROUT == null){
OTHEROUT = "0.00"
}
if(YES_NO=='Y'){
setItemValue(0,getRow(),"OTHER_OUT",<%=cautionmoney%>);
setItemValue(0,getRow(),"OTHER_OUT",OTHEROUT);
}else{
setItemValue(0,getRow(),"OTHER_OUT","0.00");
}

View File

@ -8,16 +8,30 @@ import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import jbo.app.LB_EQUIPMENT_CAR_TEMP;
import jbo.loan.LOAN_INTEREST_PLAN;
public class CarRatio extends CommonHandler {
String retainfield2;
public String getRetainfield2() {
return retainfield2;
}
public void setRetainfield2(String retainfield2) {
this.retainfield2 = retainfield2;
}
protected void initDisplayForEdit(BizObject bo) throws Exception {
String sql="select concat(round(round(lect.EQUIP_PRICE / ifnull(t.num, 1), 4)* 100, 2),'%') as PROPROTION_NUMBER from lb_equipment_car_temp lect left join (select CONTRACT_ID,sum(ifnull(EQUIP_PRICE, 0)) as num from apzl.lb_equipment_car group by CONTRACT_ID ) t on t.CONTRACT_ID = lect.CONTRACT_ID where lect.FRAME_NUMBER = '"+bo.getAttribute("FRAME_NUMBER")+"' and lect.FLOWUNID = '"+bo.getAttribute("FlowUnid")+"'";
JBOTransaction tx=JBOFactory.createJBOTransaction();
List<Map<String,String>> list=DataOperatorUtil.getDataBySql(tx, sql, null);
String PROPROTION_NUMBER = list.get(0).get("PROPROTION_NUMBER");
bo.setAttributeValue("PROPROTION_NUMBER", PROPROTION_NUMBER);
int por = Integer.parseInt(bo.getAttribute("retainfield2").toString());
por = por*100;
retainfield2 = String.valueOf(por)+"%";
bo.setAttributeValue("retainfield2", retainfield2);
}
}

View File

@ -429,7 +429,6 @@ public class EarlyContract {
}
}
}
// return returns;
return ""+returns+"";
}