Browse Source

fix:区县大屏开发

master
pengwei 8 months ago
parent
commit
f338898bf1
  1. 8
      src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java
  2. 1
      src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java
  3. 12
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java
  4. 43
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java
  5. 186
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java
  6. 112
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java
  7. 11
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java
  8. 6
      src/main/java/com/biutag/supervision/mapper/DataPetition12337Mapper.java
  9. 6
      src/main/java/com/biutag/supervision/mapper/DataPetitionComplaintMapper.java
  10. 7
      src/main/java/com/biutag/supervision/mapper/NegativeBlameMapper.java
  11. 86
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  12. 60
      src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java
  13. 7
      src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java
  14. 24
      src/main/java/com/biutag/supervision/service/DataMailService.java
  15. 6
      src/main/resources/mapper/DataPetition12337Mapper.xml
  16. 6
      src/main/resources/mapper/SupTaskProblemMapper.xml

8
src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java

@ -31,8 +31,7 @@ import java.util.List;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import static com.biutag.supervision.constants.WorkDynamicConstants.DCGZDT; import static com.biutag.supervision.constants.WorkDynamicConstants.DCGZDT;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.XCDC; import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ZXDC;
/** /**
* @Auther: sh * @Auther: sh
@ -104,8 +103,9 @@ public class DataVSupervisionNotifyController {
public Result<SupervisionNotifyOverView> getSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<SupervisionNotifyOverView> getSupervisionNotifyCount(@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);
////, ProblemSourcesEnum.SPDC.getValue() 去除视频督察
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, endTime) List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, endTime)
.in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.XCDC.getValue(), ProblemSourcesEnum.LMGZ.getValue(), ProblemSourcesEnum.ZXDC.getValue(), ProblemSourcesEnum.SPDC.getValue()))); .in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.XCDC.getValue(), ProblemSourcesEnum.LMGZ.getValue(), ProblemSourcesEnum.ZXDC.getValue())));
SupervisionNotifyOverView overView = new SupervisionNotifyOverView(); SupervisionNotifyOverView overView = new SupervisionNotifyOverView();
List<String> negativeIds = negatives.stream().filter(item -> InspectCaseEnum.isItTure(item.getCheckStatus())).map(Negative::getId).toList(); List<String> negativeIds = negatives.stream().filter(item -> InspectCaseEnum.isItTure(item.getCheckStatus())).map(Negative::getId).toList();
@ -162,7 +162,7 @@ public class DataVSupervisionNotifyController {
@Operation(summary = "问题趋势") @Operation(summary = "问题趋势")
@GetMapping("/getSupervisionTrend") @GetMapping("/getSupervisionTrend")
public Result<JSONObject> getSupervisionTrend(@RequestParam Integer year) { public Result<JSONObject> getSupervisionTrend(@RequestParam Integer year) {
List<EchartsVo> supervisionTrend = negativeMapper.getTrend(year, XCDC.getValue(), ZXDC.getValue()); List<EchartsVo> supervisionTrend = negativeMapper.getTrend(year, XCDC.getValue(), ZXDC.getValue(),LMGZ.getValue());
JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend); JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend);
return Result.success(data); return Result.success(data);
} }

1
src/main/java/com/biutag/supervision/controller/datav/DataVVideoSuperviseController.java

@ -127,6 +127,7 @@ public class DataVVideoSuperviseController {
// 地图数据 // 地图数据
List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getVideoSuperviseMapIconInfo(beginTime, endTime)). List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getVideoSuperviseMapIconInfo(beginTime, endTime)).
orElseGet(ArrayList::new); orElseGet(ArrayList::new);
List<EchartsVo> list =negativeMapper.selectRelativePer(beginTime,endTime); List<EchartsVo> list =negativeMapper.selectRelativePer(beginTime,endTime);
videoSuperviseMapIconVoList.forEach(s->{ videoSuperviseMapIconVoList.forEach(s->{
List<EchartsVo> echartsVoList= list.stream().filter(b->b.getName().contains(s.getDepartId())).toList(); List<EchartsVo> echartsVoList= list.stream().filter(b->b.getName().contains(s.getDepartId())).toList();

12
src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java

@ -1,9 +1,13 @@
package com.biutag.supervision.controller.subdatav; package com.biutag.supervision.controller.subdatav;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.mapper.DataCaseVerifMapper; import com.biutag.supervision.mapper.DataCaseVerifMapper;
import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
import com.biutag.supervision.pojo.vo.CaseVerificationCountVo; import com.biutag.supervision.pojo.vo.CaseVerificationCountVo;
import com.biutag.supervision.pojo.vo.CaseVerificationMapVo; import com.biutag.supervision.pojo.vo.CaseVerificationMapVo;
import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.EchartsVo;
@ -37,7 +41,7 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SJJB;
@Tag(name = "案件核查二级大屏", description = "案件核查二级大屏") @Tag(name = "案件核查二级大屏", description = "案件核查二级大屏")
public class SubOneCaseVerifController { public class SubOneCaseVerifController {
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final DataCaseVerifMapper dataCaseVerifMapper;
/** /**
* 案件核查大屏分县市局排名 * 案件核查大屏分县市局排名
@ -99,7 +103,13 @@ public class SubOneCaseVerifController {
public Result<JSONObject> getSubOneAllCaseVerificationCount(@RequestParam Integer departId, public Result<JSONObject> getSubOneAllCaseVerificationCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @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);
CaseVerificationCountVo overview = negativeMapper.getSuboOneAllCaseVerificationCount(beginTime, endTime, departId); CaseVerificationCountVo overview = negativeMapper.getSuboOneAllCaseVerificationCount(beginTime, endTime, departId);
long total =dataCaseVerifMapper.selectCount(new LambdaQueryWrapper<DataCaseVerif>().between(DataCaseVerif::getCreateTime,beginTime,endTime));
overview.setTotal((int) total);
int confirmed = overview.getConfirmed() != null?overview.getConfirmed():0;
overview.setRate(NumberUtil.div((Number) (confirmed * 100),total ).doubleValue());
JSONObject res = new JSONObject().fluentPut("overview", overview); JSONObject res = new JSONObject().fluentPut("overview", overview);
return Result.success(res); return Result.success(res);
} }

43
src/main/java/com/biutag/supervision/controller/subdatav/SubOneMailViewController.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.constants.enums.RepeatEnum; import com.biutag.supervision.constants.enums.RepeatEnum;
import com.biutag.supervision.mapper.DataPetition12337Mapper; import com.biutag.supervision.mapper.DataPetition12337Mapper;
import com.biutag.supervision.mapper.DataPetitionComplaintMapper; import com.biutag.supervision.mapper.DataPetitionComplaintMapper;
import com.biutag.supervision.mapper.NegativeBlameMapper;
import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.*;
@ -20,7 +21,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @Auther: sh * @Auther: sh
@ -39,6 +42,7 @@ public class SubOneMailViewController {
private final DataPetitionComplaintMapper dataPetitionComplaintMapper; private final DataPetitionComplaintMapper dataPetitionComplaintMapper;
private final DataPetition12337Mapper dataPetition12337Mapper; private final DataPetition12337Mapper dataPetition12337Mapper;
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final NegativeBlameMapper negativeBlameMapper;
// region 左边 // region 左边
/** /**
@ -188,5 +192,44 @@ public class SubOneMailViewController {
} }
// endregion // endregion
/**
* 追责问责情况
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "追责问责情况")
@GetMapping("/getSubOneResultCount")
public Result<Map<String,Integer>> getResultCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime,@RequestParam Integer departId){
List<BlameStats> list = negativeBlameMapper.selectSubOneBlameStatsCount(beginTime,endTime,departId);
Map<String,Integer> blameMap = new HashMap<>();
list.forEach(s->{
if(s.getResultName().indexOf("、") > 0){
for (String name:s.getResultName().split("、")){
if(!name.contains("不") && !name.contains("追责")){
if(blameMap.containsKey(name)){
blameMap.put(name,blameMap.get(name) + s.getResultCount());
}else{
blameMap.put(name,s.getResultCount());
}
}
}
}else{
if(!s.getResultName().contains("不") && !s.getResultName().contains("追责")){
if(blameMap.containsKey(s.getResultName())){
blameMap.put(s.getResultName(),blameMap.get(s.getResultName()) + s.getResultCount());
}else{
blameMap.put(s.getResultName(),s.getResultCount());
}
}
}
});
return Result.success(blameMap);
}
} }

186
src/main/java/com/biutag/supervision/controller/subdatav/SubOneRightsController.java

@ -1,11 +1,29 @@
package com.biutag.supervision.controller.subdatav; package com.biutag.supervision.controller.subdatav;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.constants.enums.RpcApplyTypeEnum;
import com.biutag.supervision.mapper.CountyStreetDeptMapper;
import com.biutag.supervision.mapper.RpcApplyMapper; import com.biutag.supervision.mapper.RpcApplyMapper;
import com.biutag.supervision.mapper.RpcInfringerResultMapper;
import com.biutag.supervision.mapper.SupDepartMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.common.BarItem;
import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.CountyStreetDept;
import com.biutag.supervision.pojo.entity.RpcApply;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.entity.SupDictData;
import com.biutag.supervision.pojo.vo.ComfortCountVO; import com.biutag.supervision.pojo.vo.ComfortCountVO;
import com.biutag.supervision.pojo.vo.ComfortMapIconVo;
import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.service.DataRightsComfortService; import com.biutag.supervision.service.DataRightsComfortService;
import com.biutag.supervision.service.RpcApplyService;
import com.biutag.supervision.service.SupDepartService;
import com.biutag.supervision.service.SupDictDataService;
import com.biutag.supervision.util.CompletableUtils.CompletableFutureUtil;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -15,9 +33,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.*;
import java.util.Date; import java.util.stream.Collectors;
import java.util.List;
import static com.biutag.supervision.constants.enums.DepartGroupEnum.COUNTY_CITY_BUREAUS;
/** /**
* @Auther: sh * @Auther: sh
@ -34,24 +53,49 @@ public class SubOneRightsController {
private final DataRightsComfortService dataRightsComfortService; private final DataRightsComfortService dataRightsComfortService;
private final RpcApplyMapper rpcApplyMapper; private final RpcApplyMapper rpcApplyMapper;
private final SupDictDataService supDictDataService;
private final CountyStreetDeptMapper countyStreetDeptMapper;
private final RpcApplyService rpcApplyService;
private final RpcInfringerResultMapper rpcInfringerResultMapper;
// 大屏中央总览数据 // 大屏中央总览数据
@GetMapping("/getSubOneALlComfortCount") @GetMapping("/getSubOneALlComfortCount")
public Result<JSONObject> getALlComfortCount(@RequestParam Integer departId, public Result<JSONObject> getALlComfortCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @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);
List<RpcApply> list= rpcApplyMapper.selectList(new LambdaQueryWrapper<RpcApply>()
.between(RpcApply::getCrtTime, beginTime, endTime)
.eq(RpcApply::getSecondDepartId,departId)
.eq(RpcApply::getType, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()));
Long comfortTotal = rpcApplyMapper.countSubOneComfortPersonNumber(beginTime, endTime, departId); Long comfortTotal = rpcApplyMapper.countSubOneComfortPersonNumber(beginTime, endTime, departId);
// Integer comfortTotal = dataRightsComfortService.countComfortPersonNumber(beginTime, endTime); // 抚慰人数 // Integer comfortTotal = dataRightsComfortService.countComfortPersonNumber(beginTime, endTime); // 抚慰人数
Integer hitTotal = dataRightsComfortService.countSubOneHitPersonNumber(beginTime, endTime, departId); // 打击处理人数
Double comfortMoney = rpcApplyMapper.countSubOneComfortMoney(beginTime, endTime, departId); Double comfortMoney = rpcApplyMapper.countSubOneComfortMoney(beginTime, endTime, departId);
// Double comfortMoney = dataRightsComfortService.countComfortMoney(beginTime, endTime); // 抚慰金额 // Double comfortMoney = dataRightsComfortService.countComfortMoney(beginTime, endTime); // 抚慰金额
Integer hitTotal = dataRightsComfortService.countSubOneHitPersonNumber(beginTime, endTime, departId); // 打击处理人数
ComfortCountVO comfortOverview = new ComfortCountVO(); ComfortCountVO comfortOverview = new ComfortCountVO();
//抚慰人数
comfortOverview.setComfortTotal(comfortTotal); comfortOverview.setComfortTotal(comfortTotal);
//打击处理人数
comfortOverview.setHitTotal(hitTotal); comfortOverview.setHitTotal(hitTotal);
//抚慰人数
comfortOverview.setComfortMoney(comfortMoney); comfortOverview.setComfortMoney(comfortMoney);
comfortOverview.setComfortCaseTotal(0); //维权案件总数
comfortOverview.setHurtTotal(0); comfortOverview.setComfortCaseTotal(list.stream().map(RpcApply::getCaseNumber).collect(Collectors.toSet()).size());
JSONObject data = new JSONObject().fluentPut("comfortOverview", comfortOverview); //受侵害人数
comfortOverview.setHurtTotal( rpcApplyMapper.selectVictimNumberByOrg(beginTime,endTime, String.valueOf(departId)));
// 维权案件情况 - 派出所
List<BarItem> pcsList = rpcApplyMapper.selectSubPcsProtectRightsBarList(beginTime, endTime, departId,10);
// 维权案件情况 - 大队
List<BarItem> dbList = rpcApplyMapper.selectSubDdProtectRightsBarList(beginTime, endTime, departId,10);
JSONObject data = new JSONObject()
.fluentPut("comfortOverview", comfortOverview)
.fluentPut("fxsjRightsRankList",pcsList)
.fluentPut("jsdwRightsRankList",dbList);
return Result.success(data); return Result.success(data);
} }
@ -62,6 +106,7 @@ public class SubOneRightsController {
public Result<JSONObject> getSubOnePoliceHurtSituationAndHurtType(@RequestParam Integer departId, public Result<JSONObject> getSubOnePoliceHurtSituationAndHurtType(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @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);
List<EchartsVo> policeHurtSituationList = rpcApplyMapper.getSubOnePoliceHurtSituation(beginTime, endTime,departId); // 人数情况 List<EchartsVo> policeHurtSituationList = rpcApplyMapper.getSubOnePoliceHurtSituation(beginTime, endTime,departId); // 人数情况
List<EchartsVo> policeHurtTypeList = rpcApplyMapper.getSubOnePoliceHurtType(beginTime, endTime,departId); // 受伤类别 List<EchartsVo> policeHurtTypeList = rpcApplyMapper.getSubOnePoliceHurtType(beginTime, endTime,departId); // 受伤类别
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
@ -75,20 +120,141 @@ public class SubOneRightsController {
public Result<JSONObject> getSubOneCaseAriseSituationRate(@RequestParam Integer departId, public Result<JSONObject> getSubOneCaseAriseSituationRate(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @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);
// 发案环节 // 发案环节
List<EchartsVo> incidentLinkList = rpcApplyMapper.getSubOneIncidentLink(beginTime, endTime,departId); List<EchartsVo> incidentLinkList = rpcApplyMapper.getSubOneIncidentLink(beginTime, endTime,departId);
// 发案警种 // 发案警种
List<EchartsVo> incidentPoliceTypeList = new ArrayList<>();
List<EchartsVo> incidentPoliceList = rpcApplyMapper.getIncidentPolice(beginTime, endTime,departId);
List<SupDictData> supDictDataList = supDictDataService.list(new LambdaQueryWrapper<SupDictData>().eq(SupDictData::getDictType,"personType"));
incidentPoliceList.forEach(s->{
Optional<SupDictData> supDictData = supDictDataList.stream().filter(v->v.getDictValue().equals(s.getName())).findFirst();
supDictData.ifPresent(dictData -> s.setName(dictData.getDictLabel()));
});
// 发案单位 // 发案单位
List<EchartsVo> incidentOrgList = rpcApplyMapper.getSubOneIncidentOrg(beginTime, endTime,departId); List<EchartsVo> incidentOrgList = rpcApplyMapper.getSubOneIncidentOrg(beginTime, endTime,departId);
JSONObject data = new JSONObject() JSONObject data = new JSONObject()
.fluentPut("incidentLinkList", incidentLinkList) .fluentPut("incidentLinkList", incidentLinkList)
.fluentPut("incidentPoliceTypeList", incidentPoliceTypeList) .fluentPut("incidentPoliceTypeList", incidentPoliceList)
.fluentPut("incidentOrgList", incidentOrgList); .fluentPut("incidentOrgList", incidentOrgList);
return Result.success(data); return Result.success(data);
} }
// endregion // endregion
@GetMapping("getComfortMapIcon")
public Result<JSONObject> getComfortMapIcon(@RequestParam Integer departId,@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
Date finalEndTime = DateUtil.endOfDay(endTime);
// 信访数据总数概览
List<ComfortMapIconVo> res = new ArrayList<>();
// 查询所有分县市局
List<CountyStreetDept> countyStreetDepts =countyStreetDeptMapper.getSubOneStreetMap(departId);
for (CountyStreetDept countyStreetDept : countyStreetDepts) {
ComfortMapIconVo iconVo = new ComfortMapIconVo();
iconVo.setName(countyStreetDept.getName());
iconVo.setDepartId(countyStreetDept.getDeptId());
res.add(iconVo);
}
for (ComfortMapIconVo re : res) {
String deptId = re.getDepartId();
List<RpcApply> list = rpcApplyService.list(new LambdaQueryWrapper<RpcApply>()
.between(RpcApply::getCrtTime, beginTime, finalEndTime)
.eq(RpcApply::getSecondDepartId,departId)
.eq(RpcApply::getType, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()));
Set<String> caseNumbers = list.stream().map(RpcApply::getCaseNumber).collect(Collectors.toSet());
// 维权案件总数
re.setRightsNumber(caseNumbers.size());
// 受侵害人数
re.setVictimNumber(rpcApplyMapper.selectVictimNumberByOrg(beginTime,finalEndTime,deptId));
// 打击处理人数
List<String> tortNames = rpcInfringerResultMapper.selectNamesByOrgTime(beginTime, finalEndTime,deptId);
long initialListSize = tortNames.size();
long hitPersonNumber = tortNames.stream()
.filter(s -> s.contains(",")).toList().size();
// 筛选出包含逗号的名称
long nums = tortNames.stream()
.filter(s -> s.contains(","))
.mapToLong(s -> s.split(",").length)
.sum();// 计算所有拆分后数组长度的总和 // 拆分每个名称并计算拆分后的数组长度
if(tortNames.stream().noneMatch(s -> s.contains(","))){
re.setHitPersonNumber(initialListSize );
}else{
re.setHitPersonNumber(initialListSize + nums - hitPersonNumber);
}
//抚慰金额
CompletableFutureUtil.runSyncObject(() -> {
re.setComfortMoney(rpcApplyMapper.selectComfortMoneyBarByOrg(beginTime, finalEndTime, deptId));
});
CompletableFutureUtil.runSyncObject(() -> {
// 抚慰人数
re.setComfortPersonNumber(rpcApplyService.orgCount(beginTime, finalEndTime, RpcApplyTypeEnum.COMFORT.getValue(), deptId));
});
}
JSONObject data = new JSONObject().fluentPut("comfortMapVoList", res);
return Result.success(data);
}
// endregion
//打处情况
@GetMapping("getPunishmentSituation")
public Result<JSONObject> getPunishmentSituation(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){
endTime =DateUtil.endOfDay(endTime);
//获取相关案件
List<RpcApply> list= rpcApplyMapper.selectList(new LambdaQueryWrapper<RpcApply>()
.between(RpcApply::getCrtTime, beginTime, endTime)
.eq(RpcApply::getSecondDepartId,departId)
.eq(RpcApply::getType, RpcApplyTypeEnum.RIGHTS_PROTECTION.getValue()));
//案件分组
Map<String, List<RpcApply>> collect = list.stream()
.filter(s-> StrUtil.isNotEmpty(s.getInfringerHandle()) )
.collect(Collectors.groupingBy(RpcApply::getInfringerHandle));
List<PieItem> pieItems = collect.keySet().stream().map(name -> {
return new PieItem(name, collect.get(name).size());
}).toList();
JSONObject data = new JSONObject().fluentPut("PunishmentSituation",pieItems);
return Result.success(data);
}
// 抚慰情况
@GetMapping("/getComfortSituation")
public Result<JSONObject> getComfortSituation(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
endTime = DateUtil.endOfDay(endTime);
List<PieItem> comfortSituationList = rpcApplyMapper.selectSubComfortSituation(beginTime, endTime,departId);
JSONObject data = new JSONObject().fluentPut("comfortSituationList", comfortSituationList);
return Result.success(data);
}
//案件类别占比
@GetMapping("getSubCaseType")
public Result<JSONObject> getSubCaseType(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){
endTime = DateUtil.endOfDay(endTime);
//案件类别 - 刑事
List<EchartsVo> crownCaseBar =rpcApplyMapper.selectSubCaseData(beginTime, endTime,"1",departId);
//案件类别 - 行政
List<EchartsVo> administrativeCase = rpcApplyMapper.selectSubCaseData( beginTime, endTime,"2",departId);
JSONObject data = new JSONObject().fluentPut("crownCaseBar",crownCaseBar).fluentPut("administrativeCase",administrativeCase);
return Result.success(data);
}
} }

112
src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java

@ -1,12 +1,26 @@
package com.biutag.supervision.controller.subdatav; package com.biutag.supervision.controller.subdatav;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.mapper.CountyStreetDeptMapper;
import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.CountyStreetDept;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.entity.News; import com.biutag.supervision.pojo.entity.News;
import com.biutag.supervision.pojo.vo.*; import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.CountyStreetDeptService;
import com.biutag.supervision.service.NegativeBlameService;
import com.biutag.supervision.service.NewsService; import com.biutag.supervision.service.NewsService;
import com.biutag.supervision.service.SubOneSupervisionNotifyService; import com.biutag.supervision.service.SubOneSupervisionNotifyService;
import com.biutag.supervision.util.CompletableUtils.CompletableFutureUtil;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -18,10 +32,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.CompletableFuture;
import static com.biutag.supervision.constants.WorkDynamicConstants.DCGZDT; import static com.biutag.supervision.constants.WorkDynamicConstants.DCGZDT;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
/** /**
@ -40,6 +57,8 @@ public class SubOneSupervisionNotifyController {
private final SubOneSupervisionNotifyService subOneSupervisionNotifyService; private final SubOneSupervisionNotifyService subOneSupervisionNotifyService;
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final NewsService newsService; private final NewsService newsService;
private final NegativeBlameService negativeBlameService;
private final CountyStreetDeptMapper countyStreetDeptMapper;
// region 左边 // region 左边
/** /**
@ -102,8 +121,45 @@ public class SubOneSupervisionNotifyController {
public Result<JSONObject> getAllSubOneSupervisionNotifyCount(@RequestParam Integer departId, public Result<JSONObject> getAllSubOneSupervisionNotifyCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SupervisionNotifyOverView overview = negativeMapper.getAllSubOneSupervisionNotifyCount(departId, beginTime, endTime); endTime = DateUtil.endOfDay(endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview);
//, ProblemSourcesEnum.SPDC.getValue() 去除视频督察
//获取时间范围内 属于对应二级单位的数据
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, endTime)
.eq(Negative::getSecondInvolveDepartId,departId)
.in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.XCDC.getValue(), ProblemSourcesEnum.LMGZ.getValue(), ProblemSourcesEnum.ZXDC.getValue())));
SupervisionNotifyOverView overView = new SupervisionNotifyOverView();
//属实的
List<String> negativeIds = negatives.stream().filter(item -> InspectCaseEnum.isItTure(item.getCheckStatus())).map(Negative::getId).toList();
overView.setProblemNumber(negatives.size());
//已办结的
overView.setCompletedNumber(negatives.stream().filter(item -> ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())).count());
//办理中
overView.setProcessingNumber(negatives.size() - overView.getCompletedNumber());
// 办结率
// overView.setCompletedRate(overView.getProblemNumber() == 0 ? 0: NumberUtil.roundHalfEven(NumberUtil.mul(NumberUtil.div(overView.getCompletedNumber(), overView.getProblemNumber()), 100), 0).doubleValue());
CompletableFuture.allOf(
CompletableFutureUtil.runSyncObject(() -> {
//问责人数
long personNumber = negativeIds.isEmpty() ? 0 : negativeBlameService.count(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, negativeIds)
.eq(NegativeBlame::getType, "personal")
.ne(NegativeBlame::getHandleResultName, "不予追责")
.isNotNull(NegativeBlame::getHandleResultName)
.ne(NegativeBlame::getHandleResultName, ""));
overView.setPersonNumber(personNumber);
}),
CompletableFutureUtil.runSyncObject(() -> {
//问责单位
long departNumber = negativeIds.isEmpty() ? 0 : negativeBlameService.count(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, negativeIds)
.eq(NegativeBlame::getType, "department")
.ne(NegativeBlame::getHandleResultName, "不予追责")
.isNotNull(NegativeBlame::getHandleResultName)
.ne(NegativeBlame::getHandleResultName, ""));
overView.setDepartNumber(departNumber);
})
).join();
JSONObject data = new JSONObject().fluentPut("overview", overView);
return Result.success(data); return Result.success(data);
} }
@ -119,9 +175,53 @@ public class SubOneSupervisionNotifyController {
public Result<JSONObject> getSubOneSupervisionMap(@RequestParam Integer departId, public Result<JSONObject> getSubOneSupervisionMap(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
//地图数据
List<SuperviseMapIconVo> superviseTempMapVoList = negativeMapper.getSubOneSupervisionMapIcon(beginTime, endTime, departId); List<CountyStreetDept> streetDepts = countyStreetDeptMapper.selectList(new LambdaQueryWrapper<CountyStreetDept>().eq(CountyStreetDept::getDeptPid,departId));
JSONObject data = new JSONObject().fluentPut("superviseTempMapVoList", superviseTempMapVoList); List<SuperviseMapIconVo> overViews = new ArrayList<>();
if(ArrayUtil.isNotEmpty(streetDepts)){
streetDepts.forEach(s->{
SuperviseMapIconVo superviseMapIconVo =new SuperviseMapIconVo();
superviseMapIconVo.setName(s.getName());
superviseMapIconVo.setDepartId(s.getDeptId());
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>().between(Negative::getCrtTime, beginTime, endTime)
.eq(Negative::getThreeInvolveDepartId,s.getDeptId())
.in(Negative::getProblemSourcesCode, List.of(ProblemSourcesEnum.XCDC.getValue(), ProblemSourcesEnum.LMGZ.getValue(), ProblemSourcesEnum.ZXDC.getValue())));
if(!negatives.isEmpty()){
List<String> negativeIds = negatives.stream().filter(item -> InspectCaseEnum.isItTure(item.getCheckStatus())).map(Negative::getId).toList();
superviseMapIconVo.setTotalPro(String.valueOf(negatives.size()));
//已办结的
superviseMapIconVo.setCompletedNumber(negatives.stream().filter(item ->"1".equals(item.getIsRectifyCode())).count());
//办理中
superviseMapIconVo.setProcessingNumber(negatives.stream().filter(item ->"0".equals(item.getIsRectifyCode())).count());
// 办结率
// superviseMapIconVo.setCompletedRate(superviseMapIconVo.getProblemNumber() == 0 ? 0: NumberUtil.roundHalfEven(NumberUtil.mul(NumberUtil.div(superviseMapIconVo.getCompletedNumber(), superviseMapIconVo.getProblemNumber()), 100), 0).doubleValue());
//问责人数 、问责单位数
CompletableFuture.allOf(
CompletableFutureUtil.runSyncObject(() -> {
//问责人数
long personNumber = negativeIds.isEmpty() ? 0 : negativeBlameService.count(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, negativeIds)
.eq(NegativeBlame::getType, "personal")
.ne(NegativeBlame::getHandleResultName, "不予追责")
.isNotNull(NegativeBlame::getHandleResultName)
.ne(NegativeBlame::getHandleResultName, ""));
superviseMapIconVo.setPersonNum(String.valueOf(personNumber));
}),
CompletableFutureUtil.runSyncObject(() -> {
//问责单位
long departNumber = negativeIds.isEmpty() ? 0 : negativeBlameService.count(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, negativeIds)
.eq(NegativeBlame::getType, "department")
.ne(NegativeBlame::getHandleResultName, "不予追责")
.isNotNull(NegativeBlame::getHandleResultName)
.ne(NegativeBlame::getHandleResultName, ""));
superviseMapIconVo.setRelationOrg(String.valueOf(departNumber));
})
).join();
overViews.add(superviseMapIconVo);
}
});
}
JSONObject data = new JSONObject().fluentPut("superviseTempMapVoList", overViews);
return Result.success(data); return Result.success(data);
} }
@ -137,7 +237,7 @@ public class SubOneSupervisionNotifyController {
@GetMapping("/getSubOneSupervisionTrend") @GetMapping("/getSubOneSupervisionTrend")
public Result<JSONObject> getSubOneSupervisionTrend(@RequestParam Integer departId, public Result<JSONObject> getSubOneSupervisionTrend(@RequestParam Integer departId,
@RequestParam String year) { @RequestParam String year) {
List<EchartsVo> supervisionTrend = negativeMapper.getSubOneTrend(departId.toString(), year, "13", "15"); List<EchartsVo> supervisionTrend = negativeMapper.getSubOneTrend(departId.toString(), year, XCDC.getValue(), ZXDC.getValue(),LMGZ.getValue());
JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend); JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend);
return Result.success(data); return Result.success(data);
} }

11
src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java

@ -79,6 +79,7 @@ public class SubOneVideoSuperviseController {
public Result<JSONObject> getSubOneAllVideoSuperviseCount(@RequestParam Integer departId, public Result<JSONObject> getSubOneAllVideoSuperviseCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @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);
VideoSuperviseCountVo overview = subOneVideoSuperviseService.getSubOneAllVideoSuperviseCount(beginTime, DateUtil.endOfDay(endTime), departId); VideoSuperviseCountVo overview = subOneVideoSuperviseService.getSubOneAllVideoSuperviseCount(beginTime, DateUtil.endOfDay(endTime), departId);
JSONObject data = new JSONObject().fluentPut("overview", overview); JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data); return Result.success(data);
@ -98,10 +99,18 @@ public class SubOneVideoSuperviseController {
public Result<JSONObject> getSubOneVideoSuperviseMap(@RequestParam Integer departId, public Result<JSONObject> getSubOneVideoSuperviseMap(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @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);
// 地图数据 // 地图数据
List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getSubOneVideoSuperviseMapIconInfo(beginTime, endTime, departId)). List<VideoSuperviseMapIconVo> videoSuperviseMapIconVoList = Optional.ofNullable(negativeMapper.getSubOneVideoSuperviseMapIconInfo(beginTime, endTime, departId)).
orElseGet(ArrayList::new); orElseGet(ArrayList::new);
List<EchartsVo> list =negativeMapper.selectSubOneRelativePer(beginTime,endTime,departId);
videoSuperviseMapIconVoList.forEach(s->{
List<EchartsVo> echartsVoList= list.stream().filter(b->b.getName().contains(s.getDepartId())).toList();
if(!echartsVoList.isEmpty()){
int relativePer = echartsVoList.get(0).getValue();
s.setRelativePer(relativePer);
}
});
JSONObject data = new JSONObject().fluentPut("videoSuperviseMapIconVoList", videoSuperviseMapIconVoList); JSONObject data = new JSONObject().fluentPut("videoSuperviseMapIconVoList", videoSuperviseMapIconVoList);
return Result.success(data); return Result.success(data);
} }

6
src/main/java/com/biutag/supervision/mapper/DataPetition12337Mapper.java

@ -44,8 +44,8 @@ public interface DataPetition12337Mapper extends BaseMapper<DataPetition12337> {
"IFNULL(COUNT(sd.pid=#{departId}), 0) AS `value` " + "IFNULL(COUNT(sd.pid=#{departId}), 0) AS `value` " +
"FROM sup_month_monthname m " + "FROM sup_month_monthname m " +
"LEFT JOIN data_petition_12337 dpc " + "LEFT JOIN data_petition_12337 dpc " +
"ON DATE_FORMAT(dpc.discover_time, '%m') = m.month " + "ON DATE_FORMAT(dpc.create_time, '%m') = m.month " +
"AND YEAR(dpc.discover_time) = #{year} " + "AND YEAR(dpc.create_time) = #{year} " +
"LEFT JOIN sup_depart sd " + "LEFT JOIN sup_depart sd " +
"ON dpc.third_depart_id = sd.id " + "ON dpc.third_depart_id = sd.id " +
"AND sd.pid = #{departId} " + "AND sd.pid = #{departId} " +
@ -54,7 +54,7 @@ public interface DataPetition12337Mapper extends BaseMapper<DataPetition12337> {
List<EchartsVo> getSubOneMailTrend12337(Integer year, Integer departId); List<EchartsVo> getSubOneMailTrend12337(Integer year, Integer departId);
@Select("select count(*) from data_petition_12337 " + @Select("select count(*) from data_petition_12337 " +
"where discover_time between #{beginTime} and #{endTime} " + "where create_time between #{beginTime} and #{endTime} " +
"and third_depart_id=#{departId}") "and third_depart_id=#{departId}")
Long select12337PoliceMailBySourceCode(Date beginTime, Date endTime, Integer departId); Long select12337PoliceMailBySourceCode(Date beginTime, Date endTime, Integer departId);

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

@ -281,8 +281,8 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"IFNULL(COUNT(sd.pid=#{departId}), 0) AS `value` " + "IFNULL(COUNT(sd.pid=#{departId}), 0) AS `value` " +
"FROM sup_month_monthname m " + "FROM sup_month_monthname m " +
"LEFT JOIN data_petition_complaint dpc " + "LEFT JOIN data_petition_complaint dpc " +
"ON DATE_FORMAT(dpc.discovery_time, '%m') = m.month " + "ON DATE_FORMAT(dpc.create_time, '%m') = m.month " +
"AND YEAR(dpc.discovery_time) = #{year} " + "AND YEAR(dpc.create_time) = #{year} " +
"AND dpc.problem_sources_code = #{problemSourceCode} " + "AND dpc.problem_sources_code = #{problemSourceCode} " +
"LEFT JOIN sup_depart sd " + "LEFT JOIN sup_depart sd " +
"ON dpc.third_depart_id = sd.id " + "ON dpc.third_depart_id = sd.id " +
@ -373,7 +373,7 @@ public interface DataPetitionComplaintMapper extends BaseMapper<DataPetitionComp
"from data_petition_complaint dpc " + "from data_petition_complaint dpc " +
"where problem_sources_code=#{problemSourcesCode} " + "where problem_sources_code=#{problemSourcesCode} " +
"and dpc.third_depart_id=#{departId} " + "and dpc.third_depart_id=#{departId} " +
"and discovery_time BETWEEN #{beginTime} AND #{endTime} ") "and create_time BETWEEN #{beginTime} AND #{endTime} ")
Long selectPoliceMailBySourceCode(Date beginTime, Date endTime, String problemSourcesCode, String departId); Long selectPoliceMailBySourceCode(Date beginTime, Date endTime, String problemSourcesCode, String departId);
Page<DataPetitionComplaintNegativeVo> queryBooks(@Param("page") Page<DataPetitionComplaint> page, @Param(Constants.WRAPPER) QueryWrapper<DataPetitionComplaint> queryWrapper); Page<DataPetitionComplaintNegativeVo> queryBooks(@Param("page") Page<DataPetitionComplaint> page, @Param(Constants.WRAPPER) QueryWrapper<DataPetitionComplaint> queryWrapper);

7
src/main/java/com/biutag/supervision/mapper/NegativeBlameMapper.java

@ -59,4 +59,11 @@ public interface NegativeBlameMapper extends BaseMapper<NegativeBlame> {
" and a.crtTime BETWEEN #{beginTime} AND #{endTime} GROUP BY resultName" " and a.crtTime BETWEEN #{beginTime} AND #{endTime} GROUP BY resultName"
) )
List<BlameStats> selectBlameStatsCount(Date beginTime, Date endTime); List<BlameStats> selectBlameStatsCount(Date beginTime, Date endTime);
/**
* 二级大屏 - 追责问责情况
* */
@Select("select a.handleResultName as resultName, count(*) as resultCount FROM `negative_blame` as a LEFT JOIN negative as b on a.negativeId = b.id where a.handleResultName is NOT NULL and a.handleResultCode is NOT NULL and b.problemSourcesCode in (21,22,23,24,25) " +
" and a.crtTime BETWEEN #{beginTime} AND #{endTime} and b.second_involve_depart_id = #{deptId} GROUP BY resultName"
)
List<BlameStats> selectSubOneBlameStatsCount(Date beginTime, Date endTime,Integer deptId);
} }

