@ -59,45 +59,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
GlobalOverViewVo getSuoOneAllGlobalCount ( Integer departId , Date beginTime , Date endTime ) ;
// 中央总览 todo
@Select ( "SELECT " +
"count(ng.id) AS totalPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (13), 1, 0)), 0) AS supervisionPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (14,15,16), 1, 0)), 0) AS numSupervisionPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (17,18,19,20), 1, 0)), 0) AS caseVerificationPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (27,28,29,30), 1, 0)), 0) AS auditPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro " +
"FROM negative ng " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " )
GlobalOverViewVo getAllGlobalCount ( Date beginTime , Date endTime ) ;
@Select ( "SELECT problemSources as name ,COUNT(DISTINCT id) as value " +
"from negative WHERE problemSourcesCode IN (27,28,29,30) " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY problemSources " +
"ORDER BY value desc " )
List < EchartsVo > getBarEchartsVoData ( Date beginTime , Date endTime ) ;
// 地图卡片
@Select ( "SELECT " +
"sd.short_name AS `name`, " +
"sd.id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"SUM( IF(problemSourcesCode IN (13), 1, 0) ) AS supervisePro, " +
"SUM( IF(problemSourcesCode IN (15,16, 14), 1, 0) ) as numSupervisePro, " +
"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 (2),1, 0) ) AS policePro, " +
"SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS reviewPro " +
"FROM sup_depart sd " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name " +
"ORDER BY totalPro DESC;" )
List < GlobalMapIconVo > getGlobalMap ( Date beginTime , Date endTime ) ;
List < EchartsVo > getGlobalRecentlyTrendByMonth ( String year ) ;
@ -137,48 +99,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List < StrongProblemRank > selectStrongProblemRank ( Date beginTime , Date endTime ) ;
// 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, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber, " +
"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) " +
"AND sd.statistics_group_id=#{groupId} " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime};" )
DayTimeSuperviseVo getSupervisionRank ( Date beginTime , Date endTime , Integer groupId ) ;
@Select ( "SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE problemSourcesCode IN (13) " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime};" )
DayTimeSuperviseVo getProTotalFun ( Date beginTime , Date endTime ) ;
//现场督察
@Select ( "SELECT " +
"sd.short_name AS label, " +
"sd.id AS departId, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS numerator, " +
" COUNT(DISTINCT IF(ng.crt_depart_level = 0, ng.id, null)) as cityNumber, " +
" COUNT(DISTINCT IF(ng.crt_depart_level = 2, ng.id, null)) as countyNumber, " +
"ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS rate, " +
"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) " +
"AND sd.statistics_group_id=#{groupId} " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY denominator desc" )
//,rate desc
List < RankVo > getChangedRateRank ( Date beginTime , Date endTime , Integer groupId ) ;
@Select ( "SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " +
"WHERE ng.id = npr.negativeId " +
@ -189,18 +109,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"GROUP BY oneLevelContent " )
List < EchartsVo > getProblemTypeRatio ( Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"COALESCE(COUNT(DISTINCT ng.id), 0) AS problemNumber, " +
"COALESCE(COUNT(DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL)), 0) AS processingNumber, " +
"COALESCE(COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)), 0) AS completedNumber, " +
"COUNT(IF(nb.type ='department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS departNumber, " +
"COUNT(IF(nb.type ='personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS personNumber, " +
"COALESCE(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 negative_blame nb ON ng.id = nb.negativeId " +
"WHERE ng.problemSourcesCode IN (13,14, 15) " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; " )
SupervisionNotifyOverView getAllSupervisionNotifyCount ( Date beginTime , Date endTime ) ;
@ -223,130 +131,9 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select ( "SELECT " +
"sd.short_name AS `name`, " +
"sd.id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " +
"SUM(CASE " +
" WHEN nb.type = 'personal' " +
" AND nb.handleResultName != '' " +
" AND nb.handleResultName IS NOT NULL " +
" AND nb.handleResultName != '不予追责' " +
" THEN 1 " +
" ELSE 0 " +
" END) AS personNum, " +
" SUM(CASE " +
" WHEN nb.type = 'department' " +
" AND nb.handleResultName != '' " +
" AND nb.handleResultName IS NOT NULL " +
" AND nb.handleResultName != '不予追责' " +
" THEN 1 " +
" ELSE 0 " +
" END) AS relationOrg, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " +
"FROM sup_depart sd " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"AND ng.problemSourcesCode IN (13,14, 15)" +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name " +
"ORDER BY completedRate DESC" )
List < SuperviseMapIconVo > getSupervisionMapIconInfo ( Date beginTime , Date endTime ) ;
@Select ( "select " +
" sd.short_name AS `name`," +
" sd.id AS departId, " +
" COUNT( DISTINCT ng.id ) AS totalPro, " +
" COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " +
" COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " +
" COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
" COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber " +
" from sup_depart sd " +
" LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id AND ng.problemSourcesCode IN (13,14, 15) " +
" AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
" WHERE sd.statistics_group_id=3 " +
" GROUP BY sd.short_name " +
" ORDER BY totalPro DESC;"
)
List < SuperviseMapIconVo > getSupervisionMapIconData ( Date beginTime , Date endTime ) ;
//获取personNum、relationOrg
@Select (
"select count(*) FROM sup_depart sd " +
" LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id AND ng.problemSourcesCode IN (13,14, 15) " +
" AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
" LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
" WHERE nb.handleResultName != '' and nb.handleResultName IS NOT NULL and nb.handleResultName != '不予追责' " +
" and nb.type = #{code} and sd.id =#{departId}"
)
String getSupervisionMapStringData ( Date beginTime , Date endTime , String code , String departId ) ;
//获取completedRate
@Select (
"select " +
" IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) " +
" FROM sup_depart sd" +
" LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id AND ng.problemSourcesCode IN (13,14, 15)" +
" AND crtTime BETWEEN #{beginTime} AND #{endTime}" +
" LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
" where sd.id =#{departId}"
)
String getSupervisionMapCompletedRate ( Date beginTime , Date endTime , String departId ) ;
@Select ( "SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " +
"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 ng.special_supervision=#{queryType} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime}; " )
DayTimeSuperviseVo getYellowBetOverview ( Date beginTime , Date endTime , Integer groupId , String queryType ) ;
@Select ( "SELECT " +
"sd.short_name AS label, " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE ng.special_supervision=#{queryType} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;" )
List < OrganizeProblemRankVo > getYellowBetRankList ( Date beginTime , Date endTime , Integer groupId , String queryType ) ;
// region 视频督察大屏
@Select ( "SELECT " +
"COUNT(DISTINCT ng.id) total," +
"COUNT(DISTINCT IF(ng.checkStatus IN ('1','2'), ng.id, NULL)) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completionProblem, " +
"COUNT(IF(nb.type ='department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS relativeOrg, " +
"COUNT(IF(nb.type ='personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS relativePer, " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS completionRate " +
"FROM sup_depart sd " +
"INNER JOIN negative ng ON sd.id = ng.involveDepartId " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE problemSourcesCode = 16 " +
"and ng.checkStatus in (1, 2) " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}" )
VideoSuperviseCountVo getAllVideoSuperviseCount ( Date beginTime , Date endTime ) ;
/ * *
* 问题类型占比
* * /
@ -377,68 +164,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
)
List < Negative > getVideoSuperviseProblemRank ( String id , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
" d.short_name name, " +
" d.id departId, " +
" t.discoverProblem, " +
" t.completionProblem, " +
" t.relativePer, " +
" t.relativeOrg " +
"FROM " +
" sup_depart d " +
" LEFT JOIN ( " +
" SELECT " +
" a.second_involve_depart_id, " +
" count( DISTINCT IF ( a.checkStatus IN ( '1', '2' ), a.id, NULL ) ) discoverProblem, " +
" count( DISTINCT IF ( a.processing_status = 'completed', a.id, NULL ) ) completionProblem, " +
" count( DISTINCT IF ( b.type = 'personal' and b.handleResultName != '不予追责' and b.handleResultCode is not null and b.handleResultCode != '', b.blameEmpNo, NULL ) ) relativePer, " +
" count( DISTINCT IF ( b.type = 'department' and b.handleResultName != '不予追责' and b.handleResultCode is not null and b.handleResultCode != '', b.blameEmpNo, NULL ) ) relativeOrg " +
" FROM " +
" negative a " +
" JOIN negative_blame b ON a.id = b.negativeId " +
" WHERE " +
" a.crtTime BETWEEN #{beginTime} AND #{endTime} AND a.problemSourcesCode = 16 " +
" GROUP BY " +
" a.second_involve_depart_id " +
" ) t ON d.id = t.second_involve_depart_id " +
"WHERE " +
" d.statistics_group_id = 3 " +
"GROUP BY " +
" d.short_name, " +
" d.id" )
List < VideoSuperviseMapIconVo > getVideoSuperviseMapIconInfo ( Date beginTime , Date endTime ) ;
/ * *
* 涉及人
* * /
@Select ( " select " +
" sup.id as name, " +
" count(*) as value " +
" from negative_problem_relation npr " +
" LEFT JOIN negative ng on npr.negativeId = ng.id " +
" LEFT JOIN sup_depart sup on sup.id = ng.second_involve_depart_id " +
" WHERE " +
" ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
" and sup.statistics_group_id = 3 " +
" and ng.problemSourcesCode = 16 " +
" GROUP BY sup.id "
)
List < EchartsVo > selectRelativePer ( Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"sup.id as `name`, " +
"COUNT(*) as value " +
"from negative_problem_relation npr " +
"LEFT JOIN negative ng on npr.negativeId = ng.id " +
"LEFT JOIN sup_depart sup on sup.id = ng.three_involve_depart_id " +
"WHERE " +
"ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"and sup.pid = #{deptId} " +
"and sup.statistics_group_id = 10 " +
"and ng.problemSourcesCode = 16 " +
"GROUP BY sup.id" )
List < EchartsVo > selectSubOneRelativePer ( Date beginTime , Date endTime , Integer deptId ) ;
// endregion
@ -455,18 +181,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"ORDER BY `value` DESC;" )
List < OrganizeProblemRankVo > getCaseVerificationRank ( Date beginTime , Date endTime , int groupId ) ;
// 案件核查大屏 -- 中央数据
@Select ( "SELECT " +
"COUNT( ng.id ) AS confirmed, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) AS dealCasePro, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishPre, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishOrg " +
"FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng. problemSourcesCode in (17, 18, 19, 20) " )
CaseVerificationCountVo getAllCaseVerificationCount ( Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
" d.short_name name, " +
@ -531,8 +245,8 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id " +
"WHERE handleResultName is NOT NULL " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode in (17, 18, 19, 20 ) " +
"AND ng.checkStatus <>3 " +
"AND ng.problemSourcesCode in (17) " +
"AND ng.check_status_code in (1, 2, 3) " +
"GROUP BY nb.handleResultName" )
List < EchartsVo > getDealSituation ( Date beginTime , Date endTime ) ;
@ -551,35 +265,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List < EchartsVo > getSubOneTrend ( String departId , String year , String . . . args ) ;
// endregion
// region 二级大屏首页大屏
@Select ( "SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=10 " +
"AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;" )
List < OrganizeProblemRankVo > selectPoliceOrganizeProblemRank ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id!=10 " +
"AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;" )
List < OrganizeProblemRankVo > selectTeamOrganizeProblemRank ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"businessTypeName as name, " +
@ -996,7 +682,7 @@ 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 ) AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE problemSourcesCode IN (17) AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY problemSources" )
List < EchartsVo > getCaseSourceRate ( Date beginTime , Date endTime ) ;