一、项目介绍
基于SSM框架实现的公文管理系统系统,主要功能如下
1) 网站平面设计:
设计精美但是简洁,清爽的网站页面。
公文管理系统主要是方便机关单位工作人员方便的发送公文,该系统包括:组织机构管理,人员管理,权限管理,公文管理
2) 系统模块:
系统首先默认一个超级管理员,超级管理人员通过excel导入人员机构信息
机构管理:有权限的用户对机构信息进行增加,编辑,如果机构下面没有人员, 则可以删除,机构合并,可以为该机构分配人员
人员管理:有权限的用户对人员进行基本信息的修改,增加,停用不在岗人员账号
3) 公文管理功能模块:
1 有权限的工作人员进行公文拟稿,附件上传,当用户保存信息,则可以修改,可以删除,但是一旦提交,则不可再修改变动。
2 当公文被提交时,审核流程启动,那么审核功能开启,有权限的人就可以对提交的公文信息进行审核,审核通过则可以发布,打印,审核未通过打回去,又回到1的过程可以编辑再提交,或者直接删除。
二、项目技术
编程语言:Java
数据库:MySQL
前端技术:JSP、JavaScript、bootstrap、JQuery
后端技术:Spring、SpringMVC、MyBatis、JackRabbit、Activiti
项目管理:Maven
三、运行环境
操作系统:Windows或者macOS
JDK版本:最好是JDK1.8,其他版本理论上也可以
开发工具:IDEA、Ecplise、Myecplise都可以
数据库: MySQL5.5/5.7/8.0版本都可以
Tomcat:7.0及以上版本都可以
Maven:无版本要求
四、运行截图
五、主要功能代码实现
1. 公文创建
用户可以创建新公文,填写标题和内容。
代码:
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class DocumentManager {
private Map<Integer, Document> documents = new HashMap<>();
private int documentIdCounter = 1;
public void createDocument(String title, String content) {
Document document = new Document(documentIdCounter++, title, content);
documents.put(document.getId(), document);
System.out.println("Document created with ID: " + document.getId());
}
public void viewDocument(int id) {
Document document = documents.get(id);
if (document != null) {
System.out.println("ID: " + document.getId() + ", Title: " + document.getTitle());
System.out.println("Content: " + document.getContent());
} else {
System.out.println("No document found with the given ID.");
}
}
private class Document {
private int id;
private String title;
private String content;
public Document(int id, String title, String content) {
this.id = id;
this.title = title;
this.content = content;
}
public int getId() {
return id;
}
public String getTitle() {
return title;
}
public String getContent() {
return content;
}
}
public static void main(String[] args) {
DocumentManager manager = new DocumentManager();
Scanner scanner = new Scanner(System.in);
System.out.println("Create New Document:");
System.out.print("Title: ");
String title = scanner.nextLine();
System.out.print("Content: ");
String content = scanner.nextLine();
manager.createDocument(title, content);
System.out.println("View Document:");
System.out.print("Document ID: ");
int id = scanner.nextInt();
manager.viewDocument(id);
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.
2. 公文编辑
用户可以编辑现有公文的标题和内容。
代码:
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class DocumentEditor {
private Map<Integer, Document> documents = new HashMap<>();
private int documentIdCounter = 1;
public void createDocument(String title, String content) {
Document document = new Document(documentIdCounter++, title, content);
documents.put(document.getId(), document);
}
public void editDocument(int id, String newTitle, String newContent) {
Document document = documents.get(id);
if (document != null) {
document.setTitle(newTitle);
document.setContent(newContent);
System.out.println("Document updated.");
} else {
System.out.println("No document found with the given ID.");
}
}
public void viewDocument(int id) {
Document document = documents.get(id);
if (document != null) {
System.out.println("ID: " + document.getId() + ", Title: " + document.getTitle());
System.out.println("Content: " + document.getContent());
} else {
System.out.println("No document found with the given ID.");
}
}
private class Document {
private int id;
private String title;
private String content;
public Document(int id, String title, String content) {
this.id = id;
this.title = title;
this.content = content;
}
public int getId() {
return id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
public static void main(String[] args) {
DocumentEditor manager = new DocumentEditor();
Scanner scanner = new Scanner(System.in);
manager.createDocument("Sample Title", "Sample Content");
System.out.println("Edit Document:");
System.out.print("Document ID: ");
int id = scanner.nextInt();
scanner.nextLine(); // consume newline
System.out.print("New Title: ");
String newTitle = scanner.nextLine();
System.out.print("New Content: ");
String newContent = scanner.nextLine();
manager.editDocument(id, newTitle, newContent);
System.out.println("View Document:");
manager.viewDocument(id);
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.
- 66.
- 67.
- 68.
- 69.
- 70.
- 71.
- 72.
- 73.
- 74.
- 75.
- 76.
- 77.
- 78.
- 79.
- 80.
- 81.
- 82.
- 83.
- 84.
- 85.
- 86.
3. 公文删除
用户可以删除现有公文。
代码:
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class DocumentDeleter {
private Map<Integer, Document> documents = new HashMap<>();
private int documentIdCounter = 1;
public void createDocument(String title, String content) {
Document document = new Document(documentIdCounter++, title, content);
documents.put(document.getId(), document);
}
public void deleteDocument(int id) {
if (documents.remove(id) != null) {
System.out.println("Document deleted.");
} else {
System.out.println("No document found with the given ID.");
}
}
public void viewDocument(int id) {
Document document = documents.get(id);
if (document != null) {
System.out.println("ID: " + document.getId() + ", Title: " + document.getTitle());
System.out.println("Content: " + document.getContent());
} else {
System.out.println("No document found with the given ID.");
}
}
private class Document {
private int id;
private String title;
private String content;
public Document(int id, String title, String content) {
this.id = id;
this.title = title;
this.content = content;
}
public int getId() {
return id;
}
public String getTitle() {
return title;
}
public String getContent() {
return content;
}
}
public static void main(String[] args) {
DocumentDeleter manager = new DocumentDeleter();
Scanner scanner = new Scanner(System.in);
manager.createDocument("Sample Title", "Sample Content");
System.out.println("Delete Document:");
System.out.print("Document ID: ");
int id = scanner.nextInt();
manager.deleteDocument(id);
System.out.println("View Document:");
manager.viewDocument(id);
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.
- 66.
- 67.
- 68.
- 69.
- 70.
4. 公文搜索
用户可以通过标题搜索公文。
代码:
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class DocumentSearcher {
private Map<Integer, Document> documents = new HashMap<>();
private int documentIdCounter = 1;
public void createDocument(String title, String content) {
Document document = new Document(documentIdCounter++, title, content);
documents.put(document.getId(), document);
}
public void searchByTitle(String title) {
boolean found = false;
for (Document document : documents.values()) {
if (document.getTitle().equalsIgnoreCase(title)) {
System.out.println("ID: " + document.getId() + ", Title: " + document.getTitle());
System.out.println("Content: " + document.getContent());
found = true;
break;
}
}
if (!found) {
System.out.println("No document found with the given title.");
}
}
private class Document {
private int id;
private String title;
private String content;
public Document(int id, String title, String content) {
this.id = id;
this.title = title;
this.content = content;
}
public int getId() {
return id;
}
public String getTitle() {
return title;
}
public String getContent() {
return content;
}
}
public static void main(String[] args) {
DocumentSearcher manager = new DocumentSearcher();
Scanner scanner = new Scanner(System.in);
manager.createDocument("Meeting Notes", "Discuss project milestones.");
manager.createDocument("Annual Report", "Yearly performance review.");
System.out.println("Search Document by Title:");
System.out.print("Title: ");
String title = scanner.nextLine();
manager.searchByTitle(title);
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.