From bca2ac01fd52cf0f0e95c0058054f1e5d27dbe5f Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Wed, 18 Mar 2026 17:51:24 +0800 Subject: [PATCH] =?UTF-8?q?fix--=E9=A6=96=E9=A1=B5=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E4=BF=A1=E8=AE=BF=E6=95=B0=E6=8D=AE=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datav/DataVGlobalController.java | 46 +------------------ .../service/datav/DatavServiceImpl.java | 29 ++++++++---- 2 files changed, 22 insertions(+), 53 deletions(-) diff --git a/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java b/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java index 0420208..f84fbbf 100644 --- a/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java +++ b/src/main/java/com/biutag/supervision/controller/datav/DataVGlobalController.java @@ -1,23 +1,13 @@ package com.biutag.supervision.controller.datav; -import cn.hutool.core.bean.BeanUtil; 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.DataCaseVerifMapper; -import com.biutag.supervision.mapper.MailMapper; import com.biutag.supervision.mapper.NegativeMapper; -import com.biutag.supervision.mapper.SupDepartMapper; import com.biutag.supervision.pojo.Result; -import com.biutag.supervision.pojo.entity.DataCaseVerif; -import com.biutag.supervision.pojo.entity.Negative; -import com.biutag.supervision.pojo.entity.SupDepart; import com.biutag.supervision.pojo.request.datav.DataVRequest; -import com.biutag.supervision.pojo.vo.*; -import com.biutag.supervision.service.DataMailService; -import com.biutag.supervision.service.NegativeService; +import com.biutag.supervision.pojo.vo.EchartsVo; +import com.biutag.supervision.pojo.vo.StrongProblemRank; import com.biutag.supervision.service.datav.DatavService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -27,7 +17,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.*; -import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -47,41 +36,10 @@ public class DataVGlobalController { private final NegativeMapper negativeMapper; - private final DataMailService dataMailService; - - private final NegativeService negativeService; - - private final SupDepartMapper supDepartMapper; - - private final MailMapper mailMapper; - - private final DataCaseVerifMapper dataCaseVerifMapper; - @Resource private DatavService datavService; //region 左边 - /** - * 机构问题排名 - * - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result - * 弃用 请看 {@link #getOrganizationRank(DataVRequest)} - */ - @Operation(summary = "机构问题排名") - @Deprecated - @GetMapping("/getOrganizationRank") - public Result getOrganizationRank(@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - endTime = DateUtil.endOfDay(endTime); - List fxsjlist = negativeMapper.selectOrganizeProblemRank(3, beginTime, endTime); - List jsdwlist = negativeMapper.selectOrganizeProblemRank(4, beginTime, endTime); - JSONObject res = new JSONObject() - .fluentPut("fxsjlist", fxsjlist) - .fluentPut("jsdwlist", jsdwlist); - return Result.success(res); - } /** * 机构问题排名 * @return Result diff --git a/src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java b/src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java index 0110d9c..9717f29 100644 --- a/src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java +++ b/src/main/java/com/biutag/supervision/service/datav/DatavServiceImpl.java @@ -104,6 +104,9 @@ public class DatavServiceImpl implements DatavService { @Resource private MailMapper mailMapper; + + @Resource + private DataPetition12337Mapper dataPetition12337Mapper; @Resource private SupExternalDepartMapper supExternalDepartMapper; @@ -235,11 +238,13 @@ public class DatavServiceImpl implements DatavService { long caseVerificationProCount = negativeResourceService.count(group17To20Param); // 12337 - NegativeQueryParam xf12337Param = new NegativeQueryParam(); - xf12337Param.setCrtTime(dates); - xf12337Param.setInvolveDepartIds(allDepartIds); - xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue())); - long xf12337Count = negativeResourceService.count(xf12337Param); + QueryWrapper 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); @@ -381,10 +386,16 @@ public class DatavServiceImpl implements DatavService { long jzxxCount = mailMapper.selectCount(mailQueryWrapper); // 12337 - NegativeQueryParam xf12337Param = new NegativeQueryParam(); - xf12337Param.setCrtTime(dates); - xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue())); - long xf12337Count = negativeResourceService.count(xf12337Param); +// NegativeQueryParam xf12337Param = new NegativeQueryParam(); +// xf12337Param.setCrtTime(dates); +// xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue())); +// long xf12337Count = negativeResourceService.count(xf12337Param); + + QueryWrapper queryWrapper12337 = new QueryWrapper<>(); + queryWrapper12337.between("discover_time", request.getBeginTime(), request.getEndTime()); + long xf12337Count = dataPetition12337Mapper.selectCount(queryWrapper12337); + + // 国家信访 DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam(); countryParam.setCreateTime(dates);