mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 18:19:36 +08:00
会议预约整体阶段性提交
This commit is contained in:
parent
60722ba5e7
commit
a951a1dc32
@ -0,0 +1,282 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.ics.admin.domain.MeetingReservation;
|
||||||
|
import com.ics.admin.domain.MeetingUto;
|
||||||
|
import com.ics.admin.service.IIcsCustomerStaffService;
|
||||||
|
import com.ics.admin.service.IMeetingReservationService;
|
||||||
|
import com.ics.admin.service.IMeetingRoomService;
|
||||||
|
import com.ics.admin.service.IMeetingServeService;
|
||||||
|
import com.ics.admin.service.IMeetingUtoService;
|
||||||
|
import com.ics.admin.service.IMeetingWaiterService;
|
||||||
|
import com.ics.admin.utils.MeetingReservationDTO;
|
||||||
|
import com.ics.admin.vo.MeetingRecordVo;
|
||||||
|
import com.ics.admin.vo.MeetingRoomVo;
|
||||||
|
import com.ics.admin.vo.MeetingServeVo;
|
||||||
|
import com.ics.admin.vo.MeetingWaiterVo;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.bean.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.wf.jwtp.annotation.Logical;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping({"/admin/mr", "/app/mr"})
|
||||||
|
public class MeetingReservationController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingReservationService meetingReservationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingRoomService meetingRoomService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingServeService meetingServeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingWaiterService meetingWaiterService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IIcsCustomerStaffService customerStaffService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingUtoService meetingUtoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户登录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("login")
|
||||||
|
public R login(@RequestBody MeetingUto meetingUto) {
|
||||||
|
MeetingUto uto = meetingUtoService.login(meetingUto);
|
||||||
|
if (uto == null) return R.error("登录失败");
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("orgId", uto.getOrgId());
|
||||||
|
jsonObject.put("orgName", uto.getOrgName());
|
||||||
|
return R.ok().put("data", jsonObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典数据
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("getConstData")
|
||||||
|
public R getConstData() {
|
||||||
|
JSONObject jsonObject = meetingReservationService.getConstData();
|
||||||
|
return R.ok().put("data", jsonObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增会议室预约记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("booking")
|
||||||
|
public R booking(@RequestBody MeetingReservationDTO meetingReservationDTO) {
|
||||||
|
MeetingReservation meetingReservation = new MeetingReservation();
|
||||||
|
BeanUtils.copyBeanProp(meetingReservation, meetingReservationDTO.getMr());
|
||||||
|
if (meetingReservation.getTimeFormat() > 0) {//非任意时间
|
||||||
|
Date start = convert(meetingReservationDTO.getMr().getMrdate(), meetingReservation.getTimeFormat(), true);
|
||||||
|
Date end = convert(meetingReservationDTO.getMr().getMrdate(), meetingReservation.getTimeFormat(), false);
|
||||||
|
if (start == null || end == null) return R.error("预约时间解析错误");
|
||||||
|
meetingReservation.setStart(start);
|
||||||
|
meetingReservation.setEnd(end);
|
||||||
|
}
|
||||||
|
if (meetingReservation.getEnd().getTime() <= meetingReservation.getStart().getTime()) return R.error("预约时间无效");
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
String result = meetingReservationService.insertMeetingReservation(userId, meetingReservation, meetingReservationDTO.getServe());
|
||||||
|
if (IMeetingReservationService.OK.equals(result)) {
|
||||||
|
return R.ok("预约成功");
|
||||||
|
} else {
|
||||||
|
return R.error(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 预定时间的转换 */
|
||||||
|
private Date convert(String date, Integer timeFormat, boolean start) {
|
||||||
|
String time = "";
|
||||||
|
if (timeFormat == 1) time = start ? " 08:30:00" : " 12:00:00";//1 上午
|
||||||
|
if (timeFormat == 2) time = start ? " 12:00:01" : " 17:30:00";//2 下午
|
||||||
|
if (timeFormat == 3) time = start ? " 17:30:01" : " 23:59:59";//3 晚上
|
||||||
|
if (timeFormat == 4) time = start ? " 08:30:00" : " 23:59:59";//4 全天
|
||||||
|
try {
|
||||||
|
return DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, date + time);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作会议室预约记录
|
||||||
|
* <p>
|
||||||
|
* id:预约记录id
|
||||||
|
* operate:操作,CANCEL 取消 REJECTED 驳回 PASS 审核通过
|
||||||
|
* content:操作的原因
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("handle")
|
||||||
|
public R handleMeetingReservation(@RequestBody MeetingReservationDTO mrDTO) {
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
String result = meetingReservationService.operateMeetingReservation(userId, mrDTO.getId(), mrDTO.getOperate(), mrDTO.getContent());
|
||||||
|
if (IMeetingReservationService.OK.equals(result)) {
|
||||||
|
return R.ok("操作成功");
|
||||||
|
} else {
|
||||||
|
return R.error(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更预约记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("update")
|
||||||
|
public R update(@RequestBody MeetingReservationDTO meetingReservationDTO) {
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
//获取待更新会议室内预约记录
|
||||||
|
MeetingReservation meetingReservation = meetingReservationService.selectMeetingReservationById(meetingReservationDTO.getMr().getId());
|
||||||
|
if (meetingReservation == null) return R.error("未找到预约记录");
|
||||||
|
Integer status = meetingReservation.getStatus();
|
||||||
|
BeanUtils.copyBeanProp(meetingReservation, meetingReservationDTO.getMr());
|
||||||
|
meetingReservation.setStatus(status);//防止用户端修改预约记录状态
|
||||||
|
if (meetingReservation.getTimeFormat() > 0) {//非任意时间
|
||||||
|
Date start = convert(meetingReservationDTO.getMr().getMrdate(), meetingReservation.getTimeFormat(), true);
|
||||||
|
Date end = convert(meetingReservationDTO.getMr().getMrdate(), meetingReservation.getTimeFormat(), false);
|
||||||
|
meetingReservation.setStart(start);
|
||||||
|
meetingReservation.setEnd(end);
|
||||||
|
}
|
||||||
|
if (meetingReservation.getStart() == null || meetingReservation.getEnd() == null)
|
||||||
|
return R.error("预约时间解析错误");//防止用户端置空预约记录时间
|
||||||
|
if (meetingReservation.getEnd().getTime() <= meetingReservation.getStart().getTime()) return R.error("预约时间无效");
|
||||||
|
String result = meetingReservationService.updateMeetingReservation(userId, meetingReservation, meetingReservationDTO.getServe());
|
||||||
|
if (IMeetingReservationService.OK.equals(result)) {
|
||||||
|
return R.ok("操作成功");
|
||||||
|
} else {
|
||||||
|
return R.error(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 占用
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("beforehand")
|
||||||
|
public R beforehand(@RequestBody MeetingReservationDTO meetingReservationDTO) {
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
MeetingReservation meetingReservation = new MeetingReservation();
|
||||||
|
if (meetingReservationDTO.getMr().getTimeFormat() > 0) {//非任意时间
|
||||||
|
Date start = convert(meetingReservationDTO.getMr().getMrdate(), meetingReservation.getTimeFormat(), true);
|
||||||
|
Date end = convert(meetingReservationDTO.getMr().getMrdate(), meetingReservation.getTimeFormat(), false);
|
||||||
|
meetingReservation.setStart(start);
|
||||||
|
meetingReservation.setEnd(end);
|
||||||
|
} else {
|
||||||
|
meetingReservation.setStart(meetingReservationDTO.getMr().getStart());
|
||||||
|
meetingReservation.setEnd(meetingReservationDTO.getMr().getEnd());
|
||||||
|
}
|
||||||
|
meetingReservation.setTimeFormat(meetingReservationDTO.getMr().getTimeFormat());
|
||||||
|
meetingReservation.setRoomId(meetingReservationDTO.getMr().getRoomId());
|
||||||
|
meetingReservation.setTitle("占用");
|
||||||
|
String result = meetingReservationService.beforehand(userId, meetingReservation);
|
||||||
|
if (IMeetingReservationService.OK.equals(result)) {
|
||||||
|
return R.ok("占用成功");
|
||||||
|
} else {
|
||||||
|
return R.error(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取服务员
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("getWaiter")
|
||||||
|
public R getWaiter() {
|
||||||
|
IcsCustomerStaff p = new IcsCustomerStaff();
|
||||||
|
p.setRoomRole(3);
|
||||||
|
p.setRoomRoleType(1);
|
||||||
|
List<IcsCustomerStaff> voiceWaiters = customerStaffService.selectIcsCustomerStaffList(p);
|
||||||
|
p.setRoomRoleType(3);
|
||||||
|
List<IcsCustomerStaff> serveWaiters = customerStaffService.selectIcsCustomerStaffList(p);
|
||||||
|
JSONArray voiceWaiter = processWaiter(voiceWaiters);
|
||||||
|
JSONArray serveWaiter = processWaiter(serveWaiters);
|
||||||
|
return R.ok().put("voiceWaiter", voiceWaiter).put("serveWaiter", serveWaiter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private JSONArray processWaiter(List<IcsCustomerStaff> list) {
|
||||||
|
JSONArray array = new JSONArray();
|
||||||
|
for (IcsCustomerStaff staff : list) {
|
||||||
|
JSONObject one = new JSONObject();
|
||||||
|
one.put("id", staff.getId());
|
||||||
|
one.put("username", staff.getUsername());
|
||||||
|
one.put("mobile", staff.getMobile());
|
||||||
|
array.add(one);
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分配服务员
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("addWaiter")
|
||||||
|
public R addWaiter(@RequestBody Map<String, String> param) {
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
Long id = Long.parseLong(param.get("id"));
|
||||||
|
String voiceWaiter = param.get("voiceWaiter");
|
||||||
|
String serveWaiter = param.get("serveWaiter");
|
||||||
|
return toAjax(meetingReservationService.addWaiter(userId, id, voiceWaiter, serveWaiter));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室预约记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@RequestMapping("delete")
|
||||||
|
public R delete(@RequestBody Map<String, Long> param) {
|
||||||
|
Long id = param.get("id");
|
||||||
|
return toAjax(meetingReservationService.deleteMeetingReservationById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约详情
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@RequestMapping("getInfo")
|
||||||
|
public R get(@RequestBody Map<String, Long> param) {
|
||||||
|
Long id = param.get("id");
|
||||||
|
MeetingReservation meetingReservation = meetingReservationService.selectMeetingReservationById(id);
|
||||||
|
MeetingRoomVo room = meetingRoomService.selectMeetingRoomById(meetingReservation.getRoomId());
|
||||||
|
List<MeetingWaiterVo> waiters = meetingWaiterService.selectMeetingWaiterList(meetingReservation.getId());
|
||||||
|
List<MeetingServeVo> serves = meetingServeService.selectMeetingServeList(meetingReservation.getId());
|
||||||
|
return R.ok().put("mr", meetingReservation).put("room", room).put("serve", serves).put("waiters", waiters);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室预约记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("list")
|
||||||
|
public R list(@RequestBody MeetingRecordVo meetingRecordVo) {
|
||||||
|
startPage();
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
meetingRecordVo.setUserId(userId);
|
||||||
|
return result(meetingReservationService.selectMeetingReservationList(meetingRecordVo));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,142 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingRoom;
|
||||||
|
import com.ics.admin.domain.RepairAttach;
|
||||||
|
import com.ics.admin.service.IMeetingRoomService;
|
||||||
|
import com.ics.admin.service.IRepairAttachService;
|
||||||
|
import com.ics.admin.vo.MeetingRoomVo;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.file.FileUploadUtils;
|
||||||
|
import com.ics.system.config.DfsConfig;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.wf.jwtp.annotation.Logical;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室 管理
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/meetingRoom")
|
||||||
|
public class MeetingRoomController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingRoomService meetingRoomService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRepairAttachService repairAttachService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DfsConfig dfsConfig;
|
||||||
|
|
||||||
|
/**会议室图片上传*/
|
||||||
|
@RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@PostMapping("upload")
|
||||||
|
public R Upload(MultipartFile file) {
|
||||||
|
String originalFilename = file.getOriginalFilename();
|
||||||
|
long size = file.getSize();
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
if (userId == null) return R.error("未找到有效用户");
|
||||||
|
try {
|
||||||
|
// 上传文件路径
|
||||||
|
String filePath = dfsConfig.getPath();
|
||||||
|
// 上传并返回新文件名称
|
||||||
|
String url = FileUploadUtils.upload(filePath, file);
|
||||||
|
RepairAttach repairAttach = new RepairAttach();
|
||||||
|
repairAttach.setTypeId(1);
|
||||||
|
repairAttach.setNodeId(0);
|
||||||
|
repairAttach.setOriginalFilename(originalFilename);
|
||||||
|
repairAttach.setUrl(url);
|
||||||
|
repairAttach.setFileSize(size);
|
||||||
|
repairAttach.setExt1(IRepairAttachService.FILE_IMG);
|
||||||
|
repairAttach.setDeleteFlag(0);
|
||||||
|
repairAttach.setCreateTime(new Date());
|
||||||
|
repairAttach.setCreateBy(userId.toString());
|
||||||
|
repairAttachService.insertRepairAttach(repairAttach);//插入附件数据
|
||||||
|
return R.ok().put("id", repairAttach.getId())
|
||||||
|
.put("originalFilename", originalFilename)
|
||||||
|
.put("url", url);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return R.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室图片
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"repair:attach:operator"})
|
||||||
|
@PostMapping("deleteImg")
|
||||||
|
public R delete(Long id) {
|
||||||
|
return toAjax(repairAttachService.deleteRepairAttachById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:list")//mr:manage:operator
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public MeetingRoomVo get(@PathVariable("id") Long id) {
|
||||||
|
return meetingRoomService.selectMeetingRoomById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* floor 所属楼层名称,精确查询
|
||||||
|
* name 会议室名称,模糊查询
|
||||||
|
* typeName 会议室形式,精确查询
|
||||||
|
* device 会议室设备,模糊查询
|
||||||
|
* capacityNum 容纳人数,精确查询
|
||||||
|
*
|
||||||
|
* 分页查询会议室列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:list")
|
||||||
|
@PostMapping("list")
|
||||||
|
public R list(MeetingRoom meetingRoom) {
|
||||||
|
startPage();
|
||||||
|
return result(meetingRoomService.selectMeetingRoomList(meetingRoom));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存会议室
|
||||||
|
* @param files 附件id
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(MeetingRoom meetingRoom, String[] files) {
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
meetingRoom.setDeleteFlag(0);
|
||||||
|
meetingRoom.setCreateBy(userId.toString());
|
||||||
|
meetingRoom.setCreateTime(new Date());
|
||||||
|
return toAjax(meetingRoomService.insertMeetingRoom(meetingRoom,files));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存会议室
|
||||||
|
* @param files 附件id
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(MeetingRoom meetingRoom, String[] files) {
|
||||||
|
return toAjax(meetingRoomService.updateMeetingRoom(meetingRoom, files));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(meetingRoomService.deleteMeetingRoomByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingUto;
|
||||||
|
import com.ics.admin.service.IMeetingUtoService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户与机构关联 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("admin/uto")
|
||||||
|
public class MeetingUtoController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingUtoService meetingUtoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户与机构关联
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator"})
|
||||||
|
@RequestMapping("get")
|
||||||
|
public MeetingUto get(Long id) {
|
||||||
|
return meetingUtoService.selectMeetingUtoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户与机构关联列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator"})
|
||||||
|
@RequestMapping("list")
|
||||||
|
public R list(MeetingUto meetingUto) {
|
||||||
|
startPage();
|
||||||
|
return result(meetingUtoService.selectMeetingUtoList(meetingUto));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存用户与机构关联
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator"})
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(MeetingUto meetingUto) {
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
meetingUto.setDeleteFlag(0);
|
||||||
|
meetingUto.setCreateBy(userId.toString());
|
||||||
|
meetingUto.setCreateTime(new Date());
|
||||||
|
String result = meetingUtoService.insertMeetingUto(meetingUto);
|
||||||
|
if (IMeetingUtoService.OK.equals(result)) {
|
||||||
|
return R.ok("操作成功");
|
||||||
|
} else {
|
||||||
|
return R.error(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存用户与机构关联
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator"})
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(MeetingUto meetingUto) {
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
meetingUto.setUpdateBy(userId.toString());
|
||||||
|
meetingUto.setUpdateTime(new Date());
|
||||||
|
String result = meetingUtoService.updateMeetingUto(meetingUto);
|
||||||
|
if (IMeetingUtoService.OK.equals(result)) {
|
||||||
|
return R.ok("操作成功");
|
||||||
|
} else {
|
||||||
|
return R.error(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户与机构关联
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"mr:manage:operator"})
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(meetingUtoService.deleteMeetingUtoByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingServe;
|
||||||
|
import com.ics.admin.mapper.MeetingRoomMapper;
|
||||||
|
import com.ics.admin.service.IMeetingServeService;
|
||||||
|
import com.ics.admin.service.IMeetingWaiterService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.wf.jwtp.annotation.Logical;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录与会务人员关联 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("waiter1")
|
||||||
|
public class MeetingWaiterController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingWaiterService meetingWaiterService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingServeService meetingServeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetingRoomMapper meetingRoomMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室预约记录与会务人员关联
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public R get(@PathVariable("id") Long id) {
|
||||||
|
Long userId = getLoginStaffId();
|
||||||
|
|
||||||
|
//meetingWaiterService.saveOrUpdateMeetingWaiter(userId,56L,"10111,10112,10113","10120,10121,10122");
|
||||||
|
|
||||||
|
//List<MeetingWaiterVo> list=meetingWaiterService.selectMeetingWaiterList(56l);
|
||||||
|
// Date now =new Date();
|
||||||
|
// List<MeetingServe> list=new ArrayList<>();
|
||||||
|
// list.add(new MeetingServe(1l, "参数", "110", "", now, userId));
|
||||||
|
// list.add(new MeetingServe(1l, "音乐", "111", "国歌,国际歌", now, userId));
|
||||||
|
// list.add(new MeetingServe(1l, "飘箱", "112", "50人", now, userId));
|
||||||
|
|
||||||
|
//meetingServeService.saveOrUpdateMeetingServe(1l, list);
|
||||||
|
|
||||||
|
return R.ok().put("list",meetingRoomMapper.getCapacityNum());
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 查询会议室预约记录与会务人员关联列表
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("core:waiter:list")
|
||||||
|
// @GetMapping("list")
|
||||||
|
// public R list(MeetingWaiter meetingWaiter) {
|
||||||
|
// startPage();
|
||||||
|
// return result(meetingWaiterService.selectMeetingWaiterList(meetingWaiter));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 新增保存会议室预约记录与会务人员关联
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("core:waiter:add")
|
||||||
|
// @PostMapping("save")
|
||||||
|
// public R addSave(@RequestBody MeetingWaiter meetingWaiter) {
|
||||||
|
// return toAjax(meetingWaiterService.insertMeetingWaiter(meetingWaiter));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改保存会议室预约记录与会务人员关联
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("core:waiter:edit")
|
||||||
|
// @PostMapping("update")
|
||||||
|
// public R editSave(@RequestBody MeetingWaiter meetingWaiter) {
|
||||||
|
// return toAjax(meetingWaiterService.updateMeetingWaiter(meetingWaiter));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 删除会议室预约记录与会务人员关联
|
||||||
|
// */
|
||||||
|
// @RequiresPermissions("core:waiter:remove")
|
||||||
|
// @PostMapping("remove")
|
||||||
|
// public R remove(String ids) {
|
||||||
|
// return toAjax(meetingWaiterService.deleteMeetingWaiterByIds(ids));
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
package com.ics.admin.controller;
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
import com.ics.admin.domain.Repair;
|
import com.ics.admin.domain.Repair;
|
||||||
import com.ics.admin.domain.RepairAttach;
|
|
||||||
import com.ics.admin.domain.RepairLog;
|
import com.ics.admin.domain.RepairLog;
|
||||||
import com.ics.admin.service.IIcsCustomerStaffService;
|
import com.ics.admin.service.IIcsCustomerStaffService;
|
||||||
import com.ics.admin.service.IRepairAttachService;
|
import com.ics.admin.service.IRepairAttachService;
|
||||||
@ -9,7 +8,6 @@ import com.ics.admin.service.IRepairLogService;
|
|||||||
import com.ics.admin.service.IRepairService;
|
import com.ics.admin.service.IRepairService;
|
||||||
import com.ics.admin.utils.RepairDTO;
|
import com.ics.admin.utils.RepairDTO;
|
||||||
import com.ics.admin.utils.RepairListDTO;
|
import com.ics.admin.utils.RepairListDTO;
|
||||||
import com.ics.admin.vo.RepairAttachVO;
|
|
||||||
import com.ics.common.core.controller.BaseController;
|
import com.ics.common.core.controller.BaseController;
|
||||||
import com.ics.common.core.domain.IcsCustomerStaff;
|
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||||
import com.ics.common.core.domain.R;
|
import com.ics.common.core.domain.R;
|
||||||
@ -23,7 +21,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import org.wf.jwtp.annotation.Logical;
|
import org.wf.jwtp.annotation.Logical;
|
||||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -0,0 +1,79 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonRawValue;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录对象
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_meeting_reservation")
|
||||||
|
public class MeetingReservation extends BaseEntity<MeetingReservation> {
|
||||||
|
private static final long serialVersionUID = -202409181409L;
|
||||||
|
|
||||||
|
/** 预约号 */
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/** 会议室id */
|
||||||
|
private Long roomId;
|
||||||
|
|
||||||
|
/** 预约-开始时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date start;
|
||||||
|
|
||||||
|
/** 预约-结束时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date end;
|
||||||
|
|
||||||
|
/** 预约时间格式:0 任意时间,1上午,2下午,3晚上 4 全天*/
|
||||||
|
private Integer timeFormat;
|
||||||
|
|
||||||
|
/** 会议名称 */
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/** 参与人数 */
|
||||||
|
private Long personNum;
|
||||||
|
|
||||||
|
/** 参会领导 */
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
/** 预约人姓名 */
|
||||||
|
private String bookingUserName;
|
||||||
|
|
||||||
|
/** 预约人联系电话 */
|
||||||
|
private String bookingUserPhone;
|
||||||
|
|
||||||
|
/** 预约用户单位id */
|
||||||
|
private Long userOrgId;
|
||||||
|
|
||||||
|
/** 预约用户单位名称 */
|
||||||
|
private String userOrg;
|
||||||
|
|
||||||
|
/** 预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束 */
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/** 操作记录,json 格式 */
|
||||||
|
@JsonRawValue
|
||||||
|
private String operate;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 扩展1 */
|
||||||
|
private String ext1;
|
||||||
|
|
||||||
|
/** 扩展2 */
|
||||||
|
private String ext2;
|
||||||
|
|
||||||
|
/** 扩展3 */
|
||||||
|
private String ext3;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室对象
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_meeting_room")
|
||||||
|
public class MeetingRoom extends BaseEntity<MeetingRoom> {
|
||||||
|
private static final long serialVersionUID = 202409181411L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属楼层值
|
||||||
|
*/
|
||||||
|
private String floorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属楼层名称
|
||||||
|
*/
|
||||||
|
private String floor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室形式值
|
||||||
|
*/
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室形式
|
||||||
|
*/
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备 格式: #设备1 #设备2 #设备3
|
||||||
|
*/
|
||||||
|
private String device;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间号
|
||||||
|
*/
|
||||||
|
private String roomNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室面积
|
||||||
|
*/
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 容纳人数
|
||||||
|
*/
|
||||||
|
private Long capacityNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议描述
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用 0 启用 1禁用
|
||||||
|
*/
|
||||||
|
private Integer enable;
|
||||||
|
|
||||||
|
/** 会议室状态 0可预约 1不可预约 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展1
|
||||||
|
*/
|
||||||
|
private String ext1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展2
|
||||||
|
*/
|
||||||
|
private String ext2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展3
|
||||||
|
*/
|
||||||
|
private String ext3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约的会务服务对象
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_meeting_serve")
|
||||||
|
public class MeetingServe extends BaseEntity<MeetingServe> {
|
||||||
|
private static final long serialVersionUID = -202409181410L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议预约id
|
||||||
|
*/
|
||||||
|
private Long rid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务对应值
|
||||||
|
*/
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public MeetingServe() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public MeetingServe(Long rid, String name, String value, String remark, Date now, Long createBy) {
|
||||||
|
this.rid = rid;
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
this.remark = remark;
|
||||||
|
this.setDeleteFlag(0);
|
||||||
|
this.setCreateTime(now);
|
||||||
|
this.setCreateBy(createBy + "");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户与机构关联对象
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_meeting_uto")
|
||||||
|
public class MeetingUto extends BaseEntity<MeetingUto> {
|
||||||
|
private static final long serialVersionUID = -202409181412L;
|
||||||
|
|
||||||
|
/** 部门id */
|
||||||
|
private Long orgId;
|
||||||
|
|
||||||
|
/** 部门名称 */
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
/** 姓名 */
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/** 登录名 */
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
/** 密码 */
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 扩展1 */
|
||||||
|
private String ext1;
|
||||||
|
|
||||||
|
/** 扩展2 */
|
||||||
|
private String ext2;
|
||||||
|
|
||||||
|
/** 扩展3 */
|
||||||
|
private String ext3;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录与会务人员关联对象 ics_meeting_waiter
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_meeting_waiter")
|
||||||
|
public class MeetingWaiter extends BaseEntity<MeetingWaiter> {
|
||||||
|
private static final long serialVersionUID = -202409181404L;
|
||||||
|
|
||||||
|
/** 会议预约id */
|
||||||
|
private Long rid;
|
||||||
|
/** 会务人员类型(1 音控组 3会议服务组) */
|
||||||
|
private String type;
|
||||||
|
/** 会务人员id */
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
public MeetingWaiter() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public MeetingWaiter(Long rid, String type, Long userId, Date now, Long createBy) {
|
||||||
|
this.rid = rid;
|
||||||
|
this.type = type;
|
||||||
|
this.userId = userId;
|
||||||
|
this.setDeleteFlag(0);
|
||||||
|
this.setCreateTime(now);
|
||||||
|
this.setCreateBy(createBy + "");
|
||||||
|
}
|
||||||
|
}
|
@ -72,7 +72,7 @@ public class RepairRemind extends BaseEntity<RepairRemind> {
|
|||||||
this.content = content;
|
this.content = content;
|
||||||
this.read = 0;
|
this.read = 0;
|
||||||
this.setDeleteFlag(0);
|
this.setDeleteFlag(0);
|
||||||
this.setCreateBy(createBy + "");
|
this.setCreateBy(createBy.toString());
|
||||||
this.setCreateTime(createTime);
|
this.setCreateTime(createTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,19 @@ public class RepairRemind extends BaseEntity<RepairRemind> {
|
|||||||
this.content = content;
|
this.content = content;
|
||||||
this.read = 0;
|
this.read = 0;
|
||||||
this.setDeleteFlag(0);
|
this.setDeleteFlag(0);
|
||||||
this.setCreateBy(createBy + "");
|
this.setCreateBy(createBy.toString());
|
||||||
|
this.setCreateTime(createTime);
|
||||||
|
this.ext1 = ext1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RepairRemind(Integer typeId, Long repairId, Long userId, String content, Long createBy, Date createTime, String ext1) {
|
||||||
|
this.typeId = typeId;
|
||||||
|
this.repairId = repairId;
|
||||||
|
this.userId = userId;
|
||||||
|
this.content = content;
|
||||||
|
this.read = 0;
|
||||||
|
this.setDeleteFlag(0);
|
||||||
|
this.setCreateBy(createBy.toString());
|
||||||
this.setCreateTime(createTime);
|
this.setCreateTime(createTime);
|
||||||
this.ext1 = ext1;
|
this.ext1 = ext1;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.ics.admin.mapper;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingReservation;
|
||||||
|
import com.ics.admin.vo.MeetingRecordVo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MeetingReservationMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室预约记录
|
||||||
|
*
|
||||||
|
* @param id 会议室预约记录ID
|
||||||
|
* @return 会议室预约记录
|
||||||
|
*/
|
||||||
|
MeetingReservation selectMeetingReservationById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室被占用情况
|
||||||
|
*
|
||||||
|
* @param roomId 会议室id
|
||||||
|
* @param id 预约记录id
|
||||||
|
* @param startTime 预定开始时间
|
||||||
|
* @param endTime 预定结束时间
|
||||||
|
* @return 已经占用的预约记录id, 如果返回空则表示没有占用可以预约
|
||||||
|
*/
|
||||||
|
List<Long> checkBooking(@Param("roomId") Long roomId,@Param("id") Long id, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取即将开始的预约
|
||||||
|
*/
|
||||||
|
List<MeetingReservation> getSoonMeetingReservation();
|
||||||
|
|
||||||
|
/** 审核通过的会议预约变成进行中 */
|
||||||
|
int goMeetingReservation();
|
||||||
|
|
||||||
|
/** 进行中会议预约变成结束 */
|
||||||
|
int endMeetingReservation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增会议室预约记录
|
||||||
|
*
|
||||||
|
* @param meetingReservation 会议室预约记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertMeetingReservation(MeetingReservation meetingReservation);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改会议室预约记录
|
||||||
|
*
|
||||||
|
* @param meetingReservation 会议室预约记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateMeetingReservation(MeetingReservation meetingReservation);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室预约记录列表
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
List<MeetingRecordVo> selectMeetingReservationList(MeetingRecordVo meetingRecordVo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室预约记录
|
||||||
|
*
|
||||||
|
* @param id 会议室预约记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingReservationById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除会议室预约记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingReservationByIds(String[] ids);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ics.admin.mapper;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingRoom;
|
||||||
|
import com.ics.admin.vo.MeetingRoomVo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室Mapper接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MeetingRoomMapper {
|
||||||
|
/**
|
||||||
|
* 查询会议室
|
||||||
|
*
|
||||||
|
* @param id 会议室ID
|
||||||
|
* @return 会议室
|
||||||
|
*/
|
||||||
|
MeetingRoomVo selectMeetingRoomById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室列表
|
||||||
|
*
|
||||||
|
* @param meetingRoom 会议室
|
||||||
|
* @return 会议室集合
|
||||||
|
*/
|
||||||
|
List<MeetingRoom> selectMeetingRoomList(MeetingRoom meetingRoom);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取会议室不重复排好序的容纳人数
|
||||||
|
*/
|
||||||
|
List<Long> getCapacityNum();
|
||||||
|
/**
|
||||||
|
* 新增会议室
|
||||||
|
*
|
||||||
|
* @param meetingRoom 会议室
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertMeetingRoom(MeetingRoom meetingRoom);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改会议室
|
||||||
|
*
|
||||||
|
* @param meetingRoom 会议室
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateMeetingRoom(MeetingRoom meetingRoom);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室
|
||||||
|
*
|
||||||
|
* @param id 会议室ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingRoomById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除会议室
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingRoomByIds(String[] ids);
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.ics.admin.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ics.admin.domain.MeetingServe;
|
||||||
|
import com.ics.admin.vo.MeetingServeVo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约的会务服务Mapper接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MeetingServeMapper extends BaseMapper<MeetingServe> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室预约的会务服务列表
|
||||||
|
*
|
||||||
|
* @param rid 预约id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MeetingServeVo> selectMeetingServeList(Long rid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入会务服务的值
|
||||||
|
*
|
||||||
|
* @param list
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int batchInsert(List<MeetingServe> list);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室预约的会务服务
|
||||||
|
*
|
||||||
|
* @param rid 会议室预约的ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteByRid(Long rid);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ics.admin.mapper;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingUto;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户与机构关联Mapper接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MeetingUtoMapper {
|
||||||
|
/**
|
||||||
|
* 查询用户与机构关联
|
||||||
|
*
|
||||||
|
* @param id 用户与机构关联ID
|
||||||
|
* @return 用户与机构关联
|
||||||
|
*/
|
||||||
|
MeetingUto selectMeetingUtoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户与机构关联列表
|
||||||
|
*
|
||||||
|
* @param meetingUto 用户与机构关联
|
||||||
|
* @return 用户与机构关联集合
|
||||||
|
*/
|
||||||
|
List<MeetingUto> selectMeetingUtoList(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
List<MeetingUto> checkLoginName(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
List<MeetingUto> checkOrgId(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
List<MeetingUto> login(MeetingUto meetingUto);
|
||||||
|
/**
|
||||||
|
* 新增用户与机构关联
|
||||||
|
*
|
||||||
|
* @param meetingUto 用户与机构关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertMeetingUto(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户与机构关联
|
||||||
|
*
|
||||||
|
* @param meetingUto 用户与机构关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateMeetingUto(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户与机构关联
|
||||||
|
*
|
||||||
|
* @param id 用户与机构关联ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingUtoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用户与机构关联
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingUtoByIds(String[] ids);
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.ics.admin.mapper;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingWaiter;
|
||||||
|
import com.ics.admin.vo.MeetingWaiterVo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录与会务人员关联Mapper接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MeetingWaiterMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室预约记录与会务人员关联列表
|
||||||
|
*
|
||||||
|
* @param rid 会议室预约记录id
|
||||||
|
* @return 会议室预约记录与会务人员关联集合
|
||||||
|
*/
|
||||||
|
List<MeetingWaiterVo> selectMeetingWaiterList(Long rid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增会议室预约记录与会务人员关联
|
||||||
|
*
|
||||||
|
* @param list 会议室预约记录选择的会务人员
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int batchInsert(List<MeetingWaiter> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室预约记录与会务人员关联
|
||||||
|
*
|
||||||
|
* @param rid 会议室预约记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteByRid(Long rid);
|
||||||
|
|
||||||
|
}
|
@ -94,6 +94,14 @@ public interface RepairRemindMapper {
|
|||||||
*/
|
*/
|
||||||
int deleteRepairRemindByIds(String[] ids);
|
int deleteRepairRemindByIds(String[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除业务数据的 提醒
|
||||||
|
* @param id 工单或者会议预约的id
|
||||||
|
* @param typeId 0 工单 1 会议室预约
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteRemind(@Param("id") Long id, @Param("typeId") Integer typeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取待推送的提醒
|
* 获取待推送的提醒
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,114 @@
|
|||||||
|
package com.ics.admin.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.ics.admin.domain.MeetingReservation;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ics.admin.domain.MeetingServe;
|
||||||
|
import com.ics.admin.mapper.MeetingServeMapper;
|
||||||
|
import com.ics.admin.utils.MrOperate;
|
||||||
|
import com.ics.admin.vo.MeetingRecordVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录Service接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
public interface IMeetingReservationService {
|
||||||
|
String OK = "okay";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典数据
|
||||||
|
*/
|
||||||
|
JSONObject getConstData();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增会议室预约记录
|
||||||
|
*
|
||||||
|
* @param currentUserId 当前用户id
|
||||||
|
* @param meetingReservation 会议室预约记录
|
||||||
|
* @param meetingServes 选择的会议服务
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
String insertMeetingReservation(Long currentUserId, MeetingReservation meetingReservation, MeetingServe[] meetingServes);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消预约:用户只能取消自己预约且状态为 待审核(5)的预约
|
||||||
|
* 驳回预约:需要给出驳回原因,即content;状态为 待审核(5)的预约
|
||||||
|
* 审核通过预约:状态为 待审核(5)的预约
|
||||||
|
* @param currentUserId 当前用户id
|
||||||
|
* @param id 预约记录id
|
||||||
|
* @param operate 操作: 1 取消 3驳回 7 审核通过
|
||||||
|
* @param content 操作内容
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String operateMeetingReservation(Long currentUserId, Long id, MrOperate operate, String content);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室预约记录
|
||||||
|
*
|
||||||
|
* @param id 会议室预约记录ID
|
||||||
|
* @return 会议室预约记录
|
||||||
|
*/
|
||||||
|
MeetingReservation selectMeetingReservationById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改会议室预约记录
|
||||||
|
*
|
||||||
|
* @param meetingReservation 会议室预约记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
String updateMeetingReservation(Long currentUserId, MeetingReservation meetingReservation, MeetingServe[] meetingServes);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 占用会议室
|
||||||
|
* @param currentUserId 当前用户id
|
||||||
|
* @param meetingReservation 会议室预约记录
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String beforehand(Long currentUserId, MeetingReservation meetingReservation);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分配服务员
|
||||||
|
*/
|
||||||
|
int addWaiter(Long currentUserId, Long rid, String voiceWaiter, String serveWaiter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 即将开始提醒
|
||||||
|
*/
|
||||||
|
void getSoonMeetingReservation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核通过的会议预约,从待开始变成进行中,变成结束。
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int changeMeetingReservation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室预约记录信息
|
||||||
|
*
|
||||||
|
* @param id 会议室预约记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingReservationById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约记录分页查询
|
||||||
|
* @param meetingRecordVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MeetingRecordVo> selectMeetingReservationList(MeetingRecordVo meetingRecordVo);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除会议室预约记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingReservationByIds(String ids);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
package com.ics.admin.service;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingRoom;
|
||||||
|
import com.ics.admin.vo.MeetingRoomVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室Service接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
public interface IMeetingRoomService {
|
||||||
|
/**
|
||||||
|
* 查询会议室
|
||||||
|
*
|
||||||
|
* @param id 会议室ID
|
||||||
|
* @return 会议室
|
||||||
|
*/
|
||||||
|
MeetingRoomVo selectMeetingRoomById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室列表
|
||||||
|
*
|
||||||
|
* @param meetingRoom 会议室
|
||||||
|
* @return 会议室集合
|
||||||
|
*/
|
||||||
|
List<MeetingRoom> selectMeetingRoomList(MeetingRoom meetingRoom);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增会议室
|
||||||
|
*
|
||||||
|
* @param meetingRoom 会议室
|
||||||
|
* @param files 附件id数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertMeetingRoom(MeetingRoom meetingRoom, String[] files);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改会议室
|
||||||
|
*
|
||||||
|
* @param meetingRoom 会议室
|
||||||
|
* @param files 附件id数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateMeetingRoom(MeetingRoom meetingRoom, String[] files);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除会议室
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingRoomByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室信息
|
||||||
|
*
|
||||||
|
* @param id 会议室ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingRoomById(Long id);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.ics.admin.service;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingServe;
|
||||||
|
import com.ics.admin.vo.MeetingServeVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约的会务服务Service接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
public interface IMeetingServeService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据预约记录查询 预约的所有服务事项
|
||||||
|
* @param rid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MeetingServeVo> selectMeetingServeList(Long rid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入或者更新 预约的服务事项
|
||||||
|
* @param list
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int saveOrUpdateMeetingServe(Long rid, List<MeetingServe> list);
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.ics.admin.service;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingUto;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户与机构关联Service接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
public interface IMeetingUtoService {
|
||||||
|
String OK = "okay";
|
||||||
|
/**
|
||||||
|
* 查询用户与机构关联
|
||||||
|
*
|
||||||
|
* @param id 用户与机构关联ID
|
||||||
|
* @return 用户与机构关联
|
||||||
|
*/
|
||||||
|
MeetingUto selectMeetingUtoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户与机构关联列表
|
||||||
|
*
|
||||||
|
* @param meetingUto 用户与机构关联
|
||||||
|
* @return 用户与机构关联集合
|
||||||
|
*/
|
||||||
|
List<MeetingUto> selectMeetingUtoList(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户登录
|
||||||
|
* @param meetingUto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
MeetingUto login(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户与机构关联
|
||||||
|
*
|
||||||
|
* @param meetingUto 用户与机构关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
String insertMeetingUto(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户与机构关联
|
||||||
|
*
|
||||||
|
* @param meetingUto 用户与机构关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
String updateMeetingUto(MeetingUto meetingUto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用户与机构关联
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingUtoByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户与机构关联信息
|
||||||
|
*
|
||||||
|
* @param id 用户与机构关联ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteMeetingUtoById(Long id);
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.ics.admin.service;
|
||||||
|
|
||||||
|
import com.ics.admin.vo.MeetingWaiterVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录与会务人员关联Service接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
public interface IMeetingWaiterService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室预约记录与会务人员关联列表
|
||||||
|
*
|
||||||
|
* @param rid 会议室预约记录id
|
||||||
|
* @return 会议室预约记录的会务人员集合
|
||||||
|
*/
|
||||||
|
List<MeetingWaiterVo> selectMeetingWaiterList(Long rid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新或者新增 预约记录的 会务人员
|
||||||
|
* @param currentUserID
|
||||||
|
* @param rid
|
||||||
|
* @param voiceWaiter
|
||||||
|
* @param serveWaiter
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int saveOrUpdateMeetingWaiter(Long currentUserID, Long rid, String voiceWaiter, String serveWaiter);
|
||||||
|
}
|
@ -0,0 +1,449 @@
|
|||||||
|
package com.ics.admin.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.ics.admin.domain.MeetingReservation;
|
||||||
|
import com.ics.admin.domain.MeetingServe;
|
||||||
|
import com.ics.admin.domain.RepairAttach;
|
||||||
|
import com.ics.admin.domain.RepairRemind;
|
||||||
|
import com.ics.admin.mapper.IcsCustomerStaffMapper;
|
||||||
|
import com.ics.admin.mapper.MeetingReservationMapper;
|
||||||
|
import com.ics.admin.mapper.MeetingRoomMapper;
|
||||||
|
import com.ics.admin.mapper.MeetingServeMapper;
|
||||||
|
import com.ics.admin.mapper.MeetingWaiterMapper;
|
||||||
|
import com.ics.admin.mapper.RepairAttachMapper;
|
||||||
|
import com.ics.admin.mapper.RepairRemindMapper;
|
||||||
|
import com.ics.admin.service.IIcsCustomerStaffService;
|
||||||
|
import com.ics.admin.service.IMeetingReservationService;
|
||||||
|
import com.ics.admin.service.IMeetingServeService;
|
||||||
|
import com.ics.admin.service.IMeetingWaiterService;
|
||||||
|
import com.ics.admin.utils.MeetingRemindContent;
|
||||||
|
import com.ics.admin.utils.MrOperate;
|
||||||
|
import com.ics.admin.vo.MeetingRecordVo;
|
||||||
|
import com.ics.admin.vo.MeetingRoomVo;
|
||||||
|
import com.ics.common.core.domain.IcsCustomerStaff;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.StringUtils;
|
||||||
|
import com.ics.system.domain.DictData;
|
||||||
|
import com.ics.system.domain.Sn;
|
||||||
|
import com.ics.system.service.IDictDataService;
|
||||||
|
import com.ics.system.service.ISnService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Isolation;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MeetingReservationServiceImpl implements IMeetingReservationService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetingReservationMapper meetingReservationMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetingRoomMapper meetingRoomMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingWaiterService meetingWaiterService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetingWaiterMapper meetingWaiterMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMeetingServeService meetingServeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetingServeMapper meetingServeMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IDictDataService dictDataService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISnService snService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IIcsCustomerStaffService customerStaffService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IcsCustomerStaffMapper customerStaffMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RepairRemindMapper repairRemindMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RepairAttachMapper repairAttachMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetingRemindContent meetingRemindContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典数据
|
||||||
|
*/
|
||||||
|
public JSONObject getConstData() {
|
||||||
|
JSONObject data = new JSONObject();
|
||||||
|
JSONArray floors = getConstData("mm_floor");
|
||||||
|
JSONArray types = getConstData("mm_type");
|
||||||
|
JSONArray devices = getConstData("mm_device");
|
||||||
|
JSONArray services = getConstData("mm_service");
|
||||||
|
List<Long> personNum = meetingRoomMapper.getCapacityNum();
|
||||||
|
data.put("floors", floors);
|
||||||
|
data.put("types", types);
|
||||||
|
data.put("devices", devices);
|
||||||
|
data.put("services", services);
|
||||||
|
data.put("personNum", personNum);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JSONArray getConstData(String type) {
|
||||||
|
JSONArray datas = new JSONArray();
|
||||||
|
List<DictData> list = dictDataService.selectDictDataByType(type);
|
||||||
|
if (list == null) return datas;
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
DictData dictData = list.get(i);
|
||||||
|
jsonObject.put(dictData.getDictLabel(), dictData.getDictValue());
|
||||||
|
datas.add(jsonObject);
|
||||||
|
}
|
||||||
|
return datas;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.SERIALIZABLE)
|
||||||
|
@Override
|
||||||
|
public String insertMeetingReservation(Long currentUserId, MeetingReservation meetingReservation, MeetingServe[] meetingServes) {
|
||||||
|
List<Long> ids = meetingReservationMapper.checkBooking(meetingReservation.getRoomId(), null, meetingReservation.getStart(), meetingReservation.getEnd());
|
||||||
|
if (ids.size() > 0) return "会议室已被占用,预约失败";
|
||||||
|
Date now = new Date();
|
||||||
|
meetingReservation.setSn(snService.generate(Sn.Type.REPAIR));
|
||||||
|
meetingReservation.setStatus(5);
|
||||||
|
meetingReservation.setDeleteFlag(0);
|
||||||
|
meetingReservation.setCreateTime(now);
|
||||||
|
meetingReservation.setCreateBy(currentUserId.toString());
|
||||||
|
meetingReservationMapper.insertMeetingReservation(meetingReservation);
|
||||||
|
Long rid = meetingReservation.getId();
|
||||||
|
List<MeetingServe> list = new ArrayList<>();
|
||||||
|
if (meetingServes != null) {
|
||||||
|
for (MeetingServe meetingServe : meetingServes) {
|
||||||
|
meetingServe.setRid(rid);
|
||||||
|
meetingServe.setDeleteFlag(0);
|
||||||
|
meetingServe.setCreateTime(now);
|
||||||
|
meetingServe.setCreateBy(currentUserId.toString());
|
||||||
|
list.add(meetingServe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//提醒--start
|
||||||
|
List<RepairRemind> rList = processRemind(meetingReservation, currentUserId, null, 5, null, null);
|
||||||
|
for (RepairRemind repairRemind : rList) {
|
||||||
|
repairRemindMapper.insertRepairRemind(repairRemind);
|
||||||
|
}
|
||||||
|
//提醒--end
|
||||||
|
meetingServeService.saveOrUpdateMeetingServe(rid, list);
|
||||||
|
return IMeetingReservationService.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.SERIALIZABLE)
|
||||||
|
@Override
|
||||||
|
public String operateMeetingReservation(Long currentUserId, Long id, MrOperate operate, String content) {
|
||||||
|
MeetingReservation meetingReservation = meetingReservationMapper.selectMeetingReservationById(id);
|
||||||
|
if (meetingReservation == null) return "未找到预约记录";
|
||||||
|
if (meetingReservation.getStatus() != 5) return "预约记录不能" + operate.getValue();
|
||||||
|
if (MrOperate.CANCEL.equals(operate) && !meetingReservation.getCreateBy().equals(currentUserId.toString()))
|
||||||
|
return "不能取消非本人的预约记录";
|
||||||
|
Date now = new Date();
|
||||||
|
meetingReservation.setStatus(operate.getStatus());
|
||||||
|
meetingReservation.setUpdateBy(currentUserId.toString());
|
||||||
|
meetingReservation.setUpdateTime(now);
|
||||||
|
JSONArray operates;
|
||||||
|
if (StringUtils.isNotBlank(meetingReservation.getOperate())) {
|
||||||
|
operates = JSONArray.parseArray(meetingReservation.getOperate());
|
||||||
|
} else {
|
||||||
|
operates = new JSONArray();
|
||||||
|
}
|
||||||
|
JSONObject one = new JSONObject();
|
||||||
|
one.put("userid", currentUserId.toString());
|
||||||
|
one.put("time", DateUtils.getTime());
|
||||||
|
one.put("operate", operate.getValue() + "预约");
|
||||||
|
one.put("type", operate.getStatus());
|
||||||
|
one.put("content", content == null ? "" : content);
|
||||||
|
operates.add(one);
|
||||||
|
meetingReservation.setOperate(operates.toJSONString());
|
||||||
|
meetingReservationMapper.updateMeetingReservation(meetingReservation);
|
||||||
|
//提醒--start
|
||||||
|
List<RepairRemind> rList = processRemind(meetingReservation, currentUserId, content, operate.getStatus(), null, null);
|
||||||
|
for (RepairRemind repairRemind : rList) {
|
||||||
|
repairRemindMapper.insertRepairRemind(repairRemind);
|
||||||
|
}
|
||||||
|
//提醒--end
|
||||||
|
return IMeetingReservationService.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室预约记录
|
||||||
|
*
|
||||||
|
* @param id 会议室预约记录ID
|
||||||
|
* @return 会议室预约记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MeetingReservation selectMeetingReservationById(Long id) {
|
||||||
|
return meetingReservationMapper.selectMeetingReservationById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.SERIALIZABLE)
|
||||||
|
@Override
|
||||||
|
public String updateMeetingReservation(Long currentUserId, MeetingReservation meetingReservation, MeetingServe[] meetingServes) {
|
||||||
|
List<RepairRemind> rList = null;
|
||||||
|
if (meetingReservation.getStatus() == 1 || meetingReservation.getStatus() == 3 || meetingReservation.getStatus() == 4) {
|
||||||
|
meetingReservation.setStatus(5);
|
||||||
|
if (!meetingReservation.getCreateBy().equals(currentUserId.toString())) return "当前用户无权修改预约记录";
|
||||||
|
JSONArray operates;
|
||||||
|
if (StringUtils.isNotBlank(meetingReservation.getOperate())) {
|
||||||
|
operates = JSONArray.parseArray(meetingReservation.getOperate());
|
||||||
|
} else {
|
||||||
|
operates = new JSONArray();
|
||||||
|
}
|
||||||
|
JSONObject one = new JSONObject();
|
||||||
|
one.put("userid", currentUserId.toString());
|
||||||
|
one.put("time", DateUtils.getTime());
|
||||||
|
one.put("operate", "重新提交预约");
|
||||||
|
one.put("type", 5);
|
||||||
|
one.put("content", "");
|
||||||
|
operates.add(one);
|
||||||
|
meetingReservation.setOperate(operates.toJSONString());
|
||||||
|
//提醒--start
|
||||||
|
rList = processRemind(meetingReservation, currentUserId, null, 5, null, null);
|
||||||
|
//提醒--end
|
||||||
|
} else if (meetingReservation.getStatus() >= 9) {
|
||||||
|
return "预约记录不能修改";
|
||||||
|
} else {
|
||||||
|
IcsCustomerStaff customerStaff = customerStaffService.selectIcsCustomerStaffById(currentUserId);
|
||||||
|
if (customerStaff.getRoomRole() == null || customerStaff.getRoomRole() != 5) return "权限不足!";//管理员权限验证
|
||||||
|
//提醒--start
|
||||||
|
rList = processRemind(meetingReservation, currentUserId, null, 0, null, null);
|
||||||
|
//提醒--end
|
||||||
|
}
|
||||||
|
List<Long> ids = meetingReservationMapper.checkBooking(meetingReservation.getRoomId(), meetingReservation.getId(), meetingReservation.getStart(), meetingReservation.getEnd());
|
||||||
|
if (ids.size() > 0) return "会议室已被占用,预约失败";
|
||||||
|
Date now = new Date();
|
||||||
|
meetingReservation.setUpdateTime(now);
|
||||||
|
meetingReservation.setUpdateBy(currentUserId.toString());
|
||||||
|
meetingReservationMapper.updateMeetingReservation(meetingReservation);
|
||||||
|
List<MeetingServe> list = new ArrayList<>();
|
||||||
|
if (meetingServes != null) {
|
||||||
|
for (MeetingServe meetingServe : meetingServes) {
|
||||||
|
meetingServe.setRid(meetingReservation.getId());
|
||||||
|
meetingServe.setDeleteFlag(0);
|
||||||
|
meetingServe.setCreateTime(now);
|
||||||
|
meetingServe.setCreateBy(currentUserId.toString());
|
||||||
|
list.add(meetingServe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
meetingServeService.saveOrUpdateMeetingServe(meetingReservation.getId(), list);
|
||||||
|
//提醒--start
|
||||||
|
for (RepairRemind repairRemind : rList) {
|
||||||
|
repairRemindMapper.insertRepairRemind(repairRemind);
|
||||||
|
}
|
||||||
|
//提醒--end
|
||||||
|
return IMeetingReservationService.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成会议预约提醒
|
||||||
|
*
|
||||||
|
* @param meetingReservation 会议预约记录
|
||||||
|
* @param currentUserId 当前用户id
|
||||||
|
* @param content 驳回等原因
|
||||||
|
* @param status 状态 -1 提醒会务人员 ,0 更新--提醒预约创建人 ,1 取消,3驳回,5提交待审核,7审核通过,9即将开始
|
||||||
|
* @param voiceWaiter 音控组人员id,格式1,2,3,4
|
||||||
|
* @param serveWaiter 会务组人员id,格式1,2,3,4
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<RepairRemind> processRemind(MeetingReservation meetingReservation, Long currentUserId, String content, Integer status, String voiceWaiter, String serveWaiter) {
|
||||||
|
MeetingRoomVo meetingRoom = meetingRoomMapper.selectMeetingRoomById(meetingReservation.getRoomId());
|
||||||
|
String remindContent = meetingReservation.getTitle() + "/" +
|
||||||
|
DateUtils.parseDateToStr("yyyy-MM-dd HH:mm", meetingReservation.getStart())
|
||||||
|
+ " ~ " + DateUtils.parseDateToStr("HH:mm", meetingReservation.getEnd())
|
||||||
|
+ "/" + meetingRoom.getRoomNum();
|
||||||
|
Date now = new Date();
|
||||||
|
List<RepairRemind> list = new ArrayList<>();
|
||||||
|
IcsCustomerStaff p = new IcsCustomerStaff();
|
||||||
|
p.setRoomRole(5);
|
||||||
|
List<IcsCustomerStaff> admins = customerStaffMapper.selectIcsCustomerStaffList(p);//获取所有会议管理员
|
||||||
|
boolean isAdmin = false;//是否管理员创建的预约
|
||||||
|
for (IcsCustomerStaff staff : admins) {
|
||||||
|
if (staff.getId().toString().equals(meetingReservation.getCreateBy())) {
|
||||||
|
isAdmin = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status == -1) {//提醒会务人员
|
||||||
|
if (StringUtils.isNotBlank(voiceWaiter)) {
|
||||||
|
String[] voices = voiceWaiter.split(",");
|
||||||
|
for (int i = 0; i < voices.length; i++) {
|
||||||
|
list.add(
|
||||||
|
new RepairRemind(1, meetingReservation.getId(), Long.valueOf(voices[i]),
|
||||||
|
String.format(meetingRemindContent.getSu1(), remindContent), currentUserId, now, "1")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(serveWaiter)) {
|
||||||
|
String[] serves = serveWaiter.split(",");
|
||||||
|
for (int i = 0; i < serves.length; i++) {
|
||||||
|
list.add(
|
||||||
|
new RepairRemind(1, meetingReservation.getId(), Long.valueOf(serves[i]),
|
||||||
|
String.format(meetingRemindContent.getSu1(), remindContent), currentUserId, now, "1")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status == 0) {//更新 提醒预约创建人
|
||||||
|
//不是管理员创建的预约,并且不是当前用户创建的预约
|
||||||
|
if (!isAdmin && !currentUserId.toString().equals(meetingReservation.getCreateBy())) {
|
||||||
|
list.add(
|
||||||
|
new RepairRemind(1, meetingReservation.getId(), Long.valueOf(meetingReservation.getCreateBy()),
|
||||||
|
String.format(meetingRemindContent.getCu2(), remindContent), currentUserId, now, "1")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status == 1) {//取消
|
||||||
|
for (IcsCustomerStaff staff : admins) {
|
||||||
|
list.add(
|
||||||
|
new RepairRemind(1, meetingReservation.getId(), staff.getId(),
|
||||||
|
String.format(meetingRemindContent.getMu2(), remindContent, content), currentUserId, now, "1")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status == 3) {//驳回
|
||||||
|
list.add(
|
||||||
|
new RepairRemind(1, meetingReservation.getId(), Long.valueOf(meetingReservation.getCreateBy()),
|
||||||
|
String.format(meetingRemindContent.getCu1(), remindContent, content), currentUserId, now, "1")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (status == 5) { //提交待审核
|
||||||
|
if (!isAdmin) { //不是管理员创建的预约
|
||||||
|
for (IcsCustomerStaff staff : admins) {
|
||||||
|
list.add(
|
||||||
|
new RepairRemind(1, meetingReservation.getId(), staff.getId(),
|
||||||
|
String.format(meetingRemindContent.getMu1(), remindContent), currentUserId, now, "1")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status == 7) {//审核通过
|
||||||
|
if (!isAdmin) { //不是管理员创建的预约
|
||||||
|
list.add(
|
||||||
|
new RepairRemind(1, meetingReservation.getId(), Long.valueOf(meetingReservation.getCreateBy()),
|
||||||
|
String.format(meetingRemindContent.getCu3(), remindContent), currentUserId, now, "1")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status == 9) {//即将开始
|
||||||
|
list.add(
|
||||||
|
new RepairRemind(1, meetingReservation.getId(), Long.valueOf(meetingReservation.getCreateBy()),
|
||||||
|
String.format(meetingRemindContent.getCu4(), remindContent), currentUserId, now, "1")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.SERIALIZABLE)
|
||||||
|
@Override
|
||||||
|
public String beforehand(Long currentUserId, MeetingReservation meetingReservation) {
|
||||||
|
List<Long> ids = meetingReservationMapper.checkBooking(meetingReservation.getRoomId(), null, meetingReservation.getStart(), meetingReservation.getEnd());
|
||||||
|
if (ids.size() > 0) return "会议室已被占用,预约失败";
|
||||||
|
Date now = new Date();
|
||||||
|
meetingReservation.setSn(snService.generate(Sn.Type.REPAIR));
|
||||||
|
meetingReservation.setStatus(4);
|
||||||
|
meetingReservation.setDeleteFlag(0);
|
||||||
|
meetingReservation.setCreateTime(now);
|
||||||
|
meetingReservation.setCreateBy(currentUserId.toString());
|
||||||
|
meetingReservationMapper.insertMeetingReservation(meetingReservation);
|
||||||
|
return IMeetingReservationService.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int addWaiter(Long currentUserId, Long rid, String voiceWaiter, String serveWaiter) {
|
||||||
|
MeetingReservation meetingReservation = meetingReservationMapper.selectMeetingReservationById(rid);
|
||||||
|
List<RepairRemind> rList = processRemind(meetingReservation, currentUserId, null, -1, voiceWaiter, serveWaiter);
|
||||||
|
for (RepairRemind repairRemind : rList) {
|
||||||
|
repairRemindMapper.insertRepairRemind(repairRemind);
|
||||||
|
}
|
||||||
|
return meetingWaiterService.saveOrUpdateMeetingWaiter(currentUserId, rid, voiceWaiter, serveWaiter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void getSoonMeetingReservation() {
|
||||||
|
List<MeetingReservation> list = meetingReservationMapper.getSoonMeetingReservation();
|
||||||
|
for (MeetingReservation meetingReservation : list) {
|
||||||
|
List<RepairRemind> rList = processRemind(meetingReservation, -1L, null, 9, null, null);
|
||||||
|
for (RepairRemind repairRemind : rList) {
|
||||||
|
repairRemindMapper.insertRepairRemind(repairRemind);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int changeMeetingReservation() {
|
||||||
|
int a = meetingReservationMapper.goMeetingReservation();
|
||||||
|
int b = meetingReservationMapper.endMeetingReservation();
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室预约记录信息
|
||||||
|
*
|
||||||
|
* @param id 会议室预约记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int deleteMeetingReservationById(Long id) {
|
||||||
|
repairRemindMapper.deleteRemind(id, 1);//删除提醒
|
||||||
|
meetingServeMapper.deleteByRid(id);//删除服务
|
||||||
|
meetingWaiterMapper.deleteByRid(id);//删除服务员
|
||||||
|
return meetingReservationMapper.deleteMeetingReservationById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MeetingRecordVo> selectMeetingReservationList(MeetingRecordVo meetingRecordVo) {
|
||||||
|
List<MeetingRecordVo> list = meetingReservationMapper.selectMeetingReservationList(meetingRecordVo);
|
||||||
|
for (MeetingRecordVo mr : list) {
|
||||||
|
List<RepairAttach> attaches = repairAttachMapper.selectRepairAttachList(mr.getRoomId(), 1);
|
||||||
|
JSONArray array = new JSONArray();
|
||||||
|
for (RepairAttach repairAttach : attaches) {
|
||||||
|
JSONObject attach = new JSONObject();
|
||||||
|
attach.put("id", repairAttach.getId());
|
||||||
|
attach.put("url", repairAttach.getUrl());
|
||||||
|
array.add(attach);
|
||||||
|
}
|
||||||
|
mr.setImgs(array);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室预约记录对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMeetingReservationByIds(String ids) {
|
||||||
|
String[] idsArray = StrUtil.split(ids, ",");
|
||||||
|
return meetingReservationMapper.deleteMeetingReservationByIds(idsArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,118 @@
|
|||||||
|
package com.ics.admin.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.ics.admin.domain.MeetingRoom;
|
||||||
|
import com.ics.admin.domain.RepairAttach;
|
||||||
|
import com.ics.admin.mapper.MeetingRoomMapper;
|
||||||
|
import com.ics.admin.mapper.RepairAttachMapper;
|
||||||
|
import com.ics.admin.service.IMeetingRoomService;
|
||||||
|
import com.ics.admin.vo.MeetingRoomVo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MeetingRoomServiceImpl implements IMeetingRoomService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetingRoomMapper meetingRoomMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RepairAttachMapper repairAttachMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室
|
||||||
|
*
|
||||||
|
* @param id 会议室ID
|
||||||
|
* @return 会议室
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MeetingRoomVo selectMeetingRoomById(Long id) {
|
||||||
|
MeetingRoomVo meetingRoomVo = meetingRoomMapper.selectMeetingRoomById(id);
|
||||||
|
List<RepairAttach> list = repairAttachMapper.selectRepairAttachList(meetingRoomVo.getId(), 1);
|
||||||
|
JSONArray attacths = new JSONArray();
|
||||||
|
for (RepairAttach repairAttach : list) {
|
||||||
|
JSONObject attach = new JSONObject();
|
||||||
|
attach.put("id", repairAttach.getId());
|
||||||
|
attach.put("url", repairAttach.getUrl());
|
||||||
|
attacths.add(attach);
|
||||||
|
}
|
||||||
|
meetingRoomVo.setImgs(attacths);
|
||||||
|
return meetingRoomVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会议室列表
|
||||||
|
*
|
||||||
|
* @param meetingRoom 会议室
|
||||||
|
* @return 会议室
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MeetingRoom> selectMeetingRoomList(MeetingRoom meetingRoom) {
|
||||||
|
return meetingRoomMapper.selectMeetingRoomList(meetingRoom);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增会议室
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int insertMeetingRoom(MeetingRoom meetingRoom, String[] files) {
|
||||||
|
int r = meetingRoomMapper.insertMeetingRoom(meetingRoom);
|
||||||
|
if (files != null && files.length > 0) {
|
||||||
|
repairAttachMapper.updateRepairAttachs(meetingRoom.getId(), 1, files);//更新附件
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改会议室
|
||||||
|
*
|
||||||
|
* @param meetingRoom 会议室
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int updateMeetingRoom(MeetingRoom meetingRoom, String[] files) {
|
||||||
|
if (files != null && files.length > 0) {
|
||||||
|
repairAttachMapper.updateRepairAttachs(meetingRoom.getId(), 1, files);//更新附件
|
||||||
|
}
|
||||||
|
return meetingRoomMapper.updateMeetingRoom(meetingRoom);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMeetingRoomByIds(String ids) {
|
||||||
|
String[] idsArray = StrUtil.split(ids,",");
|
||||||
|
return meetingRoomMapper.deleteMeetingRoomByIds(idsArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除会议室信息
|
||||||
|
*
|
||||||
|
* @param id 会议室ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMeetingRoomById(Long id) {
|
||||||
|
return meetingRoomMapper.deleteMeetingRoomById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.ics.admin.service.impl;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingServe;
|
||||||
|
import com.ics.admin.mapper.MeetingServeMapper;
|
||||||
|
import com.ics.admin.service.IMeetingServeService;
|
||||||
|
import com.ics.admin.vo.MeetingServeVo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约的会务服务Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MeetingServeServiceImpl implements IMeetingServeService {
|
||||||
|
@Autowired
|
||||||
|
private MeetingServeMapper meetingServeMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MeetingServeVo> selectMeetingServeList(Long rid) {
|
||||||
|
return meetingServeMapper.selectMeetingServeList(rid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int saveOrUpdateMeetingServe(Long rid, List<MeetingServe> list) {
|
||||||
|
meetingServeMapper.deleteByRid(rid);
|
||||||
|
return meetingServeMapper.batchInsert(list);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,106 @@
|
|||||||
|
package com.ics.admin.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.ics.admin.domain.MeetingUto;
|
||||||
|
import com.ics.admin.mapper.MeetingUtoMapper;
|
||||||
|
import com.ics.admin.service.IMeetingUtoService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户与机构关联Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MeetingUtoServiceImpl implements IMeetingUtoService {
|
||||||
|
@Autowired
|
||||||
|
private MeetingUtoMapper meetingUtoMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户与机构关联
|
||||||
|
*
|
||||||
|
* @param id 用户与机构关联ID
|
||||||
|
* @return 用户与机构关联
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MeetingUto selectMeetingUtoById(Long id) {
|
||||||
|
return meetingUtoMapper.selectMeetingUtoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户与机构关联列表
|
||||||
|
*
|
||||||
|
* @param meetingUto 用户与机构关联
|
||||||
|
* @return 用户与机构关联
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MeetingUto> selectMeetingUtoList(MeetingUto meetingUto) {
|
||||||
|
return meetingUtoMapper.selectMeetingUtoList(meetingUto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MeetingUto login(MeetingUto meetingUto) {
|
||||||
|
List<MeetingUto> list = meetingUtoMapper.login(meetingUto);
|
||||||
|
if (list.size() > 0) return list.get(0);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户与机构关联
|
||||||
|
*
|
||||||
|
* @param meetingUto 用户与机构关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String insertMeetingUto(MeetingUto meetingUto) {
|
||||||
|
List<MeetingUto> loginNames = meetingUtoMapper.checkLoginName(meetingUto);
|
||||||
|
if (loginNames.size() > 0) return "登录名重复";
|
||||||
|
List<MeetingUto> orgNames = meetingUtoMapper.checkOrgId(meetingUto);
|
||||||
|
if (orgNames.size() > 0) return "已存在相同机构id,但机构名称不一致";
|
||||||
|
meetingUtoMapper.insertMeetingUto(meetingUto);
|
||||||
|
return IMeetingUtoService.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户与机构关联
|
||||||
|
*
|
||||||
|
* @param meetingUto 用户与机构关联
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String updateMeetingUto(MeetingUto meetingUto) {
|
||||||
|
List<MeetingUto> loginNames = meetingUtoMapper.checkLoginName(meetingUto);
|
||||||
|
if (loginNames.size() > 0) return "登录名重复";
|
||||||
|
List<MeetingUto> orgNames = meetingUtoMapper.checkOrgId(meetingUto);
|
||||||
|
if (orgNames.size() > 0) return "已存在相同机构id,但机构名称不一致";
|
||||||
|
meetingUtoMapper.updateMeetingUto(meetingUto);
|
||||||
|
return IMeetingUtoService.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户与机构关联对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMeetingUtoByIds(String ids) {
|
||||||
|
String[] idsArray = StrUtil.split(ids, ",");
|
||||||
|
return meetingUtoMapper.deleteMeetingUtoByIds(idsArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户与机构关联信息
|
||||||
|
*
|
||||||
|
* @param id 用户与机构关联ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMeetingUtoById(Long id) {
|
||||||
|
return meetingUtoMapper.deleteMeetingUtoById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
package com.ics.admin.service.impl;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingWaiter;
|
||||||
|
import com.ics.admin.mapper.MeetingWaiterMapper;
|
||||||
|
import com.ics.admin.service.IMeetingWaiterService;
|
||||||
|
import com.ics.admin.vo.MeetingWaiterVo;
|
||||||
|
import com.ics.common.utils.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录与会务人员关联Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MeetingWaiterServiceImpl implements IMeetingWaiterService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MeetingWaiterMapper meetingWaiterMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MeetingWaiterVo> selectMeetingWaiterList(Long rid) {
|
||||||
|
return meetingWaiterMapper.selectMeetingWaiterList(rid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int saveOrUpdateMeetingWaiter(Long currentUserID, Long rid, String voiceWaiter, String serveWaiter) {
|
||||||
|
List<MeetingWaiter> list=new ArrayList<>();
|
||||||
|
Date now=new Date();
|
||||||
|
if (StringUtils.isNotBlank(voiceWaiter)) {
|
||||||
|
String[] voices = voiceWaiter.split(",");
|
||||||
|
for (int i = 0; i < voices.length; i++) {
|
||||||
|
list.add(new MeetingWaiter(rid, "1", Long.valueOf(voices[i]), now, currentUserID));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(serveWaiter)){
|
||||||
|
String[] serves = serveWaiter.split(",");
|
||||||
|
for (int i = 0; i < serves.length; i++) {
|
||||||
|
list.add(new MeetingWaiter(rid, "3", Long.valueOf(serves[i]), now, currentUserID));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
meetingWaiterMapper.deleteByRid(rid);
|
||||||
|
return meetingWaiterMapper.batchInsert(list);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.ics.admin.utils;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* created at 2024-9-21 16:21
|
||||||
|
*
|
||||||
|
* @author lujiang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@PropertySource(value = {"classpath:repairRemind.properties"}, encoding = "UTF-8")
|
||||||
|
@ConfigurationProperties(prefix = "mr.remind")
|
||||||
|
@Data
|
||||||
|
public class MeetingRemindContent {
|
||||||
|
private String cu1;
|
||||||
|
private String cu2;
|
||||||
|
private String cu3;
|
||||||
|
private String cu4;
|
||||||
|
private String mu1;
|
||||||
|
private String mu2;
|
||||||
|
private String su1;
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.ics.admin.utils;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingServe;
|
||||||
|
import com.ics.admin.vo.MeetingReservationVo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* created at 2024-9-20 14:16
|
||||||
|
*
|
||||||
|
* @author lujiang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MeetingReservationDTO implements Serializable {
|
||||||
|
private static final long serialVersionUID = -202409201417L;
|
||||||
|
//预约表单内容
|
||||||
|
private MeetingReservationVo mr;
|
||||||
|
//预约时所选择的服务
|
||||||
|
private MeetingServe[] serve;
|
||||||
|
//预约id
|
||||||
|
private Long id;
|
||||||
|
//预约操作
|
||||||
|
private MrOperate operate;
|
||||||
|
//驳回、取消 原因
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.ics.admin.utils;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室预约记录操作状态
|
||||||
|
*/
|
||||||
|
public enum MrOperate implements IEnum<String> {
|
||||||
|
|
||||||
|
CANCEL("取消", 1),
|
||||||
|
REJECTED("驳回", 3),
|
||||||
|
PASS("审核通过", 7);
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
MrOperate(String value, int status) {
|
||||||
|
this.value = value;
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,167 @@
|
|||||||
|
package com.ics.admin.vo;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonRawValue;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* created at 2024-9-22 16:34
|
||||||
|
*
|
||||||
|
* @author lujiang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MeetingRecordVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = -202409221634L;
|
||||||
|
/**1.普通用户, 3.会议服务人员 ,5.会议管理员*/
|
||||||
|
private Integer role;
|
||||||
|
/** 后台传入当前用户 */
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 日期查询;格式 2024-09-22
|
||||||
|
*/
|
||||||
|
private String filterDate;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 预约号 */
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/** 会议室id */
|
||||||
|
private Long roomId;
|
||||||
|
|
||||||
|
/** 预约-开始时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date start;
|
||||||
|
|
||||||
|
/** 预约-结束时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date end;
|
||||||
|
|
||||||
|
/** 预约时间格式:0 任意时间,1上午,2下午,3晚上 4 全天*/
|
||||||
|
private Integer timeFormat;
|
||||||
|
|
||||||
|
/** 会议名称 */
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/** 参与人数 */
|
||||||
|
private Long personNum;
|
||||||
|
|
||||||
|
/** 参会领导 */
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
/** 预约人姓名 */
|
||||||
|
private String bookingUserName;
|
||||||
|
|
||||||
|
/** 预约人联系电话 */
|
||||||
|
private String bookingUserPhone;
|
||||||
|
|
||||||
|
/** 预约用户单位id */
|
||||||
|
private Long userOrgId;
|
||||||
|
|
||||||
|
/** 预约用户单位名称 */
|
||||||
|
private String userOrg;
|
||||||
|
|
||||||
|
/** 预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束 */
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/** 操作记录,json 格式 */
|
||||||
|
@JsonRawValue
|
||||||
|
private String operate;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 扩展1 */
|
||||||
|
private String ext1;
|
||||||
|
|
||||||
|
/** 扩展2 */
|
||||||
|
private String ext2;
|
||||||
|
|
||||||
|
/** 扩展3 */
|
||||||
|
private String ext3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属楼层值
|
||||||
|
*/
|
||||||
|
private String floorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属楼层名称
|
||||||
|
*/
|
||||||
|
private String floor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室形式值
|
||||||
|
*/
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室形式
|
||||||
|
*/
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备 格式: #设备1 #设备2 #设备3
|
||||||
|
*/
|
||||||
|
private String device;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间号
|
||||||
|
*/
|
||||||
|
private String roomNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室面积
|
||||||
|
*/
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 容纳人数
|
||||||
|
*/
|
||||||
|
private Long capacityNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议描述
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用 0 启用 1禁用
|
||||||
|
*/
|
||||||
|
private Integer enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展1
|
||||||
|
*/
|
||||||
|
private String roomExt1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展2
|
||||||
|
*/
|
||||||
|
private String roomExt2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展3
|
||||||
|
*/
|
||||||
|
private String roomExt3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String roomRemark;
|
||||||
|
|
||||||
|
|
||||||
|
private JSONArray imgs;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package com.ics.admin.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* created at 2024-9-20 15:23
|
||||||
|
*
|
||||||
|
* @author lujiang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MeetingReservationVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -202409201524L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 预约号 */
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/** 会议室id */
|
||||||
|
private Long roomId;
|
||||||
|
|
||||||
|
/** 预约-开始时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date start;
|
||||||
|
|
||||||
|
/** 预约-结束时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date end;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约日期
|
||||||
|
*/
|
||||||
|
private String mrdate;
|
||||||
|
|
||||||
|
/** 预约时间格式:0 任意时间,1上午,2下午,3晚上 4 全天*/
|
||||||
|
private Integer timeFormat;
|
||||||
|
|
||||||
|
/** 会议名称 */
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/** 参与人数 */
|
||||||
|
private Long personNum;
|
||||||
|
|
||||||
|
/** 参会领导 */
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
/** 预约人姓名 */
|
||||||
|
private String bookingUserName;
|
||||||
|
|
||||||
|
/** 预约人联系电话 */
|
||||||
|
private String bookingUserPhone;
|
||||||
|
|
||||||
|
/** 预约用户单位id */
|
||||||
|
private Long userOrgId;
|
||||||
|
|
||||||
|
/** 预约用户单位名称 */
|
||||||
|
private String userOrg;
|
||||||
|
|
||||||
|
/** 预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束 */
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/** 操作记录,json 格式 */
|
||||||
|
private String operate;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 扩展1 */
|
||||||
|
private String ext1;
|
||||||
|
|
||||||
|
/** 扩展2 */
|
||||||
|
private String ext2;
|
||||||
|
|
||||||
|
/** 扩展3 */
|
||||||
|
private String ext3;
|
||||||
|
}
|
@ -0,0 +1,99 @@
|
|||||||
|
package com.ics.admin.vo;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室对象
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2024-09-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MeetingRoomVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 202409201024L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 所属楼层值
|
||||||
|
*/
|
||||||
|
private String floorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属楼层名称
|
||||||
|
*/
|
||||||
|
private String floor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室形式值
|
||||||
|
*/
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室形式
|
||||||
|
*/
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备 格式: #设备1 #设备2 #设备3
|
||||||
|
*/
|
||||||
|
private String device;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间号
|
||||||
|
*/
|
||||||
|
private String roomNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议室面积
|
||||||
|
*/
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 容纳人数
|
||||||
|
*/
|
||||||
|
private Long capacityNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议描述
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用 0 启用 1禁用
|
||||||
|
*/
|
||||||
|
private Integer enable;
|
||||||
|
|
||||||
|
/** 会议室状态 0可预约 1不可预约 */
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展1
|
||||||
|
*/
|
||||||
|
private String ext1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展2
|
||||||
|
*/
|
||||||
|
private String ext2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展3
|
||||||
|
*/
|
||||||
|
private String ext3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
private JSONArray imgs;
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.ics.admin.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* created at 2024-9-19 9:30
|
||||||
|
*
|
||||||
|
* @author lujiang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MeetingServeVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = -202409300931L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会议预约id
|
||||||
|
*/
|
||||||
|
private Long rid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务对应值
|
||||||
|
*/
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.ics.admin.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* created at 2024-9-18 16:31
|
||||||
|
*
|
||||||
|
* @author lujiang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MeetingWaiterVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = -202409181632L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long rid;
|
||||||
|
|
||||||
|
/** 会务人员类型(1 音控组 3会议服务组) */
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 会务人员id */
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会务人员姓名
|
||||||
|
*/
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会务人员电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
}
|
@ -22,6 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="icsCustomerId" column="ics_customer_id" />
|
<result property="icsCustomerId" column="ics_customer_id" />
|
||||||
<result property="openid" column="openid" />
|
<result property="openid" column="openid" />
|
||||||
<result property="gzhOpenid" column="gzh_openid" />
|
<result property="gzhOpenid" column="gzh_openid" />
|
||||||
|
<result property="roomRole" column="room_role" />
|
||||||
|
<result property="roomRoleType" column="room_role_type" />
|
||||||
<result property="avatar" column="avatar" />
|
<result property="avatar" column="avatar" />
|
||||||
<result property="gender" column="gender" />
|
<result property="gender" column="gender" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
@ -39,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectIcsCustomerStaffVo">
|
<sql id="selectIcsCustomerStaffVo">
|
||||||
SELECT id, username, mobile, create_by, create_time, update_by,name,photo,address,email,degree,urgent, update_time, delete_flag, ics_customer_id, openid, gzh_openid, avatar, gender, status, park_id,card_no, visit_time,
|
SELECT id, username, mobile, create_by, create_time, update_by,name,photo,address,email,degree,urgent, update_time, delete_flag, ics_customer_id, openid, gzh_openid, room_role, room_role_type, avatar, gender, status, park_id,card_no, visit_time,
|
||||||
leave_time,visit_content,to_name,to_phone,to_customer,to_customer_id,data_type,park_id,tenant_id
|
leave_time,visit_content,to_name,to_phone,to_customer,to_customer_id,data_type,park_id,tenant_id
|
||||||
FROM ics_customer_staff
|
FROM ics_customer_staff
|
||||||
</sql>
|
</sql>
|
||||||
@ -59,6 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="parkId != null and parkId != ''"> AND icc.park_id = #{parkId} </if>
|
<if test="parkId != null and parkId != ''"> AND icc.park_id = #{parkId} </if>
|
||||||
<if test="tenantId != null and tenantId != ''"> AND cs.tenant_id = #{tenantId} </if>
|
<if test="tenantId != null and tenantId != ''"> AND cs.tenant_id = #{tenantId} </if>
|
||||||
<if test="dataType != null and dataType != ''"> AND cs.data_type = #{dataType} </if>
|
<if test="dataType != null and dataType != ''"> AND cs.data_type = #{dataType} </if>
|
||||||
|
<if test="roomRole != null"> AND cs.room_role = #{roomRole} </if>
|
||||||
|
<if test="roomRoleType != null"> AND cs.room_role_type = #{roomRoleType} </if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -88,6 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="icsCustomerId != null ">ics_customer_id,</if>
|
<if test="icsCustomerId != null ">ics_customer_id,</if>
|
||||||
<if test="openid != null and openid != ''">openid,</if>
|
<if test="openid != null and openid != ''">openid,</if>
|
||||||
<if test="gzhOpenid != null and gzhOpenid != ''">gzh_openid,</if>
|
<if test="gzhOpenid != null and gzhOpenid != ''">gzh_openid,</if>
|
||||||
|
<if test="roomRole != null">room_role,</if>
|
||||||
|
<if test="roomRoleType != null">room_role_type,</if>
|
||||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||||
<if test="gender != null and gender != ''">gender,</if>
|
<if test="gender != null and gender != ''">gender,</if>
|
||||||
<if test="status != null and status != ''">status,</if>
|
<if test="status != null and status != ''">status,</if>
|
||||||
@ -121,6 +127,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="icsCustomerId != null ">#{icsCustomerId},</if>
|
<if test="icsCustomerId != null ">#{icsCustomerId},</if>
|
||||||
<if test="openid != null and openid != ''">#{openid},</if>
|
<if test="openid != null and openid != ''">#{openid},</if>
|
||||||
<if test="gzhOpenid != null and gzhOpenid != ''">#{gzhOpenid},</if>
|
<if test="gzhOpenid != null and gzhOpenid != ''">#{gzhOpenid},</if>
|
||||||
|
<if test="roomRole != null">#{roomRole},</if>
|
||||||
|
<if test="roomRoleType != null">#{roomRoleType},</if>
|
||||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||||
<if test="gender != null and gender != ''">#{gender},</if>
|
<if test="gender != null and gender != ''">#{gender},</if>
|
||||||
<if test="status != null and status != ''">#{status},</if>
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
@ -157,6 +165,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="icsCustomerId != null ">ics_customer_id = #{icsCustomerId},</if>
|
<if test="icsCustomerId != null ">ics_customer_id = #{icsCustomerId},</if>
|
||||||
<if test="openid != null and openid != ''">openid = #{openid},</if>
|
<if test="openid != null and openid != ''">openid = #{openid},</if>
|
||||||
<if test="gzhOpenid != null and gzhOpenid != ''">gzh_openid=#{gzhOpenid},</if>
|
<if test="gzhOpenid != null and gzhOpenid != ''">gzh_openid=#{gzhOpenid},</if>
|
||||||
|
<if test="roomRole != null">room_role = #{roomRole},</if>
|
||||||
|
<if test="roomRoleType != null">room_role_type = #{roomRoleType},</if>
|
||||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||||||
<if test="gender != null and gender != ''">gender = #{gender},</if>
|
<if test="gender != null and gender != ''">gender = #{gender},</if>
|
||||||
<if test="status != null and status != ''">status = #{status},</if>
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
@ -0,0 +1,200 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ics.admin.mapper.MeetingReservationMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ics.admin.domain.MeetingReservation" id="MeetingReservationResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="sn" column="sn"/>
|
||||||
|
<result property="roomId" column="room_id"/>
|
||||||
|
<result property="start" column="start"/>
|
||||||
|
<result property="end" column="end"/>
|
||||||
|
<result property="timeFormat" column="time_format"/>
|
||||||
|
<result property="title" column="title"/>
|
||||||
|
<result property="personNum" column="person_num"/>
|
||||||
|
<result property="leader" column="leader"/>
|
||||||
|
<result property="bookingUserName" column="booking_user_name"/>
|
||||||
|
<result property="bookingUserPhone" column="booking_user_phone"/>
|
||||||
|
<result property="userOrgId" column="user_org_id"/>
|
||||||
|
<result property="userOrg" column="user_org"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="operate" column="operate"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="ext1" column="ext1"/>
|
||||||
|
<result property="ext2" column="ext2"/>
|
||||||
|
<result property="ext3" column="ext3"/>
|
||||||
|
<result property="deleteFlag" column="delete_flag"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="tenantId" column="tenant_id"/>
|
||||||
|
<result property="parkId" column="park_id"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectMeetingReservationVo">
|
||||||
|
SELECT id, sn, room_id, start, `end`, time_format, title, person_num, leader, booking_user_name, booking_user_phone, user_org_id, user_org, status, operate, remark, ext1, ext2, ext3, delete_flag, create_by, create_time, update_by, update_time, tenant_id, park_id FROM ics_meeting_reservation
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMeetingReservationList" parameterType="com.ics.admin.vo.MeetingRecordVo" resultType="com.ics.admin.vo.MeetingRecordVo">
|
||||||
|
SELECT mr.id, sn, room_id, start, `end`, time_format, title, person_num, leader, booking_user_name, booking_user_phone, user_org_id, user_org, status, operate, mr.remark, mr.ext1, mr.ext2, mr.ext3,
|
||||||
|
floor_id, floor, name, type_id, type_name, device, room_num, area, capacity_num, content, enable, room.ext1 roomExt1, room.ext2 roomExt2, room.ext3 roomExt3, room.remark roomRemark
|
||||||
|
from ics_meeting_reservation mr inner join ics_meeting_room room on mr.room_id=room.id
|
||||||
|
<if test="role == 3">
|
||||||
|
inner join ics_meeting_waiter wa on mr.id=wa.rid
|
||||||
|
</if>
|
||||||
|
where
|
||||||
|
mr.delete_flag=0 and room.delete_flag=0
|
||||||
|
<if test="role == 3">
|
||||||
|
and wa.delete_flag=0 and wa.user_id=#{userId}
|
||||||
|
</if>
|
||||||
|
<if test="role == 1">
|
||||||
|
and mr.create_by=#{userId}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="title != null and title != ''"> AND title LIKE CONCAT('%', #{title}, '%')</if>
|
||||||
|
<if test="userOrg != null and userOrg != ''"> AND user_org LIKE CONCAT('%', #{userOrg}, '%')</if>
|
||||||
|
<if test="floor != null and floor != ''"> AND floor = #{floor}</if>
|
||||||
|
<if test="name != null and name != ''"> AND name LIKE CONCAT('%', #{name}, '%')</if>
|
||||||
|
<if test="typeName != null and typeName != ''"> AND type_name = #{typeName}</if>
|
||||||
|
<if test="device != null and device != ''"> AND device LIKE CONCAT('%', #{device}, '%')</if>
|
||||||
|
<if test="capacityNum != null"> AND capacity_num = #{capacityNum}</if>
|
||||||
|
<if test="status != null"> AND status = #{status}</if>
|
||||||
|
<if test="filterDate != null and filterDate != ''"> AND start LIKE CONCAT(#{filterDate}, '%')</if>
|
||||||
|
|
||||||
|
order by start desc,status
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMeetingReservationById" parameterType="Long" resultMap="MeetingReservationResult">
|
||||||
|
<include refid="selectMeetingReservationVo"/>
|
||||||
|
WHERE id = #{id} and delete_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 是否可以预约检测 -->
|
||||||
|
<select id="checkBooking" resultType="Long">
|
||||||
|
<![CDATA[
|
||||||
|
select id from ics_meeting_reservation where delete_flag = 0 and room_id = #{roomId} and status > 3
|
||||||
|
and ((start between #{startTime} and #{endTime}) or (`end` between #{startTime} and #{endTime}) or (start < #{startTime} and `end` > #{endTime}))
|
||||||
|
]]>
|
||||||
|
<if test="id != null">
|
||||||
|
<![CDATA[ and id <> #{id} ]]>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 即将开始的会议预约,开始时间小于2小时预约,只提醒一次 -->
|
||||||
|
<select id="getSoonMeetingReservation" resultMap="MeetingReservationResult">
|
||||||
|
<include refid="selectMeetingReservationVo"/>
|
||||||
|
<![CDATA[
|
||||||
|
WHERE delete_flag = 0 and status=7 and TIMESTAMPDIFF(MINUTE,now(),start) <= 120 and TIMESTAMPDIFF(MINUTE,now(),start) >= 115
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
|
<!-- 审核通过的会议预约变成进行中 -->
|
||||||
|
<update id="goMeetingReservation">
|
||||||
|
<![CDATA[
|
||||||
|
update ics_meeting_reservation set status=9 where delete_flag = 0 and status=7 and TIMESTAMPDIFF(MINUTE,now(),start) <= 1
|
||||||
|
]]>
|
||||||
|
</update>
|
||||||
|
<!-- 进行中会议预约变成结束 -->
|
||||||
|
<update id="endMeetingReservation">
|
||||||
|
<![CDATA[
|
||||||
|
update ics_meeting_reservation set status=11 where delete_flag = 0 and status=9 and TIMESTAMPDIFF(MINUTE,now(),`end`) <= 0
|
||||||
|
]]>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<insert id="insertMeetingReservation" parameterType="MeetingReservation" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
INSERT INTO ics_meeting_reservation
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="sn != null and sn != ''">sn,</if>
|
||||||
|
<if test="roomId != null ">room_id,</if>
|
||||||
|
<if test="start != null ">start,</if>
|
||||||
|
<if test="end != null ">end,</if>
|
||||||
|
<if test="timeFormat != null ">time_format,</if>
|
||||||
|
<if test="title != null and title != ''">title,</if>
|
||||||
|
<if test="personNum != null ">person_num,</if>
|
||||||
|
<if test="leader != null and leader != ''">leader,</if>
|
||||||
|
<if test="bookingUserName != null and bookingUserName != ''">booking_user_name,</if>
|
||||||
|
<if test="bookingUserPhone != null and bookingUserPhone != ''">booking_user_phone,</if>
|
||||||
|
<if test="userOrgId != null ">user_org_id,</if>
|
||||||
|
<if test="userOrg != null and userOrg != ''">user_org,</if>
|
||||||
|
<if test="status != null ">status,</if>
|
||||||
|
<if test="operate != null and operate != ''">operate,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1,</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2,</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3,</if>
|
||||||
|
<if test="deleteFlag != null ">delete_flag,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="tenantId != null ">tenant_id,</if>
|
||||||
|
<if test="parkId != null ">park_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="sn != null and sn != ''">#{sn},</if>
|
||||||
|
<if test="roomId != null ">#{roomId},</if>
|
||||||
|
<if test="start != null ">#{start},</if>
|
||||||
|
<if test="end != null ">#{end},</if>
|
||||||
|
<if test="timeFormat != null ">#{timeFormat},</if>
|
||||||
|
<if test="title != null and title != ''">#{title},</if>
|
||||||
|
<if test="personNum != null ">#{personNum},</if>
|
||||||
|
<if test="leader != null and leader != ''">#{leader},</if>
|
||||||
|
<if test="bookingUserName != null and bookingUserName != ''">#{bookingUserName},</if>
|
||||||
|
<if test="bookingUserPhone != null and bookingUserPhone != ''">#{bookingUserPhone},</if>
|
||||||
|
<if test="userOrgId != null ">#{userOrgId},</if>
|
||||||
|
<if test="userOrg != null and userOrg != ''">#{userOrg},</if>
|
||||||
|
<if test="status != null ">#{status},</if>
|
||||||
|
<if test="operate != null and operate != ''">#{operate},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">#{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">#{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">#{ext3},</if>
|
||||||
|
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="tenantId != null ">#{tenantId},</if>
|
||||||
|
<if test="parkId != null ">#{parkId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateMeetingReservation" parameterType="MeetingReservation">
|
||||||
|
UPDATE ics_meeting_reservation
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="sn != null and sn != ''">sn = #{sn},</if>
|
||||||
|
<if test="roomId != null ">room_id = #{roomId},</if>
|
||||||
|
<if test="start != null ">start = #{start},</if>
|
||||||
|
<if test="end != null ">end = #{end},</if>
|
||||||
|
<if test="timeFormat != null ">time_format = #{timeFormat},</if>
|
||||||
|
<if test="title != null and title != ''">title = #{title},</if>
|
||||||
|
<if test="personNum != null ">person_num = #{personNum},</if>
|
||||||
|
<if test="leader != null and leader != ''">leader = #{leader},</if>
|
||||||
|
<if test="bookingUserName != null and bookingUserName != ''">booking_user_name = #{bookingUserName},</if>
|
||||||
|
<if test="bookingUserPhone != null and bookingUserPhone != ''">booking_user_phone = #{bookingUserPhone},</if>
|
||||||
|
<if test="userOrgId != null ">user_org_id = #{userOrgId},</if>
|
||||||
|
<if test="userOrg != null and userOrg != ''">user_org = #{userOrg},</if>
|
||||||
|
<if test="status != null ">status = #{status},</if>
|
||||||
|
<if test="operate != null and operate != ''">operate = #{operate},</if>
|
||||||
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1 = #{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2 = #{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3 = #{ext3},</if>
|
||||||
|
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null ">tenant_id = #{tenantId},</if>
|
||||||
|
<if test="parkId != null ">park_id = #{parkId},</if>
|
||||||
|
</trim>
|
||||||
|
WHERE id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteMeetingReservationById" parameterType="Long">
|
||||||
|
DELETE FROM ics_meeting_reservation WHERE id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteMeetingReservationByIds" parameterType="String">
|
||||||
|
DELETE FROM ics_meeting_reservation where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,146 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ics.admin.mapper.MeetingRoomMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ics.admin.domain.MeetingRoom" id="MeetingRoomResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="floorId" column="floor_id"/>
|
||||||
|
<result property="floor" column="floor"/>
|
||||||
|
<result property="name" column="name"/>
|
||||||
|
<result property="typeId" column="type_id"/>
|
||||||
|
<result property="typeName" column="type_name"/>
|
||||||
|
<result property="device" column="device"/>
|
||||||
|
<result property="roomNum" column="room_num"/>
|
||||||
|
<result property="area" column="area"/>
|
||||||
|
<result property="capacityNum" column="capacity_num"/>
|
||||||
|
<result property="content" column="content"/>
|
||||||
|
<result property="enable" column="enable"/>
|
||||||
|
<result property="ext1" column="ext1"/>
|
||||||
|
<result property="ext2" column="ext2"/>
|
||||||
|
<result property="ext3" column="ext3"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="deleteFlag" column="delete_flag"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="tenantId" column="tenant_id"/>
|
||||||
|
<result property="parkId" column="park_id"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectMeetingRoomVo">
|
||||||
|
SELECT id, floor_id, floor, name, type_id, type_name, device, room_num, area, capacity_num, content, enable, ext1, ext2, ext3, remark, delete_flag, create_by, create_time, update_by, update_time, tenant_id, park_id FROM ics_meeting_room
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMeetingRoomList" parameterType="MeetingRoom" resultMap="MeetingRoomResult">
|
||||||
|
<include refid="selectMeetingRoomVo"/>
|
||||||
|
<where>
|
||||||
|
delete_flag=0
|
||||||
|
<if test="floor != null and floor != ''"> AND floor = #{floor}</if>
|
||||||
|
<if test="name != null and name != ''"> AND name LIKE CONCAT('%', #{name}, '%')</if>
|
||||||
|
<if test="typeName != null and typeName != ''"> AND type_name = #{typeName}</if>
|
||||||
|
<if test="device != null and device != ''"> AND device LIKE CONCAT('%', #{device}, '%')</if>
|
||||||
|
<if test="capacityNum != null"> AND capacity_num = #{capacityNum}</if>
|
||||||
|
</where>
|
||||||
|
order by id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMeetingRoomById" parameterType="Long" resultType="com.ics.admin.vo.MeetingRoomVo">
|
||||||
|
<include refid="selectMeetingRoomVo"/>
|
||||||
|
WHERE id = #{id} and delete_flag=0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 获取会议室不重复排好序的容纳人数 -->
|
||||||
|
<select id="getCapacityNum" resultType="Long">
|
||||||
|
select capacity_num from ics_meeting_room where delete_flag=0 group by capacity_num order by capacity_num
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertMeetingRoom" parameterType="MeetingRoom" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
INSERT INTO ics_meeting_room
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="floorId != null and floorId != ''">floor_id,</if>
|
||||||
|
<if test="floor != null and floor != ''">floor,</if>
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="typeId != null and typeId != ''">type_id,</if>
|
||||||
|
<if test="typeName != null and typeName != ''">type_name,</if>
|
||||||
|
<if test="device != null and device != ''">device,</if>
|
||||||
|
<if test="roomNum != null and roomNum != ''">room_num,</if>
|
||||||
|
<if test="area != null and area != ''">area,</if>
|
||||||
|
<if test="capacityNum != null and capacityNum != ''">capacity_num,</if>
|
||||||
|
<if test="content != null and content != ''">content,</if>
|
||||||
|
<if test="enable != null ">enable,</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1,</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2,</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="deleteFlag != null ">delete_flag,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="tenantId != null ">tenant_id,</if>
|
||||||
|
<if test="parkId != null ">park_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="floorId != null and floorId != ''">#{floorId},</if>
|
||||||
|
<if test="floor != null and floor != ''">#{floor},</if>
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="typeId != null and typeId != ''">#{typeId},</if>
|
||||||
|
<if test="typeName != null and typeName != ''">#{typeName},</if>
|
||||||
|
<if test="device != null and device != ''">#{device},</if>
|
||||||
|
<if test="roomNum != null and roomNum != ''">#{roomNum},</if>
|
||||||
|
<if test="area != null and area != ''">#{area},</if>
|
||||||
|
<if test="capacityNum != null and capacityNum != ''">#{capacityNum},</if>
|
||||||
|
<if test="content != null and content != ''">#{content},</if>
|
||||||
|
<if test="enable != null ">#{enable},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">#{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">#{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">#{ext3},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="tenantId != null ">#{tenantId},</if>
|
||||||
|
<if test="parkId != null ">#{parkId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateMeetingRoom" parameterType="MeetingRoom">
|
||||||
|
UPDATE ics_meeting_room
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="floorId != null and floorId != ''">floor_id = #{floorId},</if>
|
||||||
|
<if test="floor != null and floor != ''">floor = #{floor},</if>
|
||||||
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="typeId != null and typeId != ''">type_id = #{typeId},</if>
|
||||||
|
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
|
||||||
|
<if test="device != null and device != ''">device = #{device},</if>
|
||||||
|
<if test="roomNum != null and roomNum != ''">room_num = #{roomNum},</if>
|
||||||
|
<if test="area != null and area != ''">area = #{area},</if>
|
||||||
|
<if test="capacityNum != null and capacityNum != ''">capacity_num = #{capacityNum},</if>
|
||||||
|
<if test="content != null and content != ''">content = #{content},</if>
|
||||||
|
<if test="enable != null ">enable = #{enable},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1 = #{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2 = #{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3 = #{ext3},</if>
|
||||||
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||||
|
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null ">tenant_id = #{tenantId},</if>
|
||||||
|
<if test="parkId != null ">park_id = #{parkId},</if>
|
||||||
|
</trim>
|
||||||
|
WHERE id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteMeetingRoomById" parameterType="Long">
|
||||||
|
DELETE FROM ics_meeting_room WHERE id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteMeetingRoomByIds" parameterType="String">
|
||||||
|
DELETE FROM ics_meeting_room where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ics.admin.mapper.MeetingServeMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ics.admin.domain.MeetingServe" id="MeetingServeResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="rid" column="rid"/>
|
||||||
|
<result property="name" column="name"/>
|
||||||
|
<result property="value" column="value"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="deleteFlag" column="delete_flag"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="tenantId" column="tenant_id"/>
|
||||||
|
<result property="parkId" column="park_id"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 批量插入数据 -->
|
||||||
|
<insert id="batchInsert">
|
||||||
|
INSERT INTO ics_meeting_serve(rid, name, value, remark, delete_flag, create_by, create_time)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
|
(#{item.rid}, #{item.name},#{item.value},#{item.remark},#{item.deleteFlag},#{item.createBy},#{item.createTime})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 根据预约记录查询服务事项 -->
|
||||||
|
<select id="selectMeetingServeList" parameterType="Long" resultType="com.ics.admin.vo.MeetingServeVo">
|
||||||
|
SELECT rid, name, value, remark
|
||||||
|
from ics_meeting_serve
|
||||||
|
where rid= #{rid} and delete_flag=0
|
||||||
|
order by id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 删除会议预约的服务事项 -->
|
||||||
|
<delete id="deleteByRid" parameterType="Long">
|
||||||
|
DELETE FROM ics_meeting_serve WHERE rid = #{rid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,128 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ics.admin.mapper.MeetingUtoMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ics.admin.domain.MeetingUto" id="MeetingUtoResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="orgId" column="org_id"/>
|
||||||
|
<result property="orgName" column="org_name"/>
|
||||||
|
<result property="userName" column="user_name"/>
|
||||||
|
<result property="loginName" column="login_name"/>
|
||||||
|
<result property="password" column="password"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="ext1" column="ext1"/>
|
||||||
|
<result property="ext2" column="ext2"/>
|
||||||
|
<result property="ext3" column="ext3"/>
|
||||||
|
<result property="deleteFlag" column="delete_flag"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="tenantId" column="tenant_id"/>
|
||||||
|
<result property="parkId" column="park_id"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectMeetingUtoVo">
|
||||||
|
SELECT id, org_id, org_name, user_name, login_name, password, remark, ext1, ext2, ext3, delete_flag, create_by, create_time, update_by, update_time, tenant_id, park_id FROM ics_meeting_uto
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMeetingUtoList" parameterType="MeetingUto" resultMap="MeetingUtoResult">
|
||||||
|
<include refid="selectMeetingUtoVo"/>
|
||||||
|
where delete_flag=0
|
||||||
|
<if test="orgName != null and orgName != ''"> AND org_name LIKE CONCAT('%', #{orgName}, '%')</if>
|
||||||
|
<if test="userName != null and userName != ''"> AND user_name LIKE CONCAT('%', #{userName}, '%')</if>
|
||||||
|
<if test="loginName != null and loginName != ''"> AND login_name LIKE CONCAT('%', #{loginName}, '%')</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="checkLoginName" parameterType="MeetingUto" resultMap="MeetingUtoResult">
|
||||||
|
<include refid="selectMeetingUtoVo"/>
|
||||||
|
where delete_flag=0 and login_name=#{loginName}
|
||||||
|
<if test="id != null"> AND id <> #{id}</if>
|
||||||
|
</select>
|
||||||
|
<select id="checkOrgId" parameterType="MeetingUto" resultMap="MeetingUtoResult">
|
||||||
|
<include refid="selectMeetingUtoVo"/>
|
||||||
|
where delete_flag=0 and org_id=#{orgId} and org_name <> #{orgName}
|
||||||
|
<if test="id != null"> AND id <> #{id}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="login" parameterType="MeetingUto" resultMap="MeetingUtoResult">
|
||||||
|
<include refid="selectMeetingUtoVo"/>
|
||||||
|
where delete_flag=0 and login_name=#{loginName} and password = #{password}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMeetingUtoById" parameterType="Long" resultMap="MeetingUtoResult">
|
||||||
|
<include refid="selectMeetingUtoVo"/>
|
||||||
|
WHERE id = #{id} and delete_flag=0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertMeetingUto" parameterType="MeetingUto" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
INSERT INTO ics_meeting_uto
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orgId != null ">org_id,</if>
|
||||||
|
<if test="orgName != null and orgName != ''">org_name,</if>
|
||||||
|
<if test="userName != null and userName != ''">user_name,</if>
|
||||||
|
<if test="loginName != null and loginName != ''">login_name,</if>
|
||||||
|
<if test="password != null and password != ''">password,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1,</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2,</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3,</if>
|
||||||
|
<if test="deleteFlag != null ">delete_flag,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="tenantId != null ">tenant_id,</if>
|
||||||
|
<if test="parkId != null ">park_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orgId != null ">#{orgId},</if>
|
||||||
|
<if test="orgName != null and orgName != ''">#{orgName},</if>
|
||||||
|
<if test="userName != null and userName != ''">#{userName},</if>
|
||||||
|
<if test="loginName != null and loginName != ''">#{loginName},</if>
|
||||||
|
<if test="password != null and password != ''">#{password},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">#{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">#{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">#{ext3},</if>
|
||||||
|
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="tenantId != null ">#{tenantId},</if>
|
||||||
|
<if test="parkId != null ">#{parkId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateMeetingUto" parameterType="MeetingUto">
|
||||||
|
UPDATE ics_meeting_uto
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="orgId != null ">org_id = #{orgId},</if>
|
||||||
|
<if test="orgName != null and orgName != ''">org_name = #{orgName},</if>
|
||||||
|
<if test="userName != null ">user_name = #{userName},</if>
|
||||||
|
<if test="loginName != null ">login_name = #{loginName},</if>
|
||||||
|
<if test="password != null and password != ''">password = #{password},</if>
|
||||||
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||||
|
<if test="ext1 != null and ext1 != ''">ext1 = #{ext1},</if>
|
||||||
|
<if test="ext2 != null and ext2 != ''">ext2 = #{ext2},</if>
|
||||||
|
<if test="ext3 != null and ext3 != ''">ext3 = #{ext3},</if>
|
||||||
|
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||||
|
<if test="tenantId != null ">tenant_id = #{tenantId},</if>
|
||||||
|
<if test="parkId != null ">park_id = #{parkId},</if>
|
||||||
|
</trim>
|
||||||
|
WHERE id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteMeetingUtoById" parameterType="Long">
|
||||||
|
DELETE FROM ics_meeting_uto WHERE id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteMeetingUtoByIds" parameterType="String">
|
||||||
|
DELETE FROM ics_meeting_uto where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,43 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ics.admin.mapper.MeetingWaiterMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ics.admin.domain.MeetingWaiter" id="MeetingWaiterResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="rid" column="rid"/>
|
||||||
|
<result property="type" column="type"/>
|
||||||
|
<result property="userId" column="user_id"/>
|
||||||
|
<result property="deleteFlag" column="delete_flag"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="tenantId" column="tenant_id"/>
|
||||||
|
<result property="parkId" column="park_id"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 批量插入数据 -->
|
||||||
|
<insert id="batchInsert">
|
||||||
|
INSERT INTO ics_meeting_waiter(rid, type, user_id, delete_flag, create_by, create_time)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
|
(#{item.rid}, #{item.type},#{item.userId},#{item.deleteFlag},#{item.createBy},#{item.createTime})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 根据预约记录查询会务人员 -->
|
||||||
|
<select id="selectMeetingWaiterList" parameterType="Long" resultType="com.ics.admin.vo.MeetingWaiterVo">
|
||||||
|
SELECT wa.rid rid, wa.type type, user_id userId,st.username username,st.mobile phone
|
||||||
|
from ics_meeting_waiter wa left join ics_customer_staff st on wa.user_id=st.id
|
||||||
|
where wa.rid= #{rid} and wa.delete_flag=0 and st.delete_flag=0
|
||||||
|
order by wa.type,wa.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 删除会议预约的会务人员 -->
|
||||||
|
<delete id="deleteByRid" parameterType="Long">
|
||||||
|
DELETE FROM ics_meeting_waiter WHERE rid = #{rid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
@ -129,6 +129,12 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteRemind">
|
||||||
|
<![CDATA[
|
||||||
|
DELETE FROM ics_repair_remind WHERE repair_id = #{id} and type_id = #{typeId}
|
||||||
|
]]>
|
||||||
|
</delete>
|
||||||
|
|
||||||
<select id="getWxPushRepairRemind" parameterType="RepairRemind" resultMap="RepairRemindResult">
|
<select id="getWxPushRepairRemind" parameterType="RepairRemind" resultMap="RepairRemindResult">
|
||||||
<include refid="selectRepairRemindVo"/>
|
<include refid="selectRepairRemindVo"/>
|
||||||
where delete_flag=0 and ext1='1'
|
where delete_flag=0 and ext1='1'
|
||||||
|
@ -25,3 +25,16 @@ repair.remind.floor51=工单《%s》已被维修人员%s退回,需重新派单
|
|||||||
repair.remind.floor111=工单《%s》被定为无效申请,原因是:%s
|
repair.remind.floor111=工单《%s》被定为无效申请,原因是:%s
|
||||||
repair.remind.floorTo=工单《%s》已超时,请尽快处理
|
repair.remind.floorTo=工单《%s》已超时,请尽快处理
|
||||||
repair.remind.floorTr=工单《%s》已严重超时,请尽快处理
|
repair.remind.floorTr=工单《%s》已严重超时,请尽快处理
|
||||||
|
|
||||||
|
#预约人:
|
||||||
|
mr.remind.cu1=您的会议预约《%s》被驳回,原因是:%s。
|
||||||
|
mr.remind.cu2=您的会议预约《%s》已被管理员修改。
|
||||||
|
mr.remind.cu3=您的会议预约《%s》已审核通过。
|
||||||
|
mr.remind.cu4=您的会议预约《%s》即将开始。
|
||||||
|
|
||||||
|
#管理员:
|
||||||
|
mr.remind.mu1=您收到会议预约《%s》待审核。
|
||||||
|
mr.remind.mu2=会议预约《%s》已取消,原因是:%s。
|
||||||
|
|
||||||
|
#会务人员:
|
||||||
|
mr.remind.su1=会议预约《%s》指定您为会务负责人。
|
@ -61,6 +61,12 @@ public class IcsCustomerStaff extends BaseEntity<IcsCustomerStaff> {
|
|||||||
/** 微信公众号openid */
|
/** 微信公众号openid */
|
||||||
private String gzhOpenid;
|
private String gzhOpenid;
|
||||||
|
|
||||||
|
/** 会议室预约角色(1.普通用户, 3.会议服务人员 ,5.会议管理员) */
|
||||||
|
private Integer roomRole;
|
||||||
|
|
||||||
|
/** 当room_role为3时;此时1 表示音控组 3表示 会务服务组 */
|
||||||
|
private Integer roomRoleType;
|
||||||
|
|
||||||
/** 用户头像 */
|
/** 用户头像 */
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.ics.quartz.task;
|
||||||
|
|
||||||
|
import com.ics.admin.service.IMeetingReservationService;
|
||||||
|
import com.ics.common.utils.spring.SpringUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* created at 2024-9-22 13:31
|
||||||
|
*
|
||||||
|
* @author lujiang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service("meetingReservationTask")
|
||||||
|
public class MeetingReservationTask {
|
||||||
|
|
||||||
|
public void meetingRemind() {
|
||||||
|
IMeetingReservationService meetingReservationService = SpringUtils.getBean(IMeetingReservationService.class);
|
||||||
|
meetingReservationService.getSoonMeetingReservation();
|
||||||
|
int r = meetingReservationService.changeMeetingReservation();
|
||||||
|
log.info("已改变" + r + "个会议室预约状态");
|
||||||
|
}
|
||||||
|
}
|
@ -22,9 +22,10 @@ public class MyParkLineHandler implements TenantLineHandler {
|
|||||||
private static final String[] tableList = {"tables", "columns", "sys_tenant", "ics_park", "sys_config", "sys_dict_type", "sys_dict_data", "sys_districts",
|
private static final String[] tableList = {"tables", "columns", "sys_tenant", "ics_park", "sys_config", "sys_dict_type", "sys_dict_data", "sys_districts",
|
||||||
"sys_job", "sys_job_log", "sys_login_info", "sys_menu", "sys_notice", "sys_oper_log", "sys_oss", "sys_role", "sys_role_dept", "sys_role_menu",
|
"sys_job", "sys_job_log", "sys_login_info", "sys_menu", "sys_notice", "sys_oper_log", "sys_oss", "sys_role", "sys_role_dept", "sys_role_menu",
|
||||||
"sys_sn", "sys_user_role", "sys_dept", "ics_customer_contract_room", "ics_park", "ics_apply_room", "ics_customer_contract_refund_room", "ics_apply_park_file",
|
"sys_sn", "sys_user_role", "sys_dept", "ics_customer_contract_room", "ics_park", "ics_apply_room", "ics_customer_contract_refund_room", "ics_apply_park_file",
|
||||||
"ics_apply_settle_file", "ics_apply_move_in_file", "ics_activity","ics_customer_staff","tb_customer_ticket","tb_reservation","tb_reservation_person",
|
"ics_apply_settle_file", "ics_apply_move_in_file", "ics_activity","ics_customer_staff","ics_customer","tb_customer_ticket","tb_reservation","tb_reservation_person",
|
||||||
"tb_room_content","tb_room_item","tb_room_item_by_room","tb_room_serve_by_room","tb_room_serve","tb_equipment","tb_staff_customer",
|
"tb_room_content","tb_room_item","tb_room_item_by_room","tb_room_serve_by_room","tb_room_serve","tb_equipment","tb_staff_customer",
|
||||||
"tb_room_equipment","tb_room_record","tb_room_serve","tb_showroom","tb_showroom_record","tb_ticket","tb_user_equipment","tb_visitor_person","ics_repair","ics_repair_remind","ics_repair_address_floor"
|
"tb_room_equipment","tb_room_record","tb_room_serve","tb_showroom","tb_showroom_record","tb_ticket","tb_user_equipment","tb_visitor_person",
|
||||||
|
"ics_repair","ics_repair_remind","ics_repair_address_floor","ics_meeting_reservation","ics_meeting_room"
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,9 +22,10 @@ public class MyTenantLineHandler implements TenantLineHandler {
|
|||||||
private static final String[] tableList = {"tables", "columns", "sys_tenant", "sys_config", "sys_role", "sys_dict_type", "sys_dict_data", "sys_districts",
|
private static final String[] tableList = {"tables", "columns", "sys_tenant", "sys_config", "sys_role", "sys_dict_type", "sys_dict_data", "sys_districts",
|
||||||
"sys_job", "sys_job_log", "sys_login_info", "sys_menu", "sys_notice", "sys_oper_log", "sys_oss", "sys_role_dept", "sys_role_menu",
|
"sys_job", "sys_job_log", "sys_login_info", "sys_menu", "sys_notice", "sys_oper_log", "sys_oss", "sys_role_dept", "sys_role_menu",
|
||||||
"sys_sn", "sys_user_role", "ics_customer_contract_room", "ics_apply_room", "ics_customer_contract_refund_room", "ics_apply_park_file",
|
"sys_sn", "sys_user_role", "ics_customer_contract_room", "ics_apply_room", "ics_customer_contract_refund_room", "ics_apply_park_file",
|
||||||
"ics_apply_settle_file", "ics_apply_move_in_file", "ics_activity","ics_customer_staff","tb_customer_ticket","tb_reservation","tb_reservation_person",
|
"ics_apply_settle_file", "ics_apply_move_in_file", "ics_activity","ics_customer_staff","ics_customer","tb_customer_ticket","tb_reservation","tb_reservation_person",
|
||||||
"tb_room_content","tb_room_item","tb_room_item_by_room","tb_room_serve_by_room","tb_room_serve","tb_equipment","tb_staff_customer",
|
"tb_room_content","tb_room_item","tb_room_item_by_room","tb_room_serve_by_room","tb_room_serve","tb_equipment","tb_staff_customer",
|
||||||
"tb_room_equipment","tb_room_record","tb_room_serve","tb_showroom","tb_showroom_record","tb_ticket","tb_user_equipment","tb_visitor_person","ics_repair","ics_repair_remind","ics_repair_address_floor"
|
"tb_room_equipment","tb_room_record","tb_room_serve","tb_showroom","tb_showroom_record","tb_ticket","tb_user_equipment","tb_visitor_person",
|
||||||
|
"ics_repair","ics_repair_remind","ics_repair_address_floor","ics_meeting_reservation","ics_meeting_room"
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -287,6 +287,7 @@ public class WxLoginAPIController extends BaseController {
|
|||||||
icsCustomerStaff.setGender("0");
|
icsCustomerStaff.setGender("0");
|
||||||
icsCustomerStaff.setStatus("0");
|
icsCustomerStaff.setStatus("0");
|
||||||
icsCustomerStaff.setDataType("1");
|
icsCustomerStaff.setDataType("1");
|
||||||
|
icsCustomerStaff.setRoomRole(1);
|
||||||
icsCustomerStaff.setOpenid(openid);
|
icsCustomerStaff.setOpenid(openid);
|
||||||
int i = icsCustomerStaffService.insertIcsCustomerStaff(icsCustomerStaff);
|
int i = icsCustomerStaffService.insertIcsCustomerStaff(icsCustomerStaff);
|
||||||
|
|
||||||
|
BIN
shoot-hand/ics/2024/会议预约.eddx
Normal file
BIN
shoot-hand/ics/2024/会议预约.eddx
Normal file
Binary file not shown.
BIN
shoot-hand/ics/2024/会议预约.png
Normal file
BIN
shoot-hand/ics/2024/会议预约.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
Loading…
x
Reference in New Issue
Block a user