Browse Source

案件核查二级大屏

main
不爱学习的石同学 12 months ago
parent
commit
922046354d
  1. 19
      src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java
  2. 181
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java
  3. 43
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java
  4. 213
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneSupervisionNotifyController.java
  5. 21
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java
  6. 209
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  7. 19
      src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java
  8. 31
      src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java
  9. 4
      src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java
  10. 25
      src/main/resources/mapper/NegativeMapper.xml

19
src/main/java/com/biutag/supervision/controller/datav/DataGlobalController.java

@ -1,12 +1,11 @@
package com.biutag.supervision.controller.datav;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.GlobalMapIconVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import com.biutag.supervision.pojo.vo.StrongProblemRank;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.DataGlobalService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -38,7 +37,7 @@ public class DataGlobalController {
private final DataGlobalService dataGlobalService;
private final NegativeMapper negativeMapper;
//region 左边
/**
@ -51,7 +50,6 @@ public class DataGlobalController {
@GetMapping("/getOrganizationRank")
public Result<JSONObject> getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 机构问题排名 fxsjlist中必有所有机构,不会为空
List<OrganizeProblemRankVo> fxsjlist = dataGlobalService.getOrganizeProblemRank(3, beginTime, endTime);
List<OrganizeProblemRankVo> jsdwlist = dataGlobalService.getOrganizeProblemRank(4, beginTime, endTime);
JSONObject res = new JSONObject()
@ -92,7 +90,8 @@ public class DataGlobalController {
public Result<JSONObject> getAllGlobalCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 获取数据大屏中央总数概览
JSONObject overview = dataGlobalService.getAllGlobalCount(beginTime, endTime);
GlobalOverViewVo overview= negativeMapper.getAllGlobalCount(beginTime, endTime);
// JSONObject overview = dataGlobalService.getAllGlobalCount(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data);
}
@ -108,10 +107,10 @@ public class DataGlobalController {
@Cacheable(cacheNames = "globalMap", key = "'p_'+ #endTime")
public Result<JSONObject> getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// System.out.println("Cache key: p_" + endTime);
// 地图数据
List<GlobalMapIconVo> GlobalTempMapVoList = Optional.ofNullable(dataGlobalService.getMapIconInfo(beginTime, endTime)).
orElseGet(ArrayList::new);
List<GlobalMapIconVo> GlobalTempMapVoList = negativeMapper.getMapIcon(beginTime, endTime);
// List<GlobalMapIconVo> GlobalTempMapVoList = Optional.ofNullable(dataGlobalService.getMapIconInfo(beginTime, endTime)).
// orElseGet(ArrayList::new);
JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", GlobalTempMapVoList);
return Result.success(data);
}

181
src/main/java/com/biutag/supervision/controller/subdatav/SubOneCaseVerifController.java

@ -0,0 +1,181 @@
package com.biutag.supervision.controller.subdatav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.DataCaseVerifMapper;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.CaseVerificationCountVo;
import com.biutag.supervision.pojo.vo.CaseVerificationMapVo;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
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.util.Date;
import java.util.List;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SJJB;
/**
* @Auther: sh
* @Date: 2024/12/17 20:28
* @Description: 二级大屏案件核查
*/
@Tag(name = "二级大屏案件核查")
@RequestMapping("datav/sub1/caseVerif")
@RequiredArgsConstructor
@RestController
@Slf4j
public class SubOneCaseVerifController {
private final NegativeMapper negativeMapper;
private final DataCaseVerifMapper dataCaseVerifMapper;
/**
* 案件核查大屏分县市局排名
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@GetMapping("/getSubOneCaseVerificationRank")
public Result<JSONObject> getSubOneCaseVerificationRank(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> fxsjRankList = negativeMapper.getPoliceCaseVerificationRank(beginTime, endTime, departId);
List<OrganizeProblemRankVo> jsdwRankList = negativeMapper.getTeamCaseVerificationRank(beginTime, endTime, departId);
JSONObject data = new JSONObject()
.fluentPut("fxsjRankList", fxsjRankList)
.fluentPut("jsdwRankList", jsdwRankList);
return Result.success(data);
}
/**
* 案件问题类型
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@GetMapping("/getSubOneCaseProblemProperty")
public Result<JSONObject> getCaseProblemProperty(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> zfbaPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId, 6); // 执法办案
List<EchartsVo> fwglPieList = negativeMapper.getCaseProblemProperty(beginTime, endTime, departId,11); // 服务管理
// List<EchartsVo> jgjjPieList = dataCaseVerifMapper.getCaseProblemProperty(beginTime, endTime, 6); // 警规
JSONObject data = new JSONObject()
.fluentPut("zfbaPieList", zfbaPieList)
.fluentPut("fwglPieList", fwglPieList);
return Result.success(data);
}
// endregion
// region 中间
/**
* 案件核查大屏中央数据总览
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@GetMapping("/getSubOneAllCaseVerificationCount")
public Result<JSONObject> getSubOneAllCaseVerificationCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
CaseVerificationCountVo overview = negativeMapper.getSuboOneAllCaseVerificationCount(beginTime, endTime, departId);
JSONObject res = new JSONObject().fluentPut("overview", overview);
return Result.success(res);
}
/**
* 案件核查大屏地图
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
// @GetMapping("/getCaseVerificationMap")
// @Cacheable(cacheNames = "CaseVerificationMap", key = "'p_'+ #endTime")
// public Result<JSONObject> getCaseVerificationMap(@RequestParam Integer departId,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// List<CaseVerificationMapVo> caseVerificationMapList = negativeMapper.getCaseVerificationMap(beginTime, endTime);
// JSONObject res = new JSONObject().fluentPut("caseVerificationMapList", caseVerificationMapList);
// return Result.success(res);
// }
/**
* 查处问题趋势
*
* @param year 年份
* @return Result<JSONObject>
*/
@GetMapping("/getSubOneCaseVerificationTrend")
public Result<JSONObject> getSubOneCaseVerificationTrend(@RequestParam String departId,
@RequestParam Integer year) {
List<EchartsVo> proTrendList = negativeMapper.getSubOneCaseVerificationTrend(String.valueOf(year), departId, A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
JSONObject data = new JSONObject().fluentPut("proTrendList", proTrendList);
return Result.success(data);
// return null;
}
// endregion
// region 右边
/**
* 案件来源占比 问责处理情况
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@GetMapping("/getSubOneCaseSourceRateAndDealSituation")
public Result<JSONObject> getSubOneCaseSourceRateAndDealSituation(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> caseSourceRateList = negativeMapper.getSuboOneCaseSourceRate(beginTime, endTime, departId);
List<EchartsVo> dealSituationPieList = negativeMapper.getSubOneDealSituation(beginTime, endTime, departId);
JSONObject data = new JSONObject()
.fluentPut("caseSourceRateList", caseSourceRateList)
.fluentPut("dealSituationPieList", dealSituationPieList);
return Result.success(data);
// return null;
}
/**
* 禁闭处理情况 停职处理情况
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return Result<JSONObject>
*/
@GetMapping("/getSubOneConfinementAndPause")
public Result<JSONObject> getSubOneConfinement(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// List<EchartsVo> jbclList = negativeMapper.getSubOneConfinementAndPause(beginTime, endTime,departId, 1); // 禁闭
// List<EchartsVo> tzclList = negativeMapper.getSubOneConfinementAndPause(beginTime, endTime, departId,2); // 停职
// JSONObject data = new JSONObject()
// .fluentPut("jbclList", jbclList)
// .fluentPut("tzclList", tzclList);
// return Result.success(data);
return Result.success(null);
}
}

43
src/main/java/com/biutag/supervision/controller/subdatav/SubOneController.java → src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java

@ -2,19 +2,16 @@ package com.biutag.supervision.controller.subdatav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.CountyStreetDept;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo;
import com.biutag.supervision.pojo.vo.RankVo;
import com.biutag.supervision.pojo.vo.SubOneOverViewVo;
import com.biutag.supervision.service.CountyStreetDeptService;
import com.biutag.supervision.service.NegativeService;
import com.biutag.supervision.service.SubOneService;
import com.google.gson.Gson;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -35,13 +32,13 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
@RequiredArgsConstructor
@RestController
@Slf4j
public class SubOneController {
public class SubOneGlobalController {
private final CountyStreetDeptService countyStreetDeptService;
private final SubOneService subOneService;
// region
// region
@Operation(summary = "获取首页二级大屏督察问题排名")
@GetMapping("/getSubOneSupervisionRank")
public Result<JSONObject> getSubOneSupervisionRank(@RequestParam Integer departPId,
@ -63,14 +60,15 @@ public class SubOneController {
// endregion
// region 中间
// region 中间
/**
* 获取首页二级大屏总览
*
* @param departPId 2级单位的id
* @param beginTime 开始时间
* @param endTime 结束时间
* @param endTime 结束时间
* @return
*/
@Operation(summary = "获取首页二级大屏总览")
@ -80,7 +78,7 @@ public class SubOneController {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
SubOneOverViewVo subOneOverViewVo = subOneService.getSubOneOverView(departPId, beginTime, endTime);
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("subOneOverViewVo",subOneOverViewVo);
jsonObject.fluentPut("subOneOverViewVo", subOneOverViewVo);
return Result.success(jsonObject);
}
@ -116,31 +114,10 @@ public class SubOneController {
*/
@Operation(summary = "获取二级大屏地图JSON")
@GetMapping("/getSubOneStreetMap")
@Cacheable(cacheNames = "subOneStreetMap", key = "'p_'+ #departPId")
public Result<JSONObject> getSubOneStreetMap(@RequestParam Integer departPId) {
List<CountyStreetDept> depts = countyStreetDeptService.getSubOneStreetMap(departPId);
Map<String, Object> geoJson = new HashMap<>();
geoJson.put("type", "FeatureCollection");
geoJson.put("name", "临时名字");
List<Map<String, Object>> features = new ArrayList<>();
for (CountyStreetDept dept : depts) {
Map<String, Object> feature = new HashMap<>();
feature.put("type", "Feature"); // 第一个键值
Map<String, Object> properties = new HashMap<>();
properties.put("name", dept.getName());
properties.put("id", dept.getId());
feature.put("properties", properties); // 第二个键值
// log.info("===========现在的id是==============");
// log.info(dept.getId().toString());
feature.put("geometry", new Gson().fromJson(dept.getGeometry(), Object.class)); // 第三个键值
features.add(feature);
}
geoJson.put("features", features);
JSONObject jsonObject = new JSONObject();
jsonObject.put("geoJson", geoJson);
return Result.success(jsonObject);
JSONObject res = countyStreetDeptService.getSubOneStreetMap(departPId);
return Result.success(res);
}
// endregion

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

@ -1,6 +1,7 @@
package com.biutag.supervision.controller.subdatav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.DataSupervisionNotifyServiceImpl;
@ -26,7 +27,7 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ZXDC;
/**
* @Auther: sh
* @Date: 2024/12/17 10:58
* @Description: 二级现场督察大屏相关
* @Description: 二级大屏现场督察
*/
@Slf4j
@RestController
@ -38,6 +39,7 @@ public class SubOneSupervisionNotifyController {
private final SubOneSupervisionNotifyService subOneSupervisionNotifyService;
private final NegativeMapper negativeMapper;
// region 左边
/**
@ -85,13 +87,13 @@ public class SubOneSupervisionNotifyController {
// region 中间
/**
* 大屏中央数据
* 大屏中央总览数据
*
* @param beginTime 开始时间
* @param endTime 结束时间
* @return
*/
@Operation(summary = "大屏中央数据")
@Operation(summary = "大屏中央总览数据")
@GetMapping("/getAllSubOneSupervisionNotifyCount")
public Result<JSONObject> getAllSubOneSupervisionNotifyCount(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@ -100,22 +102,7 @@ public class SubOneSupervisionNotifyController {
JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data);
}
// /**
// * 地图数据
// *
// * @param beginTime 开始时间
// * @param endTime 结束时间
// * @return List<SuperviseMapIconVo>
// */
// @GetMapping("/getMap")
// @Cacheable(cacheNames = "superviseMap", key = "'p_'+ #endTime")
// public Result<JSONObject> getMap(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// //地图数据
// List<SuperviseMapIconVo> superviseTempMapVoList = dataSupervisionNotifyService.getSupervisionMapIconInfo(beginTime, endTime);
// JSONObject data = new JSONObject().fluentPut("superviseTempMapVoList", superviseTempMapVoList);
// return Result.success(data);
// }
/**
* 获取现场督察问题趋势
@ -142,102 +129,106 @@ public class SubOneSupervisionNotifyController {
* @param endTime 结束时间
* @return JSONObject
*/
@GetMapping("/getYellowBetDrug")
@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) {
// // 黄赌毒总览
// DayTimeSuperviseVo fxsjYellowBetOverview = subOneSupervisionNotifyService.getSubOneYellowBetOverview(beginTime, endTime, departId, 1);
// DayTimeSuperviseVo jsdwYellowBetOverview = subOneSupervisionNotifyService.getSubOneYellowBetOverview(beginTime, endTime, departId, 1);
// // 黄毒赌列表
// List<OrganizeProblemRankVo> fxsjYellowBetRankList = subOneSupervisionNotifyService.getSubOneYellowBetRankList(beginTime, endTime, departId, 1);
// List<OrganizeProblemRankVo> jsdwYellowBetRankList = subOneSupervisionNotifyService.getSubOneYellowBetRankList(beginTime, endTime, departId, 1);
//
// JSONObject data = new JSONObject()
// .fluentPut("fxsjYellowBetOverview", fxsjYellowBetOverview)
// .fluentPut("jsdwYellowBetOverview", jsdwYellowBetOverview)
// .fluentPut("fxsjYellowBetRankList", fxsjYellowBetRankList)
// .fluentPut("jsdwYellowBetRankList", jsdwYellowBetRankList);
return Result.success(null);
// 黄赌毒总览
DayTimeSuperviseVo fxsjYellowBetOverview = negativeMapper.getSubOnePoliceYellowBetOverview(beginTime, endTime, departId, 1);
DayTimeSuperviseVo jsdwYellowBetOverview = negativeMapper.getSubOneTeamYellowBetOverview(beginTime, endTime, departId, 1);
// 黄毒赌列表
List<OrganizeProblemRankVo> fxsjYellowBetRankList = negativeMapper.getSubOnePoliceYellowBetRankList(beginTime, endTime, departId, 1);
List<OrganizeProblemRankVo> jsdwYellowBetRankList = negativeMapper.getSubOneTeamYellowBetRankList(beginTime, endTime, departId, 1);
JSONObject data = new JSONObject()
.fluentPut("fxsjYellowBetOverview", fxsjYellowBetOverview)
.fluentPut("jsdwYellowBetOverview", jsdwYellowBetOverview)
.fluentPut("fxsjYellowBetRankList", fxsjYellowBetRankList)
.fluentPut("jsdwYellowBetRankList", jsdwYellowBetRankList);
return Result.success(data);
}
// 枪支管理数据
@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);
}
// 涉企问题数据
@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);
}
// 执法办案数据
@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);
}
// 工作日测酒数据
@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);
}
//
//
// // 枪支管理数据
// @GetMapping("/getGunController")
// public Result<JSONObject> getGunController(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// // 枪支管理总览
// DayTimeSuperviseVo fxsjGunControllerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 2);
// DayTimeSuperviseVo jsdwGunControllerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 2);
// // 枪支管理列表
// List<OrganizeProblemRankVo> fxsjGunControllerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 2);
// List<OrganizeProblemRankVo> jsdwGunControllerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 2);
//
// JSONObject data = new JSONObject()
// .fluentPut("fxsjGunControllerOverview", fxsjGunControllerOverview)
// .fluentPut("jsdwGunControllerOverview", jsdwGunControllerOverview)
// .fluentPut("fxsjGunControllerRankList", fxsjGunControllerRankList)
// .fluentPut("jsdwGunControllerRankList", jsdwGunControllerRankList);
// return Result.success(data);
// }
//
// // 涉企问题数据
// @GetMapping("/getCompanyProblem")
// public Result<JSONObject> getCompanyProblem(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// // 涉企问题总览
// DayTimeSuperviseVo fxsjCompanyProblemOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 3);
// DayTimeSuperviseVo jsdwCompanyProblemOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 3);
// // 涉企问题列表
// List<OrganizeProblemRankVo> fxsjCompanyProblemRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 3);
// List<OrganizeProblemRankVo> jsdwCompanyProblemRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 3);
//
// JSONObject data = new JSONObject()
// .fluentPut("fxsjCompanyProblemOverview", fxsjCompanyProblemOverview)
// .fluentPut("jsdwCompanyProblemOverview", jsdwCompanyProblemOverview)
// .fluentPut("fxsjCompanyProblemRankList", fxsjCompanyProblemRankList)
// .fluentPut("jsdwCompanyProblemRankList", jsdwCompanyProblemRankList);
// return Result.success(data);
// }
//
// // 执法办案数据
// @GetMapping("/getHandleCase")
// public Result<JSONObject> getHandleCase(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// // 执法办案总览
// DayTimeSuperviseVo fxsjHandleCaseOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 4);
// DayTimeSuperviseVo jsdwHandleCaseOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 4);
// // 执法办案列表
// List<OrganizeProblemRankVo> fxsjHandleCaseRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 4);
// List<OrganizeProblemRankVo> jsdwHandleCaseRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 4);
//
// JSONObject data = new JSONObject()
// .fluentPut("fxsjHandleCaseOverview", fxsjHandleCaseOverview)
// .fluentPut("jsdwHandleCaseOverview", jsdwHandleCaseOverview)
// .fluentPut("fxsjHandleCaseRankList", fxsjHandleCaseRankList)
// .fluentPut("jsdwHandleCaseRankList", jsdwHandleCaseRankList);
// return Result.success(data);
// }
//
//
// // 工作日测酒数据
// @GetMapping("/getCheckBeer")
// public Result<JSONObject> getCheckBeer(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
// @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// // 工作日测酒总览
// DayTimeSuperviseVo fxsjCheckBeerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 3, 5);
// DayTimeSuperviseVo jsdwCheckBeerOverview = dataSupervisionNotifyService.getYellowBetOverview(beginTime, endTime, 4, 5);
// // 工作日测酒列表
// List<OrganizeProblemRankVo> fxsjCheckBeerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 3, 5);
// List<OrganizeProblemRankVo> jsdwCheckBeerRankList = dataSupervisionNotifyService.getYellowBetRankList(beginTime, endTime, 4, 5);
//
// JSONObject data = new JSONObject()
// .fluentPut("fxsjCheckBeerOverview", fxsjCheckBeerOverview)
// .fluentPut("jsdwCheckBeerOverview", jsdwCheckBeerOverview)
// .fluentPut("fxsjCheckBeerRankList", fxsjCheckBeerRankList)
// .fluentPut("jsdwCheckBeerRankList", jsdwCheckBeerRankList);
// return Result.success(data);
// }
// endregion

