Browse Source

fix--修改首页二级大屏1.1

master
buaixuexideshitongxue 1 month ago
parent
commit
b4c197f74d
  1. 37
      src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java
  2. 187
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  3. 6
      src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java
  4. 7
      src/main/java/com/biutag/supervision/service/subDatav/SubDatavService.java
  5. 199
      src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java
  6. 16
      src/main/resources/mapper/SupTaskProblemMapper.xml

37
src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java

@ -2,19 +2,12 @@ package com.biutag.supervision.controller.subdatav;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.mapper.NegativeMapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest;
import com.biutag.supervision.pojo.vo.EchartsVo;
import com.biutag.supervision.pojo.vo.GlobalMapIconVo;
import com.biutag.supervision.pojo.vo.MailOverviewVo;
import com.biutag.supervision.pojo.vo.StrongProblemRank;
import com.biutag.supervision.service.CountyStreetDeptService;
import com.biutag.supervision.service.DataMailService;
import com.biutag.supervision.service.NegativeService;
import com.biutag.supervision.service.subDatav.SubDatavService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -27,6 +20,8 @@ import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.ALL;
/**
* @Auther: sh
* @Date: 2024/12/4 16:30
@ -42,8 +37,6 @@ public class SubOneGlobalController {
private final NegativeMapper negativeMapper;
private final CountyStreetDeptService countyStreetDeptService;
private final DataMailService dataMailService;
private final NegativeService negativeService;
@Resource
@ -93,33 +86,17 @@ public class SubOneGlobalController {
@Operation(summary = "首页大屏地图数据")
@GetMapping("/getSubOneGlobalMap")
public Result<JSONObject> getSubOneMap(@RequestParam Integer departId,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) {
// 地图数据
List<GlobalMapIconVo> globalMapIconVoList = negativeMapper.getSubOneGlobalMap(beginTime, endTime, departId);
globalMapIconVoList.forEach(s->{
long mailboxNumber = negativeService.count(new LambdaQueryWrapper<Negative>()
.between(Negative::getCrtTime, beginTime, endTime)
.eq(Negative::getProblemSourcesCode, ProblemSourcesEnum.JZXX.getValue())
.eq(Negative::getThreeInvolveDepartId,s.getDepartId())
);
s.setMailboxNumber(mailboxNumber);
MailOverviewVo vo = dataMailService.mailCount(Integer.valueOf(s.getDepartId()),beginTime, endTime);
s.setComplaintPro(vo.getCountryMail() + vo.getPoliceMail() + vo.getNumberMail());
});
JSONObject data = new JSONObject().fluentPut("globalTempMapVoList", globalMapIconVoList);
return Result.success(data);
@PostMapping("/getSubOneGlobalMap")
public Result<JSONObject> getSubOneGlobalMap(@RequestBody SubDataVRequest request) {
return subDatavService.getSubOneGlobalMap(request);
}
@Operation(summary = "数据大屏问题趋势统计")
@GetMapping("/getSubOneGlobalTrend")
public Result<JSONObject> getSubOneGlobalTrend(@RequestParam Integer departId, @RequestParam Integer year) {
List<EchartsVo> GlobalRecentlyTrendList = negativeMapper.getSubOneTrend(departId.toString(), year.toString());
List<EchartsVo> GlobalRecentlyTrendList = negativeMapper.selectMonthStatByYear(year, departId.toString(), ALL);
JSONObject jsonObject = new JSONObject().fluentPut("globalRecentlyTrendList", GlobalRecentlyTrendList);
return Result.success(jsonObject);
}

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

@ -161,80 +161,8 @@ public interface NegativeMapper extends BaseMapper<Negative> {
@Select("SELECT " +
" d.short_name name, " +
" d.id departId, " +
" t1.total, " +
" t.confirmed, " +
" t.dealCasePro, " +
" t.punishPre, " +
" t.punishOrg, " +
"CASE WHEN t1.total = 0 THEN 0 ELSE ROUND(t.confirmed / t1.total * 100) END rate " +
"FROM " +
" sup_depart d " +
" LEFT JOIN ( " +
" SELECT " +
" a.second_involve_depart_id, " +
" count( DISTINCT a.id ) confirmed, " +
" count( DISTINCT IF ( a.checkStatus IN ( '1', '2' ), a.id, NULL ) ) dealCasePro, " +
" count( DISTINCT IF ( a.processing_status = 'completed', a.id, NULL ) ) completionProblem, " +
" count( " +
" DISTINCT " +
" IF " +
" ( " +
" b.type = 'personal' " +
" AND b.handleResultName != '不予追责' " +
" AND b.handleResultCode IS NOT NULL " +
" AND b.handleResultCode != '', " +
" b.blameId, " +
" NULL " +
" ) " +
" ) punishPre, " +
" count( " +
" DISTINCT " +
" IF " +
" ( " +
" b.type = 'department' " +
" AND b.handleResultName != '不予追责' " +
" AND b.handleResultCode IS NOT NULL " +
" AND b.handleResultCode != '', " +
" b.blameEmpNo, " +
" NULL " +
" ) " +
" ) punishOrg " +
" FROM " +
" negative a " +
" JOIN negative_blame b ON a.id = b.negativeId " +
" WHERE " +
" a.crtTime BETWEEN #{beginTime} AND #{endTime} " +
" AND a.problemSourcesCode IN ( 17, 18, 19, 20 ) " +
" GROUP BY " +
" a.second_involve_depart_id " +
" ) t ON d.id = t.second_involve_depart_id " +
" LEFT JOIN ( SELECT second_depart_id, count( 1 ) total FROM data_case_verif WHERE create_time BETWEEN #{beginTime} AND #{endTime} GROUP BY second_depart_id ) t1 ON d.id = t1.second_depart_id " +
"WHERE " +
" d.statistics_group_id = 3 " +
"GROUP BY " +
" d.short_name, " +
" d.id")
List<CaseVerificationMapVo> getCaseVerificationMap(Date beginTime, Date endTime);
@Select("SELECT nb.handleResultName as `name`, count(*) as `value` " +
"FROM negative ng " +
"INNER JOIN negative_blame nb ON nb.negativeId=ng.id " +
"WHERE handleResultName is NOT NULL " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND ng.problemSourcesCode in (17, 18, 19, 20) " +
"AND ng.check_status_code in (1, 2, 3) " +
"GROUP BY nb.handleResultName")
List<EchartsVo> getDealSituation(Date beginTime, Date endTime);
List<EchartsVo> getMailTrend(Integer year, Integer type);
List<EchartsVo> getSubOneTrend(String departId, String year);
@ -280,10 +208,10 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN sup_depart sd on ng.involveDepartId = sd.id " +
"LEFT JOIN sup_depart sdd on sd.pid = sdd.id " +
"LEFT JOIN sup_depart sddd on sdd.pid = sddd.id " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime}" +
"WHERE npr.threeLevelContent is not NULL " +
"AND ng.check_status_code IN (1, 2, 3) " +
"AND (sd.id = #{departId} or sdd.id= #{departId} or sddd.id = #{departId} ) " +
"AND ng.crtTime >= #{beginTime} and ng.crtTime < #{endTime} " +
"GROUP BY npr.threeLevelContent " +
"ORDER BY `value` desc " +
" LIMIT 10 OFFSET 1")
@ -298,7 +226,7 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"LEFT JOIN sup_depart sdd on sd.pid = sdd.id " +
"LEFT JOIN sup_depart sddd on sdd.pid = sddd.id " +
"WHERE ng.check_status_code IN (1, 2, 3) " +
"AND crtTime >= #{beginTime} < #{endTime} " +
"AND ng.crtTime >= #{beginTime} and ng.crtTime < #{endTime} " +
"AND npr.oneLevelContent is not NULL " +
"AND (sd.id = #{departId} or sdd.id= #{departId} or sddd.id = #{departId} ) " +
"GROUP BY npr.oneLevelContent " +
@ -306,48 +234,9 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> selectSubOneProblemRate(Integer departId, Date beginTime, Date endTime);
// region 二级大屏视频督察
@Select("SELECT sd.short_name AS label, " +
"count(*) as `value` " +
" FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"AND ng.second_involve_depart_id=#{departId} AND sd.statistics_group_id=10 " +
"WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"and ng.three_involve_depart_id is not null " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC ")
List<OrganizeProblemRankVo> getSuboOneVideoSupervisePoliceProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId);
@Select("SELECT sd.short_name AS label, " +
"count(*) as `value` " +
" FROM negative ng " +
"INNER JOIN sup_depart sd ON ng.three_involve_depart_id=sd.id " +
"AND ng.second_involve_depart_id=#{departId} AND sd.statistics_group_id!=10 " +
"WHERE checkStatus <> 3 " +
"AND problemSourcesCode=16 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"and ng.three_involve_depart_id is not null " +
"GROUP BY sd.short_name " +
"ORDER BY `value` DESC ")
List<OrganizeProblemRankVo> getSuboOneVideoSuperviseTeamProblemRank(Date beginTime, Date endTime, Integer groupId, Integer departId);
List<EchartsVo> getSubOneVideoSuperviseTrend(@Param("year") String year, @Param("problemCode") String problemCode, @Param("departIds") List<String> departIds);
@Select("SELECT " +
"COUNT(DISTINCT ng.id) total, " +
"COUNT(DISTINCT IF(ng.checkStatus IN ('1','2'), ng.id, NULL)) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL)) AS completionProblem, " +
"COUNT(IF(nb.type ='department' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS relativeOrg, " +
"COUNT(IF(nb.type ='personal' and ng.checkStatus IN ('1','2') and nb.handleResultName != '不予追责' and nb.handleResultCode is not null and nb.handleResultCode != '', nb.blameId, NULL)) AS relativePer " +
"FROM negative ng " +
"LEFT JOIN negative_blame nb ON ng.id = nb.negativeId " +
"WHERE problemSourcesCode = 16 and ng.second_involve_depart_id = #{departId} " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} ")
VideoSuperviseCountVo getSubOneAllVideoSuperviseCount(Date beginTime, Date endTime, Integer departId);
@ -373,37 +262,10 @@ public interface NegativeMapper extends BaseMapper<Negative> {
List<EchartsVo> getSubOneProblemTypeRatio(Integer departId, Date beginTime, Date endTime);
@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 crtTime 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.crtTime 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);
@Select("SELECT problemSources AS name, count(ng.id) AS value " +
"FROM negative ng " +
"WHERE problemSourcesCode IN (17, 18, 19, 20) AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"GROUP BY problemSources")
List<EchartsVo> getCaseSourceRate(Date beginTime, Date endTime);
/**
* 首页大屏问题类型占比
*
@ -422,51 +284,6 @@ public interface NegativeMapper extends BaseMapper<Negative> {
"ORDER BY `value` desc")
List<EchartsVo> selectProblemRate(Date beginTime, Date endTime);
@Select("SELECT " +
"csd.`name` AS `name`, " +
"csd.dept_name AS policeName, " +
"csd.dept_pid, " +
"csd.dept_id AS departId, " +
"COUNT( DISTINCT ng.id) AS total," +
"COUNT( DISTINCT CASE WHEN ng.checkStatus <> 3 THEN ng.id END) AS discoverProblem, " +
"COUNT(DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS completionProblem, " +
"COUNT(DISTINCT ng.involveDepartId) AS relativeOrg, " +
"COUNT( DISTINCT nb.blameName ) AS relativePer, " +
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id)*100, 1 ),0) AS completionRate " +
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON csd.dept_id=ng.three_involve_depart_id " +
"AND checkStatus <>3 " +
"AND problemSourcesCode =16 " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
"LEFT JOIN negative_blame nb ON ng.id=nb.negativeId " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId}; ")
List<VideoSuperviseMapIconVo> getSubOneVideoSuperviseMapIconInfo(Date beginTime, Date endTime, Integer departId);
@Select("SELECT " +
"csd.`name` AS `name`, " +
"csd.dept_name AS policeName, " +
"csd.dept_pid, " +
"csd.dept_id AS departId, " +
"COUNT(DISTINCT IF(ng.isRectifyCode = 0,ng.id,null)) as processingNumber, " +
"COUNT(DISTINCT IF(ng.isRectifyCode = 1,ng.id,null)) as completeNumber, " +
"COUNT( DISTINCT ng.involveDepartId ) AS relationOrg, " +
"COUNT( DISTINCT ng.id ) AS problemNumber, " +
"IFNULL( ROUND( COUNT( DISTINCT IF(ng.isRectifyCode=1, ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS completeRate " +
"FROM county_street_dept csd " +
"LEFT JOIN negative ng ON ng.three_involve_depart_id=csd.dept_id " +
"WHERE ng.problemSourcesCode in (13,14,15) " +
"and ng.crtTime BETWEEN '2025-01-01 00:00:00.0' AND '2025-06-11 23:59:59.999' " +
"AND ng.second_involve_depart_id= #{departId} " +
"and ng.checkStatus in (1,2) " +
"GROUP BY csd.dept_name " +
"HAVING csd.dept_pid=#{departId} "
)
List<SuperviseMapIconVo> getSubOneSupervisionMapIcon(Date beginTime,Date endTime,Integer departId);
List<Negative> selectListBySampleId(@Param("args") List<Integer> sampleIdList);

6
src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java

@ -188,10 +188,10 @@ public class DatavServiceImpl implements DatavService {
List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.selectList(dataCaseVerifLambdaQueryWrapper);
NegativeQueryParam negativeQueryParam = new NegativeQueryParam();
negativeQueryParam.setCrtTime(List.of(request.getBeginTime(), request.getEndTime()));
negativeQueryParam.setProblemSourcesCode(List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue(), STXF.getValue()));
negativeQueryParam.setProblemSourcesCode(List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()));
List<Negative> negatives = negativeResourceService.query(negativeQueryParam);
// 交办案件数
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue(), STXF.getValue());
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<Negative> jbNegatvieList = negatives.stream().filter(one -> ldjbCode.contains(one.getProblemSourcesCode())).toList();
long ajhcCount = dataCaseVerifs.size()+ jbNegatvieList.size();
// 局长信箱
@ -256,7 +256,7 @@ public class DatavServiceImpl implements DatavService {
supDepartGroupParam.setChildLevel(3);
Map<String, DepartAndSubDepartDto> departAndSubDepart = supDepartResourceService.getDepartAndSubDepart(supDepartGroupParam);
// 交办
List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue(), STXF.getValue());
List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
for (Map.Entry<String, DepartAndSubDepartDto> entry : departAndSubDepart.entrySet()) {
String departId = entry.getKey();
DepartAndSubDepartDto departDto = entry.getValue();

7
src/main/java/com/biutag/supervision/service/subDatav/SubDatavService.java

@ -137,4 +137,11 @@ public interface SubDatavService {
Result<JSONObject> getSubOneResultCount( SubDataVRequest request);
/**
* 获取二级首页地图数据
* @param request
* @return
*/
Result<JSONObject> getSubOneGlobalMap(SubDataVRequest request);
}

