Browse Source

Merge remote-tracking branch 'origin/master'

main
sjh 1 year ago
parent
commit
5d294540a0
  1. 2
      src/main/java/com/biutag/supervision/SupervisionApplication.java
  2. 29
      src/main/java/com/biutag/supervision/constants/enums/TrendEnum.java
  3. 18
      src/main/java/com/biutag/supervision/controller/datav/RiskDataController.java
  4. 44
      src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java
  5. 20
      src/main/java/com/biutag/supervision/mapper/NegativeBlameMapper.java
  6. 116
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  7. 2
      src/main/java/com/biutag/supervision/pojo/vo/BlamePerson.java
  8. 4
      src/main/java/com/biutag/supervision/pojo/vo/RankVo.java
  9. 21
      src/main/java/com/biutag/supervision/pojo/vo/RankVoSup.java
  10. 21
      src/main/java/com/biutag/supervision/pojo/vo/RankVoSupTwo.java
  11. 21
      src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java
  12. 141
      src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java
  13. 243
      src/main/java/com/biutag/supervision/service/ProblemSourceService.java
  14. 17
      src/main/java/com/biutag/supervision/service/RiskStatisticsService.java
  15. 8
      src/main/resources/application-local.yml

2
src/main/java/com/biutag/supervision/SupervisionApplication.java

@ -16,4 +16,4 @@ public class SupervisionApplication {
SpringApplication.run(SupervisionApplication.class, args);
}
}
}

29
src/main/java/com/biutag/supervision/constants/enums/TrendEnum.java

@ -0,0 +1,29 @@
package com.biutag.supervision.constants.enums;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
/**
* @Auther: sh
* @Date: 2024/11/16 19:34
* @Description:
*/
@Getter
@AllArgsConstructor
public enum TrendEnum {
DAY("日趋势", "1"),
WEEK("周趋势", "2"),
Month("月趋势", "3");
private String label;
private String value;
}

18
src/main/java/com/biutag/supervision/controller/datav/RiskDataController.java

@ -90,6 +90,22 @@ public class RiskDataController {
@GetMapping("/police/leader/negative/statistics")
public Result<List<RiskStatisticsVo>> policeLeaderNegativeStatistics() {
return Result.success(sourceService.personB());
return Result.success(sourceService.leader());
}
// **********问题率*************
@GetMapping("/area/rate/statistics")
public Result<List<RiskStatisticsVo>> areaRateStatistics() {
return Result.success(sourceService.statisticsGroupRate3());
}
@GetMapping("/org/rate/statistics")
public Result<List<RiskStatisticsVo>> orgRateStatistics() {
return Result.success(sourceService.statisticsGroupRate2());
}
@GetMapping("/org/car/rate/statistics")
public Result<List<RiskStatisticsVo>> orgCarRateStatistics() {
return Result.success(sourceService.statisticsGroupRate());
}
}

44
src/main/java/com/biutag/supervision/controller/datav/SupervisionNotifyController.java

