@ -33,9 +33,8 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=#{groupType} " +
"AND problemSourcesCode IN (2,13,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 > selectOrganizeProblemRank ( Integer groupType , Date beginTime , Date endTime ) ;
@ -44,7 +43,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select ( "SELECT " +
"businessTypeName as name, " +
"count(*) value FROM negative " +
"WHERE discovery Time BETWEEN #{beginTime} and #{endTime} " +
"WHERE crt Time BETWEEN #{beginTime} and #{endTime} " +
"and checkStatus in (1, 2) " +
"GROUP BY businessTypeName" )
List < EchartsVo > selectBusinessRate ( Date beginTime , Date endTime ) ;
@ -52,14 +51,13 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// 中央总览
@Select ( "SELECT " +
"COALESCE(SUM(IF(problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30), 1, 0)), 0) AS totalPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (13,15,16), 1, 0)), 0) AS supervisionPro, " +
"count(ng.id) AS totalPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (13,14,1 5,16), 1, 0)), 0) AS supervisionPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (17,18,19,20), 1, 0)), 0) AS caseVerificationPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (21,22,23,24,25), 1, 0)), 0) AS complaintPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (27,28,29,30), 1, 0)), 0) AS auditPro " +
// "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.discovery Time BETWEEN #{beginTime} AND #{endTime}; " )
"WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime}; " )
GlobalOverViewVo getAllGlobalCount ( Date beginTime , Date endTime ) ;
@ -68,7 +66,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"sd.short_name AS `name`, " +
"sd.id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " +
"SUM( IF(problemSourcesCode IN (13,15,16, 14 ), 1, 0) ) AS supervisePro, " +
"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, " +
@ -76,7 +74,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM sup_depart sd " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE sd.statistics_group_id=3 " +
"GROUP BY sd.short_name " +
"ORDER BY totalPro DESC;" )
@ -98,7 +96,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " +
"WHERE npr.threeLevelContent is not NULL " +
"AND checkStatus IN (1, 2) " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent " +
"ORDER BY `value` desc " +
" LIMIT 10 OFFSET 1 " )
@ -111,14 +109,14 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select ( "SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing , " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed , " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correction Rate " +
"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 completed Rate " +
"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 discovery Time BETWEEN #{beginTime} AND #{endTime};" )
"AND crt Time BETWEEN #{beginTime} AND #{endTime};" )
DayTimeSuperviseVo getSupervisionRank ( Date beginTime , Date endTime , Integer groupId ) ;
@Select ( "SELECT " +
@ -126,48 +124,37 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"sd.id AS departId, " +
"COUNT(DISTINCT ng.id) AS denominator, " +
"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 rate, " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1 , ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS `value` " +
"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 discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY rate desc" )
"ORDER BY rate desc, denominator 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 " +
"AND ng.problemSourcesCode in (13, 15) " +
"and ng.checkStatus<>3 " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND oneLevelContent is NOT NULL " +
"GROUP BY oneLevelContent " )
List < EchartsVo > getProblemTypeRatio ( Date beginTime , Date endTime ) ;
@Select ( "SELECT COUNT(DISTINCT c.id) AS problem_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS rectifing_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS rectifed_number, " +
"COUNT(DISTINCT c.involveDepartId) AS depart_number, " +
"COUNT(DISTINCT d.blameIdCode) AS person_number, " +
"ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS rectify_rate " +
"FROM sup_depart b INNER JOIN negative c ON b.id = c.involveDepartId " +
" 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)" )
RankVoSupTwo getTemp ( Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"COALESCE(COUNT(DISTINCT ng.id), 0) AS problemNumber, " +
"COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL)), 0) AS rectif ingNumber, " +
"COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)), 0) AS rectif edNumber, " +
"COALESCE(COUNT(DISTINCT ng.involveDepartId), 0 ) AS departNumber, " +
"COALESCE(COUNT(DISTINCT nb.blameIdCode), 0 ) AS personNumber, " +
"COALESCE(ROUND(COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id) * 100, 1), 0) AS rectify Rate " +
"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, 15) " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime}; " )
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; " )
SupervisionNotifyOverView getAllSupervisionNotifyCount ( Date beginTime , Date endTime ) ;
@ -177,15 +164,15 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"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.isRectifyCode=0, ng.id, NULL) ) AS changing , " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed , " +
"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 , " +
"COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " +
"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 chang edRate " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS complet edRate " +
"FROM sup_depart sd " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"AND ng.problemSourcesCode IN (13, 15)" +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time 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 " +
@ -195,15 +182,15 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select ( "SELECT " +
"COUNT(DISTINCT ng.id) AS proTotal, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing , " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed , " +
"ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1) AS correction Rate " +
"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 completed Rate " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
"WHERE problemSourcesCode IN (15) " +
"AND ng.special_supervision=#{queryType} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime}; " )
"AND crt Time BETWEEN #{beginTime} AND #{endTime}; " )
DayTimeSuperviseVo getYellowBetOverview ( Date beginTime , Date endTime , Integer groupId , String queryType ) ;
@Select ( "SELECT " +
@ -214,26 +201,25 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE problemSourcesCode IN (15) " +
"AND ng.special_supervision=#{queryType} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;" )
List < OrganizeProblemRankVo > getYellowBetRankList ( Date beginTime , Date endTime , Integer groupId , String queryType ) ;
// endregion
// region 视频督察大屏
@Select ( "SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " +
"COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT(DISTINCT nb.blameName) AS relativePer, " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changedRate " +
@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 ng.checkStatus IN ('1','2') " +
"AND problemSourcesCode = 16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}" )
"WHERE problemSourcesCode = 16 " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}" )
VideoSuperviseCountVo getAllVideoSuperviseCount ( Date beginTime , Date endTime ) ;
@Select ( "SELECT npr.threeLevelContent AS `name`, " +
@ -243,19 +229,19 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"on ng.id=npr.negativeId " +
"WHERE ng.problemSourcesCode=16 " +
"AND checkStatus <> 3 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent " )
List < EchartsVo > getVideoSuperviseProblemTypeRate ( Date beginTime , Date endTime ) ;
@Select ( "SELECT s d1 .short_name AS label, " +
"count(* ) as `value`" +
@Select ( "SELECT d.short_name AS label, " +
"count(ng.id ) as `value`" +
" FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=s d.id " +
"INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " +
"WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime } " +
"GROUP BY s d1 .short_name " +
"INNER JOIN sup_depart d ON ng.second_involve_depart_id = d.id " +
"WHERE ng.checkStatus in (1, 2) " +
"AND ng.problemSourcesCode = 16 " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND d.statistics_group_id = #{groupId } " +
"GROUP BY d.short_name " +
"ORDER BY `value` DESC" )
List < OrganizeProblemRankVo > getVideoSuperviseProblemRank ( Date beginTime , Date endTime , Integer groupId ) ;
@ -263,15 +249,15 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"sd.short_name AS `name`, " +
"sd.id AS departId, " +
"COUNT( DISTINCT ng.id) AS discoverProblem, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed Problem, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completion Problem, " +
"COUNT( DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT( DISTINCT nb.blameName ) AS relativePer, " +
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id)*100, 1 ),0) AS changed Rate " +
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id)*100, 1 ),0) AS completion Rate " +
"FROM sup_depart sd " +
"LEFT JOIN negative ng ON sd.id=ng.second_involve_depart_id " +
"AND checkStatus <>3 " +
"AND problemSourcesCode =16 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time 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; " )
@ -286,7 +272,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " +
"WHERE ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"GROUP BY sd.short_name " +
@ -295,14 +281,14 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select ( "SELECT count(DISTINCT ng.id) AS total, " +
"COUNT( DISTINCT IF(ng.checkStatus <> 3 , ng.id, NULL) ) AS confirmed, " +
"COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameI d, NULL) ) AS dealCasePro, " +
"COUNT( DISTINCT nb.blameName ) AS punishPre, " +
"COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1 , ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) , ng.id, NULL) ) AS confirmed, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.i d, 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, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) , ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND problemSourcesCode in (17, 18, 19, 20) " )
CaseVerificationCountVo getAllCaseVerificationCount ( Date beginTime , Date endTime ) ;
@ -319,7 +305,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM sup_depart sd " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.crt Time 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;" )
@ -329,7 +315,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " +
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id " +
"WHERE handleResultName is NOT NULL " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode in (17, 18, 19, 20) " +
"AND ng.checkStatus <>3 " +
"GROUP BY nb.handleResultName" )
@ -339,20 +325,11 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"count(DISTINCT(ng.id)) as `value` FROM negative ng " +
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id AND nb.superviseMeasuresCode=#{type} " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus<>3 " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.checkStatus in (1, 2) " +
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent" )
List < EchartsVo > getConfinementAndPause ( Date beginTime , Date endTime , Integer type ) ;
@Select ( "SELECT count(DISTINCT ng.id) AS totalMail, " +
"COUNT( ng.problemSourcesCode=21 ) AS countryMail, " +
"COUNT( ng.problemSourcesCode=22 ) AS policeMail, " +
"COUNT( ng.problemSourcesCode=24 ) AS numberMail, " +
"COUNT( ng.problemSourcesCode=23 ) AS manageMail " +
"FROM negative ng WHERE ng.checkStatus <> 3 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode in(21, 22, 23, 24)" )
MailOverviewVo getAllMailCount ( Date beginTime , Date endTime ) ;
List < EchartsVo > getMailTrend ( Integer year , Integer type ) ;
@ -368,7 +345,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"WHERE ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=10 " +
"AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
@ -381,7 +358,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"WHERE ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id!=10 " +
"AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
@ -394,7 +371,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"count(*) value " +
"FROM negative " +
"WHERE checkStatus in (1, 2) " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND negative.second_involve_depart_id=#{departId} " +
"GROUP BY businessTypeName" )
List < EchartsVo > selectSubOneBusinessRate ( Integer departId , Date beginTime , Date endTime ) ;
@ -406,7 +383,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COALESCE(SUM(IF(problemSourcesCode IN (21, 22, 23, 24, 25), 1, 0)), 0) AS complaintPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (27, 28, 29, 30), 1, 0)), 0) AS auditPro " +
"FROM negative ng WHERE ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"FROM negative ng WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " )
GlobalOverViewVo getSuoOneAllGlobalCount ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
@ -422,7 +399,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"SUM( IF(problemSourcesCode IN (27,28,29,30),1, 0) ) AS reviewPro " +
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} " )
@ -435,7 +412,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative_problem_relation npr INNER JOIN negative ng ON npr.negativeId=ng.id " +
"WHERE npr.threeLevelContent is not NULL " +
"AND checkStatus IN (1, 2) " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime}" +
"AND crt Time BETWEEN #{beginTime} AND #{endTime}" +
"AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY npr.threeLevelContent " +
"ORDER BY `value` desc " +
@ -448,138 +425,13 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative_problem_relation npr " +
"LEFT JOIN negative ng ON ng.id=npr.negativeId " +
"WHERE checkStatus in (1,2) " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND npr.oneLevelContent is not NULL " +
"AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY npr.oneLevelContent " +
"ORDER BY `value` desc" )
List < EchartsVo > selectSubOneProblemRate ( 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 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 ) ;
@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 > getSubOneGlobalTeamSupervisionRank ( Integer departPId , Date beginTime , Date endTime ) ;
@Select ( "SELECT count(DISTINCT ng.id) AS one, " +
"COUNT( DISTINCT( if(processing_status='processing', ng.id, NULL) ) ) AS two, " +
"count(DISTINCT involveDepartId) AS three, " +
"count(DISTINCT nb.blameIdCode) AS four, " +
"ifnull(ROUND( COUNT( DISTINCT( if(processing_status='completed', ng.id, NULL) ) ) / count(DISTINCT ng.id)*100, 1),0) AS five " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.pid= #{departPId} " +
"AND ng.discoveryTime BETWEEN #{beginTime} and #{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)" +
"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)" +
"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
// region 二级大屏视频督察
@ -590,7 +442,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND sd.pid=#{departId} AND sd.statistics_group_id=10 " +
"WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC " )
List < OrganizeProblemRankVo > getSuboOneVideoSupervisePoliceProblemRank ( Date beginTime , Date endTime , Integer groupId , Integer departId ) ;
@ -602,7 +454,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND sd.pid=#{departId} AND sd.statistics_group_id!=10 " +
"WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC " )
List < OrganizeProblemRankVo > getSuboOneVideoSuperviseTeamProblemRank ( Date beginTime , Date endTime , Integer groupId , Integer departId ) ;
@ -610,16 +462,16 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List < EchartsVo > getSubOneVideoSuperviseTrend ( String year , String problemCode , String departId ) ;
@Select ( "SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changed Problem, " +
"COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completion Problem, " +
"COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT(DISTINCT nb.blameName) AS relativePer, " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changed Rate " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS completion Rate " +
"FROM sup_depart sd " +
"INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE ng.checkStatus IN ('1','2') " +
"AND problemSourcesCode = 16 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime}; " )
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime}; " )
VideoSuperviseCountVo getSubOneAllVideoSuperviseCount ( Date beginTime , Date endTime , Integer departId ) ;
@Select ( "SELECT npr.threeLevelContent AS `name`, " +
@ -630,13 +482,11 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"on ng.id=npr.negativeId " +
"WHERE ng.problemSourcesCode=16 " +
"AND checkStatus <> 3 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY npr.threeLevelContent " )
List < EchartsVo > getSubOneVideoSuperviseProblemTypeRate ( Integer departId , Date beginTime , Date endTime ) ;
// endregion
// region 二级大屏现场督察
@Select ( "SELECT " +
@ -649,7 +499,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " )
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " )
DayTimeSuperviseVo getPoliceRankOverview ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
@ -662,7 +512,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " )
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " )
DayTimeSuperviseVo getTeamRankOverview ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
@ -676,7 +526,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY value DESC;" )
List < RankVo > getPoliceChangedRankList ( Integer departId , Date beginTime , Date endTime ) ;
@ -692,21 +542,11 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.problemSourcesCode IN (13) " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time 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, " +
"sd.id AS departId, " +
"count( DISTINCT ng.id) AS denominator, " +
@ -718,7 +558,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode=13 " +
"AND ng.checkStatus<>3 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " +
"order by rate desc;" )
List < RankVo > getSubOnePoliceChangedRateRank ( Integer departId , Date beginTime , Date endTime ) ;
@ -734,7 +574,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode=13 " +
"AND ng.checkStatus<>3 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY label " +
"order by rate desc;" )
List < RankVo > getSubOneTeamChangedRateRank ( Integer departId , Date beginTime , Date endTime ) ;
@ -746,23 +586,23 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"WHERE ng.problemSourcesCode in (13, 15) " +
"and ng.checkStatus<>3 " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND oneLevelContent is NOT NULL " +
"GROUP BY oneLevelContent " )
List < EchartsVo > getSubOneProblemTypeRatio ( Integer departId , Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"COUNT( DISTINCT ng.id ) AS problemNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS rectif ingNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS rectifedNumber , " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS process ingNumber, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completedNumber , " +
"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 " +
"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 ng.second_involve_depart_id=#{departId} " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " )
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " )
SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount ( Integer departId , Date beginTime , Date endTime ) ;
@ -770,8 +610,8 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN " +
"( " +
"SELECT ng.* FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id WHERE sd.pid=#{departId} AND ng.checkStatus != 3 AND ng.problemSourcesCode IN (13, 15) " +
") AS temp ON DATE_FORMAT(temp.discovery Time, '%m') = m.month " +
"AND YEAR(temp.discovery Time) = #{year} " +
") AS temp ON DATE_FORMAT(temp.crt Time, '%m') = m.month " +
"AND YEAR(temp.crt Time) = #{year} " +
"GROUP by m.month_name " +
"ORDER BY m.month ASC;" )
List < EchartsVo > getSubOneSupervisionTrend ( Integer departId , String year ) ;
@ -788,7 +628,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime}; " )
"AND crt Time BETWEEN #{beginTime} AND #{endTime}; " )
DayTimeSuperviseVo getSubOnePoliceYellowBetOverview ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
@Select ( "SELECT " +
@ -802,7 +642,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime}; " )
"AND crt Time BETWEEN #{beginTime} AND #{endTime}; " )
DayTimeSuperviseVo getSubOneTeamYellowBetOverview ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
@Select ( "SELECT " +
@ -814,7 +654,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC; " )
List < OrganizeProblemRankVo > getSubOnePoliceYellowBetRankList ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
@ -828,7 +668,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND ng.special_supervision=#{specialType} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC; " )
List < OrganizeProblemRankVo > getSubOneTeamYellowBetRankList ( Date beginTime , Date endTime , Integer departId , Integer specialType ) ;
@ -842,7 +682,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id=10 " +
@ -855,7 +695,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"WHERE ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17, 18, 19, 20)" +
"AND ng.second_involve_depart_id=#{departId} " +
"AND sd.statistics_group_id!=10 " +
@ -870,7 +710,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.checkStatus!=3 " +
"AND sd.pid = #{departId} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.businessTypeCode = #{businessType} " +
"GROUP BY npr.threeLevelContent " +
"ORDER BY `value` DESC " )
@ -884,7 +724,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"AND ng.problemSourcesCode in (17, 18, 19, 20); " )
CaseVerificationCountVo getSuboOneAllCaseVerificationCount ( Date beginTime , Date endTime , Integer departId ) ;
@ -903,7 +743,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " +
@ -916,7 +756,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " +
"LEFT JOIN sup_dict_problem_source sdps ON ng.problemSourcesCode= sdps.id " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"WHERE discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"GROUP BY sdps.label" )
List < EchartsVo > getSuboOneCaseSourceRate ( Date beginTime , Date endTime , Integer departId ) ;
@ -927,7 +767,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"inner JOIN sup_depart sd on ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"INNER JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE nb.handleResultName IS NOT NULL " +
"AND ng.discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.checkStatus <>3 " +
"GROUP BY nb.handleResultName" )
@ -938,7 +778,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 discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE problemSourcesCode IN (17, 18, 19, 20) AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY problemSources" )
List < EchartsVo > getCaseSourceRate ( Date beginTime , Date endTime ) ;
@ -954,7 +794,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"count(*) `value` FROM negative_problem_relation npr " +
"LEFT JOIN negative ng ON ng.id=npr.negativeId " +
"WHERE checkStatus in (1, 2) " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND npr.oneLevelContent is not NULL " +
"GROUP BY npr.oneLevelContent " +
"ORDER BY `value` desc" )
@ -974,7 +814,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN negative ng ON csd.dept_id=ng.three_involve_depart_id " +
"AND checkStatus <>3 " +
"AND problemSourcesCode =16 " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId}; " )
@ -997,7 +837,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.problemSourcesCode IN (13, 15) " +
"AND discovery Time BETWEEN #{beginTime} AND #{endTime} " +
"AND crt Time BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " +