15 changed files with 1254 additions and 1 deletions
@ -0,0 +1,78 @@ |
|||
package com.zdxt.enforcementcode.common.commonenum; |
|||
|
|||
/** |
|||
* 综合评价枚举定义 |
|||
* |
|||
* @author Vincent |
|||
*/ |
|||
public enum ComprehensiveEvaluationEnum { |
|||
|
|||
/** |
|||
* A - 优秀 |
|||
*/ |
|||
A("A", "优秀"), |
|||
|
|||
/** |
|||
* B - 良好 |
|||
*/ |
|||
B("B", "良好"), |
|||
|
|||
/** |
|||
* C - 一般 |
|||
*/ |
|||
C("C", "一般"); |
|||
|
|||
private String code; |
|||
private String description; |
|||
|
|||
ComprehensiveEvaluationEnum(String code, String description) { |
|||
this.code = code; |
|||
this.description = description; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public String getDescription() { |
|||
return description; |
|||
} |
|||
|
|||
/** |
|||
* 根据code获取description |
|||
* |
|||
* @param code 综合评价编码 |
|||
* @return 综合评价描述 |
|||
*/ |
|||
public static String getDescriptionByCode(String code) { |
|||
if (code == null || code.isEmpty()) { |
|||
return ""; |
|||
} |
|||
ComprehensiveEvaluationEnum[] enums = ComprehensiveEvaluationEnum.values(); |
|||
for (ComprehensiveEvaluationEnum evaluation : enums) { |
|||
if (evaluation.getCode().equals(code)) { |
|||
return evaluation.getDescription(); |
|||
} |
|||
} |
|||
return ""; |
|||
} |
|||
|
|||
/** |
|||
* 根据description获取code |
|||
* |
|||
* @param description 综合评价描述 |
|||
* @return 综合评价编码 |
|||
*/ |
|||
public static String getCodeByDescription(String description) { |
|||
if (description == null || description.isEmpty()) { |
|||
return null; |
|||
} |
|||
ComprehensiveEvaluationEnum[] enums = ComprehensiveEvaluationEnum.values(); |
|||
for (ComprehensiveEvaluationEnum evaluation : enums) { |
|||
if (evaluation.getDescription().equals(description)) { |
|||
return evaluation.getCode(); |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
} |
|||
@ -0,0 +1,66 @@ |
|||
package com.zdxt.enforcementcode.controller.web.supervision; |
|||
|
|||
import java.util.List; |
|||
|
|||
import com.zdxt.enforcementcode.domain.bo.ComprehensiveEvaluationStatBo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardSituationDomainQueryBo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardTrendStatQueryBo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationPerListVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationDomainVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationPerVo; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.dromara.common.core.domain.R; |
|||
import com.zdxt.enforcementcode.service.IDashboardSituationTrendDomainService; |
|||
|
|||
/** |
|||
* 大屏-态势趋势分析-领域统计 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-28 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/web/dashboard/situationTrendDomain") |
|||
public class DashboardSituationTrendDomainController extends BaseController { |
|||
|
|||
private final IDashboardSituationTrendDomainService situationTrendDomainService; |
|||
/** |
|||
* 查询态势趋势分析-领域统计列表 |
|||
*/ |
|||
@GetMapping("/querySituationTrendDomainList") |
|||
public R<List<DashboardSituationDomainVo>> querySituationTrendDomainList(@Validated DashboardTrendStatQueryBo bo) { |
|||
List<DashboardSituationDomainVo> list = situationTrendDomainService.querySituationTrendDomainList(bo); |
|||
return R.ok(list); |
|||
} |
|||
|
|||
/** |
|||
* 风险态势情况占比 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 综合评价统计列表 |
|||
*/ |
|||
@GetMapping("/statByComprehensiveEvaluation") |
|||
public R<DashboardSituationPerVo> statByComprehensiveEvaluation(@Validated ComprehensiveEvaluationStatBo bo) { |
|||
DashboardSituationPerVo dashboardSituationPerVo = situationTrendDomainService.statByComprehensiveEvaluation(bo); |
|||
return R.ok(dashboardSituationPerVo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 风险态势构成 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 态势趋势分析-领域统计信息 |
|||
*/ |
|||
@GetMapping("/getSituationTrendDomainInfo") |
|||
public R<DashboardSituationDomainVo> getSituationTrendDomainInfo(@Validated ComprehensiveEvaluationStatBo bo) { |
|||
DashboardSituationDomainVo vo = situationTrendDomainService.getSituationTrendDomainInfo(bo); |
|||
return R.ok(vo); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,106 @@ |
|||
package com.zdxt.enforcementcode.domain.bean; |
|||
|
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.io.Serial; |
|||
|
|||
/** |
|||
* 态势趋势分析-领域统计对象 dashboard_situation_trend_domain |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-28 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@TableName("dashboard_situation_trend_domain") |
|||
public class DashboardSituationTrendDomain extends BaseEntity { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(value = "id") |
|||
private String id; |
|||
|
|||
/** |
|||
* 年份 |
|||
*/ |
|||
private Long year; |
|||
|
|||
/** |
|||
* 季度 1-4 |
|||
*/ |
|||
private Long quarter; |
|||
|
|||
/** |
|||
* 领域ID |
|||
*/ |
|||
private String lyid; |
|||
|
|||
/** |
|||
* 领域名称 |
|||
*/ |
|||
private String lymc; |
|||
|
|||
/** |
|||
* 执法单位ID |
|||
*/ |
|||
private String zfdwid; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
private String zfdwmc; |
|||
|
|||
/** |
|||
* 综合评级:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String zhpj; |
|||
|
|||
/** |
|||
* 风险信用:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String fxxy; |
|||
|
|||
/** |
|||
* 高频检查:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String gpjc; |
|||
|
|||
/** |
|||
* 异常行为:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String ycxw; |
|||
|
|||
/** |
|||
* 趋势异常:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String qsyc; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否 1-是 |
|||
*/ |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 局级部门ID |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位ID |
|||
*/ |
|||
private String organId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package com.zdxt.enforcementcode.domain.bo; |
|||
|
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 综合评价统计查询BO |
|||
* |
|||
* @author Vincent |
|||
*/ |
|||
@Data |
|||
public class ComprehensiveEvaluationStatBo implements Serializable { |
|||
|
|||
/** |
|||
* 年份 |
|||
*/ |
|||
@NotNull(message = "年份不能为空") |
|||
private Long year; |
|||
|
|||
/** |
|||
* 季度(1-4) |
|||
*/ |
|||
@NotNull(message = "季度不能为空") |
|||
private Long quarter; |
|||
|
|||
|
|||
/** |
|||
* 领域ID |
|||
*/ |
|||
private String lyid; |
|||
} |
|||
@ -0,0 +1,109 @@ |
|||
package com.zdxt.enforcementcode.domain.bo; |
|||
|
|||
|
|||
import jakarta.validation.constraints.NotBlank; |
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 态势趋势分析-领域统计业务对象 dashboard_situation_trend_domain |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-28 |
|||
*/ |
|||
@Data |
|||
public class DashboardSituationDomainQueryBo implements Serializable { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@NotBlank(message = "主键ID不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 年份 |
|||
*/ |
|||
@NotNull(message = "年份不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private Long year; |
|||
|
|||
/** |
|||
* 季度 1-4 |
|||
*/ |
|||
@NotNull(message = "季度 1-4不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private Long quarter; |
|||
|
|||
/** |
|||
* 领域ID |
|||
*/ |
|||
@NotBlank(message = "领域ID不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String lyid; |
|||
|
|||
/** |
|||
* 领域名称 |
|||
*/ |
|||
@NotBlank(message = "领域名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String lymc; |
|||
|
|||
/** |
|||
* 执法单位ID |
|||
*/ |
|||
@NotBlank(message = "执法单位ID不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String zfdwid; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@NotBlank(message = "执法单位名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String zfdwmc; |
|||
|
|||
/** |
|||
* 综合评级:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String zhpj; |
|||
|
|||
/** |
|||
* 风险信用:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String fxxy; |
|||
|
|||
/** |
|||
* 高频检查:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String gpjc; |
|||
|
|||
/** |
|||
* 异常行为:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String ycxw; |
|||
|
|||
/** |
|||
* 趋势异常:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String qsyc; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否 1-是 |
|||
*/ |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 局级部门ID |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位ID |
|||
*/ |
|||
private String organId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,112 @@ |
|||
package com.zdxt.enforcementcode.domain.bo; |
|||
|
|||
|
|||
import com.zdxt.enforcementcode.domain.bean.DashboardSituationTrendDomain; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import jakarta.validation.constraints.*; |
|||
|
|||
/** |
|||
* 态势趋势分析-领域统计业务对象 dashboard_situation_trend_domain |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-28 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@AutoMapper(target = DashboardSituationTrendDomain.class, reverseConvertGenerate = false) |
|||
public class DashboardSituationTrendDomainBo extends BaseEntity { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@NotBlank(message = "主键ID不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 年份 |
|||
*/ |
|||
@NotNull(message = "年份不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private Long year; |
|||
|
|||
/** |
|||
* 季度 1-4 |
|||
*/ |
|||
@NotNull(message = "季度 1-4不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private Long quarter; |
|||
|
|||
/** |
|||
* 领域ID |
|||
*/ |
|||
@NotBlank(message = "领域ID不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String lyid; |
|||
|
|||
/** |
|||
* 领域名称 |
|||
*/ |
|||
@NotBlank(message = "领域名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String lymc; |
|||
|
|||
/** |
|||
* 执法单位ID |
|||
*/ |
|||
@NotBlank(message = "执法单位ID不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String zfdwid; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@NotBlank(message = "执法单位名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String zfdwmc; |
|||
|
|||
/** |
|||
* 综合评级:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String zhpj; |
|||
|
|||
/** |
|||
* 风险信用:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String fxxy; |
|||
|
|||
/** |
|||
* 高频检查:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String gpjc; |
|||
|
|||
/** |
|||
* 异常行为:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String ycxw; |
|||
|
|||
/** |
|||
* 趋势异常:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String qsyc; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否 1-是 |
|||
*/ |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 局级部门ID |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位ID |
|||
*/ |
|||
private String organId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,109 @@ |
|||
package com.zdxt.enforcementcode.domain.vo; |
|||
|
|||
|
|||
import jakarta.validation.constraints.NotBlank; |
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
import org.dromara.common.core.validate.AddGroup; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 态势趋势分析-领域统计业务对象 dashboard_situation_trend_domain |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-28 |
|||
*/ |
|||
@Data |
|||
public class DashboardSituationDomainVo implements Serializable { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@NotBlank(message = "主键ID不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 年份 |
|||
*/ |
|||
@NotNull(message = "年份不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private Long year; |
|||
|
|||
/** |
|||
* 季度 1-4 |
|||
*/ |
|||
@NotNull(message = "季度 1-4不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private Long quarter; |
|||
|
|||
/** |
|||
* 领域ID |
|||
*/ |
|||
@NotBlank(message = "领域ID不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String lyid; |
|||
|
|||
/** |
|||
* 领域名称 |
|||
*/ |
|||
@NotBlank(message = "领域名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String lymc; |
|||
|
|||
/** |
|||
* 执法单位ID |
|||
*/ |
|||
@NotBlank(message = "执法单位ID不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String zfdwid; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@NotBlank(message = "执法单位名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
|||
private String zfdwmc; |
|||
|
|||
/** |
|||
* 综合评级:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String zhpj; |
|||
|
|||
/** |
|||
* 风险信用:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String fxxy; |
|||
|
|||
/** |
|||
* 高频检查:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String gpjc; |
|||
|
|||
/** |
|||
* 异常行为:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String ycxw; |
|||
|
|||
/** |
|||
* 趋势异常:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
private String qsyc; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否 1-是 |
|||
*/ |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 局级部门ID |
|||
*/ |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位ID |
|||
*/ |
|||
private String organId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,39 @@ |
|||
package com.zdxt.enforcementcode.domain.vo; |
|||
|
|||
import com.zdxt.enforcementcode.common.commonenum.ComprehensiveEvaluationEnum; |
|||
import lombok.Data; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 综合评价统计VO |
|||
* |
|||
* @author Vincent |
|||
*/ |
|||
@Data |
|||
public class DashboardSituationPerListVo implements Serializable { |
|||
|
|||
/** |
|||
* 综合评价等级(A-优秀、B-良好、C-一般) |
|||
*/ |
|||
private String level; |
|||
|
|||
|
|||
/** |
|||
* 综合评价等级(A-优秀、B-良好、C-一般) |
|||
*/ |
|||
private String levelDescription; |
|||
|
|||
/** |
|||
* 统计个数 |
|||
*/ |
|||
private Long count; |
|||
|
|||
/** |
|||
* 比例 |
|||
*/ |
|||
private double per; |
|||
|
|||
public String getLevelDescription() { |
|||
return ComprehensiveEvaluationEnum.getDescriptionByCode(level); |
|||
} |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
package com.zdxt.enforcementcode.domain.vo; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 综合评价统计VO |
|||
* |
|||
* @author Vincent |
|||
*/ |
|||
@Data |
|||
public class DashboardSituationPerVo implements Serializable { |
|||
/** |
|||
* 总数 |
|||
*/ |
|||
private int total; |
|||
|
|||
/** |
|||
* 统计列表 |
|||
*/ |
|||
private List<DashboardSituationPerListVo> list; |
|||
} |
|||
@ -0,0 +1,126 @@ |
|||
package com.zdxt.enforcementcode.domain.vo; |
|||
|
|||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
|||
import cn.idev.excel.annotation.ExcelProperty; |
|||
import com.zdxt.enforcementcode.domain.bean.DashboardSituationTrendDomain; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
|
|||
|
|||
|
|||
/** |
|||
* 态势趋势分析-领域统计视图对象 dashboard_situation_trend_domain |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-28 |
|||
*/ |
|||
@Data |
|||
@ExcelIgnoreUnannotated |
|||
@AutoMapper(target = DashboardSituationTrendDomain.class) |
|||
public class DashboardSituationTrendDomainVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@ExcelProperty(value = "主键ID") |
|||
private String id; |
|||
|
|||
/** |
|||
* 年份 |
|||
*/ |
|||
@ExcelProperty(value = "年份") |
|||
private Long year; |
|||
|
|||
/** |
|||
* 季度 1-4 |
|||
*/ |
|||
@ExcelProperty(value = "季度 1-4") |
|||
private Long quarter; |
|||
|
|||
/** |
|||
* 领域ID |
|||
*/ |
|||
@ExcelProperty(value = "领域ID") |
|||
private String lyid; |
|||
|
|||
/** |
|||
* 领域名称 |
|||
*/ |
|||
@ExcelProperty(value = "领域名称") |
|||
private String lymc; |
|||
|
|||
/** |
|||
* 执法单位ID |
|||
*/ |
|||
@ExcelProperty(value = "执法单位ID") |
|||
private String zfdwid; |
|||
|
|||
/** |
|||
* 执法单位名称 |
|||
*/ |
|||
@ExcelProperty(value = "执法单位名称") |
|||
private String zfdwmc; |
|||
|
|||
/** |
|||
* 综合评级:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
@ExcelProperty(value = "综合评级:A|优秀、B|良好、C|一般") |
|||
private String zhpj; |
|||
|
|||
/** |
|||
* 风险信用:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
@ExcelProperty(value = "风险信用:A|优秀、B|良好、C|一般") |
|||
private String fxxy; |
|||
|
|||
/** |
|||
* 高频检查:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
@ExcelProperty(value = "高频检查:A|优秀、B|良好、C|一般") |
|||
private String gpjc; |
|||
|
|||
/** |
|||
* 异常行为:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
@ExcelProperty(value = "异常行为:A|优秀、B|良好、C|一般") |
|||
private String ycxw; |
|||
|
|||
/** |
|||
* 趋势异常:A|优秀、B|良好、C|一般 |
|||
*/ |
|||
@ExcelProperty(value = "趋势异常:A|优秀、B|良好、C|一般") |
|||
private String qsyc; |
|||
|
|||
/** |
|||
* 逻辑删除:0-否 1-是 |
|||
*/ |
|||
@ExcelProperty(value = "逻辑删除:0-否 1-是") |
|||
private String isDelete; |
|||
|
|||
/** |
|||
* 局级部门ID |
|||
*/ |
|||
@ExcelProperty(value = "局级部门ID") |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
@ExcelProperty(value = "部门ID") |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 组织单位ID |
|||
*/ |
|||
@ExcelProperty(value = "组织单位ID") |
|||
private String organId; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
package com.zdxt.enforcementcode.mapper; |
|||
|
|||
|
|||
import com.zdxt.enforcementcode.domain.bean.DashboardSituationTrendDomain; |
|||
import com.zdxt.enforcementcode.domain.bo.ComprehensiveEvaluationStatBo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardSituationDomainQueryBo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardTrendStatQueryBo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationPerListVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationDomainVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationTrendDomainVo; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 态势趋势分析-领域统计Mapper接口 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-28 |
|||
*/ |
|||
public interface DashboardSituationTrendDomainMapper extends BaseMapperPlus<DashboardSituationTrendDomain, DashboardSituationTrendDomainVo> { |
|||
|
|||
/** |
|||
* 查询态势趋势分析-领域统计列表 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 态势趋势分析-领域统计列表 |
|||
*/ |
|||
List<DashboardSituationDomainVo> querySituationTrendDomainList(DashboardTrendStatQueryBo bo); |
|||
|
|||
/** |
|||
* 根据年份和季度,按综合评价分组统计个数 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 综合评价统计列表 |
|||
*/ |
|||
List<DashboardSituationPerListVo> statByComprehensiveEvaluation(ComprehensiveEvaluationStatBo bo); |
|||
|
|||
/** |
|||
* 根据年度、季度、领域ID查询态势趋势分析-领域统计信息 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 态势趋势分析-领域统计信息 |
|||
*/ |
|||
DashboardSituationDomainVo getSituationTrendDomainInfo(ComprehensiveEvaluationStatBo bo); |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
package com.zdxt.enforcementcode.service; |
|||
|
|||
import com.zdxt.enforcementcode.domain.bo.ComprehensiveEvaluationStatBo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardSituationDomainQueryBo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardTrendStatQueryBo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationPerListVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationDomainVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationPerVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationTrendDomainVo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardSituationTrendDomainBo; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 态势趋势分析-领域统计Service接口 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-28 |
|||
*/ |
|||
public interface IDashboardSituationTrendDomainService { |
|||
|
|||
/** |
|||
* 查询态势趋势分析-领域统计 |
|||
* |
|||
* @param id 主键 |
|||
* @return 态势趋势分析-领域统计 |
|||
*/ |
|||
DashboardSituationTrendDomainVo queryById(String id); |
|||
|
|||
/** |
|||
* 分页查询态势趋势分析-领域统计列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 态势趋势分析-领域统计分页列表 |
|||
*/ |
|||
TableDataInfo<DashboardSituationTrendDomainVo> queryPageList(DashboardSituationTrendDomainBo bo, PageQuery pageQuery); |
|||
|
|||
/** |
|||
* 查询符合条件的态势趋势分析-领域统计列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 态势趋势分析-领域统计列表 |
|||
*/ |
|||
List<DashboardSituationTrendDomainVo> queryList(DashboardSituationTrendDomainBo bo); |
|||
|
|||
/** |
|||
* 新增态势趋势分析-领域统计 |
|||
* |
|||
* @param bo 态势趋势分析-领域统计 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
Boolean insertByBo(DashboardSituationTrendDomainBo bo); |
|||
|
|||
/** |
|||
* 修改态势趋势分析-领域统计 |
|||
* |
|||
* @param bo 态势趋势分析-领域统计 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
Boolean updateByBo(DashboardSituationTrendDomainBo bo); |
|||
|
|||
/** |
|||
* 校验并批量删除态势趋势分析-领域统计信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |
|||
|
|||
/** |
|||
* 查询态势趋势分析-领域统计列表 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 态势趋势分析-领域统计列表 |
|||
*/ |
|||
List<DashboardSituationDomainVo> querySituationTrendDomainList(DashboardTrendStatQueryBo bo); |
|||
|
|||
/** |
|||
* 根据年份和季度,按综合评价分组统计个数 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 综合评价统计列表 |
|||
*/ |
|||
DashboardSituationPerVo statByComprehensiveEvaluation(ComprehensiveEvaluationStatBo bo); |
|||
|
|||
/** |
|||
* 根据年度、季度、领域ID查询态势趋势分析-领域统计信息 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 态势趋势分析-领域统计信息 |
|||
*/ |
|||
DashboardSituationDomainVo getSituationTrendDomainInfo(ComprehensiveEvaluationStatBo bo); |
|||
} |
|||
@ -0,0 +1,207 @@ |
|||
package com.zdxt.enforcementcode.service.impl; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import com.zdxt.enforcementcode.domain.bean.DashboardSituationTrendDomain; |
|||
import com.zdxt.enforcementcode.domain.bo.ComprehensiveEvaluationStatBo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardSituationDomainQueryBo; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardTrendStatQueryBo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationPerListVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationDomainVo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationPerVo; |
|||
import org.dromara.common.core.utils.MapstructUtils; |
|||
import org.dromara.common.core.utils.StringUtils; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.zdxt.enforcementcode.domain.bo.DashboardSituationTrendDomainBo; |
|||
import com.zdxt.enforcementcode.domain.vo.DashboardSituationTrendDomainVo; |
|||
import com.zdxt.enforcementcode.mapper.DashboardSituationTrendDomainMapper; |
|||
import com.zdxt.enforcementcode.service.IDashboardSituationTrendDomainService; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Collection; |
|||
|
|||
/** |
|||
* 态势趋势分析-领域统计Service业务层处理 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-28 |
|||
*/ |
|||
@Slf4j |
|||
@RequiredArgsConstructor |
|||
@Service |
|||
public class DashboardSituationTrendDomainServiceImpl implements IDashboardSituationTrendDomainService { |
|||
|
|||
private final DashboardSituationTrendDomainMapper baseMapper; |
|||
|
|||
/** |
|||
* 查询态势趋势分析-领域统计 |
|||
* |
|||
* @param id 主键 |
|||
* @return 态势趋势分析-领域统计 |
|||
*/ |
|||
@Override |
|||
public DashboardSituationTrendDomainVo queryById(String id){ |
|||
return baseMapper.selectVoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 分页查询态势趋势分析-领域统计列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 态势趋势分析-领域统计分页列表 |
|||
*/ |
|||
@Override |
|||
public TableDataInfo<DashboardSituationTrendDomainVo> queryPageList(DashboardSituationTrendDomainBo bo, PageQuery pageQuery) { |
|||
LambdaQueryWrapper<DashboardSituationTrendDomain> lqw = buildQueryWrapper(bo); |
|||
Page<DashboardSituationTrendDomainVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|||
return TableDataInfo.build(result); |
|||
} |
|||
|
|||
/** |
|||
* 查询符合条件的态势趋势分析-领域统计列表 |
|||
* |
|||
* @param bo 查询条件 |
|||
* @return 态势趋势分析-领域统计列表 |
|||
*/ |
|||
@Override |
|||
public List<DashboardSituationTrendDomainVo> queryList(DashboardSituationTrendDomainBo bo) { |
|||
LambdaQueryWrapper<DashboardSituationTrendDomain> lqw = buildQueryWrapper(bo); |
|||
return baseMapper.selectVoList(lqw); |
|||
} |
|||
|
|||
private LambdaQueryWrapper<DashboardSituationTrendDomain> buildQueryWrapper(DashboardSituationTrendDomainBo bo) { |
|||
Map<String, Object> params = bo.getParams(); |
|||
LambdaQueryWrapper<DashboardSituationTrendDomain> lqw = Wrappers.lambdaQuery(); |
|||
lqw.orderByAsc(DashboardSituationTrendDomain::getId); |
|||
lqw.eq(bo.getYear() != null, DashboardSituationTrendDomain::getYear, bo.getYear()); |
|||
lqw.eq(bo.getQuarter() != null, DashboardSituationTrendDomain::getQuarter, bo.getQuarter()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getLyid()), DashboardSituationTrendDomain::getLyid, bo.getLyid()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getLymc()), DashboardSituationTrendDomain::getLymc, bo.getLymc()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getZfdwid()), DashboardSituationTrendDomain::getZfdwid, bo.getZfdwid()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getZfdwmc()), DashboardSituationTrendDomain::getZfdwmc, bo.getZfdwmc()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getZhpj()), DashboardSituationTrendDomain::getZhpj, bo.getZhpj()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getFxxy()), DashboardSituationTrendDomain::getFxxy, bo.getFxxy()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getGpjc()), DashboardSituationTrendDomain::getGpjc, bo.getGpjc()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getYcxw()), DashboardSituationTrendDomain::getYcxw, bo.getYcxw()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getQsyc()), DashboardSituationTrendDomain::getQsyc, bo.getQsyc()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getIsDelete()), DashboardSituationTrendDomain::getIsDelete, bo.getIsDelete()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getBureauDeptId()), DashboardSituationTrendDomain::getBureauDeptId, bo.getBureauDeptId()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getDeptId()), DashboardSituationTrendDomain::getDeptId, bo.getDeptId()); |
|||
lqw.eq(StringUtils.isNotBlank(bo.getOrganId()), DashboardSituationTrendDomain::getOrganId, bo.getOrganId()); |
|||
return lqw; |
|||
} |
|||
|
|||
/** |
|||
* 新增态势趋势分析-领域统计 |
|||
* |
|||
* @param bo 态势趋势分析-领域统计 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
@Override |
|||
public Boolean insertByBo(DashboardSituationTrendDomainBo bo) { |
|||
DashboardSituationTrendDomain add = MapstructUtils.convert(bo, DashboardSituationTrendDomain.class); |
|||
validEntityBeforeSave(add); |
|||
boolean flag = baseMapper.insert(add) > 0; |
|||
if (flag) { |
|||
bo.setId(add.getId()); |
|||
} |
|||
return flag; |
|||
} |
|||
|
|||
/** |
|||
* 修改态势趋势分析-领域统计 |
|||
* |
|||
* @param bo 态势趋势分析-领域统计 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
@Override |
|||
public Boolean updateByBo(DashboardSituationTrendDomainBo bo) { |
|||
DashboardSituationTrendDomain update = MapstructUtils.convert(bo, DashboardSituationTrendDomain.class); |
|||
validEntityBeforeSave(update); |
|||
return baseMapper.updateById(update) > 0; |
|||
} |
|||
|
|||
/** |
|||
* 保存前的数据校验 |
|||
*/ |
|||
private void validEntityBeforeSave(DashboardSituationTrendDomain entity){ |
|||
//TODO 做一些数据校验,如唯一约束
|
|||
} |
|||
|
|||
/** |
|||
* 校验并批量删除态势趋势分析-领域统计信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
@Override |
|||
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |
|||
if(isValid){ |
|||
//TODO 做一些业务上的校验,判断是否需要校验
|
|||
} |
|||
return baseMapper.deleteByIds(ids) > 0; |
|||
} |
|||
|
|||
/** |
|||
* 查询态势趋势分析-领域统计列表 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 态势趋势分析-领域统计列表 |
|||
*/ |
|||
@Override |
|||
public List<DashboardSituationDomainVo> querySituationTrendDomainList(DashboardTrendStatQueryBo bo) { |
|||
return baseMapper.querySituationTrendDomainList(bo); |
|||
} |
|||
|
|||
/** |
|||
* 根据年份和季度,按综合评价分组统计个数 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 综合评价统计列表 |
|||
*/ |
|||
@Override |
|||
public DashboardSituationPerVo statByComprehensiveEvaluation(ComprehensiveEvaluationStatBo bo) { |
|||
DashboardSituationPerVo dashboardSituationPerVo = new DashboardSituationPerVo(); |
|||
List<DashboardSituationPerListVo> list = baseMapper.statByComprehensiveEvaluation(bo); |
|||
|
|||
// 计算总数
|
|||
int total = list.stream() |
|||
.mapToInt(item -> item.getCount() != null ? item.getCount().intValue() : 0) |
|||
.sum(); |
|||
|
|||
// 计算每个级别的比例
|
|||
if (total > 0) { |
|||
list.forEach(item -> { |
|||
long count = item.getCount() != null ? item.getCount() : 0; |
|||
double per = (double) count / total * 100; |
|||
// 保留两位小数
|
|||
item.setPer(Math.round(per * 100.0) / 100.0); |
|||
}); |
|||
} |
|||
|
|||
dashboardSituationPerVo.setTotal(total); |
|||
dashboardSituationPerVo.setList(list); |
|||
|
|||
return dashboardSituationPerVo; |
|||
} |
|||
|
|||
/** |
|||
* 根据年度、季度、领域ID查询态势趋势分析-领域统计信息 |
|||
* |
|||
* @param bo 查询参数 |
|||
* @return 态势趋势分析-领域统计信息 |
|||
*/ |
|||
@Override |
|||
public DashboardSituationDomainVo getSituationTrendDomainInfo(ComprehensiveEvaluationStatBo bo) { |
|||
return baseMapper.getSituationTrendDomainInfo(bo); |
|||
} |
|||
} |
|||
@ -0,0 +1,100 @@ |
|||
<?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.zdxt.enforcementcode.mapper.DashboardSituationTrendDomainMapper"> |
|||
|
|||
<!-- 查询态势趋势分析-领域统计列表 --> |
|||
<select id="querySituationTrendDomainList" resultType="com.zdxt.enforcementcode.domain.vo.DashboardSituationDomainVo"> |
|||
SELECT |
|||
a.id, |
|||
a.year, |
|||
a.quarter, |
|||
a.lyid, |
|||
a.lymc, |
|||
a.zfdwid, |
|||
a.zfdwmc, |
|||
a.zhpj, |
|||
a.fxxy, |
|||
a.gpjc, |
|||
a.ycxw, |
|||
a.qsyc, |
|||
a.bureau_dept_id AS bureauDeptId, |
|||
a.dept_id AS deptId, |
|||
a.organ_id AS organId |
|||
FROM dashboard_situation_trend_domain a |
|||
WHERE a.is_delete = '0' |
|||
|
|||
<if test="startYear != null and startQuarter != null and endYear != null and endQuarter != null"> |
|||
AND ( |
|||
(a.year = #{startYear} AND a.quarter >= #{startQuarter}) |
|||
OR (a.year > #{startYear} AND a.year < #{endYear}) |
|||
OR (a.year = #{endYear} AND a.quarter <= #{endQuarter}) |
|||
) |
|||
</if> |
|||
|
|||
<if test="lyid != null and lyid != ''"> |
|||
AND a.lyid = #{lyid} |
|||
</if> |
|||
|
|||
<if test="lymc != null and lymc != ''"> |
|||
AND a.lymc LIKE CONCAT('%', #{lymc}, '%') |
|||
</if> |
|||
|
|||
ORDER BY |
|||
a.lymc, |
|||
a.year, |
|||
a.quarter |
|||
|
|||
</select> |
|||
|
|||
<!-- 根据年份和季度,按综合评价分组统计个数 --> |
|||
<select id="statByComprehensiveEvaluation" resultType="com.zdxt.enforcementcode.domain.vo.DashboardSituationPerListVo"> |
|||
SELECT |
|||
a.zhpj AS level, |
|||
COUNT(*) AS count |
|||
FROM dashboard_situation_trend_domain a |
|||
WHERE a.is_delete = '0' |
|||
<if test="year != null"> |
|||
AND a.year = #{year} |
|||
</if> |
|||
<if test="quarter != null"> |
|||
AND a.quarter = #{quarter} |
|||
</if> |
|||
GROUP BY a.zhpj |
|||
ORDER BY a.zhpj |
|||
</select> |
|||
|
|||
<!-- 根据年度、季度、领域ID查询态势趋势分析-领域统计信息 --> |
|||
<select id="getSituationTrendDomainInfo" resultType="com.zdxt.enforcementcode.domain.vo.DashboardSituationDomainVo"> |
|||
SELECT |
|||
a.id, |
|||
a.year, |
|||
a.quarter, |
|||
a.lyid, |
|||
a.lymc, |
|||
a.zfdwid, |
|||
a.zfdwmc, |
|||
a.zhpj, |
|||
a.fxxy, |
|||
a.gpjc, |
|||
a.ycxw, |
|||
a.qsyc, |
|||
a.bureau_dept_id AS bureauDeptId, |
|||
a.dept_id AS deptId, |
|||
a.organ_id AS organId |
|||
FROM dashboard_situation_trend_domain a |
|||
WHERE a.is_delete = '0' |
|||
<if test="year != null"> |
|||
AND a.year = #{year} |
|||
</if> |
|||
<if test="quarter != null"> |
|||
AND a.quarter = #{quarter} |
|||
</if> |
|||
<if test="lyid != null and lyid != ''"> |
|||
AND a.lyid = #{lyid} |
|||
</if> |
|||
LIMIT 1 |
|||
</select> |
|||
|
|||
</mapper> |
|||
Loading…
Reference in new issue