apzl_leasing/src_tenwa/com/tenwa/loan/action/LoanBillAdjustAction.java
2018-06-03 22:26:41 +08:00

47 lines
1.2 KiB
Java

package com.tenwa.loan.action;
import java.util.UUID;
import jbo.loan.LOAN_BILL_INFO;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.loan.calc.FinancingCalculateServiceImpl;
public class LoanBillAdjustAction {
public String adjustid;
public String billid;
public String loanAdjust(JBOTransaction tx) throws JBOException{
FinancingCalculateServiceImpl fc=new FinancingCalculateServiceImpl();
BizObject bill=JBOFactory.createBizObjectQuery(LOAN_BILL_INFO.CLASS_NAME,"id=:id").setParameter("id", this.billid).getSingleResult(false);
try{
fc.submitTransRate(this.billid,this.adjustid,UUID.randomUUID().toString().replaceAll("-", ""));
}catch(Exception e){
e.printStackTrace();
return "\n提款单号:"+bill.getAttribute("bill_id").getString()+"调息失败!";
}
return "\n提款单号:"+bill.getAttribute("bill_id").getString()+"调息成功!";
}
public String getAdjustid() {
return adjustid;
}
public void setAdjustid(String adjustid) {
this.adjustid = adjustid;
}
public String getBillid() {
return billid;
}
public void setBillid(String billid) {
this.billid = billid;
}
}