@ -47,21 +47,34 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"and checkStatus in (1, 2) " +
"and checkStatus in (1, 2) " +
"GROUP BY businessTypeName" )
"GROUP BY businessTypeName" )
List < EchartsVo > selectBusinessRate ( Date beginTime , Date endTime ) ;
List < EchartsVo > selectBusinessRate ( Date beginTime , Date endTime ) ;
@Select ( "SELECT " +
"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} " +
"AND ng.second_involve_depart_id=#{departId} " )
// "COALESCE(SUM(IF(problemSourcesCode IN (27, 28, 29, 30), 1, 0)), 0) AS auditPro " +
GlobalOverViewVo getSuoOneAllGlobalCount ( Integer departId , Date beginTime , Date endTime ) ;
// 中央总览
// 中央总览 todo
@Select ( "SELECT " +
@Select ( "SELECT " +
"count(ng.id) AS totalPro, " +
"count(ng.id) AS totalPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (13), 1, 0)), 0) AS supervisionPro, " +
"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 (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 (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 (27,28,29,30), 1, 0)), 0) AS auditPro, " +
"COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro " +
"COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro " +
"FROM negative ng " +
"FROM negative ng " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime}; " )
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime}; " )
GlobalOverViewVo getAllGlobalCount ( Date beginTime , Date endTime ) ;
GlobalOverViewVo getAllGlobalCount ( Date beginTime , Date endTime ) ;
// 地图卡片
// 地图卡片
@Select ( "SELECT " +
@Select ( "SELECT " +
"sd.short_name AS `name`, " +
"sd.short_name AS `name`, " +
@ -382,7 +395,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=10 " +
"AND sd.statistics_group_id=10 " +
"AND sd.pid=#{departId} " +
"AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"AND problemSourcesCode IN (2,13,14,1 5,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"GROUP BY sd.short_name " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;" )
"ORDER BY `value` DESC;" )
List < OrganizeProblemRankVo > selectPoliceOrganizeProblemRank ( Integer departId , Date beginTime , Date endTime ) ;
List < OrganizeProblemRankVo > selectPoliceOrganizeProblemRank ( Integer departId , Date beginTime , Date endTime ) ;
@ -395,7 +408,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id!=10 " +
"AND sd.statistics_group_id!=10 " +
"AND sd.pid=#{departId} " +
"AND sd.pid=#{departId} " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"AND problemSourcesCode IN (2,13,14,1 5,16,17,18,19,20,21,22,23,24,25,27,28,29,30) " +
"GROUP BY sd.short_name " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC;" )
"ORDER BY `value` DESC;" )
List < OrganizeProblemRankVo > selectTeamOrganizeProblemRank ( Integer departId , Date beginTime , Date endTime ) ;
List < OrganizeProblemRankVo > selectTeamOrganizeProblemRank ( Integer departId , Date beginTime , Date endTime ) ;
@ -410,33 +423,25 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"GROUP BY businessTypeName" )
"GROUP BY businessTypeName" )
List < EchartsVo > selectSubOneBusinessRate ( Integer departId , Date beginTime , Date endTime ) ;
List < EchartsVo > selectSubOneBusinessRate ( Integer departId , Date beginTime , Date endTime ) ;
@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, " +
@Select ( " SELECT " +
"COALESCE(SUM(IF(problemSourcesCode IN (17, 18, 19, 20), 1, 0)), 0) AS caseVerificationPro, " +
" csd.name as `name`, " +
"COALESCE(SUM(IF(problemSourcesCode IN (21, 22, 23, 24, 25), 1, 0)), 0) AS complaintPro, " +
" csd.dept_name as policeName, " +
"COALESCE(SUM(IF(problemSourcesCode IN (2), 1, 0)), 0) AS talkPro, " +
" csd.dept_id as departId, " +
"COALESCE(SUM(IF(problemSourcesCode IN (27, 28, 29, 30), 1, 0)), 0) AS auditPro " +
" csd.dept_pid, " +
"FROM negative ng WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
" COUNT(ng.id) as totalPro ," +
"AND ng.second_involve_depart_id=#{departId} " )
" COALESCE(SUM(IF(ng.problemSourcesCode IN (13), 1, 0)), 0) AS supervisionPro, " +
GlobalOverViewVo getSuoOneAllGlobalCount ( Integer departId , Date beginTime , Date endTime ) ;
" COALESCE(SUM(IF(ng.problemSourcesCode IN (14,15,16), 1, 0)), 0) AS numSupervisionPro, " +
@Select ( "SELECT " +
" COALESCE(SUM(IF(ng.problemSourcesCode IN (17,18,19,20), 1, 0)), 0) AS caseVerificationPro, " +
"csd.`name` AS `name`, " +
" COALESCE(SUM(IF(ng.problemSourcesCode IN (27,28,29,30), 1, 0)), 0) AS auditPro, " +
"csd.dept_name AS policeName, " +
" COALESCE(SUM(IF(ng.problemSourcesCode IN (2), 1, 0)), 0) AS talkPro " +
"csd.dept_pid, " +
" from county_street_dept csd " +
"csd.dept_id AS departId, " +
" LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
" WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " +
" and ng.second_involve_depart_id = #{departId} " +
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerifyPro, " +
" GROUP BY csd.dept_name " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS mailPro, " +
" HAVING csd.dept_pid= #{departId} " )
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " +
"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.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} " )
List < GlobalMapIconVo > getSubOneGlobalMap ( Date beginTime , Date endTime , Integer departId ) ;
List < GlobalMapIconVo > getSubOneGlobalMap ( Date beginTime , Date endTime , Integer departId ) ;
@ -495,17 +500,29 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List < EchartsVo > getSubOneVideoSuperviseTrend ( String year , String problemCode , String departId ) ;
List < EchartsVo > getSubOneVideoSuperviseTrend ( String year , String problemCode , String departId ) ;
@Select ( "SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " +
// @Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completionProblem, " +
// "COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completionProblem, " +
"COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
// "COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT(DISTINCT nb.blameName) AS relativePer, " +
// "COUNT(DISTINCT nb.blameName) AS relativePer, " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS completionRate " +
// "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 " +
// "FROM sup_depart sd " +
"INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " +
// "INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
// "LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE ng.checkStatus IN ('1','2') " +
// "WHERE ng.checkStatus IN ('1','2') " +
"AND problemSourcesCode = 16 " +
// "AND problemSourcesCode = 16 " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; " )
// "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime}; ")
@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 and sd.pid = #{departId} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE problemSourcesCode = 16 " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " )
VideoSuperviseCountVo getSubOneAllVideoSuperviseCount ( Date beginTime , Date endTime , Integer departId ) ;
VideoSuperviseCountVo getSubOneAllVideoSuperviseCount ( Date beginTime , Date endTime , Integer departId ) ;
@Select ( "SELECT npr.threeLevelContent AS `name`, " +
@Select ( "SELECT npr.threeLevelContent AS `name`, " +