📄 conferencemanageimpl.java
字号:
* @param baseForm
*/
public void updateNewMeetingUseInfo(BaseActionForm baseForm){
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.updateNewMeetingUseInfo()>>>>>>");
}
//sql语句
StringBuffer sql = new StringBuffer();
sql.append(" update meeting_useinfo set user_id=?,user_name =?,dept_id=?,dept_name=?,draft_time=?,")
.append(" contact_phone=?,exigency=?,start_time=?,end_time=?,present_num=?,")
.append("meetingroom_id=?,meeting_content=?,note=?,flow_id=? where id = ?");
//参数设置
List paramList = new ArrayList();
paramList.add(baseForm.getUser_id());
paramList.add(baseForm.getUser_name());
paramList.add(baseForm.getDept_id());
paramList.add(baseForm.getDept_name());
paramList.add(baseForm.getDraft_time());
paramList.add(baseForm.getContact_phone());
paramList.add(baseForm.getExigency());
paramList.add(baseForm.getStart_time());
paramList.add(baseForm.getEnd_time());
paramList.add(baseForm.getPresent_num());
paramList.add(baseForm.getMetting_id());
paramList.add(baseForm.getMeeting_content());
paramList.add(baseForm.getNote());
paramList.add(baseForm.getFlow_id());
paramList.add(baseForm.getId());
// 数据库操作实体
ISqlConfig isqlconfig = new SqlConfigImpl();
isqlconfig.changeInfo(sql,paramList);
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.updateNewMeetingUseInfo()<<<<<<<<<");
}
}
/**根据会议预定Id查询会议室预定信息
* @param baseForm
* @return List
*/
public MeetingUseInfoBean queryMeetingUseInfoById(BaseActionForm baseForm){
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.queryMeetingUseInfoById()>>>>>>");
}
//sql语句
StringBuffer sql = new StringBuffer();
sql.append("select t1.id, t1.user_id , t1.user_name , t1.dept_id , t1.dept_name,t1.draft_time,")
.append("t1.contact_phone,t1.exigency,t1.start_time,t1.end_time,t1.present_num,t1.meetingroom_id,t2.name,")
.append("t2.is_medium,t2.hold_peoples,t1.meeting_content,t1.note,t1.flow_id ")
.append("from meeting_useinfo t1,meeting_info t2 where t1.meetingroom_id = t2.id and t1.id = ?");
//参数设置
List paramList = new ArrayList();
paramList.add(baseForm.getId());
// 数据库操作实体
ISqlConfig isqlconfig = new SqlConfigImpl();
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.queryMeetingUseInfoById()<<<<<<<<<");
}
return isqlconfig.queryAllMeetingUseInfoSingle(sql,paramList);
}
/**根据会议开始时间和结束时间 或 会议室id 或 预定会议室id 查询会议室预定信息
* @param baseForm
* @return List
*/
public MeetingUseInfoBean queryMeetingUseInfoByParams(BaseActionForm baseForm){
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.queryMeetingUseInfoByParams()>>>>>>");
}
//sql语句
StringBuffer sql = new StringBuffer();
sql.append("select t1.id, t1.user_id , t1.user_name , t1.dept_id , t1.dept_name,t1.draft_time,")
.append("t1.contact_phone,t1.exigency,t1.start_time,t1.end_time,t1.present_num,t1.meetingroom_id,t2.name,")
.append("t2.is_medium,t2.hold_peoples,t1.meeting_content,t1.note,t1.flow_id ")
.append("from meeting_useinfo t1,meeting_info t2 where t1.meetingroom_id = t2.id and t1.id not in (select t.id from meeting_useinfo t where 1=1 ");
List paramList = new ArrayList();
//参数设置
if(baseForm.getStart_time() != null && !"".equals(baseForm.getStart_time())){
paramList.add(baseForm.getStart_time());
sql.append("and to_date(?, 'yyyy-MM-dd HH24:mi:ss') > to_date(t.end_time, 'yyyy-MM-dd HH24:mi:ss') ");
}
if(baseForm.getEnd_time() != null && !"".equals(baseForm.getEnd_time())){
paramList.add(baseForm.getEnd_time());
sql.append(" or to_date(?, 'yyyy-MM-dd HH24:mi:ss') < to_date(t.start_time, 'yyyy-MM-dd HH24:mi:ss')");
}
sql.append(" )");
if(baseForm.getMetting_id() != null && !"".equals(baseForm.getMetting_id())){
paramList.add(baseForm.getMetting_id());
sql.append(" and t1.meetingroom_id = ?");
}
// 数据库操作实体
ISqlConfig isqlconfig = new SqlConfigImpl();
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.queryMeetingUseInfoByParams()<<<<<<<<<");
}
return isqlconfig.queryAllMeetingUseInfoSingle(sql,paramList);
}
/**判断是否存在 会议室预定信息
* @param baseForm
* @return boolean
*/
public boolean isExistMeetingUseInfo(BaseActionForm baseForm){
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.isExistMeetingUseInfo()>>>>>>");
}
//sql 语句 及参数设定
StringBuffer sql = new StringBuffer();
sql.append(" select count(t1.id) from meeting_useinfo t1 where t1.id not in (select t.id from meeting_useinfo t where 1=1 ");
List paramList = new ArrayList();
if(baseForm.getStart_time() != null && !"".equals(baseForm.getStart_time())){
paramList.add(baseForm.getStart_time());
sql.append("and to_date(?, 'yyyy-MM-dd HH24:mi:ss') > to_date(t.end_time, 'yyyy-MM-dd HH24:mi:ss') ");
}
if(baseForm.getEnd_time() != null && !"".equals(baseForm.getEnd_time())){
paramList.add(baseForm.getEnd_time());
sql.append(" or to_date(?, 'yyyy-MM-dd HH24:mi:ss') < to_date(t.start_time, 'yyyy-MM-dd HH24:mi:ss')");
}
sql.append(" )");
if(baseForm.getMetting_id() != null && !"".equals(baseForm.getMetting_id())){
paramList.add(baseForm.getMetting_id());
sql.append(" and t1.meetingroom_id = ?");
}
// 数据库操作实体
ISqlConfig isqlconfig = new SqlConfigImpl();
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.isExistMeetingUseInfo()<<<<<<<<<");
}
return isqlconfig.isExist(sql,paramList);
}
/**根据会议室id判断该会议室是否已经被预定
* @param baseForm
* @return
*/
public boolean isMeetingUseInfoHasContract(BaseActionForm baseForm){
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.isExistMeetingUseInfo()>>>>>>");
}
//sql 语句 及参数设定
StringBuffer sql = new StringBuffer();
sql.append(" select count(t1.id) from meeting_useinfo t1 where t1.meetingroom_id = ? ");
List paramList = new ArrayList();
paramList.add(baseForm.getMetting_id());
// 数据库操作实体
ISqlConfig isqlconfig = new SqlConfigImpl();
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.isExistMeetingUseInfo()<<<<<<<<<");
}
return isqlconfig.isExist(sql,paramList);
}
/** 根据会议室预定id删除会议室预定信息
* @param baseForm
*/
public void deleteMeetingUseInfo(BaseActionForm baseForm){
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.deleteMeetingUseInfo()>>>>>>");
}
//sql语句
StringBuffer sql = new StringBuffer();
sql.append(" delete from meeting_useinfo where id=?");
//参数设置
List paramList = new ArrayList();
paramList.add(baseForm.getId());
// 数据库操作实体
ISqlConfig isqlconfig = new SqlConfigImpl();
isqlconfig.changeInfo(sql,paramList );
if (S_LOGGER.isDebugEnabled()) {
S_LOGGER.debug("ConferenceManageImpl.deleteMeetingUseInfo()<<<<<<<<<");
}
}
/*********************************************************************************************************************/
/**
* 方法描述 得到所有会议室信息
* @return List(item: MeetingInfo)
*/
public List getMeetingAll(){
return this.getDao().selectMeetingAll();
}
/**
* 方法描述 根据会议室ID得到详细的会议室信息
* @param meetID 会议室ID
* @return
*/
public MeetingInfo getMeetingByID(String meetID){
return this.getDao().selectMeetingByID(meetID);
}
/**
* 方法描述 判断当前会议室是否被使用,根据会议室和时间
* @param meetID 会议室ID
* @param Date 时间
* @return
*/
public boolean isMeetingUse(String meetID, String startDate ,String endDate){
return this.getDao().selectMeetingIsUse(meetID, startDate , endDate);
}
/**
* 方法描述 得到会议室使用的详细信息列表
* @param meetID
* @param Date
* @return
*/
public List getMeetingUseInfo(String meetID, String date){
return this.getDao().selectMeetingUseInfo(meetID, date);
}
/**
* 方法描述 得到数据访问层服务
* @return
*/
private ISqlConfig getDao(){
return (ISqlConfig)new SqlConfigImpl();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -