Sfoglia il codice sorgente

优化巡检功能

wuxw 1 anno fa
parent
commit
5e66fa7502

+ 10 - 0
java110-bean/src/main/java/com/java110/dto/inspection/InspectionPlanDto.java

@@ -30,6 +30,8 @@ public class InspectionPlanDto extends PageDto implements Serializable {
     private String remark;
     private String endTime;
     private String staffName;
+
+    private String staffNameLike;
     private String signType;
     private String startTime;
     private String curTime;
@@ -307,4 +309,12 @@ public class InspectionPlanDto extends PageDto implements Serializable {
     public void setInspectionId(String inspectionId) {
         this.inspectionId = inspectionId;
     }
+
+    public String getStaffNameLike() {
+        return staffNameLike;
+    }
+
+    public void setStaffNameLike(String staffNameLike) {
+        this.staffNameLike = staffNameLike;
+    }
 }

+ 1 - 0
java110-db/src/main/resources/mapper/community/InspectionPlanStaffV1ServiceDaoImplMapper.xml

@@ -22,6 +22,7 @@
         endTime,t.community_id,t.community_id communityId,t.staff_id,t.staff_id staffId
         from inspection_plan_staff t
         where 1 =1
+        and t.status_cd = '0'
         <if test="ipStaffId !=null and ipStaffId != ''">
             and t.ip_staff_id= #{ipStaffId}
         </if>

+ 12 - 0
java110-db/src/main/resources/mapper/community/InspectionPlanV1ServiceDaoImplMapper.xml

@@ -38,7 +38,13 @@
         c.table_columns = 'inspection_plan_period'
         inner join t_dict i on t.sign_type = i.status_cd and i.table_name = 'inspection_plan' and i.table_columns =
         'sign_type'
+        <if test="staffNameLike !=null and staffNameLike != ''">
+        left join inspection_plan_staff ips on t.inspection_plan_id = ips.inspection_plan_id and ips.status_cd = '0'
+        </if>
         where 1 =1
+        <if test="staffNameLike !=null and staffNameLike != ''">
+        and ips.staff_name like concat('%',#{staffNameLike},'%')
+        </if>
         <if test="inspectionPlanName !=null and inspectionPlanName != ''">
             and t.inspection_plan_name= #{inspectionPlanName}
         </if>
@@ -167,7 +173,13 @@
     <select id="queryInspectionPlansCount" parameterType="Map" resultType="Map">
         select count(1) count
         from inspection_plan t
+        <if test="staffNameLike !=null and staffNameLike != ''">
+            left join inspection_plan_staff ips on t.inspection_plan_id = ips.inspection_plan_id and ips.status_cd = '0'
+        </if>
         where 1 =1
+        <if test="staffNameLike !=null and staffNameLike != ''">
+            and ips.staff_name like concat('%',#{staffNameLike},'%')
+        </if>
         <if test="inspectionPlanName !=null and inspectionPlanName != ''">
             and t.inspection_plan_name= #{inspectionPlanName}
         </if>