Browse Source

fix--信访问责情况

master
parent
commit
5719515bf7
  1. 2
      src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java
  2. 44
      src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java
  3. 7
      src/main/java/com/biutag/supervision/service/datav/DatavService.java
  4. 24
      src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java

2
src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java

@ -84,5 +84,5 @@ public enum ProblemSourcesEnum {
public static final List<String> GROUP_27_28_29_30 = List.of("27", "28", "29", "30");
public static final List<String> GROUP_21_22_23_24_25 = List.of("21", "22", "23", "24", "25");
}

44
src/main/java/com/biutag/supervision/controller/datav/DataVMailViewController.java

@ -2,24 +2,18 @@ package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.DataPetition12337Mapper;
import com.biutag.supervision.mapper.NegativeBlameMapper;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.request.datav.DataVRequest;
import com.biutag.supervision.pojo.vo.BlameStats;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.service.DataMailService;
import com.biutag.supervision.service.datav.DatavService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -36,7 +30,6 @@ public class DataVMailViewController {
private final DataMailService dataMailService;
private final DataPetition12337Mapper dataPetition12337Mapper;
private final NegativeMapper negativeMapper;
private final NegativeBlameMapper negativeBlameMapper;
private final DatavService datavService;
// region 左边
@ -89,42 +82,11 @@ public class DataVMailViewController {
return datavService.getEntanglementAndMassMail(request);
}
/**
* 追责问责情况
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@Operation(summary = "追责问责情况")
@GetMapping("/getResultCount")
public Result<Map<String,Integer>> getResultCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){
List<BlameStats> list = negativeBlameMapper.selectBlameStatsCount(beginTime,endTime);
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());
}
@PostMapping("/getResultCount")
public Result<JSONObject> getResultCount(@RequestBody DataVRequest request){
return datavService.getResultCount(request);
}
}
});
return Result.success(blameMap);
}
}

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

@ -209,4 +209,11 @@ public interface DatavService {
* @return
*/
Result<JSONObject> getAuditNegativeVo(DataVRequest request);
/**
* 信访追责问责情况
* @param request
* @return
*/
Result<JSONObject> getResultCount(DataVRequest request);
}

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

@ -1188,6 +1188,30 @@ public class DatavServiceImpl implements DatavService {
return Result.success(data);
}
@Override
public Result<JSONObject> getResultCount(DataVRequest request) {
List<EchartsVo> resultCountArray = new ArrayList<>();
NegativeQueryParam negativeQueryParam = new NegativeQueryParam();
negativeQueryParam.setCrtTime(List.of(request.getBeginTime(), request.getEndTime()));
negativeQueryParam.setProblemSourcesCode(GROUP_21_22_23_24_25);
List<Negative> negatives = negativeResourceService.query(negativeQueryParam);
BlameResult blameResult = this.buildBlameResult(negatives);
List<NegativeBlame> negativeBlames = blameResult.personalBlames();
Map<String, List<NegativeBlame>> blames = negativeBlames.stream()
.filter(one -> StrUtil.isNotBlank(one.getHandleResultName()))
.filter(one -> !NO_BLAME.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());
resultCountArray.add(echartsVo);
}
this.filterZero(resultCountArray);
JSONObject data = new JSONObject().fluentPut("resultCountArray", resultCountArray);
return Result.success(data);
}
// endregion
// region审计监督一级

Loading…
Cancel
Save