ssm公司信息管理系统源码和论文

news2024/10/7 18:25:54

ssm公司信息管理系统源码和论文071


 开发工具:idea 
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm

摘  要

现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本信息管理系统就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助管理人员提高事务处理效率,达到事半功倍的效果。此信息管理系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发。实现了知识库和项目数据基础数据的管理,发布公告,项目管理等功能。信息管理系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。

关键词:信息管理系统;SSM框架;Mysql;自动化

研究背景

当前社会各行业领域竞争压力非常大,随着当前时代的信息化,科学化发展,让社会各行业领域都争相使用新的信息技术,对行业内的各种相关数据进行科学化,规范化管理。这样的大环境让那些止步不前,不接受信息改革带来的信息技术的企业随时面临被淘汰,被取代的风险。所以当今,各个行业领域,不管是传统的教育行业,餐饮行业,还是旅游行业,医疗行业等领域都将使用新的信息技术进行信息革命,改变传统的纸质化,需要人手工处理工作事务的办公环境。软件信息技术能够覆盖社会各行业领域是时代的发展要求,各种数据以及文件真正实现电子化是信息社会发展的不可逆转的必然趋势。本信息管理系统也是紧跟科学技术的发展,运用当今一流的软件技术实现软件系统的开发,让信息管理完全通过管理系统实现科学化,规范化,程序化管理。从而帮助信息管理者节省事务处理的时间,降低数据处理的错误率,对于基础数据的管理水平可以起到促进作用,也从一定程度上对随意的业务管理工作进行了避免,同时,信息管理系统的数据库里面存储的各种动态信息,也为上层管理人员作出重大决策提供了大量的事实依据。总之,信息管理系统是一款可以真正提升管理者的办公效率的软件系统。

package com.controller;


import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.StringUtil;
import java.lang.reflect.InvocationTargetException;

import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;

import com.entity.ChuqinEntity;

import com.service.ChuqinService;
import com.entity.view.ChuqinView;
import com.service.YonghuService;
import com.entity.YonghuEntity;
import com.utils.PageUtils;
import com.utils.R;

/**
 * 考勤
 * 后端接口
 * @author
 * @email
 * @date 2021-02-25
*/
@RestController
@Controller
@RequestMapping("/chuqin")
public class ChuqinController {
    private static final Logger logger = LoggerFactory.getLogger(ChuqinController.class);

    @Autowired
    private ChuqinService chuqinService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;


