diff --git a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java index 3c4075c..0a32df5 100644 --- a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java @@ -135,7 +135,6 @@ public interface NegativeMapper extends BaseMapper { // endregion // region 现场督察大屏 - @Select("SELECT " + "COUNT(DISTINCT ng.id) AS proTotal, " + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " + @@ -143,11 +142,11 @@ public interface NegativeMapper extends BaseMapper { "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + - "WHERE problemSourcesCode IN (13,14,15) " + + "WHERE problemSourcesCode IN (13) " + "AND sd.statistics_group_id=#{groupId} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime};") DayTimeSuperviseVo getSupervisionRank(Date beginTime, Date endTime, Integer groupId); - + //现场督察 @Select("SELECT " + "sd.short_name AS label, " + "sd.id AS departId, " + @@ -159,7 +158,7 @@ public interface NegativeMapper extends BaseMapper { "ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " + - "WHERE problemSourcesCode IN (13,14,15) " + + "WHERE problemSourcesCode IN (13) " + "AND sd.statistics_group_id=#{groupId} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + @@ -574,7 +573,7 @@ public interface NegativeMapper extends BaseMapper { // region 二级大屏现场督察 - +//分县级 - 现场督察 @Select("SELECT " + "COUNT(DISTINCT ng.id) AS proTotal, " + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " + @@ -582,12 +581,12 @@ public interface NegativeMapper extends BaseMapper { "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.problemSourcesCode IN (13,14,15) " + + "WHERE ng.problemSourcesCode IN (13) " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id=10 " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} ") DayTimeSuperviseVo getPoliceRankOverview(Integer departId, Date beginTime, Date endTime); - + //分县级 - 现场督察 @Select("SELECT " + "COUNT(DISTINCT ng.id) AS proTotal, " + "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS changing, " + @@ -595,12 +594,12 @@ public interface NegativeMapper extends BaseMapper { "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.problemSourcesCode IN (13,14,15) " + + "WHERE ng.problemSourcesCode IN (13) " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id!=10 " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} ") DayTimeSuperviseVo getTeamRankOverview(Integer departId, Date beginTime, Date endTime); - + //分县级 - 现场督察 @Select("SELECT " + "sd.short_name AS label, " + "COUNT(DISTINCT ng.id) AS denominator, " + @@ -609,14 +608,14 @@ public interface NegativeMapper extends BaseMapper { "ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.problemSourcesCode IN (13,14,15) " + + "WHERE ng.problemSourcesCode IN (13) " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id=10 " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY sd.short_name " + "ORDER BY denominator DESC;") List getPoliceChangedRankList(Integer departId, Date beginTime, Date endTime); - + //分县级 - 现场督察 @Select("SELECT " + "sd.short_name AS label, " + "COUNT(DISTINCT ng.id) AS denominator, " + @@ -625,7 +624,7 @@ public interface NegativeMapper extends BaseMapper { "ifnull(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS value " + "FROM negative ng " + "LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " + - "WHERE ng.problemSourcesCode IN (13,14,15) " + + "WHERE ng.problemSourcesCode IN (13) " + "AND ng.second_involve_depart_id=#{departId} " + "AND sd.statistics_group_id!=10 " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +