@ -12,6 +12,14 @@ import java.util.List;
public interface NegativeMapper extends BaseMapper < Negative > {
public interface NegativeMapper extends BaseMapper < Negative > {
/ * *
* 查询问题趋势
* @param year 年份
* @param args 问题来源变参数组
* @return
* /
List < EchartsVo > getTrend ( Integer year , String . . . args ) ;
// region 首页大屏
// region 首页大屏
/ * *
/ * *
@ -20,16 +28,16 @@ public interface NegativeMapper extends BaseMapper<Negative> {
* @param beginTime
* @param beginTime
* @param endTime
* @param endTime
* /
* /
@Select ( "SELECT sd1.short_name AS label, " +
@Select ( "SELECT " +
"count(DISTINCT ng.id ) AS `value` " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid= sd1.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.problemSourcesCode IN (2, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30) " +
"AND sd.statistics_group_id=#{groupType} " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30)\n" +
"AND sd1.statistics_group_id = #{groupType} " +
"GROUP BY sd.short_name " +
"GROUP BY sd1.short_name " +
"ORDER BY `value` DESC; " )
"ORDER BY `value` DESC " )
List < OrganizeProblemRankVo > selectOrganizeProblemRank ( Integer groupType , Date beginTime , Date endTime ) ;
List < OrganizeProblemRankVo > selectOrganizeProblemRank ( Integer groupType , Date beginTime , Date endTime ) ;
// 业务类型占比
// 业务类型占比
@ -47,118 +55,62 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerificationPro, " +
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerificationPro, " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS complaintPro, " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS complaintPro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS talkPro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS talkPro, " +
"SUM( IF(problemSourcesCode IN (26 ),1, 0) ) AS auditPro " +
"SUM( IF(problemSourcesCode IN (27,28,29,30 ),1, 0) ) AS auditPro " +
"FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " )
"FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " )
GlobalOverViewVo getAllGlobalCount ( Date beginTime , Date endTime ) ;
GlobalOverViewVo getAllGlobalCount ( Date beginTime , Date endTime ) ;
// 地图卡片
// 地图卡片
@Select ( "SELECT " +
@Select ( "SELECT " +
"sd1 .short_name AS `name`, " +
"sd.short_name AS `name`, " +
"sd1 .id AS departId, " +
"sd.id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " +
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerifyPro, " +
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerifyPro, " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS mailPro, " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS mailPro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " +
"SUM( IF(problemSourcesCode IN (26),1, 0) ) AS reviewPro " +
"SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS reviewPro " +
"FROM negative ng " +
"FROM sup_depart sd " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd1.statistics_group_id=3 " +
"WHERE sd.statistics_group_id=3 " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30)\n" +
"GROUP BY sd.short_name " +
"GROUP BY sd1.short_name " +
"ORDER BY totalPro DESC;" )
"ORDER BY totalPro DESC;" )
List < GlobalMapIconVo > getMapIcon ( Date beginTime , Date endTime ) ;
List < GlobalMapIconVo > getMapIcon ( Date beginTime , Date endTime ) ;
@Select ( "SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id=3" +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode in (13, 15, 16) " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" )
Integer seleGlobalMapIconInfoDc ( Date beginTime , Date endTime , Integer departId ) ;
@Select ( "SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id=3" +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode in (17, 18, 19, 20) " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" )
Integer seleGlobalMapIconInfoAjhc ( Date beginTime , Date endTime , Integer departId ) ;
@Select ( "SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id =3 " +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode in (21, 22, 23, 24, 25) " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" )
Integer seleGlobalMapIconInfoXf ( Date beginTime , Date endTime , Integer departId ) ;
@Select ( "SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id =3 " +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode=2 " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" )
Integer seleGlobalMapIconInfoJwpy ( Date beginTime , Date endTime , Integer departId ) ;
@Select ( "SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
" INNER join sup_depart sd1 on sd.pid=sd1.id " +
" and sd1.LEVEL=2 AND sd1.statistics_group_id =3 " +
" ) " +
"as temp on ng.involveDepartId=temp.id " +
"WHERE ng.checkStatus<>3 AND problemSourcesCode=26 " +
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" )
Integer seleGlobalMapIconInfoSjdc ( Date beginTime , Date endTime , Integer departId ) ;
List < EchartsVo > getGlobalRecentlyTrendByMonth ( String year ) ;
List < EchartsVo > getGlobalRecentlyTrendByMonth ( String year ) ;
// endregion
// endregion
// region 现场督察大屏
// region 现场督察大屏
@Select ( "SELECT count(DISTINCT(ng.id)) as proTotal, " +
@Select ( "SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"ROUND((COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null))) / COUNT(DISTINCT ng.id) * 100, 1) AS correctionRate " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"FROM sup_depart sd " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " +
"FROM negative ng " +
"INNER JOIN negative ng ON sd.id=ng.involveDepartId " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " +
"WHERE problemSourcesCode IN (13) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" )
"AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime};" )
DayTimeSuperviseVo getSuperversionRank ( Date beginTime , Date endTime , Integer groupId ) ;
DayTimeSuperviseVo getSuperversionRank ( Date beginTime , Date endTime , Integer groupId ) ;
@Select ( "SELECT sd1.short_name as label, " +
@Select ( "SELECT " +
"sd1.id AS departId, " +
"sd.short_name AS label, " +
"count( DISTINCT ng.id) AS denominator, " +
"sd.id AS departId, " +
"count( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS rate, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " +
"ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1 ) AS value " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rate, " +
"FROM sup_depart sd " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " +
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " +
"FROM negative ng " +
"INNER JOIN negative ng on ng.involveDepartId=sd.id " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " +
"WHERE problemSourcesCode IN (13) " +
"WHERE ng.problemSourcesCode=13 " +
"AND sd.statistics_group_id=#{groupId} " +
"AND ng.checkStatus<>3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " +
"GROUP BY sd.short_name " +
"order by rate desc " )
"ORDER BY rate" )
List < RankVo > getChangedRateRank ( Date beginTime , Date endTime , Integer groupId ) ;
List < RankVo > getChangedRateRank ( Date beginTime , Date endTime , Integer groupId ) ;
@Select ( "SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " +
@Select ( "SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " +
@ -180,51 +132,67 @@ public interface NegativeMapper extends BaseMapper<Negative> {
" LEFT JOIN negative_blame d ON c.id = d.negativeId " +
" LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15)" )
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15)" )
RankVoSupTwo getTemp ( Date beginTime , Date endTime ) ;
RankVoSupTwo getTemp ( Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"COUNT( DISTINCT ng.id ) AS problemNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS rectifingNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS rectifedNumber, " +
"COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " +
"COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rectifyRate " +
"FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode IN (13, 15) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; " )
SupervisionNotifyOverView getAllSupervisionNotifyCount ( Date beginTime , Date endTime ) ;
@Select ( "SELECT sd1.short_name AS `name`, " +
"sd1.id as departId, " +
@Select ( "SELECT " +
"sd.short_name AS `name`, " +
"sd.id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"COUNT( DISTINCT if(ng.isRectifyCode=0, ng.id, NULL)) AS changing, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " +
"COUNT( DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) AS changed, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " +
"COUNT(DISTINCT nb.blameName ) AS personNum," +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed , " +
"COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " +
"COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " +
"IFNULL( ROUND( ( COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT( DISTINCT ng.id ) ) * 100, 1 ), 0) AS changedRate " +
"COUNT( DISTINCT nb.blameIdCode ) AS personNum, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS changedRate " +
"FROM sup_depart sd " +
"FROM sup_depart sd " +
"INNER JOIN sup_depart sd1 ON sd.pid = sd1.id AND sd1.statistics_group_id = 3 " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"LEFT JOIN negative ng ON sd.id = ng.involveDepartId " +
"AND ng.checkStatus <> 3 " +
"AND ng.problemSourcesCode IN (13, 15)" +
"AND ng.problemSourcesCode IN (13, 15)" +
"AND ng. discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY `name`;" )
"WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name " +
"ORDER BY totalPro DESC;" )
List < SuperviseMapIconVo > getSupervisionMapIconInfo ( Date beginTime , Date endTime ) ;
List < SuperviseMapIconVo > getSupervisionMapIconInfo ( Date beginTime , Date endTime ) ;
List < EchartsVo > getSupervisionTrend ( String year , String [ ] args ) ;
@Select ( "SELECT count(DISTINCT(ng.id)) as proTotal, " +
@Select ( "SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"ROUND(COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0), 0) * 100, 1) AS correctionRate " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"FROM sup_depart sd " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " +
"FROM negative ng " +
"INNER JOIN negative ng on sd.id=ng.involveDepartI d " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.i d " +
"WHERE ng.checkStatus<>3 " +
"WHERE problemSourcesCode IN (15) " +
"AND ng.problemSourcesCode=15 " +
"AND ng.special_supervision=#{queryType} " +
"AND special_supervision = #{queryType } " +
"AND sd.statistics_group_id=#{groupId } " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" )
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; " )
DayTimeSuperviseVo getYellowBetOverview ( Date beginTime , Date endTime , Integer groupId , Integer queryType ) ;
DayTimeSuperviseVo getYellowBetOverview ( Date beginTime , Date endTime , Integer groupId , Integer queryType ) ;
@Select ( "SELECT sd1.short_name as label, " +
@Select ( "SELECT " +
"count( DISTINCT ng.id) AS value " +
"sd.short_name AS label, " +
"FROM sup_depart sd " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " +
"FROM negative ng " +
"INNER JOIN negative ng on sd.id= ng.involveDepartId " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE ng.checkStatus<>3 " +
"WHERE problemSourcesCode IN (15) " +
"AND ng.problemSourcesCode=15 " +
"AND ng.special_supervision=#{queryType} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND special_supervision = #{queryType} " +
"GROUP BY sd.short_name " +
"GROUP BY label " +
"ORDER BY `value` DESC;" )
"order by value desc" )
List < OrganizeProblemRankVo > getYellowBetRankList ( Date beginTime , Date endTime , Integer groupId , Integer queryType ) ;
List < OrganizeProblemRankVo > getYellowBetRankList ( Date beginTime , Date endTime , Integer groupId , Integer queryType ) ;
@ -286,25 +254,23 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List < VideoSuperviseMapIconVo > getVideoSuperviseMapIconInfo ( Date beginTime , Date endTime ) ;
List < VideoSuperviseMapIconVo > getVideoSuperviseMapIconInfo ( Date beginTime , Date endTime ) ;
List < EchartsVo > getVideoSuperviseTrend ( String year , String [ ] args ) ;
// endregion
// endregion
// region 案件核查大屏
// region 案件核查大屏
@Select ( "SELECT sd1.short_name AS label, " +
@Select ( "SELECT " +
"count(DISTINCT ng.id) AS `value` " +
"sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " +
"INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE checkStatus <> 3 " +
"AND sd.statistics_group_id=#{groupId} " +
"AND problemSourcesCode in (17, 18, 19, 20) " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"GROUP BY sd1.short_name " +
"ORDER BY `value` DESC;" )
"ORDER BY `value` DESC" )
List < OrganizeProblemRankVo > getCaseVerificationRank ( Date beginTime , Date endTime , int groupId ) ;
List < OrganizeProblemRankVo > getCaseVerificationRank ( Date beginTime , Date endTime , int groupId ) ;
List < EchartsVo > getCaseVerificationTrend ( String year , String [ ] args ) ;
@Select ( "SELECT count(DISTINCT ng.id) AS total, " +
@Select ( "SELECT count(DISTINCT ng.id) AS total, " +
"COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " +
"COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " +
@ -319,20 +285,21 @@ public interface NegativeMapper extends BaseMapper<Negative> {
CaseVerificationCountVo getAllCaseVerificationCount ( Date beginTime , Date endTime ) ;
CaseVerificationCountVo getAllCaseVerificationCount ( Date beginTime , Date endTime ) ;
@Select ( "SELECT sd.short_name AS `name`, " +
@Select ( "SELECT " +
"sd.short_name AS `name`, " +
"sd.id AS departId, " +
"sd.id AS departId, " +
"COUNT( DISTINCT ng.id ) AS total, " +
"COUNT( DISTINCT ng.id ) AS total, " +
"COUNT( DISTINCT IF( ng.checkStatus<>3, ng.id, NULL ) ) AS confirmed, " +
"COUNT( DISTINCT IF( ng.checkStatus<>3, ng.id, NULL ) ) AS confirmed, " +
"COUNT( DISTINCT IF( nb.handleResultCode!=14, nb.blameId, NULL ) ) AS dealCasePro, " +
"COUNT( DISTINCT IF( nb.handleResultCode!=14, nb.blameId, NULL ) ) AS dealCasePro, " +
"COUNT(DISTINCT nb.blameName ) AS punishPre, " +
"COUNT( DISTINCT nb.blameIdCode ) AS punishPre, " +
"COUNT(DISTINCT ng.involveDepartId ) AS punishOrg, " +
"COUNT( DISTINCT nb.blameDepartId ) AS punishOrg, " +
"IFNULL(ROUND(COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0) AS rate " +
"IFNULL( ROUND( COUNT( DISTINCT IF( ng.isRectifyCode=1, ng.id, NULL ) )/COUNT( DISTINCT ng.id )*100, 1 ), 0) AS rate " +
"FROM sup_depart sd " +
"FROM sup_depart sd " +
"INNER JOIN sup_depart sd1 ON sd.id = sd1.pid AND sd.statistics_group_id = 3 " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"LEFT JOIN negative ng ON sd1.id = ng.involveDepartId " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name;" )
"GROUP BY sd.short_name;" )
List < CaseVerificationMapVo > getCaseVerificationMap ( Date beginTime , Date endTime ) ;
List < CaseVerificationMapVo > getCaseVerificationMap ( Date beginTime , Date endTime ) ;
@ -367,34 +334,137 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List < EchartsVo > getMailTrend ( Integer year , Integer type ) ;
List < EchartsVo > getMailTrend ( Integer year , Integer type ) ;
List < EchartsVo > getSubOneTrend ( @Param ( "departPId" ) Integer departPId , @Param ( "year" ) Integer year , @Param ( "args" ) String [ ] args ) ;
List < EchartsVo > getSubOneTrend ( Integer departId , String year , String . . . args ) ;
// endregion
// endregion
// region 二级大屏首页大屏
// region 二级大屏首页大屏
List < RankVo > getCaseVerifyRank ( Integer departPId , Integer statisticsGroupId , Date beginTime , Date endTime , String [ ] args ) ;
SubOneOverViewVo getCaseVerifyOverView ( Integer departPId , Integer statisticsGroupId , Date beginTime , Date endTime , String [ ] args ) ;
SubOneOverViewVo getSubOneSupervisionRankOverView ( Integer departPId , Integer statisticsGroupId , Date beginTime , Date endTime , String [ ] args ) ;
@Select ( "SELECT " +
"COUNT( DISTINCT ng.id ) AS one, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13,15,16) " +
"AND ng.second_involve_depart_id = #{departId} " +
"AND sd.statistics_group_id=10 " )
SubOneOverViewVo getSubOneGlobalPoliceSupervisionRankOverView ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"COUNT( DISTINCT ng.id ) AS one, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL ) ) AS two, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) AS three, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 )*100, 0) AS four " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13,15,16) " +
"AND ng.second_involve_depart_id = #{departId} " +
"AND sd.statistics_group_id!=10" )
SubOneOverViewVo getSubOneGlobalTeamSupervisionRankOverView ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"ng.involveDepartName AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, 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.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13,15,16) " +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY rate DESC, denominator DESC" )
List < RankVo > getSubOneGlobalPrecinctSupervisionRank ( Integer departPId , Date beginTime , Date endTime ) ;
List < RankVo > getSubOneSupervisionRank ( Integer departPId , Integer statisticsGroupId , Date beginTime , Date endTime , String [ ] args ) ;
@Select ( "SELECT " +
"ng.involveDepartName AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL )) AS numerator, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, ng.id, NULL)) / count(DISTINCT ng.id)*100, 1), 0) AS rate, " +
"IFNULL( ROUND( COUNT(DISTINCT if(ng.isRectifyCode=1, 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.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (13,15,16)\n" +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY rate DESC, denominator DESC" )
List < RankVo > getSubOneGlobalTeamSupervisionRank ( Integer departPId , Date beginTime , Date endTime ) ;
@Select ( "SELECT count(DISTINCT ng.id) AS one, " +
@Select ( "SELECT count(DISTINCT ng.id) AS one, " +
"COUNT( DISTINCT( if(processing_status='processing', ng.id, NULL) ) ) AS two, " +
"COUNT( DISTINCT( if(processing_status='processing', ng.id, NULL) ) ) AS two, " +
"count(DISTINCT involveDepartId) AS three, " +
"count(DISTINCT involveDepartId) AS three, " +
"count(DISTINCT nb.blameIdCode) AS four, " +
"count(DISTINCT nb.blameIdCode) AS four, " +
"ROUND( COUNT( DISTINCT( if(processing_status='completed', ng.id, NULL) ) ) / count(DISTINCT ng.id)*100, 1) AS five " +
"ifnull( ROUND( COUNT( DISTINCT( if(processing_status='completed', ng.id, NULL) ) ) / count(DISTINCT ng.id)*100, 1),0 ) AS five " +
"FROM negative ng " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.pid= #{departPId} " +
"WHERE sd.pid= #{departPId} " +
"AND ng.discoveryTime BETWEEN #{beginTime} and #{endTime} " +
"AND ng.discoveryTime BETWEEN #{beginTime} and #{endTime} " )
"AND ng.checkStatus <>3 " )
SubOneOverViewVo getSubOneOverView ( Integer departPId , Date beginTime , Date endTime ) ;
SubOneOverViewVo getSubOneOverView ( Integer departPId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"COUNT( DISTINCT ng.id ) AS one," +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20)\n" +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10" )
SubOneOverViewVo getGlobalPoliceCaseVerifyOverView ( Integer departPId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"COUNT( DISTINCT ng.id ) AS one," +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS two," +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) / COUNT( DISTINCT ng.id ) , 1 ) ,0) AS three " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20)\n" +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10" )
SubOneOverViewVo getGlobalTeamCaseVerifyOverView ( Integer departPId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS value," +
"COUNT( DISTINCT ng.id ) AS numerator, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY value DESC " )
List < RankVo > getGlobalPoliceCaseVerifyRank ( Integer departPId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS value," +
"COUNT( DISTINCT ng.id ) AS numerator, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1,2) , ng.id, NULL ) ) AS denominator " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.second_involve_depart_id = #{departPId} " +
"AND sd.statistics_group_id!=10 " +
"GROUP BY ng.involveDepartName " +
"ORDER BY value DESC " )
List < RankVo > getGlobalTeamCaseVerifyRank ( Integer departPId , Date beginTime , Date endTime ) ;
// endregion
// endregion
// region 二级大屏视频督察
// region 二级大屏视频督察
@ -454,23 +524,74 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// endregion
// endregion
// region 二级大屏现场督察
// region 二级大屏现场督察
@Select ( "SELECT count(DISTINCT(ng.id)) as proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
@Select ( "SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id=10 AND sd.pid=#{departId} " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, 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) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " )
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " )
DayTimeSuperviseVo getPoliceChangedRankOverView ( Integer departId , Date beginTime , Date endTime ) ;
DayTimeSuperviseVo getPoliceRankOverv iew ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT count(DISTINCT(ng.id)) as proTotal, " +
@Select ( "SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS correctionRate " +
"WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " )
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " )
DayTimeSuperviseVo getTeamChangedRankOverView ( Integer departId , Date beginTime , Date endTime ) ;
DayTimeSuperviseVo getTeamRankOverview ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, 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) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY value DESC;" )
List < RankVo > getPoliceChangedRankList ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS numerator, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1),0) AS rate, " +
"ifnull(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, 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) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY value DESC;" )
List < RankVo > getTeamChangedRankList ( Integer departId , Date beginTime , Date endTime ) ;
// @Select("SELECT count(DISTINCT(ng.id)) as proTotal, " +
// "count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
// "count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
// "COALESCE( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 1 ), 0 ) AS correctionRate FROM sup_depart sd " +
// "INNER JOIN negative ng on ng.involveDepartId=sd.id AND sd.statistics_group_id!=10 AND sd.pid=#{departId} " +
// "WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " +
// "AND discoveryTime BETWEEN #{beginTime} AND #{endTime} ")
// DayTimeSuperviseVo getTeamChangedRankOverView(Integer departId, Date beginTime, Date endTime);
@Select ( "SELECT sd.short_name as label, " +
@Select ( "SELECT sd.short_name as label, " +
"sd.id AS departId, " +
"sd.id AS departId, " +
@ -516,17 +637,18 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"GROUP BY oneLevelContent " )
"GROUP BY oneLevelContent " )
List < EchartsVo > getSubOneProblemTypeRatio ( Integer departId , Date beginTime , Date endTime ) ;
List < EchartsVo > getSubOneProblemTypeRatio ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT COUNT(DISTINCT c.id) AS problemNumber, " +
@Select ( "SELECT " +
"COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, null)) AS rectifingNumber, " +
"COUNT( DISTINCT ng.id ) AS problemNumber, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, null)) AS rectifedNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS rectifingNumber, " +
"COUNT(DISTINCT c.involveDepartId) AS departNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS rectifedNumber, " +
"COUNT(DISTINCT d.blameIdCode) AS personNumber, " +
"COUNT( DISTINCT ng.involveDepartId ) AS departNumber, " +
"ROUND( COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, NULL)) / COUNT(DISTINCT c.id) * 100, 1) AS rectifyRate " +
"COUNT( DISTINCT nb.blameIdCode ) AS personNumber, " +
"FROM sup_depart b INNER JOIN negative c ON b.id = c.involveDepartId AND b.pid=#{departId} " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rectifyRate " +
"LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"FROM negative ng " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"AND checkStatus <>3 " +
"WHERE ng.problemSourcesCode IN (13, 15) " +
"AND problemSourcesCode IN (13, 15)" )
"AND ng.second_involve_depart_id=#{departId} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " )
SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount ( Integer departId , Date beginTime , Date endTime ) ;
SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount ( Integer departId , Date beginTime , Date endTime ) ;
@ -541,55 +663,59 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List < EchartsVo > getSubOneSupervisionTrend ( Integer departId , String year ) ;
List < EchartsVo > getSubOneSupervisionTrend ( Integer departId , String year ) ;
@Select ( "SELECT count(DISTINCT(ng.id)) as proTotal, " +
@Select ( "SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"ROUND( count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) )/ count(DISTINCT(ng.id)) *100 , 1 ) AS rate " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"WHERE sd.pid=#{departId} " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE problemSourcesCode IN (15) " +
"AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND sd.statistics_group_id=10 " +
"AND ng.checkStatus != 3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; " )
"AND ng.problemSourcesCode =15 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND special_supervision=#{specialType} " )
DayTimeSuperviseVo getSubOnePoliceYellowBetOverview ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
DayTimeSuperviseVo getSubOnePoliceYellowBetOverview ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
@Select ( "SELECT count(DISTINCT(ng.id)) as proTotal, " +
@Select ( "SELECT " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " +
"ROUND( count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) )/ count(DISTINCT(ng.id)) *100 , 1 ) AS rate " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed, " +
"FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correctionRate " +
"WHERE sd.pid=#{departId} " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE problemSourcesCode IN (15) " +
"AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND sd.statistics_group_id!=10 " +
"AND ng.checkStatus != 3 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; " )
"AND ng.problemSourcesCode =15 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND special_supervision=#{specialType} " )
DayTimeSuperviseVo getSubOneTeamYellowBetOverview ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
DayTimeSuperviseVo getSubOneTeamYellowBetOverview ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
@Select ( "SELECT sd.short_name AS label, " +
@Select ( "SELECT " +
"sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"AND sd.pid = #{departId} AND sd.statistics_group_id=10 " +
"WHERE problemSourcesCode IN (15) " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTim e} " +
"AND ng.special_supervision=#{specialTyp e} " +
"AND ng.checkStatus<>3 " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND ng.problemSourcesCode = 15 " +
"AND sd.statistics_group_id=10 " +
"AND special_supervision = #{specialTyp e} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTim e} " +
"GROUP BY label " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC; " )
"ORDER BY `value` DESC; " )
List < OrganizeProblemRankVo > getSubOnePoliceYellowBetRankList ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
List < OrganizeProblemRankVo > getSubOnePoliceYellowBetRankList ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
@Select ( "SELECT sd.short_name AS label, " +
@Select ( "SELECT " +
"sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"AND sd.pid = #{departId} AND sd.statistics_group_id!=10 " +
"WHERE problemSourcesCode IN (15) " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTim e} " +
"AND ng.special_supervision=#{specialTyp e} " +
"AND ng.checkStatus<>3 " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND ng.problemSourcesCode = 15 " +
"AND sd.statistics_group_id!=10 " +
"AND special_supervision = #{specialTyp e} " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTim e} " +
"GROUP BY label " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC; " )
"ORDER BY `value` DESC; " )
List < OrganizeProblemRankVo > getSubOneTeamYellowBetRankList ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
List < OrganizeProblemRankVo > getSubOneTeamYellowBetRankList ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
@ -597,28 +723,30 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// endregion
// endregion
// region 二级大屏案件核查
// region 二级大屏案件核查
@Select ( "SELECT sd.short_name AS label, " +
@Select ( "SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)\n" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND sd.statistics_group_id=10 " +
"AND problemSourcesCode IN (17,18,19,20) " +
"GROUP BY ng.involveDepartName " +
"AND ng.checkStatus <>3 " +
"ORDER BY `value` DESC; " )
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC" )
List < OrganizeProblemRankVo > getPoliceCaseVerificationRank ( Date beginTime , Date endTime , Integer departId ) ;
List < OrganizeProblemRankVo > getPoliceCaseVerificationRank ( Date beginTime , Date endTime , Integer departId ) ;
@Select ( "SELECT sd.short_name AS label, " +
@Select ( "SELECT " +
"ng.involveDepartName AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)\n" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND sd.statistics_group_id!=10 " +
"AND problemSourcesCode IN (17,18,19,20) " +
"GROUP BY ng.involveDepartName " +
"AND ng.checkStatus <>3 " +
"ORDER BY `value` DESC; " )
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC" )
List < OrganizeProblemRankVo > getTeamCaseVerificationRank ( Date beginTime , Date endTime , Integer departId ) ;
List < OrganizeProblemRankVo > getTeamCaseVerificationRank ( Date beginTime , Date endTime , Integer departId ) ;
@Select ( "SELECT npr.threeLevelContent AS label, " +
@Select ( "SELECT npr.threeLevelContent AS label, " +
@ -634,18 +762,17 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"ORDER BY `value` DESC " )
"ORDER BY `value` DESC " )
List < EchartsVo > getCaseProblemProperty ( Date beginTime , Date endTime , Integer departId , Integer businessType ) ;
List < EchartsVo > getCaseProblemProperty ( Date beginTime , Date endTime , Integer departId , Integer businessType ) ;
@Select ( "SELECT COUNT(DISTINCT ng.id ) AS total, " +
@Select ( "SELECT count(DISTINCT ng.id ) AS total, " +
"COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " +
"COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " +
"COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameId, NULL) ) AS dealCasePro, " +
"COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameId, NULL) ) AS dealCasePro, " +
"COUNT( DISTINCT nb.blameName ) AS punishPre, " +
"COUNT( DISTINCT nb.blameName ) AS punishPre, " +
"COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " +
"COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " +
"IFNULL(( COUNT( DISTINCT IF(ng.checkStatus<>3, ng.id, NULL ) )/COUNT(DISTINCT ng.id*100 , 1) ) ,0 ) as rate " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"FROM negative ng " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode IN (17,18,19,20) " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime } " +
"AND ng.second_involve_depart_id=#{departId } " +
"AND sd.pid=#{departId} " )
"AND ng.problemSourcesCode in (17, 18, 19, 20); " )
CaseVerificationCountVo getSuboOneAllCaseVerificationCount ( Date beginTime , Date endTime , Integer departId ) ;
CaseVerificationCountVo getSuboOneAllCaseVerificationCount ( Date beginTime , Date endTime , Integer departId ) ;
@Select ( "SELECT sdps.label AS `name` , " +
@Select ( "SELECT sdps.label AS `name` , " +
@ -674,6 +801,12 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select ( "SELECT problemSources AS name, count(ng.id) AS value " +
"FROM negative ng " +
"WHERE problemSourcesCode IN (17, 18, 19, 20) " +
"GROUP BY problemSources" )
List < EchartsVo > getCaseSourceRate ( Date beginTime , Date endTime ) ;
// endregion
// endregion
}
}