Browse Source

信访大屏后端1.1

main
parent
commit
51a2bc06b3
  1. 14
      src/main/java/com/biutag/supervision/controller/datav/DataPetitionComplaintViewController.java
  2. 42
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java
  3. 18
      src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java

14
src/main/java/com/biutag/supervision/controller/datav/DataPetitionComplaintViewController.java

@ -55,15 +55,23 @@ public class DataPetitionComplaintViewController {
List<CaseVerifDepart> bwzdFirstMailList = dataPetitionComplaintService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.FIRST_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> bwzdRepeatMailList = dataPetitionComplaintService.mailRank(DepartGroupEnum.BUREAU_AFFILIATED.getId(), RepeatEnum.REPEAT_MAIL.getId(), beginTime, endTime);
List<CaseVerifDepart> bwzdLeaderViewMailList = dataPetitionComplaintMapper.selectLeaderViewMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), beginTime, endTime);
//
// 分县市局领导督办、缠访、集访排名
List<CaseVerifDepart> fxsjEntanglementMailList = dataPetitionComplaintMapper.selectEntanglementMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), 1, beginTime, endTime);
List<CaseVerifDepart> fxsjMassMailList = dataPetitionComplaintMapper.selectMassMail(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), 1, beginTime, endTime);
// 部委支队缠访集访排名
List<CaseVerifDepart> bwzdEntanglementMailList = dataPetitionComplaintMapper.selectEntanglementMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), 1, beginTime, endTime);
List<CaseVerifDepart> bwzdMassMailList = dataPetitionComplaintMapper.selectMassMail(DepartGroupEnum.BUREAU_AFFILIATED.getId(), 1, beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview)
.fluentPut("fxsjFirstMailList", fxsjFirstMailList)
.fluentPut("fxsjRepeatMailList", fxsjRepeatMailList)
.fluentPut("fxsjLeaderViewMailList", fxsjLeaderViewMailList)
.fluentPut("bwzdFirstMailList", bwzdFirstMailList)
.fluentPut("bwzdRepeatMailList", bwzdRepeatMailList)
.fluentPut("bwzdLeaderViewMailList", bwzdLeaderViewMailList);
.fluentPut("bwzdLeaderViewMailList", bwzdLeaderViewMailList)
.fluentPut("fxsjEntanglementMailList", fxsjEntanglementMailList)
.fluentPut("fxsjMassMailList", fxsjMassMailList)
.fluentPut("bwzdEntanglementMailList", bwzdEntanglementMailList)
.fluentPut("bwzdMassMailList", bwzdMassMailList);
return Result.success(data);
}

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

@ -11,7 +11,14 @@ import java.util.List;
public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComplaint> {
/**
* 查询初访重访
* @param departId
* @param Repeat
* @param beginTime
* @param endTime
* @return
*/
@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 " +
@ -20,6 +27,13 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"GROUP BY temp.second_depart_id")
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.create_time BETWEEN #{beginTime} AND #{endTime}) as temp " +
@ -27,4 +41,30 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"WHERE sd.statistics_group_id=#{departId} and temp.receiving_leader_name is not null " +
"GROUP BY temp.second_depart_id")
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.create_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")
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 " +
"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")
List<CaseVerifDepart> selectMassMail(Integer id, int isMass, Date beginTime, Date endTime);
}

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

@ -128,42 +128,42 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
// 国家信访
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("problem_sources_code", 21);
countryQueryWrapper.between("create_time", beginTime, endTime);
countryQueryWrapper.between("discovery_time", beginTime, endTime);
Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper);
// 公安部信访
QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>();
policeQueryWrapper.eq("problem_sources_code", 22);
policeQueryWrapper.between("create_time", beginTime, endTime);
policeQueryWrapper.between("discovery_time", beginTime, endTime);
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
// 初访
QueryWrapper<DataPetitionComplaint> firstQueryWrapper = new QueryWrapper<>();
firstQueryWrapper.eq("initial_petition", 1);
firstQueryWrapper.between("create_time", beginTime, endTime);
firstQueryWrapper.between("discovery_time", beginTime, endTime);
Long firstMail = dataPetitionComplaintMapper.selectCount(firstQueryWrapper);
// 重访
QueryWrapper<DataPetitionComplaint> secondQueryWrapper = new QueryWrapper<>();
secondQueryWrapper.eq("initial_petition", 2);
secondQueryWrapper.between("create_time", beginTime, endTime);
secondQueryWrapper.between("discovery_time", beginTime, endTime);
Long secondMail = dataPetitionComplaintMapper.selectCount(secondQueryWrapper);
// 领导接访
QueryWrapper<DataPetitionComplaint> leaderQueryWrapper = new QueryWrapper<>();
leaderQueryWrapper.isNotNull("receiving_leader_name");
leaderQueryWrapper.between("create_time", beginTime, endTime);
leaderQueryWrapper.between("discovery_time", beginTime, endTime);
Long leaderReceiveMail = dataPetitionComplaintMapper.selectCount(leaderQueryWrapper);
// 领导督办
QueryWrapper<DataPetitionComplaint> leaderViewQueryWrapper = new QueryWrapper<>();
leaderViewQueryWrapper.isNotNull("receiving_leader_name");
leaderViewQueryWrapper.between("create_time", beginTime, endTime);
leaderViewQueryWrapper.between("discovery_time", beginTime, endTime);
Long leaderViewMail = dataPetitionComplaintMapper.selectCount(leaderViewQueryWrapper);
// 闹访
QueryWrapper<DataPetitionComplaint> tangleQueryWrapper = new QueryWrapper<>();
tangleQueryWrapper.eq("entanglement_visits", 1);
tangleQueryWrapper.between("create_time", beginTime, endTime);
tangleQueryWrapper.between("discovery_time", beginTime, endTime);
Long tangleMail = dataPetitionComplaintMapper.selectCount(tangleQueryWrapper);
// 集访
QueryWrapper<DataPetitionComplaint> massQueryWrapper = new QueryWrapper<>();
massQueryWrapper.eq("mass_visits", 1);
massQueryWrapper.between("create_time", beginTime, endTime);
massQueryWrapper.between("discovery_time", beginTime, endTime);
Long massMail = dataPetitionComplaintMapper.selectCount(massQueryWrapper);
JSONObject overview = new JSONObject()
// 信访总数(起)
@ -192,7 +192,7 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
}
// 分类数据排行
// 初访重访分类数据排行
public List<CaseVerifDepart> mailRank(Integer departId, Integer Repeat, Date beginTime, Date endTime) {
List<CaseVerifDepart> list = dataPetitionComplaintMapper.
selectDepartStatistic(departId, Repeat, beginTime, endTime);

Loading…
Cancel
Save