forked from dyf/fys-Multi-tenant
设备用户详情
This commit is contained in:
@ -1,29 +1,18 @@
|
|||||||
package com.fuyuanshen.web.controller.device;
|
package com.fuyuanshen.web.controller.device;
|
||||||
|
|
||||||
|
|
||||||
import com.fuyuanshen.app.domain.dto.APPReNameDTO;
|
import com.fuyuanshen.app.domain.AppPersonnelInfoRecords;
|
||||||
import com.fuyuanshen.app.domain.dto.AppRealTimeStatusDto;
|
|
||||||
import com.fuyuanshen.app.domain.vo.APPDeviceTypeVo;
|
|
||||||
import com.fuyuanshen.common.core.domain.R;
|
import com.fuyuanshen.common.core.domain.R;
|
||||||
import com.fuyuanshen.common.mybatis.core.page.PageQuery;
|
|
||||||
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
|
||||||
import com.fuyuanshen.common.web.core.BaseController;
|
import com.fuyuanshen.common.web.core.BaseController;
|
||||||
import com.fuyuanshen.equipment.domain.Device;
|
|
||||||
import com.fuyuanshen.equipment.domain.dto.AppDeviceBo;
|
|
||||||
import com.fuyuanshen.equipment.domain.query.DeviceQueryCriteria;
|
|
||||||
import com.fuyuanshen.equipment.domain.vo.AppDeviceVo;
|
|
||||||
import com.fuyuanshen.equipment.domain.vo.WebDeviceVo;
|
import com.fuyuanshen.equipment.domain.vo.WebDeviceVo;
|
||||||
import com.fuyuanshen.web.service.WEBDeviceService;
|
import com.fuyuanshen.web.service.WEBDeviceService;
|
||||||
import com.fuyuanshen.web.service.device.DeviceBizService;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description:
|
* @Description:
|
||||||
@ -68,6 +57,20 @@ public class WEBDeviceController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备用户详情
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Operation(summary = "设备详情")
|
||||||
|
@GetMapping(value = "/getDeviceUser/{id}")
|
||||||
|
public R<List<AppPersonnelInfoRecords>> getDeviceUser(@PathVariable Long id) {
|
||||||
|
List<AppPersonnelInfoRecords> device = deviceService.getDeviceUser(id);
|
||||||
|
return R.ok(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package com.fuyuanshen.web.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fuyuanshen.app.domain.AppPersonnelInfoRecords;
|
||||||
import com.fuyuanshen.common.mybatis.core.page.PageQuery;
|
import com.fuyuanshen.common.mybatis.core.page.PageQuery;
|
||||||
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
||||||
import com.fuyuanshen.equipment.domain.Device;
|
import com.fuyuanshen.equipment.domain.Device;
|
||||||
@ -38,4 +39,12 @@ public interface WEBDeviceService extends IService<Device> {
|
|||||||
*/
|
*/
|
||||||
WebDeviceVo getDevice(Long id);
|
WebDeviceVo getDevice(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备用户详情
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<AppPersonnelInfoRecords> getDeviceUser(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuyuanshen.app.domain.AppDeviceBindRecord;
|
import com.fuyuanshen.app.domain.AppDeviceBindRecord;
|
||||||
import com.fuyuanshen.app.domain.AppDeviceShare;
|
import com.fuyuanshen.app.domain.AppDeviceShare;
|
||||||
|
import com.fuyuanshen.app.domain.AppPersonnelInfoRecords;
|
||||||
import com.fuyuanshen.app.domain.vo.AppDeviceShareVo;
|
import com.fuyuanshen.app.domain.vo.AppDeviceShareVo;
|
||||||
import com.fuyuanshen.app.mapper.AppDeviceBindRecordMapper;
|
import com.fuyuanshen.app.mapper.AppDeviceBindRecordMapper;
|
||||||
import com.fuyuanshen.app.mapper.AppDeviceShareMapper;
|
import com.fuyuanshen.app.mapper.AppDeviceShareMapper;
|
||||||
|
import com.fuyuanshen.app.mapper.AppPersonnelInfoRecordsMapper;
|
||||||
import com.fuyuanshen.equipment.domain.Device;
|
import com.fuyuanshen.equipment.domain.Device;
|
||||||
import com.fuyuanshen.equipment.domain.DeviceAssignments;
|
import com.fuyuanshen.equipment.domain.DeviceAssignments;
|
||||||
import com.fuyuanshen.equipment.domain.vo.WebDeviceVo;
|
import com.fuyuanshen.equipment.domain.vo.WebDeviceVo;
|
||||||
@ -22,6 +24,8 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description:
|
* @Description:
|
||||||
* @Author: WY
|
* @Author: WY
|
||||||
@ -35,6 +39,7 @@ public class WEBDeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impl
|
|||||||
private final DeviceAssignmentsMapper deviceAssignmentsMapper;
|
private final DeviceAssignmentsMapper deviceAssignmentsMapper;
|
||||||
|
|
||||||
private final AppDeviceBindRecordMapper appDeviceBindRecordMapper;
|
private final AppDeviceBindRecordMapper appDeviceBindRecordMapper;
|
||||||
|
private final AppPersonnelInfoRecordsMapper infoRecordsMapper;
|
||||||
|
|
||||||
private final DeviceMapper deviceMapper;
|
private final DeviceMapper deviceMapper;
|
||||||
private final AppDeviceShareMapper appDeviceShareMapper;
|
private final AppDeviceShareMapper appDeviceShareMapper;
|
||||||
@ -95,4 +100,19 @@ public class WEBDeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备用户详情
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AppPersonnelInfoRecords> getDeviceUser(Long id) {
|
||||||
|
List<AppPersonnelInfoRecords> appPersonnelInfoRecords = infoRecordsMapper.selectList(
|
||||||
|
new QueryWrapper<AppPersonnelInfoRecords>().eq("device_id", id)
|
||||||
|
.orderByDesc("create_time"));
|
||||||
|
return appPersonnelInfoRecords;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -175,6 +175,7 @@ public class DeviceGroupServiceImpl implements IDeviceGroupService {
|
|||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定设备分组
|
* 绑定设备分组
|
||||||
*
|
*
|
||||||
@ -197,4 +198,5 @@ public class DeviceGroupServiceImpl implements IDeviceGroupService {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user