@ -55,44 +55,66 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
List < RecentMailTrendByMonthVo > selectRecentlyMailTrendByMonth ( Integer sourcesCode , String year ) ;
List < RecentMailTrendByMonthVo > selectRecentlyMailTrendByMonth ( Integer sourcesCode , String year ) ;
@Select ( "SELECT " +
@Select ( "<script>" +
"SELECT " +
"IFNULL(SUM( IF(initial_petition=1, 1, 0) ), 0) AS firstMail, " +
"IFNULL(SUM( IF(initial_petition=1, 1, 0) ), 0) AS firstMail, " +
"IFNULL(SUM( IF( initial_petition=2, 1, 0) ), 0) AS repeatMail, " +
"IFNULL(SUM( IF( initial_petition=2, 1, 0) ), 0) AS repeatMail, " +
"IFNULL(SUM( IF(receiving_leader_name is NOT NULL, 1, 0) ), 0) AS leaderMail " +
"IFNULL(SUM( IF(receiving_leader_name is NOT NULL, 1, 0) ), 0) AS leaderMail " +
"FROM data_petition_complaint dpc " +
"FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.second_depart_id=sd.id " +
"LEFT JOIN sup_depart sd on dpc.second_depart_id=sd.id " +
"WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=#{groupId}" )
"AND dpc.problem_sources_code in " +
MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview ( Date beginTime , Date endTime , Integer groupId ) ;
"<foreach collection='codes' item='item' open='(' separator=',' close=')'>" +
"#{item}" +
"</foreach>" +
"AND sd.statistics_group_id=#{groupId}" +
"</script>" )
MailFirstAndRepeatOverviewVo getFirstAndRepeatOverview ( Date beginTime , Date endTime , Integer groupId , List < String > codes ) ;
@Select ( "SELECT " +
@Select (
"<script>" +
"SELECT " +
"sd.short_name AS label, " +
"sd.short_name AS label, " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.second_depart_id=sd.id " +
"LEFT JOIN sup_depart sd on dpc.second_depart_id=sd.id " +
"WHERE dpc.initial_petition=#{isRepeat} " +
"WHERE dpc.initial_petition=#{isRepeat} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND sd.statistics_group_id=#{groupId} " +
"AND dpc.problem_sources_code in " +
"<foreach collection='codes' item='item' open='(' separator=',' close=')'>" +
"#{item}" +
"</foreach>" +
"AND dpc.create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND dpc.create_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 > getMailRank ( Date beginTime , Date endTime , Integer groupId , Integer isRepeat ) ;
"</script>" )
List < OrganizeProblemRankVo > getMailRank ( Date beginTime , Date endTime , Integer groupId , Integer isRepeat , List < String > codes ) ;
@Select ( "SELECT " +
@Select ( "<script>" +
"SELECT " +
"sd1.short_name AS label, " +
"sd1.short_name AS label, " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"count(*) AS `value` FROM data_petition_complaint dpc " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.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 sd1.statistics_group_id=#{groupId} " +
"AND dpc.problem_sources_code in " +
"<foreach collection='codes' item='item' open='(' separator=',' close=')'>" +
"#{item}" +
"</foreach>" +
"AND dpc.create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND dpc.create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.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 > getMailLeaderRank ( Date beginTime , Date endTime , Integer groupId ) ;
"</script>"
)
List < OrganizeProblemRankVo > getMailLeaderRank ( Date beginTime , Date endTime , Integer groupId , List < String > codes ) ;
@Select ( "SELECT " +
@Select ( "<script>" +
"SELECT " +
"IFNULL(sum(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderReview, " +
"IFNULL(sum(IF(receiving_leader_name IS NOT NULL, 1, 0)), 0) AS leaderReview, " +
"IFNULL(sum(IF(entanglement_visits = 1, 1, 0)), 0) AS entanglement, " +
"IFNULL(sum(IF(entanglement_visits = 1, 1, 0)), 0) AS entanglement, " +
"IFNULL(sum(IF(mass_visits = 1, 1, 0)), 0) AS mass " +
"IFNULL(sum(IF(mass_visits = 1, 1, 0)), 0) AS mass " +
@ -100,11 +122,18 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd on dpc.third_depart_id=sd.id " +
"LEFT JOIN sup_depart sd1 on sd.pid=sd1.id " +
"LEFT JOIN sup_depart sd1 on sd.pid=sd1.id " +
"WHERE create_time BETWEEN #{beginTime} AND #{endTime} " +
"WHERE create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND sd1.statistics_group_id=#{groupId}; " )
"AND sd1.statistics_group_id=#{groupId} " +
MailEntanglementMassOverviewVo getEntanglementAndMassOverview ( Date beginTime , Date endTime , Integer groupId ) ;
"AND dpc.problem_sources_code in " +
"<foreach collection='codes' item='item' open='(' separator=',' close=')'>" +
"#{item}" +
"</foreach>" +
"</script>"
)
MailEntanglementMassOverviewVo getEntanglementAndMassOverview ( Date beginTime , Date endTime , Integer groupId , List < String > codes ) ;
@Select ( "SELECT " +
@Select ( "<script>" +
"SELECT " +
"sd1.short_name AS label, " +
"sd1.short_name AS label, " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"FROM data_petition_complaint dpc " +
"FROM data_petition_complaint dpc " +
@ -112,13 +141,20 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE sd1.statistics_group_id=#{groupId} " +
"WHERE sd1.statistics_group_id=#{groupId} " +
"AND dpc.entanglement_visits =1 " +
"AND dpc.entanglement_visits =1 " +
"AND dpc.problem_sources_code in " +
"<foreach collection='codes' item='item' open='(' separator=',' close=')'>" +
"#{item}" +
"</foreach>" +
"AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.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 > getEntanglementMailRank ( Date beginTime , Date endTime , Integer groupId ) ;
"</script>"
)
List < OrganizeProblemRankVo > getEntanglementMailRank ( Date beginTime , Date endTime , Integer groupId , List < String > codes ) ;
@Select ( "SELECT " +
@Select ( "<script>" +
"SELECT " +
"sd1.short_name AS label, " +
"sd1.short_name AS label, " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"count(DISTINCT dpc.origin_id ) AS `value` " +
"FROM data_petition_complaint dpc " +
"FROM data_petition_complaint dpc " +
@ -126,11 +162,17 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE sd1.statistics_group_id=#{groupId} " +
"WHERE sd1.statistics_group_id=#{groupId} " +
"AND dpc.mass_visits =1 " +
"AND dpc.mass_visits =1 " +
"AND dpc.problem_sources_code in " +
"<foreach collection='codes' item='item' open='(' separator=',' close=')'>" +
"#{item}" +
"</foreach>" +
"AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"AND create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.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 > getMassMailRank ( Date beginTime , Date endTime , Integer groupId ) ;
"</script>"
)
List < OrganizeProblemRankVo > getMassMailRank ( Date beginTime , Date endTime , Integer groupId , List < String > codes ) ;
@Select ( "select count(*) " +
@Select ( "select count(*) " +