Browse Source

Merge branch 'feature-bieao' of lift-manager/lift-server into develop

bieao 5 years ago
parent
commit
661fa9623b

+ 1 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/annualinspection/service/AnnualInspectionService.java

@@ -58,7 +58,7 @@ public class AnnualInspectionService extends ServiceImpl<AnnualInspectionMapper,
     public IPage<InspectionResponse> pageByCondition(InspectionRequest request) {
         //总经理查询所有年检任务
         if (CommonEnum.DefaultRole.HIGH_DIRECTOR.getCode().equals(request.getCurrentRoleCode())) {
-            request.setUserId(0L);
+            request.setUserId(null);
         }
         return baseMapper.pageByCondition(request.getPage(), request);
     }

+ 5 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/dto/RepairRequest.java

@@ -201,4 +201,9 @@ public class RepairRequest extends PageRequest {
      */
     @NotEmpty(message = "缺少急修图片")
     private List<String> erRecordImg;
+
+    /**
+     * 当前用户角色code
+     */
+    private String currentRoleCode;
 }

+ 4 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/EmergencyRepairService.java

@@ -64,6 +64,10 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      * @return IPage<RepairResponse>
      */
     public IPage<RepairResponse> pageByCondition(RepairRequest request) {
+        //总经理查询所有年检任务
+        if (CommonEnum.DefaultRole.HIGH_DIRECTOR.getCode().equals(request.getCurrentRoleCode())) {
+            request.setUserId(null);
+        }
         return baseMapper.pageByCondition(request.getPage(), request);
     }
 

+ 1 - 1
lift-business-service/src/main/resources/mapper/annualinspection/AnnualInspectionMapper.xml

@@ -128,7 +128,7 @@
                 <if test="cond.projectId != null and cond.projectId > 0">
                     AND pr.id = #{cond.projectId}
                 </if>
-                <if test="cond.workerId != null and cond.workerId > 0">
+                <if test="cond.workerId != null">
                     AND pu.user_id = #{cond.workerId}
                 </if>
             ) t

+ 1 - 1
lift-business-service/src/main/resources/mapper/emergency/EmergencyRepairMapper.xml

@@ -163,7 +163,7 @@
             <if test="cond.regionId != null and cond.regionId > 0">
                 AND pr.region_id = #{cond.regionId}
             </if>
-            <if test="cond.workerId != null and cond.workerId > 0">
+            <if test="cond.workerId != null">
                 AND er.worker_id1 = #{cond.workerId}
             </if>
             <if test="cond.repairBegin != null">