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