14 changed files with 660 additions and 4 deletions
@ -0,0 +1,39 @@ |
|||||||
|
package com.biutag.supervision.pojo.dto; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.HashSet; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Set; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName DepartAndSubDepartDto |
||||||
|
* @Description 部门分组查询实体 |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/11 18:22 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
@Schema(description = "部门分组接收") |
||||||
|
public class DepartAndSubDepartDto { |
||||||
|
|
||||||
|
@Schema(description = "父级部门ID") |
||||||
|
private String parentId; |
||||||
|
|
||||||
|
@Schema(description = "父级部门名称") |
||||||
|
private String parentName; |
||||||
|
|
||||||
|
@Schema(description = "子部门ID字符串(逗号分隔)") |
||||||
|
private String childIdsStr; |
||||||
|
|
||||||
|
@Schema(description = "子部门ID列表") |
||||||
|
private Set<String> childIds ; |
||||||
|
|
||||||
|
@Schema(description = "包含父级的部门ID列表") |
||||||
|
private Set<String> allDepartIds ; |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,89 @@ |
|||||||
|
package com.biutag.supervision.pojo.param; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import lombok.Setter; |
||||||
|
import lombok.Getter; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.Date; |
||||||
|
import java.util.Set; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName ReportProjectQueryParam |
||||||
|
* @Description ReportProjectQueryParam |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/11 9:44 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
@Schema(description = "审计项目查询实体") |
||||||
|
public class ReportProjectQueryParam implements Serializable { |
||||||
|
|
||||||
|
@Schema(description = "报审项目ID") |
||||||
|
private String id; |
||||||
|
|
||||||
|
|
||||||
|
@Schema(defaultValue = "报审项目ID集合") |
||||||
|
private Set<String> ids; |
||||||
|
|
||||||
|
@Schema(defaultValue = "报审类型集合") |
||||||
|
private Set<String> reportTypes; |
||||||
|
|
||||||
|
@Schema(defaultValue = "报审项目名称") |
||||||
|
private String reportName; |
||||||
|
|
||||||
|
@Schema(defaultValue = "报审项目名称集合") |
||||||
|
private Set<String> reportNames; |
||||||
|
|
||||||
|
@Schema(defaultValue = "项目类别") |
||||||
|
private String projectType; |
||||||
|
|
||||||
|
@Schema(defaultValue = "审计单位ID") |
||||||
|
private String auditUnitId; |
||||||
|
|
||||||
|
@Schema(defaultValue = "审计单位ID集合") |
||||||
|
private Set<String> auditUnitIds; |
||||||
|
|
||||||
|
@Schema(defaultValue = "审计单位名称") |
||||||
|
private String auditUnit; |
||||||
|
|
||||||
|
@Schema(defaultValue = "审计单位名称集合") |
||||||
|
private Set<String> auditUnits; |
||||||
|
|
||||||
|
@Schema(defaultValue = "项目负责人") |
||||||
|
private String projectPrincipal; |
||||||
|
|
||||||
|
@Schema(defaultValue = "报审人") |
||||||
|
private String applicant; |
||||||
|
|
||||||
|
@Schema(defaultValue = "报审人ID") |
||||||
|
private String applicantId; |
||||||
|
|
||||||
|
@Schema(defaultValue = "项目单位ID") |
||||||
|
private String projectUnitId; |
||||||
|
|
||||||
|
@Schema(defaultValue = "节点状态") |
||||||
|
private String node; |
||||||
|
|
||||||
|
// 时间范围查询
|
||||||
|
@Schema(defaultValue = "报审日期开始") |
||||||
|
private Date applicantTimeStart; |
||||||
|
|
||||||
|
@Schema(defaultValue = "报审日期结束") |
||||||
|
private Date applicantTimeEnd; |
||||||
|
|
||||||
|
@Schema(description = "归档时间开始") |
||||||
|
private Date archivingStart; |
||||||
|
|
||||||
|
@Schema(description = "归档时间开始") |
||||||
|
private Date archivingEnd; |
||||||
|
|
||||||
|
/** |
||||||
|
* @see com.biutag.supervision.constants.enums.invest.DeleteStatusEnum |
||||||
|
*/ |
||||||
|
@Schema(defaultValue = "是否删除") |
||||||
|
private Integer deleteFlag; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
package com.biutag.supervision.pojo.param; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName SupDepartGroupParam |
||||||
|
* @Description 部门分组查询实体 |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/11 18:14 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
@Schema(description = "部门分组查询实体") |
||||||
|
public class SupDepartGroupParam { |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* @see com.biutag.supervision.constants.enums.DepartGroupEnum |
||||||
|
*/ |
||||||
|
@Schema(description = "分组ID") |
||||||
|
private Integer groupId; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "父级") |
||||||
|
private Integer parentLevel; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "子级") |
||||||
|
private Integer childLevel; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
package com.biutag.supervision.pojo.request.datav; |
||||||
|
|
||||||
|
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 DataVDto |
||||||
|
* @Description 数据大屏请求实体 |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/10 18:23 |
||||||
|
*/ |
||||||
|
@Setter |
||||||
|
@Getter |
||||||
|
@Schema(description = "数据大屏请求实体") |
||||||
|
public class DataVRequest implements ParamChecked { |
||||||
|
|
||||||
|
@Schema(description = "开始时间") |
||||||
|
private Date beginTime; |
||||||
|
|
||||||
|
@Schema(description = "结束时间") |
||||||
|
private Date endTime; |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public void check() { |
||||||
|
if (Objects.isNull(beginTime) || Objects.isNull(endTime)){ |
||||||
|
throw new ValidationException("必须选择时间"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,49 @@ |
|||||||
|
package com.biutag.supervision.pojo.vo; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import lombok.Getter; |
||||||
|
import lombok.Setter; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName AuditSuperviseMapIconVo |
||||||
|
* @Description 审计监督一级大屏地图数据 |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/11 10:23 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
@Schema(description = "审计监督一级大屏地图数据") |
||||||
|
public class AuditSuperviseMapIconVo { |
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "部门名") |
||||||
|
private String name; |
||||||
|
|
||||||
|
@Schema(description = "部门ID") |
||||||
|
private String departId; |
||||||
|
|
||||||
|
@Schema(description = "项目数") |
||||||
|
private Integer reportProjectNumber; |
||||||
|
|
||||||
|
@Schema(description = "查处问题数") |
||||||
|
private Integer checkProNumber; |
||||||
|
|
||||||
|
@Schema(description = "追责问责数") |
||||||
|
private Integer rushProNumber; |
||||||
|
|
||||||
|
@Schema(description = "整改问题数") |
||||||
|
private Integer rectifyNumber; |
||||||
|
|
||||||
|
public static AuditSuperviseMapIconVo of(String departId, String name) { |
||||||
|
AuditSuperviseMapIconVo vo = new AuditSuperviseMapIconVo(); |
||||||
|
vo.setDepartId(departId); |
||||||
|
vo.setName(name); |
||||||
|
// 默认初始值
|
||||||
|
vo.setReportProjectNumber(0); |
||||||
|
vo.setCheckProNumber(0); |
||||||
|
vo.setRushProNumber(0); |
||||||
|
vo.setRectifyNumber(0); |
||||||
|
return vo; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,136 @@ |
|||||||
|
package com.biutag.supervision.repository.negative; |
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil; |
||||||
|
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.NegativeQueryParam; |
||||||
|
import jakarta.annotation.Resource; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName NegativeResourceService |
||||||
|
* @Description NegativeResourceService |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/11 14:49 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class NegativeResourceService { |
||||||
|
|
||||||
|
@Resource |
||||||
|
private NegativeMapper negativeMapper; |
||||||
|
|
||||||
|
|
||||||
|
public List<Negative> query(NegativeQueryParam param) { |
||||||
|
LambdaQueryWrapper<Negative> queryWrapper = new LambdaQueryWrapper<>(); |
||||||
|
|
||||||
|
// 基础字段查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getOriginId()), Negative::getOriginId, param.getOriginId()); |
||||||
|
|
||||||
|
// 流程键查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getFlowKey()), Negative::getFlowKey, param.getFlowKey()); |
||||||
|
|
||||||
|
// 办理状态查询
|
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getProcessingStatus()), Negative::getProcessingStatus, param.getProcessingStatus()); |
||||||
|
|
||||||
|
// 简要描述模糊查询
|
||||||
|
queryWrapper.like(StrUtil.isNotBlank(param.getThingDesc()), Negative::getThingDesc, param.getThingDesc()); |
||||||
|
|
||||||
|
// 问题来源编码查询
|
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getProblemSourcesCode()), Negative::getProblemSourcesCode, param.getProblemSourcesCode()); |
||||||
|
|
||||||
|
// 业务类型编码查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getBusinessTypeCode()), Negative::getBusinessTypeCode, param.getBusinessTypeCode()); |
||||||
|
|
||||||
|
// 核查状态查询
|
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getCheckStatus()), Negative::getCheckStatus, param.getCheckStatus()); |
||||||
|
|
||||||
|
// 是否整改查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getIsRectifyCode()), Negative::getIsRectifyCode, param.getIsRectifyCode()); |
||||||
|
|
||||||
|
// 涉及单位ID查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getInvolveDepartId()), Negative::getInvolveDepartId, param.getInvolveDepartId()); |
||||||
|
|
||||||
|
// 涉及单位ID集合查询
|
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getInvolveDepartIds()), Negative::getInvolveDepartId, param.getInvolveDepartIds()); |
||||||
|
|
||||||
|
|
||||||
|
// 专项督查查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getSpecialSupervision()), Negative::getSpecialSupervision, param.getSpecialSupervision()); |
||||||
|
|
||||||
|
// 通报期数查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getReportNumber()), Negative::getReportNumber, param.getReportNumber()); |
||||||
|
|
||||||
|
// 创建单位层级查询
|
||||||
|
queryWrapper.eq(param.getCrtDepartLevel() != null, Negative::getCrtDepartLevel, param.getCrtDepartLevel()); |
||||||
|
|
||||||
|
|
||||||
|
// 办理结果编码查询
|
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getHandleResultCode()), Negative::getHandleResult12337, param.getHandleResultCode()); |
||||||
|
|
||||||
|
// 案件/警情编号查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getCaseNumber()), Negative::getCaseNumber, param.getCaseNumber()); |
||||||
|
|
||||||
|
// 核查办理情况查询
|
||||||
|
queryWrapper.like(StrUtil.isNotBlank(param.getCheckStatusDesc()), Negative::getCheckStatusDesc, param.getCheckStatusDesc()); |
||||||
|
|
||||||
|
// 初信初访查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getInitialPetition()), Negative::getCompleteStatus, param.getInitialPetition()); |
||||||
|
|
||||||
|
// 审批流程查询
|
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getApprovalFlow()), Negative::getApprovalFlow, param.getApprovalFlow()); |
||||||
|
|
||||||
|
// 时间范围查询 - 问题发生时间
|
||||||
|
if (CollUtil.isNotEmpty(param.getHappenTime()) && param.getHappenTime().size() >= 2) { |
||||||
|
queryWrapper.ge(Negative::getHappenTime, param.getHappenTime().get(0)); |
||||||
|
queryWrapper.le(Negative::getHappenTime, param.getHappenTime().get(1)); |
||||||
|
} |
||||||
|
|
||||||
|
// 时间范围查询 - 问题发现时间
|
||||||
|
if (CollUtil.isNotEmpty(param.getDiscoveryTime()) && param.getDiscoveryTime().size() >= 2) { |
||||||
|
queryWrapper.ge(Negative::getDiscoveryTime, param.getDiscoveryTime().get(0)); |
||||||
|
queryWrapper.le(Negative::getDiscoveryTime, param.getDiscoveryTime().get(1)); |
||||||
|
} |
||||||
|
|
||||||
|
// 时间范围查询 - 创建时间
|
||||||
|
if (CollUtil.isNotEmpty(param.getCrtTime()) && param.getCrtTime().size() >= 2) { |
||||||
|
queryWrapper.ge(Negative::getCrtTime, param.getCrtTime().get(0)); |
||||||
|
queryWrapper.le(Negative::getCrtTime, param.getCrtTime().get(1)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 设置排序
|
||||||
|
if (StrUtil.isNotBlank(param.getOrderProp()) && StrUtil.isNotBlank(param.getOrder())) { |
||||||
|
boolean isAsc = "ascending".equalsIgnoreCase(param.getOrder()); |
||||||
|
|
||||||
|
switch (param.getOrderProp()) { |
||||||
|
case "crtTime": |
||||||
|
queryWrapper.orderBy(true, isAsc, Negative::getCrtTime); |
||||||
|
break; |
||||||
|
case "happenTime": |
||||||
|
queryWrapper.orderBy(true, isAsc, Negative::getHappenTime); |
||||||
|
break; |
||||||
|
case "discoveryTime": |
||||||
|
queryWrapper.orderBy(true, isAsc, Negative::getDiscoveryTime); |
||||||
|
break; |
||||||
|
case "completeDate": |
||||||
|
queryWrapper.orderBy(true, isAsc, Negative::getCompleteDate); |
||||||
|
break; |
||||||
|
case "updTime": |
||||||
|
queryWrapper.orderBy(true, isAsc, Negative::getUpdTime); |
||||||
|
break; |
||||||
|
default: |
||||||
|
queryWrapper.orderBy(true, false, Negative::getCrtTime); |
||||||
|
break; |
||||||
|
} |
||||||
|
} else { |
||||||
|
queryWrapper.orderBy(true, false, Negative::getCrtTime); |
||||||
|
} |
||||||
|
|
||||||
|
return negativeMapper.selectList(queryWrapper); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,58 @@ |
|||||||
|
package com.biutag.supervision.repository.reportproject; |
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil; |
||||||
|
import cn.hutool.core.util.StrUtil; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.biutag.supervision.mapper.ReportProjectMapper; |
||||||
|
import com.biutag.supervision.pojo.entity.report.ReportProject; |
||||||
|
import com.biutag.supervision.pojo.param.ReportProjectQueryParam; |
||||||
|
import jakarta.annotation.Resource; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName ReportProjectResourceService |
||||||
|
* @Description ReportProjectResourceService |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/11 9:40 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class ReportProjectResourceService { |
||||||
|
|
||||||
|
|
||||||
|
@Resource |
||||||
|
private ReportProjectMapper reportProjectMapper; |
||||||
|
|
||||||
|
public List<ReportProject> query(ReportProjectQueryParam param) { |
||||||
|
LambdaQueryWrapper<ReportProject> queryWrapper = new LambdaQueryWrapper<>(); |
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getId()), ReportProject::getId, param.getId()); |
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getIds()), ReportProject::getId, param.getIds()); |
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getReportTypes()), ReportProject::getReportType, param.getReportTypes()); |
||||||
|
queryWrapper.like(StrUtil.isNotBlank(param.getReportName()), ReportProject::getReportName, param.getReportName()); |
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getReportNames()), ReportProject::getReportName, param.getReportNames()); |
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getProjectType()), ReportProject::getProjectType, param.getProjectType()); |
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getAuditUnitId()), ReportProject::getAuditUnitId, param.getAuditUnitId()); |
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getAuditUnitIds()), ReportProject::getAuditUnitId, param.getAuditUnitIds()); |
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getAuditUnit()), ReportProject::getAuditUnit, param.getAuditUnit()); |
||||||
|
queryWrapper.in(CollUtil.isNotEmpty(param.getAuditUnits()), ReportProject::getAuditUnit, param.getAuditUnits()); |
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getProjectPrincipal()), ReportProject::getProjectPrincipal, param.getProjectPrincipal()); |
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getApplicant()), ReportProject::getApplicant, param.getApplicant()); |
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getApplicantId()), ReportProject::getApplicantId, param.getApplicantId()); |
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getProjectUnitId()), ReportProject::getProjectUnitId, param.getProjectUnitId()); |
||||||
|
queryWrapper.eq(StrUtil.isNotBlank(param.getNode()), ReportProject::getNode, param.getNode()); |
||||||
|
queryWrapper.ge(param.getApplicantTimeStart() != null, ReportProject::getApplicantTime, param.getApplicantTimeStart()); |
||||||
|
queryWrapper.le(param.getApplicantTimeEnd() != null, ReportProject::getApplicantTime, param.getApplicantTimeEnd()); |
||||||
|
queryWrapper.ge(param.getArchivingStart() != null, ReportProject::getArchiving, param.getArchivingStart()); |
||||||
|
queryWrapper.le(param.getArchivingEnd() != null, ReportProject::getArchiving, param.getArchivingEnd()); |
||||||
|
// 处理删除标志
|
||||||
|
if (param.getDeleteFlag() != null) { |
||||||
|
queryWrapper.eq(ReportProject::getDeleteFlag, param.getDeleteFlag()); |
||||||
|
} else { |
||||||
|
queryWrapper.eq(ReportProject::getDeleteFlag, 0); |
||||||
|
} |
||||||
|
return reportProjectMapper.selectList(queryWrapper); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,45 @@ |
|||||||
|
package com.biutag.supervision.repository.supdepart; |
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil; |
||||||
|
import com.biutag.supervision.mapper.SupDepartMapper; |
||||||
|
import com.biutag.supervision.pojo.dto.DepartAndSubDepartDto; |
||||||
|
import com.biutag.supervision.pojo.param.SupDepartGroupParam; |
||||||
|
import jakarta.annotation.Resource; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.*; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName SupDepartResourceService |
||||||
|
* @Description 部门资源层 |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/11 15:04 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class SupDepartResourceService { |
||||||
|
|
||||||
|
@Resource |
||||||
|
private SupDepartMapper supDepartMapper; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取部门和子部门的数据 |
||||||
|
* @param param |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public Map<String, DepartAndSubDepartDto> getDepartAndSubDepart(SupDepartGroupParam param) { |
||||||
|
|
||||||
|
List<DepartAndSubDepartDto> departAndSubDepart = supDepartMapper.getDepartAndSubDepart(param); |
||||||
|
for (DepartAndSubDepartDto dto : departAndSubDepart) { |
||||||
|
Set<String> childIds = Arrays.stream(dto.getChildIdsStr().split(",")).filter(StrUtil::isNotBlank).collect(Collectors.toSet()); |
||||||
|
dto.setChildIds(childIds); |
||||||
|
// 创建新的集合包含所有部门ID
|
||||||
|
Set<String> allDepartIds = new HashSet<>(childIds); |
||||||
|
allDepartIds.add(dto.getParentId()); |
||||||
|
dto.setAllDepartIds(allDepartIds); |
||||||
|
} |
||||||
|
return departAndSubDepart.stream().collect(Collectors.toMap(DepartAndSubDepartDto::getParentId, dto->dto)); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,22 @@ |
|||||||
|
package com.biutag.supervision.service.datav; |
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject; |
||||||
|
import com.biutag.supervision.pojo.Result; |
||||||
|
import com.biutag.supervision.pojo.request.datav.DataVRequest; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName DatavService |
||||||
|
* @Description DatavService |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/11 9:21 |
||||||
|
*/ |
||||||
|
|
||||||
|
public interface DatavService { |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取一级审计督察的地图数据 |
||||||
|
* @param request |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
Result<JSONObject> getAuditMap(DataVRequest request); |
||||||
|
} |
||||||
@ -0,0 +1,107 @@ |
|||||||
|
package com.biutag.supervision.service.datav; |
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||||
|
import com.alibaba.fastjson.JSONObject; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.biutag.supervision.constants.enums.DepartGroupEnum; |
||||||
|
import com.biutag.supervision.constants.enums.ProblemSourcesEnum; |
||||||
|
import com.biutag.supervision.constants.enums.invest.DeleteStatusEnum; |
||||||
|
import com.biutag.supervision.pojo.Result; |
||||||
|
import com.biutag.supervision.pojo.dto.DepartAndSubDepartDto; |
||||||
|
import com.biutag.supervision.pojo.entity.Negative; |
||||||
|
import com.biutag.supervision.pojo.entity.NegativeBlame; |
||||||
|
import com.biutag.supervision.pojo.entity.report.ReportProject; |
||||||
|
import com.biutag.supervision.pojo.param.NegativeQueryParam; |
||||||
|
import com.biutag.supervision.pojo.param.ReportProjectQueryParam; |
||||||
|
import com.biutag.supervision.pojo.param.SupDepartGroupParam; |
||||||
|
import com.biutag.supervision.pojo.request.datav.DataVRequest; |
||||||
|
import com.biutag.supervision.pojo.vo.AuditSuperviseMapIconVo; |
||||||
|
import com.biutag.supervision.repository.negative.NegativeResourceService; |
||||||
|
import com.biutag.supervision.repository.reportproject.ReportProjectResourceService; |
||||||
|
import com.biutag.supervision.repository.supdepart.SupDepartResourceService; |
||||||
|
import com.biutag.supervision.service.NegativeBlameService; |
||||||
|
import jakarta.annotation.Resource; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.*; |
||||||
|
import java.util.stream.Collectors; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName DatavServiceImpl |
||||||
|
* @Description DatavServiceImpl |
||||||
|
* @Author shihao |
||||||
|
* @Date 2025/12/11 9:23 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
@Slf4j |
||||||
|
public class DatavServiceImpl implements DatavService { |
||||||
|
|
||||||
|
@Resource |
||||||
|
private ReportProjectResourceService reportProjectResourceService; |
||||||
|
|
||||||
|
@Resource |
||||||
|
private NegativeResourceService negativeResourceService; |
||||||
|
|
||||||
|
@Resource |
||||||
|
private SupDepartResourceService supDepartResourceService; |
||||||
|
|
||||||
|
@Resource |
||||||
|
private NegativeBlameService negativeBlameService; |
||||||
|
|
||||||
|
@Override |
||||||
|
public Result<JSONObject> getAuditMap(DataVRequest request) { |
||||||
|
List<AuditSuperviseMapIconVo> auditSuperviseMapIconVoList = new ArrayList<>(); |
||||||
|
SupDepartGroupParam supDepartGroupParam = new SupDepartGroupParam(); |
||||||
|
supDepartGroupParam.setGroupId(DepartGroupEnum.COUNTY_CITY_BUREAUS.getId()); |
||||||
|
supDepartGroupParam.setParentLevel(2); |
||||||
|
supDepartGroupParam.setChildLevel(3); |
||||||
|
Map<String, DepartAndSubDepartDto> departAndSubDepart = supDepartResourceService.getDepartAndSubDepart(supDepartGroupParam); |
||||||
|
|
||||||
|
for (Map.Entry<String, DepartAndSubDepartDto> entry : departAndSubDepart.entrySet()) { |
||||||
|
String key = entry.getKey(); |
||||||
|
DepartAndSubDepartDto value = entry.getValue(); |
||||||
|
Set<String> allDepartIds = value.getAllDepartIds(); |
||||||
|
AuditSuperviseMapIconVo auditSuperviseMapIconVo = AuditSuperviseMapIconVo.of(key, value.getParentName()); |
||||||
|
|
||||||
|
|
||||||
|
// 项目数
|
||||||
|
ReportProjectQueryParam reportProjectQueryParam = new ReportProjectQueryParam(); |
||||||
|
reportProjectQueryParam.setArchivingStart(request.getBeginTime()); |
||||||
|
reportProjectQueryParam.setArchivingEnd(request.getEndTime()); |
||||||
|
reportProjectQueryParam.setAuditUnitIds(allDepartIds); |
||||||
|
reportProjectQueryParam.setDeleteFlag(DeleteStatusEnum.NO.getCode()); |
||||||
|
List<ReportProject> reportProjectList = reportProjectResourceService.query(reportProjectQueryParam); |
||||||
|
auditSuperviseMapIconVo.setReportProjectNumber(reportProjectList.size()); |
||||||
|
|
||||||
|
NegativeQueryParam negativeQueryParam = new NegativeQueryParam(); |
||||||
|
List<Date> dates = Arrays.asList(request.getBeginTime(), request.getEndTime()); |
||||||
|
negativeQueryParam.setCrtTime(dates); |
||||||
|
negativeQueryParam.setInvolveDepartIds(allDepartIds); |
||||||
|
negativeQueryParam.setProblemSourcesCode(List.of(ProblemSourcesEnum.ZFTZSJ.getValue(), |
||||||
|
ProblemSourcesEnum.ZFSACFSS.getValue(), |
||||||
|
ProblemSourcesEnum.JJZRSJ.getValue(), |
||||||
|
ProblemSourcesEnum.ZXSJ.getValue())); |
||||||
|
List<Negative> negativeList = negativeResourceService.query(negativeQueryParam); |
||||||
|
// 查处问题数
|
||||||
|
auditSuperviseMapIconVo.setCheckProNumber(negativeList.size()); |
||||||
|
if (CollectionUtil.isNotEmpty(negativeList)) { |
||||||
|
// 追责问责数
|
||||||
|
Set<String> negativeIds = negativeList.stream().map(Negative::getId).collect(Collectors.toSet()); |
||||||
|
if (CollectionUtil.isNotEmpty(negativeIds)) { |
||||||
|
LambdaQueryWrapper<NegativeBlame> wrapper = new LambdaQueryWrapper<>(); |
||||||
|
wrapper.in(NegativeBlame::getNegativeId, negativeIds); |
||||||
|
wrapper.ne(NegativeBlame::getHandleResultName, "不予追责"); |
||||||
|
int rushProNumber = (int) negativeBlameService.count(wrapper); |
||||||
|
auditSuperviseMapIconVo.setRushProNumber(rushProNumber); |
||||||
|
} |
||||||
|
// 整改问题数
|
||||||
|
long rectifyNumber = negativeList.stream().filter(one -> Objects.equals(one.getIsRectifyCode(), "1")).count(); |
||||||
|
auditSuperviseMapIconVo.setRectifyNumber((int) rectifyNumber); |
||||||
|
} |
||||||
|
auditSuperviseMapIconVoList.add(auditSuperviseMapIconVo); |
||||||
|
} |
||||||
|
JSONObject data = new JSONObject().fluentPut("auditSuperviseMapIconVoList", auditSuperviseMapIconVoList); |
||||||
|
return Result.success(data); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,16 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
|
<!DOCTYPE mapper |
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="com.biutag.supervision.mapper.SupDepartMapper"> |
||||||
|
|
||||||
|
<select id="getDepartAndSubDepart" resultType="com.biutag.supervision.pojo.dto.DepartAndSubDepartDto"> |
||||||
|
SELECT parent.id AS parentId, parent.short_name AS parentName, GROUP_CONCAT(child.id) AS childIdsStr |
||||||
|
FROM sup_depart parent |
||||||
|
LEFT JOIN sup_depart child ON child.pid = parent.id AND child.level = #{childLevel} |
||||||
|
WHERE parent.statistics_group_id = #{groupId} |
||||||
|
AND parent.level = #{parentLevel} |
||||||
|
GROUP BY parent.id, parent.name |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
Loading…
Reference in new issue