    //级联表service
    @Autowired
    private YonghuService yonghuService;


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        }
        PageUtils page = chuqinService.queryPage(params);

        //字典表数据转换
        List<ChuqinView> list =(List<ChuqinView>)page.getList();
        for(ChuqinView c:list){
            dictionaryService.dictionaryConvert(c);
        }
        return R.ok().put("data", page);
    }
    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        ChuqinEntity chuqin = chuqinService.selectById(id);
        if(chuqin !=null){
            //entity转view
            ChuqinView view = new ChuqinView();
            BeanUtils.copyProperties( chuqin , view );//把实体数据重构到view中

            //级联表
            YonghuEntity yonghu = yonghuService.selectById(chuqin.getYonghuId());
            if(yonghu != null){
                BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
            }
            //字典表字典转换
            dictionaryService.dictionaryConvert(view);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }



    /**
    * 打卡
    */
    @RequestMapping("/clockIn")
    public R clockIn(String flag, HttpServletRequest request){
        logger.debug("clockIn方法:,,Controller:{},,flag:{}",this.getClass().getName(),flag);
        try {
            Integer id = (Integer)request.getSession().getAttribute("userId");
            String role = String.valueOf(request.getSession().getAttribute("role"));
            if(StringUtil.isEmpty(role) || "管理员".equals(role)){
                return R.error(511,"没有打卡权限");
            }
            Date d = new Date();
            SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
            String date = format1.format(d);
            List<ChuqinEntity> chuqinList = new ArrayList<ChuqinEntity>();//要生成的list数据
            List<String> s = new ArrayList<>();
            s.add("yonghu_id+0");
            Wrapper<ChuqinEntity> queryWrapper3 = new EntityWrapper<ChuqinEntity>().eq("yonghu_id",id).orderDesc(s);
            List<ChuqinEntity> oldChuqinList = chuqinService.selectList(queryWrapper3);
            if("1".equals(flag)){
                //上班卡
                Date date1 = new Date();
                date1.setHours(8);
                date1.setMinutes(0);
                date1.setSeconds(0);
                //上班打卡
                //新增前先查看当前用户最大打卡时间

                if(oldChuqinList != null && oldChuqinList.size()>0){
                    ChuqinEntity entity = oldChuqinList.get(0);
                    String today = entity.getToday();//获取出勤表最大出勤
                    //把日期加一天
                    Date todayTime = format1.parse(today);
                    Calendar   calendar = new GregorianCalendar();
                    calendar.setTime(todayTime);
                    calendar.add(calendar.DATE,1);
                    String newToday = format1.format(calendar.getTime());
                    if(date.equals(today)){
                        return R.error(511,"已经打过上班卡了");
                    }else if(!date.equals(newToday)){//当天日期 不是出勤最大日期加一天的话   就是补充缺勤日期
                        chuqinList = this.getQueQin(d, format1, today, id);
                    }

                    if(chuqinList !=null && chuqinList.size() >0){
                        chuqinService.insertBatch(chuqinList);
                    }


                    //插入当天的上班卡
                    ChuqinEntity chuqin = new ChuqinEntity();
                    chuqin.setOnTime(d);
                    if(d.compareTo(date1)>0){//当前时间d 大于规定时间date1
                        chuqin.setChuqinTypes(6);//设置为迟到
                    }else if(d.compareTo(date1)<=0){//当前时间d 小于等于规定时间date1
                        chuqin.setChuqinTypes(3);//设置为未打下班卡
                    }
                    chuqin.setCreateTime(d);
                    chuqin.setToday(date);
                    chuqin.setYonghuId(id);
                    chuqinService.insert(chuqin);
                }else{
                    //第一次打卡
                    ChuqinEntity chuqin = new ChuqinEntity();
                    chuqin.setOnTime(d);
                    if(d.compareTo(date1)>0){//当前时间d 大于规定时间date1
                        chuqin.setChuqinTypes(6);//设置为迟到
                    }else if(d.compareTo(date1)<=0){//当前时间d 小于等于规定时间date1
                        chuqin.setChuqinTypes(3);//设置为未打下班卡
                    }
                    chuqin.setCreateTime(d);
                    chuqin.setToday(date);
                    chuqin.setYonghuId(id);
                    chuqinService.insert(chuqin);
                }

            }else if("2".equals(flag)){
                //下班卡
                Date date1 = new Date();
                date1.setHours(19);
                date1.setMinutes(00);
                date1.setSeconds(0);
                Date date2 = new Date();
                date2.setHours(18);
                date2.setMinutes(00);
                date2.setSeconds(0);
                //下班打卡
                if(oldChuqinList!=null){//不是第一次打卡
                    //查询当前用户是否生成了上班打卡
                    Wrapper<ChuqinEntity> queryWrapper = new EntityWrapper<ChuqinEntity>().eq("yonghu_id",id).eq("today",date).orderDesc(s);
                    ChuqinEntity chuqinEntity = chuqinService.selectOne(queryWrapper);
                    if(chuqinEntity !=null){//生成了上班打卡
                        chuqinEntity.setDownTime(d);
                        if("6".equals(String.valueOf(chuqinEntity.getChuqinTypes()))){
                        }else if(d.compareTo(date1)>0){//当前时间d 大于规定时间   加班
                            int hours = d.getHours();
                            int i = hours - 19+1;
                            if(i>0){
                                chuqinEntity.setOvertimeNumber(i);
                            }
                            chuqinEntity.setChuqinTypes(5);//设置为迟到
                        }else if(d.compareTo(date2)<0){//当前时间d 小于等于规定时间 早退
                            chuqinEntity.setChuqinTypes(7);//设置为未打下班卡
                        }else{
                            chuqinEntity.setChuqinTypes(1);
                        }
                        chuqinService.updateById(chuqinEntity);
                    }else{
                        //当天上午没有生成上班打卡,要防止用户昨天及之前没有生成打卡记录
                        Wrapper<ChuqinEntity> queryWrapper1 = new EntityWrapper<ChuqinEntity>().eq("yonghu_id",id).orderDesc(s);
                        List<ChuqinEntity> list = chuqinService.selectList(queryWrapper1);
                        if(list != null && list.size()>0){
                            ChuqinEntity entity = list.get(0);
                            String today = entity.getToday();//获取出勤表最大出勤
                            Date todayTime = format1.parse(today);
                            Calendar calendar = new GregorianCalendar();
                            calendar.setTime(todayTime);
                            calendar.add(calendar.DATE,1);
                            String newToday = format1.format(calendar.getTime());
                            if(date.equals(today)){
                                //昨天id+1  等于今天的话  就是直接新增下午打卡
                                ChuqinEntity chuqin = new ChuqinEntity();
                                chuqin.setDownTime(d);
                                chuqin.setChuqinTypes(2);
                                chuqinService.insert(chuqin);
                            }else if(!date.equals(newToday)){//当天日期 不是出勤最大日期加一天的话   就是补充缺勤日期
                                chuqinList = this.getQueQin(d, format1, today, id);
                            }

                            if(chuqinList !=null && chuqinList.size() >0){
                                chuqinService.insertBatch(chuqinList);
                            }
                        }
                    }
                }else{
                    //第一次打卡
                    ChuqinEntity chuqin = new ChuqinEntity();
                    chuqin.setDownTime(d);
                    chuqin.setChuqinTypes(2);
                    chuqinService.insert(chuqin);
                }
            }else {
                return R.error(511,"未知错误");
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }catch (Exception e) {
            e.printStackTrace();
        }
        return R.ok();
    }
    /**
     *
     * @param d   当前日期
     * @param format1 "yyyy-MM-dd"
     * @param newToday 数据库存的最大打卡日期 加一天
     * @param id    打卡人id
     * @return
     * @throws ParseException
     */
    public static  List<ChuqinEntity> getQueQin(Date d,SimpleDateFormat format1,String newToday,Integer id) throws ParseException {
        List<ChuqinEntity> list = new ArrayList<>();
        // 返回的日期集合
        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date start = dateFormat.parse(newToday);
        Calendar   calendar = new GregorianCalendar();
        calendar.setTime(d);
        calendar.add(calendar.DATE,-1); //当前时间减去一天,即一天前的时间
        Date end = dateFormat.parse(format1.format(calendar.getTime()));

        Calendar tempStart = Calendar.getInstance();
        tempStart.setTime(start);

        Calendar tempEnd = Calendar.getInstance();
        tempEnd.setTime(end);
        tempEnd.add(Calendar.DATE, +1);// 日期加1(包含结束)
        while (tempStart.before(tempEnd)) {
            ChuqinEntity chuqinEntity = new ChuqinEntity();
            chuqinEntity.setYonghuId(id);
            chuqinEntity.setToday(dateFormat.format(tempStart.getTime()));
            chuqinEntity.setCreateTime(d);
            chuqinEntity.setChuqinTypes(4);
            list.add(chuqinEntity);
            tempStart.add(Calendar.DAY_OF_YEAR, 1);
        }
        return list;
    }


    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        chuqinService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }

}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/939170.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

