diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp index 539ac89e9..24ab35445 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LCContractTerminate/LCContractTerminateInfo.jsp @@ -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',""); diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java index 6b006b3fe..13299984a 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/EarlyContract.java @@ -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(); - } - + } } diff --git a/src_tenwa/com/tenwa/lease/flow/contract/commbusiness/LBInitContractStatusBusiness.java b/src_tenwa/com/tenwa/lease/flow/contract/commbusiness/LBInitContractStatusBusiness.java index 8f5e661f4..1b66db3c5 100644 --- a/src_tenwa/com/tenwa/lease/flow/contract/commbusiness/LBInitContractStatusBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/contract/commbusiness/LBInitContractStatusBusiness.java @@ -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; }