Browse Source

fix--案件核查大屏重构

master
parent
commit
fd57cbd61c
  1. 12
      src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java
  2. 139
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java
  3. 9
      src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java
  4. 6
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  5. 36
      src/main/java/com/biutag/supervision/pojo/vo/CaseVerificationMapVo.java
  6. 8
      src/main/java/com/biutag/supervision/repository/supdepart/SupDepartResourceService.java
  7. 35
      src/main/java/com/biutag/supervision/service/datav/DatavService.java
  8. 341
      src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java

12
src/main/java/com/biutag/supervision/controller/datav/DataVCaseVerifController.java

@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.A12389; import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
/** /**
* @author wxc * @author wxc
@ -85,13 +85,14 @@ public class DataVCaseVerifController {
@Operation(summary = "查处问题趋势") @Operation(summary = "查处问题趋势")
@GetMapping("/getCaseVerificationTrend") @GetMapping("/getCaseVerificationTrend")
public Result<JSONObject> getCaseVerificationTrend(@RequestParam Integer year) { public Result<JSONObject> getCaseVerificationTrend(@RequestParam Integer year) {
List<EchartsVo> proTrendList = negativeMapper.getTrend(year, A12389.getValue()); List<EchartsVo> proTrendList = negativeMapper.getTrend(year, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList); JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList);
return Result.success(data); return Result.success(data);
} }
// region 右边 // region 右边
@Deprecated
@Operation(summary = "案件来源占比 & 问责处理情况") @Operation(summary = "案件来源占比 & 问责处理情况")
@GetMapping("/getCaseSourceRateAndDealSituation") @GetMapping("/getCaseSourceRateAndDealSituation")
public Result<JSONObject> getCaseSourceRateAndDealSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, public Result<JSONObject> getCaseSourceRateAndDealSituation(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@ -105,6 +106,13 @@ public class DataVCaseVerifController {
return Result.success(data); return Result.success(data);
} }
@Operation(summary = "案件来源占比 & 问责处理情况")
@PostMapping("/getCaseSourceRateAndDealSituation")
public Result<JSONObject> getCaseSourceRateAndDealSituation(@RequestBody DataVRequest request) {
return datavService.getCaseSourceRateAndDealSituation(request);
}
@Operation(summary = "禁闭处理情况") @Operation(summary = "禁闭处理情况")
@GetMapping("/getConfinementBar") @GetMapping("/getConfinementBar")

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

@ -1,34 +1,24 @@
package com.biutag.supervision.controller.subdatav; package com.biutag.supervision.controller.subdatav;
import cn.hutool.core.date.DateUtil; 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.request.subdatav.SubDataVRequest;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.vo.CaseVerificationCountVo;
import com.biutag.supervision.pojo.vo.CaseVerificationMapVo;
import com.biutag.supervision.pojo.vo.EchartsVo; import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import com.biutag.supervision.service.datav.DatavService;
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;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*; import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SJJB;
/** /**
* @Auther: sh * @Auther: sh
@ -43,36 +33,15 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SJJB;
public class SubOneCaseVerifController { public class SubOneCaseVerifController {
private final NegativeMapper negativeMapper; private final NegativeMapper negativeMapper;
private final DataCaseVerifMapper dataCaseVerifMapper; private final DataCaseVerifMapper dataCaseVerifMapper;
private final DatavService datavService;
/**
* 案件核查大屏分县市局排名
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "分县市局排名") @Operation(summary = "分县市局排名")
@GetMapping("/getSubOneCaseVerificationRank") @PostMapping("/getSubOneCaseVerificationRank")
public Result<JSONObject> getSubOneCaseVerificationRank(@RequestParam Integer departId, public Result<JSONObject> getSubOneCaseVerificationRank(@RequestBody SubDataVRequest request) {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, return datavService.getSubOneCaseVerificationRank(request);
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjRankList = negativeMapper.getPoliceCaseVerificationRank(beginTime, endTime, departId);
List<OrganizeProblemRankVo> jsdwRankList = negativeMapper.getTeamCaseVerificationRank(beginTime, endTime, departId);
JSONObject data = new JSONObject()
.fluentPut("fxsjRankList", fxsjRankList)
.fluentPut("jsdwRankList", jsdwRankList);
return Result.success(data);
} }
/**
* 案件问题类型
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "案件问题性质") @Operation(summary = "案件问题性质")
@GetMapping("/getSubOneCaseProblemProperty") @GetMapping("/getSubOneCaseProblemProperty")
public Result<JSONObject> getCaseProblemProperty(@RequestParam Integer departId, public Result<JSONObject> getCaseProblemProperty(@RequestParam Integer departId,
@ -91,64 +60,25 @@ public class SubOneCaseVerifController {
// region 中间 // region 中间
/**
* 案件核查大屏中央数据总览
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "中央数据总览") @Operation(summary = "中央数据总览")
@GetMapping("/getSubOneAllCaseVerificationCount") @PostMapping("/getSubOneAllCaseVerificationCount")
public Result<JSONObject> getSubOneAllCaseVerificationCount(@RequestParam Integer departId, public Result<JSONObject> getSubOneAllCaseVerificationCount(@RequestBody SubDataVRequest request) {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, return datavService.getSubOneAllCaseVerificationCount(request);
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
endTime= DateUtil.endOfDay(endTime);
CaseVerificationCountVo overview = negativeMapper.getSuboOneAllCaseVerificationCount(beginTime, endTime, departId);
long total =dataCaseVerifMapper.selectCount(
new LambdaQueryWrapper<DataCaseVerif>().between(DataCaseVerif::getCreateTime,beginTime,endTime)
.eq(DataCaseVerif::getSecondDepartId,departId)
);
overview.setTotal((int) total);
List<String> list = Arrays.asList( A12389.getValue(),SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
long confirmed = negativeMapper.selectCount(new LambdaQueryWrapper<Negative>()
.eq(Negative::getSecondInvolveDepartId,departId)
.in(Negative::getProblemSourcesCode,list).between(Negative::getCrtTime,beginTime,endTime));
overview.setConfirmed((int) confirmed);
if(total != 0 && confirmed != 0) {
overview.setRate(NumberUtil.div((Number) (confirmed * 100),total ).doubleValue());
}else{
overview.setRate(0.00);
}
JSONObject res = new JSONObject().fluentPut("overview", overview);
return Result.success(res);
} }
/**
* 案件核查大屏地图
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "地图Icon数据") @Operation(summary = "地图Icon数据")
@GetMapping("/getSubOneCaseVerificationMap") @PostMapping("/getSubOneCaseVerificationMap")
// @Cacheable(cacheNames = "Supervision:Screen:SubOneCaseVerificationMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()") // @Cacheable(cacheNames = "Supervision:Screen:SubOneCaseVerificationMap", key = "#departId+'_'+#beginTime.getTime() + '_' +#endTime.getTime()")
public Result<JSONObject> getSubOneCaseVerificationMap(@RequestParam Integer departId, public Result<JSONObject> getSubOneCaseVerificationMap(@RequestBody SubDataVRequest request) {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, return datavService.getSubOneCaseVerificationMap(request);
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<CaseVerificationMapVo> caseVerificationMapList = negativeMapper.getSubOneCaseVerificationMap(beginTime, endTime, departId);
JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList);
return Result.success(res);
} }
/** /**
* 查处问题趋势 * 查处问题趋势
* *
@ -164,10 +94,7 @@ public class SubOneCaseVerifController {
JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList); JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList);
return Result.success(data); return Result.success(data);
} }
// endregion
// region 右边
/** /**
* 案件来源占比 问责处理情况 * 案件来源占比 问责处理情况
@ -188,30 +115,26 @@ public class SubOneCaseVerifController {
.fluentPut("caseSourceRateList", caseSourceRateList) .fluentPut("caseSourceRateList", caseSourceRateList)
.fluentPut("dealSituationPieList", dealSituationPieList); .fluentPut("dealSituationPieList", dealSituationPieList);
return Result.success(data); return Result.success(data);
// return null;
} }
/** @Operation(summary = "案件来源占比 & 问责处理情况")
* 禁闭处理情况 停职处理情况 @PostMapping("/getSubOneCaseSourceRateAndDealSituation")
* public Result<JSONObject> getSubOneCaseSourceRateAndDealSituation(@RequestBody SubDataVRequest request) {
* @param departId 部门id (分县市局ID) return datavService.getSubOneCaseSourceRateAndDealSituation(request);
* @param beginTime 开始时间 }
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "禁闭处理情况 & 停职处理情况") @Operation(summary = "禁闭处理情况 & 停职处理情况")
@GetMapping("/getSubOneConfinementAndPause") @GetMapping("/getSubOneConfinementAndPause")
public Result<JSONObject> getSubOneConfinement(@RequestParam Integer departId, public Result<JSONObject> getSubOneConfinement(@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<EchartsVo> jbclList = negativeMapper.getSubOneConfinementAndPause(beginTime, endTime,departId, 1); // 禁闭 endTime = DateUtil.endOfDay(endTime);
// List<EchartsVo> tzclList = negativeMapper.getSubOneConfinementAndPause(beginTime, endTime, departId,2); // 停职 List<EchartsVo> list =dataCaseVerifMapper.getSubOneConfinement(departId, beginTime,endTime);
// JSONObject data = new JSONObject() JSONObject jsonObject =new JSONObject().fluentPut("confinementList",list);
// .fluentPut("jbclList", jbclList) return Result.success(jsonObject);
// .fluentPut("tzclList", tzclList);
// return Result.success(data);
return Result.success(null);
} }

9
src/main/java/com/biutag/supervision/mapper/DataCaseVerifMapper.java

@ -50,7 +50,7 @@ public interface DataCaseVerifMapper extends BaseMapper<DataCaseVerif> {
" negative_problem_relation npr LEFT JOIN " + " negative_problem_relation npr LEFT JOIN " +
" negative ng on npr.negativeId = ng.id " + " negative ng on npr.negativeId = ng.id " +
" where npr.oneLevelCode = #{code} " + " where npr.oneLevelCode = #{code} " +
" and ng.problemSourcesCode in (17) " + " and ng.problemSourcesCode in (17, 18, 19, 20) " +
" and ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + " and ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
" GROUP BY twoLevelContent ") " GROUP BY twoLevelContent ")
List<EchartsVo> getCaseTypeNumber(Date beginTime, Date endTime, Integer code); List<EchartsVo> getCaseTypeNumber(Date beginTime, Date endTime, Integer code);
@ -75,4 +75,11 @@ public interface DataCaseVerifMapper extends BaseMapper<DataCaseVerif> {
" AND dcv.discovery_time >= #{beginTime} " + " AND dcv.discovery_time >= #{beginTime} " +
" AND dcv.discovery_time < #{endTime}") " AND dcv.discovery_time < #{endTime}")
List<DataCaseVerif> getListData(@Param("secondDepartId") String secondDepartId, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime); List<DataCaseVerif> getListData(@Param("secondDepartId") String secondDepartId, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime);
@Select(" SELECT matter as name, COUNT(*) as value from confinement cf " +
" left join sup_depart sd on cf.org_id = sd.id " +
" WHERE start_time BETWEEN #{beginTime} AND #{endTime} " +
" and sd.id = #{departId} " +
" GROUP BY matter ")
List<EchartsVo> getSubOneConfinement(Integer departId, Date beginTime, Date endTime);
} }

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

@ -245,7 +245,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id " + "INNER JOIN negative_blame nb ON nb.negativeId=ng.id " +
"WHERE handleResultName is NOT NULL " + "WHERE handleResultName is NOT NULL " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode in (17) " + "AND ng.problemSourcesCode in (17, 18, 19, 20) " +
"AND ng.check_status_code in (1, 2, 3) " + "AND ng.check_status_code in (1, 2, 3) " +
"GROUP BY nb.handleResultName") "GROUP BY nb.handleResultName")
List<EchartsVo> getDealSituation(Date beginTime, Date endTime); List<EchartsVo> getDealSituation(Date beginTime, Date endTime);
@ -613,7 +613,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT(*) AS `value` FROM negative ng " + "COUNT(*) AS `value` FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " + "INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " + "INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus!=3 " + "WHERE ng.check_status_code in (1, 2, 3) " +
"AND sd.pid = #{departId} " + "AND sd.pid = #{departId} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " + "AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " + "AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
@ -682,7 +682,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT problemSources AS name, count(ng.id) AS value " + @Select("SELECT problemSources AS name, count(ng.id) AS value " +
"FROM negative ng " + "FROM negative ng " +
"WHERE problemSourcesCode IN (17) AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "WHERE problemSourcesCode IN (17, 18, 19, 20) AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY problemSources") "GROUP BY problemSources")
List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime); List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime);

36
src/main/java/com/biutag/supervision/pojo/vo/CaseVerificationMapVo.java

@ -1,5 +1,6 @@
package com.biutag.supervision.pojo.vo; package com.biutag.supervision.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -13,11 +14,34 @@ import java.io.Serializable;
public class CaseVerificationMapVo implements Serializable { public class CaseVerificationMapVo implements Serializable {
private String name; private String name;
private String departId; private String departId;
private Integer total; // 总案件数
private Integer confirmed; // 已查实案件数 @Schema(description = "案件总数")
private Integer dealCasePro; // 查处理案件数 private Integer total;
private Integer punishPre; // 问责人数
private Integer punishOrg; // 问责单位数 @Schema(description = "已查实案件数")
private Double rate; // 查实率 private Integer confirmed;
@Schema(description = "查处案件数")
private Integer dealCasePro;
@Schema(description = "问责人数")
private Integer punishPre;
@Schema(description = "问责单位数")
private Integer punishOrg;
@Schema(description = "查实率")
private Double rate;
public void initDefaultIfNull() {
this.total = this.total == null ? 0 : this.total;
this.confirmed = this.confirmed == null ? 0 : this.confirmed;
this.dealCasePro = this.dealCasePro == null ? 0 : this.dealCasePro;
this.punishPre = this.punishPre == null ? 0 : this.punishPre;
this.punishOrg = this.punishOrg == null ? 0 : this.punishOrg;
this.rate = this.rate == null ? 0.0 : this.rate;
}
} }

8
src/main/java/com/biutag/supervision/repository/supdepart/SupDepartResourceService.java

@ -51,6 +51,14 @@ public class SupDepartResourceService extends BaseDAO {
public List<SupDepart> getLevel3ByPidSupDepartList(String pid){
SupDepartQueryParam supDepartGroupParam = new SupDepartQueryParam();
supDepartGroupParam.setLevel("3");
supDepartGroupParam.setPid(pid);
return this.query(supDepartGroupParam);
}
/** /**

35
src/main/java/com/biutag/supervision/service/datav/DatavService.java

@ -292,4 +292,39 @@ public interface DatavService {
* @return * @return
*/ */
Result<JSONObject> getCaseVerificationMap(DataVRequest request); Result<JSONObject> getCaseVerificationMap(DataVRequest request);
/**
* 案件核查 一级大屏 案件来源占比 & 问责处理情况
* @param request
* @return
*/
Result<JSONObject> getCaseSourceRateAndDealSituation(DataVRequest request);
/**
* 案件核查二级大屏 分县市局排名
* @param request
* @return
*/
Result<JSONObject> getSubOneCaseVerificationRank(SubDataVRequest request);
/**
* 案件核查二级大屏 总览
* @param request
* @return
*/
Result<JSONObject> getSubOneAllCaseVerificationCount(SubDataVRequest request);
/**
* 案件核查二级 地图
* @param request
* @return
*/
Result<JSONObject> getSubOneCaseVerificationMap(SubDataVRequest request);
/**
* 案件核查二级 案件来源占比 & 问责处理情况
* @param request
* @return
*/
Result<JSONObject> getSubOneCaseSourceRateAndDealSituation(SubDataVRequest request);
} }