LInux之chrony服务器

目录 场景 重要性 LInux的两个时钟 硬件时钟 系统时钟 NTP协议 Chrony介绍 定义 组成 --- chronyd和chronyc 安装与配置 安装 Chrony配置文件分析 同步时间服务器 chronyc命令 chronyc sources输出分析 其它命令 查看时间服务器的状态 查看时间服务器是否在线 …

OpenCV为老照片,黑白照片增加色彩

Colorful Image Colorization 图片的颜色上色&#xff0c;主要使用到了CNN卷积神经网络&#xff0c;作者在ImageNet数据集上进行了大量的训练&#xff0c;并将此问题使用在分类任务中&#xff0c;以解决问题的潜在的不确定性&#xff0c;并在训练时使用颜色重新平衡的损失函数方…

气传导耳机哪个品牌好?推荐几款非常不错的气传导耳机

​气传导耳机能够提供高品质的音效&#xff0c;同时保持耳道的开放&#xff0c;让你在享受音乐的同时保持对外界的感知&#xff0c;户外使用安全性更高。还有很多人对气传导耳机不了解的&#xff0c;以下是我们为大家推荐的四款气传导耳机&#xff0c;仅供大家参考。 NO1&…

【2023最新版】R安装(直接+Anaconda)及使用(Pycharm配置R)教程

