Treemenu treeMenu = DBOperate.getTreeMenu(Integer.parseInt(treemenu.getCurrentType1()));
Documenttype documentType = DBOperate.getDocumenttype(Integer.parseInt(documenttype.getTypeId()));
Document document = new Document();
document.setTreemenu(treeMenu);
document.setDocumenttype(documentType);
document.setAuthor(author);
document.setTitle(title);
document.setKeywords(keywords);
document.setThemewords(themewords);
document.setSummary(summary);
document.setClassify(classify);
document.setCreatetime(new Date());
document.setYears(years);
//修改用户名称
User user = ToolBean.getUserSession();
document.setLink("file/"+user.getUsername()+"/"+link);
document.setSecondauthor(user.getUsername());
document.setSecondtitle(secondtitle);
document.setPlaceofpublication(placeofpublication);
document.setPress(press);
document.setSerialnumber(serialnumber);
document.setPagenumber(pagenumber);
document.setReferencescited(referencescited);
document.setVersion(version);
document.setDate(date);
document.setSimpletitle(simpletitle);
document.setIsbn(isbn);
document.setLabel(label);
document.setNote(note);
document.setImage("pic/"+user.getUsername()+"/"+image);
document.setLanguage(language);
document.setLastsearchtime(new Date());
document.setEdittime(edittime);
System.out.println("this is a test panel!");
insertFlag = DBOperate.save(document);
return "/documentAddResult";