Browse Source

信访大屏后端1.2

main
parent
commit
4fb9148adb
  1. 8
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java
  2. 8
      src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java

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

@ -21,7 +21,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
*/
@Select("SELECT sd.id, sd.short_name label,count(*) value " +
"FROM (SELECT * FROM data_petition_complaint dpc " +
"WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime}) as temp " +
"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.initial_petition=#{Repeat} " +
"GROUP BY temp.second_depart_id")
@ -36,7 +36,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
*/
@Select("SELECT sd.id, sd.short_name label,count(*) value " +
"FROM (SELECT * FROM data_petition_complaint dpc " +
"WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime}) as temp " +
"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")
@ -53,7 +53,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
*/
@Select("SELECT sd.id, sd.short_name label,count(*) value " +
"FROM (SELECT * FROM data_petition_complaint dpc " +
"WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime}) as temp " +
"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")
@ -62,7 +62,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
@Select("SELECT sd.id, sd.short_name label,count(*) value " +
"FROM (SELECT * FROM data_petition_complaint dpc " +
"WHERE dpc.create_time BETWEEN #{beginTime} AND #{endTime}) as temp " +
"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")

8
src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java

@ -124,7 +124,9 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
//所有分类数据总数
public JSONObject allMailCount(Date beginTime, Date endTime) {
long totalMail = this.count();
QueryWrapper<DataPetitionComplaint> totalQueryWrapper = new QueryWrapper<>();
totalQueryWrapper.between("discovery_time", beginTime, endTime);
long totalMail = this.count(totalQueryWrapper);
// 国家信访
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("problem_sources_code", 21);
@ -155,12 +157,12 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
leaderViewQueryWrapper.isNotNull("receiving_leader_name");
leaderViewQueryWrapper.between("discovery_time", beginTime, endTime);
Long leaderViewMail = dataPetitionComplaintMapper.selectCount(leaderViewQueryWrapper);
// 闹访
// 闹访 1:闹 2:不闹
QueryWrapper<DataPetitionComplaint> tangleQueryWrapper = new QueryWrapper<>();
tangleQueryWrapper.eq("entanglement_visits", 1);
tangleQueryWrapper.between("discovery_time", beginTime, endTime);
Long tangleMail = dataPetitionComplaintMapper.selectCount(tangleQueryWrapper);
// 集访
// 集访 1:集 2:不集
QueryWrapper<DataPetitionComplaint> massQueryWrapper = new QueryWrapper<>();
massQueryWrapper.eq("mass_visits", 1);
massQueryWrapper.between("discovery_time", beginTime, endTime);

Loading…
Cancel
Save