提前结清部分结清租赁物未全部结清合同状态不变

This commit is contained in:
zzk 2022-04-19 11:18:30 +08:00
parent ef0012d6c5
commit 6436061626
3 changed files with 14 additions and 10 deletions

View File

@ -187,7 +187,6 @@
//计算债券总计
function updateContractBondTotal(){
debugger
var SETTLE_METHOD = getItemValue(0,0,"SETTLE_METHOD");
if(SETTLE_METHOD != "SETTLE_METHOD02"){
var dunrent = getItemValue(0,getRow(),"DUN_RENT");
@ -266,7 +265,6 @@
//保存数据
function saveRecord(sPostEvents)
{
debugger
//校验是否有保证金代偿
var isCompensation = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","isCompensation","contractId=<%=contractId%>");
if("false" == isCompensation){
@ -340,7 +338,7 @@
if(SETTLE_METHOD == "SETTLE_METHOD02"){
ret = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","partSettlement","REPURCHASE_RATIO="+EQUIPMENT_RATIO+",flowunid=<%=flowunid%>,contractId=<%=contractId%>,START_DATE=<%=START_DATE%>,plannumber=<%=PAYMENT_NUMBER%>,calType=pay_process,PAYDAY_ADJUST="+PAYDAY_ADJUST+",SettleMethod="+SETTLE_METHOD);
}else{
AsControl.RunJavaMethod("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","alterdata","flowunid=<%=flowunid%>");
AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","alterdata","flowunid=<%=flowunid%>");
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runTerminate","flowunid=<%=flowunid%>,plannumber=<%=paymentnumber%>,productId=<%=productId%>,calType=pay_process,MAXIMUM_TOTAL=MAXIMUM_TOTAL,REPURCHASE_MONEY = REPURCHASE_MONEY");
ret = "操作成功"
}
@ -461,7 +459,6 @@
function settlemet(){
debugger
AsDialog.OpenSelector("selectEquipCarTermination","contractid,<%=contractId%>,flowunid,<%=flowunid%>","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){
setItemValue(0,0,'SETTLE_METHOD',"");

View File

@ -324,7 +324,7 @@ public class EarlyContract {
Transaction Sqlca = null;
try {
Sqlca = Transaction.createTransaction(tx);
String sql="UPDATE LB_EQUIPMENT_CAR_TEMP SET SETTLE_STATUS='3' WHERE (TERMINATE_TYPE IS NULL OR TERMINATE_TYPE='1') AND FLOWUNID='"+flowunid+"' ";
String sql="UPDATE LB_EQUIPMENT_CAR_TEMP SET TERMINATE_TYPE='3' WHERE (TERMINATE_TYPE IS NULL OR TERMINATE_TYPE='1') AND FLOWUNID='"+flowunid+"' ";
Sqlca.executeSQL(sql);
Sqlca.commit();
}catch(Exception e) {
@ -334,8 +334,7 @@ public class EarlyContract {
e1.printStackTrace();
}
e.printStackTrace();
}
}
}

View File

@ -15,14 +15,22 @@ public class LBInitContractStatusBusiness extends BaseBussiness {
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String flowname=(String)this.getAttribute("FlowName");
String contractId=this.getAttribute("ContractId").toString();
String settletype=this.getAttribute("settletype").toString();
String contractStatus=this.getAttribute("ContractStatus").toString();
String FlowUnid=this.getAttribute("FlowUnid").toString();
BizObjectManager bom=JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME);
String part = Sqlca.getString(" select case when min(TERMINATE_TYPE)=1 or min(TERMINATE_TYPE) is null then 'Y' else 'N' end from lb_equipment_car_temp lect where FLOWUNID = '"+FlowUnid+"' group by FLOWUNID");
Sqlca.join(bom);
if(contractStatus.equals("100")) {
settle(Sqlca);
}
if("Ìáǰ½áÇå".equals(flowname)&&"Y".equals(settletype)&&"Y".equals(part)) {
contractStatus = "31";
}
bom.createQuery("update O set CONTRACT_STATUS=:contractstatus where id=:contractid").setParameter("contractstatus", contractStatus).setParameter("contractid", contractId).executeUpdate();
if(contractStatus.equals("100")) {
settle(Sqlca);
}
String sMessage="true";
return sMessage;
}