Browse Source

fix:1、修复初芳重访情况领导接访数据不准确

main
pengwei 7 months ago
parent
commit
80047231d0
  1. 2
      src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java
  2. 30
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java

2
src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java

@ -54,7 +54,7 @@ public class DataVMailViewController {
public Result<JSONObject> getFirstAndRepeatMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getFirstAndRepeatMail(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
endTime = DateUtil.endOfDay(endTime); endTime = DateUtil.endOfDay(endTime);
//查询国家信访和公安部信访 //查询条件国家信访和公安部信访
List<String> codes = List.of(ProblemSourcesEnum.GJXFPT.getValue(),ProblemSourcesEnum.GABXF.getValue()); List<String> codes = List.of(ProblemSourcesEnum.GJXFPT.getValue(),ProblemSourcesEnum.GABXF.getValue());
// 初访重访情况总览 // 初访重访情况总览
MailFirstAndRepeatOverviewVo fxjsFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 3,codes); MailFirstAndRepeatOverviewVo fxjsFirstAndRepeatOverview = dataPetitionComplaintMapper.getFirstAndRepeatOverview(beginTime, endTime, 3,codes);

30
src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java

@ -91,25 +91,41 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
List<OrganizeProblemRankVo> getMailRank(Date beginTime, Date endTime, Integer groupId, Integer isRepeat,List<String> codes); List<OrganizeProblemRankVo> getMailRank(Date beginTime, Date endTime, Integer groupId, Integer isRepeat,List<String> codes);
@Select( "<script>"+ // @Select( "<script>"+
// "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 " +
// "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} " +
// "GROUP BY sd1.short_name " +
// "HAVING label is not NULL " +
// "ORDER BY `value` DESC"+
// "</script>"
// )
@Select("<script>"+
"SELECT " + "SELECT " +
"sd1.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.third_depart_id=sd.id " + "LEFT JOIN sup_depart sd on dpc.second_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 sd.statistics_group_id=#{groupId} " +
"AND dpc.problem_sources_code in "+ "AND dpc.problem_sources_code in "+
"<foreach collection='codes' item='item' open='(' separator=',' close=')'>"+ "<foreach collection='codes' item='item' open='(' separator=',' close=')'>"+
"#{item}"+ "#{item}"+
"</foreach>"+ "</foreach>"+
"AND dpc.create_time BETWEEN #{beginTime} AND #{endTime} " + "AND dpc.create_time BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd1.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"+
"</script>" "</script>"
) )
List<OrganizeProblemRankVo> getMailLeaderRank(Date beginTime, Date endTime, Integer groupId,List<String> codes); List<OrganizeProblemRankVo> getMailLeaderRank(Date beginTime, Date endTime, Integer groupId,List<String> codes);

Loading…
Cancel
Save