|
|
|
|
@ -104,7 +104,7 @@ public class DeviceController {
|
|
|
|
|
@GetMapping("/get")
|
|
|
|
|
@Operation(summary = "获得物联设备")
|
|
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<DeviceRespVO> getDevice(@RequestParam("id") Long id) {
|
|
|
|
|
DeviceRespVO deviceRespVO = deviceService.getDevice(id);
|
|
|
|
|
return success(deviceRespVO);
|
|
|
|
|
@ -112,7 +112,7 @@ public class DeviceController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/page")
|
|
|
|
|
@Operation(summary = "获得物联设备分页")
|
|
|
|
|
@PreAuthorize("@ss.isInnerProfile() || @ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.isInnerProfile() || @ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<PageResult<DeviceRespVO>> getDevicePage(@Valid DevicePageReqVO pageReqVO) {
|
|
|
|
|
PageResult<DeviceRespVO> pageResult = deviceService.getDevicePage(pageReqVO);
|
|
|
|
|
return success(pageResult);
|
|
|
|
|
@ -120,14 +120,14 @@ public class DeviceController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/available-list")
|
|
|
|
|
@Operation(summary = "获取设备下拉列表(全量+是否已选+已删除标识)")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<List<DeviceSelectRespVO>> getAvailableDeviceList() {
|
|
|
|
|
return success(deviceService.getDeviceSelectList());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/available-page")
|
|
|
|
|
@Operation(summary = "获取设备分页列表(全量+是否已选+已删除标识)")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<PageResult<DeviceSelectRespVO>> getAvailableDevicePage(@Valid DevicePageReqVO pageReqVO) {
|
|
|
|
|
PageResult<DeviceSelectRespVO> pageResult = deviceService.getAvailableDevicePage(pageReqVO);
|
|
|
|
|
return success(pageResult);
|
|
|
|
|
@ -155,7 +155,7 @@ public class DeviceController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/production-daily-report/page")
|
|
|
|
|
@Operation(summary = "获得设备生产日报 Excel 分页")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<PageResult<DeviceProductionDailyReportRespVO>> getProductionDailyReportPage(
|
|
|
|
|
@Valid DeviceProductionDailyReportPageReqVO reqVO) {
|
|
|
|
|
return success(deviceProductionDailyReportService.getReportPage(reqVO));
|
|
|
|
|
@ -171,7 +171,7 @@ public class DeviceController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/noUsedlist")
|
|
|
|
|
@Operation(summary = "获得未关联设备台账列表")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('mes:device-ledger:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('mes:device-ledger:query')")
|
|
|
|
|
public CommonResult<List<DeviceRespVO>> getDeviceLedgerListByNoUsed() {
|
|
|
|
|
DevicePageReqVO pageReqVO = new DevicePageReqVO();
|
|
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
|
|
@ -185,7 +185,7 @@ public class DeviceController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/noUsedlist2")
|
|
|
|
|
@Operation(summary = "获得未关联设备台账列表")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('mes:device-ledger:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('mes:device-ledger:query')")
|
|
|
|
|
public CommonResult<List<DeviceRespVO>> getDeviceLedgerList2ByNoUsed(@RequestParam("id") Long id) {
|
|
|
|
|
DevicePageReqVO pageReqVO = new DevicePageReqVO();
|
|
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
|
|
@ -328,7 +328,7 @@ public class DeviceController {
|
|
|
|
|
@GetMapping("/device-attribute/page")
|
|
|
|
|
@Operation(summary = "获得设备属性分页")
|
|
|
|
|
@Parameter(name = "deviceId", description = "设备id")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<PageResult<DeviceContactModelDO>> getDeviceAttributePage(PageParam pageParam, DeviceContactModelPageReqVO deviceModelAttributePageReqVO) {
|
|
|
|
|
return success(deviceService.getDeviceAttributePage(pageParam, deviceModelAttributePageReqVO));
|
|
|
|
|
}
|
|
|
|
|
@ -336,7 +336,7 @@ public class DeviceController {
|
|
|
|
|
@GetMapping("/device-attribute/groupList")
|
|
|
|
|
@Operation(summary = "获得设备属性")
|
|
|
|
|
@Parameter(name = "deviceId", description = "设备id")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<List<Map<String, Object>>> getDeviceAttributeGroupList(DeviceContactModelPageReqVO deviceModelAttributePageReqVO) {
|
|
|
|
|
return success(deviceService.getDeviceAttributeGroupList(deviceModelAttributePageReqVO));
|
|
|
|
|
}
|
|
|
|
|
@ -345,7 +345,7 @@ public class DeviceController {
|
|
|
|
|
@GetMapping("/device-attribute/list")
|
|
|
|
|
@Operation(summary = "获得设备属性列表")
|
|
|
|
|
@Parameter(name = "deviceId", description = "设备id")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<List<DeviceContactModelDO>> getDeviceAttributeList(@RequestParam(name = "deviceId") Long deviceId) {
|
|
|
|
|
return success(deviceService.getDeviceAttributeList(deviceId));
|
|
|
|
|
}
|
|
|
|
|
@ -386,7 +386,7 @@ public class DeviceController {
|
|
|
|
|
@GetMapping("/device-attribute/get")
|
|
|
|
|
@Operation(summary = "获得设备属性")
|
|
|
|
|
@Parameter(name = "id", description = "编号", required = true)
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<DeviceAttributeDO> getDeviceAttribute(@RequestParam("id") Long id) {
|
|
|
|
|
return success(deviceService.getDeviceAttribute(id));
|
|
|
|
|
}
|
|
|
|
|
@ -409,7 +409,7 @@ public class DeviceController {
|
|
|
|
|
@Parameter(name = "file", description = "Excel 文件", required = true),
|
|
|
|
|
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
|
|
|
|
|
})
|
|
|
|
|
//@PreAuthorize("@ss.hasPermission('')")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('')")
|
|
|
|
|
public CommonResult<String> importExcel(@RequestParam("file") MultipartFile file,
|
|
|
|
|
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport,
|
|
|
|
|
@RequestParam("deviceId") Long deviceId) throws Exception {
|
|
|
|
|
@ -418,7 +418,7 @@ public class DeviceController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/devicePointList")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
// @PreAuthorize("@ss.hasPermission('iot:device:query')")
|
|
|
|
|
public CommonResult<List<DevicePointRespVO>> devicePointList() {
|
|
|
|
|
return success( deviceService.devicePointList());
|
|
|
|
|
}
|
|
|
|
|
|