|
|
|
@ -3,25 +3,17 @@ package com.biutag.supervision.controller.subdatav; |
|
|
|
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.DataPetitionComplaintMapper; |
|
|
|
import com.biutag.supervision.mapper.DataPetitionComplaintMapper; |
|
|
|
import com.biutag.supervision.mapper.NegativeBlameMapper; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.Result; |
|
|
|
import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest; |
|
|
|
import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest; |
|
|
|
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.pojo.vo.MailMapIconVo; |
|
|
|
|
|
|
|
import com.biutag.supervision.service.DataMailService; |
|
|
|
|
|
|
|
import com.biutag.supervision.service.subDatav.SubDatavService; |
|
|
|
import com.biutag.supervision.service.subDatav.SubDatavService; |
|
|
|
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.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; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @Auther: sh |
|
|
|
* @Auther: sh |
|
|
|
@ -36,22 +28,17 @@ import java.util.Map; |
|
|
|
public class SubOneMailViewController { |
|
|
|
public class SubOneMailViewController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final DataMailService dataMailService; |
|
|
|
|
|
|
|
private final DataPetitionComplaintMapper dataPetitionComplaintMapper; |
|
|
|
private final DataPetitionComplaintMapper dataPetitionComplaintMapper; |
|
|
|
private final DataPetition12337Mapper dataPetition12337Mapper; |
|
|
|
private final DataPetition12337Mapper dataPetition12337Mapper; |
|
|
|
private final NegativeBlameMapper negativeBlameMapper; |
|
|
|
|
|
|
|
private final SubDatavService subDatavService; |
|
|
|
private final SubDatavService subDatavService; |
|
|
|
|
|
|
|
|
|
|
|
// region 左边
|
|
|
|
|
|
|
|
@Operation(summary = "初访重访情况") |
|
|
|
@Operation(summary = "初访重访情况") |
|
|
|
@PostMapping("/getSubOneFirstAndRepeatMail") |
|
|
|
@PostMapping("/getSubOneFirstAndRepeatMail") |
|
|
|
public Result<JSONObject> getSubOneFirstAndRepeatMail(@RequestBody SubDataVRequest request) { |
|
|
|
public Result<JSONObject> getSubOneFirstAndRepeatMail(@RequestBody SubDataVRequest request) { |
|
|
|
return subDatavService.getSubOneFirstAndRepeatMail(request); |
|
|
|
return subDatavService.getSubOneFirstAndRepeatMail(request); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// region 中间
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "信访数据大屏中央数据统计 && 信访投诉占比") |
|
|
|
@Operation(summary = "信访数据大屏中央数据统计 && 信访投诉占比") |
|
|
|
@PostMapping("/getSubOneAllMailCount") |
|
|
|
@PostMapping("/getSubOneAllMailCount") |
|
|
|
@ -67,17 +54,6 @@ public class SubOneMailViewController { |
|
|
|
return subDatavService.getSubOneMailMapIcon(request); |
|
|
|
return subDatavService.getSubOneMailMapIcon(request); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "信访数据中央地图小图标数据") |
|
|
|
|
|
|
|
@GetMapping("/getSubOneMailMapIcon") |
|
|
|
|
|
|
|
public Result<JSONObject> getSubOneMailMapIcon(@RequestParam Integer departId, |
|
|
|
|
|
|
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
|
|
|
|
|
|
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
|
|
|
|
|
|
|
// 信访数据总数概览
|
|
|
|
|
|
|
|
List<MailMapIconVo> mailMapIconList = dataMailService.getSubOneMailMapIcon(beginTime, endTime, departId); |
|
|
|
|
|
|
|
JSONObject data = new JSONObject().fluentPut("mailMapIconList", mailMapIconList); |
|
|
|
|
|
|
|
return Result.success(data); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "信访数据大屏信访趋势统计") |
|
|
|
@Operation(summary = "信访数据大屏信访趋势统计") |
|
|
|
@ -95,53 +71,20 @@ public class SubOneMailViewController { |
|
|
|
.fluentPut("numberList", numberList); |
|
|
|
.fluentPut("numberList", numberList); |
|
|
|
return Result.success(data); |
|
|
|
return Result.success(data); |
|
|
|
} |
|
|
|
} |
|
|
|
// endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// region 右边
|
|
|
|
|
|
|
|
@Operation(summary = "群众集访情况") |
|
|
|
@Operation(summary = "群众集访情况") |
|
|
|
@PostMapping("/getSubOneEntanglementAndMassMail") |
|
|
|
@PostMapping("/getSubOneEntanglementAndMassMail") |
|
|
|
public Result<JSONObject> getSubOneEntanglementAndMassMail(@RequestBody SubDataVRequest request) { |
|
|
|
public Result<JSONObject> getSubOneEntanglementAndMassMail(@RequestBody SubDataVRequest request) { |
|
|
|
return subDatavService.getSubOneEntanglementAndMassMail(request); |
|
|
|
return subDatavService.getSubOneEntanglementAndMassMail(request); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 追责问责情况 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param beginTime 开始时间 |
|
|
|
|
|
|
|
* @param endTime 结束时间 |
|
|
|
|
|
|
|
* @return Result<JSONObject> |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Operation(summary = "追责问责情况") |
|
|
|
@Operation(summary = "追责问责情况") |
|
|
|
@GetMapping("/getSubOneResultCount") |
|
|
|
@PostMapping("/getSubOneResultCount") |
|
|
|
public Result<Map<String,Integer>> getResultCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, |
|
|
|
public Result<JSONObject> getSubOneResultCount(@RequestBody SubDataVRequest request){ |
|
|
|
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime,@RequestParam Integer departId){ |
|
|
|
return subDatavService.getSubOneResultCount(request); |
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|