public IDocAttachment getDocAttachmentById(int id) {
//TODO 获取文档
try {
DocumentRelation relation = relationDao.getRelation(id);
DocAttachment docAttachment = new DocAttachment(new File(relation.getLocation()));
docAttachment.setName(relation.getFileName());
return docAttachment;
} catch (NamingException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();