42 lines
1.1 KiB
Java
42 lines
1.1 KiB
Java
package com.tenwa.flow.fund.copyebank;
|
|
|
|
import jbo.app.tenwa.calc.LC_EBANK;
|
|
|
|
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.amarsoft.awe.dw.handler.impl.CommonHandler;
|
|
import com.tenwa.lease.app.ebank.EbankUse;
|
|
|
|
public class LCEbankInfoHandler extends CommonHandler {
|
|
|
|
@Override
|
|
protected boolean validityCheck(BizObject bo, boolean isInsert) {
|
|
try {
|
|
if(isInsert){
|
|
BizObject boLE = JBOFactory.getBizObjectManager(LC_EBANK.CLASS_NAME)
|
|
.createQuery("ebank_sn=:ebank_sn")
|
|
.setParameter("ebank_sn", bo.getAttribute("ebank_sn").getString()).getSingleResult(false);
|
|
if(boLE != null){
|
|
this.errors = "网银流水号重复,请重新填写!";
|
|
return false;
|
|
}else{
|
|
return true;
|
|
}
|
|
}else{
|
|
return true;
|
|
}
|
|
} catch (JBOException e) {
|
|
e.printStackTrace();
|
|
return false;
|
|
}
|
|
}
|
|
protected void afterInsert(JBOTransaction tx, BizObject bo) throws Exception {
|
|
super.afterInsert(tx, bo);
|
|
String userId= curUser.getUserID();
|
|
EbankUse bu = new EbankUse();
|
|
bu.createEbankVoucher(tx,userId);
|
|
}
|
|
}
|