mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 14:49:37 +08:00
会议室预约限制过去的时间不能预约,会议室筛选人数
This commit is contained in:
parent
dcad6d4643
commit
18b4216a50
@ -173,6 +173,7 @@ public class MeetingReservationController extends BaseController {
|
||||
meetingReservation.getParams().put("endTime",end);//根据上、下午、晚上,确定具体时间
|
||||
}
|
||||
if (meetingReservation.getEnd().getTime() <= meetingReservation.getStart().getTime()) return R.error("预约时间无效");
|
||||
if (meetingReservation.getStart().getTime() <= new Date().getTime()) return R.error("已逝去的时间不能被预约");
|
||||
Long userId = getLoginStaffId();
|
||||
String result = meetingReservationService.insertMeetingReservation(userId, meetingReservation, meetingReservationDTO.getServe());
|
||||
if (IMeetingReservationService.OK.equals(result)) {
|
||||
@ -243,6 +244,7 @@ public class MeetingReservationController extends BaseController {
|
||||
if (meetingReservation.getStart() == null || meetingReservation.getEnd() == null)
|
||||
return R.error("预约时间解析错误");//防止用户端置空预约记录时间
|
||||
if (meetingReservation.getEnd().getTime() <= meetingReservation.getStart().getTime()) return R.error("预约时间无效");
|
||||
if (meetingReservation.getStart().getTime() <= new Date().getTime()) return R.error("已逝去的时间不能被预约");
|
||||
String result = meetingReservationService.updateMeetingReservation(userId, meetingReservation, meetingReservationDTO.getServe());
|
||||
if (IMeetingReservationService.OK.equals(result)) {
|
||||
return R.ok("操作成功");
|
||||
@ -276,6 +278,8 @@ public class MeetingReservationController extends BaseController {
|
||||
meetingReservation.setEnd(meetingReservationDTO.getMr().getEnd());
|
||||
meetingReservation.setTimeFormat(0);
|
||||
meetingReservation.setTitle("占用");
|
||||
if (meetingReservation.getEnd().getTime() <= meetingReservation.getStart().getTime()) return R.error("预约时间无效");
|
||||
if (meetingReservation.getStart().getTime() <= new Date().getTime()) return R.error("已逝去的时间不能被预约");
|
||||
String result = meetingReservationService.beforehand(userId, meetingReservation);
|
||||
if (IMeetingReservationService.OK.equals(result)) {
|
||||
return R.ok("占用成功");
|
||||
|
@ -53,10 +53,12 @@
|
||||
<if test="floor != null and floor != ''"> AND room.floor = #{floor}</if>
|
||||
<if test="name != null and name != ''"> AND room.name LIKE CONCAT('%', #{name}, '%')</if>
|
||||
<if test="typeName != null and typeName != ''"> AND room.type_name = #{typeName}</if>
|
||||
<foreach item="dev" collection="devices">
|
||||
<if test="devices != null">
|
||||
<foreach item="dev" collection="devices">
|
||||
AND device LIKE CONCAT('%', #{dev}, '%')
|
||||
</foreach>
|
||||
<if test="capacityNum != null"> AND room.capacity_num = #{capacityNum}</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="capacityNum != null"> AND room.capacity_num <= #{capacityNum}</if>
|
||||
order by room_num
|
||||
</select>
|
||||
|
||||
@ -91,7 +93,7 @@
|
||||
<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 room.device LIKE CONCAT('%', #{device}, '%')</if>
|
||||
<if test="capacityNum != null"> AND capacity_num = #{capacityNum}</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
|
||||
|
Loading…
x
Reference in New Issue
Block a user