mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 07:59:36 +08:00
新增了设备对接的接口和修改了会议室预约的接口
This commit is contained in:
parent
095f33b5f1
commit
0b43e8e013
@ -1,5 +1,7 @@
|
||||
package com.ics.admin.domain.meeting;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
@ -31,8 +33,65 @@ public class Reservation extends BaseEntity<Reservation> {
|
||||
/** 主题(会议主题、展厅主题) */
|
||||
private String title;
|
||||
|
||||
/** 预约状态 */
|
||||
private Integer stauts;
|
||||
@TableField(exist = false)
|
||||
private String statusName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer statusValue;
|
||||
|
||||
/** 预约状态 0待支付,1.已预约,2.进行中,3已结束,4.已取消 */
|
||||
private Status stauts;
|
||||
public enum Status implements IEnum<Integer> {
|
||||
TO_BE_PAID("待支付", 0),
|
||||
|
||||
/**
|
||||
* 报名中
|
||||
*/
|
||||
APPOINTMENT("已预约", 1),
|
||||
|
||||
/**
|
||||
* 活动未开始
|
||||
*/
|
||||
ONGOING("进行中", 2),
|
||||
|
||||
|
||||
/**
|
||||
* 已满额
|
||||
*/
|
||||
ENDED("已结束", 3),
|
||||
|
||||
/**
|
||||
* 已满额
|
||||
*/
|
||||
CANCELED("已取消", 4);
|
||||
|
||||
|
||||
private String name;
|
||||
private int value;
|
||||
|
||||
Status(String name, int value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public static Status parse(Integer value) {
|
||||
for (Status status : values()) {
|
||||
if (status.getValue().equals(value)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** 是否申请售后0否1是 */
|
||||
private String isAfterSale;
|
||||
@ -59,7 +118,7 @@ public class Reservation extends BaseEntity<Reservation> {
|
||||
private String meetingNeedType;
|
||||
|
||||
/** 会议室id */
|
||||
private Long meetingId;
|
||||
// private Long meetingId;
|
||||
|
||||
/** 摄影需求:1需要,0不需要 */
|
||||
private String photographType;
|
||||
@ -68,7 +127,7 @@ public class Reservation extends BaseEntity<Reservation> {
|
||||
private Date startTime;
|
||||
|
||||
/** 预约-结束时间 */
|
||||
// private Date endTime;
|
||||
private Date endDate;
|
||||
|
||||
/** 备注 */
|
||||
private String remake;
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.ics.admin.domain.meeting;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ReservationDTO {
|
||||
|
||||
private Date nowDate;
|
||||
|
||||
private List<Reservation> reservations;
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
package com.ics.admin.service.impl.meeting;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -89,4 +91,52 @@ public class ReservationServiceImpl extends ServiceImpl<ReservationMapper, Reser
|
||||
public int deleteReservationById(Long id) {
|
||||
return reservationMapper.deleteReservationById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean selectFreeMeetingRoom(Reservation reservation) {
|
||||
|
||||
QueryWrapper<Reservation> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper.eq("room_content_id",reservation.getRoomContentId());
|
||||
queryWrapper.gt("start_time",new Date());
|
||||
|
||||
Date startTime = reservation.getStartTime();
|
||||
Date endDate = reservation.getEndDate();
|
||||
List<Reservation> reservations = reservationMapper.selectList(queryWrapper);
|
||||
if (CollUtil.isNotEmpty(reservations)){
|
||||
for (Reservation reservation1 : reservations) {
|
||||
Boolean judge = judge(reservation1.getStartTime(), reservation1.getEndDate(), startTime, endDate);
|
||||
if (judge){
|
||||
return true;
|
||||
}else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* 判断一个时间段是否包含另一个时间段,包含:TRUE,不包含:FALSE
|
||||
*
|
||||
* @param date1
|
||||
* @param date2
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
public static Boolean judge(Date date1, Date date2, Date startTime, Date endTime) {
|
||||
long d1 = date1.getTime();
|
||||
long d2 = date2.getTime();
|
||||
long v = d2 - d1;
|
||||
long start = startTime.getTime();
|
||||
long end = endTime.getTime();
|
||||
if (((d1 - start) <= 0) && ((end - d2) <= 0) || ((d2 - start) >= 0) && ((d1 - end) <= 0)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.ics.admin.service.impl.meeting;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ics.admin.domain.BuildingDetail;
|
||||
import com.ics.admin.domain.Room;
|
||||
import com.ics.admin.domain.meeting.*;
|
||||
import com.ics.admin.mapper.meeting.ReservationMapper;
|
||||
import com.ics.admin.service.IBuildingDetailService;
|
||||
import com.ics.admin.service.IRoomService;
|
||||
import com.ics.admin.service.meeting.*;
|
||||
@ -51,6 +52,9 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
||||
@Autowired
|
||||
private IRoomServeByRoomService iRoomServeByRoomService;
|
||||
|
||||
@Autowired
|
||||
private ReservationMapper reservationMapper;
|
||||
|
||||
/**
|
||||
* 查询房间主体内容
|
||||
*
|
||||
@ -124,7 +128,6 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
||||
// 根据物品查询数据
|
||||
if (CollUtil.isNotEmpty(roomContent.getRoomItemList())){
|
||||
//查询出所有的 roomContent 数据,
|
||||
//然后根据 roomContent.getRoomItemList() 中的数据,进行筛选
|
||||
List<RoomContent> roomContents = roomContentMapper.selectRoomContentList(roomContent);
|
||||
List<RoomItem> roomItemList = roomContent.getRoomItemList();
|
||||
List<Long> collect = roomItemList.stream().map(item -> {
|
||||
@ -250,4 +253,38 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
||||
// 1.会议室类型,2.人数,3.会议室设备,4.形式
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReservationDTO> selectMeetingRoomRecord(Long meetingRoomId) {
|
||||
|
||||
ArrayList<ReservationDTO> list = new ArrayList<>();
|
||||
|
||||
// 根据最近七天查询数据
|
||||
QueryWrapper<Reservation> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("room_content_id",meetingRoomId);
|
||||
queryWrapper.gt("start_time",new Date());
|
||||
queryWrapper.groupBy("start_time");
|
||||
List<Reservation> reservations = reservationMapper.selectList(queryWrapper);
|
||||
List<Date> collect = reservations.stream().map(item -> {
|
||||
return item.getStartTime();
|
||||
}).collect(Collectors.toList());
|
||||
for (Date dateTime : collect) {
|
||||
ReservationDTO reservationDTO = new ReservationDTO();
|
||||
reservationDTO.setNowDate(dateTime);
|
||||
// 查询会议室记录
|
||||
QueryWrapper<Reservation> wrapper = new QueryWrapper<>();
|
||||
String dateStr = dateTime.toString();
|
||||
queryWrapper.eq("room_content_id",meetingRoomId);
|
||||
queryWrapper.gt("start_time",dateStr.split(" ")[0] + " 00:00:00");
|
||||
queryWrapper.lt("start_time",dateStr.split(" ")[0] + " 23:59:59");
|
||||
List<Reservation> reservation = reservationMapper.selectList(wrapper);
|
||||
for (Reservation reservation1 : reservation) {
|
||||
reservation1.setStatusValue(reservation1.getStauts().getValue());
|
||||
reservation1.setStatusName(reservation1.getStauts().getName());
|
||||
}
|
||||
reservationDTO.setReservations(reservation);
|
||||
list.add(reservationDTO);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
@ -58,4 +58,6 @@ public interface IReservationService extends IService<Reservation> {
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteReservationById(Long id);
|
||||
|
||||
boolean selectFreeMeetingRoom(Reservation reservation);
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.ics.admin.service.meeting;
|
||||
|
||||
import com.ics.admin.domain.meeting.Reservation;
|
||||
import com.ics.admin.domain.meeting.ReservationDTO;
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
@ -65,4 +67,6 @@ public interface IRoomContentService extends IService<RoomContent> {
|
||||
RoomContent selectInfoById(Long id);
|
||||
|
||||
Map<String,Object> selectSearchInfoByType(Integer type);
|
||||
|
||||
List<ReservationDTO> selectMeetingRoomRecord(Long meetingRoomId);
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="visitType" column="visit_type" />
|
||||
<result property="explainNeedType" column="explain_need_type" />
|
||||
<result property="meetingNeedType" column="meeting_need_type" />
|
||||
<result property="meetingId" column="meeting_id" />
|
||||
<!-- <result property="meetingId" column="meeting_id" />-->
|
||||
<result property="photographType" column="photograph_type" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="endDate" column="end_date" />
|
||||
<result property="deleteFlag" column="delete_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectReservationVo">
|
||||
SELECT id, room_content_id, user_id, ticket_id, customer_id, title, stauts,serve_id, is_after_sale, oder_number, order_money, cancel_time, cancel_resaon, visit_type, explain_need_type, meeting_need_type, meeting_id, photograph_type, start_time, end_time, delete_flag, create_by, create_time, update_by, update_time, remake FROM tb_reservation
|
||||
SELECT id, room_content_id, user_id, ticket_id, customer_id, title, stauts,serve_id,end_date, is_after_sale, oder_number, order_money, cancel_time, cancel_resaon, visit_type, explain_need_type, meeting_need_type, photograph_type, start_time, end_time, delete_flag, create_by, create_time, update_by, update_time, remake FROM tb_reservation
|
||||
</sql>
|
||||
|
||||
<select id="selectReservationList" parameterType="Reservation" resultMap="ReservationResult">
|
||||
@ -67,10 +67,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="visitType != null and visitType != ''">visit_type,</if>
|
||||
<if test="explainNeedType != null and explainNeedType != ''">explain_need_type,</if>
|
||||
<if test="meetingNeedType != null and meetingNeedType != ''">meeting_need_type,</if>
|
||||
<if test="meetingId != null ">meeting_id,</if>
|
||||
-- <if test="meetingId != null ">meeting_id,</if>
|
||||
<if test="photographType != null and photographType != ''">photograph_type,</if>
|
||||
<if test="startTime != null ">start_time,</if>
|
||||
<if test="endTime != null ">end_time,</if>
|
||||
<if test="endDate != null ">end_date,</if>
|
||||
<if test="deleteFlag != null ">delete_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
@ -95,10 +95,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="visitType != null and visitType != ''">#{visitType},</if>
|
||||
<if test="explainNeedType != null and explainNeedType != ''">#{explainNeedType},</if>
|
||||
<if test="meetingNeedType != null and meetingNeedType != ''">#{meetingNeedType},</if>
|
||||
<if test="meetingId != null ">#{meetingId},</if>
|
||||
-- <if test="meetingId != null ">#{meetingId},</if>
|
||||
<if test="photographType != null and photographType != ''">#{photographType},</if>
|
||||
<if test="startTime != null ">#{startTime},</if>
|
||||
<if test="endTime != null ">#{endTime},</if>
|
||||
<if test="endDate != null ">#{endDate},</if>
|
||||
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
@ -126,10 +126,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="visitType != null and visitType != ''">visit_type = #{visitType},</if>
|
||||
<if test="explainNeedType != null and explainNeedType != ''">explain_need_type = #{explainNeedType},</if>
|
||||
<if test="meetingNeedType != null and meetingNeedType != ''">meeting_need_type = #{meetingNeedType},</if>
|
||||
<if test="meetingId != null ">meeting_id = #{meetingId},</if>
|
||||
-- <if test="meetingId != null ">meeting_id = #{meetingId},</if>
|
||||
<if test="photographType != null and photographType != ''">photograph_type = #{photographType},</if>
|
||||
<if test="startTime != null ">start_time = #{startTime},</if>
|
||||
<if test="endTime != null ">end_time = #{endTime},</if>
|
||||
<if test="endDate != null ">end_date = #{endDate},</if>
|
||||
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.ics.common.core.domain.dto;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DevicePersonDto {
|
||||
private String personId;
|
||||
private String name;
|
||||
private String workId;
|
||||
private String gender;
|
||||
private String age;
|
||||
private String certificateType;
|
||||
private String certificateNumber;
|
||||
private String phone;
|
||||
private String address;
|
||||
private String email;
|
||||
private String qrcode;
|
||||
private String comment;
|
||||
private String personType;
|
||||
private String visitorValidStartTime;//访客有效开始时间
|
||||
private String visitorValidEndTime;//访客有效结束时间
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ics.common.core.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DevicePersonsDto {
|
||||
|
||||
private List<DevicePersonDto> persons;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ics.common.core.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FacesDto {
|
||||
|
||||
private String faceId;
|
||||
private String data;
|
||||
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
package com.ics.common.utils;
|
||||
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ics.common.core.domain.dto.DevicePersonDto;
|
||||
import com.ics.common.core.domain.dto.DevicePersonsDto;
|
||||
import com.ics.common.json.JsonUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DeviceUtils {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DeviceUtils.class);
|
||||
private final static String DEVICE_IP = "http://192.168.0.12:80";
|
||||
|
||||
/**
|
||||
* 门禁设备信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDeviceInfo() {
|
||||
String url = DEVICE_IP + "/api/tmzz/v2/getDeviceInfo";
|
||||
|
||||
String msg = HttpUtil.post(url,"");
|
||||
log.info("门禁设备信息:{}", msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
/**
|
||||
*设置激活状态
|
||||
*
|
||||
*/
|
||||
|
||||
public static String setActive() {
|
||||
String url = DEVICE_IP + "/api/tmzz/v2/setActive";
|
||||
|
||||
|
||||
JSONObject param = JSONUtil.createObj();
|
||||
// "username":"21232f297a57a5a743894a0e4a801fc3",
|
||||
// "password":"0192023a7bbd73250516f069df18b500"
|
||||
param.put("username", "21232f297a57a5a743894a0e4a801fc3");
|
||||
param.put("password", "0192023a7bbd73250516f069df18b500");
|
||||
|
||||
String msg = HttpUtil.post(url,param.toString());
|
||||
log.info("门禁设备信息:{}", msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备激活状态
|
||||
*/
|
||||
public static String getActive() {
|
||||
String url = DEVICE_IP + "/api/tmzz/v2/getActive";
|
||||
|
||||
String msg = HttpUtil.post(url,"");
|
||||
log.info("门禁设备信息:{}", msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
/**
|
||||
*设备新增人员
|
||||
*
|
||||
* {
|
||||
* "persons":[
|
||||
* {
|
||||
* "personId":"010",
|
||||
* "name":"张三",
|
||||
* "workId":"001",
|
||||
* "gender":"male",
|
||||
* "age":30,
|
||||
* "certificateType":111,
|
||||
* "certificateNumber":"12345678910",
|
||||
* "phone":"13800000000",
|
||||
* "email":"test@qq.com",
|
||||
* "address":"中国上海某街道办",
|
||||
* "personType":"staff",
|
||||
* "visitorValidStartTime":"2022-01-01T10:53:57
|
||||
* ",
|
||||
* "visitorValidEndTime":"2022-01-30T10:54:00",
|
||||
* "comment":"已调到事业一部",
|
||||
* "qrcode":"1122336",
|
||||
* "faces":[
|
||||
* {
|
||||
* "faceId":"001",
|
||||
* "data":"data:image/jpeg;base
|
||||
* 64,/9j/4AAQSkZJRgABAQEAYABgAADfoaT7K/AG2rWoA"//示例中的照片 base64 为
|
||||
* 不完整数据
|
||||
* }
|
||||
* ],
|
||||
* "accessInfo":{
|
||||
* "cardNum":"779437058",
|
||||
* "cardValidStartTime":"2022-01-01T10:
|
||||
* 53:36",
|
||||
* "cardValidEndTime":"2022-01-30T10:5
|
||||
* 3:39"
|
||||
* }
|
||||
* },
|
||||
* {
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
public static String addPersons() {
|
||||
String url = DEVICE_IP + "/api/viso/v2/addPersons";
|
||||
ArrayList<DevicePersonDto> dtos = new ArrayList<>();
|
||||
DevicePersonsDto devicePersonDto = new DevicePersonsDto();
|
||||
DevicePersonDto dto = new DevicePersonDto();
|
||||
dto.setPersonId("010");
|
||||
dto.setName("张三");
|
||||
dto.setWorkId("001");
|
||||
dto.setGender("male");
|
||||
dto.setAge("30");
|
||||
dtos.add(dto);
|
||||
devicePersonDto.setPersons(dtos);
|
||||
String json = JsonUtils.toJson(devicePersonDto);
|
||||
System.out.println(json);
|
||||
System.out.println(url);
|
||||
String msg = HttpUtil.post(url,json);
|
||||
log.info("设备新增人员:{}", msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
String s = addPersons();
|
||||
|
||||
// List<DateTime> dateTimes = DateUtil.rangeToList(DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(offset), DateField.DAY_OF_MONTH);
|
||||
//
|
||||
// System.out.println(dateTimes);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,15 +1,9 @@
|
||||
package com.ics.controller.mobile.meeting;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ics.admin.domain.meeting.CustomerTicket;
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.ics.admin.domain.meeting.RoomItem;
|
||||
import com.ics.admin.domain.meeting.RoomItemByRoom;
|
||||
import com.ics.admin.domain.meeting.*;
|
||||
import com.ics.admin.service.IRoomService;
|
||||
import com.ics.admin.service.meeting.ICustomerTicketService;
|
||||
import com.ics.admin.service.meeting.IRoomContentService;
|
||||
import com.ics.admin.service.meeting.IRoomItemByRoomService;
|
||||
import com.ics.admin.service.meeting.IRoomItemService;
|
||||
import com.ics.admin.service.meeting.*;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.common.core.domain.R;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
@ -31,6 +25,9 @@ public class ApiRoomContentController extends BaseController {
|
||||
@Autowired
|
||||
private ICustomerTicketService customerTicketService;
|
||||
|
||||
@Autowired
|
||||
private IReservationService reservationService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询条件筛选
|
||||
@ -80,6 +77,29 @@ public class ApiRoomContentController extends BaseController {
|
||||
* 展示会议列表,当天会议室的预约时间
|
||||
*/
|
||||
|
||||
@GetMapping("/getMeetingRoomRecord/{meetingRoomId}")
|
||||
public R getMeetingRoomRecord(@PathVariable("meetingRoomId") Long meetingRoomId) {
|
||||
//根据用户获取对应的企业id,查询该企业下对应的优惠卷
|
||||
// meetingRoomId
|
||||
List<ReservationDTO> reservationList = roomContentService.selectMeetingRoomRecord(meetingRoomId);
|
||||
|
||||
return R.ok().put("data",reservationList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询空闲的会议室
|
||||
* @param reservation
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/selectFreeMeetingRoom")
|
||||
public R selectFreeMeetingRoom(@RequestBody Reservation reservation) {
|
||||
|
||||
boolean count =reservationService.selectFreeMeetingRoom(reservation);
|
||||
|
||||
String msg =count?"会议室不可用":"会议室可用";
|
||||
return R.ok().put("count",count).put("msg",msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user