|
|
@@ -6,9 +6,7 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
|
|
import cn.iocoder.yudao.framework.common.util.object.ObjectUtils;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotmodel.vo.IotModelPageReqVO;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotmodeltemplateattrs.vo.IotModelTemplateAttrsRespVO;
|
|
|
-import cn.iocoder.yudao.module.pms.controller.admin.iotopeationfill.vo.IotOpeationFillPageReqVO;
|
|
|
-import cn.iocoder.yudao.module.pms.controller.admin.iotopeationfill.vo.IotOpeationFillRespVO;
|
|
|
-import cn.iocoder.yudao.module.pms.controller.admin.iotopeationfill.vo.IotOpeationFillSaveReqVO;
|
|
|
+import cn.iocoder.yudao.module.pms.controller.admin.iotopeationfill.vo.*;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotrhdailyreport.vo.IotRhDailyReportSaveReqVO;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotrydailyreport.vo.IotRyDailyReportPageReqVO;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotrydailyreport.vo.IotRyDailyReportSaveReqVO;
|
|
|
@@ -39,6 +37,7 @@ import cn.iocoder.yudao.module.pms.service.yanfan.YfDeviceService;
|
|
|
import cn.iocoder.yudao.module.system.service.dept.DeptService;
|
|
|
import com.aliyun.tea.utils.StringUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
+import lombok.Data;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -103,6 +102,7 @@ public class IotOpeationFillController {
|
|
|
return success(iotOpeationFillService.createIotOpeationFill(createReqVO));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@PostMapping("/insertLog")
|
|
|
@Operation(summary = "创建运行记录填写信息")
|
|
|
@@ -307,6 +307,358 @@ public class IotOpeationFillController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ //*********APP全部保存接口************
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ @PostMapping("/insertDataList")
|
|
|
+ @Operation(summary = "创建运行记录工单设备集填写信息")
|
|
|
+ public CommonResult<Integer> insertDataList(@Valid @RequestBody List<IotOperationSaveInfoVO> createReqVO) {
|
|
|
+ try {
|
|
|
+ // 1. 数据预处理:提取所有设备数据并扁平化
|
|
|
+ List<IotOpeationFillSaveReqVO> allFillData = createReqVO.stream()
|
|
|
+ .flatMap(vo -> vo.getDeviceInfoList().stream())
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ // 验证数据不为空
|
|
|
+ if (CollectionUtils.isEmpty(allFillData)) {
|
|
|
+ return error(1, "设备数据不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2. 批量处理累计逻辑(优化循环,使用Map减少时间复杂度)
|
|
|
+ processSummationLogic(allFillData);
|
|
|
+
|
|
|
+ // 3. 批量转换为DO对象
|
|
|
+ List<IotDeviceRunLogDO> logDOList = convertToLogDOList(allFillData);
|
|
|
+
|
|
|
+ // 4. 获取工单ID用于后续操作
|
|
|
+ Long orderId = allFillData.get(0).getId();
|
|
|
+ LocalDate createDate = allFillData.get(0).getCreateTime();
|
|
|
+ Integer userId = allFillData.get(0).getUserId();
|
|
|
+
|
|
|
+ // 5. 更新填写状态
|
|
|
+ updateFillOrderStatus(orderId, userId, createDate);
|
|
|
+
|
|
|
+ // 6. 批量保存日志(有则更新,无则插入)
|
|
|
+ batchSaveLogs(logDOList);
|
|
|
+
|
|
|
+ // 7. 获取部门ID集合
|
|
|
+ Map<String, Set<Long>> deptMap = getDeptIdSets();
|
|
|
+
|
|
|
+ // 8. 生成日报
|
|
|
+ generateDailyReports(logDOList, deptMap, createDate);
|
|
|
+
|
|
|
+ // 9. 更新工单填写状态
|
|
|
+ iotOpeationFillService.updateFill(allFillData.get(0));
|
|
|
+
|
|
|
+ return success(1);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ //log.error("插入device_run_log失败", e);
|
|
|
+ return error(1, "插入device_run_log失败:" + e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理累计逻辑
|
|
|
+ */
|
|
|
+ private void processSummationLogic(List<IotOpeationFillSaveReqVO> allFillData) {
|
|
|
+ // 按modelId分组,便于查找
|
|
|
+ Map<Long, List<IotOpeationFillSaveReqVO>> modelIdMap = allFillData.stream()
|
|
|
+ .filter(fill -> fill.getModelId() != null)
|
|
|
+ .collect(Collectors.groupingBy(IotOpeationFillSaveReqVO::getModelId));
|
|
|
+
|
|
|
+ // 找出需要累计的数据
|
|
|
+ List<IotOpeationFillSaveReqVO> sumDataList = allFillData.stream()
|
|
|
+ .filter(fill -> {
|
|
|
+ if (fill.getIsSum() != 1) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ String defaultValue = fill.getDefaultValue();
|
|
|
+ // 同时检查null和空字符串
|
|
|
+ if (defaultValue == null || defaultValue.isEmpty()) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果还需要排除纯空格的情况
|
|
|
+ if (defaultValue.trim().isEmpty()) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+
|
|
|
+ for (IotOpeationFillSaveReqVO fill : sumDataList) {
|
|
|
+ try {
|
|
|
+ Long refModelId = Long.parseLong(fill.getDefaultValue());
|
|
|
+ List<IotOpeationFillSaveReqVO> targetFills = modelIdMap.get(refModelId);
|
|
|
+
|
|
|
+ if (CollectionUtils.isEmpty(targetFills)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (IotOpeationFillSaveReqVO targetFill : targetFills) {
|
|
|
+ if (fill.getSumId() == 1) {
|
|
|
+ // 需要累加的情况
|
|
|
+ processAccumulation(fill, targetFill);
|
|
|
+ } else if (fill.getSumId() == 0) {
|
|
|
+ // 直接赋值的情况
|
|
|
+ fill.setTotalRunTime(new BigDecimal(targetFill.getFillContent()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ //log.warn("DefaultValue转换失败: {}", fill.getDefaultValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理数据累加
|
|
|
+ */
|
|
|
+ private void processAccumulation(IotOpeationFillSaveReqVO fill, IotOpeationFillSaveReqVO targetFill) {
|
|
|
+ // 查询历史最大数据
|
|
|
+ LocalTime localTime = LocalTime.MIDNIGHT;
|
|
|
+ IotDeviceRunLogDO queryLog = new IotDeviceRunLogDO();
|
|
|
+ queryLog.setDeviceId(fill.getDeviceId());
|
|
|
+ queryLog.setPointName(fill.getPointName());
|
|
|
+ queryLog.setCreateTime(LocalDateTime.of(fill.getCreateTime(), localTime));
|
|
|
+
|
|
|
+ IotDeviceRunLogDO maxFillData = iotOpeationFillService.maxReportData(queryLog);
|
|
|
+
|
|
|
+ BigDecimal currentValue = new BigDecimal(targetFill.getFillContent());
|
|
|
+ if (maxFillData != null && maxFillData.getTotalRunTime() != null) {
|
|
|
+ fill.setTotalRunTime(maxFillData.getTotalRunTime().add(currentValue));
|
|
|
+ } else {
|
|
|
+ fill.setTotalRunTime(fill.getTotalRunTime() != null ?
|
|
|
+ fill.getTotalRunTime().add(currentValue) : currentValue);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量转换为DO对象
|
|
|
+ */
|
|
|
+ private List<IotDeviceRunLogDO> convertToLogDOList(List<IotOpeationFillSaveReqVO> allFillData) {
|
|
|
+ LocalTime localTime = LocalTime.MIDNIGHT;
|
|
|
+
|
|
|
+ return allFillData.stream()
|
|
|
+ .map(fill -> {
|
|
|
+ IotDeviceRunLogDO deviceRunLogDO = new IotDeviceRunLogDO();
|
|
|
+ deviceRunLogDO.setDeviceId(fill.getDeviceId());
|
|
|
+ deviceRunLogDO.setDeviceCode(fill.getDeviceCode());
|
|
|
+ deviceRunLogDO.setFillContent(fill.getFillContent());
|
|
|
+ deviceRunLogDO.setPointCode(fill.getModelAttr());
|
|
|
+ deviceRunLogDO.setDeptId(fill.getDeptId());
|
|
|
+ deviceRunLogDO.setCreateTime(LocalDateTime.of(fill.getCreateTime(), localTime));
|
|
|
+ deviceRunLogDO.setPointName(fill.getPointName());
|
|
|
+ deviceRunLogDO.setTotalRunTime(fill.getTotalRunTime());
|
|
|
+ deviceRunLogDO.setIsSum(fill.getIsSum() != null ? fill.getIsSum() : 0);
|
|
|
+ return deviceRunLogDO;
|
|
|
+ })
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新填写工单状态
|
|
|
+ */
|
|
|
+ private void updateFillOrderStatus(Long orderId, Integer userId, LocalDate createDate) {
|
|
|
+ IotOpeationFillRespVO queryVO = new IotOpeationFillRespVO();
|
|
|
+ queryVO.setUserId(userId);
|
|
|
+ queryVO.setCreateTime(createDate);
|
|
|
+ queryVO.setOrderId(orderId);
|
|
|
+
|
|
|
+ List<IotOpeationFillRespVO> fillList = iotOpeationFillService.getFillList(queryVO);
|
|
|
+
|
|
|
+ if (CollectionUtils.isEmpty(fillList)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean allFilled = fillList.stream().allMatch(e -> e.getIsFill() == 1);
|
|
|
+ boolean allUnfilled = fillList.stream().allMatch(e -> e.getIsFill() == 0);
|
|
|
+
|
|
|
+ IotDeviceRunLogDO updateParam = new IotDeviceRunLogDO();
|
|
|
+ updateParam.setId(orderId);
|
|
|
+
|
|
|
+ if (allFilled) {
|
|
|
+ iotOpeationFillService.updateFillOrder(updateParam);
|
|
|
+ handleDuplicateOrders(orderId, createDate);
|
|
|
+ } else if (allUnfilled) {
|
|
|
+ iotOpeationFillService.updateFillOrder1(updateParam);
|
|
|
+ } else {
|
|
|
+ iotOpeationFillService.updateFillOrder2(updateParam);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理重复订单
|
|
|
+ */
|
|
|
+ private void handleDuplicateOrders(Long orderId, LocalDate createDate) {
|
|
|
+ IotOpeationFillDO queryDO = new IotOpeationFillDO();
|
|
|
+ queryDO.setOrderId(orderId);
|
|
|
+
|
|
|
+ List<IotOpeationFillDO> devList = iotOpeationFillService.devList(queryDO);
|
|
|
+
|
|
|
+ if (devList.size() == 1) {
|
|
|
+ queryDO.setDeviceId(devList.get(0).getDeviceId());
|
|
|
+ queryDO.setCreDate(createDate);
|
|
|
+
|
|
|
+ List<IotOpeationFillDO> orderList = iotOpeationFillService.orderList(queryDO);
|
|
|
+
|
|
|
+ if (!CollectionUtils.isEmpty(orderList)) {
|
|
|
+ for (IotOpeationFillDO order : orderList) {
|
|
|
+ List<IotOpeationFillDO> delList = iotOpeationFillService.delList(order);
|
|
|
+ if (delList.size() == 1) {
|
|
|
+ iotOpeationFillService.delRepeat(delList.get(0));
|
|
|
+ iotOpeationFillService.delRepeatOrder(order);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量保存日志
|
|
|
+ */
|
|
|
+ private void batchSaveLogs(List<IotDeviceRunLogDO> logDOList) {
|
|
|
+ for (IotDeviceRunLogDO log : logDOList) {
|
|
|
+ IotDeviceRunLogDO existingData = iotOpeationFillService.reportData(log);
|
|
|
+ if (existingData == null) {
|
|
|
+ iotOpeationFillService.insertLog1(log);
|
|
|
+ } else {
|
|
|
+ if (log.getIsSum() == 0) {
|
|
|
+ iotOpeationFillService.updateLog(log);
|
|
|
+ } else {
|
|
|
+ iotOpeationFillService.updateSumLog(log);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取部门ID集合
|
|
|
+ */
|
|
|
+ private Map<String, Set<Long>> getDeptIdSets() {
|
|
|
+ Map<String, Set<Long>> deptMap = new HashMap<>();
|
|
|
+
|
|
|
+ Set<Long> rhIdList = deptService.getChildDeptIdListFromCache(157L);
|
|
|
+ rhIdList.add(157L);
|
|
|
+ deptMap.put("RH", rhIdList);
|
|
|
+
|
|
|
+ Set<Long> ryIdList = deptService.getChildDeptIdListFromCache(158L);
|
|
|
+ ryIdList.add(158L);
|
|
|
+ deptMap.put("RY", ryIdList);
|
|
|
+
|
|
|
+ return deptMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成日报
|
|
|
+ */
|
|
|
+ private void generateDailyReports(List<IotDeviceRunLogDO> logDOList,
|
|
|
+ Map<String, Set<Long>> deptMap,
|
|
|
+ LocalDate createDate) {
|
|
|
+ // 按设备分组处理
|
|
|
+ Map<Long, List<IotDeviceRunLogDO>> deviceLogsMap = logDOList.stream()
|
|
|
+ .collect(Collectors.groupingBy(IotDeviceRunLogDO::getDeviceId));
|
|
|
+
|
|
|
+ for (Map.Entry<Long, List<IotDeviceRunLogDO>> entry : deviceLogsMap.entrySet()) {
|
|
|
+ List<IotDeviceRunLogDO> deviceLogs = entry.getValue();
|
|
|
+ if (CollectionUtils.isEmpty(deviceLogs)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ IotDeviceRunLogDO sampleLog = deviceLogs.get(0);
|
|
|
+ IotOpeationFillDO reportQuery = new IotOpeationFillDO();
|
|
|
+ reportQuery.setDeviceId(sampleLog.getDeviceId());
|
|
|
+ reportQuery.setCreateTime(sampleLog.getCreateTime());
|
|
|
+
|
|
|
+ IotOpeationFillDO fillStatus = iotOpeationFillService.isReport(reportQuery);
|
|
|
+
|
|
|
+ if (fillStatus != null && fillStatus.getIsReport() != null &&
|
|
|
+ fillStatus.getIsReport() == 1) {
|
|
|
+
|
|
|
+ processDepartmentReport(deviceLogs, fillStatus, deptMap, createDate);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理部门日报生成
|
|
|
+ */
|
|
|
+ private void processDepartmentReport(List<IotDeviceRunLogDO> deviceLogs,
|
|
|
+ IotOpeationFillDO fillStatus,
|
|
|
+ Map<String, Set<Long>> deptMap,
|
|
|
+ LocalDate createDate) {
|
|
|
+ Set<Long> rhIdList = deptMap.get("RH");
|
|
|
+ Set<Long> ryIdList = deptMap.get("RY");
|
|
|
+
|
|
|
+ if (rhIdList.contains(fillStatus.getDeptId())) {
|
|
|
+ generateRhDailyReport(deviceLogs, fillStatus, createDate);
|
|
|
+ } else if (ryIdList.contains(fillStatus.getDeptId())) {
|
|
|
+ generateRyDailyReport(deviceLogs, fillStatus, createDate);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成RH日报
|
|
|
+ */
|
|
|
+ private void generateRhDailyReport(List<IotDeviceRunLogDO> deviceLogs,
|
|
|
+ IotOpeationFillDO fillStatus,
|
|
|
+ LocalDate createDate) {
|
|
|
+ IotRhDailyReportSaveReqVO saveReqVO = new IotRhDailyReportSaveReqVO();
|
|
|
+ Map<String, Object> reportData = BeanUtil.beanToMap(saveReqVO);
|
|
|
+
|
|
|
+ for (IotDeviceRunLogDO log : deviceLogs) {
|
|
|
+ IotDeviceRunLogDO descDO = iotOpeationFillService.getDesc(log);
|
|
|
+ if (descDO != null && descDO.getPointName() != null) {
|
|
|
+ String pointName = descDO.getPointName();
|
|
|
+ if (reportData.containsKey(pointName)) {
|
|
|
+ reportData.put(pointName, log.getFillContent());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ IotRhDailyReportSaveReqVO finalReport = BeanUtil.mapToBean(reportData,
|
|
|
+ IotRhDailyReportSaveReqVO.class, false);
|
|
|
+ finalReport.setDeptId(fillStatus.getDeptId());
|
|
|
+ finalReport.setFillOrderCreateTime(createDate.atStartOfDay());
|
|
|
+
|
|
|
+ iotRhDailyReportService.createIotRhDailyReport(finalReport);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成RY日报
|
|
|
+ */
|
|
|
+ private void generateRyDailyReport(List<IotDeviceRunLogDO> deviceLogs,
|
|
|
+ IotOpeationFillDO fillStatus,
|
|
|
+ LocalDate createDate) {
|
|
|
+ IotRyDailyReportSaveReqVO saveReqVO = new IotRyDailyReportSaveReqVO();
|
|
|
+ Map<String, Object> reportData = BeanUtil.beanToMap(saveReqVO);
|
|
|
+
|
|
|
+ for (IotDeviceRunLogDO log : deviceLogs) {
|
|
|
+ IotDeviceRunLogDO descDO = iotOpeationFillService.getDesc(log);
|
|
|
+ if (descDO != null && descDO.getPointName() != null) {
|
|
|
+ String pointName = descDO.getPointName();
|
|
|
+ if (reportData.containsKey(pointName)) {
|
|
|
+ reportData.put(pointName, log.getFillContent());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ IotRyDailyReportSaveReqVO finalReport = BeanUtil.mapToBean(reportData,
|
|
|
+ IotRyDailyReportSaveReqVO.class, false);
|
|
|
+ finalReport.setDeptId(fillStatus.getDeptId());
|
|
|
+ finalReport.setFillOrderCreateTime(createDate.atStartOfDay());
|
|
|
+
|
|
|
+ if (fillStatus.getDeviceCategoryId() != null &&
|
|
|
+ fillStatus.getDeviceCategoryId() == 228) {
|
|
|
+ finalReport.setProjectClassification("2");
|
|
|
+ }
|
|
|
+
|
|
|
+ iotRyDailyReportService.createIotRyDailyReport(finalReport);
|
|
|
+ }
|
|
|
+ //************************************************8
|
|
|
+
|
|
|
@PostMapping("/upOperationOrder")
|
|
|
@Operation(summary = "创建运行记录填写信息")
|
|
|
public CommonResult<Integer> upOperationOrder(@Valid @RequestBody IotOpeationFillRespVO respVO) {
|
|
|
@@ -364,30 +716,6 @@ public class IotOpeationFillController {
|
|
|
return success(BeanUtils.toBean(iotOpeationFill, IotOpeationFillDO.class));
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/page")
|
|
|
- @Operation(summary = "获得运行记录填报分页")
|
|
|
- @PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:query')")
|
|
|
- public CommonResult<List<IotOpeationFillDO>> getIotOpeationFillPage(@Valid IotOpeationFillRespVO pageReqVO) {
|
|
|
- List<IotOpeationFillDO> fillList = iotOpeationFillService.fillListByUserId(pageReqVO);
|
|
|
- return success(BeanUtils.toBean(fillList, IotOpeationFillDO.class));
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/orderPage")
|
|
|
- @Operation(summary = "获得运行记录填报分页")
|
|
|
- @PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:query')")
|
|
|
- public CommonResult<List<IotOpeationFillDO>> getOrderPage(@Valid IotOpeationFillRespVO pageReqVO) {
|
|
|
- List<IotOpeationFillDO> fillList = new ArrayList<>();
|
|
|
- /* if(pageReqVO.getDeviceId()!=null){
|
|
|
- *//**
|
|
|
- * 根据设备ID和OrderId返回
|
|
|
- *//*
|
|
|
-
|
|
|
- }else{*/
|
|
|
- fillList = iotOpeationFillService.fillListByDeptId(pageReqVO);
|
|
|
-
|
|
|
-
|
|
|
- return success(BeanUtils.toBean(fillList, IotOpeationFillDO.class));
|
|
|
- }
|
|
|
|
|
|
|
|
|
@GetMapping("/page1")
|
|
|
@@ -414,9 +742,9 @@ public class IotOpeationFillController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /* IotOpeationFillRespVO fill = new IotOpeationFillRespVO();
|
|
|
+ /* IotOpeationFillRespVO fill = new IotOpeationFillRespVO();
|
|
|
|
|
|
- *//**
|
|
|
+ *//**
|
|
|
* 遍历主表数据,拿到id,根据id查询子表获取子表设备名称+设备编码
|
|
|
*//*
|
|
|
for (IotOpeationFillOrderDO orderDO : fillList.getList()) {
|
|
|
@@ -493,6 +821,309 @@ public class IotOpeationFillController {
|
|
|
return success(BeanUtils.toBean(fillList, IotOpeationFillOrderDO.class));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @GetMapping("/page")
|
|
|
+ @Operation(summary = "获得运行记录填报分页")
|
|
|
+ @PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:query')")
|
|
|
+ public CommonResult<List<IotOpeationFillDO>> getIotOpeationFillPage(@Valid IotOpeationFillRespVO pageReqVO) {
|
|
|
+ List<IotOpeationFillDO> fillList = iotOpeationFillService.fillListByUserId(pageReqVO);
|
|
|
+ return success(BeanUtils.toBean(fillList, IotOpeationFillDO.class));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/orderFillpage")
|
|
|
+ @Operation(summary = "获得运行记录填报分页")
|
|
|
+ @PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:query')")
|
|
|
+ public CommonResult<PageResult<IotOpeationFillDO>> getIotOpeationFillWithAttrsPage(@Valid IotOpeationFillPageVO pageReqVO) {
|
|
|
+ PageResult<IotOpeationFillDO> fillList = iotOpeationFillService.fillListPage(pageReqVO);
|
|
|
+ return success(BeanUtils.toBean(fillList, IotOpeationFillDO.class));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //**************
|
|
|
+
|
|
|
+ // 新VO类,用于返回包含属性详情的分页结果
|
|
|
+ @Data
|
|
|
+ public class IotOpeationFillWithAttrsVO extends IotOpeationFillDO {
|
|
|
+ // 保留IotOpeationFillDO的所有属性
|
|
|
+ // 新增属性详情字段
|
|
|
+ private List<IotModelTemplateAttrsDO1> attrsDetail;
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/orderFillpage1")
|
|
|
+ @Operation(summary = "获得运行记录填报分页")
|
|
|
+ @PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:query')")
|
|
|
+ public CommonResult<PageResult<IotOpeationFillWithAttrsVO>> getIotOpeationFillWithAttrsPage1(@Valid IotOpeationFillPageVO pageReqVO) throws SQLException {
|
|
|
+ // 1. 获取分页数据
|
|
|
+ PageResult<IotOpeationFillDO> fillList = iotOpeationFillService.fillListPage(pageReqVO);
|
|
|
+
|
|
|
+ // 2. 转换为新的VO类型(包含属性详情)
|
|
|
+ List<IotOpeationFillWithAttrsVO> resultList = new ArrayList<>();
|
|
|
+
|
|
|
+ for (IotOpeationFillDO fillDO : fillList.getList()) {
|
|
|
+ IotOpeationFillWithAttrsVO vo = BeanUtils.toBean(fillDO, IotOpeationFillWithAttrsVO.class);
|
|
|
+
|
|
|
+ // 3. 为每个分页项获取属性详情
|
|
|
+ IotModelTemplateAttrsRespVO attrsReqVO = new IotModelTemplateAttrsRespVO();
|
|
|
+ attrsReqVO.setDeviceId(fillDO.getDeviceId());
|
|
|
+ attrsReqVO.setDeviceCode(fillDO.getDeviceCode()); // 假设分页接口返回了deviceCode
|
|
|
+ attrsReqVO.setCreateTime(fillDO.getCreateTime().toLocalDate());
|
|
|
+ attrsReqVO.setDeviceCategoryId(fillDO.getDeviceCategoryId());
|
|
|
+
|
|
|
+
|
|
|
+ // 4. 调用原属性详情逻辑
|
|
|
+ List<IotModelTemplateAttrsDO1> attrsDetail = getAttrsDetail(attrsReqVO);
|
|
|
+ vo.setAttrsDetail(attrsDetail);
|
|
|
+
|
|
|
+ resultList.add(vo);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 5. 创建新的分页结果
|
|
|
+ PageResult<IotOpeationFillWithAttrsVO> pageResult = new PageResult<>(
|
|
|
+ resultList,
|
|
|
+ fillList.getTotal()
|
|
|
+ );
|
|
|
+
|
|
|
+ return success(pageResult);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 提取属性详情逻辑为私有方法
|
|
|
+ private List<IotModelTemplateAttrsDO1> getAttrsDetail(IotModelTemplateAttrsRespVO vo) throws SQLException {
|
|
|
+ // 以下是您原getAttrs接口的核心逻辑,保持不变
|
|
|
+ //判断是否为虚拟设备
|
|
|
+ //如果是走原来逻辑
|
|
|
+ //不是走虚拟设备逻辑
|
|
|
+ IotOpeationFillDO fillDO = new IotOpeationFillDO();
|
|
|
+ fillDO.setDeviceId(vo.getDeviceId());
|
|
|
+ fillDO.setCreateTime(vo.getCreateTime().atStartOfDay());
|
|
|
+ IotOpeationFillDO fillDO1 = iotOpeationFillService.isReport(fillDO);
|
|
|
+
|
|
|
+ List<IotModelTemplateAttrsDO1> result = new ArrayList<>();
|
|
|
+ List<IotModelTemplateAttrsDO> list = iotOpeationFillService.getAttrsById(vo);
|
|
|
+
|
|
|
+ if (fillDO1.getIsReport() != null && fillDO1.getIsReport() == 1) {
|
|
|
+ IotOpeationFillDO fillDO2 = iotOpeationFillService.orderDO(fillDO);
|
|
|
+
|
|
|
+ List<IotOpeationFillDO> reportList = new ArrayList<>();
|
|
|
+ List<IotOpeationFillDO> reportList1 = new ArrayList<>();
|
|
|
+
|
|
|
+ if (fillDO2 != null) {
|
|
|
+ reportList = iotOpeationFillService.reportList(fillDO2);
|
|
|
+ reportList1 = iotOpeationFillService.reportList1(fillDO2);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (IotModelTemplateAttrsDO attrsDO : list) {
|
|
|
+ List<IotOpeationFillDO> cxLixt = reportList.stream().filter(e -> e.getOrgName().equals(attrsDO.getName())).collect(Collectors.toList());
|
|
|
+ //虚拟设备取值
|
|
|
+ List<IotOpeationFillDO> cxLixt1 = reportList1.stream().filter(e -> e.getOrgName().equals(attrsDO.getName())).collect(Collectors.toList());
|
|
|
+
|
|
|
+ if (cxLixt.size() > 0) {
|
|
|
+ // 使用Map按orgName分组存储累加结果
|
|
|
+ Map<String, String> orgNameToFillContent = new HashMap<>();
|
|
|
+
|
|
|
+ for (IotOpeationFillDO reportData : cxLixt) {
|
|
|
+ IotDeviceRunLogDO report = new IotDeviceRunLogDO();
|
|
|
+ report.setDeviceId(reportData.getDeviceId());
|
|
|
+ report.setPointName(reportData.getOrgName());
|
|
|
+ report.setCreateTime(reportData.getCreateTime());
|
|
|
+
|
|
|
+ IotDeviceRunLogDO reportCx = iotOpeationFillService.reportData(report);
|
|
|
+
|
|
|
+ String currentContent = "";
|
|
|
+ if (reportCx == null) {
|
|
|
+ attrsDO.setFillContent("");
|
|
|
+ } else {
|
|
|
+ currentContent = reportCx.getFillContent() != null ? reportCx.getFillContent() : "";
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取当前orgName
|
|
|
+ String orgName = reportData.getOrgName();
|
|
|
+
|
|
|
+ // 累加相同orgName的内容
|
|
|
+ if (orgNameToFillContent.containsKey(orgName)) {
|
|
|
+ String existingContent = orgNameToFillContent.get(orgName);
|
|
|
+
|
|
|
+ double existingValue = safeParseInt(existingContent);
|
|
|
+ double currentValue = safeParseInt(currentContent);
|
|
|
+
|
|
|
+ if ((existingValue + currentValue) == 0) {
|
|
|
+ orgNameToFillContent.put(orgName, "");
|
|
|
+ } else {
|
|
|
+ orgNameToFillContent.put(orgName, String.valueOf(existingValue + currentValue));
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ orgNameToFillContent.put(orgName, currentContent);
|
|
|
+ }
|
|
|
+ attrsDO.setFillContent(orgNameToFillContent.get(reportData.getOrgName()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (cxLixt1.size() > 0) {
|
|
|
+ for (IotOpeationFillDO reportData : cxLixt1) {
|
|
|
+ IotDeviceRunLogDO report = new IotDeviceRunLogDO();
|
|
|
+ report.setDeviceId(reportData.getDeviceId());
|
|
|
+ report.setPointName(reportData.getOrgName());
|
|
|
+ report.setCreateTime(reportData.getCreateTime());
|
|
|
+ IotDeviceRunLogDO reportCx = iotOpeationFillService.reportData(report);
|
|
|
+
|
|
|
+ String currentContent = "";
|
|
|
+ if (reportCx != null) {
|
|
|
+ currentContent = reportCx.getFillContent() != null ? reportCx.getFillContent() : "";
|
|
|
+ attrsDO.setFillContent(currentContent);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ attrsDO.setIsCollection(0);
|
|
|
+ attrsDO.setIsSum(0);
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ List<YfDeviceDO> allDevice = yfDeviceService.getAllDevice();
|
|
|
+
|
|
|
+ LocalTime localTime = LocalTime.of(0, 0, 0);
|
|
|
+ LocalTime localTime1 = LocalTime.of(23, 59, 59);
|
|
|
+
|
|
|
+ LocalDateTime start = LocalDateTime.of(vo.getCreateTime(), localTime);
|
|
|
+ LocalDateTime end = LocalDateTime.of(vo.getCreateTime(), localTime1);
|
|
|
+
|
|
|
+ Timestamp startTime = Timestamp.valueOf(start);
|
|
|
+ Timestamp endTime = Timestamp.valueOf(end);
|
|
|
+
|
|
|
+ List<YfDeviceDO> existList = allDevice.stream().filter(e -> e.getStatus() == 3).collect(Collectors.toList());
|
|
|
+ boolean exists1 = existList.stream().anyMatch(yfDeviceDO -> yfDeviceDO.getSerialNumber().equals(vo.getDeviceCode()));
|
|
|
+
|
|
|
+ IotDeviceRunLogDO logDO1 = new IotDeviceRunLogDO();
|
|
|
+ logDO1.setDeviceId(vo.getDeviceId());
|
|
|
+ LocalTime local = LocalTime.of(12, 0);
|
|
|
+ logDO1.setCreateTime(LocalDateTime.of(vo.getCreateTime(), local));
|
|
|
+
|
|
|
+ if (exists1) {
|
|
|
+ for (IotModelTemplateAttrsDO attrsDO : list) {
|
|
|
+ DeviceVO dv = new DeviceVO();
|
|
|
+ dv.setDeviceName(vo.getDeviceCode().toLowerCase());
|
|
|
+ dv.setColName(attrsDO.getModelAttr());
|
|
|
+ dv.setTs(startTime);
|
|
|
+ dv.setTs1(endTime);
|
|
|
+
|
|
|
+ DeviceVO deviceVO = iDeviceService.getYesInfo(dv);
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(deviceVO) && !deviceVO.getEarliestData().equals("0.0")) {
|
|
|
+ attrsDO.setFillContent(
|
|
|
+ String.valueOf(Double.parseDouble(deviceVO.getLatestData()) - Double.parseDouble(deviceVO.getEarliestData())));
|
|
|
+ attrsDO.setTotalRunTime(BigDecimal.valueOf(Double.parseDouble(deviceVO.getLatestData())));
|
|
|
+ /**
|
|
|
+ * 设置为数采
|
|
|
+ */
|
|
|
+ attrsDO.setIsCollection(1);
|
|
|
+ } else {
|
|
|
+ logDO1.setPointName(attrsDO.getName());
|
|
|
+ IotDeviceRunLogDO logInfo = iotOpeationFillService.getLogInfo(logDO1);
|
|
|
+ IotDeviceRunLogDO maxLog = iotOpeationFillService.getMaxFillInfo(logDO1);
|
|
|
+ if (!StringUtils.isEmpty(logInfo)) {
|
|
|
+
|
|
|
+ attrsDO.setFillContent(logInfo.getFillContent());
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(maxLog)) {
|
|
|
+ attrsDO.setTotalRunTime(BigDecimal.valueOf(0));
|
|
|
+ } else {
|
|
|
+ attrsDO.setTotalRunTime(maxLog.getTotalRunTime());
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 设置为非数采
|
|
|
+ */
|
|
|
+ attrsDO.setIsCollection(0);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ attrsDO.setFillContent("");
|
|
|
+ if (StringUtils.isEmpty(maxLog)) {
|
|
|
+ attrsDO.setTotalRunTime(BigDecimal.valueOf(0));
|
|
|
+ } else {
|
|
|
+ attrsDO.setTotalRunTime(maxLog.getTotalRunTime());
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 设置为非数采
|
|
|
+ */
|
|
|
+ attrsDO.setIsCollection(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (IotModelTemplateAttrsDO attrsDO : list) {
|
|
|
+ logDO1.setPointName(attrsDO.getName());
|
|
|
+ IotDeviceRunLogDO logInfo = iotOpeationFillService.getLogInfo(logDO1);
|
|
|
+ IotDeviceRunLogDO maxLog = iotOpeationFillService.getMaxFillInfo(logDO1);
|
|
|
+ if (!StringUtils.isEmpty(logInfo)) {
|
|
|
+
|
|
|
+ attrsDO.setFillContent(logInfo.getFillContent());
|
|
|
+ attrsDO.setTotalRunTime(logInfo.getTotalRunTime());
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置为非数采
|
|
|
+ */
|
|
|
+ attrsDO.setIsCollection(0);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ attrsDO.setFillContent("");
|
|
|
+ if (StringUtils.isEmpty(maxLog)) {
|
|
|
+ attrsDO.setTotalRunTime(BigDecimal.valueOf(0));
|
|
|
+ } else {
|
|
|
+ attrsDO.setTotalRunTime(maxLog.getTotalRunTime());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置为非数采
|
|
|
+ */
|
|
|
+ attrsDO.setIsCollection(0);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ List<IotModelTemplateAttrsDO> sumList = list.stream().filter(e -> e.getIsSum() == 1).collect(Collectors.toList());
|
|
|
+ List<IotModelTemplateAttrsDO> nonSumList = list.stream().filter(e -> e.getIsSum() == 0).collect(Collectors.toList());
|
|
|
+
|
|
|
+ IotModelTemplateAttrsDO1 sum = new IotModelTemplateAttrsDO1();
|
|
|
+ sum.setSumList(sumList);
|
|
|
+ sum.setNonSumList(nonSumList);
|
|
|
+
|
|
|
+ result.add(sum);
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //**************
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/orderPage")
|
|
|
+ @Operation(summary = "获得运行记录填报分页")
|
|
|
+ @PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:query')")
|
|
|
+ public CommonResult<List<IotOpeationFillDO>> getOrderPage(@Valid IotOpeationFillRespVO pageReqVO) {
|
|
|
+ List<IotOpeationFillDO> fillList = new ArrayList<>();
|
|
|
+ /* if(pageReqVO.getDeviceId()!=null){
|
|
|
+ *//**
|
|
|
+ * 根据设备ID和OrderId返回
|
|
|
+ *//*
|
|
|
+
|
|
|
+ }else{*/
|
|
|
+ fillList = iotOpeationFillService.fillListByDeptId(pageReqVO);
|
|
|
+
|
|
|
+
|
|
|
+ return success(BeanUtils.toBean(fillList, IotOpeationFillDO.class));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/fillRecordPage")
|
|
|
@Operation(summary = "获得运行记录填报分页")
|
|
|
public CommonResult<PageResult<IotOpeationFillOrderDO>> getFillRecords(@Valid IotOpeationFillPageReqVO pageReqVO) {
|
|
|
@@ -579,69 +1210,69 @@ public class IotOpeationFillController {
|
|
|
|
|
|
|
|
|
|
|
|
- List<IotOpeationFillDO> cxLixt = reportList.stream().filter(e->e.getOrgName().equals(attrsDO.getName())).collect(Collectors.toList());
|
|
|
- //虚拟设备取值
|
|
|
- List<IotOpeationFillDO> cxLixt1 = reportList1.stream().filter(e->e.getOrgName().equals(attrsDO.getName())).collect(Collectors.toList());
|
|
|
-
|
|
|
- if(cxLixt.size()>0){
|
|
|
- // 使用Map按orgName分组存储累加结果
|
|
|
- Map<String, String> orgNameToFillContent = new HashMap<>();
|
|
|
+ List<IotOpeationFillDO> cxLixt = reportList.stream().filter(e->e.getOrgName().equals(attrsDO.getName())).collect(Collectors.toList());
|
|
|
+ //虚拟设备取值
|
|
|
+ List<IotOpeationFillDO> cxLixt1 = reportList1.stream().filter(e->e.getOrgName().equals(attrsDO.getName())).collect(Collectors.toList());
|
|
|
|
|
|
- for (IotOpeationFillDO reportData : cxLixt) {
|
|
|
- IotDeviceRunLogDO report = new IotDeviceRunLogDO();
|
|
|
- report.setDeviceId(reportData.getDeviceId());
|
|
|
- report.setPointName(reportData.getOrgName());
|
|
|
- report.setCreateTime(reportData.getCreateTime());
|
|
|
+ if(cxLixt.size()>0){
|
|
|
+ // 使用Map按orgName分组存储累加结果
|
|
|
+ Map<String, String> orgNameToFillContent = new HashMap<>();
|
|
|
|
|
|
- IotDeviceRunLogDO reportCx = iotOpeationFillService.reportData(report);
|
|
|
+ for (IotOpeationFillDO reportData : cxLixt) {
|
|
|
+ IotDeviceRunLogDO report = new IotDeviceRunLogDO();
|
|
|
+ report.setDeviceId(reportData.getDeviceId());
|
|
|
+ report.setPointName(reportData.getOrgName());
|
|
|
+ report.setCreateTime(reportData.getCreateTime());
|
|
|
|
|
|
- String currentContent = "";
|
|
|
- if(reportCx==null){
|
|
|
- attrsDO.setFillContent("");
|
|
|
- }else{
|
|
|
- currentContent = reportCx.getFillContent() != null ? reportCx.getFillContent() : "";
|
|
|
- }
|
|
|
+ IotDeviceRunLogDO reportCx = iotOpeationFillService.reportData(report);
|
|
|
|
|
|
+ String currentContent = "";
|
|
|
+ if(reportCx==null){
|
|
|
+ attrsDO.setFillContent("");
|
|
|
+ }else{
|
|
|
+ currentContent = reportCx.getFillContent() != null ? reportCx.getFillContent() : "";
|
|
|
+ }
|
|
|
|
|
|
- // 获取当前orgName
|
|
|
- String orgName = reportData.getOrgName();
|
|
|
|
|
|
- // 累加相同orgName的内容
|
|
|
- if (orgNameToFillContent.containsKey(orgName)) {
|
|
|
- String existingContent = orgNameToFillContent.get(orgName);
|
|
|
+ // 获取当前orgName
|
|
|
+ String orgName = reportData.getOrgName();
|
|
|
|
|
|
- double existingValue = safeParseInt(existingContent);
|
|
|
- double currentValue = safeParseInt(currentContent);
|
|
|
+ // 累加相同orgName的内容
|
|
|
+ if (orgNameToFillContent.containsKey(orgName)) {
|
|
|
+ String existingContent = orgNameToFillContent.get(orgName);
|
|
|
|
|
|
- if((existingValue + currentValue)==0){
|
|
|
- orgNameToFillContent.put(orgName, "");
|
|
|
- }else{
|
|
|
- orgNameToFillContent.put(orgName, String.valueOf(existingValue + currentValue));
|
|
|
- }
|
|
|
+ double existingValue = safeParseInt(existingContent);
|
|
|
+ double currentValue = safeParseInt(currentContent);
|
|
|
|
|
|
- } else {
|
|
|
- orgNameToFillContent.put(orgName, currentContent);
|
|
|
+ if((existingValue + currentValue)==0){
|
|
|
+ orgNameToFillContent.put(orgName, "");
|
|
|
+ }else{
|
|
|
+ orgNameToFillContent.put(orgName, String.valueOf(existingValue + currentValue));
|
|
|
}
|
|
|
- attrsDO.setFillContent(orgNameToFillContent.get(reportData.getOrgName()));
|
|
|
|
|
|
+ } else {
|
|
|
+ orgNameToFillContent.put(orgName, currentContent);
|
|
|
}
|
|
|
+ attrsDO.setFillContent(orgNameToFillContent.get(reportData.getOrgName()));
|
|
|
+
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- if(cxLixt1.size()>0){
|
|
|
- for (IotOpeationFillDO reportData : cxLixt1) {
|
|
|
- IotDeviceRunLogDO report = new IotDeviceRunLogDO();
|
|
|
- report.setDeviceId(reportData.getDeviceId());
|
|
|
- report.setPointName(reportData.getOrgName());
|
|
|
- report.setCreateTime(reportData.getCreateTime());
|
|
|
- IotDeviceRunLogDO reportCx = iotOpeationFillService.reportData(report);
|
|
|
-
|
|
|
- String currentContent = "";
|
|
|
- if(reportCx!=null){
|
|
|
- currentContent = reportCx.getFillContent() != null ? reportCx.getFillContent() : "";
|
|
|
- attrsDO.setFillContent(currentContent);
|
|
|
- }
|
|
|
+ if(cxLixt1.size()>0){
|
|
|
+ for (IotOpeationFillDO reportData : cxLixt1) {
|
|
|
+ IotDeviceRunLogDO report = new IotDeviceRunLogDO();
|
|
|
+ report.setDeviceId(reportData.getDeviceId());
|
|
|
+ report.setPointName(reportData.getOrgName());
|
|
|
+ report.setCreateTime(reportData.getCreateTime());
|
|
|
+ IotDeviceRunLogDO reportCx = iotOpeationFillService.reportData(report);
|
|
|
+
|
|
|
+ String currentContent = "";
|
|
|
+ if(reportCx!=null){
|
|
|
+ currentContent = reportCx.getFillContent() != null ? reportCx.getFillContent() : "";
|
|
|
+ attrsDO.setFillContent(currentContent);
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
|
|
|
attrsDO.setIsCollection(0);
|
|
|
@@ -810,12 +1441,12 @@ public class IotOpeationFillController {
|
|
|
@PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:export')")
|
|
|
@ApiAccessLog(operateType = EXPORT)
|
|
|
public void exportIotOpeationFillExcel(@Valid IotOpeationFillPageReqVO pageReqVO,
|
|
|
- HttpServletResponse response) throws IOException {
|
|
|
+ HttpServletResponse response) throws IOException {
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
List<IotOpeationFillDO> list = iotOpeationFillService.getIotOpeationFillPage(pageReqVO).getList();
|
|
|
// 导出 Excel
|
|
|
ExcelUtils.write(response, "运行记录填报.xls", "数据", IotOpeationFillRespVO.class,
|
|
|
- BeanUtils.toBean(list, IotOpeationFillRespVO.class));
|
|
|
+ BeanUtils.toBean(list, IotOpeationFillRespVO.class));
|
|
|
}
|
|
|
|
|
|
|