Browse Source

fit:现场专项大屏调整,左右tab不联动切换,补充通报期数(含督察通报表单与对应问题清单)

master
pengwei 4 months ago
parent
commit
b0bc10974f
  1. 35
      src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java
  2. 139
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java
  3. 5
      src/main/java/com/biutag/supervision/controller/supervise/SuperviseReportController.java
  4. 2
      src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java
  5. 48
      src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java
  6. 2
      src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java
  7. 5
      src/main/java/com/biutag/supervision/service/SuperviseReportService.java

35
src/main/java/com/biutag/supervision/controller/datav/DataVSupervisionNotifyController.java

@ -4,18 +4,25 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.constants.enums.RoleCodeEnum;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.entity.News;
import com.biutag.supervision.pojo.entity.SuperviseReport;
import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.NegativeBlameService;
import com.biutag.supervision.service.NewsService;
import com.biutag.supervision.service.SupDepartService;
import com.biutag.supervision.service.SuperviseReportService;
import com.biutag.supervision.util.CompletableUtils.CompletableFutureUtil;
import io.swagger.v3.oas.annotations.Operation;
@ -28,6 +35,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@ -51,6 +59,7 @@ public class DataVSupervisionNotifyController {
private final NewsService newsService;
private final NegativeBlameService negativeBlameService;
private final SuperviseReportService superviseReportService;
private final SupDepartService departService;
// region 左边
@ -69,13 +78,17 @@ public class DataVSupervisionNotifyController {
endTime= DateUtil.endOfDay(endTime);
DayTimeSuperviseVo fxsjRankOverview = negativeMapper.getSupervisionRank(beginTime, endTime, 3);
DayTimeSuperviseVo jsdwRankOverview = negativeMapper.getSupervisionRank(beginTime, endTime, 4);
DayTimeSuperviseVo overview = new DayTimeSuperviseVo().addVO(fxsjRankOverview,jsdwRankOverview);
List<RankVo> fxsjChangedRankList = negativeMapper.getChangedRateRank(beginTime, endTime, 3);
List<RankVo> jsdwChangedRankList = negativeMapper.getChangedRateRank(beginTime, endTime, 4);
JSONObject data = new JSONObject()
.fluentPut("fxsjRankOverview", fxsjRankOverview)
.fluentPut("jsdwRankOverview", jsdwRankOverview)
.fluentPut("fxsjChangedRankList", fxsjChangedRankList)
.fluentPut("jsdwChangedRankList", jsdwChangedRankList);
.fluentPut("jsdwChangedRankList", jsdwChangedRankList)
.fluentPut("overview",overview);
return Result.success(data);
}
@ -123,6 +136,23 @@ public class DataVSupervisionNotifyController {
overView.setProcessingNumber(negatives.size() - overView.getCompletedNumber());
// 办结率
overView.setCompletedRate(overView.getProblemNumber() == 0 ? 0: NumberUtil.roundHalfEven(NumberUtil.mul(NumberUtil.div(overView.getCompletedNumber(), overView.getProblemNumber()), 100), 0).doubleValue());
QueryWrapper<SuperviseReport> queryWrapper = new QueryWrapper<>();
UserAuth user = UserContextHolder.getCurrentUser();
// 权限
if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType()) && !user.getRoleCodes().contains(RoleCodeEnum.FIRST_ADMIN.getCode())) {
if (user.getAuthDepartIds().isEmpty() || user.getRoleCodes().isEmpty()) {
//特殊处理
overView.setReportNumber(0L);
}
List<String> orgIds = departService.getAllNodeIds(user.getAuthDepartIds());
queryWrapper.in("t.crt_depart_id", orgIds);
}
overView.setReportNumber(superviseReportService.count(queryWrapper));
CompletableFuture.allOf(
CompletableFutureUtil.runSyncObject(() -> {
long personNumber = negativeIds.isEmpty() ? 0 : negativeBlameService.count(new LambdaQueryWrapper<NegativeBlame>().in(NegativeBlame::getNegativeId, negativeIds)
@ -200,7 +230,10 @@ public class DataVSupervisionNotifyController {
DayTimeSuperviseVo bureauOverview = negativeMapper.getYellowBetOverview(beginTime, endTime, 4, dictValue);
List<OrganizeProblemRankVo> bureauRankList = negativeMapper.getYellowBetRankList(beginTime, endTime, 4, dictValue);
DayTimeSuperviseVo overView = new DayTimeSuperviseVo().addVO(countyOverview,bureauOverview);
JSONObject data = new JSONObject()
.fluentPut("overView",overView)
.fluentPut("countyOverview", countyOverview)
.fluentPut("countyRankList", countyRankList)
.fluentPut("bureauOverview", bureauOverview)

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

@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.biutag.supervision.constants.enums.InspectCaseEnum;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
@ -12,10 +13,7 @@ import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.NegativeBlameService;
import com.biutag.supervision.service.NewsService;
import com.biutag.supervision.service.SubOneSupervisionNotifyService;
import com.biutag.supervision.service.SuperviseReportService;
import com.biutag.supervision.service.*;
import com.biutag.supervision.util.CompletableUtils.CompletableFutureUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -55,6 +53,7 @@ public class SubOneSupervisionNotifyController {
private final NegativeBlameService negativeBlameService;
private final CountyStreetDeptMapper countyStreetDeptMapper;
private final SuperviseReportService superviseReportService;
private final SupDepartService departService;
// region 左边
/**
@ -74,7 +73,9 @@ public class SubOneSupervisionNotifyController {
DayTimeSuperviseVo teamRankOverview = negativeMapper.getTeamRankOverview(departId, beginTime, endTime);
List<RankVo> policeChangedRankList = negativeMapper.getPoliceChangedRankList(departId, beginTime, endTime);
List<RankVo> teamChangedRankList = negativeMapper.getTeamChangedRankList(departId, beginTime, endTime);
DayTimeSuperviseVo overview = new DayTimeSuperviseVo().addVO(policeRankOverview,teamRankOverview);
JSONObject data = new JSONObject()
.fluentPut("overview",overview)
.fluentPut("fxsjRankOverview", policeRankOverview)
.fluentPut("jsdwRankOverview", teamRankOverview)
.fluentPut("fxsjChangedRankList", policeChangedRankList)
@ -139,6 +140,12 @@ public class SubOneSupervisionNotifyController {
.between(SuperviseReport::getCrtTime,beginTime,endTime));
overView.setProblemQuarter(problemQuarter);
LambdaQueryWrapper<SuperviseReport> queryWrapper=new LambdaQueryWrapper<>();
List<String> orgIds = departService.getAllNodeIds(String.valueOf(departId));
queryWrapper.in(SuperviseReport::getCrtDepartId, orgIds);
overView.setReportNumber(superviseReportService.count(queryWrapper));
// 办结率
// overView.setCompletedRate(overView.getProblemNumber() == 0 ? 0: NumberUtil.roundHalfEven(NumberUtil.mul(NumberUtil.div(overView.getCompletedNumber(), overView.getProblemNumber()), 100), 0).doubleValue());
@ -262,15 +269,17 @@ public class SubOneSupervisionNotifyController {
@GetMapping("/getSubOneYellowBetDrug")
public Result<JSONObject> getYellowBetDrug(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime,@RequestParam Integer type) {
// 黄赌毒总览
DayTimeSuperviseVo fxsjYellowBetOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 1);
DayTimeSuperviseVo jsdwYellowBetOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 1);
DayTimeSuperviseVo fxsjYellowBetOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, type);
DayTimeSuperviseVo jsdwYellowBetOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, type);
// 黄毒赌列表
List<OrganizeProblemRankVo> fxsjYellowBetRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 1);
List<OrganizeProblemRankVo> jsdwYellowBetRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 1);
List<OrganizeProblemRankVo> fxsjYellowBetRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, type);
List<OrganizeProblemRankVo> jsdwYellowBetRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, type);
DayTimeSuperviseVo overview = new DayTimeSuperviseVo().addVO(fxsjYellowBetOverview,jsdwYellowBetOverview);
JSONObject data = new JSONObject()
.fluentPut("overview",overview)
.fluentPut("fxsjYellowBetOverview", fxsjYellowBetOverview)
.fluentPut("jsdwYellowBetOverview", jsdwYellowBetOverview)
.fluentPut("fxsjYellowBetRankList", fxsjYellowBetRankList)
@ -279,118 +288,6 @@ public class SubOneSupervisionNotifyController {
}
/**
* 枪支管理数据
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return JSONObject
*/
@Operation(summary = "枪支管理数据")
@GetMapping("/getSubOneGunController")
public Result<JSONObject> getSubOneGunController(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 枪支管理总览
DayTimeSuperviseVo fxsjGunControllerOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 2);
DayTimeSuperviseVo jsdwGunControllerOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 2);
// 枪支管理列表
List<OrganizeProblemRankVo> fxsjGunControllerRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 2);
List<OrganizeProblemRankVo> jsdwGunControllerRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 2);
JSONObject data = new JSONObject()
.fluentPut("fxsjGunControllerOverview", fxsjGunControllerOverview)
.fluentPut("jsdwGunControllerOverview", jsdwGunControllerOverview)
.fluentPut("fxsjGunControllerRankList", fxsjGunControllerRankList)
.fluentPut("jsdwGunControllerRankList", jsdwGunControllerRankList);
return Result.success(data);
}
/**
* 涉企问题数据
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return JSONObject
*/
@Operation(summary = "涉企问题数据")
@GetMapping("/getSubOneCompanyProblem")
public Result<JSONObject> getSubOneCompanyProblem(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 涉企问题总览
DayTimeSuperviseVo fxsjCompanyProblemOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 3);
DayTimeSuperviseVo jsdwCompanyProblemOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 3);
// 涉企问题列表
List<OrganizeProblemRankVo> fxsjCompanyProblemRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 3);
List<OrganizeProblemRankVo> jsdwCompanyProblemRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 3);
JSONObject data = new JSONObject()
.fluentPut("fxsjCompanyProblemOverview", fxsjCompanyProblemOverview)
.fluentPut("jsdwCompanyProblemOverview", jsdwCompanyProblemOverview)
.fluentPut("fxsjCompanyProblemRankList", fxsjCompanyProblemRankList)
.fluentPut("jsdwCompanyProblemRankList", jsdwCompanyProblemRankList);
return Result.success(data);
}
/**
* 执法办案数据
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return JSONObject
*/
@Operation(summary = "执法办案数据")
@GetMapping("/getSubOneHandleCase")
public Result<JSONObject> getSubOneHandleCase(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 执法办案总览
DayTimeSuperviseVo fxsjHandleCaseOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 4);
DayTimeSuperviseVo jsdwHandleCaseOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 4);
// 执法办案列表
List<OrganizeProblemRankVo> fxsjHandleCaseRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 4);
List<OrganizeProblemRankVo> jsdwHandleCaseRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 4);
JSONObject data = new JSONObject()
.fluentPut("fxsjHandleCaseOverview", fxsjHandleCaseOverview)
.fluentPut("jsdwHandleCaseOverview", jsdwHandleCaseOverview)
.fluentPut("fxsjHandleCaseRankList", fxsjHandleCaseRankList)
.fluentPut("jsdwHandleCaseRankList", jsdwHandleCaseRankList);
return Result.success(data);
}
/**
* 工作日测酒数据
*
* @param departId 部门id (分县市局ID)
* @param beginTime 开始时间
* @param endTime 结束时间
* @return JSONObject
*/
@Operation(summary = "工作日测酒数据")
@GetMapping("/getSubOneCheckBeer")
public Result<JSONObject> getSubOneCheckBeer(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 工作日测酒总览
DayTimeSuperviseVo fxsjCheckBeerOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 5);
DayTimeSuperviseVo jsdwCheckBeerOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 5);
// 工作日测酒列表
List<OrganizeProblemRankVo> fxsjCheckBeerRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 5);
List<OrganizeProblemRankVo> jsdwCheckBeerRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 5);
JSONObject data = new JSONObject()
.fluentPut("fxsjCheckBeerOverview", fxsjCheckBeerOverview)
.fluentPut("jsdwCheckBeerOverview", jsdwCheckBeerOverview)
.fluentPut("fxsjCheckBeerRankList", fxsjCheckBeerRankList)
.fluentPut("jsdwCheckBeerRankList", jsdwCheckBeerRankList);
return Result.success(data);
}
/**
* 督察工作动态

5
src/main/java/com/biutag/supervision/controller/supervise/SuperviseReportController.java

@ -36,6 +36,11 @@ public class SuperviseReportController {
Result<Page<SuperviseReportVo>> queryPage(SuperviseReportQueryParam queryParam){
return Result.success(service.page(queryParam));
}
@GetMapping("subQueryPage")
Result<Page<SuperviseReportVo>> subQueryPage(SuperviseReportQueryParam queryParam){
return Result.success(service.page(queryParam));
}
/**
* 根据报告获取问题列表
* */

