4 changed files with 90 additions and 2 deletions
@ -0,0 +1,79 @@
|
||||
package com.biutag.supervision.controller.datav; |
||||
|
||||
import cn.hutool.core.util.NumberUtil; |
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.biutag.supervision.constants.enums.CaseVerifProblemNatureEnum; |
||||
import com.biutag.supervision.constants.enums.DepartGroupEnum; |
||||
import com.biutag.supervision.mapper.DataRightsComfortMapper; |
||||
import com.biutag.supervision.mapper.RpcApplyMapper; |
||||
import com.biutag.supervision.pojo.Result; |
||||
import com.biutag.supervision.pojo.dto.CaseVerifDepart; |
||||
import com.biutag.supervision.pojo.dto.common.PieItem; |
||||
import com.biutag.supervision.pojo.entity.DataCaseVerif; |
||||
import com.biutag.supervision.pojo.entity.DataRightsComfort; |
||||
import com.biutag.supervision.pojo.entity.RpcApply; |
||||
import com.biutag.supervision.service.DataRightsComfortService; |
||||
import com.biutag.supervision.service.RpcApplyService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
@RequestMapping("datav/rightsComfort") |
||||
@RequiredArgsConstructor |
||||
@RestController |
||||
public class DatavRightsComfortController { |
||||
|
||||
private final RpcApplyService rpcApplyService; |
||||
|
||||
private final RpcApplyMapper rpcApplyMapper; |
||||
|
||||
@GetMapping |
||||
public Result<JSONObject> rightsComfort(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { |
||||
// 抚慰人数
|
||||
long total = rpcApplyService.count(new LambdaQueryWrapper<RpcApply>().between(RpcApply::getApplyDate, beginTime, endTime)); |
||||
long confirmed = 0; |
||||
JSONObject overview = new JSONObject() |
||||
// 抚慰人数
|
||||
.fluentPut("total", total); |
||||
/* // 维权案件总数
|
||||
.fluentPut("confirmed", 0) |
||||
// 受侵害人数
|
||||
.fluentPut("investigateAndPunish", 0) |
||||
// 打击处理人数
|
||||
.fluentPut("accountablePeopleNumber", 0) |
||||
// 抚慰金额(万元)
|
||||
.fluentPut("accountableDepartNumber", 0) |
||||
// 查实率
|
||||
.fluentPut("confirmedRate", total == 0 ? 0 : BigDecimal.valueOf(NumberUtil.div(confirmed, total) * 100).intValue()); |
||||
// 分县市局排名
|
||||
List<CaseVerifDepart> fxsjBarList = dataCaseVerifMapper.selectDepartStatistic(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId(), beginTime, endTime); |
||||
// 局属单位排名
|
||||
List<CaseVerifDepart> jsdwBarList = dataCaseVerifMapper.selectDepartStatistic(DepartGroupEnum.BUREAU_AFFILIATED.getId(), beginTime, endTime); |
||||
// 执法办案
|
||||
List<PieItem> zfbaPieList = dataCaseVerifMapper.selectInvolveProblemGroupByBusinessTypeName(CaseVerifProblemNatureEnum.ZFBA.getLaebl(), beginTime, endTime); |
||||
// 服务管理
|
||||
List<PieItem> fwglPieList = dataCaseVerifMapper.selectInvolveProblemGroupByBusinessTypeName(CaseVerifProblemNatureEnum.FWGL.getLaebl(), beginTime, endTime); |
||||
// 警察纪警规
|
||||
List<PieItem> jjjgPieList = dataCaseVerifMapper.selectInvolveProblemGroupByBusinessTypeName(CaseVerifProblemNatureEnum.JJJG.getLaebl(), beginTime, endTime); |
||||
// 案件来源占比
|
||||
List<PieItem> ajlyPieList = dataCaseVerifMapper.selectGroupByProblemSources(beginTime, endTime); |
||||
|
||||
JSONObject data = new JSONObject().fluentPut("overview", overview) |
||||
.fluentPut("fxsjBarList", fxsjBarList) |
||||
.fluentPut("jsdwBarList", jsdwBarList) |
||||
.fluentPut("zfbaPieList", zfbaPieList) |
||||
.fluentPut("fwglPieList", fwglPieList) |
||||
.fluentPut("jjjgPieList", jjjgPieList) |
||||
.fluentPut("ajlyPieList", ajlyPieList); |
||||
return Result.success(data);*/ |
||||
return null; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue