日期:2014-05-20 浏览次数:20687 次
public void saveTicr(TInfCardRecord ticr) throws ServiceException { // TODO Auto-generated method stub String str = ticr.getTicrId(); boolean b = str == null || "".equals(str); try { if(b){ ticr.setTicrId(Tools.getRandom()); ticr.setTicrDate(new Date()); } this.infCardRecordDao.saveTicr(ticr); } catch (Exception e) { // TODO: handle exception if(b){ throw new ServiceException("save ticr fail"); }else{ throw new ServiceException("update ticr fail"); } } }