ssm会议管理系统源码和论文

ssm会议管理系统源码和论文087

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

摘  要

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

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

package com.controller;


import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;

import com.entity.HuiyiwenjianEntity;
import com.service.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;

import com.utils.StringUtil;
import java.lang.reflect.InvocationTargetException;

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.HuiyiEntity;

import com.entity.view.HuiyiView;
import com.entity.YonghuEntity;
import com.utils.PageUtils;
import com.utils.R;

/**
 * 会议管理
 * 后端接口
 * @author
 * @email
 * @date 2021-03-16
*/
@RestController
@Controller
@RequestMapping("/huiyi")
public class HuiyiController {
    private static final Logger logger = LoggerFactory.getLogger(HuiyiController.class);

    @Autowired
    private HuiyiService huiyiService;


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


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


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        PageUtils page = huiyiService.queryPage(params);
        //字典表数据转换
        List<HuiyiView> list =(List<HuiyiView>)page.getList();
        for(HuiyiView 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);
        HuiyiEntity huiyi = huiyiService.selectById(id);
        if(huiyi !=null){
            //entity转view
            HuiyiView view = new HuiyiView();
            BeanUtils.copyProperties( huiyi , view );//把实体数据重构到view中

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

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody HuiyiEntity huiyi, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,huiyi:{}",this.getClass().getName(),huiyi.toString());
        Wrapper<HuiyiEntity> queryWrapper = new EntityWrapper<HuiyiEntity>()
            .eq("huiyishi_types", huiyi.getHuiyishiTypes())
            .eq("huiyi_name", huiyi.getHuiyiName())
            .eq("huiyi_types", huiyi.getHuiyiTypes())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        HuiyiEntity huiyiEntity = huiyiService.selectOne(queryWrapper);
        if(huiyiEntity==null){
            huiyi.setCreateTime(new Date());
            String role = String.valueOf(request.getSession().getAttribute("role"));
            String userId = String.valueOf(request.getSession().getAttribute("userId"));
            if("经理".equals(role)){
                huiyi.setHuiyiTypes(2);
            }else if("用户".equals(role)){
                huiyi.setHuiyiTypes(4);
            }else{
                return R.error("未知异常,请联系管理员");
            }
            huiyi.setYonghuId(Integer.valueOf(userId));
            huiyiService.insert(huiyi);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody HuiyiEntity huiyi, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,huiyi:{}",this.getClass().getName(),huiyi.toString());
        if("管理员".equals(String.valueOf(request.getSession().getAttribute("role")))){
            huiyiService.updateById(huiyi);//根据id更新
            return R.ok();
        }else{
            return R.error("您没有权限修改会议");
        }
    }


    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        List<HuiyiEntity> list = huiyiService.selectList(new EntityWrapper<HuiyiEntity>().in("id", ids));
        huiyiService.deleteBatchIds(Arrays.asList(ids));
        List<Integer> huiyiIds = new ArrayList<>();
        for(HuiyiEntity h:list){
            huiyiIds.add(h.getId());
        }
        if(huiyiIds != null && huiyiIds.size()>0){
            huiyiwenjianService.delete(new EntityWrapper<HuiyiwenjianEntity>().in("huiyi_id", huiyiIds));
        }
        return R.ok();
    }


}

package com.controller;


import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import com.service.DictionaryService;
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 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.XitonggonggaoEntity;

import com.service.XitonggonggaoService;
import com.entity.view.XitonggonggaoView;
import com.utils.PageUtils;
import com.utils.R;

/**
 * 系统公告
 * 后端接口
 * @author
 * @email
 * @date
*/
@RestController
@Controller
@RequestMapping("/xitonggonggao")
public class XitonggonggaoController {
    private static final Logger logger = LoggerFactory.getLogger(XitonggonggaoController.class);

    @Autowired
    private XitonggonggaoService xitonggonggaoService;


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


    //级联表service

    

    /**
    * 后端列表
    */
    @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 = xitonggonggaoService.queryPage(params);

    //字典表数据转换
    List<XitonggonggaoView> list =(List<XitonggonggaoView>)page.getList();
        for(XitonggonggaoView 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);
        XitonggonggaoEntity xitonggonggao = xitonggonggaoService.selectById(id);
        if(xitonggonggao !=null){
            //entity转view
            XitonggonggaoView view = new XitonggonggaoView();
            BeanUtils.copyProperties( xitonggonggao , view );//把实体数据重构到view中

            //字典表字典转换
            dictionaryService.dictionaryConvert(view);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody XitonggonggaoEntity xitonggonggao, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,xitonggonggao:{}",this.getClass().getName(),xitonggonggao.toString());
        Wrapper<XitonggonggaoEntity> queryWrapper = new EntityWrapper<XitonggonggaoEntity>()
            .eq("biaoti", xitonggonggao.getBiaoti())
            .eq("leixing", xitonggonggao.getLeixing())
            .eq("neirong", xitonggonggao.getNeirong())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        XitonggonggaoEntity xitonggonggaoEntity = xitonggonggaoService.selectOne(queryWrapper);
        if(xitonggonggaoEntity==null){
        //  String role = String.valueOf(request.getSession().getAttribute("role"));
        //  if("".equals(role)){
        //      xitonggonggao.set
        //  }
            xitonggonggao.setRiqi(new Date());
            xitonggonggao.setAddtime(new Date());
            xitonggonggaoService.insert(xitonggonggao);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody XitonggonggaoEntity xitonggonggao, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,xitonggonggao:{}",this.getClass().getName(),xitonggonggao.toString());
        //根据字段查询是否有相同数据
        Wrapper<XitonggonggaoEntity> queryWrapper = new EntityWrapper<XitonggonggaoEntity>()
            .notIn("id",xitonggonggao.getId())
            .eq("biaoti", xitonggonggao.getBiaoti())
            .eq("leixing", xitonggonggao.getLeixing())
            .eq("neirong", xitonggonggao.getNeirong())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        XitonggonggaoEntity xitonggonggaoEntity = xitonggonggaoService.selectOne(queryWrapper);
        if(xitonggonggaoEntity==null){
            //  String role = String.valueOf(request.getSession().getAttribute("role"));
            //  if("".equals(role)){
            //      xitonggonggao.set
            //  }
            xitonggonggaoService.updateById(xitonggonggao);//根据id更新
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }


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



}

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值