@ -2,9 +2,7 @@ package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.CaseVerifDepart;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.RankVo;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.service.DataSupervisionNotifyServiceImpl;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -16,8 +14,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @Auther: sh
@ -43,18 +44,31 @@ public class SupervisionNotifyController {
public Result<JSONObject> getAllSupervisionNotifyCount(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
JSONObject overview = dataSupervisionNotifyService.getAllSupervisionNotifyCount(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("overview", overview);
//问题类型占比
List<EchartsVo> wtlxList = dataSupervisionNotifyService.getProblemTypeRatio(beginTime, endTime);
//
//地图数据
List<SuperviseMapIconVo> superviseTempMapVoList = dataSupervisionNotifyService.getsupervisionMapIconInfo(beginTime, endTime);
// 黄赌毒总览
// List<RankVo> hddzlList = dataSupervisionNotifyService.getYellowBet(beginTime, endTime);
// // 黄毒赌列表
List<RankVo> hddList = dataSupervisionNotifyService.getYellowBet(beginTime, endTime);
JSONObject data = new JSONObject().fluentPut("wtlxList", wtlxList)
.fluentPut("overview", overview)
.fluentPut("superviseTempMapVoList", superviseTempMapVoList)
.fluentPut("hddList", hddList);
return Result.success(data);
}
/**
* 获取日常督察排行
*
* @param groupType 分组类型 1: 分县市局 2: 局属单位
* @return
*/
@ -63,7 +77,13 @@ public class SupervisionNotifyController {
public Result<JSONObject> getChangedRank(@RequestParam Integer groupType,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
JSONObject rankOverview = dataSupervisionNotifyService.getDailySupervisionCount(groupType, beginTime, endTime);
RankVoSup temp = dataSupervisionNotifyService.getSuperversionRank(beginTime, endTime);
JSONObject rankOverview = new JSONObject()
.fluentPut("proTotal", temp.getProblemNumber())
.fluentPut("changing", temp.getRectifingNumber())
.fluentPut("changed", temp.getRectifedNumber())
.fluentPut("correctionRate", temp.getRectifyRate());
List<RankVo> changedRankList = dataSupervisionNotifyService.getChangedRateRank(groupType, beginTime, endTime);
JSONObject data = new JSONObject()
.fluentPut("rankOverview", rankOverview)
@ -72,8 +92,16 @@ public class SupervisionNotifyController {
}
/**
* 获取督察问题趋势
*/
@GetMapping("/getSupervisionTrend")
public Result<JSONObject> getSupervisionTrend(@RequestParam String year) {
String temp = year + "-11-30";
List<EchartsVo> supervisionTrend = dataSupervisionNotifyService.getSupervisionTrend(temp);
JSONObject data = new JSONObject().fluentPut("supervisionTrend", supervisionTrend);
return Result.success(data);
}
}

20
src/main/java/com/biutag/supervision/mapper/NegativeBlameMapper.java

@ -28,17 +28,29 @@ public interface NegativeBlameMapper extends BaseMapper<NegativeBlame> {
@Select(" SELECT blameIdCode, blameName, count(1) as number FROM `negative_blame` " +
" where blameIdCode is not null and LENGTH(blameIdCode) > 0 and ivPersonTypeCode = '1' " +
" where blameIdCode is not null and LENGTH(blameIdCode) > 0 and ivPersonTypeCode = '1' and crtTime > '2024-01-01 00:00:00' " +
" GROUP BY blameIdCode order by number desc limit 10")
List<BlamePerson> statisticsBlame();
@Select(" SELECT blameIdCode, blameName, count(1) as number FROM `negative_blame` " +
" where blameIdCode is not null and LENGTH(blameIdCode) > 0 and ivPersonTypeCode != '1' " +
" where blameIdCode is not null and LENGTH(blameIdCode) > 0 and ivPersonTypeCode != '1' and crtTime > '2024-01-01 00:00:00' " +
" GROUP BY blameIdCode order by number desc limit 10")
List<BlamePerson> statisticsBlame2();
@Select(" SELECT leadIdCode as blameIdCode, leadName as blameName, count(1) as number FROM `negative_blame` " +
" where leadIdCode is not null and LENGTH(leadIdCode) > 0 " +
@Select(" SELECT leadIdCode, leadName as blameName, count(distinct blameIdCode) as number FROM `negative_blame` " +
" where leadIdCode is not null and LENGTH(leadIdCode) > 0 and crtTime > '2024-01-01 00:00:00'" +
" GROUP BY leadIdCode order by number desc limit 10")
List<BlamePerson> statisticsBlame3();
@Select(" select blameName, blameIdCode, blameDepartId from `negative_blame` where crtTime > '2024-01-01 00:00:00' " +
" and blameIdCode is not null and blameDepartId is not null and length(blameIdCode) > 0 and length(blameDepartId) > 0 ")
List<NegativeBlame> selectBlameList();
@Select(" select blameName, blameIdCode, blameDepartId from `negative_blame` where crtTime > '2024-01-01 00:00:00' " +
" and blameIdCode is not null and blameDepartId is not null and length(blameIdCode) > 0 and length(blameDepartId) > 0 and ivPersonTypeCode = '1'")
List<NegativeBlame> selectBlameListIvPerson();
@Select(" select blameName, blameIdCode, blameDepartId from `negative_blame` where crtTime > '2024-01-01 00:00:00' " +
" and blameIdCode is not null and blameDepartId is not null and length(blameIdCode) > 0 and length(blameDepartId) > 0 and ivPersonTypeCode != '1'")
List<NegativeBlame> selectBlameListNotIvPerson();
}

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

@ -3,10 +3,7 @@ package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.entity.Negative;
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.RecentTrendByMonthVo;
import com.biutag.supervision.pojo.vo.*;
import org.apache.ibatis.annotations.Select;
import java.util.Date;
@ -114,7 +111,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
* @param endTime
* @return
*/
@Select("SELECT count(*) FROM negative WHERE checkStatus = #{checkStatus} " +
@Select("SELECT count(*) FROM negative WHERE checkStatus <> #{checkStatus} " +
"AND problemSourcesCode IN (13, 15) " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Long selectSupervisionNotifyCount(Date beginTime, Date endTime, String checkStatus);
@ -126,7 +123,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
* @param endTime
* @return
*/
@Select("SELECT count(*) FROM negative WHERE checkStatus = #{checkStatus} " +
@Select("SELECT count(*) FROM negative WHERE checkStatus <> #{checkStatus} " +
"AND problemSourcesCode IN (13, 15) " +
"AND isRectifyCode=#{isRectify}" +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
@ -142,8 +139,8 @@ public interface NegativeMapper extends BaseMapper<Negative> {
*/
@Select("SELECT count(*) FROM " +
" ( SELECT DISTINCT involveDepartName FROM negative " +
" WHERE checkStatus=1 AND problemSourcesCode in (13, 15) AND discoveryTime " +
" BETWEEN '2024-01-01' AND '2024-11-17'" +
" WHERE checkStatus<>3 AND problemSourcesCode in (13, 15) AND discoveryTime " +
" BETWEEN #{beginTime} AND #{endTime}" +
" )" +
"AS distinct_departments;")
Long selectRelationOrgCount(Date beginTime, Date endTime, String checkStatus);
@ -186,7 +183,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT count(*) FROM negative ng INNER JOIN " +
"(SELECT sd.id, sd.pid, sd.`name`, sd1.short_name FROM sup_depart sd INNER JOIN sup_depart sd1 " +
"ON sd.pid = sd1.id AND sd1.`level`=2 AND sd1.statistics_group_id=3) as temp\n" +
"ON sd.pid = sd1.id AND sd1.`level`=2 AND sd1.statistics_group_id=3) as temp " +
"ON ng.involveDepartId=temp.id " +
"AND pid=#{departId} " +
"AND problemSourcesCode= 13 " +
@ -194,6 +191,107 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Long getCountByGroupType(Date beginTime, Date endTime, String departId);
@Select("SELECT npr.oneLevelContent as name, count(*) value FROM negative ng, negative_problem_relation npr " +
"WHERE ng.id = npr.negativeId " +
"AND ng.problemSourcesCode in (13, 15) " +
"and ng.checkStatus<>3 " +
"AND ng.discoveryTime BETWEEN #{beginTime} AND #{endTime} " +
"AND oneLevelContent is NOT NULL " +
"GROUP BY oneLevelContent ")
List<EchartsVo> getProblemTypes(Date beginTime, Date endTime);
@Select("SELECT DATE_FORMAT(discoveryTime, '%m') AS `name`, COUNT(*) AS `value` FROM negative " +
"WHERE discoveryTime BETWEEN DATE_SUB(#{time}, INTERVAL 12 MONTH) AND #{time} " +
"AND checkStatus <> 3 " +
"AND problemSourcesCode in (13, 15) " +
"GROUP BY DATE_FORMAT(discoveryTime, '%Y-%m') " +
"ORDER BY DATE_FORMAT(discoveryTime, '%Y-%m');")
List<EchartsVo> getSupervisionTrend(String time);
@Select("SELECT count(*) FROM negative ng INNER JOIN " +
"(SELECT sd.id, sd.pid, sd.`name`, sd1.short_name FROM sup_depart sd INNER JOIN sup_depart sd1 " +
"ON sd.pid = sd1.id AND sd1.`level`=2 AND sd1.statistics_group_id=3) as temp " +
"ON ng.involveDepartId=temp.id " +
"AND pid=#{departId} " +
"AND problemSourcesCode in (13, 15) " +
"AND checkStatus <> 3 " +
"AND isRectifyCode =1 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Long getNotifyChanged(Date beginTime, Date endTime, String departId);
@Select("SELECT count(*) FROM negative ng INNER JOIN " +
"(SELECT sd.id, sd.pid, sd.`name`, sd1.short_name FROM sup_depart sd INNER JOIN sup_depart sd1 " +
"ON sd.pid = sd1.id AND sd1.`level`=2 AND sd1.statistics_group_id=3) as temp " +
"ON ng.involveDepartId=temp.id " +
"AND pid=#{departId} " +
"AND problemSourcesCode in (13, 15) " +
"AND checkStatus <> 3 " +
"AND isRectifyCode =0 " +
"AND discoveryTime BETWEEN #{beginTime} AND #{endTime}")
Long getNotifyChanging(Date beginTime, Date endTime, String departId);
@Select("")
Long getRelationOrgCountByDepartId(String departId);
@Select("SELECT a.departId, a.name, COUNT(DISTINCT c.id) AS totalPro, COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS changing, COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS changed, COUNT(DISTINCT c.involveDepartId) AS relationOrg, COUNT(DISTINCT d.blameIdCode) AS personNum, ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS changedRate\n" +
"FROM statistics_depart a INNER JOIN sup_depart b ON a.departId = b.pid " +
" INNER JOIN negative c ON b.id = c.involveDepartId " +
" LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"WHERE a.groupId = 3 AND discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15) " +
"GROUP BY a.name, a.departId")
List<SuperviseMapIconVo> getMap(Date beginTime, Date endTime);
@Select("SELECT a.name , " +
"COUNT(DISTINCT c.id) AS problem_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS rectifing_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS rectifed_number, " +
"COUNT(DISTINCT c.involveDepartId) AS depart_number, " +
"COUNT(DISTINCT d.blameIdCode) AS person_number, " +
"ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS rectify_rate " +
"FROM statistics_depart a INNER JOIN sup_depart b ON a.departId = b.pid " +
" INNER JOIN negative c ON b.id = c.involveDepartId " +
" LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"WHERE a.groupId = 3 AND discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND special_supervision = 1 " +
"GROUP BY a.name " +
"order by problem_number desc")
List<RankVoSupTwo> getYellowBet(Date beginTime, Date endTime);
@Select("SELECT COUNT(DISTINCT c.id) AS problem_number, COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS rectifing_number, COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS rectifed_number, COUNT(DISTINCT c.involveDepartId) AS depart_number, COUNT(DISTINCT d.blameIdCode) AS person_number, ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS rectify_rate " +
"FROM sup_depart b INNER JOIN negative c ON b.id = c.involveDepartId " +
" LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode = 13 ")
RankVoSup getSuperversionRank(Date beginTime, Date endTime);
@Select("SELECT a.name, " +
"COUNT(DISTINCT c.id) AS problem_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS rectifing_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS rectifed_number, " +
"COUNT(DISTINCT c.involveDepartId) AS depart_number, " +
"COUNT(DISTINCT d.blameIdCode) AS person_number, " +
"ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS rectify_rate " +
"FROM statistics_depart a INNER JOIN sup_depart b ON a.departId = b.pid " +
" INNER JOIN negative c ON b.id = c.involveDepartId " +
" LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"WHERE a.groupId = 3 AND discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode = 13 " +
"GROUP BY a.name " +
"order by rectify_rate desc")
List<RankVoSupTwo> getChangedRateRank(Date beginTime, Date endTime);
@Select("SELECT COUNT(DISTINCT c.id) AS problem_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 0, c.id, 0)) - 1 AS rectifing_number, " +
"COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1 AS rectifed_number, " +
"COUNT(DISTINCT c.involveDepartId) AS depart_number, COUNT(DISTINCT d.blameIdCode) AS person_number, " +
"ROUND((COUNT(DISTINCT IF(c.isRectifyCode = 1, c.id, 0)) - 1) / COUNT(DISTINCT c.id) * 100, 1) AS rectify_rate " +
"FROM sup_depart b INNER JOIN negative c ON b.id = c.involveDepartId " +
" LEFT JOIN negative_blame d ON c.id = d.negativeId " +
"WHERE discoveryTime BETWEEN #{beginTime} AND #{endTime} AND checkStatus IN ('1', '2') AND problemSourcesCode IN (13, 15)")
RankVoSupTwo getTemp(Date beginTime, Date endTime);
// endregion

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

@ -24,6 +24,8 @@ public class BlamePerson implements Serializable {
String blameIdCode;
String leadIdCode;
String blameName;
Integer number;

4
src/main/java/com/biutag/supervision/pojo/vo/RankVo.java

@ -12,8 +12,8 @@ public class RankVo {
private String label; // 部门名称
private String departId; // 部门id
private Double value; // 整改率
private Double rate; // 整改率
private String value; // 整改率
private String rate; // 整改率
private String numerator; // 分子 已整改
private String denominator; // 分母 问题数
}

21
src/main/java/com/biutag/supervision/pojo/vo/RankVoSup.java

@ -0,0 +1,21 @@
package com.biutag.supervision.pojo.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* @Auther: sh
* @Date: 2024/11/17 01:35
* @Description:
*/
@Data
@AllArgsConstructor
public class RankVoSup {
private String problemNumber; // 问题数
private String rectifingNumber; // 整改中
private String rectifedNumber; // 已整改
private String departNumber; // 部门数
private String personNumber; // 人员数
private String rectifyRate; // 整改率
}

21
src/main/java/com/biutag/supervision/pojo/vo/RankVoSupTwo.java

@ -0,0 +1,21 @@
package com.biutag.supervision.pojo.vo;
import lombok.Data;
/**
* @Auther: sh
* @Date: 2024/11/17 01:35
* @Description:
*/
@Data
public class RankVoSupTwo {
private String name; // 名字
private String rectifingNumber; // 整改中
private String rectifedNumber; // 已整改
private String departNumber; //
private String personNumber; // 人数
private String rectifyRate; // 整改率
private String problemNumber; // 问题数
}

21
src/main/java/com/biutag/supervision/pojo/vo/SuperviseMapIconVo.java

@ -0,0 +1,21 @@
package com.biutag.supervision.pojo.vo;
import lombok.Data;
/**
* @Auther: sh
* @Date: 2024/11/16 21:06
* @Description:
*/
@Data
public class SuperviseMapIconVo {
private String name; // 分县市局名
private String totalPro;
private String changing;
private String changed;
private String relationOrg;
private String changedRate;
private String personNum;
private String departId;
}

141
src/main/java/com/biutag/supervision/service/DataSupervisionNotifyServiceImpl.java

@ -16,13 +16,15 @@ import com.biutag.supervision.pojo.entity.DataSupervisionNotify;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeBlame;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.RankVo;
import com.biutag.supervision.pojo.vo.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.Intercept;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.IllegalFormatCodePointException;
import java.util.List;
import java.util.stream.Collectors;
@ -33,15 +35,12 @@ import java.util.stream.Collectors;
*/
@RequiredArgsConstructor
@Service
public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisionNotifyMapper, DataSupervisionNotify> {
@Slf4j
private final DataSupervisionNotifyMapper dataSupervisionNotifyMapper;
public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisionNotifyMapper, DataSupervisionNotify> {
private final NegativeMapper negativeMapper;
private final NegativeBlameMapper negativeBlameMapper;
private final NegativeBlameService blameService;
private final SupDepartMapper supDepartMapper;
/**
@ -54,35 +53,29 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio
*/
public JSONObject getAllSupervisionNotifyCount(Date beginTime, Date endTime) {
// 通报问题数
Long supervisionNotifyTotal = negativeMapper.selectSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue());
RankVoSupTwo res = negativeMapper.getTemp(beginTime, endTime);
if (res == null) {
return null;
}
// 通报问题数
String supervisionNotifyTotal = res.getProblemNumber();
log.info("通报问题数:{}", res.getProblemNumber());
// 整改中
Long supervisionNotifyChangingTotal = negativeMapper.selectChangSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue(), "0");
String supervisionNotifyChangingTotal = res.getRectifingNumber();
log.info("整改中:{}", res.getRectifingNumber());
// 已整改
Long supervisionNotifyChangedTotal = negativeMapper.selectChangSupervisionNotifyCount(beginTime, endTime, InspectCaseEnum.TRUE.getValue(), "1");
String supervisionNotifyChangedTotal = res.getRectifedNumber();
log.info("已整改:{}", res.getRectifedNumber());
// 涉及单位数
Long supervisionNotifyOrgTotal = negativeMapper.selectRelationOrgCount(beginTime, endTime, "1");
/**
* 涉及人数
* 1查出在 negative中的id集合
* 2查出集合在blame中的涉及人数
*/
QueryWrapper<Negative> preQueryWrapper = new QueryWrapper<>();
preQueryWrapper.in("problemSourcesCode", ProblemSourcesEnum.XCDC.getValue(), ProblemSourcesEnum.ZXDC.getValue());
List<Negative> negatives = negativeMapper.selectList(preQueryWrapper);
Long supervisionNotifyPreTotal = 0L;
for (Negative negative : negatives) {
String id = negative.getId();
QueryWrapper<NegativeBlame> totalWrapper = new QueryWrapper<>();
totalWrapper.eq("negativeId", id);
supervisionNotifyPreTotal += negativeBlameMapper.selectCount(totalWrapper);
}
// 整改率
double correctionRate = supervisionNotifyTotal != 0 ? (supervisionNotifyChangedTotal * 1.0 / supervisionNotifyTotal) * 100 : 0;
String supervisionNotifyOrgTotal = res.getDepartNumber();
log.info("涉及单位数:{}", res.getDepartNumber());
// 涉及人数
String supervisionNotifyPreTotal = res.getPersonNumber();
log.info("涉及人数:{}", res.getPersonNumber());
String correctionRate = res.getRectifyRate();
log.info("整改率:{}", res.getRectifyRate());
JSONObject jsonObject = new JSONObject();
jsonObject.fluentPut("supervisionNotifyTotal", supervisionNotifyTotal)
.fluentPut("supervisionNotifyOrgTotal", supervisionNotifyOrgTotal)
@ -125,41 +118,67 @@ public class DataSupervisionNotifyServiceImpl extends ServiceImpl<DataSupervisio
* @return
*/
public List<RankVo> getChangedRateRank(Integer groupType, Date beginTime, Date endTime) {
List<RankVo> rankVoRes = new ArrayList<>();
// 所有分局部门
List<SupDepart> departs = supDepartMapper.selectDepartsByGroupType(groupType);
for (SupDepart depart : departs) {
List<RankVoSupTwo> rankVoRes = negativeMapper.getChangedRateRank(beginTime, endTime);
List<RankVo> res = new ArrayList<>();
for (RankVoSupTwo one : rankVoRes) {
RankVo rankVo = new RankVo();
rankVo.setLabel(depart.getShortName());
rankVo.setDepartId(depart.getId());
rankVoRes.add(rankVo);
rankVo.setLabel(one.getName());
rankVo.setValue(one.getRectifyRate());
rankVo.setRate(one.getRectifyRate());
rankVo.setNumerator(one.getRectifedNumber());
rankVo.setDenominator(one.getProblemNumber());
res.add(rankVo);
}
for (RankVo rankVoRe : rankVoRes) {
String departId = rankVoRe.getDepartId();
Long changed = negativeMapper.getChangedCountByGroupType(beginTime, endTime, departId);
Long totalPro = negativeMapper.getCountByGroupType(beginTime, endTime, departId);
totalPro = totalPro == null ? 0L : totalPro;
changed = changed == null ? 0L : changed;
rankVoRe.setDenominator(totalPro.toString());
rankVoRe.setNumerator(changed.toString());
Double rate = totalPro != 0 ? (changed * 1.0 / totalPro) * 100 : 0;
int intRate = (int) Math.ceil(rate);
rankVoRe.setRate((double) intRate);
rankVoRe.setDenominator(totalPro.toString());
rankVoRe.setNumerator(changed.toString());
rankVoRe.setRate(rate);
rankVoRe.setValue(rate);
}
// 使用 Stream API 进行排序
rankVoRes = rankVoRes.stream().sorted((o1, o2) -> o2.getRate().compareTo(o1.getRate())).collect(Collectors.toList());
// 排序
return rankVoRes;
return res;
}
public List<EchartsVo> getProblemTypeRatio(Date beginTime, Date endTime) {
List<EchartsVo> echartsVos = new ArrayList<>();
List<EchartsVo> echartsVos = negativeMapper.getProblemTypes(beginTime, endTime);
return echartsVos;
}
public List<EchartsVo> getSupervisionTrend(String year) {
List<EchartsVo> echartsVos = negativeMapper.getSupervisionTrend(year);
return echartsVos;
}
return null;
/**
* 包括现场督察和专项
*
* @param beginTime
* @param endTime
* @return
*/
public List<SuperviseMapIconVo> getsupervisionMapIconInfo(Date beginTime, Date endTime) {
List<SuperviseMapIconVo> res = negativeMapper.getMap(beginTime, endTime);
return res;
}
public List<RankVo> getYellowBet(Date beginTime, Date endTime) {
List<RankVoSupTwo> res = negativeMapper.getYellowBet(beginTime, endTime);
List<RankVo> resv = new ArrayList<>();
if (res == null) {
return resv;
}
for (RankVoSupTwo re : res) {
log.info("名字===========" + re.getName() + "驼峰===============" + re.getProblemNumber() + "非驼峰" + re.getProblemNumber());
RankVo rankVo = new RankVo();
rankVo.setLabel(re.getName());
rankVo.setValue(re.getProblemNumber());
resv.add(rankVo);
}
return resv;
}
public RankVoSup getSuperversionRank(Date beginTime, Date endTime) {
RankVoSup res = negativeMapper.getSuperversionRank(beginTime, endTime);
if (res == null) {
return new RankVoSup("0", "0", "0", "0", "0", "0");
}
return res;
}
}

243
src/main/java/com/biutag/supervision/service/ProblemSourceService.java

@ -49,11 +49,10 @@ public class ProblemSourceService {
CompletableFuture.allOf(
CompletableFutureUtil.runSyncObject(() -> build.aTotal(businessDepartMapper.problemSum(List.of(1, 2), "2024-01-01 00:00:00"))),
CompletableFutureUtil.runSyncObject(() -> build.caseTotal(businessDepartMapper.problemSum(List.of(4, 5, 6), "2024-01-01 00:00:00"))),
CompletableFutureUtil.runSyncObject(() -> build.negativeTotal(negativeMapper.selectCount(new LambdaQueryWrapper<Negative>().in(Negative::getCheckStatus, List.of(1, 2))).intValue()))
CompletableFutureUtil.runSyncObject(() -> build.negativeTotal(negativeMapper.selectCount(new LambdaQueryWrapper<Negative>()
.in(Negative::getCheckStatus, List.of(1, 2)).ge(Negative::getCrtTime, LocalDateTime.of(2024, 1, 1, 0, 0, 0))).intValue()))
).join();
List<NegativeBlame> list = blameMapper.selectList(new LambdaQueryWrapper<NegativeBlame>()
.select(NegativeBlame::getBlameIdCode)
.isNotNull(NegativeBlame::getBlameIdCode));
List<NegativeBlame> list = blameMapper.selectBlameList();
Long count = list.stream().map(NegativeBlame::getBlameIdCode).distinct().count();
build.peopleCount(count.intValue());
ProblemSourceStatisticsVo vo = build.build();
@ -63,40 +62,6 @@ public class ProblemSourceService {
private final SupDepartMapper supDepartMapper;
/**
* @param type 类型 1- 风险值 2- 问题数 3-问题发生率
* @param businessType
*/
public void rankStatistics(Integer type, Integer businessType) {
List<SupDepart> departs = supDepartMapper.selectList(new LambdaQueryWrapper<SupDepart>()
.select(SupDepart::getId, SupDepart::getPid, SupDepart::getName, SupDepart::getLevel));
Map<String, SupDepart> departMap = departs.stream().collect(Collectors.toMap(SupDepart::getId, Function.identity(), (oldValue, newValue) -> newValue));
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>()
.in(Negative::getCheckStatus, List.of(1, 2)));
Map<String, Integer> mapLevel3 = new HashMap<>();
Map<String, Integer> mapLevel2 = new HashMap<>();
for (Negative negative : negatives) {
SupDepart depart = departMap.get(negative.getInvolveDepartId());
if (depart == null) {
continue;
}
if (depart.getLevel() == 3) {
Integer count = Optional.ofNullable(mapLevel3.get(negative.getInvolveDepartId())).orElse(0);
count++;
mapLevel3.put(negative.getInvolveDepartId(), count);
depart = departMap.get(depart.getPid());
}
if (depart.getLevel() == 2) {
Integer count = Optional.ofNullable(mapLevel2.get(negative.getInvolveDepartId())).orElse(0);
count++;
mapLevel2.put(negative.getInvolveDepartId(), count);
}
}
}
private final StatisticsGroupMapper statisticsGroupMapper;
private final StatisticsDepartMapper departMapper;
@ -104,7 +69,7 @@ public class ProblemSourceService {
public List<RiskStatisticsVo> statisticsGroupRank() {
StatisticsGroup group = statisticsGroupMapper
.selectOne(new LambdaQueryWrapper<StatisticsGroup>()
.eq(StatisticsGroup::getName, "交警大队").last("limit 1"));
.eq(StatisticsGroup::getName, "交警大队").last("limit 1"));
List<StatisticsDepart> list = departMapper.selectList(new LambdaQueryWrapper<StatisticsDepart>()
.eq(StatisticsDepart::getLevel, 3)
@ -113,6 +78,7 @@ public class ProblemSourceService {
Map<String, StatisticsDepart> departMap = list.stream().collect(Collectors.toMap(StatisticsDepart::getDepartId, Function.identity(), (oldValue, newValue) -> newValue));
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>()
.ge(Negative::getCrtTime, LocalDateTime.of(2024, 1, 1, 0, 0, 0))
.in(Negative::getCheckStatus, List.of(1, 2)));
Map<String, Integer> mapLevel3 = new HashMap<>();
for (Negative negative : negatives) {
@ -131,8 +97,8 @@ public class ProblemSourceService {
vo.add(v);
}
vo.sort(Comparator.comparing(RiskStatisticsVo::getValue, Comparator.reverseOrder()));
if(vo.size() > 10) {
return vo.subList(0,10);
if (vo.size() > 10) {
return vo.subList(0, 10);
}
return vo;
}
@ -151,6 +117,7 @@ public class ProblemSourceService {
Map<String, StatisticsDepart> departMap = list.stream().collect(Collectors.toMap(StatisticsDepart::getDepartId, Function.identity(), (oldValue, newValue) -> newValue));
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>()
.ge(Negative::getCrtTime, LocalDateTime.of(2024, 1, 1, 0, 0, 0))
.in(Negative::getCheckStatus, List.of(1, 2)));
Map<String, Integer> mapLevel3 = new HashMap<>();
for (Negative negative : negatives) {
@ -169,8 +136,8 @@ public class ProblemSourceService {
vo.add(v);
}
vo.sort(Comparator.comparing(RiskStatisticsVo::getValue, Comparator.reverseOrder()));
if(vo.size() > 10) {
return vo.subList(0,10);
if (vo.size() > 10) {
return vo.subList(0, 10);
}
return vo;
}
@ -191,6 +158,7 @@ public class ProblemSourceService {
Map<String, SupDepart> areaMap = departs.stream().collect(Collectors.toMap(SupDepart::getId, Function.identity(), (oldValue, newValue) -> newValue));
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>()
.ge(Negative::getCrtTime, LocalDateTime.of(2024, 1, 1, 0, 0, 0))
.in(Negative::getCheckStatus, List.of(1, 2)));
Map<String, Integer> mapLevel3 = new HashMap<>();
for (Negative negative : negatives) {
@ -204,7 +172,7 @@ public class ProblemSourceService {
}
Integer count = Optional.ofNullable(mapLevel3.get(area.getId())).orElse(0);
count++;
mapLevel3.put(negative.getInvolveDepartId(), count);
mapLevel3.put(area.getId(), count);
}
List<RiskStatisticsVo> vo = new ArrayList<>();
for (Map.Entry<String, Integer> entry : mapLevel3.entrySet()) {
@ -229,6 +197,193 @@ public class ProblemSourceService {
return trans(blameMapper.statisticsBlame3());
}
// 交警人均率
public List<RiskStatisticsVo> statisticsGroupRate() {
StatisticsGroup group = statisticsGroupMapper
.selectOne(new LambdaQueryWrapper<StatisticsGroup>()
.eq(StatisticsGroup::getName, "交警大队").last("limit 1"));
List<StatisticsDepart> list = departMapper.selectList(new LambdaQueryWrapper<StatisticsDepart>()
.eq(StatisticsDepart::getLevel, 3)
.eq(StatisticsDepart::getGroupId, group.getGroupId()));
Map<String, StatisticsDepart> departMap = list.stream().collect(Collectors.toMap(StatisticsDepart::getDepartId, Function.identity(), (oldValue, newValue) -> newValue));
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>()
.ge(Negative::getCrtTime, LocalDateTime.of(2024, 1, 1, 0, 0, 0))
.in(Negative::getCheckStatus, List.of(1, 2)));
// *********问题数**********
Map<String, Integer> mapLevel3 = new HashMap<>();
for (Negative negative : negatives) {
if (departMap.get(negative.getInvolveDepartId()) == null) {
continue;
}
Integer count = Optional.ofNullable(mapLevel3.get(negative.getInvolveDepartId())).orElse(0);
count++;
mapLevel3.put(negative.getInvolveDepartId(), count);
}
// *********问题人数**********
Map<String, Integer> mapPeopleCount = new HashMap<>();
Map<String, String> mapPerson = new HashMap<>();
List<NegativeBlame> tmp = blameMapper.selectBlameList();
for (NegativeBlame negativeBlame : tmp) {
if (departMap.get(negativeBlame.getBlameDepartId()) == null) {
continue;
}
if (mapPerson.get(negativeBlame.getBlameIdCode()) != null) {
continue;
}
Integer count = Optional.ofNullable(mapPeopleCount.get(negativeBlame.getBlameDepartId())).orElse(0);
count++;
mapPeopleCount.put(negativeBlame.getBlameDepartId(), count);
}
mapPerson = null;
// 统计
List<RiskStatisticsVo> vo = new ArrayList<>();
for (Map.Entry<String, Integer> entry : mapLevel3.entrySet()) {
Integer humanCount = mapPeopleCount.get(entry.getKey());
if (humanCount == null) continue;
RiskStatisticsVo v = new RiskStatisticsVo();
v.setName(departMap.get(entry.getKey()).getName().replaceFirst("湖南省长沙市公安局", "").replaceFirst("湖南省长沙市", "").replaceFirst("湖南省", ""));
v.setScore(new BigDecimal(entry.getValue().toString()).divide(new BigDecimal(humanCount.toString()), 2, RoundingMode.UP).doubleValue());
vo.add(v);
}
vo.sort(Comparator.comparing(RiskStatisticsVo::getScore, Comparator.reverseOrder()));
if (vo.size() > 10) {
return vo.subList(0, 10);
}
return vo;
}
// 派出所
public List<RiskStatisticsVo> statisticsGroupRate2() {
StatisticsGroup group = statisticsGroupMapper.selectOne(new LambdaQueryWrapper<StatisticsGroup>()
.eq(StatisticsGroup::getName, "派出所").last("limit 1"));
List<StatisticsDepart> list = departMapper.selectList(new LambdaQueryWrapper<StatisticsDepart>()
.eq(StatisticsDepart::getLevel, 3)
.eq(StatisticsDepart::getGroupId, group.getGroupId()));
Map<String, StatisticsDepart> departMap = list.stream().collect(Collectors.toMap(StatisticsDepart::getDepartId, Function.identity(), (oldValue, newValue) -> newValue));
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>()
.ge(Negative::getCrtTime, LocalDateTime.of(2024, 1, 1, 0, 0, 0))
.in(Negative::getCheckStatus, List.of(1, 2)));
Map<String, Integer> mapLevel3 = new HashMap<>();
for (Negative negative : negatives) {
if (departMap.get(negative.getInvolveDepartId()) == null) {
continue;
}
Integer count = Optional.ofNullable(mapLevel3.get(negative.getInvolveDepartId())).orElse(0);
count++;
mapLevel3.put(negative.getInvolveDepartId(), count);
}
// *********问题人数**********
Map<String, Integer> mapPeopleCount = new HashMap<>();
Map<String, String> mapPerson = new HashMap<>();
List<NegativeBlame> tmp = blameMapper.selectBlameList();
for (NegativeBlame negativeBlame : tmp) {
if (departMap.get(negativeBlame.getBlameDepartId()) == null) {
continue;
}
if (mapPerson.get(negativeBlame.getBlameIdCode()) != null) {
continue;
}
Integer count = Optional.ofNullable(mapPeopleCount.get(negativeBlame.getBlameDepartId())).orElse(0);
count++;
mapPeopleCount.put(negativeBlame.getBlameDepartId(), count);
}
mapPerson = null;
// 统计
List<RiskStatisticsVo> vo = new ArrayList<>();
for (Map.Entry<String, Integer> entry : mapLevel3.entrySet()) {
Integer humanCount = mapPeopleCount.get(entry.getKey());
if (humanCount == null) continue;
RiskStatisticsVo v = new RiskStatisticsVo();
v.setName(departMap.get(entry.getKey()).getName().replaceFirst("湖南省长沙市公安局", "").replaceFirst("湖南省长沙市", "").replaceFirst("湖南省", ""));
v.setScore(new BigDecimal(entry.getValue().toString()).divide(new BigDecimal(humanCount.toString()), 2, RoundingMode.UP).doubleValue());
vo.add(v);
}
vo.sort(Comparator.comparing(RiskStatisticsVo::getScore, Comparator.reverseOrder()));
if (vo.size() > 10) {
return vo.subList(0, 10);
}
return vo;
}
// 分县
public List<RiskStatisticsVo> statisticsGroupRate3() {
StatisticsGroup group = statisticsGroupMapper.selectOne(new LambdaQueryWrapper<StatisticsGroup>()
.eq(StatisticsGroup::getName, "派出所").last("limit 1"));
List<StatisticsDepart> list = departMapper.selectList(new LambdaQueryWrapper<StatisticsDepart>()
.eq(StatisticsDepart::getLevel, 3)
.eq(StatisticsDepart::getGroupId, group.getGroupId()));
Map<String, StatisticsDepart> departMap = list.stream().collect(Collectors.toMap(StatisticsDepart::getDepartId, Function.identity(), (oldValue, newValue) -> newValue));
List<SupDepart> departs = supDepartMapper.selectList(new LambdaQueryWrapper<SupDepart>()
.eq(SupDepart::getLevel, 2)
.select(SupDepart::getId, SupDepart::getPid, SupDepart::getName, SupDepart::getLevel));
Map<String, SupDepart> areaMap = departs.stream().collect(Collectors.toMap(SupDepart::getId, Function.identity(), (oldValue, newValue) -> newValue));
List<Negative> negatives = negativeMapper.selectList(new LambdaQueryWrapper<Negative>()
.ge(Negative::getCrtTime, LocalDateTime.of(2024, 1, 1, 0, 0, 0))
.in(Negative::getCheckStatus, List.of(1, 2)));
Map<String, Integer> mapLevel3 = new HashMap<>();
for (Negative negative : negatives) {
StatisticsDepart depart = departMap.get(negative.getInvolveDepartId());
if (depart == null) {
continue;
}
SupDepart area = areaMap.get(depart.getPid());
if (area == null) {
continue;
}
Integer count = Optional.ofNullable(mapLevel3.get(area.getId())).orElse(0);
count++;
mapLevel3.put(area.getId(), count);
}
Map<String, Integer> mapPeopleCount = new HashMap<>();
Map<String, String> mapPerson = new HashMap<>();
List<NegativeBlame> tmp = blameMapper.selectBlameList();
for (NegativeBlame negativeBlame : tmp) {
StatisticsDepart depart = departMap.get(negativeBlame.getBlameDepartId());
if (depart == null) {
continue;
}
SupDepart area = areaMap.get(depart.getPid());
if (area == null) {
continue;
}
if (mapPerson.get(negativeBlame.getBlameIdCode()) != null) {
continue;
}
Integer count = Optional.ofNullable(mapPeopleCount.get(depart.getPid())).orElse(0);
count++;
mapPeopleCount.put(depart.getPid(), count);
}
mapPerson = null;
// 统计
List<RiskStatisticsVo> vo = new ArrayList<>();
for (Map.Entry<String, Integer> entry : mapLevel3.entrySet()) {
Integer humanCount = mapPeopleCount.get(entry.getKey());
if (humanCount == null) continue;
RiskStatisticsVo v = new RiskStatisticsVo();
v.setName(areaMap.get(entry.getKey()).getName().replaceFirst("湖南省长沙市公安局", "").replaceFirst("湖南省长沙市", "").replaceFirst("湖南省", ""));
v.setScore(new BigDecimal(entry.getValue().toString()).divide(new BigDecimal(humanCount.toString()), 2, RoundingMode.UP).doubleValue());
vo.add(v);
}
vo.sort(Comparator.comparing(RiskStatisticsVo::getScore, Comparator.reverseOrder()));
return vo;
}
List<RiskStatisticsVo> trans(List<BlamePerson> list) {
List<RiskStatisticsVo> vo = new ArrayList<>();
for (BlamePerson blamePerson : list) {

17
src/main/java/com/biutag/supervision/service/RiskStatisticsService.java

@ -10,6 +10,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -92,6 +93,7 @@ public class RiskStatisticsService {
tmp.setName(depart.getName().replaceFirst("湖南省长沙市公安局", "").replaceFirst("湖南省长沙市", "").replaceFirst("湖南省", ""));
result.add(tmp);
}
result.sort(Comparator.comparing(RiskStatisticsVo::getScore, Comparator.reverseOrder()));
return result;
}
@ -105,10 +107,7 @@ public class RiskStatisticsService {
* @return
*/
public List<RiskStatisticsVo> personStatistics() {
List<NegativeBlame> blames = blameMapper.selectList(new LambdaQueryWrapper<NegativeBlame>()
.select(NegativeBlame::getBlameName, NegativeBlame::getBlameIdCode)
.isNotNull(NegativeBlame::getBlameIdCode)
.eq(NegativeBlame::getIvPersonTypeCode, "1"));
List<NegativeBlame> blames = blameMapper.selectBlameListIvPerson();
Map<String, NegativeBlame> blameMap = blames.stream().collect(Collectors.toMap(NegativeBlame::getBlameIdCode, Function.identity(), (oldValue, newValue) -> newValue));
List<RiskStatisticsVo> list = policeMapper.statisticsPolice();
for (RiskStatisticsVo riskStatisticsVo : list) {
@ -127,10 +126,7 @@ public class RiskStatisticsService {
* @return
*/
public List<RiskStatisticsVo> personStatistics2() {
List<NegativeBlame> blames = blameMapper.selectList(new LambdaQueryWrapper<NegativeBlame>()
.select(NegativeBlame::getBlameName, NegativeBlame::getBlameIdCode)
.isNotNull(NegativeBlame::getBlameIdCode)
.ne(NegativeBlame::getIvPersonTypeCode, "1"));
List<NegativeBlame> blames = blameMapper.selectBlameListNotIvPerson();
Map<String, NegativeBlame> blameMap = blames.stream().collect(Collectors.toMap(NegativeBlame::getBlameIdCode, Function.identity(), (oldValue, newValue) -> newValue));
List<RiskStatisticsVo> list = policeMapper.statisticsPolice2();
for (RiskStatisticsVo riskStatisticsVo : list) {
@ -149,10 +145,7 @@ public class RiskStatisticsService {
* @return
*/
public List<RiskStatisticsVo> leaderStatistics() {
List<NegativeBlame> blames = blameMapper.selectList(new LambdaQueryWrapper<NegativeBlame>()
.select(NegativeBlame::getLeadIdCode, NegativeBlame::getLeadName)
.isNotNull(NegativeBlame::getLeadIdCode)
.ne(NegativeBlame::getIvPersonTypeCode, "1"));
List<NegativeBlame> blames = blameMapper.selectBlameList();
Map<String, NegativeBlame> blameMap = blames.stream().collect(Collectors.toMap(NegativeBlame::getLeadIdCode, Function.identity(), (oldValue, newValue) -> newValue));
List<RiskStatisticsVo> list = policeMapper.statisticsLeader();
for (RiskStatisticsVo riskStatisticsVo : list) {

8
src/main/resources/application-local.yml

@ -14,10 +14,10 @@ spring:
password: ip12341234
data:
redis:
host: 127.0.0.1
host: 172.31.217.20
# 端口,默认为6379
port: 6379
password: 123456
port: 30079
password: ip1234!@#$
#mybatis-plus:
# configuration:
@ -33,4 +33,4 @@ springdoc:
- group: 'plugin'
paths-to-match:
- '/api/plugin/**'
- '/login'
- '/login'

Loading…
Cancel
Save