Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

Zimo 1 день назад
Родитель
Сommit
36cc1cd9fb

+ 19 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/IotRdDailyReportController.java

@@ -2564,6 +2564,25 @@ public class IotRdDailyReportController {
                     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);
+            }
             // 创建时间 格式化 yyyy-MM-dd
             if (ObjUtil.isNotEmpty(reportVO.getCreateTime())) {
                 reportVO.setCreateTimeStr(LocalDateTimeUtil.format(reportVO.getCreateTime(), DatePattern.NORM_DATE_PATTERN));

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/vo/IotRdDailyReportRespVO.java

@@ -168,6 +168,9 @@ public class IotRdDailyReportRespVO {
     @Schema(description = "其它非生产时间原因")
     private String otherNptReason;
 
+    @Schema(description = "非生产时间填写标识 true false")
+    private Boolean nonProductFlag = false;
+
     @Schema(description = "施工开始日期")
     private LocalDateTime constructionStartDate;
 

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

@@ -88,6 +88,8 @@ public class UserProfileController {
         boolean ryXjReportFlag = false;
         // 瑞鹰修井日报 菜单标识 移动端使用
         boolean ryXjReportApprovalFlag = false;
+        // 瑞都日报 修改非生产时效标识 移动端使用
+        boolean rdNonProductFlag = false;
         // 获取当前登录人的公司级部门 如果 是 四川瑞都163 则设置 标识 rdReportFlag = true
         // 查询瑞都下所有部门
         Set<Long> childDeptIds = deptService.getChildDeptIdListFromCache(163l);
@@ -105,6 +107,10 @@ public class UserProfileController {
             if (childDeptIds.contains(dept.getId())) {
                 rdReportFlag = true;
             }
+            // 瑞都日报 非生产时效 填报
+            if (childDeptIds.contains(dept.getId()) && roleCodes.contains("非生产时效RD")) {
+                rdNonProductFlag = true;
+            }
             // 瑞恒日报标识
             if (rhChildDeptIds.contains(dept.getId()) && roleCodes.contains("日报填报RH")) {
                 rhReportFlag = true;
@@ -133,7 +139,7 @@ public class UserProfileController {
         // 获得社交用户信息
         List<SocialUserDO> socialUsers = socialService.getSocialUserList(user.getId(), UserTypeEnum.ADMIN.getValue());
         return success(UserConvert.INSTANCE.convert(user, userRoles, dept, posts, socialUsers,
-                rdReportFlag, rhReportFlag, rhReportApprovalFlag, ryReportFlag, ryReportApprovalFlag, ryXjReportFlag, ryXjReportApprovalFlag));
+                rdReportFlag, rdNonProductFlag, rhReportFlag, rhReportApprovalFlag, ryReportFlag, ryReportApprovalFlag, ryXjReportFlag, ryXjReportApprovalFlag));
     }
 
     @PutMapping("/update")

+ 2 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileRespVO.java

@@ -62,6 +62,8 @@ public class UserProfileRespVO {
 
     @Schema(description = "瑞都日报 功能模块标识", example = "true false")
     private boolean rdReportFlag;
+    @Schema(description = "瑞都日报 非生产时效标识", example = "true false")
+    private boolean rdNonProductFlag;
 
     @Schema(description = "瑞恒日报 功能模块标识", example = "true false")
     private boolean rhReportFlag;

+ 2 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/user/UserConvert.java

@@ -47,7 +47,7 @@ public interface UserConvert {
 
     default UserProfileRespVO convert(AdminUserDO user, List<RoleDO> userRoles,
                                       DeptDO dept, List<PostDO> posts, List<SocialUserDO> socialUsers,
-                                      boolean rdReportFlag, boolean rhReportFlag, boolean rhReportApprovalFlag, boolean ryReportFlag,
+                                      boolean rdReportFlag, boolean rdNonProductFlag, boolean rhReportFlag, boolean rhReportApprovalFlag, boolean ryReportFlag,
                                       boolean ryReportApprovalFlag, boolean ryXjReportFlag, boolean ryXjReportApprovalFlag) {
         UserProfileRespVO userVO = BeanUtils.toBean(user, UserProfileRespVO.class);
         userVO.setRoles(BeanUtils.toBean(userRoles, RoleSimpleRespVO.class));
@@ -55,6 +55,7 @@ public interface UserConvert {
         userVO.setPosts(BeanUtils.toBean(posts, PostSimpleRespVO.class));
         userVO.setSocialUsers(BeanUtils.toBean(socialUsers, UserProfileRespVO.SocialUser.class));
         userVO.setRdReportFlag(rdReportFlag);
+        userVO.setRdNonProductFlag(rdNonProductFlag);
         userVO.setRhReportFlag(rhReportFlag);
         userVO.setRhReportApprovalFlag(rhReportApprovalFlag);
         userVO.setRyReportFlag(ryReportFlag);