341
src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java

@ -2,7 +2,6 @@ package com.biutag.supervision.service.datav;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil; 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.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -243,7 +242,7 @@ public class DatavServiceImpl implements DatavService {
queryWrapper12337.and(wrapper -> wrapper queryWrapper12337.and(wrapper -> wrapper
.in("third_depart_id", allDepartIds) .in("third_depart_id", allDepartIds)
.or() .or()
.in("second_depart_id", allDepartIds) ); .in("second_depart_id", allDepartIds));
long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337); long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 国家信访 // 国家信访
DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam(); DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam();
@ -441,14 +440,18 @@ public class DatavServiceImpl implements DatavService {
// region 案件核查 // region 案件核查
@Override @Override
public Result<JSONObject> getAllCaseVerificationCount(DataVRequest request) { public Result<JSONObject> getAllCaseVerificationCount(DataVRequest request) {
// 交办
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
CaseVerificationCountVo overview = new CaseVerificationCountVo(); CaseVerificationCountVo overview = new CaseVerificationCountVo();
LambdaQueryWrapper<DataCaseVerif> dataCaseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DataCaseVerif> dataCaseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>();
dataCaseVerifLambdaQueryWrapper.between(DataCaseVerif::getCreateTime, request.getBeginTime(), request.getEndTime()); dataCaseVerifLambdaQueryWrapper.between(DataCaseVerif::getCreateTime, request.getBeginTime(), request.getEndTime());
List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.selectList(dataCaseVerifLambdaQueryWrapper); List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.selectList(dataCaseVerifLambdaQueryWrapper);
NegativeQueryParam negativeQueryParam = new NegativeQueryParam(); NegativeQueryParam negativeQueryParam = new NegativeQueryParam();
negativeQueryParam.setCrtTime(List.of(request.getBeginTime(), request.getEndTime())); negativeQueryParam.setCrtTime(List.of(request.getBeginTime(), request.getEndTime()));
negativeQueryParam.setProblemSourcesCode(List.of(A12389.getValue())); negativeQueryParam.setProblemSourcesCode(List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()));
List<Negative> negatives = negativeResourceService.query(negativeQueryParam); List<Negative> negatives = negativeResourceService.query(negativeQueryParam);
// 交办案件数
List<Negative> jbNegatvieList = negatives.stream().filter(one -> ldjbCode.contains(one.getProblemSourcesCode())).toList();
// 属实问题 // 属实问题
List<Negative> ssNegative = negatives.stream() List<Negative> ssNegative = negatives.stream()
.filter(one -> CheckStatusEnum.TRUE_SET.contains(one.getCheckStatusCode()) || CheckStatusEnum.PART_TRUE_SET.contains(one.getCheckStatusCode())).toList(); .filter(one -> CheckStatusEnum.TRUE_SET.contains(one.getCheckStatusCode()) || CheckStatusEnum.PART_TRUE_SET.contains(one.getCheckStatusCode())).toList();
@ -478,12 +481,12 @@ public class DatavServiceImpl implements DatavService {
.filter(one -> !"不予追责".equals(one.getHandleResultName())) .filter(one -> !"不予追责".equals(one.getHandleResultName()))
.toList(); .toList();
//计算查实率(向上取整) //计算查实率(向上取整)
Double verificationRate = 0.0; Double verificationRate = 0.0;
if (!dataCaseVerifs.isEmpty()) { if (!dataCaseVerifs.isEmpty()) {
double rawRate = (double) ssNegative.size() / dataCaseVerifs.size() * 100; double rawRate = (double) ssNegative.size() / (dataCaseVerifs.size() + jbNegatvieList.size()) * 100;
verificationRate = Math.round(rawRate * 10) / 10.0; verificationRate = Math.round(rawRate * 10) / 10.0;
} }
overview.setTotal(dataCaseVerifs.size()); overview.setTotal(dataCaseVerifs.size() + jbNegatvieList.size());
overview.setConfirmed(ssNegative.size()); overview.setConfirmed(ssNegative.size());
overview.setDealCasePro((long) negatives.size()); overview.setDealCasePro((long) negatives.size());
overview.setPunishPre((long) (personalBlames.size() + leadBlames.size())); overview.setPunishPre((long) (personalBlames.size() + leadBlames.size()));
@ -1123,7 +1126,7 @@ public class DatavServiceImpl implements DatavService {
List<Negative> negativeList = negativeMapper.getChangedRank(fxsj.getId(), request.getBeginTime(), request.getEndTime()); List<Negative> negativeList = negativeMapper.getChangedRank(fxsj.getId(), request.getBeginTime(), request.getEndTime());
// 问题数 // 问题数
int totalPro = negativeList.size(); int totalPro = negativeList.size();
if (totalPro==0){ if (totalPro == 0) {
continue; continue;
} }
// 办结数 // 办结数
@ -1704,7 +1707,7 @@ public class DatavServiceImpl implements DatavService {
@Override @Override
public Result<JSONObject> getCaseVerificationRank(DataVRequest request) { public Result<JSONObject> getCaseVerificationRank(DataVRequest request) {
List<String> proCode = List.of(A12389.getValue()); List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam(); SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam();
supDepartQueryParam.setStatisticsGroupId(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId()); supDepartQueryParam.setStatisticsGroupId(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId());
List<SupDepart> fxsjDw = supDepartResourceService.query(supDepartQueryParam); List<SupDepart> fxsjDw = supDepartResourceService.query(supDepartQueryParam);
@ -1754,10 +1757,15 @@ public class DatavServiceImpl implements DatavService {
@Override @Override
public Result<JSONObject> getCaseVerificationMap(DataVRequest request) { public Result<JSONObject> getCaseVerificationMap(DataVRequest request) {
// 交办
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam(); SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam();
supDepartQueryParam.setStatisticsGroupId(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId()); supDepartQueryParam.setStatisticsGroupId(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId());
List<SupDepart> fxsjDw = supDepartResourceService.query(supDepartQueryParam); List<SupDepart> fxsjDw = supDepartResourceService.query(supDepartQueryParam);
List<String> proCode = List.of(A12389.getValue()); List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<CaseVerificationMapVo> caseVerificationMapList = new ArrayList<>(); List<CaseVerificationMapVo> caseVerificationMapList = new ArrayList<>();
for (SupDepart fxsj : fxsjDw) { for (SupDepart fxsj : fxsjDw) {
@ -1766,6 +1774,8 @@ public class DatavServiceImpl implements DatavService {
List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.getListData(fxsj.getId(), request.getBeginTime(), request.getEndTime()); List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.getListData(fxsj.getId(), request.getBeginTime(), request.getEndTime());
List<Negative> negatives = negativeMapper.getNegativeListData(fxsj.getId(), request.getBeginTime(), request.getEndTime(), proCode); List<Negative> negatives = negativeMapper.getNegativeListData(fxsj.getId(), request.getBeginTime(), request.getEndTime(), proCode);
List<Negative> ssNegative = negatives.stream().filter(one -> CheckStatusEnum.TRUE_SET.contains(one.getCheckStatusCode()) || CheckStatusEnum.PART_TRUE_SET.contains(one.getCheckStatusCode())).toList(); List<Negative> ssNegative = negatives.stream().filter(one -> CheckStatusEnum.TRUE_SET.contains(one.getCheckStatusCode()) || CheckStatusEnum.PART_TRUE_SET.contains(one.getCheckStatusCode())).toList();
// 交办案件数
List<Negative> jbNegatvieList = negatives.stream().filter(one -> ldjbCode.contains(one.getProblemSourcesCode())).toList();
NegativeBlameQueryParam negativeBlameQueryParam = new NegativeBlameQueryParam(); NegativeBlameQueryParam negativeBlameQueryParam = new NegativeBlameQueryParam();
negativeBlameQueryParam.setNegativeIds(ssNegative.stream().map(Negative::getId).toList()); negativeBlameQueryParam.setNegativeIds(ssNegative.stream().map(Negative::getId).toList());
List<NegativeBlame> negativeBlames = negativeBlameResourceService.query(negativeBlameQueryParam); List<NegativeBlame> negativeBlames = negativeBlameResourceService.query(negativeBlameQueryParam);
@ -1792,15 +1802,259 @@ public class DatavServiceImpl implements DatavService {
.filter(one -> !"不予追责".equals(one.getHandleResultName())) .filter(one -> !"不予追责".equals(one.getHandleResultName()))
.toList(); .toList();
Double verificationRate = 0.0; Double verificationRate = 0.0;
if (!dataCaseVerifs.isEmpty()) { if (!dataCaseVerifs.isEmpty()) {
double rawRate = (double) ssNegative.size() / dataCaseVerifs.size() * 100; double rawRate = (double) ssNegative.size() / (dataCaseVerifs.size() + jbNegatvieList.size()) * 100;
verificationRate = Math.round(rawRate * 10) / 10.0; verificationRate = Math.round(rawRate * 10) / 10.0;
} }
CaseVerificationMapVo caseVerificationMapVo = new CaseVerificationMapVo(); CaseVerificationMapVo caseVerificationMapVo = new CaseVerificationMapVo();
caseVerificationMapVo.setName(fxsj.getShortName()); caseVerificationMapVo.setName(fxsj.getShortName());
caseVerificationMapVo.setDepartId(fxsj.getId()); caseVerificationMapVo.setDepartId(fxsj.getId());
caseVerificationMapVo.setTotal(dataCaseVerifs.size()); caseVerificationMapVo.setTotal(dataCaseVerifs.size() + jbNegatvieList.size());
caseVerificationMapVo.setConfirmed(ssNegative.size());
caseVerificationMapVo.setDealCasePro(negatives.size());
caseVerificationMapVo.setPunishPre(personalBlames.size() + leadBlames.size());
caseVerificationMapVo.setPunishOrg(unitBlames.size());
caseVerificationMapVo.setRate(verificationRate);
caseVerificationMapList.add(caseVerificationMapVo);
}
JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList);
return Result.success(res);
}
@Override
public Result<JSONObject> getCaseSourceRateAndDealSituation(DataVRequest request) {
List<EchartsVo> caseSourceRateList = new ArrayList<>();
List<EchartsVo> dealSituationPieList = new ArrayList<>();
// 交办
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
LambdaQueryWrapper<DataCaseVerif> dataCaseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>();
dataCaseVerifLambdaQueryWrapper.between(DataCaseVerif::getCreateTime, request.getBeginTime(), request.getEndTime());
List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.selectList(dataCaseVerifLambdaQueryWrapper);
NegativeQueryParam negativeQueryParam = new NegativeQueryParam();
negativeQueryParam.setCrtTime(List.of(request.getBeginTime(), request.getEndTime()));
negativeQueryParam.setProblemSourcesCode(List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()));
List<Negative> negatives = negativeResourceService.query(negativeQueryParam);
// 案件来源占比
// 1、找到案件核查案件数
caseSourceRateList.add(new EchartsVo("12389投诉", dataCaseVerifs.size()));
// 2、找交办案件数
Map<String, List<Negative>> groupedByProblemSource = negatives.stream()
.filter(one -> StrUtil.isNotBlank(one.getProblemSourcesCode()))
.filter(one -> StrUtil.isNotBlank(one.getProblemSources()))
.filter(one -> ldjbCode.contains(one.getProblemSourcesCode()))
.collect(Collectors.groupingBy(Negative::getProblemSources));
for (Map.Entry<String, List<Negative>> entry : groupedByProblemSource.entrySet()) {
EchartsVo echartsVo = new EchartsVo();
echartsVo.setName(entry.getKey());
echartsVo.setValue(entry.getValue().size());
caseSourceRateList.add(echartsVo);
}
// 问责处理情况
List<Negative> ssNegative = negatives.stream().filter(one -> CheckStatusEnum.TRUE_SET.contains(one.getCheckStatusCode()) || CheckStatusEnum.PART_TRUE_SET.contains(one.getCheckStatusCode())).toList();
NegativeBlameQueryParam negativeBlameQueryParam = new NegativeBlameQueryParam();
negativeBlameQueryParam.setNegativeIds(ssNegative.stream().map(Negative::getId).toList());
List<NegativeBlame> negativeBlames = negativeBlameResourceService.query(negativeBlameQueryParam);
Map<String, List<NegativeBlame>> blames = negativeBlames.stream()
.filter(one -> StrUtil.isNotBlank(one.getHandleResultName()))
.filter(one -> !"不予追责".equals(one.getHandleResultName()))
.collect(Collectors.groupingBy(NegativeBlame::getHandleResultName));
for (Map.Entry<String, List<NegativeBlame>> entry : blames.entrySet()) {
EchartsVo echartsVo = new EchartsVo();
echartsVo.setName(entry.getKey());
echartsVo.setValue(entry.getValue().size());
dealSituationPieList.add(echartsVo);
}
// 过滤0
caseSourceRateList = filterZero(caseSourceRateList);
dealSituationPieList = filterZero(dealSituationPieList);
JSONObject data = new JSONObject()
.fluentPut("caseSourceRateList", caseSourceRateList)
.fluentPut("dealSituationPieList", dealSituationPieList);
return Result.success(data);
}
@Override
public Result<JSONObject> getSubOneCaseVerificationRank(SubDataVRequest request) {
List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<SupDepart> level3ByPidSupDepartList = supDepartResourceService.getLevel3ByPidSupDepartList(request.getDepartId());
// 派出所
List<SupDepart> pcsList = level3ByPidSupDepartList.stream()
.filter(one -> StrUtil.isNotBlank(one.getStatisticsGroupId()))
.filter(one -> DepartGroupEnum.PCS.getId().equals(Integer.valueOf(one.getStatisticsGroupId())))
.toList();
// 大队
List<SupDepart> dwList = level3ByPidSupDepartList.stream()
.filter(one -> {
String groupId = one.getStatisticsGroupId();
return !StrUtil.isNotBlank(groupId)
|| !DepartGroupEnum.PCS.getId().equals(Integer.valueOf(groupId));
})
.toList();
List<OrganizeProblemRankVo> fxsjRankList = new ArrayList<>();
List<OrganizeProblemRankVo> jsdwRankList = new ArrayList<>();
for (SupDepart pcs : pcsList) {
List<Negative> negatives = negativeMapper.getNegativeListData(pcs.getId(), request.getBeginTime(), request.getEndTime(), proCode);
if (CollectionUtil.isEmpty(negatives)) {
continue;
}
OrganizeProblemRankVo organizeProblemRankVo = new OrganizeProblemRankVo();
organizeProblemRankVo.setLabel(pcs.getShortName());
organizeProblemRankVo.setValue(String.valueOf(negatives.size()));
fxsjRankList.add(organizeProblemRankVo);
}
for (SupDepart dw : dwList) {
List<Negative> negatives = negativeMapper.getNegativeListData(dw.getId(), request.getBeginTime(), request.getEndTime(), proCode);
if (CollectionUtil.isEmpty(negatives)) {
continue;
}
OrganizeProblemRankVo organizeProblemRankVo = new OrganizeProblemRankVo();
organizeProblemRankVo.setLabel(dw.getShortName());
organizeProblemRankVo.setValue(String.valueOf(negatives.size()));
jsdwRankList.add(organizeProblemRankVo);
}
// 排序
fxsjRankList.sort(
Comparator.comparingLong((OrganizeProblemRankVo vo) -> Long.parseLong(vo.getValue()))
.reversed()
);
jsdwRankList.sort(
Comparator.comparingLong((OrganizeProblemRankVo vo) -> Long.parseLong(vo.getValue()))
.reversed()
);
JSONObject data = new JSONObject()
.fluentPut("fxsjRankList", fxsjRankList)
.fluentPut("jsdwRankList", jsdwRankList);
return Result.success(data);
}
@Override
public Result<JSONObject> getSubOneAllCaseVerificationCount(SubDataVRequest request) {
// 交办
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
LambdaQueryWrapper<DataCaseVerif> dataCaseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>();
dataCaseVerifLambdaQueryWrapper.between(DataCaseVerif::getCreateTime, request.getBeginTime(), request.getEndTime());
List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.getListData(request.getDepartId(), request.getBeginTime(), request.getEndTime());
List<Negative> negatives = negativeMapper.getNegativeListData(request.getDepartId(), request.getBeginTime(), request.getEndTime(), proCode);
List<Negative> ssNegative = negatives.stream().filter(one -> CheckStatusEnum.TRUE_SET.contains(one.getCheckStatusCode()) || CheckStatusEnum.PART_TRUE_SET.contains(one.getCheckStatusCode())).toList();
// 交办案件数
List<Negative> jbNegatvieList = negatives.stream().filter(one -> ldjbCode.contains(one.getProblemSourcesCode())).toList();
NegativeBlameQueryParam negativeBlameQueryParam = new NegativeBlameQueryParam();
negativeBlameQueryParam.setNegativeIds(ssNegative.stream().map(Negative::getId).toList());
List<NegativeBlame> negativeBlames = negativeBlameResourceService.query(negativeBlameQueryParam);
// 3. 个人问责
List<NegativeBlame> personalBlames = negativeBlames.stream()
.filter(one -> BlameType.personal.name().equals(one.getType()))
.filter(one -> StrUtil.isNotBlank(one.getHandleResultName()))
.filter(one -> !"不予追责".equals(one.getHandleResultName()))
.toList();
// 4. 领导问责(按 negativeId + 领导姓名 + 领导处理结果 去重)
Set<String> seenLead = new HashSet<>();
List<NegativeBlame> leadBlames = negativeBlames.stream()
.filter(one -> StrUtil.isNotBlank(one.getLeadHandleResultName()))
.filter(one -> !"不予追责".equals(one.getLeadHandleResultName()))
.filter(one -> seenLead.add(
one.getNegativeId() + "_" + one.getLeadHandleResultName() + "_" + one.getLeadName()
))
.toList();
// 5. 单位问责
List<NegativeBlame> unitBlames = negativeBlames.stream()
.filter(one -> BlameType.department.name().equals(one.getType()))
.filter(one -> StrUtil.isNotBlank(one.getHandleResultName()))
.filter(one -> !"不予追责".equals(one.getHandleResultName()))
.toList();
Double verificationRate = 0.0;
if (!dataCaseVerifs.isEmpty()) {
double rawRate = (double) ssNegative.size() / (dataCaseVerifs.size() + jbNegatvieList.size()) * 100;
verificationRate = Math.round(rawRate * 10) / 10.0;
}
CaseVerificationCountVo overview = new CaseVerificationCountVo();
overview.setTotal(dataCaseVerifs.size() + jbNegatvieList.size());
overview.setConfirmed(ssNegative.size());
overview.setDealCasePro((long) negatives.size());
overview.setPunishPre((long) (personalBlames.size() + leadBlames.size()));
overview.setPunishOrg((long) unitBlames.size());
overview.setRate(verificationRate);
JSONObject res = new JSONObject().fluentPut("overview", overview);
return Result.success(res);
}
@Override
public Result<JSONObject> getSubOneCaseVerificationMap(SubDataVRequest request) {
// 交办
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
// 查该区县局下属所有派出所
List<SupDepart> policeDeparts = supDepartMapper.selectPoliceDeparts(Integer.valueOf(request.getDepartId()));
List<CaseVerificationMapVo> caseVerificationMapList = new ArrayList<>();
for (SupDepart pcs : policeDeparts) {
// 案件核查
LambdaQueryWrapper<DataCaseVerif> dataCaseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>();
dataCaseVerifLambdaQueryWrapper.between(DataCaseVerif::getCreateTime, request.getBeginTime(), request.getEndTime());
dataCaseVerifLambdaQueryWrapper.eq(DataCaseVerif::getThirdDepartId, pcs.getId());
List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.selectList(dataCaseVerifLambdaQueryWrapper);
// 所有查处数据
List<Negative> negatives = negativeMapper.getNegativeListData(pcs.getId(), request.getBeginTime(), request.getEndTime(), proCode);
// 交办案件数
List<Negative> jbNegatvieList = negatives.stream().filter(one -> ldjbCode.contains(one.getProblemSourcesCode())).toList();
// 问责情况
List<Negative> ssNegative = negatives.stream().filter(one -> CheckStatusEnum.TRUE_SET.contains(one.getCheckStatusCode()) || CheckStatusEnum.PART_TRUE_SET.contains(one.getCheckStatusCode())).toList();
NegativeBlameQueryParam negativeBlameQueryParam = new NegativeBlameQueryParam();
negativeBlameQueryParam.setNegativeIds(ssNegative.stream().map(Negative::getId).toList());
List<NegativeBlame> negativeBlames = negativeBlameResourceService.query(negativeBlameQueryParam);
// 3. 个人问责
List<NegativeBlame> personalBlames = negativeBlames.stream()
.filter(one -> BlameType.personal.name().equals(one.getType()))
.filter(one -> StrUtil.isNotBlank(one.getHandleResultName()))
.filter(one -> !"不予追责".equals(one.getHandleResultName()))
.toList();
// 4. 领导问责(按 negativeId + 领导姓名 + 领导处理结果 去重)
Set<String> seenLead = new HashSet<>();
List<NegativeBlame> leadBlames = negativeBlames.stream()
.filter(one -> StrUtil.isNotBlank(one.getLeadHandleResultName()))
.filter(one -> !"不予追责".equals(one.getLeadHandleResultName()))
.filter(one -> seenLead.add(
one.getNegativeId() + "_" + one.getLeadHandleResultName() + "_" + one.getLeadName()
))
.toList();
// 5. 单位问责
List<NegativeBlame> unitBlames = negativeBlames.stream()
.filter(one -> BlameType.department.name().equals(one.getType()))
.filter(one -> StrUtil.isNotBlank(one.getHandleResultName()))
.filter(one -> !"不予追责".equals(one.getHandleResultName()))
.toList();
int totalCaseCount = dataCaseVerifs.size() + jbNegatvieList.size();
double verificationRate = 0.0;
if (totalCaseCount > 0) {
double rawRate = (double) ssNegative.size() / totalCaseCount * 100;
verificationRate = Math.round(rawRate * 10) / 10.0;
}
CaseVerificationMapVo caseVerificationMapVo = new CaseVerificationMapVo();
caseVerificationMapVo.setName(pcs.getShortName());
caseVerificationMapVo.setDepartId(pcs.getId());
caseVerificationMapVo.setTotal(dataCaseVerifs.size() + jbNegatvieList.size());
caseVerificationMapVo.setConfirmed(ssNegative.size()); caseVerificationMapVo.setConfirmed(ssNegative.size());
caseVerificationMapVo.setDealCasePro(negatives.size()); caseVerificationMapVo.setDealCasePro(negatives.size());
caseVerificationMapVo.setPunishPre(personalBlames.size() + leadBlames.size()); caseVerificationMapVo.setPunishPre(personalBlames.size() + leadBlames.size());
@ -1808,10 +2062,73 @@ public class DatavServiceImpl implements DatavService {
caseVerificationMapVo.setRate(verificationRate); caseVerificationMapVo.setRate(verificationRate);
caseVerificationMapList.add(caseVerificationMapVo); caseVerificationMapList.add(caseVerificationMapVo);
} }
caseVerificationMapList.forEach(CaseVerificationMapVo::initDefaultIfNull);
JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList); JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList);
return Result.success(res); return Result.success(res);
} }
@Override
public Result<JSONObject> getSubOneCaseSourceRateAndDealSituation(SubDataVRequest request) {
List<EchartsVo> caseSourceRateList = new ArrayList<>();
List<EchartsVo> dealSituationPieList = new ArrayList<>();
// 总
List<String> proCode = List.of(A12389.getValue(),SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
// 交办
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
// 案件核查 || 12389
List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.getListData(request.getDepartId(), request.getBeginTime(), request.getEndTime());
// 交办
List<Negative> negatives = negativeMapper.getNegativeListData(request.getDepartId(), request.getBeginTime(), request.getEndTime(), proCode);
// 案件来源占比
// 1、找到案件核查案件数
caseSourceRateList.add(new EchartsVo("12389投诉", dataCaseVerifs.size()));
// 2、找交办案件数
Map<String, List<Negative>> groupedByProblemSource = negatives.stream()
.filter(one -> StrUtil.isNotBlank(one.getProblemSourcesCode()))
.filter(one -> StrUtil.isNotBlank(one.getProblemSources()))
.filter(one -> ldjbCode.contains(one.getProblemSourcesCode()))
.collect(Collectors.groupingBy(Negative::getProblemSources));
for (Map.Entry<String, List<Negative>> entry : groupedByProblemSource.entrySet()) {
EchartsVo echartsVo = new EchartsVo();
echartsVo.setName(entry.getKey());
echartsVo.setValue(entry.getValue().size());
caseSourceRateList.add(echartsVo);
}
// 问责处理情况
List<Negative> ssNegative = negatives.stream().filter(one -> CheckStatusEnum.TRUE_SET.contains(one.getCheckStatusCode()) || CheckStatusEnum.PART_TRUE_SET.contains(one.getCheckStatusCode())).toList();
NegativeBlameQueryParam negativeBlameQueryParam = new NegativeBlameQueryParam();
negativeBlameQueryParam.setNegativeIds(ssNegative.stream().map(Negative::getId).toList());
List<NegativeBlame> negativeBlames = negativeBlameResourceService.query(negativeBlameQueryParam);
Map<String, List<NegativeBlame>> blames = negativeBlames.stream()
.filter(one -> StrUtil.isNotBlank(one.getHandleResultName()))
.filter(one -> !"不予追责".equals(one.getHandleResultName()))
.collect(Collectors.groupingBy(NegativeBlame::getHandleResultName));
for (Map.Entry<String, List<NegativeBlame>> entry : blames.entrySet()) {
EchartsVo echartsVo = new EchartsVo();
echartsVo.setName(entry.getKey());
echartsVo.setValue(entry.getValue().size());
dealSituationPieList.add(echartsVo);
}
// 过滤0
caseSourceRateList = filterZero(caseSourceRateList);
dealSituationPieList = filterZero(dealSituationPieList);
JSONObject data = new JSONObject()
.fluentPut("caseSourceRateList", caseSourceRateList)
.fluentPut("dealSituationPieList", dealSituationPieList);
return Result.success(data);
}
private List<EchartsVo> filterZero(List<EchartsVo> list) {
return list.stream()
.filter(e -> e.getValue() != null && e.getValue() > 0)
.toList();
}
public Result<JSONObject> getSubOneMailMapIcon() { public Result<JSONObject> getSubOneMailMapIcon() {
// ✅ 注意:这里的 name 必须和地图 geojson 区域名一致(一般是“xx街道/园区”) // ✅ 注意:这里的 name 必须和地图 geojson 区域名一致(一般是“xx街道/园区”)

Loading…
Cancel
Save