86
src/main/java/com/biutag/supervision/mapper/NegativeMapper.java

@ -202,7 +202,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completedRate " +
"FROM sup_depart sd " + "FROM sup_depart sd " +
"LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " + "LEFT JOIN negative ng ON ng.second_involve_depart_id=sd.id " +
"AND ng.problemSourcesCode IN (13, 15)" + "AND ng.problemSourcesCode IN (13,14, 15)" +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE sd.statistics_group_id=3 " + "WHERE sd.statistics_group_id=3 " +
@ -308,10 +308,26 @@ public interface NegativeMapper extends BaseMapper<Negative> {
" WHERE " + " WHERE " +
" ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + " ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
" and sup.statistics_group_id = 3 " + " and sup.statistics_group_id = 3 " +
" and ng.problemSourcesCode = 16 "+
" GROUP BY sup.id " " GROUP BY sup.id "
) )
List<EchartsVo> selectRelativePer(Date beginTime, Date endTime); List<EchartsVo> selectRelativePer(Date beginTime, Date endTime);
@Select("SELECT " +
"sup.id as `name`, " +
"COUNT(*) as value " +
"from negative_problem_relation npr " +
"LEFT JOIN negative ng on npr.negativeId = ng.id " +
"LEFT JOIN sup_depart sup on sup.id = ng.three_involve_depart_id " +
"WHERE " +
"ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"and sup.pid = #{deptId} " +
"and sup.statistics_group_id = 10 " +
"and ng.problemSourcesCode = 16 " +
"GROUP BY sup.id")
List<EchartsVo> selectSubOneRelativePer(Date beginTime,Date endTime,Integer deptId);
// endregion // endregion
// region 案件核查大屏 // region 案件核查大屏
@ -327,7 +343,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"ORDER BY `value` DESC;") "ORDER BY `value` DESC;")
List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId); List<OrganizeProblemRankVo> getCaseVerificationRank(Date beginTime, Date endTime, int groupId);
// 案件核查大屏 -- 中央数据
@Select("SELECT " + @Select("SELECT " +
"COUNT( ng.id ) AS confirmed, " + "COUNT( ng.id ) AS confirmed, " +
"COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) AS dealCasePro, " + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) AS dealCasePro, " +
@ -579,7 +595,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND sd.statistics_group_id=10 " + "AND sd.statistics_group_id=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY value DESC;") "ORDER BY denominator DESC;")
List<RankVo> getPoliceChangedRankList(Integer departId, Date beginTime, Date endTime); List<RankVo> getPoliceChangedRankList(Integer departId, Date beginTime, Date endTime);
@Select("SELECT " + @Select("SELECT " +
@ -595,7 +611,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND sd.statistics_group_id!=10 " + "AND sd.statistics_group_id!=10 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY sd.short_name " + "GROUP BY sd.short_name " +
"ORDER BY value DESC;") "ORDER BY denominator DESC;")
List<RankVo> getTeamChangedRankList(Integer departId, Date beginTime, Date endTime); List<RankVo> getTeamChangedRankList(Integer departId, Date beginTime, Date endTime);
@Select("SELECT sd.short_name as label, " + @Select("SELECT sd.short_name as label, " +
@ -768,16 +784,14 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer departId, Integer businessType); List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer departId, Integer businessType);
@Select("SELECT count(DISTINCT ng.id) AS total, " + @Select("SELECT count(DISTINCT ng.id) AS total, " +
"COUNT( DISTINCT IF(ng.checkStatus <> 3, ng.id, NULL) ) AS confirmed, " + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2), ng.id, NULL) ) AS dealCasePro, " +
"COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameId, NULL) ) AS dealCasePro, " + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishPre, " +
"COUNT( DISTINCT nb.blameName ) AS punishPre, " + "COUNT( DISTINCT IF(ng.checkStatus IN (1, 2) && nb.type = 'department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL) ) AS punishOrg " +
"COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id=#{departId} " +
"AND ng.problemSourcesCode in (17, 18, 19, 20); ") "AND ng.problemSourcesCode in (17, 18, 19, 20)")
CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId); CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " + @Select("SELECT " +
@ -857,10 +871,10 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"csd.dept_pid, " + "csd.dept_pid, " +
"csd.dept_id AS departId, " + "csd.dept_id AS departId, " +
"COUNT( DISTINCT ng.id) AS discoverProblem, " + "COUNT( DISTINCT ng.id) AS discoverProblem, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changedProblem, " + "COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completionProblem, " +
"COUNT( DISTINCT ng.involveDepartId) AS relativeOrg, " + "COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT( DISTINCT nb.blameName ) AS relativePer, " + "COUNT( DISTINCT nb.blameName ) AS relativePer, " +
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id)*100, 1 ),0) AS changedRate " + "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id)*100, 1 ),0) AS completionRate " +
"FROM county_street_dept csd " + "FROM county_street_dept csd " +
"LEFT JOIN negative ng ON csd.dept_id=ng.three_involve_depart_id " + "LEFT JOIN negative ng ON csd.dept_id=ng.three_involve_depart_id " +
"AND checkStatus <>3 " + "AND checkStatus <>3 " +
@ -872,28 +886,30 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<VideoSuperviseMapIconVo> getSubOneVideoSuperviseMapIconInfo(Date beginTime, Date endTime, Integer departId); List<VideoSuperviseMapIconVo> getSubOneVideoSuperviseMapIconInfo(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"csd.`name` AS `name`, " +
"csd.dept_name AS policeName, " +
"csd.dept_pid, " + @Select("SELECT " +
"csd.dept_id AS departId, " + "csd.`name` AS `name`, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " + "csd.dept_name AS policeName, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=13, ng.id, NULL) ) AS xc, " + "csd.dept_pid, " +
"COUNT( DISTINCT IF(ng.problemSourcesCode=15, ng.id, NULL) ) AS zx, " + "csd.dept_id AS departId, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=0, ng.id, NULL) ) AS changing, " + "COUNT(DISTINCT IF(ng.isRectifyCode = 0,ng.id,null)) as processingNumber, " +
"COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) AS changed , " + "COUNT(DISTINCT IF(ng.isRectifyCode = 1,ng.id,null)) as completeNumber, " +
"COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " + "COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " +
"COUNT( DISTINCT nb.blameIdCode ) AS personNum, " + "COUNT( DISTINCT ng.id ) AS problemNumber, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS changedRate " + "IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completeRate " +
"FROM county_street_dept csd " + "FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " + "LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"AND ng.problemSourcesCode IN (13, 15) " + "WHERE ng.problemSourcesCode in (13,14,15) " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "and ng.crtTime BETWEEN '2025-01-01 00:00:00.0' AND '2025-06-11 23:59:59.999' " +
"AND ng.second_involve_depart_id=#{departId} " + "AND ng.second_involve_depart_id= #{departId} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " + "and ng.checkStatus in (1,2) " +
"GROUP BY csd.dept_name " + "GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} ") "HAVING csd.dept_pid=#{departId} "
List<SuperviseMapIconVo> getSubOneSupervisionMapIcon(Date beginTime, Date endTime, Integer departId); )
List<SuperviseMapIconVo> getSubOneSupervisionMapIcon(Date beginTime,Date endTime,Integer departId);
List<Negative> selectListBySampleId(@Param("args") List<Integer> sampleIdList); List<Negative> selectListBySampleId(@Param("args") List<Integer> sampleIdList);

