mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 05:39:36 +08:00
修改了对应的bug
This commit is contained in:
parent
2147a836eb
commit
0d72f65a20
@ -480,7 +480,7 @@ public class CustomerStaffController extends BaseController {
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
Equipment equipment1 = new Equipment();
|
||||
equipment1.setParkId(parkId);
|
||||
equipment1.setTenantId(tenantId);
|
||||
// equipment1.setTenantId(tenantId);
|
||||
|
||||
//根据园区id 查询所有的设备信息
|
||||
List<Equipment> equipment = equipmentService.selectEquipmentList(equipment1);
|
||||
|
@ -125,7 +125,7 @@ public class EquipmentController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
equipment.setParkId(parkId);
|
||||
equipment.setTenantId(tenantId);
|
||||
// equipment.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
@ -385,7 +385,6 @@ public class EquipmentController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
customerStaff.setParkId(parkId);
|
||||
customerStaff.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
@ -425,7 +424,7 @@ public class EquipmentController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
userEquipment.setParkId(parkId);
|
||||
userEquipment.setTenantId(tenantId);
|
||||
// userEquipment.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
|
@ -160,7 +160,7 @@ public class ReservationController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
reservation.setParkId(parkId);
|
||||
reservation.setTenantId(tenantId);
|
||||
// reservation.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
|
@ -106,14 +106,14 @@ public class RoomContentController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
roomContent.setParkId(parkId);
|
||||
roomContent.setTenantId(tenantId);
|
||||
// roomContent.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
roomContent.setParkId(parkId);
|
||||
roomContent.setTenantId(tenantId);
|
||||
// roomContent.setTenantId(tenantId);
|
||||
|
||||
// User user = userService.selectUserById(getCurrentUserId());
|
||||
// if (null != user.getCustomerId()){
|
||||
@ -314,7 +314,7 @@ public class RoomContentController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
roomContent.setParkId(parkId);
|
||||
roomContent.setTenantId(tenantId);
|
||||
// roomContent.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
@ -322,7 +322,7 @@ public class RoomContentController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
roomContent.setParkId(parkId);
|
||||
roomContent.setTenantId(tenantId);
|
||||
// roomContent.setTenantId(tenantId);
|
||||
|
||||
// User user = userService.selectUserById(getCurrentUserId());
|
||||
// if (null != user.getCustomerId()){
|
||||
|
@ -52,7 +52,7 @@ public class RoomItemController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
roomItem.setParkId(parkId);
|
||||
roomItem.setTenantId(tenantId);
|
||||
// roomItem.setTenantId(tenantId);
|
||||
}
|
||||
return result(roomItemService.selectRoomItemList(roomItem));
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class RoomServeController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
roomServe.setParkId(parkId);
|
||||
roomServe.setTenantId(tenantId);
|
||||
// roomServe.setTenantId(tenantId);
|
||||
}
|
||||
|
||||
return result(roomServeService.selectRoomServeList(roomServe));
|
||||
|
@ -92,7 +92,7 @@ public class ShowroomController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
showroom.setParkId(parkId);
|
||||
showroom.setTenantId(tenantId);
|
||||
// showroom.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
@ -161,6 +161,7 @@ public class ShowroomController extends BaseController {
|
||||
@GetMapping("/showroomList")
|
||||
public R roomContentList(Showroom showroom) {
|
||||
|
||||
|
||||
if (null != showroom.getBuildingId()){
|
||||
List<Room> rooms = roomService.selectRoomByBuildingId(showroom.getBuildingId());
|
||||
if (CollUtil.isNotEmpty(rooms)){
|
||||
@ -173,7 +174,7 @@ public class ShowroomController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
showroom.setParkId(parkId);
|
||||
showroom.setTenantId(tenantId);
|
||||
// showroom.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
|
@ -148,7 +148,7 @@ public class ShowroomRecordController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
showroomRecord.setParkId(parkId);
|
||||
showroomRecord.setTenantId(tenantId);
|
||||
// showroomRecord.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
|
@ -107,7 +107,7 @@ public class TicketController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
ticket.setParkId(parkId);
|
||||
ticket.setTenantId(tenantId);
|
||||
// ticket.setTenantId(tenantId);
|
||||
}
|
||||
|
||||
List<Ticket> tickets = ticketService.selectTicketList(ticket);
|
||||
|
@ -142,7 +142,7 @@ public class VisitorPersonController extends BaseController {
|
||||
Long parkId = currentUserService.getParkId();
|
||||
Long tenantId = currentUserService.getTenantId();
|
||||
visitorPerson.setParkId(parkId);
|
||||
visitorPerson.setTenantId(tenantId);
|
||||
// visitorPerson.setTenantId(tenantId);
|
||||
}
|
||||
boolean b = SubjectUtil.hasRole(getRequest(),"admin");
|
||||
if (b){
|
||||
@ -318,14 +318,6 @@ public class VisitorPersonController extends BaseController {
|
||||
//则删除设备中的人员信息
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return toAjax(visitorPersonService.updateReservationPerson(visitorPerson));
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ public class ReservationServiceImpl extends ServiceImpl<ReservationMapper, Reser
|
||||
public List<Reservation> selectByRoomContent(RoomContent roomContent) {
|
||||
QueryWrapper<Reservation> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("room_content_id",roomContent.getId());
|
||||
queryWrapper.gt("start_time",new Date());
|
||||
// queryWrapper.gt("start_time",new Date());
|
||||
return reservationMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="name != null and name != ''"> AND cs.name LIKE CONCAT('%', #{name}, '%') </if>
|
||||
<if test="parkId != null and parkId != ''"> AND icc.park_id = #{parkId} </if>
|
||||
<if test="tenantId != null and tenantId != ''"> AND cs.tenant_id = #{tenantId} </if>
|
||||
<if test="dataType != null and dataType != ''"> AND cs.data_type = #{dataType} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -249,6 +249,18 @@ public class DeviceUtils {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*获取定期清理过期访客配置
|
||||
*/
|
||||
public static String getCleanExpiredPersonConfig(String ip) {
|
||||
String url = ip + "/api/viso/v2/getCleanExpiredPersonConfig";
|
||||
|
||||
String msg = HttpUtil.post(url,"");
|
||||
log.info("获取定期清理过期访客配置:{}", msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 记录查询
|
||||
*/
|
||||
|
@ -0,0 +1,31 @@
|
||||
package com.ics.quartz.task;
|
||||
|
||||
import com.ics.admin.domain.meeting.Equipment;
|
||||
import com.ics.admin.service.meeting.IEquipmentService;
|
||||
import com.ics.common.utils.DeviceUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Component("visitorPersonTask")
|
||||
public class VisitorPersonTask {
|
||||
|
||||
@Autowired
|
||||
private IEquipmentService equipmentService;
|
||||
|
||||
|
||||
/**
|
||||
* 删除已经过期的访客信息
|
||||
*/
|
||||
public void deleteExpiredVisitorPerson(){
|
||||
List<Equipment> equipment = equipmentService.selectEquipmentList(new Equipment());
|
||||
for (Equipment equipment1 : equipment) {
|
||||
String cleanExpiredPersonConfig = DeviceUtils.getCleanExpiredPersonConfig(equipment1.getIp());
|
||||
log.info("清除过期访客信息配置:{}",cleanExpiredPersonConfig);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -170,7 +170,9 @@ public class ApiVisitorController extends BaseController {
|
||||
|
||||
|
||||
Customer customer = customerService.selectCustomerById(visitorPerson.getCustomerId());
|
||||
visitorPerson.setCustomerName(customer.getName());
|
||||
if(customer != null) {
|
||||
visitorPerson.setCustomerName(customer.getName());
|
||||
}
|
||||
}
|
||||
return R.ok().put("data", visitorPersons);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user