|
|
@@ -118,10 +118,24 @@ public class IotRhDailyReportController {
|
|
|
@PreAuthorize("@ss.hasPermission('pms:iot-rh-daily-report:query')")
|
|
|
public CommonResult<IotRhDailyReportRespVO> getIotRhDailyReport(@RequestParam("id") Long id) {
|
|
|
IotRhDailyReportDO iotRhDailyReport = iotRhDailyReportService.getIotRhDailyReport(id);
|
|
|
+ if (ObjUtil.isEmpty(iotRhDailyReport)) {
|
|
|
+ return success(null);
|
|
|
+ }
|
|
|
// 查询当前日报关联的 部门下 增压机 的产能
|
|
|
BigDecimal capacity = iotRhDailyReportService.queryCapacity(iotRhDailyReport.getDeptId());
|
|
|
IotRhDailyReportRespVO result = BeanUtils.toBean(iotRhDailyReport, IotRhDailyReportRespVO.class);
|
|
|
result.setCapacity(capacity);
|
|
|
+ // 查询日报关联的项目 任务信息
|
|
|
+ Long projectId = result.getProjectId();
|
|
|
+ Long taskId = result.getTaskId();
|
|
|
+ if (ObjUtil.isNotEmpty(projectId)) {
|
|
|
+ IotProjectInfoDO project = iotProjectInfoService.getIotProjectInfo(projectId);
|
|
|
+ result.setContractName(project.getContractName());
|
|
|
+ }
|
|
|
+ if (ObjUtil.isNotEmpty(taskId)) {
|
|
|
+ IotProjectTaskDO task = iotProjectTaskService.getIotProjectTask(taskId);
|
|
|
+ result.setTaskName(task.getWellName());
|
|
|
+ }
|
|
|
// 查询日报关联油耗记录
|
|
|
IotDailyReportFuelPageReqVO reqVO = new IotDailyReportFuelPageReqVO();
|
|
|
reqVO.setReportId(result.getId());
|