package com.tenwa.lease.app.cache; import java.util.HashMap; import java.util.Map; import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; import jbo.sys.CODE_LIBRARY; import com.amarsoft.app.als.sys.tools.JBOHelper; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; import com.tenwa.comm.util.jboutil.DataOperatorUtil; public class ContractInfoCache { public static String getContractID(String id) throws Exception { JBOTransaction tx=JBOFactory.getFactory().createTransaction(); Map condtion=new HashMap(); condtion.put("id", id); BizObject contract=DataOperatorUtil.getSingleJBO(LB_CONTRACT_INFO.CLASS_NAME, condtion, tx); tx.commit(); if(contract!=null) return contract.getAttribute("contract_id").toString(); else return ""; } public static String getContractNumber(String id) throws Exception { JBOTransaction tx=JBOFactory.getFactory().createTransaction(); Map condtion=new HashMap(); condtion.put("id", id); BizObject contract=DataOperatorUtil.getSingleJBO(LB_CONTRACT_INFO.CLASS_NAME, condtion, tx); tx.commit(); if(contract!=null) return contract.getAttribute("contract_number").toString(); else return ""; } /** * 获取盖章类型名称 * @param stampid * @return * @throws Exception */ public static String getStampType(String stampid) throws Exception{ String stamptype = ""; if(stampid!=""){ String[] types = stampid.split(","); for (int i = 0; i