60
src/main/java/com/biutag/supervision/mapper/RpcApplyMapper.java

@ -28,6 +28,15 @@ public interface RpcApplyMapper extends BaseMapper<RpcApply> {
"GROUP BY c.job") "GROUP BY c.job")
List<PieItem> selectComfortSituation(Date beginTime, Date endTime); List<PieItem> selectComfortSituation(Date beginTime, Date endTime);
@Select("SELECT c.job name, COUNT(c.job) value FROM sup_police c JOIN " +
"(SELECT a.emp_no FROM rpc_apply_person a LEFT JOIN rpc_apply b ON a.rpc_id = b.rpc_id " +
"WHERE b.crt_time BETWEEN #{beginTime} AND #{endTime} AND b.type = 2 and b.second_depart_id = #{departId} ) d on c.emp_no = d.emp_no " +
"GROUP BY c.job")
List<PieItem> selectSubComfortSituation(Date beginTime, Date endTime,Integer departId);
/**
* 一级 获取不同案件类型下的数据
* */
@Select("SELECT " + @Select("SELECT " +
" ra.case_category as name,COUNT(*) as value" + " ra.case_category as name,COUNT(*) as value" +
" from rpc_apply as ra LEFT JOIN sup_depart sdp on ra.second_depart_id = sdp.id " + " from rpc_apply as ra LEFT JOIN sup_depart sdp on ra.second_depart_id = sdp.id " +
@ -36,7 +45,18 @@ public interface RpcApplyMapper extends BaseMapper<RpcApply> {
" and ra.case_category is NOT NULL GROUP BY ra.case_category " " and ra.case_category is NOT NULL GROUP BY ra.case_category "
) )
List<EchartsVo> selectCaseData(Date beginTime, Date endTime,String type); List<EchartsVo> selectCaseData(Date beginTime, Date endTime,String type);
/**
* 二级 获取不同案件类型下的数据
* */
@Select(" SELECT " +
" ra.case_category as name,COUNT(*) as value" +
" from rpc_apply as ra LEFT JOIN sup_depart sdp on ra.second_depart_id = sdp.id " +
" WHERE ra.case_type = #{type} " +
" and ra.crt_time between #{beginTime} and #{endTime} " +
" and ra.second_depart_id = #{departId} "+
" and ra.case_category is NOT NULL GROUP BY ra.case_category "
)
List<EchartsVo> selectSubCaseData(Date beginTime, Date endTime,String type,Integer departId);
/** /**
* 获取受侵害人数 * 获取受侵害人数
* */ * */
@ -96,6 +116,18 @@ public interface RpcApplyMapper extends BaseMapper<RpcApply> {
" GROUP BY person_type HAVING name is NOT NULL") " GROUP BY person_type HAVING name is NOT NULL")
List<EchartsVo> getIncidentPolice(Date beginTime, Date endTime); List<EchartsVo> getIncidentPolice(Date beginTime, Date endTime);
@Select("SELECT person_type as name,COUNT(*) from rpc_apply a " +
"LEFT JOIN (SELECT emp_no,person_type from sup_police WHERE del = 0) as b " +
"ON a.input_emp_no = b.emp_no " +
"WHERE a.crt_time BETWEEN #{beginTime} and #{endTime} and a.second_depart_id = #{deptId} " +
" GROUP BY person_type HAVING name is NOT NULL")
List<EchartsVo> getIncidentPolice(Date beginTime, Date endTime,Integer deptId);
@Select(" select sdp.short_name as name ,COUNT(*) as value from rpc_apply ra " + @Select(" select sdp.short_name as name ,COUNT(*) as value from rpc_apply ra " +
" LEFT JOIN sup_depart sdp on ra.second_depart_id = sdp.id " + " LEFT JOIN sup_depart sdp on ra.second_depart_id = sdp.id " +
" WHERE sdp.statistics_group_id = 3 " + " WHERE sdp.statistics_group_id = 3 " +
@ -211,6 +243,32 @@ public interface RpcApplyMapper extends BaseMapper<RpcApply> {
" and ra.crt_time BETWEEN #{beginTime} and #{endTime} " + " and ra.crt_time BETWEEN #{beginTime} and #{endTime} " +
" GROUP BY sdp.short_name order by value desc ") " GROUP BY sdp.short_name order by value desc ")
List<BarItem> selectProtectRightsBarList(Date beginTime, Date endTime, Integer departGroupId); List<BarItem> selectProtectRightsBarList(Date beginTime, Date endTime, Integer departGroupId);
/**
* 按事发时间进行筛选
* 维权案件情况派出所-二级大屏
* */
@Select(" SELECT sdp.short_name , COUNT(*) as value from rpc_apply ra " +
" left join sup_depart sdp on ra.depart_id = sdp.id " +
" where sdp.pid = #{departId} " +
" and ra.type =1 and sdp.statistics_group_id = #{departGroupId} " +
" and ra.crt_time BETWEEN #{beginTime} AND #{endTime} " +
" GROUP BY sdp.short_name order by value desc")
List<BarItem> selectSubPcsProtectRightsBarList(Date beginTime, Date endTime, Integer departId, Integer departGroupId);
/**
* 按事发时间进行筛选
* 维权案件情况大队-二级大屏
* */
@Select(" SELECT sdp.short_name , COUNT(*) as value from rpc_apply ra " +
" left join sup_depart sdp on ra.depart_id = sdp.id " +
" where sdp.pid = #{departId} " +
" and ra.type =1 and sdp.statistics_group_id != #{departGroupId} " +
" and ra.crt_time BETWEEN #{beginTime} AND #{endTime} " +
" GROUP BY sdp.short_name order by value desc")
List<BarItem> selectSubDdProtectRightsBarList(Date beginTime, Date endTime, Integer departId, Integer departGroupId);
//民辅警受伤表 //民辅警受伤表
@Select( @Select(
"SELECT person_type as name, COUNT(*) as val FROM rpc_apply_person as a " + "SELECT person_type as name, COUNT(*) as val FROM rpc_apply_person as a " +

7
src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java

@ -14,8 +14,15 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
public class DayTimeSuperviseVo { public class DayTimeSuperviseVo {
private Integer proTotal; private Integer proTotal;
private Long processingNumber; private Long processingNumber;
private Long completedNumber; private Long completedNumber;
private Double completedRate; private Double completedRate;
private Long changing;
private Long changed;
private Long correctionRate;
} }

24
src/main/java/com/biutag/supervision/service/DataMailService.java

@ -179,35 +179,39 @@ public class DataMailService extends ServiceImpl<DataPetitionComplaintMapper, Da
public MailOverviewVo getSubOneAllMailCount(Date beginTime, Date endTime, Integer departId) { public MailOverviewVo getSubOneAllMailCount(Date beginTime, Date endTime, Integer departId) {
MailOverviewVo temp = new MailOverviewVo(); MailOverviewVo temp = new MailOverviewVo();
// 国家信访
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("problem_sources_code", 21);
countryQueryWrapper.eq("second_depart_id", departId);
countryQueryWrapper.between("discovery_time", beginTime, endTime);
Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper);
// 公安信访 // 公安信访
QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>(); QueryWrapper<DataPetitionComplaint> policeQueryWrapper = new QueryWrapper<>();
policeQueryWrapper.eq("problem_sources_code", 22); policeQueryWrapper.eq("problem_sources_code", 22);
policeQueryWrapper.eq("second_depart_id", departId); policeQueryWrapper.eq("second_depart_id", departId);
policeQueryWrapper.between("discovery_time", beginTime, endTime); policeQueryWrapper.between("create_time", beginTime, endTime);
Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper); Long policeMail = dataPetitionComplaintMapper.selectCount(policeQueryWrapper);
System.out.println("公安部信访数量:" + policeMail); System.out.println("公安部信访数量:" + policeMail);
// 12337信访 // 12337信访
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>(); QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.eq("second_depart_id", departId); queryWrapper12337.eq("second_depart_id", departId);
queryWrapper12337.between("discover_time", beginTime, endTime); queryWrapper12337.between("create_time", beginTime, endTime);
Long numberMail = dataPetition12337Mapper.selectCount(queryWrapper12337); Long numberMail = dataPetition12337Mapper.selectCount(queryWrapper12337);
temp.setNumberMail(numberMail); temp.setNumberMail(numberMail);
// 局长信箱 // 局长信箱
QueryWrapper<Mail> subOneMailQueryWrapper = new QueryWrapper<>(); QueryWrapper<Mail> subOneMailQueryWrapper = new QueryWrapper<>();
String exDepartId = supExternalDepartMapper.getExIdByInId(departId.toString(), "局长信箱"); String exDepartId = supExternalDepartMapper.getExIdByInId(departId.toString(), "局长信箱");
subOneMailQueryWrapper.ne("mail_state", VALID_SIGN); subOneMailQueryWrapper.ne("mail_state", VALID_SIGN);
subOneMailQueryWrapper.eq("second_dept_id", exDepartId); subOneMailQueryWrapper.eq("second_dept_id", exDepartId);
subOneMailQueryWrapper.between("create_time", beginTime, endTime); subOneMailQueryWrapper.between("create_time", beginTime, endTime);
Long manageMail = mailMapper.selectCount(subOneMailQueryWrapper); Long manageMail = mailMapper.selectCount(subOneMailQueryWrapper);
// 国家信访
QueryWrapper<DataPetitionComplaint> countryQueryWrapper = new QueryWrapper<>();
countryQueryWrapper.eq("problem_sources_code", 21);
countryQueryWrapper.eq("second_depart_id", departId);
countryQueryWrapper.between("create_time", beginTime, endTime);
Long countryMail = dataPetitionComplaintMapper.selectCount(countryQueryWrapper);
// 总数 // 总数
Long totalMail = countryMail + policeMail + numberMail; Long totalMail = countryMail + policeMail + numberMail;

6
src/main/resources/mapper/DataPetition12337Mapper.xml

@ -144,7 +144,7 @@
<select id="getMailTrend12337" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getMailTrend12337" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT SELECT
m.monthName AS `name`, m.monthName AS `name`,
IFNULL(COUNT(dpc.discover_time), 0) AS `value` IFNULL(COUNT(dpc.create_time), 0) AS `value`
FROM ( FROM (
SELECT '01' AS month, '1月' AS monthName UNION ALL SELECT '01' AS month, '1月' AS monthName UNION ALL
SELECT '02', '2月' UNION ALL SELECT '02', '2月' UNION ALL
@ -160,8 +160,8 @@
SELECT '12', '12月' SELECT '12', '12月'
) m ) m
LEFT JOIN LEFT JOIN
data_petition_12337 dpc on DATE_FORMAT(dpc.discover_time, '%m')=m.month data_petition_12337 dpc on DATE_FORMAT(dpc.create_time, '%m')=m.month
AND YEAR(dpc.discover_time)=#{year} AND YEAR(dpc.create_time)=#{year}
GROUP BY m.monthName GROUP BY m.monthName
ORDER BY m.month ASC; ORDER BY m.month ASC;
</select> </select>

6
src/main/resources/mapper/SupTaskProblemMapper.xml

@ -29,11 +29,11 @@
<!-- 信访投诉大屏问题趋势 --> <!-- 信访投诉大屏问题趋势 -->
<select id="getMailTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo"> <select id="getMailTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, SELECT m.month_name AS `name`,
IFNULL(COUNT(dpc.discovery_time), 0) AS `value` IFNULL(COUNT(dpc.create_time), 0) AS `value`
FROM sup_month_monthname m FROM sup_month_monthname m
LEFT JOIN LEFT JOIN
data_petition_complaint dpc on DATE_FORMAT(dpc.discovery_time, '%m') = m.month data_petition_complaint dpc on DATE_FORMAT(dpc.create_time, '%m') = m.month
AND YEAR(dpc.discovery_time) = #{year} AND YEAR(dpc.create_time) = #{year}
AND dpc.problem_sources_code = #{type} AND dpc.problem_sources_code = #{type}
GROUP BY m.month_name GROUP BY m.month_name
ORDER BY m.month ASC; ORDER BY m.month ASC;

Loading…
Cancel
Save