diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.java index dfe376f..cc14f7e 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.java @@ -26,6 +26,7 @@ public interface OperDefectMapper extends UserDataScopeBaseMapper getStatisticByMonth(@Param("month") String month, @Param("createDept") List createDept); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.xml index b0a2909..b958fae 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectMapper.xml @@ -7,9 +7,14 @@ SELECT P.DEFECT_GRADING as defectLevel,P.HANDLE_STATUS,COUNT(P.ID) AS DEFECT_NUM from hzims_oper_phenomenon P WHERE DATE_FORMAT(P.CREATE_TIME,'%Y-%m') = #{month} - - AND P.CREATE_DEPT = #{createDept} + + AND P.CREATE_DEPT in + + #{item} + + and P.DEFECT_GRADING IS NOT NULL + AND P.IS_DEFECT='1' AND P.IS_DELETED = '0' GROUP BY P.DEFECT_GRADING,P.HANDLE_STATUS ORDER BY P.DEFECT_GRADING @@ -20,37 +25,46 @@ SELECT P.DEFECT_GRADING as defectLevel,P.HANDLE_STATUS,COUNT(P.ID) AS DEFECT_NUM from hzims_oper_phenomenon P WHERE P.CREATE_TIME BETWEEN #{firstMonth} AND #{endMonth} - - AND P.CREATE_DEPT = #{createDept} + + AND P.CREATE_DEPT in + + #{item} + + AND P.IS_DEFECT='1' AND P.IS_DELETED = 0 + and P.DEFECT_GRADING IS NOT NULL GROUP BY P.DEFECT_GRADING,P.HANDLE_STATUS ORDER BY P.DEFECT_GRADING