21
src/main/java/com/biutag/supervision/controller/subdatav/SubOneVideoSuperviseController.java

@ -23,9 +23,9 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.SPDC;
/**
* @Auther: sh
* @Date: 2024/12/16 17:12
* @Description:
* @Description: 二级大屏视频督察
*/
@Tag(name = "视频督察子屏", description = "视频督察子屏")
@Tag(name = "二级大屏视频督察", description = "二级大屏视频督察")
@RestController
@RequiredArgsConstructor
@RequestMapping("datav/sub1/videoSupervise")
@ -33,13 +33,13 @@ public class SubOneVideoSuperviseController {
private final SubOneVideoSuperviseService subOneVideoSuperviseService;
// region 左边
@Operation(summary = "视频督察二级大屏问题数排名")
@GetMapping("/getSubOneVideoSuperviseProblemRank")
public Result<JSONObject> getSubOneVideoSuperviseProblemRank(@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 beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<OrganizeProblemRankVo> policeVideoSuperviseProblemRankList = subOneVideoSuperviseService.getSuboOneVideoSuperviseProblemRank(beginTime, endTime, 10, departId);
List<OrganizeProblemRankVo> teamVideoSuperviseProblemRankList = subOneVideoSuperviseService.getSuboOneVideoSuperviseProblemRank(beginTime, endTime, -1, departId);
JSONObject data = new JSONObject();
@ -47,7 +47,10 @@ public class SubOneVideoSuperviseController {
data.fluentPut("teamVideoSuperviseProblemRankList", teamVideoSuperviseProblemRankList);
return Result.success(data);
}
// endregion
// region 中间
/**
* 视频督察二级大屏中央总览数据
@ -75,17 +78,19 @@ public class SubOneVideoSuperviseController {
return Result.success(jsonObject);
}
// endregion
// region 右边
@Operation(summary = "视频督察二级数据大屏问题类型占比")
@GetMapping("/getSubOneVideoSuperviseProblemTypeRate")
public Result<JSONObject> getSubOneVideoSuperviseProblemTypeRate(@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 beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
List<EchartsVo> subOneVideoSuperviseProblemTypeRate = subOneVideoSuperviseService.getSubOneVideoSuperviseProblemTypeRate(departId, beginTime, endTime);
JSONObject jsonObject = new JSONObject().fluentPut("subOneVideoSuperviseProblemTypeRate", subOneVideoSuperviseProblemTypeRate);
return Result.success(jsonObject);
}
// endregion
}

209
src/main/java/com/biutag/supervision/mapper/NegativeMapper.java

@ -25,8 +25,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid= sd1.id " +
"WHERE ng.checkStatus<>3 " +
"AND ng.problemSourcesCode IN (2, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25) " +
"WHERE ng.problemSourcesCode IN (2, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd1.statistics_group_id = #{groupType} " +
"GROUP BY sd1.short_name " +
@ -41,6 +40,38 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> selectBusinessRate(Date beginTime, Date endTime);
// 中央总览
@Select("SELECT " +
"SUM( IF(problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30), 1, 0) ) AS totalPro, " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisionPro, " +
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerificationPro, " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS complaintPro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS talkPro, " +
"SUM( IF(problemSourcesCode IN (26),1, 0) ) AS auditPro " +
"FROM negative ng WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} ")
GlobalOverViewVo getAllGlobalCount(Date beginTime, Date endTime);
// 地图卡片
@Select("SELECT " +
"sd1.short_name AS `name`, " +
"sd1.id AS departId, " +
"COUNT( DISTINCT ng.id ) AS totalPro, " +
"SUM( IF(problemSourcesCode IN (13,15,16), 1, 0) ) AS supervisePro, " +
"SUM( IF(problemSourcesCode IN (17,18,19,20), 1, 0) ) AS caseVerifyPro, " +
"SUM( IF(problemSourcesCode IN (21,22,23,24,25),1, 0) ) AS mailPro, " +
"SUM( IF(problemSourcesCode IN (2),1, 0) ) AS policePro, " +
"SUM( IF(problemSourcesCode IN (26),1, 0) ) AS reviewPro " +
"FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"LEFT JOIN sup_depart sd1 ON sd.pid=sd1.id " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd1.statistics_group_id=3 " +
"AND problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30)\n" +
"GROUP BY sd1.short_name " +
"ORDER BY totalPro DESC;")
List<GlobalMapIconVo> getMapIcon(Date beginTime, Date endTime);
@Select("SELECT count(*) FROM negative ng INNER JOIN " +
" (" +
" SELECT sd.id, sd.pid, sd.name, sd1.short_name FROM sup_depart sd " +
@ -199,7 +230,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// endregion
// region 视频督察大屏
@Select("SELECT " +
"COUNT(DISTINCT ng.id) AS discoverProblem, " +
@ -283,7 +313,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) ) / count(DISTINCT ng.id)*100, 1 ), 0 ) AS rate " +
"FROM negative ng " +
"INNER JOIN negative_blame nb ON ng.id=nb.negativeId " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND problemSourcesCode in (17, 18, 19, 20) ")
CaseVerificationCountVo getAllCaseVerificationCount(Date beginTime, Date endTime);
@ -342,7 +372,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
// endregion
// region 首页大屏的子
// region 二级大屏首页大屏
List<RankVo> getCaseVerifyRank(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args);
SubOneOverViewVo getCaseVerifyOverView(Integer departPId, Integer statisticsGroupId, Date beginTime, Date endTime, String[] args);
@ -367,18 +397,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
SubOneOverViewVo getSubOneOverView(Integer departPId, Date beginTime, Date endTime);
// endregion
@Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " +
"COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT(DISTINCT nb.blameName) AS relativePer, " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changedRate " +
"FROM sup_depart sd " +
"INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE ng.checkStatus IN ('1','2') " +
"AND problemSourcesCode = 16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ")
VideoSuperviseCountVo getSubOneAllVideoSuperviseCount(Date beginTime, Date endTime, Integer departId);
// region 二级大屏视频督察
@Select("SELECT sd.short_name AS label, " +
"count(*) as `value` " +
@ -404,9 +423,21 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"ORDER BY `value` DESC ")
List<OrganizeProblemRankVo> getSuboOneVideoSuperviseTeamProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId);
List<EchartsVo> getSubOneVideoSuperviseTrend(String year, String problemCode, String departId);
@Select("SELECT COUNT(DISTINCT ng.id) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) AS changedProblem, " +
"COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT(DISTINCT nb.blameName) AS relativePer, " +
"IFNULL( ROUND((COUNT(DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL)) / COUNT(DISTINCT ng.id)) * 100, 1), 0) AS changedRate " +
"FROM sup_depart sd " +
"INNER JOIN negative ng ON sd.id = ng.involveDepartId AND sd.pid=#{departId} " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE ng.checkStatus IN ('1','2') " +
"AND problemSourcesCode = 16 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}; ")
VideoSuperviseCountVo getSubOneAllVideoSuperviseCount(Date beginTime, Date endTime, Integer departId);
@Select("SELECT npr.threeLevelContent AS `name`, " +
"COUNT(*) AS `value` " +
"FROM negative ng " +
@ -419,6 +450,10 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"GROUP BY npr.threeLevelContent ")
List<EchartsVo> getSubOneVideoSuperviseProblemTypeRate(Integer departId, Date beginTime, Date endTime);
// endregion
// region 二级大屏现场督察
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
@ -494,6 +529,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND problemSourcesCode IN (13, 15)")
SupervisionNotifyOverView getAllSubOneSupervisionNotifyCount(Integer departId, Date beginTime, Date endTime);
@Select("SELECT m.month_name AS `name`, IFNULL(COUNT(temp.id), 0) AS `value` FROM sup_month_monthname m " +
"LEFT JOIN " +
"( " +
@ -503,4 +539,141 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"GROUP by m.month_name " +
"ORDER BY m.month ASC;")
List<EchartsVo> getSubOneSupervisionTrend(Integer departId, String year);
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
"ROUND( count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) )/ count(DISTINCT(ng.id)) *100 , 1 ) AS rate " +
"FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE sd.pid=#{departId} " +
"AND sd.statistics_group_id =10 " +
"AND ng.checkStatus != 3 " +
"AND ng.problemSourcesCode =15 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND special_supervision=#{specialType} ")
DayTimeSuperviseVo getSubOnePoliceYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT count(DISTINCT(ng.id)) as proTotal, " +
"count(DISTINCT IF(ng.isRectifyCode = 0, ng.id, null) ) as changing, " +
"count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) ) as changed, " +
"ROUND( count(DISTINCT IF(ng.isRectifyCode = 1, ng.id, null) )/ count(DISTINCT(ng.id)) *100 , 1 ) AS rate " +
"FROM negative ng INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"WHERE sd.pid=#{departId} " +
"AND sd.statistics_group_id !=10 " +
"AND ng.checkStatus != 3 " +
"AND ng.problemSourcesCode =15 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND special_supervision=#{specialType} ")
DayTimeSuperviseVo getSubOneTeamYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"AND sd.pid = #{departId} AND sd.statistics_group_id=10 " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.checkStatus<>3 " +
"AND ng.problemSourcesCode = 15 " +
"AND special_supervision = #{specialType} " +
"GROUP BY label " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getSubOnePoliceYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType);
@Select("SELECT sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"AND sd.pid = #{departId} AND sd.statistics_group_id!=10 " +
"WHERE ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.checkStatus<>3 " +
"AND ng.problemSourcesCode = 15 " +
"AND special_supervision = #{specialType} " +
"GROUP BY label " +
"ORDER BY `value` DESC; ")
List<OrganizeProblemRankVo> getSubOneTeamYellowBetRankList(Date beginTime, Date endTime, Integer departId, Integer specialType);
// endregion
// region 二级大屏案件核查
@Select("SELECT sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id=10 " +
"AND problemSourcesCode IN (17,18,19,20) " +
"AND ng.checkStatus <>3 " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getPoliceCaseVerificationRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT sd.short_name AS label, " +
"COUNT(DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id!=10 " +
"AND problemSourcesCode IN (17,18,19,20) " +
"AND ng.checkStatus <>3 " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC")
List<OrganizeProblemRankVo> getTeamCaseVerificationRank(Date beginTime, Date endTime, Integer departId);
@Select("SELECT npr.threeLevelContent AS label, " +
"COUNT(*) AS `value` FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"INNER JOIN negative_problem_relation npr ON ng.id=npr.negativeId " +
"WHERE ng.checkStatus!=3 " +
"AND sd.pid = #{departId} " +
"AND ng.problemSourcesCode IN (17,18,19,20)\n" +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.businessTypeCode = #{businessType} " +
"GROUP BY npr.threeLevelContent " +
"ORDER BY `value` DESC ")
List<EchartsVo> getCaseProblemProperty(Date beginTime, Date endTime, Integer departId, Integer businessType);
@Select("SELECT COUNT(DISTINCT ng.id ) AS total, " +
"COUNT( DISTINCT IF(ng.checkStatus<>3, ng.id, NULL ) ) AS confirmed, " +
"COUNT( DISTINCT IF(nb.handleResultCode!=14, nb.blameId, NULL) ) AS dealCasePro, " +
"COUNT( DISTINCT nb.blameName ) AS punishPre, " +
"COUNT( DISTINCT ng.involveDepartId ) AS punishOrg, " +
"IFNULL(( COUNT( DISTINCT IF(ng.checkStatus<>3, ng.id, NULL ) )/COUNT(DISTINCT ng.id*100 , 1) ) ,0 ) as rate " +
"FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.pid=#{departId} ")
CaseVerificationCountVo getSuboOneAllCaseVerificationCount(Date beginTime, Date endTime, Integer departId);
@Select("SELECT sdps.label AS `name` , " +
"COUNT( DISTINCT ng.id ) AS `value` " +
"FROM negative ng " +
"LEFT JOIN sup_dict_problem_source sdps ON ng.problemSourcesCode= sdps.id " +
"INNER JOIN sup_depart sd ON ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"GROUP BY sdps.label")
List<EchartsVo> getSuboOneCaseSourceRate(Date beginTime, Date endTime, Integer departId);
@Select("SELECT nb.handleResultName AS `name`, " +
"COUNT( DISTINCT nb.blameId ) AS `value` " +
"FROM negative ng " +
"inner JOIN sup_depart sd on ng.involveDepartId=sd.id AND sd.pid=#{departId} " +
"INNER JOIN negative_blame nb ON ng.id=nb.negativeId " +
"WHERE nb.handleResultName IS NOT NULL " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode IN (17,18,19,20) " +
"AND ng.checkStatus <>3 " +
"GROUP BY nb.handleResultName")
List<EchartsVo> getSubOneDealSituation(Date beginTime, Date endTime, Integer departId);
List<EchartsVo> getSubOneCaseVerificationTrend(String year, String departId, String... args);
// endregion
}

19
src/main/java/com/biutag/supervision/pojo/vo/GlobalOverViewVo.java

@ -0,0 +1,19 @@
package com.biutag.supervision.pojo.vo;
import lombok.Data;
/**
* @Auther: sh
* @Date: 2024/12/18 18:20
* @Description: 首页大屏总览
*/
@Data
public class GlobalOverViewVo {
Long supervisionPro;
Long caseVerificationPro;
Long complaintPro;
Long talkPro; // 民意感知
Long auditPro;
Long totalPro;
}

31
src/main/java/com/biutag/supervision/service/CountyStreetDeptService.java

@ -1,13 +1,18 @@
package com.biutag.supervision.service;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.mapper.CountyStreetDeptMapper;
import com.biutag.supervision.pojo.entity.CountyStreetDept;
import com.biutag.supervision.pojo.vo.RankVo;
import com.google.gson.Gson;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author 舒云
@ -25,9 +30,31 @@ public class CountyStreetDeptService {
return res;
}
public List<CountyStreetDept> getSubOneStreetMap(Integer departPId) {
public JSONObject getSubOneStreetMap(Integer departPId) {
List<CountyStreetDept> res = countyStreetDeptMapper.getSubOneStreetMap(departPId);
return res;
Map<String, Object> geoJson = new HashMap<>();
geoJson.put("type", "FeatureCollection");
geoJson.put("name", "临时名字");
List<Map<String, Object>> features = new ArrayList<>();
for (CountyStreetDept dept : res) {
Map<String, Object> feature = new HashMap<>();
feature.put("type", "Feature"); // 第一个键值
Map<String, Object> properties = new HashMap<>();
properties.put("name", dept.getName());
properties.put("id", dept.getId());
feature.put("properties", properties); // 第二个键值
// log.info("===========现在的id是==============");
// log.info(dept.getId().toString());
feature.put("geometry", new Gson().fromJson(dept.getGeometry(), Object.class)); // 第三个键值
features.add(feature);
}
geoJson.put("features", features);
JSONObject jsonObject = new JSONObject();
jsonObject.put("geoJson", geoJson);
return jsonObject;
}

4
src/main/java/com/biutag/supervision/service/SubOneSupervisionNotifyService.java

@ -57,8 +57,6 @@ public class SubOneSupervisionNotifyService {
return res;
}
public DayTimeSuperviseVo getSubOneYellowBetOverview(Date beginTime, Date endTime, Integer departId, Integer groupId) {
return null;
}
}

25
src/main/resources/mapper/NegativeMapper.xml

@ -5,13 +5,14 @@
<mapper namespace="com.biutag.supervision.mapper.NegativeMapper">
<!-- 首页大屏 -->
<select id="getGlobalRecentlyTrendByMonth" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, IFNULL(COUNT(ng.id), 0) AS `value`
SELECT m.month_name AS name, COUNT(DISTINCT ng.id) AS `value`
FROM sup_month_monthname m
LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime, '%m') = m.month
LEFT JOIN negative ng ON DATE_FORMAT(ng.discoveryTime,'%m') = m.`month`
AND YEAR(ng.discoveryTime) = #{year}
AND checkStatus != 3
AND ng.problemSourcesCode IN (2,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30)
LEFT JOIN sup_depart sd ON ng.involveDepartId=sd.id
GROUP BY m.month_name
ORDER BY m.month ASC;
ORDER BY m.`month` ASC
</select>
<!-- 视频督察大屏问题趋势 -->
<select id="getVideoSuperviseTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
@ -39,7 +40,7 @@
ORDER BY m.month ASC;
</select>
<!-- 案件核查 -->
<!-- 案件核查问题趋势 -->
<select id="getCaseVerificationTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name AS `name`, IFNULL(COUNT(ng.id), 0) AS `value`
FROM sup_month_monthname m
@ -197,6 +198,20 @@
GROUP BY m.month_name
ORDER BY m.month ASC;
</select>
<!-- 案件核查二级大屏的问题趋势-->
<select id="getSubOneCaseVerificationTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT m.month_name as name, COUNT(DISTINCT temp.id) AS `value`
FROM sup_month_monthname m
LEFT JOIN (SELECT ng.*
FROM negative ng
INNER JOIN sup_depart sd ON ng.involveDepartId = sd.id AND sd.pid = #{departId}
WHERE YEAR(ng.discoveryTime) = #{year}
AND ng.checkStatus != 3
AND ng.problemSourcesCode IN (17, 18, 19, 20)) AS temp
ON DATE_FORMAT(temp.discoveryTime, '%m') = m.`month`
GROUP BY m.month_name
ORDER BY m.`month` asc
</select>
</mapper>

Loading…
Cancel
Save