目录 一、R语言 1. R官网 2. R介绍 二、直接安装R 1. 下载 2. 安装 三、Pycharm使用R 1. 安装Pycharm 2. R Language for IntelliJ插件 3. R设置 报错 4. R软件包 安装 加载 查看已安装的包 四、使用Anaconda创建R语言虚拟环境 1. 安装Anaconda 2. 创建R语言…

9 款值得您花钱的最佳 PDF 编辑器

PDF 格式在 90 年代初一推出就开始流行。PDF 文件便于携带、易于共享、阅读有趣&#xff0c;但难以编辑。有什么不喜欢的呢&#xff1f;与其他格式相比&#xff0c;无论大小的企业都更喜欢 PDF&#xff0c;因为他们不喜欢其他人篡改他们的文档。 无论是指南、职业道德还是展示…

2023年05月 C/C++(四级)真题解析#中国电子学会#全国青少年软件编程等级考试

第1题&#xff1a;怪盗基德的滑翔翼 怪盗基德是一个充满传奇色彩的怪盗&#xff0c;专门以珠宝为目标的超级盗窃犯。而他最为突出的地方&#xff0c;就是他每次都能逃脱中村警部的重重围堵&#xff0c;而这也很大程度上是多亏了他随身携带的便于操作的滑翔翼。 有一天&#xff…

element——switch接口成功后赋值打开开关

应用场景 基本用法使用v-model双向绑定值&#xff0c;进行开关控制 例子1:需求&#xff1a; **点击switch&#xff0c;出弹窗&#xff0c;点击弹窗保存按钮调接口成功后再赋值&#xff08;row.orderButtonValue“1”&#xff09;打开switch开的状态变颜色。 在vue 中使用 :va…

【openEuler创新项目探索】一个Java端的向量化BLAS库VectorBLAS

VectorBLAS简介 VectorBLAS是一个使用Java语言实现的向量化BLAS高性能库&#xff0c;目前已在openEuler社区开源。 VectorBLAS通过循环展开、矩阵分块和内存布局优化等算法优化&#xff0c;对BLAS函数进行了深度优化&#xff0c;并利用VectorAPI JDK提供的多种向量化API实现。…

快速学习ES6新特性Promise之实例代码

&#xff08;一&#xff09;首先用setTimeout模拟一个异步请求&#xff0c;然后封装成一个new Promise <script type"text/javascript">function createAudioFileAsync() {console.log(调用返回数据前);let newPromise new Promise((resolve, reject) > {…

电子邮件营销模板怎么写?如何做营销邮件?怎么设计EDM邮件模板?

推荐的电子邮件营销模板有哪些&#xff1f; 电子邮件营销模板是现代营销策略中的重要组成部分。通过精心设计的邮件模板&#xff0c;您可以有效地吸引客户&#xff0c;传达信息&#xff0c;并提高销售率。在本文中&#xff0c;我们将介绍如何撰写出色的电子邮件营销模板&#x…

猫头虎博主赠书一期:《Kubernetes原生微服务开发》

&#x1f337;&#x1f341; 博主猫头虎 带您 Go to New World.✨&#x1f341; &#x1f984; 博客首页——猫头虎的博客&#x1f390; &#x1f433;《面试题大全专栏》 文章图文并茂&#x1f995;生动形象&#x1f996;简单易学&#xff01;欢迎大家来踩踩~&#x1f33a; &a…

