1 private BaseDAO baseDAO; 2 public BaseDAO getBaseDAO(){ 3 if(baseDAO == null ){ 4 baseDAO = new BaseDAO(); 5 } 6 return baseDAO; 7 } 8 9 @Override 10 public String queryHiPsndocCtrtByPK(String pk_psndoc_sub, String pk_psndoc) 11 throws BusinessException { 12 String sql = " select * from hi_psndoc_ctrt where pk_psndoc_sub=‘"+pk_psndoc_sub+"‘ and pk_psndoc = ‘"+pk_psndoc +"‘ and nvl(dr,0) = 0"; 13 List<CtrtVO> listVO = (List<CtrtVO>) getBaseDAO().executeQuery(sql, new BeanListProcessor(CtrtVO.class)); 14 if ( listVO != null && listVO.size() > 0) { 15 return (String) listVO.get(0).getPk_psndoc_sub(); 16 }else{ 17 return ""; 18 } 19 20 }
写在接口中
private BaseDAO baseDAO; public BaseDAO getBaseDAO(){ if(baseDAO == null ){ baseDAO = new BaseDAO(); } return baseDAO; } @Override public String queryHiPsndocCtrtByPK(String pk_psndoc_sub, String pk_psndoc) throws BusinessException { String sql = " select * from hi_psndoc_ctrt where pk_psndoc_sub=‘"+pk_psndoc_sub+"‘ and pk_psndoc = ‘"+pk_psndoc +"‘ and nvl(dr,0) = 0"; List<CtrtVO> listVO = (List<CtrtVO>) getBaseDAO().executeQuery(sql, new BeanListProcessor(CtrtVO.class)); if ( listVO != null && listVO.size() > 0) { return (String) listVO.get(0).getPk_psndoc_sub(); }else{ return ""; } } /** * 根据主键与人员主键查询是否有该人员记录在hi_psndoc_ctrt表中 * @param pk_psndoc_sub * @param pk_psndoc * @return * @throws BusinessException * @author [email protected]曾志伟 */ public String queryHiPsndocCtrtByPK(String pk_psndoc_sub,String pk_psndoc)throws BusinessException;
时间: 2024-10-20 02:27:01