一、前言
项目实战栏目基本上包含源代码、可执行文件、数据库文件、启动脚本。水平为一般本科大学生毕业标准。(本项目实战以上文件齐全)
二、摘要
在公司的管理中,考勤管理是一项最基本且能反应公司状况的管理工作,是一个公司生存的基石。然而考勤管理的方式却各不相同,效率高低也尽然不同。在这个信息化的时代,考勤也可以实现信息化,同时实现公司考勤的系统化,信息化也是公司适应现代社会的必经之路,是企业增加收入,提高生存能力的手段之一,适应现代技术带给我们的便利。
三、开发环境
本系统开发工具选择Intellij IDEA,使用免费开源的Mysql数据库,后台选择目前流行的SpringBoot+Spring Data JPA框架。前端框架选择了LayUI框架,能够快速搭建系统页面,提供开发效率。
四、系统实现
本系统实现了用户登录管理模块、资料管理模块、考勤记录模块、考勤查询模块、考勤图表统计模块以及系统管理模块。用户登录模块分为员工登录和管理员登录两个部分;基本资料管理模块分为用户资料管理,部门管理等等;考勤记录模块分为员工签到记录、员工迟到记录、员工签退记录以及员工早退记录,同时与考勤图表统计模块相互搭配。考勤查询模块分为按时间查询与按照时间查询两个部分;
五、数据库设计
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200129175514617.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2NoZW4xNTM2OTMzNzYwNw==,size_16,color_FFFFFF,t_70)
六、系统实现截图
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200129175130467.PNG?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2NoZW4xNTM2OTMzNzYwNw==,size_16,color_FFFFFF,t_70)
七、部分代码
@Transactional(rollbackOn = Exception.class)
public interface DepartmentRepository extends JpaRepository {
DepartmentModel findByDepartmentCode(String code);
@Modifying
int deleteByDepartmentCode(String code);
}
public interface LoginRecordRepository extends JpaRepository {
List findAllByUserName(String userName);
List findAllByYearAndUserName(int year ,String userName);
List findAllByYearAndMonthAndUserName(int year,int month,String userName);
List findAllByYearAndMonthAndDayAndUserName(int year ,int month ,int day, String userName);
}
package com.zlc.attendance.model;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @author Jacob
* @version 1.0
* @date 2019/11/20 0:36
*/
@Data
@Entity
@Table(name = "SignIn")
@DynamicUpdate
@DynamicInsert
public class SignInModel implements Serializable {
private static final long serialVersionUID = 4538507719760336312L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column
private Integer id;
/**
* 年
*/
@Column
private int year;
/**
*月
*/
@Column
private Integer month;
/**
* 日
*/
@Column
private Integer day;
/**
* 签到时间
*/
@Column
private LocalDateTime signInTime;
/**
* 签退时间
*/
@Column
private LocalDateTime signOutTime;
/**
* 日期
*/
@Column
private LocalDateTime date;
/**
* 用户名
*/
@Column
private String userName;
/**
* 类型
*/
@Column
private String type;
/**
* 用户ID
*/
@Column
private Integer userId;
}
本文首发于香菜喵,打开微信随时随地读,文章下方 ↓ ↓ ↓
|