|
|
@@ -368,18 +368,7 @@ public class IotOpeationFillController {
|
|
|
@Operation(summary = "获得运行记录填报分页")
|
|
|
@PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:query')")
|
|
|
public CommonResult<List<IotOpeationFillDO>> getIotOpeationFillPage(@Valid IotOpeationFillRespVO pageReqVO) {
|
|
|
- List<IotOpeationFillDO> fillList = new ArrayList<>();
|
|
|
- /* if(pageReqVO.getDeviceId()!=null){
|
|
|
- *//**
|
|
|
- * 根据设备ID和OrderId返回
|
|
|
- *//*
|
|
|
- fillList = iotOpeationFillService.fillListByDeptId(pageReqVO);
|
|
|
- }else{*/
|
|
|
- /**
|
|
|
- * 根据OrderId返回
|
|
|
- */
|
|
|
- fillList = iotOpeationFillService.fillListByUserId(pageReqVO);
|
|
|
-
|
|
|
+ List<IotOpeationFillDO> fillList = iotOpeationFillService.fillListByUserId(pageReqVO);
|
|
|
return success(BeanUtils.toBean(fillList, IotOpeationFillDO.class));
|
|
|
}
|
|
|
|
|
|
@@ -454,11 +443,12 @@ public class IotOpeationFillController {
|
|
|
.collect(Collectors.toMap(IotOpeationFillOrderDO::getId, IotOpeationFillOrderDO::getDeptId));
|
|
|
|
|
|
// 准备查询参数
|
|
|
- IotOpeationFillRespVO fill = new IotOpeationFillRespVO();
|
|
|
+
|
|
|
|
|
|
// 2. 批量查询所有fill数据
|
|
|
List<IotOpeationFillDO> allFillList = new ArrayList<>();
|
|
|
for (Map.Entry<Long, Long> entry : orderDeptMap.entrySet()) {
|
|
|
+ IotOpeationFillRespVO fill = new IotOpeationFillRespVO();
|
|
|
fill.setOrderId(entry.getKey());
|
|
|
fill.setDeptId(entry.getValue());
|
|
|
allFillList.addAll(iotOpeationFillService.fillListByDeptId(fill));
|
|
|
@@ -466,9 +456,11 @@ public class IotOpeationFillController {
|
|
|
|
|
|
// 3. 批量查询所有dev数据
|
|
|
Map<Long, IotOpeationFillDO> devMap = new HashMap<>();
|
|
|
- for (Long orderId : orderDeptMap.keySet()) {
|
|
|
- fill.setOrderId(orderId);
|
|
|
- devMap.put(orderId, iotOpeationFillService.devListByOrderId(fill));
|
|
|
+ for (Map.Entry<Long, Long> entry : orderDeptMap.entrySet()) {
|
|
|
+ IotOpeationFillRespVO fill1 = new IotOpeationFillRespVO();
|
|
|
+ fill1.setOrderId(entry.getKey());
|
|
|
+ fill1.setDeptId(entry.getValue());
|
|
|
+ devMap.put(entry.getKey(), iotOpeationFillService.devListByOrderId(fill1));
|
|
|
}
|
|
|
|
|
|
// 4. 将fill数据按订单ID分组
|