日期:2014-05-19 浏览次数:21255 次
Document doc = null; try { addList(); doc = new Document(); doc.open(newPath);//打开文件 doc.insertAtBookmark("userName",ujl.getjlName()); doc.insertAtBookmark("describe",ujl.getdescirbe()); doc.insertAtBookmark("eMail",ujl.getjlMail()); doc.insertAtBookmark("english",(String)mapEnglish.get(ujl.getenglish())); doc.insertAtBookmark("jianliStatus",(String)mapJlStatue.get(ujl.getjlStatue())); doc.insertAtBookmark("juZhuDi",(String)mapAddress.get(ujl.getresidonce())); doc.insertAtBookmark("renYuanStatus",(String)mapJlType.get(ujl.getjlType())); doc.insertAtBookmark("sex",(String)mapSex.get(ujl.getsex())); doc.insertAtBookmark("telPhone",ujl.getjlPhone()); doc.insertAtBookmark("workTime",(String)mapworkTime.get(ujl.getworkTime())); doc.insertAtBookmark("xueLi",(String)mapXueLi.get(ujl.getxueLi())); doc.insertAtBookmark("zhiWei",(String)mapCateType.get(ujl.getcateType())); //判断行业经验 String level = ""; if(ujl.getjlLevel() != null && ujl.getjlLevel().length() > 0){ String levels[] = ujl.getjlLevel().split(";"); for (int i = 0; i < levels.length; i++) { level = (String)mapJlLevel.get(levels[i])+"\n"; } } doc.insertAtBookmark("HangyeJingyan",level); //判断技术特长,对应关键字 String keyWord = ""; if(ujl.getkeyword() != null && ujl.getkeyword().length() > 0){ String keyWords[] = ujl.getkeyword().split(" "); for (int i = 0; i < keyWords.length; i++) { keyWord = (String)mapJlLevel.get(keyWords[i])+"\n"; } } doc.insertAtBookmark("KeyWord",keyWord); //判断擅长语言,对应擅长技术 String jishu = ""; if(ujl.gettechnology() != null && ujl.gettechnology().length() > 0){ String jishus[] = ujl.gettechnology().split(";"); for (int i = 0; i < jishus.length; i++) { jishu = (String)mapTechnology.get(jishus[i])+"\n"; } } doc.insertAtBookmark("shanChangJishu",jishu); } catch (Exception e) { //log.debug("复制模板的时候出错!"); //throw new ServiceException("在生成标准模板简历的时候发生错误!"); e.printStackTrace(); } finally { try { if(doc!=null){ Thread.interrupted(); doc.close(true); } } catch (Exception e) { // log.debug("复制模板的时候出错!"); //throw new ServiceException("在生成标准模板简历的时候发生错误!"); e.printStackTrace(); } }