• 会议OA项目(待开会议&所有会议)


    一、sql语句

    1、待开会议

    select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren 
    				,b.name zhuchirenname,
    				a.location,
    				DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,
    				DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime, 
    				a.state, 
    				(case a.state
    				when 0 then '取消会议'
    				when 1 then '新建' 
    				when 2 then '待审核' 
    				when 3 then '驳回' 
    				when 4 then '待开'
    				when 5 then '进行中'
    				when 6 then '开启投票' 
    				when 7 then '结束会议'
    				else '其他' end
    				) meetingstate,
    				a.seatPic,a.remark,a.auditor, 
    				c.name auditorname 
    				from t_oa_meeting_info a 
    				inner join t_oa_user b on a.zhuchiren=b.id 
    				left join t_oa_user c on a.auditor=c.id where 1=1 
    				and state = 4 and FIND_IN_SET(6,CONCAT(canyuze,',',liexize,',',zhuchiren))
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23

    2、所有会议

    select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren 
    				,b.name zhuchirenname,
    				a.location,
    				DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,
    				DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime, 
    				a.state, 
    				(case a.state
    				when 0 then '取消会议'
    				when 1 then '新建' 
    				when 2 then '待审核' 
    				when 3 then '驳回' 
    				when 4 then '待开'
    				when 5 then '进行中'
    				when 6 then '开启投票' 
    				when 7 then '结束会议'
    				else '其他' end
    				) meetingstate,
    				a.seatPic,a.remark,a.auditor, 
    				c.name auditorname 
    				from t_oa_meeting_info a 
    				inner join t_oa_user b on a.zhuchiren=b.id 
    				left join t_oa_user c on a.auditor=c.id where 1=1 
    				and FIND_IN_SET(6,CONCAT(a.canyuze,',',a.liexize,',',a.zhuchiren,',',IFNULL(a.auditor,-1)))
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23

    二、前台

    1、meetingAll.jsp

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <%@include file="/common/header.jsp"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="${pageContext.request.contextPath }/static/js/meeting/meetingAll.js"></script>
    </head>
    <style>
    body{
    	margin:15px;
    }
    .layui-table-cell {height: inherit;}
    .layui-layer-page .layui-layer-content {  overflow: visible !important;}
    </style>
    <body>
    	<div class="layui-form-item">
    		<div class="layui-inline">
    			<label class="layui-form-label">会议标题:</label>
    			<div class="layui-input-inline">
    				<input type="hidden" id="userid" value="${sessionScope.user.id }"/>
    				<input type="text" id="title" autocomplete="off"
    					class="layui-input">
    			</div>
    		</div>
    		<div class="layui-inline">
    			<button id="btn_meeting_search" class="layui-btn layui-btn-normal">
    				<i class="layui-icon">&#xe615;</i> 查询
    			</button>
    		</div>
    	</div>
    	<table style="margin-top: -15px;" id="tb_meeting" lay-filter="tb_meeting"></table>
    </body>
    </html>
    
    • 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

    2、meetingAll.js

    let layer,form,table,$;
    var row;
    layui.use(['layer','form','table'],function(){
        layer=layui.layer,form=layui.form,table=layui.table,$=layui.jquery;
        
        //初始化会议列表
        initMeeting();
       
        //绑定查询按钮的点击事件
        $('#btn_meeting_search').click(function(){
            query();
        });
    });
    
    //1.初始化会议列表
    function initMeeting(){
        table.render({           //执行渲染
            elem: '#tb_meeting',   //指定原始表格元素选择器(推荐id选择器)
            height: 400,         //自定义高度
            loading: false,      //是否显示加载条(默认 true)
            cols: [[             //设置表头
                {field: 'title', title: '会议标题', width: 180},
                {field: 'location', title: '会议地点', width: 120},
                {field: 'startTime', title: '开始时间', width: 180},
                {field: 'endTime', title: '结束时间', width: 180},
                {field: 'meetingstate', title: '会议状态', width: 90},
                {field: 'zhuchirenname', title: '主持人', width: 120},
                //{field: '', title: '操作', width: 260, toolbar: '#tbMeeting'}
            ]]
        });
    }
    
    //2.查询所有会议
    function query(){
        table.reload('tb_meeting', {
            url: 'info.action',     //请求地址
            method: 'POST',                    //请求方式,GET或者POST
            loading: true,                     //是否显示加载条(默认 true)
            page: true,                        //是否分页
            where: {                           //设定异步数据接口的额外参数,任意设
                'methodName':'allInfos',
                'title':$('#title').val(),
                'zhuchiren':$('#userid').val()
            },
            request: {                         //自定义分页请求参数名
                pageName: 'page', //页码的参数名称,默认:page
                limitName: 'rows' //每页数据量的参数名,默认:limit
            },
            done: function (res, curr, count) {
                //查询完成的回调函数
            }
        });
    }
    
    • 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

    3、meetingWaiting.js

    let layer,form,table,$;
    var row;
    layui.use(['layer','form','table'],function(){
        layer=layui.layer,form=layui.form,table=layui.table,$=layui.jquery;
        
        //初始化会议列表
        initMeeting();
       
        //绑定查询按钮的点击事件
        $('#btn_meeting_search').click(function(){
            query();
        });
    });
    
    //1.初始化会议列表
    function initMeeting(){
        table.render({           //执行渲染
            elem: '#tb_meeting',   //指定原始表格元素选择器(推荐id选择器)
            height: 400,         //自定义高度
            loading: false,      //是否显示加载条(默认 true)
            cols: [[             //设置表头
                {field: 'title', title: '会议标题', width: 180},
                {field: 'location', title: '会议地点', width: 120},
                {field: 'startTime', title: '开始时间', width: 180},
                {field: 'endTime', title: '结束时间', width: 180},
                {field: 'meetingstate', title: '会议状态', width: 90},
                {field: 'zhuchirenname', title: '主持人', width: 120},
                //{field: '', title: '操作', width: 260, toolbar: '#tbMeeting'}
            ]]
        });
    }
    
    //2.待开会议
    function query(){
        table.reload('tb_meeting', {
            url: 'info.action',     //请求地址
            method: 'POST',                    //请求方式,GET或者POST
            loading: true,                     //是否显示加载条(默认 true)
            page: true,                        //是否分页
            where: {                           //设定异步数据接口的额外参数,任意设
                'methodName':'queryMeetingInfoByState',
                'title':$('#title').val(),
                'zhuchiren':$('#userid').val(),
                'state':4
            },
            request: {                         //自定义分页请求参数名
                pageName: 'page', //页码的参数名称,默认:page
                limitName: 'rows' //每页数据量的参数名,默认:limit
            },
            done: function (res, curr, count) {
                //查询完成的回调函数
            }
        });
    }
    
    • 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

    4、meetingWaiting.jsp

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <%@include file="/common/header.jsp"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="${pageContext.request.contextPath }/static/js/meeting/meetingWaiting.js"></script>
    </head>
    <style>
    body{
    	margin:15px;
    }
    .layui-table-cell {height: inherit;}
    .layui-layer-page .layui-layer-content {  overflow: visible !important;}
    </style>
    <body>
    	<div class="layui-form-item">
    		<div class="layui-inline">
    			<label class="layui-form-label">会议标题:</label>
    			<div class="layui-input-inline">
    				<input type="hidden" id="userid" value="${sessionScope.user.id }"/>
    				<input type="text" id="title" autocomplete="off"
    					class="layui-input">
    			</div>
    		</div>
    		<div class="layui-inline">
    			<button id="btn_meeting_search" class="layui-btn layui-btn-normal">
    				<i class="layui-icon">&#xe615;</i> 查询
    			</button>
    		</div>
    	</div>
    	<table style="margin-top: -15px;" id="tb_meeting" lay-filter="tb_meeting"></table>
    </body>
    </html>
    
    • 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

    三、后台

    1、MeetingInfoDao

    package com.zking.dao;
    
    import java.sql.SQLException;
    import java.util.List;
    import java.util.Map;
    
    import com.zking.entity.MeetingInfo;
    import com.zking.util.BaseDao;
    import com.zking.util.PageBean;
    import com.zking.util.StringUtils;
    
    public class MeetingInfoDao extends BaseDao<MeetingInfo> {
    	// 添加会议信息
    	public int add(MeetingInfo info) throws Exception {
    		String sql = "insert into t_oa_meeting_info(title,content,canyuze,liexize,zhuchiren,\r\n"
    				+ "location,startTime,endTime,remark) values(?,?,?,?,?,?,?,?,?)";
    		return super.executeUpdate(sql, info, new String[] { "title", "content", "canyuze", "liexize", "zhuchiren",
    				"location", "startTime", "endTime", "remark" });
    	}
    	
    	//我的会议SQL,后续其他的菜单也会使用
    	private String getSQL() {
    		return "select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren\r\n" + 
    				",b.name zhuchirenname,\r\n" + 
    				"a.location,\r\n" + 
    				"DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,\r\n" + 
    				"DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime,\r\n" + 
    				"a.state,\r\n" + 
    				"(\r\n" + 
    				"	case a.state\r\n" + 
    				"	when 0 then '取消会议'\r\n" + 
    				"	when 1 then '新建'\r\n" + 
    				"	when 2 then '待审核'\r\n" + 
    				"	when 3 then '驳回'\r\n" + 
    				"	when 4 then '待开'\r\n" + 
    				"	when 5 then '进行中'\r\n" + 
    				"	when 6 then '开启投票'\r\n" + 
    				"	when 7 then '结束会议'\r\n" + 
    				"	else '其他' end\r\n" + 
    				") meetingstate,\r\n" + 
    				"a.seatPic,a.remark,a.auditor,\r\n" + 
    				"c.name auditorname\r\n" + 
    				"from t_oa_meeting_info a\r\n" + 
    				"inner join t_oa_user b on a.zhuchiren=b.id\r\n" + 
    				"left join t_oa_user c on a.auditor=c.id where 1=1 ";
    	}
    	//我的会议
    	public List<Map<String, Object>> myInfos(MeetingInfo info, PageBean pageBean)
    			throws SQLException, InstantiationException, IllegalAccessException {
    		String sql = getSQL();
    		//会议标题
    		String title = info.getTitle();
    		if(StringUtils.isNotBlank(title)) {
    			sql+=" and title like '%"+title+"%'";
    		}
    		sql+=" and zhuchiren="+info.getZhuchiren();
    //		排序按照降序展示
    		sql+=" order by a.id desc ";
    		return super.executeQuery(sql, pageBean);
    	}
    
    //	设置会议排座图片
    	public int updateSeatPicById(MeetingInfo info) throws Exception {
    		String sql =" update t_oa_meeting_info set seatPic=? where id=?";
    		return super.executeUpdate(sql, info, new String[] {"seatPic","id"});
    	}
    
    //	根据会议ID更新会议的审批人(送审)
    	public int updateAuditorById(MeetingInfo info) throws Exception {
    		String sql="update t_oa_meeting_info set auditor=?,state=2 where id=?";
    		return super.executeUpdate(sql, info, new String[] {"auditor","id"});
    	}
    
    	public List<Map<String, Object>> myAudit(MeetingInfo info, PageBean pageBean) throws Exception {
    		String sql = getSQL();
    		//会议标题
    		String title = info.getTitle();
    		if(StringUtils.isNotBlank(title)) {
    			sql+=" and title like '%"+title+"%'";
    		}
    //		当前登录账号是会议信息表中 审批人字段值
    		sql+=" and a.auditor="+info.getAuditor();
    //		只查询会议状态为 2 即待审核的会议
    		sql+=" and state = 2 ";
    //		排序按照降序展示
    		sql+=" order by a.id desc ";
    		return super.executeQuery(sql, pageBean);
    	}
    
    //	待开会议
    	public List<Map<String, Object>> queryMeetingInfoByState(MeetingInfo info, PageBean pageBean) throws InstantiationException, IllegalAccessException, SQLException {
    		String sql="select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren \r\n" + 
    				"				,b.name zhuchirenname,\r\n" + 
    				"				a.location,\r\n" + 
    				"				DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,\r\n" + 
    				"				DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime, \r\n" + 
    				"				a.state, \r\n" + 
    				"				(case a.state\r\n" + 
    				"				when 0 then '取消会议'\r\n" + 
    				"				when 1 then '新建' \r\n" + 
    				"				when 2 then '待审核' \r\n" + 
    				"				when 3 then '驳回' \r\n" + 
    				"				when 4 then '待开'\r\n" + 
    				"				when 5 then '进行中'\r\n" + 
    				"				when 6 then '开启投票' \r\n" + 
    				"				when 7 then '结束会议'\r\n" + 
    				"				else '其他' end\r\n" + 
    				"				) meetingstate,\r\n" + 
    				"				a.seatPic,a.remark,a.auditor, \r\n" + 
    				"				c.name auditorname \r\n" + 
    				"				from t_oa_meeting_info a \r\n" + 
    				"				inner join t_oa_user b on a.zhuchiren=b.id \r\n" + 
    				"				left join t_oa_user c on a.auditor=c.id where 1=1 \r\n" + 
    				"				and state = 4 and FIND_IN_SET("+info.getZhuchiren()+",CONCAT(canyuze,',',liexize,',',zhuchiren))";
    		return super.executeQuery(sql, pageBean);
    	}
    
    //	所有会议
    	public List<Map<String, Object>> allInfos(MeetingInfo info, PageBean pageBean) throws InstantiationException, IllegalAccessException, SQLException {
    		String sql="select a.id,a.title,a.content,a.canyuze,a.liexize,a.zhuchiren \r\n" + 
    				"				,b.name zhuchirenname,\r\n" + 
    				"				a.location,\r\n" + 
    				"				DATE_FORMAT(a.startTime,'%Y-%m-%d %H-%m-%s') startTime,\r\n" + 
    				"				DATE_FORMAT(a.endTime,'%Y-%m-%d %H-%m-%s') endTime, \r\n" + 
    				"				a.state, \r\n" + 
    				"				(case a.state\r\n" + 
    				"				when 0 then '取消会议'\r\n" + 
    				"				when 1 then '新建' \r\n" + 
    				"				when 2 then '待审核' \r\n" + 
    				"				when 3 then '驳回' \r\n" + 
    				"				when 4 then '待开'\r\n" + 
    				"				when 5 then '进行中'\r\n" + 
    				"				when 6 then '开启投票' \r\n" + 
    				"				when 7 then '结束会议'\r\n" + 
    				"				else '其他' end\r\n" + 
    				"				) meetingstate,\r\n" + 
    				"				a.seatPic,a.remark,a.auditor, \r\n" + 
    				"				c.name auditorname \r\n" + 
    				"				from t_oa_meeting_info a \r\n" + 
    				"				inner join t_oa_user b on a.zhuchiren=b.id \r\n" + 
    				"				left join t_oa_user c on a.auditor=c.id where 1=1 \r\n" + 
    				"				and FIND_IN_SET("+info.getZhuchiren()+",CONCAT(a.canyuze,',',a.liexize,',',a.zhuchiren,',',IFNULL(a.auditor,-1)))";
    		return super.executeQuery(sql, pageBean);
    	}
    	
    }
    
    • 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
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146

    2、MeetingInfoAction

    package com.zking.web;
    
    import java.util.Date;
    import java.util.List;
    import java.util.Map;
    import java.util.UUID;
    
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    import org.apache.commons.beanutils.ConvertUtils;
    
    import com.zking.dao.MeetingInfoDao;
    import com.zking.entity.MeetingInfo;
    import com.zking.framework.ActionSupport;
    import com.zking.framework.ModelDriver;
    import com.zking.util.Base64ImageUtils;
    import com.zking.util.MyDateConverter;
    import com.zking.util.PageBean;
    import com.zking.util.PropertiesUtil;
    import com.zking.util.R;
    import com.zking.util.ResponseUtil;
    
    public class MeetingInfoAction extends ActionSupport implements ModelDriver<MeetingInfo>{
    	private MeetingInfo info = new MeetingInfo();
    	private MeetingInfoDao meetingInfoDao = new MeetingInfoDao();
    
    	@Override
    	public MeetingInfo getModel() {
    		//方式二:
    	    ConvertUtils.register(new MyDateConverter(),Date.class);
    		return info;
    	}
    	
    	public String updateSeatPicById(HttpServletRequest req, HttpServletResponse resp) {
    		/*
    		 * 1.接收前端页面传递到后台的图片对应的字符串
    		 * 2.借助工具类将字符串生成一个图片,保存到配置文件所配置的路径下
    		 * 3.添加服务器硬盘与请求地址的映射,即可访问
    		 * 4.将请求地址保存到数据库中
    		 */
    		try {
    //			E:/temp/images/T280/abcdefg.png
    //			获取图片的存放地址	dirPath=E:/temp/images/T280/
    			String dirPath = PropertiesUtil.getValue("dirPath");
    //			获取浏览器请求路径,为了后续保存到数据库    serverPath=/upload/paizuo/
    			String serverPath = PropertiesUtil.getValue("serverPath");
    //			随机生成一个图片名称
    			String fileName = UUID.randomUUID().toString().replaceAll("-", "")+".png";
    			info.getSeatPic();//图片字符串
    			Base64ImageUtils.GenerateImage(info.getSeatPic().replaceAll("data:image/png;base64,", ""), dirPath+fileName);
    //			将seatPic中内容修改为 请求地址
    			info.setSeatPic(serverPath+fileName);
    			
    //			修改会议排座 数据库图片 对应的数据库列段
    			int rs = meetingInfoDao.updateSeatPicById(info);
    			if (rs > 0) {
    				ResponseUtil.writeJson(resp, R.ok(200, "会议排座成功"));
    			}else {
    				ResponseUtil.writeJson(resp, R.error(0, "会议排座失败"));
    			}
    		} catch (Exception e) {
    			e.printStackTrace();
    			try {
    				ResponseUtil.writeJson(resp, R.error(0, "会议排座失败"));
    			} catch (Exception e1) {
    				e1.printStackTrace();
    			}
    		}
    		return null;
    	}
    	
    //	会议发布
    	public String add(HttpServletRequest req, HttpServletResponse resp) {
    		try {
    			int rs = meetingInfoDao.add(info);
    			if (rs > 0) {
    				ResponseUtil.writeJson(resp, R.ok(200, "会议发布成功"));
    			}else {
    				ResponseUtil.writeJson(resp, R.error(0, "会议发布失败"));
    			}
    		} catch (Exception e) {
    			e.printStackTrace();
    			try {
    				ResponseUtil.writeJson(resp, R.error(0, "会议发布失败"));
    			} catch (Exception e1) {
    				e1.printStackTrace();
    			}
    		}
    		return null;
    	}
    	
    //	我的审批
    	public String myAudit(HttpServletRequest req,HttpServletResponse resp) {
    		try {
    			PageBean pageBean = new PageBean();
    			pageBean.setRequest(req);
    			List<Map<String, Object>> lst = meetingInfoDao.myAudit(info, pageBean);
    			//注意:layui中的数据的格式
    			ResponseUtil.writeJson(resp, R.ok(0, "我的会议数据查询成功",pageBean.getTotal(),lst));
    		} catch (Exception e) {
    			e.printStackTrace();
    			try {
    				ResponseUtil.writeJson(resp,R.error(0, "我的会议数据查询失败"));
    			} catch (Exception e1) {
    				e1.printStackTrace();
    			}
    		}
    		return null;
    	}
    	
    //	所有会议
    	public String allInfos(HttpServletRequest req,HttpServletResponse resp) {
    		try {
    			PageBean pageBean = new PageBean();
    			pageBean.setRequest(req);
    			List<Map<String, Object>> lst = meetingInfoDao.allInfos(info, pageBean);
    			//注意:layui中的数据的格式
    			ResponseUtil.writeJson(resp, R.ok(0, "所有会议数据查询成功",pageBean.getTotal(),lst));
    		} catch (Exception e) {
    			e.printStackTrace();
    			try {
    				ResponseUtil.writeJson(resp,R.error(0, "所有会议数据查询失败"));
    			} catch (Exception e1) {
    				e1.printStackTrace();
    			}
    		}
    		return null;
    	}
    	
    //	待开会议
    	public String queryMeetingInfoByState(HttpServletRequest req,HttpServletResponse resp) {
    		try {
    			PageBean pageBean = new PageBean();
    			pageBean.setRequest(req);
    			List<Map<String, Object>> lst = meetingInfoDao.queryMeetingInfoByState(info, pageBean);
    			//注意:layui中的数据的格式
    			ResponseUtil.writeJson(resp, R.ok(0, "待开会议数据查询成功",pageBean.getTotal(),lst));
    		} catch (Exception e) {
    			e.printStackTrace();
    			try {
    				ResponseUtil.writeJson(resp,R.error(0, "待开会议数据查询失败"));
    			} catch (Exception e1) {
    				e1.printStackTrace();
    			}
    		}
    		return null;
    	}
    	
    //	我的会议
    	public String myInfos(HttpServletRequest req,HttpServletResponse resp) {
    		try {
    			PageBean pageBean = new PageBean();
    			pageBean.setRequest(req);
    			List<Map<String, Object>> lst = meetingInfoDao.myInfos(info, pageBean);
    			//注意:layui中的数据的格式
    			ResponseUtil.writeJson(resp, R.ok(0, "我的会议数据查询成功",pageBean.getTotal(),lst));
    		} catch (Exception e) {
    			e.printStackTrace();
    			try {
    				ResponseUtil.writeJson(resp,R.error(0, "我的会议数据查询失败"));
    			} catch (Exception e1) {
    				e1.printStackTrace();
    			}
    		}
    		return null;
    	}
    	
    //	根据会议ID更新会议的审批人(送审)
    	public String updateAuditorById(HttpServletRequest req, HttpServletResponse resp) {
    		try {
    			int rs = meetingInfoDao.updateAuditorById(info);
    			if (rs > 0) {
    				ResponseUtil.writeJson(resp, R.ok(200, "会议审批成功"));
    			}else {
    				ResponseUtil.writeJson(resp, R.error(0, "会议审批失败"));
    			}
    		} catch (Exception e) {
    			e.printStackTrace();
    			try {
    				ResponseUtil.writeJson(resp, R.error(0, "会议审批失败"));
    			} catch (Exception e1) {
    				e1.printStackTrace();
    			}
    		}
    		return null;
    	}
    }
    
    • 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
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188

    四、运行效果

    1、待开会议
    在这里插入图片描述
    2、所有会议
    在这里插入图片描述

  • 相关阅读:
    Python中的numpy库
    求和、计数的窗口函数应用
    Python集合(set)的操作方法汇总(约20种操作方法),并附示例代码
    SwiftUI 内功之一篇文章全面掌握Swift 初始化器(教程含源码)
    【RocketMQ】RocketMQ快速入门
    (免费领源码)Java#springboot#MySQL书法社团管理系统36200-计算机毕业设计项目选题推荐
    自动化测试框架(二)读取配置文件中内容
    (2)扩散模型 Diffusion Model 1-2 扩散阶段
    MPP和hadoop
    41. set()函数:将可迭代对象转换为可变集合
  • 原文地址:https://blog.csdn.net/weixin_67677668/article/details/126076249