会议OA之会议通知

目录

一、会议通知

二、会议反馈详情


今天与大家分享的会议OA项目中的会议通知功能,我将会议通知分割为两部分来实现,会议通知与反馈详情。

一、会议通知

1、会议通知的SQL语句编写(难点)

我们先使用函数find_in_set(id,条件)来查询出我们想要查询的那条会议的会议信息

由于不论会议是否得到反馈我们都需要查询出来,所以我们得使用左外连接,会议信息表为主表,会议反馈详情表作为从表,这样能够保证我们的数据不会丢失

--会议通知查询sql
--查询出会议id为2的会议信息
SELECT * from t_oa_meeting_info where FIND_IN_SET(2,CONCAT
(canyuze,liexize,zhuchiren)) and state = 4
--不管会议是否得到反馈,都要查询出来,所以选用外连接,会议信息表为主
SELECT
   IFNULL(f.result,-1) result,t1.* 
from
(SELECT * from t_oa_meeting_info where FIND_IN_SET(2,CONCAT
(canyuze,liexize,zhuchiren)) and state = 4)t1 
left join t_oa_meeting_feedback f on t1.id = f.meetingId and personId =2
ORDER BY result

 

 

2、后台编码

因为我们需要用到一个新的表会议反馈详情表t_oa_meeting_feedback,所以我们需要以该表建立一个实体类

package com.zking.entity;

import java.io.Serializable;
/**
 * 会议反馈表
 * @author Administrator
 *
 */
public class MeetingFeedBack implements Serializable {

	private String id;
	private Long meetingId;
	private Integer personType;
	private Long personId;
	private Integer result;
	private String reason;

	
	private String title;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Long getMeetingId() {
		return meetingId;
	}

	public void setMeetingId(Long meetingId) {
		this.meetingId = meetingId;
	}

	public Integer getPersonType() {
		return personType;
	}

	public void setPersonType(Integer personType) {
		this.personType = personType;
	}

	public Long getPersonId() {
		return personId;
	}

	public void setPersonId(Long personId) {
		this.personId = personId;
	}

	public Integer getResult() {
		return result;
	}

	public void setResult(Integer result) {
		this.result = result;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public MeetingFeedBack() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	public String toString() {
		return "MeetingFeedBack [id=" + id + ", meetingId=" + meetingId + ", personType=" + personType + ", personId="
				+ personId + ", result=" + result + ", reason=" + reason + "]";
	}

}

Dao层

//会议通知查询
	
		public List<Map<String, Object>> queryMeetingFeedBackByUserId(MeetingFeedBack back, PageBean pageBean)
					throws SQLException, InstantiationException, IllegalAccessException {
			String sql = "SELECT\r\n" + 
					"   IFNULL(f.result,-1) result,t1.* \r\n" + 
					" from\r\n" + 
					&#
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值