|
|
|
@ -36,51 +36,6 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp |
|
|
|
"ORDER BY value DESC") |
|
|
|
"ORDER BY value DESC") |
|
|
|
List<CaseVerifDepart> selectDepartStatistic(Integer departId, Integer Repeat, Date beginTime, Date endTime); |
|
|
|
List<CaseVerifDepart> selectDepartStatistic(Integer departId, Integer Repeat, Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 查询领导阅信接访 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param departId |
|
|
|
|
|
|
|
* @param beginTime |
|
|
|
|
|
|
|
* @param endTime |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Select("SELECT sd.id, sd.short_name label,count(*) value " + |
|
|
|
|
|
|
|
"FROM (SELECT * FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"WHERE dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}) as temp " + |
|
|
|
|
|
|
|
"INNER JOIN sup_depart sd on sd.id=temp.second_depart_id " + |
|
|
|
|
|
|
|
"WHERE sd.statistics_group_id=#{departId} and temp.receiving_leader_name is not null " + |
|
|
|
|
|
|
|
"GROUP BY temp.second_depart_id " + |
|
|
|
|
|
|
|
"ORDER BY value DESC") |
|
|
|
|
|
|
|
List<CaseVerifDepart> selectLeaderViewMail(Integer departId, Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 缠访闹访分县市局排行 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param id |
|
|
|
|
|
|
|
* @param isEntanglement |
|
|
|
|
|
|
|
* @param beginTime |
|
|
|
|
|
|
|
* @param endTime |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Select("SELECT sd.id, sd.short_name label,count(*) value " + |
|
|
|
|
|
|
|
"FROM (SELECT * FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"WHERE dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}) as temp " + |
|
|
|
|
|
|
|
"INNER JOIN sup_depart sd on sd.id=temp.second_depart_id " + |
|
|
|
|
|
|
|
"WHERE sd.statistics_group_id=#{id} AND entanglement_visits =#{isEntanglement} " + |
|
|
|
|
|
|
|
"GROUP BY temp.second_depart_id " + |
|
|
|
|
|
|
|
"ORDER BY value DESC") |
|
|
|
|
|
|
|
List<CaseVerifDepart> selectEntanglementMail(Integer id, int isEntanglement, Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT sd.id, sd.short_name label,count(*) value " + |
|
|
|
|
|
|
|
"FROM (SELECT * FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"WHERE dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}) as temp " + |
|
|
|
|
|
|
|
"INNER JOIN sup_depart sd on sd.id=temp.second_depart_id " + |
|
|
|
|
|
|
|
"WHERE sd.statistics_group_id=#{id} AND mass_visits =#{isMass} " + |
|
|
|
|
|
|
|
"GROUP BY temp.second_depart_id " + |
|
|
|
|
|
|
|
"ORDER BY value DESC") |
|
|
|
|
|
|
|
List<CaseVerifDepart> selectMassMail(Integer id, int isMass, Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT DATE_FORMAT(dpc.discovery_time, '%Y/%m/%d') AS dayTime, COUNT(*) total " + |
|
|
|
@Select("SELECT DATE_FORMAT(dpc.discovery_time, '%Y/%m/%d') AS dayTime, COUNT(*) total " + |
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
@ -100,73 +55,290 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp |
|
|
|
List<RecentMailTrendByMonthVo> selectRecentlyMailTrendByMonth(Integer sourcesCode, String year); |
|
|
|
List<RecentMailTrendByMonthVo> selectRecentlyMailTrendByMonth(Integer sourcesCode, String year); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT COUNT( IF(initial_petition=1, 1, NULL) ) AS firstMail, " + |
|
|
|
@Select("SELECT " + |
|
|
|
"count( IF( initial_petition=2, 2, NULL) ) AS repeatMail, " + |
|
|
|
"SUM( IF(initial_petition=1, 1, 0) ) AS firstMail, " + |
|
|
|
"count( IF(receiving_leader_name is NOT NULL, 1, NULL) ) AS leaderMail " + |
|
|
|
"SUM( IF( initial_petition=2, 1, 0) ) AS repeatMail, " + |
|
|
|
|
|
|
|
"SUM( IF(receiving_leader_name is NOT NULL, 1, 0) ) AS leaderMail " + |
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime}; ") |
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview(Date beginTime, Date endTime); |
|
|
|
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + |
|
|
|
|
|
|
|
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"AND sd1.statistics_group_id=#{groupId}; ") |
|
|
|
|
|
|
|
MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview(Date beginTime, Date endTime, Integer groupId); |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT sd.short_name AS label, count(*) AS `value` FROM data_petition_complaint dpc " + |
|
|
|
@Select("SELECT " + |
|
|
|
"INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " + |
|
|
|
"sd1.short_name AS label, " + |
|
|
|
"AND sd.statistics_group_id=#{groupId} " + |
|
|
|
"count(*) AS `value` FROM data_petition_complaint dpc " + |
|
|
|
"AND dpc.second_depart_name is not NULL " + |
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + |
|
|
|
"WHERE dpc.initial_petition=#{isRepeat} " + |
|
|
|
"WHERE dpc.initial_petition=#{isRepeat} " + |
|
|
|
|
|
|
|
"AND sd1.statistics_group_id=#{groupId} " + |
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
"GROUP BY sd1.short_name " + |
|
|
|
"HAVING label is not NULL " + |
|
|
|
"HAVING label is not NULL " + |
|
|
|
"ORDER BY `value` DESC ") |
|
|
|
"ORDER BY `value` DESC; ") |
|
|
|
List<OrganizeProblemRankVo> getMailRank(Date beginTime, Date endTime, int groupId, Integer isRepeat); |
|
|
|
List<OrganizeProblemRankVo> getMailRank(Date beginTime, Date endTime, Integer groupId, Integer isRepeat); |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT sd.short_name AS label, count(*) AS `value` FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " + |
|
|
|
@Select("SELECT " + |
|
|
|
"AND sd.statistics_group_id=#{groupId} " + |
|
|
|
"SUM( IF(dpc.problem_sources_code=21,1,0)) AS countryMail, " + |
|
|
|
"AND dpc.second_depart_name is not NULL " + |
|
|
|
"SUM( IF(dpc.problem_sources_code=22,1,0)) AS policeMail " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"WHERE dpc.third_depart_id IS NOT NULL " + |
|
|
|
|
|
|
|
"AND dpc.discovery_time BETWEEN #{beginTime} AND #{endTime}" ) |
|
|
|
|
|
|
|
MailOverviewVo selectMailOverviewVo(Date beginTime, Date endTime); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd1.short_name AS label, " + |
|
|
|
|
|
|
|
"count(*) AS `value` FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + |
|
|
|
"WHERE dpc.receiving_leader_name is NOT NULL " + |
|
|
|
"WHERE dpc.receiving_leader_name is NOT NULL " + |
|
|
|
|
|
|
|
"AND sd1.statistics_group_id=#{groupId} " + |
|
|
|
|
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"GROUP BY sd1.short_name " + |
|
|
|
|
|
|
|
"HAVING label is not NULL " + |
|
|
|
|
|
|
|
"ORDER BY `value` DESC; ") |
|
|
|
|
|
|
|
List<OrganizeProblemRankVo> getMailLeaderRank(Date beginTime, Date endTime, Integer groupId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sum( IF(receiving_leader_name is NOT NULL, 1, 0) ) AS leaderReview , " + |
|
|
|
|
|
|
|
"sum( IF(entanglement_visits=1, 1, 0) ) AS entanglement , " + |
|
|
|
|
|
|
|
"sum( IF( mass_visits=1, 1, 0) ) AS mass " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd1 on sd.pid=sd1.id " + |
|
|
|
|
|
|
|
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"AND sd1.statistics_group_id=#{groupId}; ") |
|
|
|
|
|
|
|
MailEntanglementMassOverviewVo getEntanglementAndMassOverview(Date beginTime, Date endTime, Integer groupId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd1.short_name AS label, " + |
|
|
|
|
|
|
|
"count(DISTINCT dpc.origin_id ) AS `value` " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + |
|
|
|
|
|
|
|
"WHERE sd1.statistics_group_id=#{groupId} " + |
|
|
|
|
|
|
|
"AND dpc.entanglement_visits =1 " + |
|
|
|
|
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"GROUP BY sd1.short_name " + |
|
|
|
|
|
|
|
"HAVING label is not NULL " + |
|
|
|
|
|
|
|
"ORDER BY `value` DESC;") |
|
|
|
|
|
|
|
List<OrganizeProblemRankVo> getEntanglementMailRank(Date beginTime, Date endTime, Integer groupId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd1.short_name AS label, " + |
|
|
|
|
|
|
|
"count(DISTINCT dpc.origin_id ) AS `value` " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " + |
|
|
|
|
|
|
|
"WHERE sd1.statistics_group_id=#{groupId} " + |
|
|
|
|
|
|
|
"AND dpc.mass_visits =1 " + |
|
|
|
|
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"GROUP BY sd1.short_name " + |
|
|
|
|
|
|
|
"HAVING label is not NULL " + |
|
|
|
|
|
|
|
"ORDER BY `value` DESC;") |
|
|
|
|
|
|
|
List<OrganizeProblemRankVo> getMassMailRank(Date beginTime, Date endTime, Integer groupId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("select count(*) " + |
|
|
|
|
|
|
|
"from data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd ON dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"where problem_sources_code=#{problemSourcesCode} " + |
|
|
|
|
|
|
|
"and sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"and discovery_time BETWEEN #{beginTime} AND #{endTime} ") |
|
|
|
|
|
|
|
Integer selectMailBySourceCode(Date beginTime, Date endTime, String problemSourcesCode, String departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 二级大屏
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(initial_petition=1, 1, 0)), 0) AS firstMail, " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(initial_petition=2, 1, 0)), 0) AS repeatMail, " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderMail " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND sd.statistics_group_id = 10;") |
|
|
|
|
|
|
|
MailFirstAndRepeatOverviewVo getSubOnePoliceFirstAndRepeatOverview(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(initial_petition=1, 1, 0)), 0) AS firstMail, " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(initial_petition=2, 1, 0)), 0) AS repeatMail, " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderMail " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND sd.statistics_group_id != 10;") |
|
|
|
|
|
|
|
MailFirstAndRepeatOverviewVo getTeamFirstAndRepeatOverview(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd.short_name AS label, " + |
|
|
|
|
|
|
|
"count(*) AS `value` " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE dpc.initial_petition=#{typeId} " + |
|
|
|
|
|
|
|
"AND sd.pid = #{departId} " + |
|
|
|
|
|
|
|
"AND sd.statistics_group_id=10 " + |
|
|
|
|
|
|
|
"AND dpc.second_depart_name is not NULL " + |
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
"HAVING label is not NULL " + |
|
|
|
"HAVING label is not NULL " + |
|
|
|
"ORDER BY `value` DESC") |
|
|
|
"ORDER BY `value` DESC") |
|
|
|
List<OrganizeProblemRankVo> getMailLeaderRank(Date beginTime, Date endTime, int groupId); |
|
|
|
List<OrganizeProblemRankVo> getPoliceMailRank(Date beginTime, Date endTime, Integer departId, Integer typeId); |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT COUNT( IF(mass_visits=1, 1, NULL) ) AS entanglement, " + |
|
|
|
@Select("SELECT " + |
|
|
|
"count( IF( entanglement_visits=1, 1, NULL) ) AS mass, " + |
|
|
|
"sd.short_name AS label, " + |
|
|
|
"count( IF(receiving_leader_name is NOT NULL, 1, NULL) ) AS leaderReview " + |
|
|
|
"count(*) AS `value` " + |
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} ") |
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
MailEntanglementMassOverviewVo getEntanglementAndMassOverview(Date beginTime, Date endTime); |
|
|
|
"WHERE dpc.initial_petition=#{typeId} " + |
|
|
|
|
|
|
|
"AND sd.pid = #{departId} " + |
|
|
|
@Select("SELECT sd.short_name AS label, " + |
|
|
|
"AND sd.statistics_group_id!=10 " + |
|
|
|
"count(*) AS `value` FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " + |
|
|
|
|
|
|
|
"AND sd.statistics_group_id=#{groupId} " + |
|
|
|
|
|
|
|
"AND dpc.second_depart_name is not NULL " + |
|
|
|
"AND dpc.second_depart_name is not NULL " + |
|
|
|
"WHERE dpc.entanglement_visits=1 " + |
|
|
|
|
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
"HAVING label is not NULL " + |
|
|
|
"HAVING label is not NULL " + |
|
|
|
"ORDER BY `value` DESC") |
|
|
|
"ORDER BY `value` DESC") |
|
|
|
List<OrganizeProblemRankVo> getEntanglementMailRank(Date beginTime, Date endTime, int groupId); |
|
|
|
List<OrganizeProblemRankVo> getTeamMailRank(Date beginTime, Date endTime, Integer departId, Integer typeId); |
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd.short_name AS label, " + |
|
|
|
|
|
|
|
"count(*) AS `value` FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE dpc.receiving_leader_name is NOT NULL " + |
|
|
|
|
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND sd.statistics_group_id = 10 " + |
|
|
|
|
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
|
|
|
|
"HAVING label is not NULL " + |
|
|
|
|
|
|
|
"ORDER BY `value` DESC; ") |
|
|
|
|
|
|
|
List<OrganizeProblemRankVo> getPoliceMailLeaderRank(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT sd.short_name AS label, " + |
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd.short_name AS label, " + |
|
|
|
"count(*) AS `value` FROM data_petition_complaint dpc " + |
|
|
|
"count(*) AS `value` FROM data_petition_complaint dpc " + |
|
|
|
"INNER JOIN sup_depart sd ON dpc.second_depart_id=sd.id " + |
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
"AND sd.statistics_group_id=#{groupId} " + |
|
|
|
"WHERE dpc.receiving_leader_name is NOT NULL " + |
|
|
|
"AND dpc.second_depart_name is not NULL " + |
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
"WHERE dpc.entanglement_visits=1 " + |
|
|
|
"AND sd.statistics_group_id != 10 " + |
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
"HAVING label is not NULL " + |
|
|
|
"HAVING label is not NULL " + |
|
|
|
"ORDER BY `value` DESC ") |
|
|
|
"ORDER BY `value` DESC; ") |
|
|
|
List<OrganizeProblemRankVo> getMassMailRank(Date beginTime, Date endTime, int groupId); |
|
|
|
List<OrganizeProblemRankVo> getTeamMailLeaderRank(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("select count(*) from data_petition_complaint dpc " + |
|
|
|
@Select("SELECT " + |
|
|
|
"where problem_sources_code=#{problemSourcesCode} " + |
|
|
|
"SUM( IF(dpc.problem_sources_code=21,1,0)) AS countryMail, " + |
|
|
|
"and second_depart_id=#{departId} " + |
|
|
|
"SUM( IF(dpc.problem_sources_code=22,1,0)) AS policeMail " + |
|
|
|
"and discovery_time between #{beginTime} and #{endTime}") |
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
Integer selectMailBySourceCode(Date beginTime, Date endTime, String problemSourcesCode, String departId); |
|
|
|
"LEFT JOIN sup_depart sd ON dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND dpc.discovery_time BETWEEN #{beginTime} AND #{endTime} ") |
|
|
|
|
|
|
|
MailOverviewVo selectSubOneMailOverviewVo(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"m.month_name AS `name`, " + |
|
|
|
|
|
|
|
"IFNULL(COUNT(sd.pid=#{departId}), 0) AS `value` " + |
|
|
|
|
|
|
|
"FROM sup_month_monthname m " + |
|
|
|
|
|
|
|
"LEFT JOIN data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"ON DATE_FORMAT(dpc.discovery_time, '%m') = m.month " + |
|
|
|
|
|
|
|
"AND YEAR(dpc.discovery_time) = #{year} " + |
|
|
|
|
|
|
|
"AND dpc.problem_sources_code = #{problemSourceCode} " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd " + |
|
|
|
|
|
|
|
"ON dpc.third_depart_id = sd.id " + |
|
|
|
|
|
|
|
"AND sd.pid = #{departId} " + |
|
|
|
|
|
|
|
"GROUP BY m.month_name " + |
|
|
|
|
|
|
|
"ORDER BY m.month ASC;") |
|
|
|
|
|
|
|
List<EchartsVo> getSubOneMailTrend(Integer year, Integer problemSourceCode, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderReview, " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(entanglement_visits=1, 1, 0)), 0) AS entanglement, " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(mass_visits=1, 1, 0)), 0) AS mass " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND sd.statistics_group_id=10;") |
|
|
|
|
|
|
|
MailEntanglementMassOverviewVo getPoliceEntanglementAndMassOverview(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderReview, " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(entanglement_visits=1, 1, 0)), 0) AS entanglement, " + |
|
|
|
|
|
|
|
"COALESCE(SUM(IF(mass_visits=1, 1, 0)), 0) AS mass " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND sd.statistics_group_id!=10;") |
|
|
|
|
|
|
|
MailEntanglementMassOverviewVo getTeamEntanglementAndMassOverview(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd.short_name AS label, " + |
|
|
|
|
|
|
|
"count(DISTINCT dpc.origin_id ) AS `value` " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE sd.statistics_group_id=10 " + |
|
|
|
|
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND dpc.entanglement_visits =1 " + |
|
|
|
|
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
|
|
|
|
"HAVING label is not NULL " + |
|
|
|
|
|
|
|
"ORDER BY `value` DESC;") |
|
|
|
|
|
|
|
List<OrganizeProblemRankVo> getPoliceEntanglementMailRank(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd.short_name AS label, " + |
|
|
|
|
|
|
|
"count(DISTINCT dpc.origin_id ) AS `value` " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE sd.statistics_group_id!=10 " + |
|
|
|
|
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND dpc.entanglement_visits =1 " + |
|
|
|
|
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
|
|
|
|
"HAVING label is not NULL " + |
|
|
|
|
|
|
|
"ORDER BY `value` DESC;") |
|
|
|
|
|
|
|
List<OrganizeProblemRankVo> getTeamEntanglementMailRank(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd.short_name AS label, " + |
|
|
|
|
|
|
|
"count(DISTINCT dpc.origin_id ) AS `value` " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE sd.statistics_group_id=10 " + |
|
|
|
|
|
|
|
"AND dpc.mass_visits =1 " + |
|
|
|
|
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
|
|
|
|
"HAVING label is not NULL " + |
|
|
|
|
|
|
|
"ORDER BY `value` DESC;") |
|
|
|
|
|
|
|
List<OrganizeProblemRankVo> getPoliceMassMailRank(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT " + |
|
|
|
|
|
|
|
"sd.short_name AS label, " + |
|
|
|
|
|
|
|
"count(DISTINCT dpc.origin_id ) AS `value` " + |
|
|
|
|
|
|
|
"FROM data_petition_complaint dpc " + |
|
|
|
|
|
|
|
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " + |
|
|
|
|
|
|
|
"WHERE sd.statistics_group_id!=10 " + |
|
|
|
|
|
|
|
"AND dpc.mass_visits =1 " + |
|
|
|
|
|
|
|
"AND sd.pid=#{departId} " + |
|
|
|
|
|
|
|
"AND discovery_time BETWEEN #{beginTime} AND #{endTime} " + |
|
|
|
|
|
|
|
"GROUP BY sd.short_name " + |
|
|
|
|
|
|
|
"HAVING label is not NULL " + |
|
|
|
|
|
|
|
"ORDER BY `value` DESC;") |
|
|
|
|
|
|
|
List<OrganizeProblemRankVo> getTeamMassMailRank(Date beginTime, Date endTime, Integer departId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|