|
|
|
|
@ -30,6 +30,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
|
|
|
|
|
"ORDER BY `value` DESC ") |
|
|
|
|
List<OrganizeProblemRankVo> selectOrganizeProblemRank(Integer groupType, Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
// 业务类型占比
|
|
|
|
|
@Select("SELECT businessTypeName as name, count(*) value FROM negative " + |
|
|
|
|
"WHERE " + |
|
|
|
|
"discoveryTime BETWEEN #{beginTime} and #{endTime} and checkStatus=1 " + |
|
|
|
|
@ -37,13 +38,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
|
|
|
|
|
List<EchartsVo> selectBusinessRate(Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT DATE_FORMAT(ng.discoveryTime, '%Y-%m') AS monthTime, COUNT(*) total FROM negative ng " + |
|
|
|
|
"WHERE YEAR(ng.discoveryTime)=#{year} and checkStatus=1 " + |
|
|
|
|
"GROUP BY monthTime " + |
|
|
|
|
"order BY monthTime asc") |
|
|
|
|
List<RecentTrendByMonthVo> selectRecentTrendByMonth(String year); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT count(*) FROM negative ng INNER JOIN " + |
|
|
|
|
" (" + |
|
|
|
|
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " + |
|
|
|
|
@ -99,35 +93,40 @@ public interface NegativeMapper extends BaseMapper<Negative> {
|
|
|
|
|
"AND temp.pid=#{departId} AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") |
|
|
|
|
Integer seleGobalMapIconInfoSjdc(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
List<EchartsVo> getGobalRecentlyTrendByMonth(String year); |
|
|
|
|
|
|
|
|
|
// endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// region 现场督察大屏
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取现场督察按二级机构分组和整改状态划分的的问题数 |
|
|
|
|
*/ |
|
|
|
|
@Select("SELECT COUNT(*) FROM negative n " + |
|
|
|
|
"INNER JOIN ( " + |
|
|
|
|
" SELECT DISTINCT sd.id " + |
|
|
|
|
@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, " + |
|
|
|
|
"ROUND((COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null))) / COUNT(DISTINCT ng.id) * 100, 1) AS correctionRate " + |
|
|
|
|
"FROM sup_depart sd " + |
|
|
|
|
" INNER JOIN sup_depart sd1 ON sd.pid = sd1.id " + |
|
|
|
|
" WHERE sd1.statistics_group_id = #{groupType}" + |
|
|
|
|
") AS filtered_sd ON n.involveDepartId = filtered_sd.id " + |
|
|
|
|
"WHERE n.checkStatus = 1 " + |
|
|
|
|
"AND n.problemSourcesCode = 13 " + |
|
|
|
|
"AND n.isRectifyCode=#{isRectify} " + |
|
|
|
|
"AND n.discoveryTime BETWEEN #{beginTime} AND #{endTime}") |
|
|
|
|
Long getChangCountByGroupType(Integer groupType, Date beginTime, Date endTime, Integer isRectify); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + |
|
|
|
|
"INNER JOIN negative ng ON sd.id=ng.involveDepartId " + |
|
|
|
|
"WHERE ng.problemSourcesCode=13 AND ng.checkStatus<>3 " + |
|
|
|
|
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") |
|
|
|
|
DayTimeSuperviseVo getSuperversionRank(Date beginTime, Date endTime, Integer groupId); |
|
|
|
|
|
|
|
|
|
@Select("SELECT sd1.short_name as label, " + |
|
|
|
|
"sd1.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 " + |
|
|
|
|
"FROM sup_depart sd " + |
|
|
|
|
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + |
|
|
|
|
"INNER JOIN negative ng on ng.involveDepartId=sd.id " + |
|
|
|
|
"LEFT JOIN negative_blame nb on ng.id=nb.negativeId " + |
|
|
|
|
"WHERE ng.problemSourcesCode=13 " + |
|
|
|
|
"AND ng.checkStatus<>3 " + |
|
|
|
|
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
"GROUP BY label " + |
|
|
|
|
"order by 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 " + |
|
|
|
|
@ -136,66 +135,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
|
|
|
|
|
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
"AND oneLevelContent is NOT NULL " + |
|
|
|
|
"GROUP BY oneLevelContent ") |
|
|
|
|
List<EchartsVo> getProblemTypes(Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<EchartsVo> getSupervisionTrend(String time); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT a.departId, a.name, COUNT(DISTINCT c.id) AS totalPro, COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS changing, COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS changed, COUNT(DISTINCT c.involveDepartId) AS relationOrg, COUNT(DISTINCT d.blameIdCode) AS personNum, ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS changedRate\n" + |
|
|
|
|
"FROM statistics_depart a INNER JOIN sup_depart b ON a.departId = b.pid " + |
|
|
|
|
" INNER JOIN negative c ON b.id = c.involveDepartId " + |
|
|
|
|
" LEFT JOIN negative_blame d ON c.id = d.negativeId " + |
|
|
|
|
"WHERE a.groupId = 3 AND discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15) " + |
|
|
|
|
"GROUP BY a.name, a.departId") |
|
|
|
|
List<SuperviseMapIconVo> getMap(Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 黄赌毒总览 |
|
|
|
|
* @param beginTime |
|
|
|
|
* @param endTime |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Select("SELECT a.name , " + |
|
|
|
|
"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 statistics_depart a INNER JOIN sup_depart b ON a.departId = b.pid " + |
|
|
|
|
"INNER JOIN negative c ON b.id = c.involveDepartId " + |
|
|
|
|
"LEFT JOIN negative_blame d ON c.id = d.negativeId " + |
|
|
|
|
"WHERE a.groupId = 3 AND discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND special_supervision = 1 " + |
|
|
|
|
"GROUP BY a.name " + |
|
|
|
|
"order by problem_number desc") |
|
|
|
|
List<RankVoSupTwo> getYellowBet(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 = 13 ") |
|
|
|
|
RankVoSup getSuperversionRank(Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT a.name, " + |
|
|
|
|
"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 statistics_depart a INNER JOIN sup_depart b ON a.departId = b.pid " + |
|
|
|
|
" INNER JOIN negative c ON b.id = c.involveDepartId " + |
|
|
|
|
" LEFT JOIN negative_blame d ON c.id = d.negativeId " + |
|
|
|
|
"WHERE a.groupId = 3 AND discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode = 13 " + |
|
|
|
|
"GROUP BY a.name " + |
|
|
|
|
"order by rectify_rate desc") |
|
|
|
|
List<RankVoSupTwo> getChangedRateRank(Date beginTime, Date endTime); |
|
|
|
|
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, " + |
|
|
|
|
@ -207,14 +147,41 @@ public interface NegativeMapper extends BaseMapper<Negative> {
|
|
|
|
|
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15)") |
|
|
|
|
RankVoSupTwo getTemp(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\n" + |
|
|
|
|
"FROM sup_depart b INNER JOIN negative c ON b.id = c.involveDepartId " + |
|
|
|
|
@Select("SELECT a.departId, a.name, COUNT(DISTINCT c.id) AS totalPro, COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS changing, COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS changed, COUNT(DISTINCT c.involveDepartId) AS relationOrg, COUNT(DISTINCT d.blameIdCode) AS personNum, ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS changedRate\n" + |
|
|
|
|
"FROM statistics_depart a INNER JOIN sup_depart b ON a.departId = b.pid " + |
|
|
|
|
" 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 special_supervision = 1 ") |
|
|
|
|
RankVoSup getYellowBetOverview(Date beginTime, Date endTime); |
|
|
|
|
"WHERE a.groupId = 3 AND discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15) " + |
|
|
|
|
"GROUP BY a.name, a.departId") |
|
|
|
|
List<SuperviseMapIconVo> getMap(Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
List<EchartsVo> getGobalRecentlyTrendByMonth(String year); |
|
|
|
|
List<EchartsVo> getSupervisionTrend(String time); |
|
|
|
|
|
|
|
|
|
@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," + |
|
|
|
|
"ROUND(COALESCE(COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0), 0) * 100, 1) AS correctionRate " + |
|
|
|
|
"FROM sup_depart sd " + |
|
|
|
|
"INNER JOIN sup_depart sd1 ON sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + |
|
|
|
|
"INNER JOIN negative ng on sd.id=ng.involveDepartId " + |
|
|
|
|
"WHERE ng.checkStatus<>3 " + |
|
|
|
|
"AND ng.problemSourcesCode=15 " + |
|
|
|
|
"AND special_supervision = #{queryType} " + |
|
|
|
|
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}") |
|
|
|
|
DayTimeSuperviseVo getYellowBetOverview(Date beginTime, Date endTime, Integer groupId, Integer queryType); |
|
|
|
|
|
|
|
|
|
@Select("SELECT sd1.short_name as label, " + |
|
|
|
|
"count( DISTINCT ng.id) AS value " + |
|
|
|
|
"FROM sup_depart sd " + |
|
|
|
|
"INNER JOIN sup_depart sd1 on sd.pid=sd1.id AND sd1.statistics_group_id=#{groupId} " + |
|
|
|
|
"INNER JOIN negative ng on sd.id= ng.involveDepartId " + |
|
|
|
|
"WHERE ng.checkStatus<>3 " + |
|
|
|
|
"AND ng.problemSourcesCode=15 " + |
|
|
|
|
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
"AND special_supervision = #{queryType} " + |
|
|
|
|
"GROUP BY label " + |
|
|
|
|
"order by value desc") |
|
|
|
|
List<OrganizeProblemRankVo> getYellowBetRankList(Date beginTime, Date endTime, Integer groupId, Integer queryType); |
|
|
|
|
|
|
|
|
|
// endregion
|
|
|
|
|
|
|
|
|
|
|