|
@@ -2321,6 +2321,7 @@ public class IotRdDailyReportController {
|
|
|
constructStatusPair.put(data.getValue(), data.getLabel());
|
|
constructStatusPair.put(data.getValue(), data.getLabel());
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ Map<String, Boolean> reportNonProductFlagPair = new HashMap<>();
|
|
|
DataPermissionUtils.executeIgnore(() -> {
|
|
DataPermissionUtils.executeIgnore(() -> {
|
|
|
// 查询日报关联的项目信息
|
|
// 查询日报关联的项目信息
|
|
|
IotProjectInfoPageReqVO reqVO = new IotProjectInfoPageReqVO();
|
|
IotProjectInfoPageReqVO reqVO = new IotProjectInfoPageReqVO();
|
|
@@ -2348,6 +2349,7 @@ public class IotRdDailyReportController {
|
|
|
// relatedWellReqVO.setPlatformWell(2);
|
|
// relatedWellReqVO.setPlatformWell(2);
|
|
|
List<IotRdDailyReportDO> relatedWellReports = iotRdDailyReportService.dailyReports(relatedWellReqVO);
|
|
List<IotRdDailyReportDO> relatedWellReports = iotRdDailyReportService.dailyReports(relatedWellReqVO);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
// 按照日报创建时间倒序排列
|
|
// 按照日报创建时间倒序排列
|
|
|
if (CollUtil.isNotEmpty(relatedWellReports)) {
|
|
if (CollUtil.isNotEmpty(relatedWellReports)) {
|
|
|
relatedWellReports = relatedWellReports.stream()
|
|
relatedWellReports = relatedWellReports.stream()
|
|
@@ -2389,6 +2391,7 @@ public class IotRdDailyReportController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 平台井 主井施工完成 需要显示 关联井的施工状态 井号
|
|
// 平台井 主井施工完成 需要显示 关联井的施工状态 井号
|
|
|
if (CollUtil.isNotEmpty(relatedWellReports)) {
|
|
if (CollUtil.isNotEmpty(relatedWellReports)) {
|
|
|
Map<String, IotRdDailyReportDO> relatedPlatformGroupPair = new HashMap<>();
|
|
Map<String, IotRdDailyReportDO> relatedPlatformGroupPair = new HashMap<>();
|
|
@@ -2398,6 +2401,12 @@ public class IotRdDailyReportController {
|
|
|
if (!relatedPlatformGroupPair.containsKey(report.getPlatformGroup())) {
|
|
if (!relatedPlatformGroupPair.containsKey(report.getPlatformGroup())) {
|
|
|
relatedPlatformGroupPair.put(report.getPlatformGroup(), report);
|
|
relatedPlatformGroupPair.put(report.getPlatformGroup(), report);
|
|
|
}
|
|
}
|
|
|
|
|
+ // 查询关联井的 非生产时间填写情况 只要有1个关联井填写了 非生产时间 就显示为 已填写
|
|
|
|
|
+ IotRdDailyReportRespVO reportRespVO = BeanUtils.toBean(report, IotRdDailyReportRespVO.class);
|
|
|
|
|
+ Boolean flag = setNoProductFlag(reportRespVO);
|
|
|
|
|
+ if (flag) {
|
|
|
|
|
+ reportNonProductFlagPair.put(report.getPlatformGroup(), true);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
relatedWellReports.forEach(report -> {
|
|
relatedWellReports.forEach(report -> {
|
|
@@ -2564,25 +2573,8 @@ public class IotRdDailyReportController {
|
|
|
reportVO.setRdStatusLabel(constructStatusPair.get(reportVO.getRdStatus()));
|
|
reportVO.setRdStatusLabel(constructStatusPair.get(reportVO.getRdStatus()));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- BigDecimal accidentTime = reportVO.getAccidentTime();
|
|
|
|
|
- BigDecimal repairTime = reportVO.getRepairTime();
|
|
|
|
|
- BigDecimal selfStopTime = reportVO.getSelfStopTime();
|
|
|
|
|
- BigDecimal complexityTime = reportVO.getComplexityTime();
|
|
|
|
|
- BigDecimal relocationTime = reportVO.getRelocationTime();
|
|
|
|
|
- BigDecimal rectificationTime = reportVO.getRectificationTime();
|
|
|
|
|
- BigDecimal waitingStopTime = reportVO.getWaitingStopTime();
|
|
|
|
|
- BigDecimal winterBreakTime = reportVO.getWinterBreakTime();
|
|
|
|
|
- BigDecimal partyaDesignTime = reportVO.getPartyaDesign();
|
|
|
|
|
- BigDecimal partyaPrepareTime = reportVO.getPartyaPrepare();
|
|
|
|
|
- BigDecimal partyaResourceTime = reportVO.getPartyaResource();
|
|
|
|
|
- BigDecimal otherNptTime = reportVO.getOtherNptTime();
|
|
|
|
|
- if (accidentTime.compareTo(BigDecimal.ZERO) > 0 || repairTime.compareTo(BigDecimal.ZERO) > 0 || selfStopTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
|
|
- || complexityTime.compareTo(BigDecimal.ZERO) > 0 || relocationTime.compareTo(BigDecimal.ZERO) > 0 || rectificationTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
|
|
- || waitingStopTime.compareTo(BigDecimal.ZERO) > 0 || winterBreakTime.compareTo(BigDecimal.ZERO) > 0 || partyaDesignTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
|
|
- || partyaPrepareTime.compareTo(BigDecimal.ZERO) > 0 || partyaResourceTime.compareTo(BigDecimal.ZERO) > 0 || otherNptTime.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
|
|
- // 设置非生产时间填写标识
|
|
|
|
|
- reportVO.setNonProductFlag(true);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 设置非生产时间填写标识
|
|
|
|
|
+ reportVO.setNonProductFlag(setNoProductFlag(reportVO));
|
|
|
// 创建时间 格式化 yyyy-MM-dd
|
|
// 创建时间 格式化 yyyy-MM-dd
|
|
|
if (ObjUtil.isNotEmpty(reportVO.getCreateTime())) {
|
|
if (ObjUtil.isNotEmpty(reportVO.getCreateTime())) {
|
|
|
reportVO.setCreateTimeStr(LocalDateTimeUtil.format(reportVO.getCreateTime(), DatePattern.NORM_DATE_PATTERN));
|
|
reportVO.setCreateTimeStr(LocalDateTimeUtil.format(reportVO.getCreateTime(), DatePattern.NORM_DATE_PATTERN));
|
|
@@ -2595,6 +2587,8 @@ public class IotRdDailyReportController {
|
|
|
findAndThen(taskPair, reportVO.getTaskId(), taskName -> reportVO.setTaskName(taskName));
|
|
findAndThen(taskPair, reportVO.getTaskId(), taskName -> reportVO.setTaskName(taskName));
|
|
|
// 日报关联的任务信息(兼容主井完工 关联井未完工的情况)
|
|
// 日报关联的任务信息(兼容主井完工 关联井未完工的情况)
|
|
|
findAndThen(relatedPlatformPair, reportVO.getPlatformGroup(), relatedTaskName -> reportVO.setTaskName(relatedTaskName));
|
|
findAndThen(relatedPlatformPair, reportVO.getPlatformGroup(), relatedTaskName -> reportVO.setTaskName(relatedTaskName));
|
|
|
|
|
+ // 平台井相关的非生产时间标识
|
|
|
|
|
+ findAndThen(reportNonProductFlagPair, reportVO.getPlatformGroup(), nonProductFlag -> reportVO.setNonProductFlag(nonProductFlag));
|
|
|
// 日报关联的任务施工状态(兼容主井完工 关联井未完工的情况)
|
|
// 日报关联的任务施工状态(兼容主井完工 关联井未完工的情况)
|
|
|
findAndThen(relatedWellStatusPair, reportVO.getPlatformGroup(), rdStatus -> reportVO.setRdStatus(rdStatus));
|
|
findAndThen(relatedWellStatusPair, reportVO.getPlatformGroup(), rdStatus -> reportVO.setRdStatus(rdStatus));
|
|
|
// 日报关联的责任人
|
|
// 日报关联的责任人
|
|
@@ -2604,6 +2598,34 @@ public class IotRdDailyReportController {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param dailyReport
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ private Boolean setNoProductFlag(IotRdDailyReportRespVO dailyReport){
|
|
|
|
|
+ BigDecimal accidentTime = dailyReport.getAccidentTime();
|
|
|
|
|
+ BigDecimal repairTime = dailyReport.getRepairTime();
|
|
|
|
|
+ BigDecimal selfStopTime = dailyReport.getSelfStopTime();
|
|
|
|
|
+ BigDecimal complexityTime = dailyReport.getComplexityTime();
|
|
|
|
|
+ BigDecimal relocationTime = dailyReport.getRelocationTime();
|
|
|
|
|
+ BigDecimal rectificationTime = dailyReport.getRectificationTime();
|
|
|
|
|
+ BigDecimal waitingStopTime = dailyReport.getWaitingStopTime();
|
|
|
|
|
+ BigDecimal winterBreakTime = dailyReport.getWinterBreakTime();
|
|
|
|
|
+ BigDecimal partyaDesignTime = dailyReport.getPartyaDesign();
|
|
|
|
|
+ BigDecimal partyaPrepareTime = dailyReport.getPartyaPrepare();
|
|
|
|
|
+ BigDecimal partyaResourceTime = dailyReport.getPartyaResource();
|
|
|
|
|
+ BigDecimal otherNptTime = dailyReport.getOtherNptTime();
|
|
|
|
|
+ if (accidentTime.compareTo(BigDecimal.ZERO) > 0 || repairTime.compareTo(BigDecimal.ZERO) > 0 || selfStopTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
|
|
+ || complexityTime.compareTo(BigDecimal.ZERO) > 0 || relocationTime.compareTo(BigDecimal.ZERO) > 0 || rectificationTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
|
|
+ || waitingStopTime.compareTo(BigDecimal.ZERO) > 0 || winterBreakTime.compareTo(BigDecimal.ZERO) > 0 || partyaDesignTime.compareTo(BigDecimal.ZERO) > 0
|
|
|
|
|
+ || partyaPrepareTime.compareTo(BigDecimal.ZERO) > 0 || partyaResourceTime.compareTo(BigDecimal.ZERO) > 0 || otherNptTime.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
|
|
+ // 设置非生产时间填写标识
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@GetMapping("/taskActualProgress")
|
|
@GetMapping("/taskActualProgress")
|
|
|
@Operation(summary = "查询日报所属任务的实际进度")
|
|
@Operation(summary = "查询日报所属任务的实际进度")
|
|
|
@PreAuthorize("@ss.hasPermission('pms:iot-rd-daily-report:query')")
|
|
@PreAuthorize("@ss.hasPermission('pms:iot-rd-daily-report:query')")
|