银行账号匹配科目编号

This commit is contained in:
amarsoft 2018-10-30 17:18:36 +08:00
parent 5c779e0275
commit 52ed224117

View File

@ -3,20 +3,34 @@ package com.tenwa.voucher.CreateVoucherProcess.auxiliaryInfo;
import java.util.HashMap;
import java.util.Map;
import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT;
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.comm.exception.BusinessException;
import com.tenwa.voucher.service.VoucherJavaParamService;
/**
* 银行账号
* @author xiezhiwen
*/
public class auxiliaryContractAcc implements VoucherJavaParamService {
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String ACC_NUMBER=param.get("ACC_NUMBER");
returnValue.put("ACC_NUMBER",ACC_NUMBER);
return returnValue;
@Override
public Map<String, String> getJavaParam(JBOTransaction tx,
Map<String, String> param) throws BusinessException {
Map<String,String>returnValue=new HashMap<String,String>();
String ACC_NUMBER=param.get("ACC_NUMBER");
returnValue.put("ACC_NUMBER",ACC_NUMBER);
BizObject bo=null;
try {
bo=JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME, tx)
.createQuery("acc_title=:ACC_NUMBER").setParameter("ACC_NUMBER", ACC_NUMBER).getSingleResult(false);
if(bo!=null){
returnValue.put("F6",bo.getAttribute("acc_title").toString());
}
} catch (JBOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return returnValue;
}
}