|
|
@ -4,7 +4,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<select id="getStatisticByMonth" |
|
|
|
<select id="getStatisticByMonth" |
|
|
|
resultType="com.hnac.hzims.operational.defect.dto.OperDefectStatisticsStatusDTO"> |
|
|
|
resultType="com.hnac.hzims.operational.defect.dto.OperDefectStatisticsStatusDTO"> |
|
|
|
SELECT P.DEFECT_GRADING as defectLevel,P.HANDLE_STATUS,COUNT(P.ID) AS DEFECT_NUM from |
|
|
|
SELECT P.DEFECT_LEVEL as defectLevel,P.HANDLE_STATUS,COUNT(P.ID) AS DEFECT_NUM from |
|
|
|
hzims_oper_phenomenon P |
|
|
|
hzims_oper_phenomenon P |
|
|
|
WHERE DATE_FORMAT(P.CREATE_TIME,'%Y-%m') = #{month} |
|
|
|
WHERE DATE_FORMAT(P.CREATE_TIME,'%Y-%m') = #{month} |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
@ -13,16 +13,16 @@ |
|
|
|
#{item} |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
and P.DEFECT_GRADING IS NOT NULL |
|
|
|
and P.DEFECT_LEVEL IS NOT NULL |
|
|
|
AND P.IS_DEFECT='1' |
|
|
|
AND P.IS_DEFECT='1' |
|
|
|
AND P.IS_DELETED = '0' |
|
|
|
AND P.IS_DELETED = '0' |
|
|
|
GROUP BY P.DEFECT_GRADING,P.HANDLE_STATUS |
|
|
|
GROUP BY P.DEFECT_LEVEL,P.HANDLE_STATUS |
|
|
|
ORDER BY P.DEFECT_GRADING |
|
|
|
ORDER BY P.DEFECT_LEVEL |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="getStatisticBySeveralMonth" |
|
|
|
<select id="getStatisticBySeveralMonth" |
|
|
|
resultType="com.hnac.hzims.operational.defect.dto.OperDefectStatisticsStatusDTO"> |
|
|
|
resultType="com.hnac.hzims.operational.defect.dto.OperDefectStatisticsStatusDTO"> |
|
|
|
SELECT P.DEFECT_GRADING as defectLevel,P.HANDLE_STATUS,COUNT(P.ID) AS DEFECT_NUM |
|
|
|
SELECT P.DEFECT_LEVEL as defectLevel,P.HANDLE_STATUS,COUNT(P.ID) AS DEFECT_NUM |
|
|
|
from hzims_oper_phenomenon P |
|
|
|
from hzims_oper_phenomenon P |
|
|
|
WHERE P.CREATE_TIME BETWEEN #{firstMonth} AND #{endMonth} |
|
|
|
WHERE P.CREATE_TIME BETWEEN #{firstMonth} AND #{endMonth} |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
@ -33,13 +33,13 @@ |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
AND P.IS_DEFECT='1' |
|
|
|
AND P.IS_DEFECT='1' |
|
|
|
AND P.IS_DELETED = 0 |
|
|
|
AND P.IS_DELETED = 0 |
|
|
|
and P.DEFECT_GRADING IS NOT NULL |
|
|
|
and P.DEFECT_LEVEL IS NOT NULL |
|
|
|
GROUP BY P.DEFECT_GRADING,P.HANDLE_STATUS |
|
|
|
GROUP BY P.DEFECT_LEVEL,P.HANDLE_STATUS |
|
|
|
ORDER BY P.DEFECT_GRADING |
|
|
|
ORDER BY P.DEFECT_LEVEL |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<select id="getRepetStatistics" |
|
|
|
<select id="getRepetStatistics" |
|
|
|
resultType="com.hnac.hzims.operational.defect.dto.OperDefectStatisticsCodeDTO"> |
|
|
|
resultType="com.hnac.hzims.operational.defect.dto.OperDefectStatisticsCodeDTO"> |
|
|
|
SELECT P.DEFECT_GRADING as defectLevel,P.FAULT_CODE,COUNT(P.ID) AS DEFECT_NUM from |
|
|
|
SELECT P.DEFECT_LEVEL as defectLevel,P.FAULT_CODE,COUNT(P.ID) AS DEFECT_NUM from |
|
|
|
hzims_oper_phenomenon P |
|
|
|
hzims_oper_phenomenon P |
|
|
|
WHERE 1=1 |
|
|
|
WHERE 1=1 |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
@ -48,10 +48,10 @@ |
|
|
|
#{item} |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
and P.DEFECT_GRADING IS NOT NULL |
|
|
|
and P.DEFECT_LEVEL IS NOT NULL |
|
|
|
AND P.IS_DEFECT='1' |
|
|
|
AND P.IS_DEFECT='1' |
|
|
|
AND P.IS_DELETED = 0 |
|
|
|
AND P.IS_DELETED = 0 |
|
|
|
GROUP BY P.DEFECT_GRADING,P.FAULT_CODE |
|
|
|
GROUP BY P.DEFECT_LEVEL,P.FAULT_CODE |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="getManageIndex" resultType="java.lang.Integer"> |
|
|
|
<select id="getManageIndex" resultType="java.lang.Integer"> |
|
|
@ -61,7 +61,7 @@ |
|
|
|
AND P.HANDLE_STATUS = 1 |
|
|
|
AND P.HANDLE_STATUS = 1 |
|
|
|
AND P.IS_DEFECT='1' |
|
|
|
AND P.IS_DEFECT='1' |
|
|
|
AND P.IS_DELETED = 0 |
|
|
|
AND P.IS_DELETED = 0 |
|
|
|
and P.DEFECT_GRADING IS NOT NULL |
|
|
|
and P.DEFECT_LEVEL IS NOT NULL |
|
|
|
AND P.ACT_END_TIME <= P.PLAN_END_TIME |
|
|
|
AND P.ACT_END_TIME <= P.PLAN_END_TIME |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
AND P.CREATE_DEPT in |
|
|
|
AND P.CREATE_DEPT in |
|
|
@ -78,7 +78,7 @@ |
|
|
|
AND D.HANDLE_STATUS = 1 |
|
|
|
AND D.HANDLE_STATUS = 1 |
|
|
|
AND D.IS_DEFECT='1' |
|
|
|
AND D.IS_DEFECT='1' |
|
|
|
AND D.IS_DELETED = 0 |
|
|
|
AND D.IS_DELETED = 0 |
|
|
|
and D.DEFECT_GRADING IS NOT NULL |
|
|
|
and D.DEFECT_LEVEL IS NOT NULL |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
AND D.CREATE_DEPT in |
|
|
|
AND D.CREATE_DEPT in |
|
|
|
<foreach collection="createDept" item="item" index="index" open="(" close=")" separator=","> |
|
|
|
<foreach collection="createDept" item="item" index="index" open="(" close=")" separator=","> |
|
|
@ -94,7 +94,7 @@ |
|
|
|
AND D.HANDLE_STATUS = 0 |
|
|
|
AND D.HANDLE_STATUS = 0 |
|
|
|
AND D.IS_DELETED = 0 |
|
|
|
AND D.IS_DELETED = 0 |
|
|
|
AND D.IS_DEFECT='1' |
|
|
|
AND D.IS_DEFECT='1' |
|
|
|
and D.DEFECT_GRADING IS NOT NULL |
|
|
|
and D.DEFECT_LEVEL IS NOT NULL |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
AND D.CREATE_DEPT in |
|
|
|
AND D.CREATE_DEPT in |
|
|
|
<foreach collection="createDept" item="item" index="index" open="(" close=")" separator=","> |
|
|
|
<foreach collection="createDept" item="item" index="index" open="(" close=")" separator=","> |
|
|
@ -110,7 +110,7 @@ |
|
|
|
AND D.HANDLE_STATUS = 0 |
|
|
|
AND D.HANDLE_STATUS = 0 |
|
|
|
AND D.IS_DELETED = 0 |
|
|
|
AND D.IS_DELETED = 0 |
|
|
|
AND D.IS_DEFECT='1' |
|
|
|
AND D.IS_DEFECT='1' |
|
|
|
and D.DEFECT_GRADING IS NOT NULL |
|
|
|
and D.DEFECT_LEVEL IS NOT NULL |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
AND D.CREATE_DEPT in |
|
|
|
AND D.CREATE_DEPT in |
|
|
|
<foreach collection="createDept" item="item" index="index" open="(" close=")" separator=","> |
|
|
|
<foreach collection="createDept" item="item" index="index" open="(" close=")" separator=","> |
|
|
@ -125,7 +125,7 @@ |
|
|
|
WHERE DATE_FORMAT(D.CREATE_TIME,'%Y-%m') = #{month} |
|
|
|
WHERE DATE_FORMAT(D.CREATE_TIME,'%Y-%m') = #{month} |
|
|
|
AND D.IS_DELETED = 0 |
|
|
|
AND D.IS_DELETED = 0 |
|
|
|
AND D.IS_DEFECT='1' |
|
|
|
AND D.IS_DEFECT='1' |
|
|
|
and D.DEFECT_GRADING IS NOT NULL |
|
|
|
and D.DEFECT_LEVEL IS NOT NULL |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
<if test="createDept != null and createDept.size > 0"> |
|
|
|
AND D.CREATE_DEPT in |
|
|
|
AND D.CREATE_DEPT in |
|
|
|
<foreach collection="createDept" item="item" index="index" open="(" close=")" separator=","> |
|
|
|
<foreach collection="createDept" item="item" index="index" open="(" close=")" separator=","> |
|
|
|