Browse Source

Merge remote-tracking branch 'origin/master'

main
sjh 1 year ago
parent
commit
311b95a25a
  1. 20
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java
  2. 8
      src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java

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

@ -21,10 +21,11 @@ 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")
"GROUP BY temp.second_depart_id " +
"ORDER BY value DESC")
List<CaseVerifDepart> selectDepartStatistic(Integer departId, Integer Repeat, Date beginTime, Date endTime);
/**
@ -36,10 +37,11 @@ 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")
"GROUP BY temp.second_depart_id " +
"ORDER BY value DESC")
List<CaseVerifDepart> selectLeaderViewMail(Integer departId, Date beginTime, Date endTime);
@ -53,18 +55,20 @@ 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")
"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.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")
"GROUP BY temp.second_depart_id " +
"ORDER BY value DESC")
List<CaseVerifDepart> selectMassMail(Integer id, int isMass, Date beginTime, Date endTime);
}

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