mirror of
https://gitee.com/elegant_wings/xiongan-meeting.git
synced 2025-06-21 09:39:37 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
be8fd20bc5
@ -0,0 +1,76 @@
|
||||
package com.ics.admin.controller.meeting;
|
||||
|
||||
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.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.admin.domain.meeting.ReservationPerson;
|
||||
import com.ics.admin.service.meeting.IReservationPersonService;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* 预约参观人员 提供者
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-03-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("person")
|
||||
public class ReservationPersonController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IReservationPersonService reservationPersonService;
|
||||
|
||||
/**
|
||||
* 查询预约参观人员
|
||||
*/
|
||||
@GetMapping("get/{id}")
|
||||
public ReservationPerson get(@PathVariable("id") Long id) {
|
||||
return reservationPersonService.selectReservationPersonById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询预约参观人员列表
|
||||
*/
|
||||
@RequiresPermissions("meeting:person:list")
|
||||
@GetMapping("list")
|
||||
public R list(ReservationPerson reservationPerson) {
|
||||
startPage();
|
||||
return result(reservationPersonService.selectReservationPersonList(reservationPerson));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增保存预约参观人员
|
||||
*/
|
||||
@RequiresPermissions("meeting:person:add")
|
||||
@PostMapping("save")
|
||||
public R addSave(@RequestBody ReservationPerson reservationPerson) {
|
||||
return toAjax(reservationPersonService.insertReservationPerson(reservationPerson));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存预约参观人员
|
||||
*/
|
||||
@RequiresPermissions("meeting:person:edit")
|
||||
@PostMapping("update")
|
||||
public R editSave(@RequestBody ReservationPerson reservationPerson) {
|
||||
return toAjax(reservationPersonService.updateReservationPerson(reservationPerson));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除预约参观人员
|
||||
*/
|
||||
@RequiresPermissions("meeting:person:remove")
|
||||
@PostMapping("remove")
|
||||
public R remove(String ids) {
|
||||
return toAjax(reservationPersonService.deleteReservationPersonByIds(ids));
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +1,15 @@
|
||||
package com.ics.admin.controller.meeting;
|
||||
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.ics.admin.domain.BuildingDetail;
|
||||
import com.ics.admin.domain.Room;
|
||||
import com.ics.admin.domain.meeting.*;
|
||||
import com.ics.admin.service.IBuildingDetailService;
|
||||
import com.ics.admin.service.IRoomService;
|
||||
import com.ics.admin.service.meeting.IRoomContentService;
|
||||
import com.ics.admin.service.meeting.IRoomItemByRoomService;
|
||||
import com.ics.admin.service.meeting.IRoomServeByRoomService;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@ -15,9 +22,11 @@ import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.ics.admin.service.meeting.IRoomContentService;
|
||||
import org.wf.jwtp.annotation.Ignore;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 房间主体内容 提供者
|
||||
@ -32,12 +41,35 @@ public class RoomContentController extends BaseController {
|
||||
@Autowired
|
||||
private IRoomContentService roomContentService;
|
||||
|
||||
@Autowired
|
||||
private IRoomServeByRoomService roomServeByRoomService;
|
||||
|
||||
@Autowired
|
||||
private IRoomItemByRoomService roomItemByRoomService;
|
||||
|
||||
@Autowired
|
||||
private IBuildingDetailService buildingDetailService;
|
||||
|
||||
@Autowired
|
||||
private IRoomService roomService;
|
||||
/**
|
||||
* 查询房间主体内容
|
||||
*/
|
||||
@Ignore
|
||||
@GetMapping("get/{id}")
|
||||
public RoomContent get(@PathVariable("id") Long id) {
|
||||
return roomContentService.selectRoomContentById(id);
|
||||
RoomContent roomContent = roomContentService.selectRoomContentById(id);
|
||||
roomContent.setTypeName(roomContent.getType().getName());
|
||||
roomContent.setTypeValue(roomContent.getType().getValue());
|
||||
Long roomId = roomContent.getRoomId();
|
||||
Room room = roomService.selectRoomById(roomId);
|
||||
roomContent.setBuildId(room.getBuildingId().toString());
|
||||
roomContent.setArea(room.getArea());
|
||||
roomContent.setRoomName(room.getName());
|
||||
BuildingDetail buildingDetail = buildingDetailService.selectBuildingDetailById(room.getBuildingDetailId());
|
||||
roomContent.setBuildingName(buildingDetail.getFloorName());
|
||||
|
||||
return roomContent;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -49,19 +81,29 @@ public class RoomContentController extends BaseController {
|
||||
startPage();
|
||||
List<RoomContent> roomContents = roomContentService.selectRoomContentList(roomContent);
|
||||
for (RoomContent content : roomContents) {
|
||||
RoomServeByRoom roomServeByRoom = new RoomServeByRoom();
|
||||
roomServeByRoom.setRomeContentId(content.getId());
|
||||
List<RoomServeByRoom> serveByRooms = roomServeByRoomService.selectRoomServeByRoomList(roomServeByRoom);
|
||||
content.setServeCount(serveByRooms.size());
|
||||
|
||||
RoomItemByRoom roomItemByRoom = new RoomItemByRoom();
|
||||
roomItemByRoom.setRoomContentId(content.getId());
|
||||
List<RoomItemByRoom> roomItemByRooms = roomItemByRoomService.selectRoomItemByRoomList(roomItemByRoom);
|
||||
content.setItemCount(roomItemByRooms.size());
|
||||
|
||||
content.setTypeValue(content.getType().getValue());
|
||||
content.setTypeName(content.getType().getName());
|
||||
}
|
||||
return result(roomContents);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增保存房间主体内容
|
||||
*/
|
||||
@RequiresPermissions("meeting:roomContent:add")
|
||||
@PostMapping("save")
|
||||
public R addSave(@RequestBody RoomContent roomContent) {
|
||||
System.out.println(roomContent);
|
||||
return toAjax(roomContentService.insertRoomContent(roomContent));
|
||||
}
|
||||
|
||||
@ -83,4 +125,75 @@ public class RoomContentController extends BaseController {
|
||||
return toAjax(roomContentService.deleteRoomContentByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@GetMapping("/searchInfo/{type}")
|
||||
public R searchInfo(@PathVariable("type") Integer type) {
|
||||
// 1.会议室类型,2.人数,3.会议室设备,4.形式
|
||||
|
||||
Map<String, Object> map = roomContentService.selectSearchInfoByType(type);
|
||||
return R.ok(map);
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@PostMapping("/addRoomServe")
|
||||
public R addRoomServe(@RequestBody RoomServeByRoom roomServeByRoom) {
|
||||
// 1.会议室类型,2.人数,3.会议室设备,4.形式
|
||||
|
||||
int count = roomContentService.roomServeByRoom(roomServeByRoom);
|
||||
return toAjax(count);
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@PostMapping("/addRoomItem")
|
||||
public R addItemServe(@RequestBody RoomItemByRoom roomItemByRoom) {
|
||||
// 1.会议室类型,2.人数,3.会议室设备,4.形式
|
||||
|
||||
int count = roomContentService.addItemServe(roomItemByRoom);
|
||||
return toAjax(count);
|
||||
}
|
||||
|
||||
//根据会议查询服务
|
||||
@Ignore
|
||||
@PostMapping("/selectRoomServeByRoom")
|
||||
public R selectRoomServeByRoom(@RequestBody RoomServeByRoom roomServeByRoom) {
|
||||
// 1.会议室类型,2.人数,3.会议室设备,4.形式
|
||||
List<RoomServeByRoom> roomServeByRooms = roomServeByRoomService.selectRoomServeByRoomList(roomServeByRoom);
|
||||
return R.ok().put("data",roomServeByRooms);
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@PostMapping("/selectRoomItemByRoom")
|
||||
public R selectRoomItemByRoom(@RequestBody RoomItemByRoom roomItemByRoom) {
|
||||
// 1.会议室类型,2.人数,3.会议室设备,4.形式
|
||||
List<RoomItemByRoom> roomItemByRooms = roomItemByRoomService.selectRoomItemByRoomList(roomItemByRoom);
|
||||
return R.ok().put("data",roomItemByRooms);
|
||||
}
|
||||
|
||||
/**
|
||||
* 所属楼层
|
||||
*/
|
||||
|
||||
@Ignore
|
||||
@GetMapping("/getFloorList")
|
||||
public R list(BuildingDetail buildingDetail) {
|
||||
buildingDetail.setBuildingId(165L);
|
||||
return R.ok().put("data",buildingDetailService.selectBuildingDetailList(buildingDetail));
|
||||
}
|
||||
|
||||
|
||||
@Ignore
|
||||
@GetMapping("/getRoomListByFloorId")
|
||||
public R list(Room room) {
|
||||
room.setDeleteFlag(0);
|
||||
room.setStatus(Room.Status.NO);
|
||||
room.setBuildingDetailId(room.getBuildingDetailId());
|
||||
return R.ok().put("data",roomService.selectRoomList(room));
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@GetMapping("/selectRoomById")
|
||||
public R selectRoomById(Room room) {
|
||||
return R.ok().put("data",roomService.selectRoomById(room.getId()));
|
||||
}
|
||||
}
|
@ -1,5 +1,9 @@
|
||||
package com.ics.admin.controller.meeting;
|
||||
|
||||
import com.ics.admin.domain.Customer;
|
||||
import com.ics.admin.service.ICustomerService;
|
||||
import com.ics.system.domain.User;
|
||||
import com.ics.system.service.IUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@ -12,8 +16,12 @@ import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.admin.domain.meeting.Ticket;
|
||||
import com.ics.admin.service.meeting.ITicketService;
|
||||
import org.wf.jwtp.annotation.Ignore;
|
||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优惠卷 提供者
|
||||
*
|
||||
@ -27,6 +35,12 @@ public class TicketController extends BaseController {
|
||||
@Autowired
|
||||
private ITicketService ticketService;
|
||||
|
||||
@Autowired
|
||||
private ICustomerService customerService;
|
||||
|
||||
@Autowired
|
||||
private IUserService userService;
|
||||
|
||||
/**
|
||||
* 查询优惠卷
|
||||
*/
|
||||
@ -73,4 +87,28 @@ public class TicketController extends BaseController {
|
||||
return toAjax(ticketService.deleteTicketByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业名称,企业负责人,联系电话,优惠劵数量
|
||||
*/
|
||||
|
||||
@Ignore
|
||||
@GetMapping("getTicketByCompany")
|
||||
public R getTicketByCompany(Customer customer) {
|
||||
startPage();
|
||||
|
||||
ArrayList<Customer> customerArrayList = new ArrayList<>();
|
||||
List<Customer> customers = customerService.selectCustomerList(customer);
|
||||
for (Customer customer1 : customers) {
|
||||
User user = userService.selectUserByCustomer(customer1.getId());
|
||||
if (user != null){
|
||||
customer1.setUser(user);
|
||||
// customerArrayList.add(customer1);
|
||||
}
|
||||
}
|
||||
return result(customers);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -73,4 +73,6 @@ public class UserEquipmentController extends BaseController {
|
||||
return toAjax(userEquipmentService.deleteUserEquipmentByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ics.admin.handler.BannerImageHandler;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import com.ics.system.domain.User;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@ -399,4 +400,7 @@ public class Customer extends BaseEntity<Customer> {
|
||||
*/
|
||||
private Park park;
|
||||
|
||||
@TableField(exist = false)
|
||||
private User user;
|
||||
|
||||
}
|
@ -24,6 +24,9 @@ public class CustomerTicket extends BaseEntity<CustomerTicket> {
|
||||
/** 优惠卷id */
|
||||
private Long ticketId;
|
||||
|
||||
|
||||
private Long staffId;
|
||||
|
||||
/** 数量 */
|
||||
private Integer num;
|
||||
|
||||
@ -41,4 +44,12 @@ public class CustomerTicket extends BaseEntity<CustomerTicket> {
|
||||
@TableField(exist = false)
|
||||
private String ticketName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String content;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer duration;
|
||||
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
@ -22,17 +24,86 @@ public class Reservation extends BaseEntity<Reservation> {
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String phone;
|
||||
|
||||
/** 优惠卷id */
|
||||
private Long ticketId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ticketName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
/** 企业id */
|
||||
private Long customerId;
|
||||
|
||||
/** 主题(会议主题、展厅主题) */
|
||||
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;
|
||||
@ -46,6 +117,8 @@ public class Reservation extends BaseEntity<Reservation> {
|
||||
/** 订单取消时间 */
|
||||
private Date cancelTime;
|
||||
|
||||
private Date orderTime;
|
||||
|
||||
/** 订单取消原因 */
|
||||
private String cancelResaon;
|
||||
|
||||
@ -59,7 +132,7 @@ public class Reservation extends BaseEntity<Reservation> {
|
||||
private String meetingNeedType;
|
||||
|
||||
/** 会议室id */
|
||||
private Long meetingId;
|
||||
// private Long meetingId;
|
||||
|
||||
/** 摄影需求:1需要,0不需要 */
|
||||
private String photographType;
|
||||
@ -68,7 +141,7 @@ public class Reservation extends BaseEntity<Reservation> {
|
||||
private Date startTime;
|
||||
|
||||
/** 预约-结束时间 */
|
||||
// private Date endTime;
|
||||
private Date endDate;
|
||||
|
||||
/** 备注 */
|
||||
private String remake;
|
||||
@ -76,4 +149,9 @@ public class Reservation extends BaseEntity<Reservation> {
|
||||
|
||||
private Long serveId;
|
||||
|
||||
private String reservationNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
private RoomContent roomContent;
|
||||
|
||||
}
|
||||
|
@ -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 String nowDate;
|
||||
|
||||
private List<Reservation> reservations;
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.ics.admin.domain.meeting;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预约参观人员对象 tb_reservation_person
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-03-06
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
|
||||
@TableName("tb_reservation_person")
|
||||
public class ReservationPerson extends BaseEntity<ReservationPerson> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 邀请人id */
|
||||
private Long userId;
|
||||
|
||||
/** 参与人id */
|
||||
private Long participantId;
|
||||
|
||||
/** 状态 0接受,1拒绝 */
|
||||
private String status;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date joinTime;
|
||||
|
||||
/** 预约记录id */
|
||||
private Long reservationId;
|
||||
|
||||
/** 参与人名称 */
|
||||
private String participantName;
|
||||
|
||||
/** 参与人姓名 */
|
||||
private String participantPhone;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Reservation> reservation;
|
||||
|
||||
}
|
@ -3,6 +3,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.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@ -21,9 +22,66 @@ import java.util.List;
|
||||
public class RoomContent extends BaseEntity<RoomContent> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 类型(会议室、办公室、茶室、路演厅、) */
|
||||
|
||||
/** 类型(会议室、办公室、茶室、路演厅) */
|
||||
private Type type;
|
||||
|
||||
/** 名称 */
|
||||
private String meetingName;
|
||||
|
||||
/** 容纳人数 */
|
||||
private Integer capacityNum;
|
||||
|
||||
/** 扩充人数 */
|
||||
private Integer expandNum;
|
||||
|
||||
/** 室内图片url */
|
||||
private String indoorPicUrl;
|
||||
|
||||
/** 地址 */
|
||||
private String address;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endDate;
|
||||
|
||||
/** 时长 */
|
||||
private Integer duration;
|
||||
|
||||
/** 形状(U型,O型) */
|
||||
private String shape;
|
||||
|
||||
/** 金额 */
|
||||
private String money;
|
||||
|
||||
/** 是否展示 */
|
||||
private Integer isShow;
|
||||
|
||||
/** 负责人姓名 */
|
||||
private String headName;
|
||||
|
||||
/** 负责人手机号 */
|
||||
private String headPhone;
|
||||
|
||||
/** 房间id */
|
||||
private Long roomId;
|
||||
|
||||
/** 是否收费 */
|
||||
private Long isToll;
|
||||
|
||||
/** 是否使用优惠卷 */
|
||||
private Long isTicket;
|
||||
|
||||
/** 会议描述 */
|
||||
private String content;
|
||||
|
||||
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
|
||||
@ -37,26 +95,18 @@ public class RoomContent extends BaseEntity<RoomContent> {
|
||||
*/
|
||||
MEETING_ROOM("会议室", 1),
|
||||
|
||||
|
||||
ROADSHOW_HALL("路演厅", 2),
|
||||
/**
|
||||
* 报名中
|
||||
*/
|
||||
OFFICE("办公室", 2),
|
||||
DATA_WAREHOUSE("数仓", 3),
|
||||
COUNT_BUTTON("数纽", 4),
|
||||
NEGOTIATION_ROOM("洽谈室", 5),
|
||||
|
||||
/**
|
||||
* 活动未开始
|
||||
*/
|
||||
TEE_ROOM("茶室", 3),
|
||||
|
||||
|
||||
/**
|
||||
* 已满额
|
||||
*/
|
||||
ROADSHOW_HALL("路演厅", 4);
|
||||
|
||||
/**
|
||||
* 活动中
|
||||
*/
|
||||
LIVE_ROOM("直播间", 6),
|
||||
|
||||
TEE_ROOM("茶室", 7);
|
||||
|
||||
private String name;
|
||||
private int value;
|
||||
@ -85,41 +135,6 @@ public class RoomContent extends BaseEntity<RoomContent> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** 名称 */
|
||||
private String meetingName;
|
||||
|
||||
/** 容纳人数 */
|
||||
private Integer capacityNum;
|
||||
|
||||
/** 扩充人数 */
|
||||
private Integer expandNum;
|
||||
|
||||
/** 室内图片url */
|
||||
private String indoorPicUrl;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endDate;
|
||||
|
||||
/** 价格单位:1小时、2天、3半天 */
|
||||
private String priceUnit;
|
||||
|
||||
/** 金额 */
|
||||
private String money;
|
||||
|
||||
/** 是否展示 */
|
||||
private Integer isShow;
|
||||
|
||||
/** 房间id */
|
||||
private Long roomId;
|
||||
|
||||
/** 形状(U型,O型) */
|
||||
private String shape;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<RoomItem> roomItemList;
|
||||
|
||||
@ -129,6 +144,12 @@ public class RoomContent extends BaseEntity<RoomContent> {
|
||||
@TableField(exist = false)
|
||||
private String buildingName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String build;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String buildId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<RoomServe> roomServeList;
|
||||
|
||||
@ -138,4 +159,11 @@ public class RoomContent extends BaseEntity<RoomContent> {
|
||||
@TableField(exist = false)
|
||||
private BigDecimal renArea;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer itemCount;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer serveCount;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,9 +1,12 @@
|
||||
package com.ics.admin.domain.meeting;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间物品关联对象 tb_room_item_by_room
|
||||
*
|
||||
@ -24,4 +27,7 @@ public class RoomItemByRoom extends BaseEntity<RoomItemByRoom> {
|
||||
/** 数量 */
|
||||
private Integer num;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Long> itemIds;
|
||||
|
||||
}
|
||||
|
@ -28,6 +28,8 @@ public class RoomServe extends BaseEntity<RoomServe> {
|
||||
|
||||
private String content;
|
||||
|
||||
private String money;
|
||||
|
||||
/** 备注 */
|
||||
private String remake;
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
package com.ics.admin.domain.meeting;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ics.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间主体和服务关联对象 tb_room_serve_by_room
|
||||
*
|
||||
@ -21,4 +24,7 @@ public class RoomServeByRoom extends BaseEntity<RoomServeByRoom> {
|
||||
/** 房间主体id */
|
||||
private Long romeContentId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Long> serveIds;
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class Ticket extends BaseEntity<Ticket> {
|
||||
private Integer type;
|
||||
|
||||
/** 金额 */
|
||||
private String money;
|
||||
private Integer duration;
|
||||
|
||||
/** 地址 */
|
||||
private String address;
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.ics.admin.domain.meeting.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class MeetingAmountVo {
|
||||
|
||||
private BigDecimal totalMoney; // 总金额
|
||||
|
||||
private BigDecimal paidMoney; // 已支付金额
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ics.admin.domain.meeting.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserCustomerVo {
|
||||
|
||||
private String userId;
|
||||
|
||||
private String customerId;
|
||||
|
||||
private String type;
|
||||
|
||||
}
|
@ -4,6 +4,7 @@ import com.ics.admin.domain.meeting.Reservation;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -61,4 +62,7 @@ public interface ReservationMapper extends BaseMapper<Reservation> {
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteReservationByIds(String[] ids);
|
||||
|
||||
List<Date> selectListByDate(Long meetingRoomId);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,64 @@
|
||||
package com.ics.admin.mapper.meeting;
|
||||
|
||||
import com.ics.admin.domain.meeting.ReservationPerson;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预约参观人员Mapper接口
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-03-06
|
||||
*/
|
||||
@Mapper
|
||||
public interface ReservationPersonMapper extends BaseMapper<ReservationPerson> {
|
||||
/**
|
||||
* 查询预约参观人员
|
||||
*
|
||||
* @param id 预约参观人员ID
|
||||
* @return 预约参观人员
|
||||
*/
|
||||
ReservationPerson selectReservationPersonById(Long id);
|
||||
|
||||
/**
|
||||
* 查询预约参观人员列表
|
||||
*
|
||||
* @param reservationPerson 预约参观人员
|
||||
* @return 预约参观人员集合
|
||||
*/
|
||||
List<ReservationPerson> selectReservationPersonList(ReservationPerson reservationPerson);
|
||||
|
||||
/**
|
||||
* 新增预约参观人员
|
||||
*
|
||||
* @param reservationPerson 预约参观人员
|
||||
* @return 结果
|
||||
*/
|
||||
int insertReservationPerson(ReservationPerson reservationPerson);
|
||||
|
||||
/**
|
||||
* 修改预约参观人员
|
||||
*
|
||||
* @param reservationPerson 预约参观人员
|
||||
* @return 结果
|
||||
*/
|
||||
int updateReservationPerson(ReservationPerson reservationPerson);
|
||||
|
||||
/**
|
||||
* 删除预约参观人员
|
||||
*
|
||||
* @param id 预约参观人员ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteReservationPersonById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除预约参观人员
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteReservationPersonByIds(String[] ids);
|
||||
}
|
@ -64,4 +64,5 @@ public interface RoomItemByRoomMapper extends BaseMapper<RoomItemByRoom> {
|
||||
int deleteRoomItemByRoomByIds(String[] ids);
|
||||
|
||||
List<RoomItemByRoom> selectRoomContent(@Param("list") List<Long> collect,@Param("size") int size);
|
||||
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ public class RoomServeByRoomServiceImpl extends ServiceImpl<RoomServeByRoomMappe
|
||||
@Override
|
||||
public List<RoomServeByRoom> selectRoomServeByRoomList(RoomServeByRoom roomServeByRoom) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("rome_content_Id", roomServeByRoom.getRomeContentId());
|
||||
return roomServeByRoomMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,8 @@ public class RoomServeServiceImpl extends ServiceImpl<RoomServeMapper, RoomServe
|
||||
@Override
|
||||
public List<RoomServe> selectRoomServeList(RoomServe roomServe) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq(roomServe.getServeType() !=null ,"serve_type",roomServe.getServeType());
|
||||
queryWrapper.like(roomServe.getServeName() !=null ,"serve_name",roomServe.getServeName());
|
||||
return roomServeMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
package com.ics.admin.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ics.admin.service.meeting.IRoomEquipmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ics.admin.mapper.meeting.UserEquipmentMapper;
|
||||
@ -22,6 +25,9 @@ public class UserEquipmentServiceImpl extends ServiceImpl<UserEquipmentMapper, U
|
||||
@Autowired
|
||||
private UserEquipmentMapper userEquipmentMapper;
|
||||
|
||||
@Autowired
|
||||
private IRoomEquipmentService roomEquipmentService;
|
||||
|
||||
/**
|
||||
* 查询用户设备关联
|
||||
*
|
||||
@ -89,4 +95,18 @@ public class UserEquipmentServiceImpl extends ServiceImpl<UserEquipmentMapper, U
|
||||
public int deleteUserEquipmentById(Long id) {
|
||||
return userEquipmentMapper.deleteUserEquipmentById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserEquipment> getEquipmentByUserId(String userId) {
|
||||
|
||||
List<UserEquipment> list = baseMapper.selectList(new QueryWrapper<UserEquipment>().eq("user_id", userId));
|
||||
if(CollUtil.isEmpty(list)){
|
||||
return list;
|
||||
}
|
||||
for (UserEquipment userEquipment : list) {
|
||||
// roomEquipmentService.s
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ics.admin.domain.IcsCustomerStaff;
|
||||
import com.ics.admin.domain.meeting.Ticket;
|
||||
import com.ics.admin.domain.meeting.vo.UserCustomerVo;
|
||||
import com.ics.admin.mapper.IcsCustomerStaffMapper;
|
||||
import com.ics.admin.mapper.meeting.TicketMapper;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
@ -103,23 +104,37 @@ public class CustomerTicketServiceImpl extends ServiceImpl<CustomerTicketMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CustomerTicket> getCustomerTicket(Long userId) {
|
||||
|
||||
|
||||
IcsCustomerStaff icsCustomerStaff = customerStaffMapper.selectById(userId);
|
||||
Assert.isTrue(icsCustomerStaff != null, "用户不存在,请联系管理员");
|
||||
public List<CustomerTicket> getCustomerTicket(UserCustomerVo userCustomerVo) {
|
||||
|
||||
|
||||
QueryWrapper<CustomerTicket> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("customer_id", icsCustomerStaff.getIcsCustomerId());
|
||||
wrapper.eq("customer_id", userCustomerVo.getCustomerId());
|
||||
wrapper.eq("type", userCustomerVo.getType());
|
||||
wrapper.isNull("staff_id");
|
||||
List<CustomerTicket> customerTickets = customerTicketMapper.selectList(wrapper);
|
||||
for (CustomerTicket customerTicket : customerTickets) {
|
||||
Ticket ticket = ticketMapper.selectById(customerTicket.getTicketId());
|
||||
customerTicket.setTicketName(ticket.getTitle());
|
||||
customerTicket.setStartTime(ticket.getStartTime());
|
||||
customerTicket.setEndDate(ticket.getEndDate());
|
||||
customerTicket.setContent(ticket.getContent());
|
||||
customerTicket.setContent(ticket.getContent());
|
||||
customerTicket.setDuration(ticket.getDuration());
|
||||
customerTicket.setType(ticket.getType());
|
||||
}
|
||||
|
||||
return customerTickets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCustomerTicketBYUserId(CustomerTicket customerTicket) {
|
||||
QueryWrapper<CustomerTicket> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("customer_id", customerTicket.getCustomerId());
|
||||
wrapper.eq("ticket_id", customerTicket.getTicketId());
|
||||
wrapper.groupBy("ticket_id");
|
||||
CustomerTicket customerTicket1 = customerTicketMapper.selectOne(wrapper);
|
||||
customerTicket1.setStaffId(customerTicket.getStaffId());
|
||||
customerTicket1.setIsVerification(1);
|
||||
baseMapper.updateCustomerTicket(customerTicket1);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,180 @@
|
||||
package com.ics.admin.service.impl.meeting;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.Reservation;
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.ics.admin.mapper.meeting.ReservationMapper;
|
||||
import com.ics.admin.mapper.meeting.ReservationPersonMapper;
|
||||
import com.ics.admin.mapper.meeting.RoomContentMapper;
|
||||
import com.ics.admin.service.IBuildingDetailService;
|
||||
import com.ics.admin.service.IRoomService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ics.admin.domain.meeting.ReservationPerson;
|
||||
import com.ics.admin.service.meeting.IReservationPersonService;
|
||||
|
||||
/**
|
||||
* 预约参观人员Service业务层处理
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-03-06
|
||||
*/
|
||||
@Service
|
||||
public class ReservationPersonServiceImpl extends ServiceImpl<ReservationPersonMapper, ReservationPerson> implements IReservationPersonService {
|
||||
@Autowired
|
||||
private ReservationPersonMapper reservationPersonMapper;
|
||||
|
||||
@Autowired
|
||||
private ReservationMapper reservationMapper;
|
||||
|
||||
@Autowired
|
||||
private RoomContentMapper roomContentMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private IRoomService roomService;
|
||||
|
||||
@Autowired
|
||||
private IBuildingDetailService buildingDetailService;
|
||||
|
||||
@Autowired
|
||||
private IReservationPersonService reservationPersonService;
|
||||
|
||||
/**
|
||||
* 查询预约参观人员
|
||||
*
|
||||
* @param id 预约参观人员ID
|
||||
* @return 预约参观人员
|
||||
*/
|
||||
@Override
|
||||
public ReservationPerson selectReservationPersonById(Long id) {
|
||||
return reservationPersonMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询预约参观人员列表
|
||||
*
|
||||
* @param reservationPerson 预约参观人员
|
||||
* @return 预约参观人员
|
||||
*/
|
||||
@Override
|
||||
public List<ReservationPerson> selectReservationPersonList(ReservationPerson reservationPerson) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
return reservationPersonMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增预约参观人员
|
||||
*
|
||||
* @param reservationPerson 预约参观人员
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertReservationPerson(ReservationPerson reservationPerson) {
|
||||
return reservationPersonMapper.insert(reservationPerson);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改预约参观人员
|
||||
*
|
||||
* @param reservationPerson 预约参观人员
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateReservationPerson(ReservationPerson reservationPerson) {
|
||||
return reservationPersonMapper.updateById(reservationPerson);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除预约参观人员对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteReservationPersonByIds(String ids) {
|
||||
String[] idsArray = StrUtil.split(ids,",");
|
||||
return reservationPersonMapper.deleteBatchIds(CollUtil.toList(idsArray));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除预约参观人员信息
|
||||
*
|
||||
* @param id 预约参观人员ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteReservationPersonById(Long id) {
|
||||
return reservationPersonMapper.deleteReservationPersonById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReservationPerson isVisitor(ReservationPerson reservationPerson) {
|
||||
|
||||
QueryWrapper<ReservationPerson> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("reservation_id",reservationPerson.getReservationId());
|
||||
queryWrapper.eq("user_id",reservationPerson.getUserId());
|
||||
queryWrapper.eq("participant_id",reservationPerson.getParticipantId());
|
||||
ReservationPerson reservationPerson1 = reservationPersonMapper.selectOne(queryWrapper);
|
||||
return reservationPerson1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Reservation> selectListByParticipantId(Long userId,Integer page,Integer limit) {
|
||||
QueryWrapper<ReservationPerson> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("participant_id",userId);
|
||||
List<ReservationPerson> list = reservationPersonMapper.selectList(queryWrapper);
|
||||
List<Long> collect = list.stream().map(item -> {
|
||||
return item.getReservationId();
|
||||
}).collect(Collectors.toList());
|
||||
if (CollUtil.isEmpty(collect)){
|
||||
IPage<Reservation> iPage = new Page<>(page,limit);
|
||||
return iPage ;
|
||||
}
|
||||
IPage<Reservation> iPage = new Page<>(page,limit);
|
||||
QueryWrapper<Reservation> wrapper = new QueryWrapper<>();
|
||||
wrapper.in("id",collect);
|
||||
IPage<Reservation> iPage1 = reservationMapper.selectPage(iPage, wrapper);
|
||||
List<Reservation> records = iPage1.getRecords();
|
||||
for (Reservation reservation1 : records) {
|
||||
reservation1.setStatusValue(reservation1.getStauts().getValue());
|
||||
reservation1.setStatusName(reservation1.getStauts().getName());
|
||||
Long roomContentId = reservation1.getRoomContentId();
|
||||
RoomContent roomContent = roomContentMapper.selectById(roomContentId);
|
||||
Room room = roomService.selectRoomById(roomContent.getRoomId());
|
||||
if (room != null) {
|
||||
roomContent.setRoomName(room.getName());
|
||||
roomContent.setArea(room.getArea());
|
||||
roomContent.setRenArea(room.getRentArea());
|
||||
//查询楼层号
|
||||
BuildingDetail buildingDetail = buildingDetailService.selectBuildingDetailById(room.getBuildingDetailId());
|
||||
if (buildingDetail != null) {
|
||||
roomContent.setBuildingName(buildingDetail.getFloorName() +"F");
|
||||
}
|
||||
}
|
||||
reservation1.setRoomContent(roomContent);
|
||||
}
|
||||
|
||||
return iPage1;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Reservation> selectListByReservationId(List<Long> collect) {
|
||||
QueryWrapper<Reservation> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.in("id",collect);
|
||||
return reservationMapper.selectList(queryWrapper);
|
||||
|
||||
}
|
||||
}
|
@ -1,10 +1,28 @@
|
||||
package com.ics.admin.service.impl.meeting;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.ReservationPerson;
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.ics.admin.domain.meeting.Ticket;
|
||||
import com.ics.admin.domain.meeting.vo.MeetingAmountVo;
|
||||
import com.ics.admin.mapper.meeting.RoomContentMapper;
|
||||
import com.ics.admin.mapper.meeting.TicketMapper;
|
||||
import com.ics.admin.service.IBuildingDetailService;
|
||||
import com.ics.admin.service.IRoomService;
|
||||
import com.ics.admin.service.meeting.IRoomContentService;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ics.admin.mapper.meeting.ReservationMapper;
|
||||
@ -22,6 +40,17 @@ public class ReservationServiceImpl extends ServiceImpl<ReservationMapper, Reser
|
||||
@Autowired
|
||||
private ReservationMapper reservationMapper;
|
||||
|
||||
@Autowired
|
||||
private RoomContentMapper roomContentMapper;
|
||||
@Autowired
|
||||
private TicketMapper ticketMapper;
|
||||
|
||||
@Autowired
|
||||
private IRoomService roomService;
|
||||
|
||||
@Autowired
|
||||
private IBuildingDetailService buildingDetailService;
|
||||
|
||||
/**
|
||||
* 查询预约记录
|
||||
*
|
||||
@ -89,4 +118,148 @@ 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());
|
||||
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public MeetingAmountVo calculateMeetingRoomAmount(Reservation reservation) {
|
||||
MeetingAmountVo meetingAmountVo = new MeetingAmountVo();
|
||||
//获取时长
|
||||
long hour=DateUtil.between(reservation.getStartTime(),reservation.getEndDate(), DateUnit.HOUR);
|
||||
// 获取会议室id
|
||||
Long roomContentId = reservation.getRoomContentId();
|
||||
//根据会议室id 获取会议室
|
||||
RoomContent roomContent = roomContentMapper.selectById(roomContentId);
|
||||
// 根据时间获取对应时长
|
||||
Integer duration = roomContent.getDuration();
|
||||
//如果会议室时长大于 会议时长
|
||||
if (duration>hour){
|
||||
//起步金额 乘以时长
|
||||
BigDecimal totalMoney = new BigDecimal(roomContent.getMoney()).multiply(new BigDecimal(duration));
|
||||
meetingAmountVo.setTotalMoney(totalMoney);
|
||||
// duration去判断优惠卷
|
||||
if (null != reservation.getTicketId()){
|
||||
Ticket ticket = ticketMapper.selectTicketById(reservation.getTicketId());
|
||||
// 获取优惠卷时长
|
||||
Integer duration1 = ticket.getDuration();
|
||||
if (duration1>duration){
|
||||
BigDecimal bigDecimal = new BigDecimal("0.00");
|
||||
meetingAmountVo.setPaidMoney(bigDecimal);
|
||||
return meetingAmountVo;
|
||||
}else {
|
||||
int i = duration - duration1;
|
||||
BigDecimal paidMoney = new BigDecimal(roomContent.getMoney()).multiply(new BigDecimal(i));
|
||||
meetingAmountVo.setPaidMoney(paidMoney);
|
||||
return meetingAmountVo;
|
||||
}
|
||||
}else {
|
||||
// 没有优惠卷 duration * money
|
||||
String money = roomContent.getMoney();
|
||||
BigDecimal bigDecimal = new BigDecimal(money);
|
||||
BigDecimal bigDecimal1 = bigDecimal.multiply(new BigDecimal(duration));
|
||||
meetingAmountVo.setPaidMoney(bigDecimal1);
|
||||
return meetingAmountVo;
|
||||
}
|
||||
}else {
|
||||
BigDecimal totalMoney = new BigDecimal(roomContent.getMoney()).multiply(new BigDecimal(hour));
|
||||
meetingAmountVo.setTotalMoney(totalMoney);
|
||||
if (null != reservation.getTicketId()) {
|
||||
Ticket ticket = ticketMapper.selectTicketById(reservation.getTicketId());
|
||||
// 获取优惠卷时长
|
||||
Integer duration1 = ticket.getDuration();
|
||||
if (duration1 > hour) {
|
||||
BigDecimal bigDecimal = new BigDecimal("0.00");
|
||||
meetingAmountVo.setPaidMoney(bigDecimal);
|
||||
return meetingAmountVo;
|
||||
} else {
|
||||
long i = hour - duration1;
|
||||
BigDecimal multiply = new BigDecimal(roomContent.getMoney()).multiply(new BigDecimal(i));
|
||||
meetingAmountVo.setPaidMoney(multiply);
|
||||
return meetingAmountVo;
|
||||
}
|
||||
}else {
|
||||
// 没有优惠卷 duration * money
|
||||
String money = roomContent.getMoney();
|
||||
BigDecimal bigDecimal = new BigDecimal(money);
|
||||
BigDecimal bigDecimal1 = bigDecimal.multiply(new BigDecimal(hour));
|
||||
meetingAmountVo.setPaidMoney(bigDecimal1);
|
||||
return meetingAmountVo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Reservation> selectReservationListByUserId(Reservation reservation, Integer pageNum, Integer pageSize) {
|
||||
|
||||
QueryWrapper<Reservation> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("user_id",reservation.getUserId());
|
||||
IPage<Reservation> pages = new Page<>(pageNum,pageSize);
|
||||
IPage<Reservation> userIPage = reservationMapper.selectPage(pages,queryWrapper);
|
||||
for (Reservation reservation1 : userIPage.getRecords()) {
|
||||
reservation1.setStatusValue(reservation1.getStauts().getValue());
|
||||
reservation1.setStatusName(reservation1.getStauts().getName());
|
||||
Long roomContentId = reservation1.getRoomContentId();
|
||||
RoomContent roomContent = roomContentMapper.selectById(roomContentId);
|
||||
Room room = roomService.selectRoomById(roomContent.getRoomId());
|
||||
if (room != null) {
|
||||
roomContent.setRoomName(room.getName());
|
||||
roomContent.setArea(room.getArea());
|
||||
roomContent.setRenArea(room.getRentArea());
|
||||
//查询楼层号
|
||||
BuildingDetail buildingDetail = buildingDetailService.selectBuildingDetailById(room.getBuildingDetailId());
|
||||
if (buildingDetail != null) {
|
||||
roomContent.setBuildingName(buildingDetail.getFloorName() +"F");
|
||||
}
|
||||
}
|
||||
reservation1.setRoomContent(roomContent);
|
||||
}
|
||||
return userIPage;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断一个时间段是否包含另一个时间段,包含: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,19 +1,23 @@
|
||||
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;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
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.mapper.meeting.RoomItemByRoomMapper;
|
||||
import com.ics.admin.mapper.meeting.RoomServeByRoomMapper;
|
||||
import com.ics.admin.service.IBuildingDetailService;
|
||||
import com.ics.admin.service.IRoomService;
|
||||
import com.ics.admin.service.meeting.*;
|
||||
@ -48,9 +52,18 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
||||
@Autowired
|
||||
private IRoomServeService iRoomServeService;
|
||||
|
||||
@Autowired
|
||||
private RoomItemByRoomMapper roomItemByRoomMapper;
|
||||
|
||||
@Autowired
|
||||
private IRoomServeByRoomService iRoomServeByRoomService;
|
||||
|
||||
@Autowired
|
||||
private RoomServeByRoomMapper roomServeByRoomMapper;
|
||||
|
||||
@Autowired
|
||||
private ReservationMapper reservationMapper;
|
||||
|
||||
/**
|
||||
* 查询房间主体内容
|
||||
*
|
||||
@ -71,6 +84,10 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
||||
@Override
|
||||
public List<RoomContent> selectRoomContentList(RoomContent roomContent) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.like(roomContent.getMeetingName() !=null,"meeting_name", roomContent.getMeetingName());
|
||||
queryWrapper.eq(roomContent.getTypeName() !=null,"type", roomContent.getTypeName());
|
||||
queryWrapper.eq(roomContent.getShape() !=null,"shape", roomContent.getShape());
|
||||
queryWrapper.eq(roomContent.getCapacityNum() !=null,"capacity_num", roomContent.getCapacityNum());
|
||||
return roomContentMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@ -124,7 +141,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 -> {
|
||||
@ -191,6 +207,7 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
||||
RoomServeByRoom roomServeByRoom = new RoomServeByRoom();
|
||||
roomServeByRoom.setRomeContentId(id);
|
||||
List<RoomServe> roomServe1 = new ArrayList<>();
|
||||
List<RoomItem> roomItemList = new ArrayList<>();
|
||||
List<RoomServeByRoom> roomServeByRooms = iRoomServeByRoomService.selectRoomServeByRoomList(roomServeByRoom);
|
||||
if (CollUtil.isNotEmpty(roomServeByRooms)){
|
||||
for (RoomServeByRoom serveByRoom : roomServeByRooms) {
|
||||
@ -199,6 +216,17 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
||||
}
|
||||
roomContent.setRoomServeList(roomServe1);
|
||||
}
|
||||
RoomItemByRoom roomItemByRoom = new RoomItemByRoom();
|
||||
roomItemByRoom.setRoomContentId(id);
|
||||
List<RoomItemByRoom> roomItemByRooms = roomItemByRoomService.selectRoomItemByRoomList(roomItemByRoom);
|
||||
if (CollUtil.isNotEmpty(roomItemByRooms)){
|
||||
for (RoomItemByRoom itemByRoom : roomItemByRooms) {
|
||||
RoomItem roomItem = roomItemService.selectRoomItemById(itemByRoom.getItemId());
|
||||
roomItemList.add(roomItem);
|
||||
}
|
||||
roomContent.setRoomItemList(roomItemList);
|
||||
}
|
||||
|
||||
// 所在楼层,占地面积,办公面积
|
||||
Room room = roomService.selectRoomById(roomContent.getRoomId());
|
||||
if (room != null) {
|
||||
@ -250,4 +278,100 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
||||
// 1.会议室类型,2.人数,3.会议室设备,4.形式
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReservationDTO> selectMeetingRoomRecord(Long meetingRoomId) {
|
||||
|
||||
ArrayList<ReservationDTO> list = new ArrayList<>();
|
||||
|
||||
// 根据最近七天查询数据
|
||||
|
||||
List<Date> reservations = reservationMapper.selectListByDate(meetingRoomId);
|
||||
System.out.println(reservations);
|
||||
for (Date dateTime : reservations) {
|
||||
ReservationDTO reservationDTO = new ReservationDTO();
|
||||
reservationDTO.setNowDate(DateUtil.format(dateTime,"yyyy-MM-dd"));
|
||||
// 查询会议室记录
|
||||
QueryWrapper<Reservation> wrapper = new QueryWrapper<>();
|
||||
String dateStr = dateTime.toString();
|
||||
wrapper.eq("room_content_id",meetingRoomId);
|
||||
wrapper.gt("start_time", DateUtil.format(dateTime,"yyyy-MM-dd")+ " 00:00:00");
|
||||
wrapper.lt("end_date",DateUtil.format(dateTime,"yyyy-MM-dd") + " 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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> selectMeetingRoomServiceAndEquipment(Long id) {
|
||||
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
RoomServeByRoom roomServeByRoom = new RoomServeByRoom();
|
||||
roomServeByRoom.setRomeContentId(id);
|
||||
List<RoomServe> roomServe1 = new ArrayList<>();
|
||||
List<RoomServe> roomServe2 = new ArrayList<>();
|
||||
List<RoomItem> roomItemList = new ArrayList<>();
|
||||
List<RoomServeByRoom> roomServeByRooms = iRoomServeByRoomService.selectRoomServeByRoomList(roomServeByRoom);
|
||||
if (CollUtil.isNotEmpty(roomServeByRooms)){
|
||||
for (RoomServeByRoom serveByRoom : roomServeByRooms) {
|
||||
RoomServe roomServe = iRoomServeService.selectRoomServeById(serveByRoom.getServeId());
|
||||
if (roomServe.getServeType() == 1){
|
||||
roomServe1.add(roomServe);
|
||||
}else if (roomServe.getServeType() == 2){
|
||||
roomServe2.add(roomServe);
|
||||
}
|
||||
}
|
||||
map.put("roomFreeServe",roomServe1);
|
||||
map.put("roomFServe",roomServe2);
|
||||
}
|
||||
RoomItemByRoom roomItemByRoom = new RoomItemByRoom();
|
||||
roomItemByRoom.setRoomContentId(id);
|
||||
List<RoomItemByRoom> roomItemByRooms = roomItemByRoomService.selectRoomItemByRoomList(roomItemByRoom);
|
||||
if (CollUtil.isNotEmpty(roomItemByRooms)){
|
||||
for (RoomItemByRoom itemByRoom : roomItemByRooms) {
|
||||
RoomItem roomItem = roomItemService.selectRoomItemById(itemByRoom.getItemId());
|
||||
roomItemList.add(roomItem);
|
||||
}
|
||||
map.put("roomItem",roomItemList);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int roomServeByRoom(RoomServeByRoom roomServeByRoom) {
|
||||
|
||||
UpdateWrapper<RoomServeByRoom> wrapper = new UpdateWrapper<>();
|
||||
wrapper.eq("rome_content_id",roomServeByRoom.getRomeContentId());
|
||||
roomServeByRoomMapper.delete(wrapper);
|
||||
for (Long id : roomServeByRoom.getServeIds()) {
|
||||
RoomServeByRoom roomServeByRoom1 = new RoomServeByRoom();
|
||||
roomServeByRoom1.setServeId(id);
|
||||
roomServeByRoom1.setRomeContentId(roomServeByRoom.getRomeContentId());
|
||||
iRoomServeByRoomService.insertRoomServeByRoom(roomServeByRoom1);
|
||||
}
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addItemServe(RoomItemByRoom roomItemByRoom) {
|
||||
|
||||
UpdateWrapper<RoomItemByRoom> wrapper = new UpdateWrapper<>();
|
||||
wrapper.eq("room_content_id",roomItemByRoom.getRoomContentId());
|
||||
roomItemByRoomMapper.delete(wrapper);
|
||||
for (Long id : roomItemByRoom.getItemIds()) {
|
||||
RoomItemByRoom roomItemByRoom1 = new RoomItemByRoom();
|
||||
roomItemByRoom1.setItemId(id);
|
||||
roomItemByRoom1.setRoomContentId(roomItemByRoom.getRoomContentId());
|
||||
roomItemByRoomService.insertRoomItemByRoom(roomItemByRoom1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package com.ics.admin.service.meeting;
|
||||
|
||||
import com.ics.admin.domain.meeting.CustomerTicket;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ics.admin.domain.meeting.vo.UserCustomerVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -59,6 +61,8 @@ public interface ICustomerTicketService extends IService<CustomerTicket> {
|
||||
*/
|
||||
int deleteCustomerTicketById(Long id);
|
||||
|
||||
List<CustomerTicket> getCustomerTicket(Long userId);
|
||||
List<CustomerTicket> getCustomerTicket(UserCustomerVo userCustomerVo);
|
||||
|
||||
void updateCustomerTicketBYUserId(CustomerTicket customerTicket);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.ics.admin.service.meeting;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.ics.admin.domain.meeting.Reservation;
|
||||
import com.ics.admin.domain.meeting.ReservationPerson;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预约参观人员Service接口
|
||||
*
|
||||
* @author chen
|
||||
* @date 2024-03-06
|
||||
*/
|
||||
public interface IReservationPersonService extends IService<ReservationPerson> {
|
||||
/**
|
||||
* 查询预约参观人员
|
||||
*
|
||||
* @param id 预约参观人员ID
|
||||
* @return 预约参观人员
|
||||
*/
|
||||
ReservationPerson selectReservationPersonById(Long id);
|
||||
|
||||
/**
|
||||
* 查询预约参观人员列表
|
||||
*
|
||||
* @param reservationPerson 预约参观人员
|
||||
* @return 预约参观人员集合
|
||||
*/
|
||||
List<ReservationPerson> selectReservationPersonList(ReservationPerson reservationPerson);
|
||||
|
||||
/**
|
||||
* 新增预约参观人员
|
||||
*
|
||||
* @param reservationPerson 预约参观人员
|
||||
* @return 结果
|
||||
*/
|
||||
int insertReservationPerson(ReservationPerson reservationPerson);
|
||||
|
||||
/**
|
||||
* 修改预约参观人员
|
||||
*
|
||||
* @param reservationPerson 预约参观人员
|
||||
* @return 结果
|
||||
*/
|
||||
int updateReservationPerson(ReservationPerson reservationPerson);
|
||||
|
||||
/**
|
||||
* 批量删除预约参观人员
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteReservationPersonByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除预约参观人员信息
|
||||
*
|
||||
* @param id 预约参观人员ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteReservationPersonById(Long id);
|
||||
|
||||
ReservationPerson isVisitor(ReservationPerson reservationPerson);
|
||||
|
||||
IPage<Reservation> selectListByParticipantId(Long userId, Integer page, Integer limit);
|
||||
|
||||
List<Reservation> selectListByReservationId(List<Long> collect);
|
||||
|
||||
}
|
@ -1,7 +1,11 @@
|
||||
package com.ics.admin.service.meeting;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.ics.admin.domain.meeting.Reservation;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ics.admin.domain.meeting.vo.MeetingAmountVo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -58,4 +62,10 @@ public interface IReservationService extends IService<Reservation> {
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteReservationById(Long id);
|
||||
|
||||
boolean selectFreeMeetingRoom(Reservation reservation);
|
||||
|
||||
MeetingAmountVo calculateMeetingRoomAmount(Reservation reservation);
|
||||
|
||||
IPage<Reservation> selectReservationListByUserId(Reservation reservation, Integer pageNum, Integer pageSize);
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.ics.admin.service.meeting;
|
||||
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.ics.admin.domain.meeting.*;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -65,4 +67,12 @@ public interface IRoomContentService extends IService<RoomContent> {
|
||||
RoomContent selectInfoById(Long id);
|
||||
|
||||
Map<String,Object> selectSearchInfoByType(Integer type);
|
||||
|
||||
List<ReservationDTO> selectMeetingRoomRecord(Long meetingRoomId);
|
||||
|
||||
HashMap<String, Object> selectMeetingRoomServiceAndEquipment(Long meetingRoomId);
|
||||
|
||||
int roomServeByRoom(RoomServeByRoom roomServeByRoom);
|
||||
|
||||
int addItemServe(RoomItemByRoom roomItemByRoom);
|
||||
}
|
||||
|
@ -58,4 +58,6 @@ public interface IUserEquipmentService extends IService<UserEquipment> {
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteUserEquipmentById(Long id);
|
||||
|
||||
List<UserEquipment> getEquipmentByUserId(String userId);
|
||||
}
|
||||
|
@ -112,6 +112,7 @@
|
||||
<include refid="selectRoomVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">AND ir.name LIKE concat('%', #{name}, '%')</if>
|
||||
<if test="buildingDetailId != null and buildingDetailId != ''">AND ir.building_detail_id = #{buildingDetailId}</if>
|
||||
<if test="buildingName!= null and buildingName != ''">AND ib.building_name LIKE concat('%', #{buildingName},
|
||||
'%')
|
||||
</if>
|
||||
|
@ -8,13 +8,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="id" column="id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="ticketId" column="ticket_id" />
|
||||
<result property="staffId" column="staff_id" />
|
||||
<result property="num" column="num" />
|
||||
<result property="type" column="type" />
|
||||
<result property="isVerification" column="is_verification" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCustomerTicketVo">
|
||||
SELECT id, customer_id, ticket_id, num, is_verification, create_time FROM tb_customer_ticket
|
||||
SELECT id, customer_id, ticket_id, num, is_verification, create_time,staff_id,type FROM tb_customer_ticket
|
||||
</sql>
|
||||
|
||||
<select id="selectCustomerTicketList" parameterType="CustomerTicket" resultMap="CustomerTicketResult">
|
||||
@ -37,6 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="num != null ">num,</if>
|
||||
<if test="isVerification != null ">is_verification,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="staffId != null ">staff_id,</if>
|
||||
<if test="type != null ">type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">#{id},</if>
|
||||
@ -45,6 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="num != null ">#{num},</if>
|
||||
<if test="isVerification != null ">#{isVerification},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="staffId != null ">#{staffId},</if>
|
||||
<if test="type != null ">#{type},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -56,6 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="num != null ">num = #{num},</if>
|
||||
<if test="isVerification != null ">is_verification = #{isVerification},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="staffId != null ">staff_id = #{staffId},</if>
|
||||
<if test="type != null ">staff_id = #{type},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
@ -17,14 +17,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="oderNumber" column="oder_number" />
|
||||
<result property="orderMoney" column="order_money" />
|
||||
<result property="cancelTime" column="cancel_time" />
|
||||
<result property="orderTime" column="order_time" />
|
||||
<result property="cancelResaon" column="cancel_resaon" />
|
||||
<result property="visitType" column="visit_type" />
|
||||
<result property="reservationNumber" column="reservation_number" />
|
||||
<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 +36,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,reservation_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">
|
||||
@ -47,7 +49,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectReservationVo"/>
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectListByDate" resultType="java.util.Date">
|
||||
select date_format(start_time, '%Y-%m-%d') from tb_reservation where start_time >= date_format(now(), '%Y-%m-%d')
|
||||
and room_content_id = #{roomContentId} group by date_format(start_time, '%Y-%m-%d');
|
||||
</select>
|
||||
|
||||
<insert id="insertReservation" parameterType="Reservation">
|
||||
INSERT INTO tb_reservation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@ -63,14 +69,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="oderNumber != null and oderNumber != ''">oder_number,</if>
|
||||
<if test="orderMoney != null and orderMoney != ''">order_money,</if>
|
||||
<if test="cancelTime != null ">cancel_time,</if>
|
||||
<if test="orderTime != null ">order_time,</if>
|
||||
<if test="cancelResaon != null and cancelResaon != ''">cancel_resaon,</if>
|
||||
<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="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="reservationNumber != null ">reservation_number,</if>
|
||||
<if test="deleteFlag != null ">delete_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
@ -87,18 +94,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="serveId != null ">#{serveId},</if>
|
||||
<if test="title != null and title != ''">#{title},</if>
|
||||
<if test="stauts != null ">#{stauts},</if>
|
||||
<if test="reservationNumber != null ">#{reservationNumber},</if>
|
||||
<if test="isAfterSale != null and isAfterSale != ''">#{isAfterSale},</if>
|
||||
<if test="oderNumber != null and oderNumber != ''">#{oderNumber},</if>
|
||||
<if test="orderMoney != null and orderMoney != ''">#{orderMoney},</if>
|
||||
<if test="cancelTime != null ">#{cancelTime},</if>
|
||||
<if test="orderTime != null ">#{orderTime},</if>
|
||||
<if test="cancelResaon != null and cancelResaon != ''">#{cancelResaon},</if>
|
||||
<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="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>
|
||||
@ -122,14 +130,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="oderNumber != null and oderNumber != ''">oder_number = #{oderNumber},</if>
|
||||
<if test="orderMoney != null and orderMoney != ''">order_money = #{orderMoney},</if>
|
||||
<if test="cancelTime != null ">cancel_time = #{cancelTime},</if>
|
||||
<if test="reservationNumber != null ">reservation_number = #{reservationNumber},</if>
|
||||
<if test="cancelResaon != null and cancelResaon != ''">cancel_resaon = #{cancelResaon},</if>
|
||||
<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="orderTime != null ">order_time = #{orderTime},</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,83 @@
|
||||
<?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.meeting.ReservationPersonMapper">
|
||||
|
||||
<resultMap type="com.ics.admin.domain.meeting.ReservationPerson" id="ReservationPersonResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="participantId" column="participant_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="joinTime" column="join_time" />
|
||||
<result property="reservationId" column="reservation_id" />
|
||||
<result property="participantName" column="participant_name" />
|
||||
<result property="participantPhone" column="participant_phone" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectReservationPersonVo">
|
||||
SELECT id, user_id, participant_id, status, join_time, reservation_id, participant_name, participant_phone FROM tb_reservation_person
|
||||
</sql>
|
||||
|
||||
<select id="selectReservationPersonList" parameterType="ReservationPerson" resultMap="ReservationPersonResult">
|
||||
<include refid="selectReservationPersonVo"/>
|
||||
<where>
|
||||
<if test="participantName != null and participantName != ''"> AND participant_name LIKE CONCAT('%', #{participantName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectReservationPersonById" parameterType="Long" resultMap="ReservationPersonResult">
|
||||
<include refid="selectReservationPersonVo"/>
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertReservationPerson" parameterType="ReservationPerson">
|
||||
INSERT INTO tb_reservation_person
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">id,</if>
|
||||
<if test="userId != null ">user_id,</if>
|
||||
<if test="participantId != null ">participant_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="joinTime != null ">join_time,</if>
|
||||
<if test="reservationId != null ">reservation_id,</if>
|
||||
<if test="participantName != null and participantName != ''">participant_name,</if>
|
||||
<if test="participantPhone != null and participantPhone != ''">participant_phone,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">#{id},</if>
|
||||
<if test="userId != null ">#{userId},</if>
|
||||
<if test="participantId != null ">#{participantId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="joinTime != null ">#{joinTime},</if>
|
||||
<if test="reservationId != null ">#{reservationId},</if>
|
||||
<if test="participantName != null and participantName != ''">#{participantName},</if>
|
||||
<if test="participantPhone != null and participantPhone != ''">#{participantPhone},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateReservationPerson" parameterType="ReservationPerson">
|
||||
UPDATE tb_reservation_person
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null ">user_id = #{userId},</if>
|
||||
<if test="participantId != null ">participant_id = #{participantId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="joinTime != null ">join_time = #{joinTime},</if>
|
||||
<if test="reservationId != null ">reservation_id = #{reservationId},</if>
|
||||
<if test="participantName != null and participantName != ''">participant_name = #{participantName},</if>
|
||||
<if test="participantPhone != null and participantPhone != ''">participant_phone = #{participantPhone},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteReservationPersonById" parameterType="Long">
|
||||
DELETE FROM tb_reservation_person WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteReservationPersonByIds" parameterType="String">
|
||||
DELETE FROM tb_reservation_person where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -11,11 +11,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="capacityNum" column="capacity_num" />
|
||||
<result property="expandNum" column="expand_num" />
|
||||
<result property="indoorPicUrl" column="indoor_pic_url" />
|
||||
<result property="address" column="address" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endDate" column="end_date" />
|
||||
<result property="priceUnit" column="price_unit" />
|
||||
<result property="duration" column="duration" />
|
||||
<result property="shape" column="shape" />
|
||||
<result property="money" column="money" />
|
||||
<result property="isShow" column="is_show" />
|
||||
<result property="headName" column="head_name" />
|
||||
<result property="headPhone" column="head_phone" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@ -23,11 +27,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="version" column="version" />
|
||||
<result property="deleteFlag" column="delete_flag" />
|
||||
<result property="roomId" column="room_id" />
|
||||
<result property="shape" column="shape" />
|
||||
<result property="isToll" column="is_toll" />
|
||||
<result property="isTicket" column="is_ticket" />
|
||||
<result property="content" column="content" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<sql id="selectRoomContentVo">
|
||||
SELECT id, type, meeting_name, capacity_num, expand_num, indoor_pic_url, start_time, end_date, price_unit, money, is_show, create_by, create_time, update_by, update_time, version, delete_flag, room_id, shape FROM tb_room_content
|
||||
SELECT id, type, meeting_name, capacity_num, expand_num, indoor_pic_url, address, start_time, end_date, duration, shape, money, is_show, head_name, head_phone, create_by, create_time, update_by, update_time, version, delete_flag, room_id, is_toll, is_ticket, content FROM tb_room_content
|
||||
</sql>
|
||||
|
||||
<select id="selectRoomContentList" parameterType="RoomContent" resultMap="RoomContentResult">
|
||||
@ -48,17 +56,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="insertRoomContent" parameterType="RoomContent">
|
||||
INSERT INTO tb_room_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">id,</if>
|
||||
<if test="type != null ">type,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="meetingName != null and meetingName != ''">meeting_name,</if>
|
||||
<if test="capacityNum != null ">capacity_num,</if>
|
||||
<if test="expandNum != null ">expand_num,</if>
|
||||
<if test="indoorPicUrl != null and indoorPicUrl != ''">indoor_pic_url,</if>
|
||||
<if test="address != null and address != ''">address,</if>
|
||||
<if test="startTime != null ">start_time,</if>
|
||||
<if test="endDate != null ">end_date,</if>
|
||||
<if test="priceUnit != null and priceUnit != ''">price_unit,</if>
|
||||
<if test="duration != null ">duration,</if>
|
||||
<if test="shape != null and shape != ''">shape,</if>
|
||||
<if test="money != null and money != ''">money,</if>
|
||||
<if test="isShow != null ">is_show,</if>
|
||||
<if test="headName != null and headName != ''">head_name,</if>
|
||||
<if test="headPhone != null and headPhone != ''">head_phone,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
@ -66,20 +77,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="version != null ">version,</if>
|
||||
<if test="deleteFlag != null ">delete_flag,</if>
|
||||
<if test="roomId != null ">room_id,</if>
|
||||
<if test="shape != null and shape != ''">shape,</if>
|
||||
</trim>
|
||||
<if test="isToll != null ">is_toll,</if>
|
||||
<if test="isTicket != null ">is_ticket,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">#{id},</if>
|
||||
<if test="type != null ">#{type},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="meetingName != null and meetingName != ''">#{meetingName},</if>
|
||||
<if test="capacityNum != null ">#{capacityNum},</if>
|
||||
<if test="expandNum != null ">#{expandNum},</if>
|
||||
<if test="indoorPicUrl != null and indoorPicUrl != ''">#{indoorPicUrl},</if>
|
||||
<if test="address != null and address != ''">#{address},</if>
|
||||
<if test="startTime != null ">#{startTime},</if>
|
||||
<if test="endDate != null ">#{endDate},</if>
|
||||
<if test="priceUnit != null and priceUnit != ''">#{priceUnit},</if>
|
||||
<if test="duration != null ">#{duration},</if>
|
||||
<if test="shape != null and shape != ''">#{shape},</if>
|
||||
<if test="money != null and money != ''">#{money},</if>
|
||||
<if test="isShow != null ">#{isShow},</if>
|
||||
<if test="headName != null and headName != ''">#{headName},</if>
|
||||
<if test="headPhone != null and headPhone != ''">#{headPhone},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
@ -87,23 +103,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="version != null ">#{version},</if>
|
||||
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||||
<if test="roomId != null ">#{roomId},</if>
|
||||
<if test="shape != null and shape != ''">#{shape},</if>
|
||||
</trim>
|
||||
<if test="isToll != null ">#{isToll},</if>
|
||||
<if test="isTicket != null ">#{isTicket},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRoomContent" parameterType="RoomContent">
|
||||
UPDATE tb_room_content
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="type != null ">type = #{type},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="meetingName != null and meetingName != ''">meeting_name = #{meetingName},</if>
|
||||
<if test="capacityNum != null ">capacity_num = #{capacityNum},</if>
|
||||
<if test="expandNum != null ">expand_num = #{expandNum},</if>
|
||||
<if test="indoorPicUrl != null and indoorPicUrl != ''">indoor_pic_url = #{indoorPicUrl},</if>
|
||||
<if test="address != null and address != ''">address = #{address},</if>
|
||||
<if test="startTime != null ">start_time = #{startTime},</if>
|
||||
<if test="endDate != null ">end_date = #{endDate},</if>
|
||||
<if test="priceUnit != null and priceUnit != ''">price_unit = #{priceUnit},</if>
|
||||
<if test="duration != null ">duration = #{duration},</if>
|
||||
<if test="shape != null and shape != ''">shape = #{shape},</if>
|
||||
<if test="money != null and money != ''">money = #{money},</if>
|
||||
<if test="isShow != null ">is_show = #{isShow},</if>
|
||||
<if test="headName != null and headName != ''">head_name = #{headName},</if>
|
||||
<if test="headPhone != null and headPhone != ''">head_phone = #{headPhone},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
@ -111,7 +133,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="version != null ">version = #{version},</if>
|
||||
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||||
<if test="roomId != null ">room_id = #{roomId},</if>
|
||||
<if test="shape != null and shape != ''">shape = #{shape},</if>
|
||||
<if test="isToll != null ">is_toll = #{isToll},</if>
|
||||
<if test="isTicket != null ">is_ticket = #{isTicket},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
@ -75,5 +75,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="serveTime" column="serve_time" />
|
||||
<result property="remake" column="remake" />
|
||||
<result property="pic" column="pic" />
|
||||
<result property="money" column="money" />
|
||||
<result property="content" column="content" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRoomServeVo">
|
||||
SELECT id, serve_name, serve_type, serve_time, remake, create_by, create_time, update_by, update_time, version, delete_flag,pic,content FROM tb_room_serve
|
||||
SELECT id, serve_name, serve_type, serve_time, remake,money, create_by, create_time, update_by, update_time, version, delete_flag,pic,content FROM tb_room_serve
|
||||
</sql>
|
||||
|
||||
<select id="selectRoomServeList" parameterType="RoomServe" resultMap="RoomServeResult">
|
||||
@ -44,19 +45,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="serveTime != null and serveTime != ''">serve_time,</if>
|
||||
<if test="remake != null and remake != ''">remake,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="money != null and money != ''">money,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
<if test="version != null ">version,</if>
|
||||
<if test="deleteFlag != null ">delete_flag,</if>
|
||||
<if test="pic != null ">pic,</if>
|
||||
<if test="content != null ">content,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="serveName != null and serveName != ''">#{serveName},</if>
|
||||
<if test="serveType != null ">#{serveType},</if>
|
||||
<if test="serveTime != null and serveTime != ''">#{serveTime},</if>
|
||||
<if test="remake != null and remake != ''">#{remake},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="money != null and money != ''">#{money},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
@ -64,7 +68,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="version != null ">#{version},</if>
|
||||
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
||||
<if test="pic != null ">#{pic},</if>
|
||||
<if test="content != null ">#{content},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -76,13 +79,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="serveTime != null and serveTime != ''">serve_time = #{serveTime},</if>
|
||||
<if test="remake != null and remake != ''">remake = #{remake},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="money != null and money != ''">money = #{money},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="version != null ">version = #{version},</if>
|
||||
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
||||
<if test="pic != null ">pic = #{pic},</if>
|
||||
<if test="content != null ">content = #{content},</if>
|
||||
</trim>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
@ -9,7 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="title" column="title" />
|
||||
<result property="content" column="content" />
|
||||
<result property="type" column="type" />
|
||||
<result property="money" column="money" />
|
||||
<result property="duration" column="duration" />
|
||||
<result property="address" column="address" />
|
||||
<result property="isVerification" column="is_verification" />
|
||||
<result property="isShow" column="is_show" />
|
||||
@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTicketVo">
|
||||
SELECT id, title, content, type, money, address, is_verification, is_show, start_time, end_date, remark, is_default, version, delete_flag, create_by, create_time, update_by, update_time FROM tb_ticket
|
||||
SELECT id, title, content, type, duration, address, is_verification, is_show, start_time, end_date, remark, is_default, version, delete_flag, create_by, create_time, update_by, update_time FROM tb_ticket
|
||||
</sql>
|
||||
|
||||
<select id="selectTicketList" parameterType="Ticket" resultMap="TicketResult">
|
||||
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="title != null and title != ''">title,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="type != null ">type,</if>
|
||||
<if test="money != null and money != ''">money,</if>
|
||||
<if test="duration != null and duration != ''">duration,</if>
|
||||
<if test="address != null and address != ''">address,</if>
|
||||
<if test="isVerification != null ">is_verification,</if>
|
||||
<if test="isShow != null ">is_show,</if>
|
||||
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="title != null and title != ''">#{title},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="type != null ">#{type},</if>
|
||||
<if test="money != null and money != ''">#{money},</if>
|
||||
<if test="duration != null and duration != ''">#{duration},</if>
|
||||
<if test="address != null and address != ''">#{address},</if>
|
||||
<if test="isVerification != null ">#{isVerification},</if>
|
||||
<if test="isShow != null ">#{isShow},</if>
|
||||
@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="title != null and title != ''">title = #{title},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
<if test="type != null ">type = #{type},</if>
|
||||
<if test="money != null and money != ''">money = #{money},</if>
|
||||
<if test="duration != null and duration != ''">duration = #{duration},</if>
|
||||
<if test="address != null and address != ''">address = #{address},</if>
|
||||
<if test="isVerification != null ">is_verification = #{isVerification},</if>
|
||||
<if test="isShow != null ">is_show = #{isShow},</if>
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.ics.common.core.domain.dto;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@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;//访客有效结束时间
|
||||
|
||||
private List<FacesDto> faces;
|
||||
}
|
@ -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,168 @@
|
||||
package com.ics.common.utils;
|
||||
|
||||
|
||||
import cn.hutool.core.img.ImgUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
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.core.domain.dto.FacesDto;
|
||||
import com.ics.common.json.JsonUtils;
|
||||
import org.apache.poi.ss.util.ImageUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
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();
|
||||
|
||||
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 String addFaces() {
|
||||
String url = DEVICE_IP + "/api/viso/v2/addFaces";
|
||||
ArrayList<FacesDto> faceDtos = new ArrayList<>();
|
||||
DevicePersonDto devicePersonDto = new DevicePersonDto();
|
||||
devicePersonDto.setPersonId("010");
|
||||
FacesDto facesDto = new FacesDto();
|
||||
facesDto.setFaceId("001");
|
||||
//照片 base64位
|
||||
// facesDto.setData();
|
||||
|
||||
// BufferedImage bufferedImage = ImgUtil.toImage(base64ImagStr);
|
||||
// // 这块也可以直接通过传入一个image对象,
|
||||
// Image scaleImage = ImgUtil.scale(bufferedImage, 0.2f);
|
||||
// ImgUtil.toBase64(), "facesDto");
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ics.common.utils;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import org.apache.logging.log4j.util.Base64Util;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @Author ekkcole
|
||||
* @remark 图片链接转为base64编码
|
||||
*/
|
||||
public class UrlToBase64Util {
|
||||
|
||||
//base64前缀
|
||||
private static final String BASE64_PREFIX="data:image/png;base64,";
|
||||
|
||||
// public static void main(String[] args) throws Exception {
|
||||
// String url="https://localhost:8080/upload/file/20221101/test.png";
|
||||
// System.out.println(BASE64_PREFIX+imageUrlToBase64(url));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 图片URL转Base64编码
|
||||
*
|
||||
* @param imgUrl 图片URL
|
||||
* @return Base64编码
|
||||
*/
|
||||
public static String imageUrlToBase64(String imgUrl) {
|
||||
InputStream is = null;
|
||||
ByteArrayOutputStream outStream = null;
|
||||
try {
|
||||
if (!ObjectUtils.isEmpty(imgUrl)) {
|
||||
HttpResponse res = HttpRequest.get(imgUrl).execute();
|
||||
// 获取输入流
|
||||
is = res.bodyStream();
|
||||
outStream = new ByteArrayOutputStream();
|
||||
//创建一个Buffer字符串
|
||||
byte[] buffer = new byte[1024];
|
||||
//每次读取的字符串长度,如果为-1,代表全部读取完毕
|
||||
int len = 0;
|
||||
//使用输入流从buffer里把数据读取出来
|
||||
while ((len = is.read(buffer)) != -1) {
|
||||
//用输出流往buffer里写入数据,中间参数代表从哪个位置开始读,len代表读取的长度
|
||||
outStream.write(buffer, 0, len);
|
||||
}
|
||||
// 对字节数组Base64编码
|
||||
return encode(outStream.toByteArray());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (is != null) {
|
||||
is.close();
|
||||
}
|
||||
if (outStream != null) {
|
||||
outStream.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片转字符串
|
||||
*
|
||||
* @param image 图片Buffer
|
||||
* @return Base64编码
|
||||
*/
|
||||
public static String encode(byte[] image) {
|
||||
return replaceEnter(Base64.encodeBase64String(image));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 字符替换
|
||||
*
|
||||
* @param str 字符串
|
||||
* @return 替换后的字符串
|
||||
*/
|
||||
public static String replaceEnter(String str) {
|
||||
String reg = "[\n-\r]";
|
||||
Pattern p = Pattern.compile(reg);
|
||||
Matcher m = p.matcher(str);
|
||||
return m.replaceAll("");
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,10 @@
|
||||
package com.ics.system.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
||||
import com.ics.system.handlers.MyMetaObjectHandler;
|
||||
import com.ics.system.handlers.MyParkLineHandler;
|
||||
@ -22,6 +24,7 @@ public class MybatisPlusConfig {
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||
interceptor.addInnerInterceptor(blockAttackInnerInterceptor());
|
||||
interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor());
|
||||
interceptor.addInnerInterceptor(tenantLineInnerInterceptor());
|
||||
|
@ -81,6 +81,8 @@ public class User extends BaseEntity<User> {
|
||||
@NotBlank(message = "登录名称不能为空")
|
||||
private String username;
|
||||
|
||||
private String customerId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
|
@ -161,4 +161,6 @@ public interface UserMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
int insertAppUser(User user);
|
||||
|
||||
User selectUserByCustomer(Long id);
|
||||
}
|
||||
|
@ -201,4 +201,5 @@ public interface IUserService {
|
||||
*/
|
||||
Set<Long> selectUserIdsInDepts(Long[] deptIds);
|
||||
|
||||
User selectUserByCustomer(Long id);
|
||||
}
|
||||
|
@ -412,4 +412,10 @@ public class UserServiceImpl implements IUserService {
|
||||
return ArrayUtil.isNotEmpty(deptIds) ? userMapper.selectUserIdsInDepts(deptIds) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public User selectUserByCustomer(Long id) {
|
||||
|
||||
return userMapper.selectUserByCustomer(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="parkId" column="park_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="staffId" column="staff_id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<association property="dept" column="id" javaType="com.ics.system.domain.Dept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
<collection property="roleIds" javaType="java.util.List" resultMap="RoleIdsResult" />
|
||||
@ -72,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
u.login_date,
|
||||
u.create_time,
|
||||
u.tenant_id,
|
||||
u.customer_id,
|
||||
u.park_id,
|
||||
u.staff_id,
|
||||
d.id AS dept_id,
|
||||
@ -108,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
u.salt,
|
||||
u.status,
|
||||
u.login_ip,
|
||||
u.customer_id,
|
||||
u.login_date,
|
||||
u.create_by,
|
||||
u.create_time,
|
||||
@ -266,6 +269,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="selectUserByCustomer" resultType="com.ics.system.domain.User">
|
||||
select u.username,
|
||||
u.nickname,
|
||||
u.email,
|
||||
u.mobile,
|
||||
u.status,
|
||||
u.staff_id,
|
||||
u.customer_id
|
||||
from sys_user u
|
||||
where u.customer_id = #{id}
|
||||
</select>
|
||||
|
||||
<delete id="deleteUserById" parameterType="Long">
|
||||
DELETE FROM sys_user WHERE id = #{id}
|
||||
@ -293,6 +307,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="mobile != null and mobile != ''">mobile,</if>
|
||||
<if test="gender != null and gender != ''">gender,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="customerId != null and customerId != ''">customer_id,</if>
|
||||
<if test="salt != null and salt != ''">salt,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
@ -312,6 +327,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="mobile != null and mobile != ''">#{mobile},</if>
|
||||
<if test="customerId != null and customerId != ''">#{customerId},</if>
|
||||
<if test="gender != null and gender != ''">#{gender},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="salt != null and salt != ''">#{salt},</if>
|
||||
@ -336,6 +352,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="openid != null and openid != ''">openid,</if>
|
||||
<if test="avatar != null ">avatar,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="customerId != null and customerId != ''">customer_id,</if>
|
||||
<if test="mobile != null and mobile != ''">mobile,</if>
|
||||
<if test="gender != null and gender != ''">gender,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
@ -358,6 +375,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="mobile != null and mobile != ''">#{mobile},</if>
|
||||
<if test="customerId != null and customerId != ''">#{customerId},</if>
|
||||
<if test="gender != null and gender != ''">#{gender},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="salt != null and salt != ''">#{salt},</if>
|
||||
@ -381,6 +399,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="email != null and email != ''">email = #{email},</if>
|
||||
<if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
|
||||
<if test="gender != null and gender != ''">gender = #{gender},</if>
|
||||
<if test="customerId != null and customerId != ''">customer_id = #{customerId},</if>
|
||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="salt != null and salt != ''">salt = #{salt},</if>
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.ics.controller.mobile.meeting;
|
||||
|
||||
import com.ics.admin.controller.meeting.UserEquipmentController;
|
||||
import com.ics.admin.domain.meeting.UserEquipment;
|
||||
import com.ics.admin.service.meeting.IUserEquipmentService;
|
||||
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.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/equipment")
|
||||
public class ApiEquipmentController extends BaseController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private IUserEquipmentService userEquipmentService;
|
||||
|
||||
//根据用户id查询对应的设备, 楼层分割,房间,设备信息,
|
||||
@GetMapping("/getEquipmentByUserId/{userId}")
|
||||
public R getEquipmentByUserId(String userId){
|
||||
|
||||
return R.ok().put("data",userEquipmentService.getEquipmentByUserId(userId));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,22 +1,30 @@
|
||||
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.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 cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.ics.admin.domain.BuildingDetail;
|
||||
import com.ics.admin.domain.IcsCustomerStaff;
|
||||
import com.ics.admin.domain.Park;
|
||||
import com.ics.admin.domain.Room;
|
||||
import com.ics.admin.domain.meeting.*;
|
||||
import com.ics.admin.domain.meeting.vo.MeetingAmountVo;
|
||||
import com.ics.admin.domain.meeting.vo.UserCustomerVo;
|
||||
import com.ics.admin.mapper.meeting.RoomContentMapper;
|
||||
import com.ics.admin.service.*;
|
||||
import com.ics.admin.service.meeting.*;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.page.PageDomain;
|
||||
import com.ics.common.core.page.TableSupport;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -31,6 +39,33 @@ public class ApiRoomContentController extends BaseController {
|
||||
@Autowired
|
||||
private ICustomerTicketService customerTicketService;
|
||||
|
||||
@Autowired
|
||||
private IReservationService reservationService;
|
||||
|
||||
@Autowired
|
||||
private IReservationPersonService reservationPersonService;
|
||||
|
||||
@Autowired
|
||||
private ICustomerService customerService;
|
||||
|
||||
@Autowired
|
||||
private RoomContentMapper roomContentMapper;
|
||||
|
||||
@Autowired
|
||||
private IRoomService roomService;
|
||||
|
||||
@Autowired
|
||||
private IBuildingDetailService buildingDetailService;
|
||||
|
||||
@Autowired
|
||||
private IIcsCustomerStaffService customerStaffService;
|
||||
|
||||
@Autowired
|
||||
private ITicketService ticketService;
|
||||
|
||||
@Autowired
|
||||
private IParkService parkService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询条件筛选
|
||||
@ -66,12 +101,11 @@ public class ApiRoomContentController extends BaseController {
|
||||
/**
|
||||
* 优惠卷列表
|
||||
*/
|
||||
@GetMapping("/getCustomerTicket")
|
||||
public R getCustomerTicket() {
|
||||
@PostMapping("/getCustomerTicket")
|
||||
public R getCustomerTicket(@RequestBody UserCustomerVo userCustomerVo) {
|
||||
//根据用户获取对应的企业id,查询该企业下对应的优惠卷
|
||||
long userId = getCurrentUserId();
|
||||
|
||||
List<CustomerTicket> list = customerTicketService.getCustomerTicket(userId);
|
||||
List<CustomerTicket> list = customerTicketService.getCustomerTicket(userCustomerVo);
|
||||
|
||||
return R.ok().put("data",list);
|
||||
}
|
||||
@ -80,6 +114,193 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 会议预约记录
|
||||
*/
|
||||
@PostMapping("/saveMeetingRecord")
|
||||
public R getMeetingRoomRecord(@RequestBody Reservation reservation) {
|
||||
//根据用户获取对应的企业id,查询该企业下对应的优惠卷
|
||||
reservation.setStauts(Reservation.Status.TO_BE_PAID);
|
||||
reservation.setOderNumber(RandomUtil.randomNumbers(8));
|
||||
boolean b = reservationService.selectFreeMeetingRoom(reservation);
|
||||
Assert.isFalse(b, "会议室不可用");
|
||||
boolean save = reservationService.save(reservation);
|
||||
if (save){
|
||||
if (null !=reservation.getTicketId()){
|
||||
CustomerTicket customerTicket =new CustomerTicket();
|
||||
customerTicket.setTicketId(reservation.getTicketId());
|
||||
customerTicket.setCustomerId(reservation.getCustomerId());
|
||||
customerTicket.setStaffId(reservation.getUserId());
|
||||
customerTicketService.updateCustomerTicketBYUserId(customerTicket);
|
||||
}
|
||||
}
|
||||
Long id = reservation.getId();
|
||||
return toAjax(save).put("reservationId",id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据会议室id查询所有的会议室服务与设备
|
||||
*/
|
||||
@GetMapping("/getMeetingRoomServiceAndEquipment/{meetingRoomId}")
|
||||
public R getMeetingRoomServiceAndEquipment(@PathVariable("meetingRoomId") Long meetingRoomId) {
|
||||
//根据用户获取对应的企业id,查询该企业下对应的优惠卷
|
||||
Map<String,Object> map = roomContentService.selectMeetingRoomServiceAndEquipment(meetingRoomId);
|
||||
return R.ok().put("data",map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算会议室金额
|
||||
*/
|
||||
@PostMapping("/calculateMeetingRoomAmount")
|
||||
public R calculateMeetingRoomAmount(@RequestBody Reservation reservation) {
|
||||
//根据用户获取对应的企业id,查询该企业下对应的优惠卷
|
||||
MeetingAmountVo amount = reservationService.calculateMeetingRoomAmount(reservation);
|
||||
return R.ok().put("amount",amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 预约列表
|
||||
*/
|
||||
@PostMapping("selectReservationListByUserId")
|
||||
public R selectReservationListByUserId(@RequestBody Reservation reservation){
|
||||
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Integer pageNum = pageDomain.getPageNum();
|
||||
Integer pageSize = pageDomain.getPageSize();
|
||||
IPage<Reservation> list = reservationService.selectReservationListByUserId(reservation,pageNum,pageSize);
|
||||
|
||||
return R.ok().put("page",list);
|
||||
}
|
||||
|
||||
// 根据id查询预约信息
|
||||
@GetMapping("selectReservationById/{id}")
|
||||
public R selectReservationById(@PathVariable("id") Long id){
|
||||
Reservation reservation = reservationService.selectReservationById(id);
|
||||
reservation.setStatusValue(reservation.getStauts().getValue());
|
||||
reservation.setStatusName(reservation.getStauts().getName());
|
||||
IcsCustomerStaff icsCustomerStaff = customerStaffService.selectIcsCustomerStaffById(reservation.getUserId());
|
||||
if(null != icsCustomerStaff){
|
||||
reservation.setUserName(icsCustomerStaff.getUsername());
|
||||
reservation.setPhone(icsCustomerStaff.getMobile());
|
||||
reservation.setAvatar(icsCustomerStaff.getAvatar());
|
||||
}
|
||||
|
||||
Ticket ticket = ticketService.selectTicketById(reservation.getTicketId());
|
||||
if(null != ticket){
|
||||
reservation.setTicketName(ticket.getTitle());
|
||||
}
|
||||
|
||||
Long roomContentId = reservation.getRoomContentId();
|
||||
RoomContent roomContent = roomContentMapper.selectById(roomContentId);
|
||||
Room room = roomService.selectRoomById(roomContent.getRoomId());
|
||||
if (room != null) {
|
||||
roomContent.setTypeValue(roomContent.getType().getValue());
|
||||
roomContent.setTypeName(roomContent.getType().getName());
|
||||
roomContent.setRoomName(room.getName());
|
||||
roomContent.setArea(room.getArea());
|
||||
roomContent.setRenArea(room.getRentArea());
|
||||
//查询楼层号
|
||||
BuildingDetail buildingDetail = buildingDetailService.selectBuildingDetailById(room.getBuildingDetailId());
|
||||
if (buildingDetail != null) {
|
||||
roomContent.setBuildingName(buildingDetail.getFloorName() +"F");
|
||||
}
|
||||
}
|
||||
reservation.setRoomContent(roomContent);
|
||||
return R.ok().put("data",reservation);
|
||||
}
|
||||
|
||||
/*
|
||||
获取坐标信息
|
||||
*/
|
||||
@GetMapping("/selectCoordinate")
|
||||
public R selectCoordinate() {
|
||||
//根据用户获取对应的企业id,查询该企业下对应的优惠卷
|
||||
Park park = parkService.selectParkById(1L);
|
||||
|
||||
return R.ok().put("lat",park.getLat()).put("lng",park.getLng()).put("address",park.getAddress());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断预约参观人员
|
||||
*/
|
||||
@PostMapping("/isVisitor")
|
||||
public R isVisitor(@RequestBody ReservationPerson reservationPerson) {
|
||||
|
||||
ReservationPerson visitor = reservationPersonService.isVisitor(reservationPerson);
|
||||
if (visitor != null){
|
||||
return R.error(500,"该人员已预约");
|
||||
}
|
||||
return R.ok("该人员未预约");
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加 预约参观人员
|
||||
*/
|
||||
@PostMapping("/addVisitor")
|
||||
public R addVisitor(@RequestBody ReservationPerson reservationPerson) {
|
||||
|
||||
reservationPerson.setStatus("1");
|
||||
reservationPerson.setJoinTime(new Date());
|
||||
int i = reservationPersonService.insertReservationPerson(reservationPerson);
|
||||
if (i > 0){
|
||||
return R.ok("预约成功");
|
||||
}
|
||||
return R.ok("该人员未预约");
|
||||
}
|
||||
|
||||
//取消订单
|
||||
@PostMapping("/cancelOrder")
|
||||
public R cancelOrder(@RequestBody Reservation reservation) {
|
||||
|
||||
Assert.notNull(reservation.getId(),"当前预约信息不存在");
|
||||
reservation.setStauts(Reservation.Status.CANCELED);
|
||||
reservation.setCancelTime(new Date());
|
||||
int i = reservationService.updateReservation(reservation);
|
||||
return toAjax(i);
|
||||
}
|
||||
|
||||
//支付订单
|
||||
@PostMapping("/payOrder")
|
||||
public R payOrder(@RequestBody Reservation reservation) {
|
||||
Reservation reservation1 = reservationService.selectReservationById(reservation.getId());
|
||||
Reservation.Status stauts = reservation1.getStauts();
|
||||
System.out.println(stauts);
|
||||
Assert.isFalse(reservation1.getStauts().equals(Reservation.Status.APPOINTMENT),"您已经支付成功,请勿重复支付");
|
||||
|
||||
Assert.notNull(reservation.getId(),"当前预约信息不存在");
|
||||
reservation.setStauts(Reservation.Status.APPOINTMENT);
|
||||
reservation.setOrderTime(new Date());
|
||||
int i = reservationService.updateReservation(reservation);
|
||||
return toAjax(i);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,21 +1,33 @@
|
||||
package com.ics.controller.mobile.meeting;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.ics.admin.domain.BuildingDetail;
|
||||
import com.ics.admin.domain.Customer;
|
||||
import com.ics.admin.domain.IcsCustomerStaff;
|
||||
import com.ics.admin.domain.Room;
|
||||
import com.ics.admin.domain.meeting.Reservation;
|
||||
import com.ics.admin.domain.meeting.ReservationPerson;
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.ics.admin.domain.meeting.VisitorPerson;
|
||||
import com.ics.admin.mapper.meeting.RoomContentMapper;
|
||||
import com.ics.admin.service.IBuildingDetailService;
|
||||
import com.ics.admin.service.ICustomerService;
|
||||
import com.ics.admin.service.IIcsCustomerStaffService;
|
||||
import com.ics.admin.service.IRoomService;
|
||||
import com.ics.admin.service.meeting.IReservationPersonService;
|
||||
import com.ics.admin.service.meeting.IRoomContentService;
|
||||
import com.ics.admin.service.meeting.IVisitorPersonService;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.core.page.PageDomain;
|
||||
import com.ics.common.core.page.TableSupport;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@ -35,6 +47,19 @@ public class ApiVisitorController extends BaseController {
|
||||
@Autowired
|
||||
private IVisitorPersonService visitorPersonService;
|
||||
|
||||
@Autowired
|
||||
private IReservationPersonService reservationPersonService;
|
||||
|
||||
@Autowired
|
||||
private RoomContentMapper roomContentMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private IRoomService roomService;
|
||||
|
||||
@Autowired
|
||||
private IBuildingDetailService buildingDetailService;
|
||||
|
||||
/**
|
||||
* 获取所有的企业
|
||||
*/
|
||||
@ -93,6 +118,21 @@ public class ApiVisitorController extends BaseController {
|
||||
return toAjax(update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 访客邀请记录
|
||||
*/
|
||||
@GetMapping("selectVisitorInvitationRecord/{userId}")
|
||||
public R selectVisitorInvitationRecord(@PathVariable("userId") Long userId) {
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Integer pageNum = pageDomain.getPageNum();
|
||||
Integer pageSize = pageDomain.getPageSize();
|
||||
|
||||
IPage<Reservation> list = reservationPersonService.selectListByParticipantId(userId,pageNum,pageSize);
|
||||
|
||||
|
||||
return R.ok().put("page",list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user