档案管理作为企事业单位管理工作的基础,档案是企事业单位建设信息系统的重要组成部分,档案是提高企事业单位工作质量和工作效率的必要条件,甚至是维护历史真实面貌的一项重要工作。
1、档案信息数字化能够提供档案信息方便快捷的服务方式。
数字化的档案信息可以通过网络等现代技术实现异地的远程利用,为需求者提供方便快捷的档案信息服务方式和途径。
2、档案信息数字化是对纸制档案原件实行有效保护方式。
档案唯一性、原始性和凭证性是真实记录历史的重要体现,因而历史的延续需要必须最大限度的保护档案,档案数字化之后,档案利用方式主要是使用数字化的档案信息,档案原件从而得到了有效保护。
3.、提供多种方式的信息上报功能
能够满足地方档案馆所辖范围内的立档单位档案信息采集、档案整理以及档案数据上报的需求。结合实际情况立档单位可以通过离线或者在线的形式进行档案信息采集,并形成上报文件。
4.、专注档案业务系统间的合理化整合与无缝衔接
将档案馆政务信息发布系统、档案馆系统以及立档单位档案系统“三合而一”形成完整的综合档案管理系统。
档案管理系统适用于各机关、企事业单位、工厂、学校等的人事管理,档案管理是进行人力资源管理的强大工具。
开发环境:
开发工具:idea (eclipse)
环境:jdk1.8 mysql5.7
数据库库连接工具 navcat
项目源码演示视频:
ssm高校档案管理系统源码
package school.controller.admin;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import school.domain.Category;
import school.domain.Doc;
import school.domain.User;
import school.mapper.CategoryMapper;
import school.mapper.DocMapper;
import school.mapper.UserMapper;
import school.support.BaseController;
import school.support.pojo.DocPo;
import school.support.util.ParamUtils;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.util.StringUtil;
import java.util.Date;
import java.util.List;
@RequestMapping("doc")
@Controller
public class DocController extends BaseController {
@Autowired
private DocMapper docMapper;
@Autowired
private UserMapper userMapper;
@Autowired
private CategoryMapper categoryMapper;
/**
* 列表
*
* @param doc
* @param pageNum
* @param model
* @return
*/
@RequestMapping("list")
public String list(DocPo doc, @RequestParam(defaultValue = "1") Integer pageNum, Model model) {
Example example = new Example(Doc.class);
Example.Criteria criteria = example.createCriteria();
if (doc.getName() != null) {
criteria.andCondition("d.name like '%" + doc.getName() + "%'");
}
if (doc.getNo() != null) {
criteria.andCondition("d.no like '%" + doc.getNo() + "%'");
}
if (doc.getCategoryname() != null) {
criteria.andCondition("c.name like '%" + doc.getCategoryname() + "%'");
}
if (doc.getTeachername() != null) {
criteria.andCondition("u.name like '%" + doc.getTeachername() + "%'");
}
PageHelper.startPage(pageNum, pageSize);
PageInfo<DocPo> pageInfo = new PageInfo<>(docMapper.selectPoByExample(example), 5);
model.addAttribute(pageInfo);
model.addAttribute("url", request.getRequestURI() + "?" + ParamUtils.params2String(request));
return "doc/list";
}
@RequestMapping("detail/{id}")
public String detail(@PathVariable Integer id, Model model) {
Doc doc = docMapper.selectByPrimaryKey(id);
model.addAttribute(doc);
/* List<Category> categoryList = categoryMapper.selectAll();
model.addAttribute("categoryList", categoryList);*/
Example example = new Example(User.class);
example.createCriteria().andNotEqualTo("type", "admin");
List<User> userList = userMapper.selectByExample(example);
model.addAttribute("userList", userList);
return "doc/detail";
}
/**
* 修改信息
*
* @param doc
* @return
*/
@RequestMapping("update")
public String update(Doc doc, MultipartFile file) {
Doc temp = docMapper.selectByPrimaryKey(doc.getId());
doc.setOldpath(temp.getPath());
if (!file.isEmpty()) {
String path = saveFile(file);
doc.setPath(path);
}
docMapper.updateByPrimaryKeySelective(doc);
return refresh();
}
@GetMapping("add")
public String add(Model model) {
Example example = new Example(Category.class);
example.createCriteria().andEqualTo("pid", 0);
List<Category> categoryList = categoryMapper.selectByExample(example);
model.addAttribute("categoryList", categoryList);
example = new Example(User.class);
example.createCriteria().andNotEqualTo("type", "admin");
List<User> userList = userMapper.selectAll();
model.addAttribute("userList", userList);
return "doc/add";
}
@PostMapping("add")
public String add(Doc doc, MultipartFile file) {
if (!file.isEmpty()) {
String path = saveFile(file);
doc.setPath(path);
}
doc.setAddtime(new Date());
docMapper.insertSelective(doc);
if (sessionUser().getType().equals("admin"))
return "redirect:list";
else return "redirect:mylist";
}
@RequestMapping("del/{id}")
public String del(@PathVariable Integer id) {
docMapper.deleteByPrimaryKey(id);
return refresh();
}
/**
* 删除旧文档
*
* @param id
* @return
*/
@RequestMapping("delold/{id}")
public String delold(@PathVariable Integer id) {
Doc doc = docMapper.selectByPrimaryKey(id);
doc.setOldpath("");
docMapper.updateByPrimaryKey(doc);
return refresh();
}
/**
* 我管理的文档
*
* @param doc
* @param pageNum
* @param model
* @return
*/
@RequestMapping("mylist")
public String mylist(DocPo doc, @RequestParam(defaultValue = "1") Integer pageNum, Model model) {
Example example = new Example(Doc.class);
Example.Criteria criteria = example.createCriteria();
if (doc.getName() != null) {
criteria.andCondition("d.name like '%" + doc.getName() + "%'");
}
if (doc.getNo() != null) {
criteria.andCondition("d.no like '%" + doc.getNo() + "%'");
}
if (doc.getCategoryname() != null) {
criteria.andCondition("c.name like '%" + doc.getCategoryname() + "%'");
}
criteria.andEqualTo("userid", sessionUser().getId());
PageHelper.startPage(pageNum, pageSize);
PageInfo<DocPo> pageInfo = new PageInfo<>(docMapper.selectPoByExample(example), 5);
model.addAttribute(pageInfo);
model.addAttribute("url", request.getRequestURI() + "?" + ParamUtils.params2String(request));
return "doc/mylist";
}
/**
* 按照年份查看
* @param year
* @param pageNum
* @param model
* @return
*/
@RequestMapping("mylistN")
public String mylistN(String year, @RequestParam(defaultValue = "1") Integer pageNum, Model model) {
Example example = new Example(Doc.class);
Example.Criteria criteria = example.createCriteria();
if(StringUtil.isNotEmpty(year)){
criteria.andCondition("d.no like '%" + year + "%'");
}
criteria.andEqualTo("userid", sessionUser().getId());
PageHelper.startPage(pageNum, pageSize);
List<Doc> docPos = docMapper.selectAll();
PageInfo<DocPo> pageInfo = new PageInfo<>(docMapper.selectPoByExample(example), 5);
model.addAttribute(pageInfo);
model.addAttribute("url", request.getRequestURI() + "?" + ParamUtils.params2String(request));
return "doc/mylistN";
}
}
该项目基于maven,pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>school</groupId>
<artifactId>record</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 版本信息 -->
<commons-fileupload>1.3.2</commons-fileupload>
<druid>1.0.26</druid>
<freemarker>2.3.23</freemarker>
<jackson>2.8.3</jackson>
<junit>4.12</junit>
<log4j>1.2.17</log4j>
<mybatis>3.4.1</mybatis>
<mybatis-ehcache>1.0.0</mybatis-ehcache>
<mybatis-pagehelper>4.1.6</mybatis-pagehelper>
<mybatis-spring>1.3.0</mybatis-spring>
<mybatis-mapper>3.3.9</mybatis-mapper>
<mysql>5.1.39</mysql>
<persistence>1.0.2</persistence>
<servlet>4.0.0-b01</servlet>
<slf4j>1.7.21</slf4j>
<spring>4.3.2.RELEASE</spring>
</properties>
<dependencies>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fileupload}</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${freemarker}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>${druid}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${servlet}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>${mybatis-spring}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-ehcache</artifactId>
<version>${mybatis-ehcache}</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>${mybatis-pagehelper}</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>${persistence}</version>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>${mybatis-mapper}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<!-- <compilerArgument>-verbose -bootclasspath ${java.home}\lib\rt.jar</compilerArgument> -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/</path>
<port>80</port>
<server>tomcat7</server>
<uriEncoding>${project.build.sourceEncoding}</uriEncoding>
</configuration>
</plugin>
</plugins>
</build>
</project>