Преглед изворни кода

Merge branch 'master' of http://1.94.244.160:3000/shuzhihua/pms-iot

Zimo пре 12 часа
родитељ
комит
1567a0c385

+ 2 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/ThingsModelDTO.java

@@ -123,4 +123,6 @@ public class ThingsModelDTO {
     private String minValue;
     private String axisMax;
     private String axisMin;
+    private String periodSecond;
+    private String changeValue;
 }

+ 2 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/IotDeviceController.java

@@ -210,6 +210,8 @@ public class IotDeviceController {
                 e.setMinValue(g.getMinValue());
                 e.setAxisMax(g.getAxisMax());
                 e.setAxisMin(g.getAxisMin());
+                e.setPeriodSecond(g.getPeriodSecond());
+                e.setChangeValue(g.getChangeValue());
             });
         });
         return success(tdParams);

+ 8 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrydailyreport/vo/IotRyDailyReportRespVO.java

@@ -372,4 +372,12 @@ public class IotRyDailyReportRespVO {
 
     @Schema(description = "施工队伍所属上级项目部id", example = "32587")
     private Long projectDeptId;
+
+    @Schema(description = "钻井 施工状态 对应的数据字典 label")
+    @ExcelProperty("钻井 施工状态 label")
+    private String rigStatusName;
+
+    @Schema(description = "修井 施工状态 对应的数据字典 label")
+    @ExcelProperty("修井 施工状态 label")
+    private String repairStatusName;
 }

+ 3 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/job/dailyreport/CreateRyDailyReportStatisticsJob.java

@@ -124,7 +124,9 @@ public class CreateRyDailyReportStatisticsJob implements JobHandler {
 
                 finalMsgBuilder.append(report.getDeptName()).append(":  \n");
                 finalMsgBuilder.append("施工井号:").append(StrUtil.blankToDefault(report.getTaskName(), "无")).append(";  \n");
-                finalMsgBuilder.append("施工状态:").append(StrUtil.blankToDefault(report.getConstructionStatusName(), "无")).append(";  \n");
+                // 逻辑:优先取 rigStatusName,如果为空白则取 repairStatusName,如果都为空白则返回 "无"
+                String status = StrUtil.firstNonBlank(report.getRigStatusName(), report.getRepairStatusName());
+                finalMsgBuilder.append("施工状态:").append(StrUtil.blankToDefault(status, "无")).append(";  \n");
                 // finalMsgBuilder.append("工艺:").append(StrUtil.blankToDefault(report.getTechniqueNames(), "无")).append(";  \n");
                 finalMsgBuilder.append("施工简报:").append(StrUtil.blankToDefault(report.getConstructionBrief(), "无")).append(";  \n");
                 finalMsgBuilder.append("下步施工计划:").append(StrUtil.blankToDefault(report.getNextPlan(), "无")).append("。  \n");

+ 4 - 4
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotrydailyreport/IotRyDailyReportServiceImpl.java

@@ -1619,7 +1619,7 @@ public class IotRyDailyReportServiceImpl implements IotRyDailyReportService {
                 });
             }
             if (CollUtil.isNotEmpty(repairStatusDictData)) {
-                rigStatusDictData.forEach(data -> {
+                repairStatusDictData.forEach(data -> {
                     repairConstructStatusPair.put(data.getValue(), data.getLabel());
                 });
             }
@@ -1834,7 +1834,7 @@ public class IotRyDailyReportServiceImpl implements IotRyDailyReportService {
             // 钻井 施工状态 数据字典 定时任务生成 生产动态列表使用
             findAndThen(rigConstructStatusPair, reportVO.getRigStatus(), statusLabel -> {
                 if ("1".equals(reportVO.getProjectClassification())) {
-                    reportVO.setConstructionStatusName(statusLabel);
+                    reportVO.setRigStatusName(statusLabel);
                 }
             });
             // 修井 施工状态 数据字典
@@ -1844,9 +1844,9 @@ public class IotRyDailyReportServiceImpl implements IotRyDailyReportService {
                 }
             });
             // 修井 施工状态 数据字典 定时任务生成 生产动态列表使用
-            findAndThen(repairConstructStatusPair, reportVO.getRigStatus(), statusLabel -> {
+            findAndThen(repairConstructStatusPair, reportVO.getRepairStatus(), statusLabel -> {
                 if ("2".equals(reportVO.getProjectClassification())) {
-                    reportVO.setConstructionStatusName(statusLabel);
+                    reportVO.setRepairStatusName(statusLabel);
                 }
             });
             // 非生产时间原因 数据字典

+ 10 - 2
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java

@@ -113,6 +113,14 @@ public class UserProfileController {
         // 添加瑞鹰日报 填报 审批 标识
         Set<Long> ryChildDeptIds = deptService.getChildDeptIdListFromCache(158l);
         ryChildDeptIds.add(158l);
+        ryChildDeptIds.add(156l);
+
+        // 中东地区 所有子部门
+        Set<Long> zdChildDeptIds = deptService.getChildDeptIdListFromCache(386l);
+        zdChildDeptIds.add(386l);
+
+        // 科瑞石油技术 子部门标识 各地区公司也有可能要求查看 专业公司的 报表数据
+        Set<Long> yfChildDeptIds = deptService.getChildDeptIdListFromCache(156l);
 
         if (ObjUtil.isNotEmpty(dept)) {
             if (childDeptIds.contains(dept.getId()) && roleCodes.contains("日报填报RD")) {
@@ -127,7 +135,7 @@ public class UserProfileController {
             }
 
             // 瑞都日报 统计报表
-            if (childDeptIds.contains(dept.getId()) && roleCodes.contains("项目部日报管理RD")) {
+            if ((childDeptIds.contains(dept.getId()) || zdChildDeptIds.contains(dept.getId())) && roleCodes.contains("项目部日报管理RD")) {
                 rdReportStatisticsFlag = true;
             }
             // 瑞恒日报 统计报表
@@ -135,7 +143,7 @@ public class UserProfileController {
                 rhReportStatisticsFlag = true;
             }
             // 瑞鹰日报 统计报表
-            if (ryChildDeptIds.contains(dept.getId()) && roleCodes.contains("项目部日报管理RY")) {
+            if ((ryChildDeptIds.contains(dept.getId()) || zdChildDeptIds.contains(dept.getId())) && roleCodes.contains("项目部日报管理RY")) {
                 ryReportStatisticsFlag = true;
             }