mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 18:19:36 +08:00
参数调整,查询条件调整
This commit is contained in:
parent
19c43417c0
commit
d76ad5e7ac
@ -93,7 +93,7 @@ public class MeetingReservationController extends BaseController {
|
|||||||
* * floor 所属楼层名称,精确查询
|
* * floor 所属楼层名称,精确查询
|
||||||
* * name 会议室名称,模糊查询
|
* * name 会议室名称,模糊查询
|
||||||
* * typeName 会议室形式,精确查询
|
* * typeName 会议室形式,精确查询
|
||||||
* * device 会议室设备,模糊查询
|
* * devices 多个会议室设备,模糊查询,逻辑与关系
|
||||||
* * capacityNum 容纳人数,精确查询
|
* * capacityNum 容纳人数,精确查询
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
@RequiresPermissions(value = {"mr:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||||
|
@ -4,6 +4,7 @@ import com.ics.admin.domain.MeetingRoom;
|
|||||||
import com.ics.admin.domain.RepairAttach;
|
import com.ics.admin.domain.RepairAttach;
|
||||||
import com.ics.admin.service.IMeetingRoomService;
|
import com.ics.admin.service.IMeetingRoomService;
|
||||||
import com.ics.admin.service.IRepairAttachService;
|
import com.ics.admin.service.IRepairAttachService;
|
||||||
|
import com.ics.admin.utils.MeetingRoomDTO;
|
||||||
import com.ics.admin.vo.MeetingRoomVo;
|
import com.ics.admin.vo.MeetingRoomVo;
|
||||||
import com.ics.common.core.controller.BaseController;
|
import com.ics.common.core.controller.BaseController;
|
||||||
import com.ics.common.core.domain.R;
|
import com.ics.common.core.domain.R;
|
||||||
@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@ -108,26 +110,29 @@ public class MeetingRoomController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增会议室
|
* 新增会议室
|
||||||
* @param files 附件id
|
* files 附件id
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("admin:room:add")
|
@RequiresPermissions("admin:room:add")
|
||||||
@PostMapping("save")
|
@PostMapping("save")
|
||||||
public R addSave(MeetingRoom meetingRoom, String[] files) {
|
public R addSave(@RequestBody MeetingRoomDTO meetingRoomDTO) {
|
||||||
Long userId = getLoginStaffId();
|
Long userId = getLoginStaffId();
|
||||||
meetingRoom.setDeleteFlag(0);
|
meetingRoomDTO.getRoom().setDeleteFlag(0);
|
||||||
meetingRoom.setCreateBy(userId.toString());
|
meetingRoomDTO.getRoom().setCreateBy(userId.toString());
|
||||||
meetingRoom.setCreateTime(new Date());
|
meetingRoomDTO.getRoom().setCreateTime(new Date());
|
||||||
return toAjax(meetingRoomService.insertMeetingRoom(meetingRoom,files));
|
return toAjax(meetingRoomService.insertMeetingRoom(meetingRoomDTO.getRoom(), meetingRoomDTO.getFiles()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改会议室
|
* 修改会议室
|
||||||
* @param files 附件id
|
* files 附件id
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("admin:room:edit")
|
@RequiresPermissions("admin:room:edit")
|
||||||
@PostMapping("update")
|
@PostMapping("update")
|
||||||
public R editSave(MeetingRoom meetingRoom, String[] files) {
|
public R editSave(@RequestBody MeetingRoomDTO meetingRoomDTO) {
|
||||||
return toAjax(meetingRoomService.updateMeetingRoom(meetingRoom, files));
|
Long userId = getLoginStaffId();
|
||||||
|
meetingRoomDTO.getRoom().setUpdateBy(userId.toString());
|
||||||
|
meetingRoomDTO.getRoom().setUpdateTime(new Date());
|
||||||
|
return toAjax(meetingRoomService.updateMeetingRoom(meetingRoomDTO.getRoom(), meetingRoomDTO.getFiles()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,6 +6,7 @@ import com.ics.common.core.controller.BaseController;
|
|||||||
import com.ics.common.core.domain.R;
|
import com.ics.common.core.domain.R;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.wf.jwtp.annotation.RequiresPermissions;
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
@ -55,7 +56,7 @@ public class MeetingUtoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequiresPermissions(value = {"mr:manage:operator"})
|
@RequiresPermissions(value = {"mr:manage:operator"})
|
||||||
@PostMapping("save")
|
@PostMapping("save")
|
||||||
public R addSave(MeetingUto meetingUto) {
|
public R addSave(@RequestBody MeetingUto meetingUto) {
|
||||||
Long userId = getLoginStaffId();
|
Long userId = getLoginStaffId();
|
||||||
meetingUto.setDeleteFlag(0);
|
meetingUto.setDeleteFlag(0);
|
||||||
meetingUto.setCreateBy(userId.toString());
|
meetingUto.setCreateBy(userId.toString());
|
||||||
@ -75,7 +76,7 @@ public class MeetingUtoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@RequiresPermissions(value = {"mr:manage:operator"})
|
@RequiresPermissions(value = {"mr:manage:operator"})
|
||||||
@PostMapping("update")
|
@PostMapping("update")
|
||||||
public R editSave(MeetingUto meetingUto) {
|
public R editSave(@RequestBody MeetingUto meetingUto) {
|
||||||
Long userId = getLoginStaffId();
|
Long userId = getLoginStaffId();
|
||||||
meetingUto.setUpdateBy(userId.toString());
|
meetingUto.setUpdateBy(userId.toString());
|
||||||
meetingUto.setUpdateTime(new Date());
|
meetingUto.setUpdateTime(new Date());
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.ics.admin.utils;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.MeetingRoom;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* created at 2024-9-25 9:21
|
||||||
|
*
|
||||||
|
* @author lujiang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MeetingRoomDTO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -202409220922L;
|
||||||
|
|
||||||
|
private MeetingRoom room;
|
||||||
|
|
||||||
|
private String[] files;
|
||||||
|
}
|
@ -66,6 +66,9 @@ public class MeetingRoomVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String device;
|
private String device;
|
||||||
|
|
||||||
|
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||||
|
private String[] devices;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 房间号
|
* 房间号
|
||||||
*/
|
*/
|
||||||
|
@ -53,7 +53,9 @@
|
|||||||
<if test="floor != null and floor != ''"> AND room.floor = #{floor}</if>
|
<if test="floor != null and floor != ''"> AND room.floor = #{floor}</if>
|
||||||
<if test="name != null and name != ''"> AND room.name LIKE CONCAT('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> AND room.name LIKE CONCAT('%', #{name}, '%')</if>
|
||||||
<if test="typeName != null and typeName != ''"> AND room.type_name = #{typeName}</if>
|
<if test="typeName != null and typeName != ''"> AND room.type_name = #{typeName}</if>
|
||||||
<if test="device != null and device != ''"> AND room.device LIKE CONCAT('%', #{device}, '%')</if>
|
<foreach item="dev" collection="devices">
|
||||||
|
AND device LIKE CONCAT('%', #{dev}, '%')
|
||||||
|
</foreach>
|
||||||
<if test="capacityNum != null"> AND room.capacity_num = #{capacityNum}</if>
|
<if test="capacityNum != null"> AND room.capacity_num = #{capacityNum}</if>
|
||||||
order by room_num
|
order by room_num
|
||||||
</select>
|
</select>
|
||||||
@ -88,11 +90,10 @@
|
|||||||
<if test="floor != null and floor != ''"> AND floor = #{floor}</if>
|
<if test="floor != null and floor != ''"> AND floor = #{floor}</if>
|
||||||
<if test="name != null and name != ''"> AND name LIKE CONCAT('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> AND name LIKE CONCAT('%', #{name}, '%')</if>
|
||||||
<if test="typeName != null and typeName != ''"> AND type_name = #{typeName}</if>
|
<if test="typeName != null and typeName != ''"> AND type_name = #{typeName}</if>
|
||||||
<if test="device != null and device != ''"> AND device LIKE CONCAT('%', #{device}, '%')</if>
|
<if test="device != null and device != ''"> AND room.device LIKE CONCAT('%', #{device}, '%')</if>
|
||||||
<if test="capacityNum != null"> AND capacity_num = #{capacityNum}</if>
|
<if test="capacityNum != null"> AND capacity_num = #{capacityNum}</if>
|
||||||
<if test="status != null"> AND status = #{status}</if>
|
<if test="status != null"> AND status = #{status}</if>
|
||||||
<if test="filterDate != null and filterDate != ''"> AND start LIKE CONCAT(#{filterDate}, '%')</if>
|
<if test="filterDate != null and filterDate != ''"> AND start LIKE CONCAT(#{filterDate}, '%')</if>
|
||||||
|
|
||||||
order by start desc,status
|
order by start desc,status
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user