|
@@ -1126,6 +1126,8 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
// key工作量标识 value累计 台次 当日泵车台次
|
|
// key工作量标识 value累计 台次 当日泵车台次
|
|
|
Map<String, BigDecimal> cumulativePumpTripsPair = new HashMap<>();
|
|
Map<String, BigDecimal> cumulativePumpTripsPair = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 查询 瑞都 施工状态 字典数据 筛选出施工设备为 LY 的记录
|
|
// 查询 瑞都 施工状态 字典数据 筛选出施工设备为 LY 的记录
|
|
|
Set<String> lyStatuses = new HashSet<>();
|
|
Set<String> lyStatuses = new HashSet<>();
|
|
|
List<DictDataDO> rdStatuses = dictDataService.getDictDataListByDictType("rdStatus");
|
|
List<DictDataDO> rdStatuses = dictDataService.getDictDataListByDictType("rdStatus");
|
|
@@ -1140,7 +1142,7 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
// 查询瑞都所有 A B 类设备 计算总的设备利用率
|
|
// 查询瑞都所有 A B 类设备 计算总的设备利用率
|
|
|
Set<Long> abDeviceCategoryIds = new HashSet<>();
|
|
Set<Long> abDeviceCategoryIds = new HashSet<>();
|
|
|
// 查询所有瑞都产品类别包含 A B 类
|
|
// 查询所有瑞都产品类别包含 A B 类
|
|
|
- IotProductClassifyListReqVO deviceCategoryReqVO = new IotProductClassifyListReqVO();
|
|
|
|
|
|
|
+ /* IotProductClassifyListReqVO deviceCategoryReqVO = new IotProductClassifyListReqVO();
|
|
|
List<IotProductClassifyDO> allDeviceCategories = iotProductClassifyMapper.selectList(deviceCategoryReqVO);
|
|
List<IotProductClassifyDO> allDeviceCategories = iotProductClassifyMapper.selectList(deviceCategoryReqVO);
|
|
|
if (CollUtil.isNotEmpty(allDeviceCategories)) {
|
|
if (CollUtil.isNotEmpty(allDeviceCategories)) {
|
|
|
allDeviceCategories.forEach(category -> {
|
|
allDeviceCategories.forEach(category -> {
|
|
@@ -1148,10 +1150,11 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
abDeviceCategoryIds.add(category.getId());
|
|
abDeviceCategoryIds.add(category.getId());
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
+ } */
|
|
|
// 查询瑞都所有查询到的设备
|
|
// 查询瑞都所有查询到的设备
|
|
|
|
|
+ // 过滤掉 封存 的 压裂 连油 主设备
|
|
|
Set<Long> abDeviceIds = new HashSet<>();
|
|
Set<Long> abDeviceIds = new HashSet<>();
|
|
|
- IotDevicePageReqVO deviceReqVO = new IotDevicePageReqVO();
|
|
|
|
|
|
|
+ /* IotDevicePageReqVO deviceReqVO = new IotDevicePageReqVO();
|
|
|
deviceReqVO.setDeptIds(new ArrayList<>(ids));
|
|
deviceReqVO.setDeptIds(new ArrayList<>(ids));
|
|
|
List<IotDeviceDO> rdDevices = iotDeviceMapper.selectListAlone(deviceReqVO);
|
|
List<IotDeviceDO> rdDevices = iotDeviceMapper.selectListAlone(deviceReqVO);
|
|
|
if (CollUtil.isNotEmpty(rdDevices)) {
|
|
if (CollUtil.isNotEmpty(rdDevices)) {
|
|
@@ -1160,7 +1163,42 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
abDeviceIds.add(device.getId());
|
|
abDeviceIds.add(device.getId());
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ } */
|
|
|
|
|
+
|
|
|
|
|
+ // 20260604 修改设备利用率统计逻辑 统计 压裂 连油 主设备 rq_iot_device_associate
|
|
|
|
|
+ // 队伍日报中关联的主设备数量 /(队伍下所有主设备数量-封存设备数量)
|
|
|
|
|
+ Set<Long> mainDeviceIds = new HashSet<>();
|
|
|
|
|
+ Set<Long> fcMainDeviceIds = new HashSet<>();
|
|
|
|
|
+ // key设备id value设备所属部门id
|
|
|
|
|
+ Map<Long, Long> mainDeviceIdPair = new HashMap<>();
|
|
|
|
|
+ IotDeviceAssociatePageReqVO deviceAssocReqVO = new IotDeviceAssociatePageReqVO();
|
|
|
|
|
+ deviceAssocReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
|
|
+ deviceAssocReqVO.setDeptIds(ids);
|
|
|
|
|
+ PageResult<IotDeviceAssociateDO> pageResult = iotDeviceAssociateMapper.selectPage(deviceAssocReqVO);
|
|
|
|
|
+ if (ObjUtil.isNotEmpty(pageResult)) {
|
|
|
|
|
+ List<IotDeviceAssociateDO> deviceAssociates = pageResult.getList();
|
|
|
|
|
+ // 查询出所有瑞都压裂 连油主设备
|
|
|
|
|
+ deviceAssociates.forEach(assoc -> {
|
|
|
|
|
+ mainDeviceIds.add(assoc.getDeviceId());
|
|
|
|
|
+ mainDeviceIdPair.put(assoc.getDeviceId(), assoc.getDeptId());
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 查询瑞都 压裂 连油 主设备详情信息
|
|
|
|
|
+ IotDevicePageReqVO deviceReqVO = new IotDevicePageReqVO();
|
|
|
|
|
+ deviceReqVO.setDeviceIds(new ArrayList<>(mainDeviceIds));
|
|
|
|
|
+ List<IotDeviceDO> mainDevices = iotDeviceMapper.selectListAlone(deviceReqVO);
|
|
|
|
|
+ // 过滤掉 封存 的 压裂 连油 主设备
|
|
|
|
|
+ if (CollUtil.isNotEmpty(mainDevices)) {
|
|
|
|
|
+ mainDevices.forEach(device -> {
|
|
|
|
|
+ if ("fc".equals(device.getDeviceStatus())) {
|
|
|
|
|
+ fcMainDeviceIds.add(device.getId());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ abDeviceIds.add(device.getId());
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 日报涉及到的施工设备id集合
|
|
// 日报涉及到的施工设备id集合
|
|
|
Set<Long> reportDeviceIds = new HashSet<>();
|
|
Set<Long> reportDeviceIds = new HashSet<>();
|
|
|
|
|
|
|
@@ -1901,7 +1939,7 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
// 查询瑞都所有 A B 类设备 计算总的设备利用率
|
|
// 查询瑞都所有 A B 类设备 计算总的设备利用率
|
|
|
Set<Long> abDeviceCategoryIds = new HashSet<>();
|
|
Set<Long> abDeviceCategoryIds = new HashSet<>();
|
|
|
// 查询所有瑞都产品类别包含 A B 类
|
|
// 查询所有瑞都产品类别包含 A B 类
|
|
|
- IotProductClassifyListReqVO deviceCategoryReqVO = new IotProductClassifyListReqVO();
|
|
|
|
|
|
|
+ /* IotProductClassifyListReqVO deviceCategoryReqVO = new IotProductClassifyListReqVO();
|
|
|
List<IotProductClassifyDO> allDeviceCategories = iotProductClassifyMapper.selectList(deviceCategoryReqVO);
|
|
List<IotProductClassifyDO> allDeviceCategories = iotProductClassifyMapper.selectList(deviceCategoryReqVO);
|
|
|
if (CollUtil.isNotEmpty(allDeviceCategories)) {
|
|
if (CollUtil.isNotEmpty(allDeviceCategories)) {
|
|
|
allDeviceCategories.forEach(category -> {
|
|
allDeviceCategories.forEach(category -> {
|
|
@@ -1909,7 +1947,7 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
abDeviceCategoryIds.add(category.getId());
|
|
abDeviceCategoryIds.add(category.getId());
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
+ } */
|
|
|
|
|
|
|
|
// key队伍id value 日报中A+B类设备id集合
|
|
// key队伍id value 日报中A+B类设备id集合
|
|
|
Map<Long, Set<Long>> teamReportABDeviceIdPair = new HashMap<>();
|
|
Map<Long, Set<Long>> teamReportABDeviceIdPair = new HashMap<>();
|