2
src/main/java/com/biutag/supervision/pojo/param/SuperviseReportQueryParam.java

@ -12,4 +12,6 @@ public class SuperviseReportQueryParam extends BasePage{
private String crtUser;
private String id;
private String deptId;
}

48
src/main/java/com/biutag/supervision/pojo/vo/DayTimeSuperviseVo.java

@ -1,9 +1,13 @@
package com.biutag.supervision.pojo.vo;
import cn.hutool.core.util.NumberUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* @Auther: sh
* @Date: 2024/11/28 10:32
@ -23,6 +27,48 @@ public class DayTimeSuperviseVo {
private Long changed;
private Long correctionRate;
private Double correctionRate;
public DayTimeSuperviseVo addVO(DayTimeSuperviseVo one,DayTimeSuperviseVo two){
DayTimeSuperviseVo vo =new DayTimeSuperviseVo();
//问题总数
vo.setProTotal(one.getProTotal() + two.proTotal);
//办理中
vo.setProcessingNumber(isZero(one.getProcessingNumber()) + isZero(two.getProcessingNumber()));
//已办结
vo.setCompletedNumber(isZero(one.getCompletedNumber() )+ isZero(two.getCompletedNumber()));
//区县大屏 办理中
vo.setChanging(isZero(one.getChanging()) + isZero(one.getChanging()));
//区县大屏 已办结
vo.setChanged(isZero(one.getChanged() ) + isZero(one.getChanged() ));
//区县大屏 整改率
if(vo.getProTotal() == null || vo.getProTotal() == 0 || vo.getChanged() == 0){
vo.setCorrectionRate(0.0);
}else{
BigDecimal result = new BigDecimal(vo.getChanged() * 100)
.divide(new BigDecimal(vo.getProTotal()), 1, RoundingMode.HALF_UP);
vo.setCorrectionRate(result.doubleValue());
}
//办结率
if(vo.getProTotal() == null || vo.getProTotal() == 0 || vo.getCompletedNumber() == 0){
vo.setCompletedRate(0.0);
}else{
BigDecimal result = new BigDecimal(vo.getCompletedNumber() * 100)
.divide(new BigDecimal(vo.getProTotal()), 1, RoundingMode.HALF_UP);
vo.setCompletedRate(result.doubleValue());
}
return vo;
}
public Long isZero(Long val){
return val != null?val:0L;
}
}

2
src/main/java/com/biutag/supervision/pojo/vo/SupervisionNotifyOverView.java

@ -23,5 +23,7 @@ public class SupervisionNotifyOverView {
private Long personNumber;
// 办结率
private Double completedRate;
// 通报数
private Long reportNumber;
}

5
src/main/java/com/biutag/supervision/service/SuperviseReportService.java

@ -50,6 +50,11 @@ public class SuperviseReportService extends ServiceImpl<SuperviseReportMapper, S
List<String> orgIds = departService.getAllNodeIds(user.getAuthDepartIds());
queryWrapper.in("t.crt_depart_id", orgIds);
}
if(StrUtil.isNotBlank(queryParam.getDeptId())){
List<String> orgIds = departService.getAllNodeIds(queryParam.getDeptId());
queryWrapper.in("t.crt_depart_id", orgIds);
}
//查询条件
queryWrapper.like(StrUtil.isNotEmpty(queryParam.getReportName()),"t.report_name",queryParam.getReportName())
.like(StrUtil.isNotEmpty(queryParam.getCrtUser()),"t.crt_user",queryParam.getCrtUser())

Loading…
Cancel
Save