199
src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java

@ -13,9 +13,12 @@ import com.biutag.supervision.pojo.dto.common.BarItem;
import com.biutag.supervision.pojo.dto.common.PieItem;
import com.biutag.supervision.pojo.entity.*;
import com.biutag.supervision.pojo.entity.mailbox.Mail;
import com.biutag.supervision.pojo.entity.report.ReportProject;
import com.biutag.supervision.pojo.param.*;
import com.biutag.supervision.pojo.param.dataAudit.DataAuditQueryParam;
import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest;
import com.biutag.supervision.pojo.vo.*;
import com.biutag.supervision.repository.dataAudit.DataAuditResourceService;
import com.biutag.supervision.repository.dataPetitionComplaint.DataPetitionComplaintResourceService;
import com.biutag.supervision.repository.mail.MailResourceService;
import com.biutag.supervision.repository.negative.NegativeResourceService;
@ -30,6 +33,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@ -45,6 +49,10 @@ import static com.biutag.supervision.constants.enums.ProblemSourcesEnum.*;
@Service
public class SubDatavServiceImpl implements SubDatavService {
@Resource
private DataAuditResourceService dataAuditResourceService;
@Resource
private ReportProjectResourceService reportProjectResourceService;
@ -95,6 +103,9 @@ public class SubDatavServiceImpl implements SubDatavService {
private AccountabilityCountUtil accountabilityCountUtil;
@Resource
private DataPetition12337Mapper dataPetition12337Mapper;
private final String VALID_SIGN = "terminated";
private final String EX_SOURCE = "局长信箱";
@ -123,26 +134,32 @@ public class SubDatavServiceImpl implements SubDatavService {
})
.toList();
List<Date> dates = Arrays.asList(request.getBeginTime(), request.getEndTime());
for (SupDepart pcs : pcsList) {
List<Negative> negatives = negativeMapper.getNegativeListData(pcs.getId(), request.getBeginTime(), request.getEndTime(), ALL);
if (negatives.isEmpty()) {
continue;
}
OrganizeProblemRankVo organizeProblemRankVo = new OrganizeProblemRankVo();
organizeProblemRankVo.setLabel(pcs.getShortName());
organizeProblemRankVo.setValue(String.valueOf(negatives.size()));
NegativeQueryParam negativeQueryParam = new NegativeQueryParam();
negativeQueryParam.setCrtTime(dates);
negativeQueryParam.setInvolveDepartIds(Collections.singleton(pcs.getId()));
// 问题数
long count = negativeResourceService.count(negativeQueryParam);
OrganizeProblemRankVo organizeProblemRankVo = OrganizeProblemRankVo.of(pcs.getShortName());
if (count > 0) {
organizeProblemRankVo.setValue(String.valueOf(count));
fxsjlist.add(organizeProblemRankVo);
}
for (SupDepart dw : dwList) {
List<Negative> negatives = negativeMapper.getNegativeListData(dw.getId(), request.getBeginTime(), request.getEndTime(), ALL);
if (negatives.isEmpty()) {
continue;
}
OrganizeProblemRankVo organizeProblemRankVo = new OrganizeProblemRankVo();
organizeProblemRankVo.setLabel(dw.getShortName());
organizeProblemRankVo.setValue(String.valueOf(negatives.size()));
for (SupDepart dw : dwList) {
NegativeQueryParam negativeQueryParam = new NegativeQueryParam();
negativeQueryParam.setCrtTime(dates);
negativeQueryParam.setInvolveDepartIds(Collections.singleton(dw.getId()));
// 问题数
long count = negativeResourceService.count(negativeQueryParam);
OrganizeProblemRankVo organizeProblemRankVo = OrganizeProblemRankVo.of(dw.getShortName());
if (count > 0) {
organizeProblemRankVo.setValue(String.valueOf(count));
jsdwlist.add(organizeProblemRankVo);
}
}
// 排序
fxsjlist.sort(
@ -188,13 +205,17 @@ public class SubDatavServiceImpl implements SubDatavService {
szdcQueryParam.setProblemSourcesCode(ProblemSourcesEnum.GROUP_14_15_16);
long szdcCount = negativeResourceService.count(szdcQueryParam);
// 案件核查
List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue(), STXF.getValue());
LambdaQueryWrapper<DataCaseVerif> dataCaseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>();
dataCaseVerifLambdaQueryWrapper.between(DataCaseVerif::getCreateTime, request.getBeginTime(), request.getEndTime());
List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.getListData(request.getDepartId(), request.getBeginTime(), request.getEndTime());
List<Negative> negatives = negativeMapper.getNegativeListData(request.getDepartId(), request.getBeginTime(), request.getEndTime(), proCode);
dataCaseVerifLambdaQueryWrapper.in(DataCaseVerif::getSecondDepartId, request.getDepartId());
List<DataCaseVerif> dataCaseVerifs = dataCaseVerifMapper.selectList(dataCaseVerifLambdaQueryWrapper);
NegativeQueryParam negativeQueryParam = new NegativeQueryParam();
negativeQueryParam.setCrtTime(List.of(request.getBeginTime(), request.getEndTime()));
negativeQueryParam.setProblemSourcesCode(List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue()));
List<Negative> negatives = negativeResourceService.query(negativeQueryParam);
// 交办案件数
List<Negative> jbNegatvieList = negatives.stream().filter(one -> proCode.contains(one.getProblemSourcesCode())).toList();
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<Negative> jbNegatvieList = negatives.stream().filter(one -> ldjbCode.contains(one.getProblemSourcesCode())).toList();
long ajhcCount = dataCaseVerifs.size() + jbNegatvieList.size();
@ -205,17 +226,23 @@ public class SubDatavServiceImpl implements SubDatavService {
List<SupExternalDepart> supExternalDepartList = supExternalDepartResourceService.query(supExternalDepartQueryParam);
Set<String> supExternalDepartIdSet = supExternalDepartList.stream().map(SupExternalDepart::getExternalId).collect(Collectors.toSet());
MailQueryParam mailQueryParam = new MailQueryParam();
mailQueryParam.setSecondDeptIds(supExternalDepartIdSet);
mailQueryParam.setMailTime(dates);
long mailCount = mailResourceService.count(mailQueryParam);
LambdaQueryWrapper<Mail> mailQueryWrapper = new LambdaQueryWrapper<>();
mailQueryWrapper.ne(Mail::getMailState, VALID_SIGN);
mailQueryWrapper.in(Mail::getSecondDeptId, supExternalDepartIdSet);
mailQueryWrapper.between(Mail::getMailTime, request.getBeginTime(), request.getEndTime());
long mailCount = mailMapper.selectCount(mailQueryWrapper);
// 12337
NegativeQueryParam xf12337Param = new NegativeQueryParam();
xf12337Param.setCrtTime(dates);
xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue()));
xf12337Param.setInvolveDepartIds(allDepartIds);
long xf12337Count = negativeResourceService.count(xf12337Param);
QueryWrapper<DataPetition12337> queryWrapper12337 = new QueryWrapper<>();
queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime());
queryWrapper12337.and(wrapper -> wrapper
.in("third_depart_id", allDepartIds)
.or()
.in("second_depart_id", allDepartIds));
long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337);
// 国家信访
DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam();
countryParam.setCreateTime(dates);
@ -231,10 +258,18 @@ public class SubDatavServiceImpl implements SubDatavService {
// 审计项目数
ReportProjectQueryParam reportProjectQueryParam = new ReportProjectQueryParam();
reportProjectQueryParam.setArchivingStart(request.getBeginTime());
reportProjectQueryParam.setArchivingEnd(request.getEndTime());
reportProjectQueryParam.setAuditUnitIds(allDepartIds);
long sjxmCount = reportProjectResourceService.count(reportProjectQueryParam);
reportProjectQueryParam.setPublicationDateStart(request.getBeginTime());
reportProjectQueryParam.setPublicationDateEnd(request.getEndTime());
// 用报审单位
reportProjectQueryParam.setProjectUnitIds(Collections.singleton(request.getDepartId()));
List<ReportProject> reportProjects = reportProjectResourceService.query(reportProjectQueryParam);
// 其他项目总数
DataAuditQueryParam dataAuditQueryParam = new DataAuditQueryParam();
dataAuditQueryParam.setAuditTimeStart(request.getBeginTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
dataAuditQueryParam.setAuditTimeEnd(request.getEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
dataAuditQueryParam.setSecondLevelDeptId(Long.valueOf(request.getDepartId()));
List<DataAudit> dataAuditList = dataAuditResourceService.query(dataAuditQueryParam);
long sjxmCount = reportProjects.size() + dataAuditList.size();
overview.setSupervisionPro(xcdcCount);
overview.setNumSupervisionPro(szdcCount);
@ -247,6 +282,108 @@ public class SubDatavServiceImpl implements SubDatavService {
return Result.success(data);
}
// 二级首页地图
@Override
public Result<JSONObject> getSubOneGlobalMap(SubDataVRequest request) {
List<GlobalMapIconVo> globalMapIconVoList = new ArrayList<>();
List<Date> dates = Arrays.asList(request.getBeginTime(), request.getEndTime());
List<SupDepart> policeDeparts = supDepartMapper.selectPoliceDeparts(Integer.valueOf(request.getDepartId()));
for (SupDepart childDepart : policeDeparts) {
String childDepartId = childDepart.getId();
GlobalMapIconVo globalMapIconVo = GlobalMapIconVo.of(childDepartId, childDepart.getShortName());
// 现场督查
NegativeQueryParam group13Param = new NegativeQueryParam();
group13Param.setCrtTime(dates);
group13Param.setInvolveDepartIds(Set.of(childDepartId));
group13Param.setProblemSourcesCode(ProblemSourcesEnum.GROUP_13);
long supervisionProCount = negativeResourceService.count(group13Param);
// 数字督察
NegativeQueryParam group14To16Param = new NegativeQueryParam();
group14To16Param.setCrtTime(dates);
group14To16Param.setInvolveDepartIds(Set.of(childDepartId));
group14To16Param.setProblemSourcesCode(ProblemSourcesEnum.GROUP_14_15_16);
long numSupervisionProCount = negativeResourceService.count(group14To16Param);
// 案件核查 = 12389 + 交办
List<String> proCode = List.of(A12389.getValue(), SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<Negative> negatives = negativeMapper.getNegativeListData(childDepartId, request.getBeginTime(), request.getEndTime(), proCode);
LambdaQueryWrapper<DataCaseVerif> caseVerifLambdaQueryWrapper = new LambdaQueryWrapper<>();
caseVerifLambdaQueryWrapper.between(DataCaseVerif::getDiscoveryTime, dates.get(0), dates.get(1));
caseVerifLambdaQueryWrapper.eq(DataCaseVerif::getThirdDepartId, childDepartId);
long dataCaseVerifs = dataCaseVerifMapper.selectCount(caseVerifLambdaQueryWrapper);
Set<String> ldjbCode = Set.of(SLDJB.getValue(), ZDDJB.getValue(), SJJB.getValue());
List<Negative> jbNegatvieList = negatives.stream().filter(one -> ldjbCode.contains(one.getProblemSourcesCode())).toList();
long caseVerificationProCount = dataCaseVerifs + jbNegatvieList.size();
// 12337
NegativeQueryParam xf12337Param = new NegativeQueryParam();
xf12337Param.setCrtTime(dates);
xf12337Param.setInvolveDepartIds(Set.of(childDepartId));
xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue()));
long xf12337Count = negativeResourceService.count(xf12337Param);
// 国家信访
DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam();
countryParam.setCreateTime(dates);
countryParam.setThirdDepartIds(Collections.singleton(childDepartId));
countryParam.setProblemSourcesCode(ProblemSourcesEnum.GJXFPT.getValue());
long countryMail = dataPetitionComplaintResourceService.count(countryParam);
// 公安部门信访
DataPetitionComplaintQueryParam policeParam = new DataPetitionComplaintQueryParam();
policeParam.setCreateTime(dates);
policeParam.setThirdDepartIds(Collections.singleton(childDepartId));
policeParam.setProblemSourcesCode(ProblemSourcesEnum.GABXF.getValue());
long policeMail = dataPetitionComplaintResourceService.count(policeParam);
// 审计项目数
ReportProjectQueryParam reportProjectQueryParam = new ReportProjectQueryParam();
reportProjectQueryParam.setPublicationDateStart(request.getBeginTime());
reportProjectQueryParam.setPublicationDateEnd(request.getEndTime());
// 用报审单位
reportProjectQueryParam.setProjectUnitIds(Collections.singleton(childDepartId));
List<ReportProject> reportProjects = reportProjectResourceService.query(reportProjectQueryParam);
// 其他项目总数
DataAuditQueryParam dataAuditQueryParam = new DataAuditQueryParam();
dataAuditQueryParam.setAuditTimeStart(request.getBeginTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
dataAuditQueryParam.setAuditTimeEnd(request.getEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
dataAuditQueryParam.setThirdLevelDeptId(Long.valueOf(childDepartId.trim()));
List<DataAudit> dataAuditList = dataAuditResourceService.query(dataAuditQueryParam);
long sjxmCount = reportProjects.size() + dataAuditList.size();
// 局长信箱
long mailCount = 0;
SupExternalDepartQueryParam externalDepartQueryParam = new SupExternalDepartQueryParam();
externalDepartQueryParam.setInternalIds(Collections.singleton(childDepartId));
externalDepartQueryParam.setSource("局长信箱");
List<SupExternalDepart> supExternalDepartList = supExternalDepartResourceService.query(externalDepartQueryParam);
if (CollectionUtil.isNotEmpty(supExternalDepartList)) {
SupExternalDepart externalDepart = supExternalDepartList.get(0);
MailQueryParam mailQueryParam = new MailQueryParam();
mailQueryParam.setThreeDeptIds(Collections.singleton(externalDepart.getExternalId()));
mailQueryParam.setMailTime(dates);
mailCount = mailResourceService.count(mailQueryParam);
}
globalMapIconVo.setSupervisionPro(supervisionProCount);
globalMapIconVo.setNumSupervisionPro(numSupervisionProCount);
globalMapIconVo.setCaseVerificationPro(caseVerificationProCount);
globalMapIconVo.setComplaintPro(xf12337Count + countryMail + policeMail);
globalMapIconVo.setAuditPro(sjxmCount);
globalMapIconVo.setMailboxNumber(mailCount);
globalMapIconVo.setTalkPro(0L);
globalMapIconVo.calcTotal();
globalMapIconVoList.add(globalMapIconVo);
}
JSONObject mapData = new JSONObject().fluentPut("globalTempMapVoList", globalMapIconVoList);
return Result.success(mapData);
}
// endregion
// region 视频督察二级

16
src/main/resources/mapper/SupTaskProblemMapper.xml

@ -38,21 +38,7 @@
GROUP BY m.month_name
ORDER BY m.month ASC;
</select>
<!-- 二级大屏的问题趋势(首页、现场、案件) -->
<select id="getSubOneTrend" resultType="com.biutag.supervision.pojo.vo.EchartsVo">
SELECT
m.month_name AS `name`,
COUNT( ng.id ) AS `value`
FROM sup_month_monthname m
LEFT JOIN negative ng ON DATE_FORMAT(ng.crtTime,'%m') = m.`month`
LEFT JOIN sup_depart sd on ng.involveDepartId = sd.id
LEFT JOIN sup_depart sdd on sd.pid = sdd.id
LEFT JOIN sup_depart sddd on sdd.pid = sddd.id
WHERE (sd.id = #{departId} or sdd.id= #{departId} or sddd.id = #{departId} )
AND YEAR(ng.crtTime) = #{year}
GROUP BY m.month_name
ORDER BY m.`month` ASC;
</select>
<!-- 视频督察二级大屏的问题趋势(查实)-->
<select id="getSubOneVideoSuperviseTrend"
resultType="com.biutag.supervision.pojo.vo.EchartsVo">

Loading…
Cancel
Save