From 1d9a7ff677a01cbda59bca062a00d92131943ad6 Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Fri, 19 Dec 2025 19:37:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E9=A6=96=E9=A1=B5=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F--=E6=80=BB=E8=A7=88=E6=95=B0=E6=8D=AE+=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E6=9C=BA=E6=9E=84=E6=8E=92=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subdatav/SubOneGlobalController.java | 61 +++--- .../supervision/mapper/NegativeMapper.java | 3 + .../NegativeOrganizationRankQueryParam.java | 28 +++ .../pojo/param/SupDepartQueryParam.java | 57 ++++++ .../pojo/request/datav/DataVRequest.java | 4 + .../request/subdatav/SubDataVRequest.java | 47 +++++ .../negative/NegativeResourceService.java | 5 + .../supdepart/SupDepartResourceService.java | 32 +++- .../service/subDatav/SubDatavService.java | 28 +++ .../service/subDatav/SubDatavServiceImpl.java | 173 ++++++++++++++++++ .../resources/mapper/SupTaskProblemMapper.xml | 25 +++ 11 files changed, 431 insertions(+), 32 deletions(-) create mode 100644 src/main/java/com/biutag/supervision/pojo/param/NegativeOrganizationRankQueryParam.java create mode 100644 src/main/java/com/biutag/supervision/pojo/param/SupDepartQueryParam.java create mode 100644 src/main/java/com/biutag/supervision/pojo/request/subdatav/SubDataVRequest.java create mode 100644 src/main/java/com/biutag/supervision/service/subDatav/SubDatavService.java create mode 100644 src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java diff --git a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java index d7cf4fd..816e935 100644 --- a/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java +++ b/src/main/java/com/biutag/supervision/controller/subdatav/SubOneGlobalController.java @@ -3,28 +3,29 @@ package com.biutag.supervision.controller.subdatav; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.biutag.supervision.constants.enums.ProblemSourcesEnum; import com.biutag.supervision.mapper.MailMapper; import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.mapper.SupExternalDepartMapper; import com.biutag.supervision.pojo.Result; import com.biutag.supervision.pojo.entity.Negative; -import com.biutag.supervision.pojo.entity.SupExternalDepart; import com.biutag.supervision.pojo.entity.mailbox.Mail; +import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest; import com.biutag.supervision.pojo.vo.*; -import com.biutag.supervision.service.*; +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; +import jakarta.annotation.Resource; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; 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 org.springframework.web.bind.annotation.*; -import java.util.*; +import java.util.Date; +import java.util.List; /** * @Auther: sh @@ -38,12 +39,22 @@ import java.util.*; @Slf4j public class SubOneGlobalController { + private final String VALID_SIGN = "terminated"; // 有效标识 + private final String EX_SOURCE = "局长信箱"; // 映射来源 + private final NegativeMapper negativeMapper; private final CountyStreetDeptService countyStreetDeptService; private final DataMailService dataMailService; private final NegativeService negativeService; private final MailMapper mailMapper; private final SupExternalDepartMapper externalDepartMapper; + + + @Resource + private SubDatavService subDatavService; + + + /** * 获取地图数据, 所有二级地图的json数据 * @@ -60,31 +71,14 @@ public class SubOneGlobalController { //region 左边 - - /** - * 机构问题排名 - * - * @param departId 2级单位的id - * @param beginTime 开始时间 - * @param endTime 结束时间 - * @return Result - */ @Operation(summary = "机构问题排名") - @GetMapping("/getSubOneOrganizationRank") - public Result getSubOneOrganizationRank(@RequestParam Integer departId, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date beginTime, - @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime) { - List fxsjlist = negativeMapper.selectPoliceOrganizeProblemRank(departId, beginTime, endTime); - List jsdwlist = negativeMapper.selectTeamOrganizeProblemRank(departId, beginTime, endTime); - - - JSONObject res = new JSONObject() - .fluentPut("fxsjlist", fxsjlist) - .fluentPut("jsdwlist", jsdwlist); - return Result.success(res); + @PostMapping("/getSubOneOrganizationRank") + public Result getSubOneOrganizationRank(@RequestBody SubDataVRequest request) { + return subDatavService.getSubOneOrganizationRank(request); } + /** * 业务类型占比 * @@ -107,8 +101,7 @@ public class SubOneGlobalController { //region 中间 - private final String VALID_SIGN = "terminated"; // 有效标识 - private final String EX_SOURCE = "局长信箱"; // 映射来源 + /** * 获取首页大屏中央数据 * @@ -147,6 +140,12 @@ public class SubOneGlobalController { return Result.success(data); } + @Operation(summary = "大屏中央数据") + @PostMapping("/getSubOneAllCount") + public Result getSubOneAllCount(@RequestBody SubDataVRequest request) { + return subDatavService.getSubOneAllCount(request); + } + /** * 地图数据 * diff --git a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java index 157abfd..7f4aa9c 100644 --- a/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java +++ b/src/main/java/com/biutag/supervision/mapper/NegativeMapper.java @@ -2,6 +2,7 @@ package com.biutag.supervision.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.biutag.supervision.pojo.entity.Negative; +import com.biutag.supervision.pojo.param.NegativeOrganizationRankQueryParam; import com.biutag.supervision.pojo.vo.*; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -1095,6 +1096,8 @@ public interface NegativeMapper extends BaseMapper { List selectListBySampleId(@Param("args") List sampleIdList); + List getOrganizationRank(NegativeOrganizationRankQueryParam param); + // endregion } diff --git a/src/main/java/com/biutag/supervision/pojo/param/NegativeOrganizationRankQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/NegativeOrganizationRankQueryParam.java new file mode 100644 index 0000000..01ab9ea --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/param/NegativeOrganizationRankQueryParam.java @@ -0,0 +1,28 @@ +package com.biutag.supervision.pojo.param; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +import java.util.Date; +import java.util.List; +import java.util.Set; + +/** + * @ClassName NegativeOrganizationRankQueryParam + * @Description 机构问题排名查询参数实体 + * @Author shihao + * @Date 2025/12/19 16:51 + */ +@Getter +@Setter +@Schema(description = "机构问题排名查询参数实体") +public class NegativeOrganizationRankQueryParam { + + @Schema(description = "部门集合") + private Set involveDepartIds; + + @Schema(description = "时间集合") + private List crtTime; + +} diff --git a/src/main/java/com/biutag/supervision/pojo/param/SupDepartQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/SupDepartQueryParam.java new file mode 100644 index 0000000..8ed1937 --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/param/SupDepartQueryParam.java @@ -0,0 +1,57 @@ +package com.biutag.supervision.pojo.param; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +import java.util.Set; + +/** + * @ClassName SupDepartQueryParam + * @Description 部门查询请求 + * @Author shihao + * @Date 2025/12/19 16:00 + */ +@Getter +@Setter +@Schema(description = "部门查询请求") +public class SupDepartQueryParam { + + @Schema(description = "部门ID") + private String id; + + @Schema(description = "部门ID集合") + private Set ids; + + @Schema(description = "父部门ID") + private String pid; + + @Schema(description = "父部门ID集合") + private Set pids; + + @Schema(description = "部门编码") + private String code; + + @Schema(description = "部门编码集合") + private Set codes; + + @Schema(description = "部门层级") + private String level; + + @Schema(description = "部门层级集合") + private Set levels; + + @Schema(description = "部门简称") + private String shortName; + + @Schema(description = "部门名称") + private String name; + + @Schema(description = "部门名称模糊查询") + private String nameLike; + + @Schema(description = "单位统计分组ID") + private Integer statisticsGroupId; + + +} \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/pojo/request/datav/DataVRequest.java b/src/main/java/com/biutag/supervision/pojo/request/datav/DataVRequest.java index ffdaa2c..bc3a5f7 100644 --- a/src/main/java/com/biutag/supervision/pojo/request/datav/DataVRequest.java +++ b/src/main/java/com/biutag/supervision/pojo/request/datav/DataVRequest.java @@ -1,5 +1,6 @@ package com.biutag.supervision.pojo.request.datav; +import cn.hutool.core.date.DateUtil; import com.biutag.supervision.aop.ParamChecked; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.ValidationException; @@ -32,5 +33,8 @@ public class DataVRequest implements ParamChecked { if (Objects.isNull(beginTime) || Objects.isNull(endTime)){ throw new ValidationException("必须选择时间"); } + // 统一格式化时间 + this.beginTime = DateUtil.beginOfDay(this.beginTime); + this.endTime = DateUtil.endOfDay(this.endTime); } } diff --git a/src/main/java/com/biutag/supervision/pojo/request/subdatav/SubDataVRequest.java b/src/main/java/com/biutag/supervision/pojo/request/subdatav/SubDataVRequest.java new file mode 100644 index 0000000..1ba716b --- /dev/null +++ b/src/main/java/com/biutag/supervision/pojo/request/subdatav/SubDataVRequest.java @@ -0,0 +1,47 @@ +package com.biutag.supervision.pojo.request.subdatav; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import com.biutag.supervision.aop.ParamChecked; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.ValidationException; +import lombok.Getter; +import lombok.Setter; + +import java.util.Date; +import java.util.Objects; + +/** + * @ClassName SubDataVRequest + * @Description 二级数据大屏请求实体 + * @Author shihao + * @Date 2025/12/19 15:26 + */ +@Setter +@Getter +@Schema(description = "二级数据大屏请求实体") +public class SubDataVRequest implements ParamChecked { + + @Schema(description = "开始时间") + private Date beginTime; + + @Schema(description = "结束时间") + private Date endTime; + + @Schema(description = "部门Id") + private String departId; + + @Override + public void check() { + if (Objects.isNull(beginTime) || Objects.isNull(endTime)){ + throw new ValidationException("必须选择时间"); + } + if (StrUtil.isBlank(departId)){ + throw new ValidationException("必须传入部门ID"); + } + this.beginTime = DateUtil.beginOfDay(this.beginTime); + this.endTime = DateUtil.endOfDay(this.endTime); + } + + +} diff --git a/src/main/java/com/biutag/supervision/repository/negative/NegativeResourceService.java b/src/main/java/com/biutag/supervision/repository/negative/NegativeResourceService.java index 10cc331..ed395fe 100644 --- a/src/main/java/com/biutag/supervision/repository/negative/NegativeResourceService.java +++ b/src/main/java/com/biutag/supervision/repository/negative/NegativeResourceService.java @@ -5,7 +5,9 @@ import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.biutag.supervision.mapper.NegativeMapper; import com.biutag.supervision.pojo.entity.Negative; +import com.biutag.supervision.pojo.param.NegativeOrganizationRankQueryParam; import com.biutag.supervision.pojo.param.NegativeQueryParam; +import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; @@ -175,4 +177,7 @@ public class NegativeResourceService { return negativeMapper.selectCount(queryWrapper); } + public List getOrganizationRank(NegativeOrganizationRankQueryParam param) { + return negativeMapper.getOrganizationRank(param); + } } diff --git a/src/main/java/com/biutag/supervision/repository/supdepart/SupDepartResourceService.java b/src/main/java/com/biutag/supervision/repository/supdepart/SupDepartResourceService.java index d21cbe6..d727c66 100644 --- a/src/main/java/com/biutag/supervision/repository/supdepart/SupDepartResourceService.java +++ b/src/main/java/com/biutag/supervision/repository/supdepart/SupDepartResourceService.java @@ -1,9 +1,14 @@ package com.biutag.supervision.repository.supdepart; +import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.biutag.supervision.mapper.SupDepartMapper; import com.biutag.supervision.pojo.dto.DepartAndSubDepartDto; +import com.biutag.supervision.pojo.entity.SupDepart; import com.biutag.supervision.pojo.param.SupDepartGroupParam; +import com.biutag.supervision.pojo.param.SupDepartQueryParam; +import com.biutag.supervision.repository.base.BaseDAO; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; @@ -17,12 +22,37 @@ import java.util.stream.Collectors; * @Date 2025/12/11 15:04 */ @Service -public class SupDepartResourceService { +public class SupDepartResourceService extends BaseDAO { @Resource private SupDepartMapper supDepartMapper; + + + + public List query(SupDepartQueryParam param){ + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + setBatchQuery(param.getId(), param.getIds(), wrapper, SupDepart::getId); + setBatchQuery(param.getPid(), param.getPids(), wrapper, SupDepart::getPid); + setBatchQuery(param.getCode(), param.getCodes(), wrapper, SupDepart::getCode); + wrapper.eq(StrUtil.isNotBlank(param.getLevel()) ,SupDepart::getLevel, param.getLevel()); + wrapper.in(CollectionUtil.isNotEmpty(param.getLevels()), SupDepart::getLevel, param.getLevels()); + wrapper.eq(StrUtil.isNotBlank(param.getShortName()), SupDepart::getShortName, param.getShortName()); + wrapper.eq(StrUtil.isNotBlank(param.getName()), SupDepart::getName, param.getName()); + wrapper.like(StrUtil.isNotBlank(param.getNameLike()), SupDepart::getName, param.getNameLike()); + wrapper.eq(param.getStatisticsGroupId()!=null, SupDepart::getStatisticsGroupId, param.getStatisticsGroupId()); + if (wrapper.getExpression() == null || wrapper.getExpression().getSqlSegment().isEmpty()) { + return Collections.emptyList(); + } + return supDepartMapper.selectList(wrapper); + } + + + + + + /** * 获取部门和子部门的数据 * @param param diff --git a/src/main/java/com/biutag/supervision/service/subDatav/SubDatavService.java b/src/main/java/com/biutag/supervision/service/subDatav/SubDatavService.java new file mode 100644 index 0000000..3cb80c7 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/subDatav/SubDatavService.java @@ -0,0 +1,28 @@ +package com.biutag.supervision.service.subDatav; + +import com.alibaba.fastjson.JSONObject; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest; + +/** + * @ClassName SubDatavService + * @Description 区县大屏服务层 + * @Author shihao + * @Date 2025/12/19 15:30 + */ +public interface SubDatavService { + + /** + * 获取区县首页大屏的机构问题排名 + * @param request + * @return + */ + Result getSubOneOrganizationRank(SubDataVRequest request); + + /** + * 获取区县首页大屏的中央总览数据 + * @param request + * @return + */ + Result getSubOneAllCount(SubDataVRequest request); +} diff --git a/src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java b/src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java new file mode 100644 index 0000000..eeda396 --- /dev/null +++ b/src/main/java/com/biutag/supervision/service/subDatav/SubDatavServiceImpl.java @@ -0,0 +1,173 @@ +package com.biutag.supervision.service.subDatav; + +import com.alibaba.fastjson.JSONObject; +import com.biutag.supervision.constants.enums.DepartGroupEnum; +import com.biutag.supervision.constants.enums.ProblemSourcesEnum; +import com.biutag.supervision.pojo.Result; +import com.biutag.supervision.pojo.dto.DepartAndSubDepartDto; +import com.biutag.supervision.pojo.entity.SupDepart; +import com.biutag.supervision.pojo.entity.SupExternalDepart; +import com.biutag.supervision.pojo.param.*; +import com.biutag.supervision.pojo.request.subdatav.SubDataVRequest; +import com.biutag.supervision.pojo.vo.GlobalOverViewVo; +import com.biutag.supervision.pojo.vo.OrganizeProblemRankVo; +import com.biutag.supervision.repository.dataCaseVerif.DataCaseVerifResourceService; +import com.biutag.supervision.repository.dataPetitionComplaint.DataPetitionComplaintResourceService; +import com.biutag.supervision.repository.mail.MailResourceService; +import com.biutag.supervision.repository.negative.NegativeResourceService; +import com.biutag.supervision.repository.reportproject.ReportProjectResourceService; +import com.biutag.supervision.repository.supExternalDepart.SupExternalDepartResourceService; +import com.biutag.supervision.repository.supdepart.SupDepartResourceService; +import com.biutag.supervision.service.NegativeBlameService; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @ClassName SubDatavServiceImpl + * @Description 区县大屏服务层 + * @Author shihao + * @Date 2025/12/19 15:30 + */ +@Service +public class SubDatavServiceImpl implements SubDatavService { + + @Resource + private SupDepartResourceService supDepartResourceService; + + @Resource + private NegativeResourceService negativeResourceService; + + + @Resource + private ReportProjectResourceService reportProjectResourceService; + + @Resource + private NegativeBlameService negativeBlameService; + + @Resource + private DataPetitionComplaintResourceService dataPetitionComplaintResourceService; + + @Resource + private MailResourceService mailResourceService; + + @Resource + private SupExternalDepartResourceService supExternalDepartResourceService; + + @Resource + private DataCaseVerifResourceService dataCaseVerifResourceService; + + + @Override + public Result getSubOneOrganizationRank(SubDataVRequest request) { + SupDepartQueryParam supDepartQueryParam = new SupDepartQueryParam(); + supDepartQueryParam.setPid(request.getDepartId()); + List query = supDepartResourceService.query(supDepartQueryParam); + + Set pcsSet = query.stream().filter(one -> "10".equals(one.getStatisticsGroupId())).map(SupDepart::getId).collect(Collectors.toSet()); + Set ddSet = query.stream().filter(one -> !"10".equals(one.getStatisticsGroupId())).map(SupDepart::getId).collect(Collectors.toSet()); + List dates = Arrays.asList(request.getBeginTime(), request.getEndTime()); + NegativeOrganizationRankQueryParam pcsParam = new NegativeOrganizationRankQueryParam(); + pcsParam.setCrtTime(dates); + pcsParam.setInvolveDepartIds(pcsSet); + List fxsjlist = negativeResourceService.getOrganizationRank(pcsParam); + NegativeOrganizationRankQueryParam ddParam = new NegativeOrganizationRankQueryParam(); + ddParam.setCrtTime(dates); + ddParam.setInvolveDepartIds(ddSet); + List jsdwlist = negativeResourceService.getOrganizationRank(ddParam); + + JSONObject res = new JSONObject() + .fluentPut("fxsjlist", fxsjlist) + .fluentPut("jsdwlist", jsdwlist); + return Result.success(res); + } + + + @Override + public Result getSubOneAllCount(SubDataVRequest request) { + + SupDepartGroupParam supDepartGroupParam = new SupDepartGroupParam(); + supDepartGroupParam.setGroupId(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId()); + supDepartGroupParam.setParentLevel(2); + supDepartGroupParam.setChildLevel(3); + Map departAndSubDepart = supDepartResourceService.getDepartAndSubDepart(supDepartGroupParam); + DepartAndSubDepartDto departDto = departAndSubDepart.get(request.getDepartId()); + Set allDepartIds = departDto.getAllDepartIds(); + + + GlobalOverViewVo overview = GlobalOverViewVo.of(); + List dates = Arrays.asList(request.getBeginTime(), request.getEndTime()); + // 现场督查 + NegativeQueryParam xcdcQueryParam = new NegativeQueryParam(); + xcdcQueryParam.setCrtTime(dates); + xcdcQueryParam.setInvolveDepartIds(allDepartIds); + xcdcQueryParam.setProblemSourcesCode(ProblemSourcesEnum.GROUP_13); + long xcdcCount = negativeResourceService.count(xcdcQueryParam); + // 数字督察 + NegativeQueryParam szdcQueryParam = new NegativeQueryParam(); + szdcQueryParam.setCrtTime(dates); + szdcQueryParam.setInvolveDepartIds(allDepartIds); + szdcQueryParam.setProblemSourcesCode(ProblemSourcesEnum.GROUP_14_15_16); + long szdcCount = negativeResourceService.count(szdcQueryParam); + // 案件核查 + NegativeQueryParam ajhcQueryParam = new NegativeQueryParam(); + ajhcQueryParam.setCrtTime(dates); + ajhcQueryParam.setInvolveDepartIds(allDepartIds); + ajhcQueryParam.setProblemSourcesCode(ProblemSourcesEnum.GROUP_17_18_19_20); + long ajhcCount = negativeResourceService.count(ajhcQueryParam); + + // 局长信箱 + SupExternalDepartQueryParam supExternalDepartQueryParam = new SupExternalDepartQueryParam(); + supExternalDepartQueryParam.setInternalIds(allDepartIds); + supExternalDepartQueryParam.setSource("局长信箱"); + List supExternalDepartList = supExternalDepartResourceService.query(supExternalDepartQueryParam); + Set supExternalDepartIdSet = supExternalDepartList.stream().map(SupExternalDepart::getExternalId).collect(Collectors.toSet()); + + MailQueryParam mailQueryParam = new MailQueryParam(); + mailQueryParam.setSecondDeptIds(supExternalDepartIdSet); + mailQueryParam.setCreateTime(dates); + long mailCount = mailResourceService.count(mailQueryParam); + + // 12337 + NegativeQueryParam xf12337Param = new NegativeQueryParam(); + xf12337Param.setCrtTime(dates); + xf12337Param.setProblemSourcesCode(Collections.singletonList(ProblemSourcesEnum.XF12337.getValue())); + xf12337Param.setInvolveDepartIds(allDepartIds); + long xf12337Count = negativeResourceService.count(xf12337Param); + // 国家信访 + DataPetitionComplaintQueryParam countryParam = new DataPetitionComplaintQueryParam(); + countryParam.setCreateTime(dates); + countryParam.setSecondDepartIds(allDepartIds); + countryParam.setProblemSourcesCode(ProblemSourcesEnum.GJXFPT.getValue()); + long gjxfCount = dataPetitionComplaintResourceService.count(countryParam); + // 公安部门信访 + DataPetitionComplaintQueryParam policeParam = new DataPetitionComplaintQueryParam(); + policeParam.setCreateTime(dates); + policeParam.setSecondDepartIds(allDepartIds); + policeParam.setProblemSourcesCode(ProblemSourcesEnum.GABXF.getValue()); + long gabxfCount = dataPetitionComplaintResourceService.count(policeParam); + + // 审计项目数 + ReportProjectQueryParam reportProjectQueryParam = new ReportProjectQueryParam(); + reportProjectQueryParam.setArchivingStart(request.getBeginTime()); + reportProjectQueryParam.setArchivingEnd(request.getEndTime()); + reportProjectQueryParam.setAuditUnitIds(allDepartIds); + long sjxmCount = reportProjectResourceService.count(reportProjectQueryParam); + + overview.setSupervisionPro(xcdcCount); + overview.setNumSupervisionPro(szdcCount); + overview.setCaseVerificationPro(ajhcCount); + overview.setMailboxNumber(mailCount); + overview.setComplaintPro(xf12337Count + gjxfCount + gabxfCount); + overview.setAuditPro(sjxmCount); + overview.calcTotal(); + JSONObject data = new JSONObject().fluentPut("overview", overview); + return Result.success(data); + } + + + + +} diff --git a/src/main/resources/mapper/SupTaskProblemMapper.xml b/src/main/resources/mapper/SupTaskProblemMapper.xml index f88cb5c..8b34420 100644 --- a/src/main/resources/mapper/SupTaskProblemMapper.xml +++ b/src/main/resources/mapper/SupTaskProblemMapper.xml @@ -86,4 +86,29 @@ + + + +