C语言(第三十三天)

3.1.2 画图推演 3.2 举例2&#xff1a;顺序打印一个整数的每一位 输入一个整数m&#xff0c;打印这个按照顺序打印整数的每一位。 比如&#xff1a; 输入&#xff1a;1234 输出&#xff1a;1 2 3 4 输入&#xff1a;520 输出&#xff1a;5 2 0 3.2.1 分析和代码实现 这个题目&a…

算法通关村第8关【黄金】| 寻找祖先问题

思路&#xff1a;递归三部曲 第一步&#xff1a;确定参数和返回值 题目要求找到指定的结点&#xff0c;就需要返回结点。 题目又涉及到p,q就需要传入p,q&#xff0c;需要遍历传入root 第二步&#xff1a;确定终止条件 当遍历到结点为空说明到底没找到返回空 或者遍历到p,…

cyclictest stress 工具 使用

工具介绍 1. Cyclictest 准确且重复地测量线程的预期唤醒时间与它实际唤醒的时间之间的差异&#xff0c;以提供有关系统延迟的统计数据。 它可以测量由硬件、固件和操作系统引起的实时系统延迟 2.stress是Linux的一个压力测试工具&#xff0c;可以对CPU、Memory、IO、磁盘进行…

ZQGZ-08、61、44、80 导轨安装系列中间继电器 JOSEF约瑟 增加保护和控制线路

系型型号 ZQGZ-08 ZQGZ-61 ZQGZ-44 ZQGZ-80 ZQGZ-RJ08 ZQGZ-RJ61 ZQGZ-RJ44 ZQGZ-RJ80 ZQGZ-PJ08 ZQGZ-PJ61 ZQGZ-PJ44 ZQGZ-PJ80 ZQGZ-RY08 ZQGZ-RY61 ZQGZ-RY44 ZQGZ-RY80 ZQGZ-PY08 ZQGZ-PY61 ZQGZ-PY44 ZQGZ-PY80 ZQGZ-08、61、44、80 导轨安装系列中间继电器用…

以太网交换机高稳定性时钟系统应用方案

随着网络技术的不断发展&#xff0c;我们的生活也发生着巨大的变化&#xff0c;这离不开以太网起到的重大作用&#xff0c;全球大部分地区的以太网交换机市场都出现了增长。 那么&#xff0c;平常我们所说的以太网交换机到底是什么&#xff1f;今天小扬给大家科普科普以太网交…

ModaHub魔搭社区:WinPlan经营大脑查询业务表单详情

查询业务表单详情 ●URL:https://open.shulead.com/api/schema/detail ●Method:POST 请求参数 WinPlan决策系统 算力 阿里云 腾讯云 AWS亚马逊 框架 业务数据基座 WinPlan垂直大模型 模型 分析模型 预测模型 决策模型 应用 精准预测

Java之API详解之Runtime的详细解析

3.1 概述 Runtime表示Java中运行时对象&#xff0c;可以获取到程序运行时设计到的一些信息 3.2 常见方法 常见方法介绍 我们要学习的Object类中的常见方法如下所示&#xff1a; public static Runtime getRuntime() //当前系统的运行环境对象 public void exit(int statu…

ssm+vue医院医患管理系统源码和论文

ssmvue医院医患管理系统源码和论文077 开发工具&#xff1a;idea 数据库mysql5.7 数据库链接工具&#xff1a;navcat,小海豚等 技术&#xff1a;ssm vue.js 摘 要 21世纪的今天&#xff0c;随着社会的不断发展与进步&#xff0c;人们对于信息科学化的认识&#xff0c;已…

尚硅谷宋红康MySQL笔记 14-18

是记录&#xff0c;不会太详细&#xff0c;受本人知识限制会有错误&#xff0c;会有个人的理解在里面 第14章 视图 了解一下&#xff0c;数据库的常见对象 对象描述表(TABLE)表是存储数据的逻辑单元&#xff0c;以行和列的形式存在&#xff0c;列就是字段&#xff0c;行就是记…