|
|
@@ -20,6 +20,7 @@ import cn.iocoder.yudao.module.pms.controller.admin.vo.IotDeviceRespVO;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.vo.IotDeviceSaveReqVO;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.vo.IotDeviceSimpleRespVO;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.vo.excel.DeviceImportExcelVO;
|
|
|
+import cn.iocoder.yudao.module.pms.controller.admin.yanfan.vo.DevicePageReqVO;
|
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.IotDeviceDO;
|
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.IotProductClassifyDO;
|
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.failure.IotFailureReportDO;
|
|
|
@@ -431,6 +432,32 @@ public class IotDeviceController {
|
|
|
return success(result);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @GetMapping("/td/ly/page")
|
|
|
+ @Operation(summary = "获取包含数采的连油曲线")
|
|
|
+ @PreAuthorize("@ss.hasPermission('rq:iot-device:query')")
|
|
|
+ public CommonResult<PageResult<IotDeviceRespVO>> getIotDeviceTdPageLy(@Valid IotDevicePageReqVO pageReqVO) {
|
|
|
+ DevicePageReqVO devicePageReqVO = new DevicePageReqVO();
|
|
|
+ devicePageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
+ devicePageReqVO.setProductId(649L);
|
|
|
+ List<String> codes = yfDeviceService.getDevicePage(devicePageReqVO).getList().stream().map(YfDeviceDO::getSerialNumber).collect(Collectors.toList());
|
|
|
+ PageResult<IotDeviceDO> pageResult = iotDeviceService.getIotDeviceTdPage(pageReqVO, codes);
|
|
|
+ if (CollUtil.isEmpty(pageResult.getList())) {
|
|
|
+ return success(new PageResult<>(pageResult.getTotal()));
|
|
|
+ }
|
|
|
+ Map<Long, DeptDO> deptMap = deptService.getDeptMap(
|
|
|
+ convertList(pageResult.getList(), IotDeviceDO::getDeptId));
|
|
|
+ PageResult<IotDeviceRespVO> result = new PageResult<>(IotDeviceConvert.INSTANCE.convertList(pageResult.getList(), deptMap),
|
|
|
+ pageResult.getTotal());
|
|
|
+ for (IotDeviceRespVO iotDeviceRespVO : result.getList()) {
|
|
|
+ IotProductClassifyDO iotProductClassify = iotProductClassifyService.getIotProductClassify(iotDeviceRespVO.getAssetClass());
|
|
|
+ iotDeviceRespVO.setAssetClassName(iotProductClassify.getName());
|
|
|
+ }
|
|
|
+
|
|
|
+ return success(result);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/td/page/app")
|
|
|
@Operation(summary = "获得设备台账包含数采信息")
|
|
|
@PreAuthorize("@ss.hasPermission('rq:iot-device:query')")
|