11 changed files with 1670 additions and 0 deletions
@ -0,0 +1,49 @@ |
|||||
|
package com.zdxt.enforcementcode.controller.web.supervision; |
||||
|
|
||||
|
import com.zdxt.enforcementcode.domain.bo.QueryDashboardOverviewBo; |
||||
|
import com.zdxt.enforcementcode.domain.vo.DashboardOverviewVo; |
||||
|
import com.zdxt.enforcementcode.domain.vo.LawEnforcementIntensityVo; |
||||
|
import com.zdxt.enforcementcode.service.IDashboardOverviewService; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import org.dromara.common.core.domain.R; |
||||
|
import org.dromara.common.web.core.BaseController; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* 大屏总览 |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-05-27 |
||||
|
*/ |
||||
|
@Validated |
||||
|
@RequiredArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("/web/enforcementcode/overview") |
||||
|
public class DashboardOverviewController extends BaseController { |
||||
|
|
||||
|
private final IDashboardOverviewService dashboardOverviewService; |
||||
|
|
||||
|
/** |
||||
|
* 查询大屏总览信息 |
||||
|
*/ |
||||
|
@GetMapping("/getDpzl") |
||||
|
public R<DashboardOverviewVo> getDpzl(QueryDashboardOverviewBo bo) { |
||||
|
DashboardOverviewVo result = dashboardOverviewService.getDashboardOverviewInfo(bo); |
||||
|
return R.ok(result); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询执法力度信息 |
||||
|
* 支持月度、季度、年度 |
||||
|
* |
||||
|
* @param bo 查询条件(statisticsType: month-月度, quarter-季度, year-年度) |
||||
|
*/ |
||||
|
@GetMapping("/getZfld") |
||||
|
public R<LawEnforcementIntensityVo> getZfld(QueryDashboardOverviewBo bo) { |
||||
|
LawEnforcementIntensityVo result = dashboardOverviewService.getLawEnforcementIntensity(bo); |
||||
|
return R.ok(result); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,291 @@ |
|||||
|
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_overview |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@TableName("dashboard_overview") |
||||
|
public class DashboardOverview extends BaseEntity { |
||||
|
|
||||
|
@Serial |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
@TableId(value = "id") |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 市编码 |
||||
|
*/ |
||||
|
private String cityCode; |
||||
|
|
||||
|
/** |
||||
|
* 市名称 |
||||
|
*/ |
||||
|
private String cityName; |
||||
|
|
||||
|
/** |
||||
|
* 区编码 |
||||
|
*/ |
||||
|
private String districtCode; |
||||
|
|
||||
|
/** |
||||
|
* 区名称 |
||||
|
*/ |
||||
|
private String districtName; |
||||
|
|
||||
|
/** |
||||
|
* 街道编号 |
||||
|
*/ |
||||
|
private String streetCode; |
||||
|
|
||||
|
/** |
||||
|
* 街道名称 |
||||
|
*/ |
||||
|
private String streetName; |
||||
|
|
||||
|
/** |
||||
|
* 级别:1-市 2-区 3-街道 |
||||
|
*/ |
||||
|
private Long level; |
||||
|
|
||||
|
/** |
||||
|
* 年份 |
||||
|
*/ |
||||
|
private Long year; |
||||
|
|
||||
|
/** |
||||
|
* 月份 |
||||
|
*/ |
||||
|
private Long month; |
||||
|
|
||||
|
/** |
||||
|
* 企业总数 |
||||
|
*/ |
||||
|
private Long qyzs; |
||||
|
|
||||
|
/** |
||||
|
* 企业总数同比 |
||||
|
*/ |
||||
|
private Long qyzstb; |
||||
|
|
||||
|
/** |
||||
|
* 企业总数环比 |
||||
|
*/ |
||||
|
private Long qyzshb; |
||||
|
|
||||
|
/** |
||||
|
* 单独执法数 |
||||
|
*/ |
||||
|
private Long ddzfs; |
||||
|
|
||||
|
/** |
||||
|
* 单独执法数同比 |
||||
|
*/ |
||||
|
private Long ddzfstb; |
||||
|
|
||||
|
/** |
||||
|
* 单独执法数环比 |
||||
|
*/ |
||||
|
private Long ddzfshb; |
||||
|
|
||||
|
/** |
||||
|
* 联合执法数 |
||||
|
*/ |
||||
|
private Long lhzfs; |
||||
|
|
||||
|
/** |
||||
|
* 联合执法数同比 |
||||
|
*/ |
||||
|
private Long lhzfstb; |
||||
|
|
||||
|
/** |
||||
|
* 联合执法数环比 |
||||
|
*/ |
||||
|
private Long lhzfshb; |
||||
|
|
||||
|
/** |
||||
|
* 被执法企业数 |
||||
|
*/ |
||||
|
private Long bzfqys; |
||||
|
|
||||
|
/** |
||||
|
* 被执法企业数同比 |
||||
|
*/ |
||||
|
private Long bzfqystb; |
||||
|
|
||||
|
/** |
||||
|
* 被执法企业数环比 |
||||
|
*/ |
||||
|
private Long bzfqyhb; |
||||
|
|
||||
|
/** |
||||
|
* 入企减压数 |
||||
|
*/ |
||||
|
private Long rqjys; |
||||
|
|
||||
|
/** |
||||
|
* 入企减压率 |
||||
|
*/ |
||||
|
private Long rqjygl; |
||||
|
|
||||
|
/** |
||||
|
* 检查总数 |
||||
|
*/ |
||||
|
private Long jczs; |
||||
|
|
||||
|
/** |
||||
|
* 行政检查 |
||||
|
*/ |
||||
|
private Long xzjc; |
||||
|
|
||||
|
/** |
||||
|
* 行政处罚 |
||||
|
*/ |
||||
|
private Long xzcf; |
||||
|
|
||||
|
/** |
||||
|
* 行政强制 |
||||
|
*/ |
||||
|
private Long xzqz; |
||||
|
|
||||
|
/** |
||||
|
* 其他行政行为 |
||||
|
*/ |
||||
|
private Long xzqt; |
||||
|
|
||||
|
/** |
||||
|
* 执法人员数 |
||||
|
*/ |
||||
|
private Long zfrys; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位数 |
||||
|
*/ |
||||
|
private Long zfdws; |
||||
|
|
||||
|
/** |
||||
|
* 平均办理时长 |
||||
|
*/ |
||||
|
private Long pjblsc; |
||||
|
|
||||
|
/** |
||||
|
* 按时办结数 |
||||
|
*/ |
||||
|
private Long asbjzs; |
||||
|
|
||||
|
/** |
||||
|
* 检查频次 |
||||
|
*/ |
||||
|
private Long jcpcl; |
||||
|
|
||||
|
/** |
||||
|
* 重复检查次数 |
||||
|
*/ |
||||
|
private Long cfjccs; |
||||
|
|
||||
|
/** |
||||
|
* 处罚撤销数 |
||||
|
*/ |
||||
|
private Long cfcxs; |
||||
|
|
||||
|
/** |
||||
|
* 处罚撤销率 |
||||
|
*/ |
||||
|
private Long cfcxl; |
||||
|
|
||||
|
/** |
||||
|
* 处罚变更数 |
||||
|
*/ |
||||
|
private Long cfbgs; |
||||
|
|
||||
|
/** |
||||
|
* 处罚变更率 |
||||
|
*/ |
||||
|
private Long cfbgl; |
||||
|
|
||||
|
/** |
||||
|
* 计划总数 |
||||
|
*/ |
||||
|
private Long jhzs; |
||||
|
|
||||
|
/** |
||||
|
* 预告总数 |
||||
|
*/ |
||||
|
private Long yjzs; |
||||
|
|
||||
|
/** |
||||
|
* 涉企执法总数 |
||||
|
*/ |
||||
|
private Long sqzfzs; |
||||
|
|
||||
|
/** |
||||
|
* 检查评价总数 |
||||
|
*/ |
||||
|
private Long jcpjs; |
||||
|
|
||||
|
/** |
||||
|
* 检查投诉总数 |
||||
|
*/ |
||||
|
private Long jctss; |
||||
|
|
||||
|
/** |
||||
|
* 职权使用总数 |
||||
|
*/ |
||||
|
private Long zqsyzs; |
||||
|
|
||||
|
/** |
||||
|
* 风险信用预警 |
||||
|
*/ |
||||
|
private Long fxxyyj; |
||||
|
|
||||
|
/** |
||||
|
* 高频检查预警 |
||||
|
*/ |
||||
|
private Long gpjcyj; |
||||
|
|
||||
|
/** |
||||
|
* 异常人员数 |
||||
|
*/ |
||||
|
private Long ycrys; |
||||
|
|
||||
|
/** |
||||
|
* 异常行为次数 |
||||
|
*/ |
||||
|
private Long ycxwcs; |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除:0-否 1-是 |
||||
|
*/ |
||||
|
private String isDelete; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位ID |
||||
|
*/ |
||||
|
private String bureauDeptId; |
||||
|
|
||||
|
/** |
||||
|
* 部门ID |
||||
|
*/ |
||||
|
private String deptId; |
||||
|
|
||||
|
/** |
||||
|
* 组织单位ID |
||||
|
*/ |
||||
|
private String organId; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,295 @@ |
|||||
|
package com.zdxt.enforcementcode.domain.bo; |
||||
|
|
||||
|
import com.zdxt.enforcementcode.domain.bean.DashboardOverview; |
||||
|
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_overview |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@AutoMapper(target = DashboardOverview.class, reverseConvertGenerate = false) |
||||
|
public class DashboardOverviewBo extends BaseEntity { |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
@NotBlank(message = "主键ID不能为空", groups = { EditGroup.class }) |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 市编码 |
||||
|
*/ |
||||
|
@NotBlank(message = "市编码不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private String cityCode; |
||||
|
|
||||
|
/** |
||||
|
* 市名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "市名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private String cityName; |
||||
|
|
||||
|
/** |
||||
|
* 区编码 |
||||
|
*/ |
||||
|
private String districtCode; |
||||
|
|
||||
|
/** |
||||
|
* 区名称 |
||||
|
*/ |
||||
|
private String districtName; |
||||
|
|
||||
|
/** |
||||
|
* 街道编号 |
||||
|
*/ |
||||
|
private String streetCode; |
||||
|
|
||||
|
/** |
||||
|
* 街道名称 |
||||
|
*/ |
||||
|
private String streetName; |
||||
|
|
||||
|
/** |
||||
|
* 级别:1-市 2-区 3-街道 |
||||
|
*/ |
||||
|
@NotNull(message = "级别:1-市 2-区 3-街道不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private Long level; |
||||
|
|
||||
|
/** |
||||
|
* 年份 |
||||
|
*/ |
||||
|
@NotNull(message = "年份不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private Long year; |
||||
|
|
||||
|
/** |
||||
|
* 月份 |
||||
|
*/ |
||||
|
@NotNull(message = "月份不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private Long month; |
||||
|
|
||||
|
/** |
||||
|
* 企业总数 |
||||
|
*/ |
||||
|
private Long qyzs; |
||||
|
|
||||
|
/** |
||||
|
* 企业总数同比 |
||||
|
*/ |
||||
|
private Long qyzstb; |
||||
|
|
||||
|
/** |
||||
|
* 企业总数环比 |
||||
|
*/ |
||||
|
private Long qyzshb; |
||||
|
|
||||
|
/** |
||||
|
* 单独执法数 |
||||
|
*/ |
||||
|
private Long ddzfs; |
||||
|
|
||||
|
/** |
||||
|
* 单独执法数同比 |
||||
|
*/ |
||||
|
private Long ddzfstb; |
||||
|
|
||||
|
/** |
||||
|
* 单独执法数环比 |
||||
|
*/ |
||||
|
private Long ddzfshb; |
||||
|
|
||||
|
/** |
||||
|
* 联合执法数 |
||||
|
*/ |
||||
|
private Long lhzfs; |
||||
|
|
||||
|
/** |
||||
|
* 联合执法数同比 |
||||
|
*/ |
||||
|
private Long lhzfstb; |
||||
|
|
||||
|
/** |
||||
|
* 联合执法数环比 |
||||
|
*/ |
||||
|
private Long lhzfshb; |
||||
|
|
||||
|
/** |
||||
|
* 被执法企业数 |
||||
|
*/ |
||||
|
private Long bzfqys; |
||||
|
|
||||
|
/** |
||||
|
* 被执法企业数同比 |
||||
|
*/ |
||||
|
private Long bzfqystb; |
||||
|
|
||||
|
/** |
||||
|
* 被执法企业数环比 |
||||
|
*/ |
||||
|
private Long bzfqyhb; |
||||
|
|
||||
|
/** |
||||
|
* 入企减压数 |
||||
|
*/ |
||||
|
private Long rqjys; |
||||
|
|
||||
|
/** |
||||
|
* 入企减压率 |
||||
|
*/ |
||||
|
private Long rqjygl; |
||||
|
|
||||
|
/** |
||||
|
* 检查总数 |
||||
|
*/ |
||||
|
private Long jczs; |
||||
|
|
||||
|
/** |
||||
|
* 行政检查 |
||||
|
*/ |
||||
|
private Long xzjc; |
||||
|
|
||||
|
/** |
||||
|
* 行政处罚 |
||||
|
*/ |
||||
|
private Long xzcf; |
||||
|
|
||||
|
/** |
||||
|
* 行政强制 |
||||
|
*/ |
||||
|
private Long xzqz; |
||||
|
|
||||
|
/** |
||||
|
* 其他行政行为 |
||||
|
*/ |
||||
|
private Long xzqt; |
||||
|
|
||||
|
/** |
||||
|
* 执法人员数 |
||||
|
*/ |
||||
|
private Long zfrys; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位数 |
||||
|
*/ |
||||
|
private Long zfdws; |
||||
|
|
||||
|
/** |
||||
|
* 平均办理时长 |
||||
|
*/ |
||||
|
private Long pjblsc; |
||||
|
|
||||
|
/** |
||||
|
* 按时办结数 |
||||
|
*/ |
||||
|
private Long asbjzs; |
||||
|
|
||||
|
/** |
||||
|
* 检查频次 |
||||
|
*/ |
||||
|
private Long jcpcl; |
||||
|
|
||||
|
/** |
||||
|
* 重复检查次数 |
||||
|
*/ |
||||
|
private Long cfjccs; |
||||
|
|
||||
|
/** |
||||
|
* 处罚撤销数 |
||||
|
*/ |
||||
|
private Long cfcxs; |
||||
|
|
||||
|
/** |
||||
|
* 处罚撤销率 |
||||
|
*/ |
||||
|
private Long cfcxl; |
||||
|
|
||||
|
/** |
||||
|
* 处罚变更数 |
||||
|
*/ |
||||
|
private Long cfbgs; |
||||
|
|
||||
|
/** |
||||
|
* 处罚变更率 |
||||
|
*/ |
||||
|
private Long cfbgl; |
||||
|
|
||||
|
/** |
||||
|
* 计划总数 |
||||
|
*/ |
||||
|
private Long jhzs; |
||||
|
|
||||
|
/** |
||||
|
* 预告总数 |
||||
|
*/ |
||||
|
private Long yjzs; |
||||
|
|
||||
|
/** |
||||
|
* 涉企执法总数 |
||||
|
*/ |
||||
|
private Long sqzfzs; |
||||
|
|
||||
|
/** |
||||
|
* 检查评价总数 |
||||
|
*/ |
||||
|
private Long jcpjs; |
||||
|
|
||||
|
/** |
||||
|
* 检查投诉总数 |
||||
|
*/ |
||||
|
private Long jctss; |
||||
|
|
||||
|
/** |
||||
|
* 职权使用总数 |
||||
|
*/ |
||||
|
private Long zqsyzs; |
||||
|
|
||||
|
/** |
||||
|
* 风险信用预警 |
||||
|
*/ |
||||
|
private Long fxxyyj; |
||||
|
|
||||
|
/** |
||||
|
* 高频检查预警 |
||||
|
*/ |
||||
|
private Long gpjcyj; |
||||
|
|
||||
|
/** |
||||
|
* 异常人员数 |
||||
|
*/ |
||||
|
private Long ycrys; |
||||
|
|
||||
|
/** |
||||
|
* 异常行为次数 |
||||
|
*/ |
||||
|
private Long ycxwcs; |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除:0-否 1-是 |
||||
|
*/ |
||||
|
private String isDelete; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位ID |
||||
|
*/ |
||||
|
private String bureauDeptId; |
||||
|
|
||||
|
/** |
||||
|
* 部门ID |
||||
|
*/ |
||||
|
private String deptId; |
||||
|
|
||||
|
/** |
||||
|
* 组织单位ID |
||||
|
*/ |
||||
|
private String organId; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.zdxt.enforcementcode.domain.bo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 执法力度统计查询BO |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LawEnforcementIntensityQueryBo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 市编码 |
||||
|
*/ |
||||
|
private String cityCode; |
||||
|
|
||||
|
/** |
||||
|
* 市名称 |
||||
|
*/ |
||||
|
private String cityName; |
||||
|
|
||||
|
/** |
||||
|
* 区编码 |
||||
|
*/ |
||||
|
private String districtCode; |
||||
|
|
||||
|
/** |
||||
|
* 区名称 |
||||
|
*/ |
||||
|
private String districtName; |
||||
|
|
||||
|
/** |
||||
|
* 街道编号 |
||||
|
*/ |
||||
|
private String streetCode; |
||||
|
|
||||
|
/** |
||||
|
* 街道名称 |
||||
|
*/ |
||||
|
private String streetName; |
||||
|
|
||||
|
/** |
||||
|
* 级别:1-市 2-区 3-街道 |
||||
|
*/ |
||||
|
private Long level; |
||||
|
|
||||
|
/** |
||||
|
* 统计类型:month-月度, quarter-季度, year-年度 |
||||
|
*/ |
||||
|
private String statisticsType; |
||||
|
|
||||
|
/** |
||||
|
* 开始月份 |
||||
|
*/ |
||||
|
private Long startMonth; |
||||
|
|
||||
|
/** |
||||
|
* 结束月份 |
||||
|
*/ |
||||
|
private Long endMonth; |
||||
|
|
||||
|
/** |
||||
|
* 年份 |
||||
|
*/ |
||||
|
private Long year; |
||||
|
|
||||
|
/** |
||||
|
* 月份 |
||||
|
*/ |
||||
|
private Long month; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package com.zdxt.enforcementcode.domain.bo; |
||||
|
|
||||
|
import com.zdxt.enforcementcode.domain.bean.DashboardOverview; |
||||
|
import io.github.linpeilie.annotations.AutoMapper; |
||||
|
import jakarta.validation.constraints.NotBlank; |
||||
|
import jakarta.validation.constraints.NotNull; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import org.dromara.common.core.validate.AddGroup; |
||||
|
import org.dromara.common.core.validate.EditGroup; |
||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 大屏总览业务对象 dashboard_overview |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AutoMapper(target = DashboardOverview.class, reverseConvertGenerate = false) |
||||
|
public class QueryDashboardOverviewBo implements Serializable { |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 市编码 |
||||
|
*/ |
||||
|
private String cityCode; |
||||
|
|
||||
|
/** |
||||
|
* 市名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "市名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private String cityName; |
||||
|
|
||||
|
/** |
||||
|
* 区编码 |
||||
|
*/ |
||||
|
private String districtCode; |
||||
|
|
||||
|
/** |
||||
|
* 区名称 |
||||
|
*/ |
||||
|
private String districtName; |
||||
|
|
||||
|
/** |
||||
|
* 街道编号 |
||||
|
*/ |
||||
|
private String streetCode; |
||||
|
|
||||
|
/** |
||||
|
* 街道名称 |
||||
|
*/ |
||||
|
private String streetName; |
||||
|
|
||||
|
/** |
||||
|
* 级别:1-市 2-区 3-街道 |
||||
|
*/ |
||||
|
@NotNull(message = "级别不能为空") |
||||
|
private Long level; |
||||
|
|
||||
|
/** |
||||
|
* 年份 |
||||
|
*/ |
||||
|
private Long year; |
||||
|
|
||||
|
/** |
||||
|
* 月份 |
||||
|
*/ |
||||
|
private Long month; |
||||
|
|
||||
|
/** |
||||
|
* 统计类型:month-月度, quarter-季度, year-年度 |
||||
|
*/ |
||||
|
private String statisticsType; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,348 @@ |
|||||
|
package com.zdxt.enforcementcode.domain.vo; |
||||
|
|
||||
|
|
||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
||||
|
import cn.idev.excel.annotation.ExcelProperty; |
||||
|
import com.zdxt.enforcementcode.domain.bean.DashboardOverview; |
||||
|
import io.github.linpeilie.annotations.AutoMapper; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serial; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 大屏总览视图对象 dashboard_overview |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ExcelIgnoreUnannotated |
||||
|
@AutoMapper(target = DashboardOverview.class) |
||||
|
public class DashboardOverviewVo implements Serializable { |
||||
|
|
||||
|
@Serial |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
@ExcelProperty(value = "主键ID") |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 市编码 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "市编码") |
||||
|
private String cityCode; |
||||
|
|
||||
|
/** |
||||
|
* 市名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "市名称") |
||||
|
private String cityName; |
||||
|
|
||||
|
/** |
||||
|
* 区编码 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "区编码") |
||||
|
private String districtCode; |
||||
|
|
||||
|
/** |
||||
|
* 区名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "区名称") |
||||
|
private String districtName; |
||||
|
|
||||
|
/** |
||||
|
* 街道编号 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "街道编号") |
||||
|
private String streetCode; |
||||
|
|
||||
|
/** |
||||
|
* 街道名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "街道名称") |
||||
|
private String streetName; |
||||
|
|
||||
|
/** |
||||
|
* 级别:1-市 2-区 3-街道 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "级别:1-市 2-区 3-街道") |
||||
|
private Long level; |
||||
|
|
||||
|
/** |
||||
|
* 年份 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "年份") |
||||
|
private Long year; |
||||
|
|
||||
|
/** |
||||
|
* 月份 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "月份") |
||||
|
private Long month; |
||||
|
|
||||
|
/** |
||||
|
* 企业总数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "企业总数") |
||||
|
private Long qyzs; |
||||
|
|
||||
|
/** |
||||
|
* 企业总数同比 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "企业总数同比") |
||||
|
private Long qyzstb; |
||||
|
|
||||
|
/** |
||||
|
* 企业总数环比 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "企业总数环比") |
||||
|
private Long qyzshb; |
||||
|
|
||||
|
/** |
||||
|
* 单独执法数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "单独执法数") |
||||
|
private Long ddzfs; |
||||
|
|
||||
|
/** |
||||
|
* 单独执法数同比 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "单独执法数同比") |
||||
|
private Long ddzfstb; |
||||
|
|
||||
|
/** |
||||
|
* 单独执法数环比 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "单独执法数环比") |
||||
|
private Long ddzfshb; |
||||
|
|
||||
|
/** |
||||
|
* 联合执法数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "联合执法数") |
||||
|
private Long lhzfs; |
||||
|
|
||||
|
/** |
||||
|
* 联合执法数同比 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "联合执法数同比") |
||||
|
private Long lhzfstb; |
||||
|
|
||||
|
/** |
||||
|
* 联合执法数环比 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "联合执法数环比") |
||||
|
private Long lhzfshb; |
||||
|
|
||||
|
/** |
||||
|
* 被执法企业数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "被执法企业数") |
||||
|
private Long bzfqys; |
||||
|
|
||||
|
/** |
||||
|
* 被执法企业数同比 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "被执法企业数同比") |
||||
|
private Long bzfqystb; |
||||
|
|
||||
|
/** |
||||
|
* 被执法企业数环比 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "被执法企业数环比") |
||||
|
private Long bzfqyhb; |
||||
|
|
||||
|
/** |
||||
|
* 入企减压数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "入企减压数") |
||||
|
private Long rqjys; |
||||
|
|
||||
|
/** |
||||
|
* 入企减压率 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "入企减压率") |
||||
|
private Long rqjygl; |
||||
|
|
||||
|
/** |
||||
|
* 检查总数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "检查总数") |
||||
|
private Long jczs; |
||||
|
|
||||
|
/** |
||||
|
* 行政检查 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "行政检查") |
||||
|
private Long xzjc; |
||||
|
|
||||
|
/** |
||||
|
* 行政处罚 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "行政处罚") |
||||
|
private Long xzcf; |
||||
|
|
||||
|
/** |
||||
|
* 行政强制 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "行政强制") |
||||
|
private Long xzqz; |
||||
|
|
||||
|
/** |
||||
|
* 其他行政行为 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "其他行政行为") |
||||
|
private Long xzqt; |
||||
|
|
||||
|
/** |
||||
|
* 执法人员数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "执法人员数") |
||||
|
private Long zfrys; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "执法单位数") |
||||
|
private Long zfdws; |
||||
|
|
||||
|
/** |
||||
|
* 平均办理时长 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "平均办理时长") |
||||
|
private Long pjblsc; |
||||
|
|
||||
|
/** |
||||
|
* 按时办结数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "按时办结数") |
||||
|
private Long asbjzs; |
||||
|
|
||||
|
/** |
||||
|
* 检查频次 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "检查频次") |
||||
|
private Long jcpcl; |
||||
|
|
||||
|
/** |
||||
|
* 重复检查次数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "重复检查次数") |
||||
|
private Long cfjccs; |
||||
|
|
||||
|
/** |
||||
|
* 处罚撤销数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "处罚撤销数") |
||||
|
private Long cfcxs; |
||||
|
|
||||
|
/** |
||||
|
* 处罚撤销率 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "处罚撤销率") |
||||
|
private Long cfcxl; |
||||
|
|
||||
|
/** |
||||
|
* 处罚变更数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "处罚变更数") |
||||
|
private Long cfbgs; |
||||
|
|
||||
|
/** |
||||
|
* 处罚变更率 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "处罚变更率") |
||||
|
private Long cfbgl; |
||||
|
|
||||
|
/** |
||||
|
* 计划总数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "计划总数") |
||||
|
private Long jhzs; |
||||
|
|
||||
|
/** |
||||
|
* 预告总数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "预告总数") |
||||
|
private Long yjzs; |
||||
|
|
||||
|
/** |
||||
|
* 涉企执法总数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "涉企执法总数") |
||||
|
private Long sqzfzs; |
||||
|
|
||||
|
/** |
||||
|
* 检查评价总数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "检查评价总数") |
||||
|
private Long jcpjs; |
||||
|
|
||||
|
/** |
||||
|
* 检查投诉总数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "检查投诉总数") |
||||
|
private Long jctss; |
||||
|
|
||||
|
/** |
||||
|
* 职权使用总数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "职权使用总数") |
||||
|
private Long zqsyzs; |
||||
|
|
||||
|
/** |
||||
|
* 风险信用预警 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "风险信用预警") |
||||
|
private Long fxxyyj; |
||||
|
|
||||
|
/** |
||||
|
* 高频检查预警 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "高频检查预警") |
||||
|
private Long gpjcyj; |
||||
|
|
||||
|
/** |
||||
|
* 异常人员数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "异常人员数") |
||||
|
private Long ycrys; |
||||
|
|
||||
|
/** |
||||
|
* 异常行为次数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "异常行为次数") |
||||
|
private Long ycxwcs; |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除: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,62 @@ |
|||||
|
package com.zdxt.enforcementcode.domain.vo; |
||||
|
|
||||
|
import cn.idev.excel.annotation.ExcelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serial; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 执法力度统计VO |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LawEnforcementIntensityVo implements Serializable { |
||||
|
|
||||
|
@Serial |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 统计类型:month-月度, quarter-季度, year-年度 |
||||
|
*/ |
||||
|
private String statisticsType; |
||||
|
|
||||
|
/** |
||||
|
* 时间标签(格式:月度-2026-05, 季度-2026-Q1, 年度-2026) |
||||
|
*/ |
||||
|
private String timeLabel; |
||||
|
|
||||
|
/** |
||||
|
* 检查总数 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "检查总数") |
||||
|
private Long jczs; |
||||
|
|
||||
|
/** |
||||
|
* 行政检查 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "行政检查") |
||||
|
private Long xzjc; |
||||
|
|
||||
|
/** |
||||
|
* 行政处罚 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "行政处罚") |
||||
|
private Long xzcf; |
||||
|
|
||||
|
/** |
||||
|
* 行政强制 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "行政强制") |
||||
|
private Long xzqz; |
||||
|
|
||||
|
/** |
||||
|
* 其他行政行为 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "其他行政行为") |
||||
|
private Long xzqt; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.zdxt.enforcementcode.mapper; |
||||
|
|
||||
|
|
||||
|
import com.zdxt.enforcementcode.domain.bean.DashboardOverview; |
||||
|
import com.zdxt.enforcementcode.domain.bo.LawEnforcementIntensityQueryBo; |
||||
|
import com.zdxt.enforcementcode.domain.vo.DashboardOverviewVo; |
||||
|
import com.zdxt.enforcementcode.domain.vo.LawEnforcementIntensityVo; |
||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 大屏总览Mapper接口 |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-05-27 |
||||
|
*/ |
||||
|
public interface DashboardOverviewMapper extends BaseMapperPlus<DashboardOverview, DashboardOverviewVo> { |
||||
|
|
||||
|
/** |
||||
|
* 查询执法力度统计数据 |
||||
|
* |
||||
|
* @param queryBo 查询参数 |
||||
|
* @return 执法力度统计信息 |
||||
|
*/ |
||||
|
LawEnforcementIntensityVo queryLawEnforcementIntensity(LawEnforcementIntensityQueryBo queryBo); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
package com.zdxt.enforcementcode.service; |
||||
|
|
||||
|
import com.zdxt.enforcementcode.domain.vo.DashboardOverviewVo; |
||||
|
import com.zdxt.enforcementcode.domain.bo.DashboardOverviewBo; |
||||
|
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-27 |
||||
|
*/ |
||||
|
public interface IDashboardOverviewService { |
||||
|
|
||||
|
/** |
||||
|
* 查询大屏总览 |
||||
|
* |
||||
|
* @param id 主键 |
||||
|
* @return 大屏总览 |
||||
|
*/ |
||||
|
DashboardOverviewVo queryById(String id); |
||||
|
|
||||
|
/** |
||||
|
* 分页查询大屏总览列表 |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @param pageQuery 分页参数 |
||||
|
* @return 大屏总览分页列表 |
||||
|
*/ |
||||
|
TableDataInfo<DashboardOverviewVo> queryPageList(DashboardOverviewBo bo, PageQuery pageQuery); |
||||
|
|
||||
|
/** |
||||
|
* 查询符合条件的大屏总览列表 |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @return 大屏总览列表 |
||||
|
*/ |
||||
|
List<DashboardOverviewVo> queryList(DashboardOverviewBo bo); |
||||
|
|
||||
|
/** |
||||
|
* 获取大屏总览信息(根据查询条件) |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @return 大屏总览信息 |
||||
|
*/ |
||||
|
DashboardOverviewVo getDashboardOverviewInfo(com.zdxt.enforcementcode.domain.bo.QueryDashboardOverviewBo bo); |
||||
|
|
||||
|
/** |
||||
|
* 获取执法力度统计信息(支持月度、季度、年度) |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @return 执法力度统计信息 |
||||
|
*/ |
||||
|
com.zdxt.enforcementcode.domain.vo.LawEnforcementIntensityVo getLawEnforcementIntensity(com.zdxt.enforcementcode.domain.bo.QueryDashboardOverviewBo bo); |
||||
|
|
||||
|
/** |
||||
|
* 新增大屏总览 |
||||
|
* |
||||
|
* @param bo 大屏总览 |
||||
|
* @return 是否新增成功 |
||||
|
*/ |
||||
|
Boolean insertByBo(DashboardOverviewBo bo); |
||||
|
|
||||
|
/** |
||||
|
* 修改大屏总览 |
||||
|
* |
||||
|
* @param bo 大屏总览 |
||||
|
* @return 是否修改成功 |
||||
|
*/ |
||||
|
Boolean updateByBo(DashboardOverviewBo bo); |
||||
|
|
||||
|
/** |
||||
|
* 校验并批量删除大屏总览信息 |
||||
|
* |
||||
|
* @param ids 待删除的主键集合 |
||||
|
* @param isValid 是否进行有效性校验 |
||||
|
* @return 是否删除成功 |
||||
|
*/ |
||||
|
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |
||||
|
} |
||||
@ -0,0 +1,304 @@ |
|||||
|
package com.zdxt.enforcementcode.service.impl; |
||||
|
|
||||
|
import com.zdxt.enforcementcode.domain.bean.DashboardOverview; |
||||
|
import com.zdxt.enforcementcode.domain.bo.LawEnforcementIntensityQueryBo; |
||||
|
import com.zdxt.enforcementcode.domain.bo.QueryDashboardOverviewBo; |
||||
|
import com.zdxt.enforcementcode.domain.vo.LawEnforcementIntensityVo; |
||||
|
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.DashboardOverviewBo; |
||||
|
import com.zdxt.enforcementcode.domain.vo.DashboardOverviewVo; |
||||
|
import com.zdxt.enforcementcode.mapper.DashboardOverviewMapper; |
||||
|
import com.zdxt.enforcementcode.service.IDashboardOverviewService; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 大屏总览Service业务层处理 |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-05-27 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RequiredArgsConstructor |
||||
|
@Service |
||||
|
public class DashboardOverviewServiceImpl implements IDashboardOverviewService { |
||||
|
|
||||
|
private final DashboardOverviewMapper baseMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询大屏总览 |
||||
|
* |
||||
|
* @param id 主键 |
||||
|
* @return 大屏总览 |
||||
|
*/ |
||||
|
@Override |
||||
|
public DashboardOverviewVo queryById(String id){ |
||||
|
return baseMapper.selectVoById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 分页查询大屏总览列表 |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @param pageQuery 分页参数 |
||||
|
* @return 大屏总览分页列表 |
||||
|
*/ |
||||
|
@Override |
||||
|
public TableDataInfo<DashboardOverviewVo> queryPageList(DashboardOverviewBo bo, PageQuery pageQuery) { |
||||
|
LambdaQueryWrapper<DashboardOverview> lqw = buildQueryWrapper(bo); |
||||
|
Page<DashboardOverviewVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
||||
|
return TableDataInfo.build(result); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询符合条件的大屏总览列表 |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @return 大屏总览列表 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<DashboardOverviewVo> queryList(DashboardOverviewBo bo) { |
||||
|
LambdaQueryWrapper<DashboardOverview> lqw = buildQueryWrapper(bo); |
||||
|
return baseMapper.selectVoList(lqw); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取大屏总览信息(根据查询条件) |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @return 大屏总览信息 |
||||
|
*/ |
||||
|
@Override |
||||
|
public DashboardOverviewVo getDashboardOverviewInfo(QueryDashboardOverviewBo bo) { |
||||
|
// 校验 level 参数不能为空
|
||||
|
if (bo.getLevel() == null) { |
||||
|
throw new IllegalArgumentException("级别参数不能为空,级别:1-市 2-区 3-街道"); |
||||
|
} |
||||
|
|
||||
|
// 如果未指定年份和月份,默认查询当前年和上一个月
|
||||
|
if (bo.getYear() == null || bo.getMonth() == null) { |
||||
|
java.time.LocalDate now = java.time.LocalDate.now(); |
||||
|
// 获取上一个月
|
||||
|
java.time.LocalDate lastMonth = now.minusMonths(1); |
||||
|
|
||||
|
if (bo.getYear() == null) { |
||||
|
bo.setYear((long) lastMonth.getYear()); |
||||
|
} |
||||
|
if (bo.getMonth() == null) { |
||||
|
bo.setMonth((long) lastMonth.getMonthValue()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
LambdaQueryWrapper<DashboardOverview> lqw = buildQueryWrapperForQuery(bo); |
||||
|
// 查询单条记录,如果有多条则取第一条
|
||||
|
return baseMapper.selectVoOne(lqw); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取执法力度统计信息(支持月度、季度、年度) |
||||
|
* 月度:查询当前月份的数据 |
||||
|
* 季度:查询当前季度的数据 |
||||
|
* 年度:查询当前年的数据 |
||||
|
* @param bo 查询条件 |
||||
|
* @return 执法力度统计信息 |
||||
|
*/ |
||||
|
@Override |
||||
|
public LawEnforcementIntensityVo getLawEnforcementIntensity(QueryDashboardOverviewBo bo) { |
||||
|
// 校验 level 参数不能为空
|
||||
|
if (bo.getLevel() == null) { |
||||
|
throw new IllegalArgumentException("级别参数不能为空,级别:1-市 2-区 3-街道"); |
||||
|
} |
||||
|
|
||||
|
// 获取统计类型,默认为月度
|
||||
|
String statisticsType = StringUtils.isNotBlank(bo.getStatisticsType()) ? bo.getStatisticsType() : "month"; |
||||
|
|
||||
|
// 构建查询参数对象
|
||||
|
LawEnforcementIntensityQueryBo queryBo = new LawEnforcementIntensityQueryBo(); |
||||
|
queryBo.setCityCode(bo.getCityCode()); |
||||
|
queryBo.setCityName(bo.getCityName()); |
||||
|
queryBo.setDistrictCode(bo.getDistrictCode()); |
||||
|
queryBo.setDistrictName(bo.getDistrictName()); |
||||
|
queryBo.setStreetCode(bo.getStreetCode()); |
||||
|
queryBo.setStreetName(bo.getStreetName()); |
||||
|
queryBo.setLevel(bo.getLevel()); |
||||
|
queryBo.setStatisticsType(statisticsType); |
||||
|
|
||||
|
// 根据统计类型设置时间范围
|
||||
|
java.time.LocalDate now = java.time.LocalDate.now(); |
||||
|
// int currentYear = now.getYear();
|
||||
|
// int currentMonth = now.getMonthValue();
|
||||
|
// // 获取上一个月
|
||||
|
java.time.LocalDate lastMonth = now.minusMonths(1); |
||||
|
int year = lastMonth.getYear(); |
||||
|
int month = lastMonth.getMonthValue(); |
||||
|
switch (statisticsType.toLowerCase()) { |
||||
|
case "month": |
||||
|
// 统计当前月的数据
|
||||
|
queryBo.setYear((long) year); |
||||
|
queryBo.setMonth((long) month); |
||||
|
break; |
||||
|
case "quarter": |
||||
|
// 统计当前季度的数据
|
||||
|
int currentQuarter = (month - 1) / 3 + 1; |
||||
|
queryBo.setYear((long) year); |
||||
|
// 计算当前季度的起始和结束月份
|
||||
|
queryBo.setStartMonth((long) ((currentQuarter - 1) * 3 + 1)); |
||||
|
int endMonth = currentQuarter * 3; |
||||
|
if(endMonth >month){ |
||||
|
endMonth = month; |
||||
|
} |
||||
|
queryBo.setEndMonth((long) endMonth); |
||||
|
break; |
||||
|
case "year": |
||||
|
// 统计当前年度的数据
|
||||
|
queryBo.setYear((long) year); |
||||
|
break; |
||||
|
default: |
||||
|
// 默认统计当前月
|
||||
|
queryBo.setYear((long) year); |
||||
|
queryBo.setMonth((long) month); |
||||
|
break; |
||||
|
} |
||||
|
|
||||
|
// 调用 Mapper 查询
|
||||
|
return baseMapper.queryLawEnforcementIntensity(queryBo); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private LambdaQueryWrapper<DashboardOverview> buildQueryWrapperForQuery(QueryDashboardOverviewBo bo) { |
||||
|
LambdaQueryWrapper<DashboardOverview> lqw = Wrappers.lambdaQuery(); |
||||
|
lqw.orderByAsc(DashboardOverview::getId); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCityCode()), DashboardOverview::getCityCode, bo.getCityCode()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getCityName()), DashboardOverview::getCityName, bo.getCityName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDistrictCode()), DashboardOverview::getDistrictCode, bo.getDistrictCode()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getDistrictName()), DashboardOverview::getDistrictName, bo.getDistrictName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStreetCode()), DashboardOverview::getStreetCode, bo.getStreetCode()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getStreetName()), DashboardOverview::getStreetName, bo.getStreetName()); |
||||
|
lqw.eq(bo.getLevel() != null, DashboardOverview::getLevel, bo.getLevel()); |
||||
|
lqw.eq(bo.getYear() != null, DashboardOverview::getYear, bo.getYear()); |
||||
|
lqw.eq(bo.getMonth() != null, DashboardOverview::getMonth, bo.getMonth()); |
||||
|
return lqw; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private LambdaQueryWrapper<DashboardOverview> buildQueryWrapper(DashboardOverviewBo bo) { |
||||
|
Map<String, Object> params = bo.getParams(); |
||||
|
LambdaQueryWrapper<DashboardOverview> lqw = Wrappers.lambdaQuery(); |
||||
|
lqw.orderByAsc(DashboardOverview::getId); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCityCode()), DashboardOverview::getCityCode, bo.getCityCode()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getCityName()), DashboardOverview::getCityName, bo.getCityName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDistrictCode()), DashboardOverview::getDistrictCode, bo.getDistrictCode()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getDistrictName()), DashboardOverview::getDistrictName, bo.getDistrictName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStreetCode()), DashboardOverview::getStreetCode, bo.getStreetCode()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getStreetName()), DashboardOverview::getStreetName, bo.getStreetName()); |
||||
|
lqw.eq(bo.getLevel() != null, DashboardOverview::getLevel, bo.getLevel()); |
||||
|
lqw.eq(bo.getYear() != null, DashboardOverview::getYear, bo.getYear()); |
||||
|
lqw.eq(bo.getMonth() != null, DashboardOverview::getMonth, bo.getMonth()); |
||||
|
lqw.eq(bo.getQyzs() != null, DashboardOverview::getQyzs, bo.getQyzs()); |
||||
|
lqw.eq(bo.getQyzstb() != null, DashboardOverview::getQyzstb, bo.getQyzstb()); |
||||
|
lqw.eq(bo.getQyzshb() != null, DashboardOverview::getQyzshb, bo.getQyzshb()); |
||||
|
lqw.eq(bo.getDdzfs() != null, DashboardOverview::getDdzfs, bo.getDdzfs()); |
||||
|
lqw.eq(bo.getDdzfstb() != null, DashboardOverview::getDdzfstb, bo.getDdzfstb()); |
||||
|
lqw.eq(bo.getDdzfshb() != null, DashboardOverview::getDdzfshb, bo.getDdzfshb()); |
||||
|
lqw.eq(bo.getLhzfs() != null, DashboardOverview::getLhzfs, bo.getLhzfs()); |
||||
|
lqw.eq(bo.getLhzfstb() != null, DashboardOverview::getLhzfstb, bo.getLhzfstb()); |
||||
|
lqw.eq(bo.getLhzfshb() != null, DashboardOverview::getLhzfshb, bo.getLhzfshb()); |
||||
|
lqw.eq(bo.getBzfqys() != null, DashboardOverview::getBzfqys, bo.getBzfqys()); |
||||
|
lqw.eq(bo.getBzfqystb() != null, DashboardOverview::getBzfqystb, bo.getBzfqystb()); |
||||
|
lqw.eq(bo.getBzfqyhb() != null, DashboardOverview::getBzfqyhb, bo.getBzfqyhb()); |
||||
|
lqw.eq(bo.getRqjys() != null, DashboardOverview::getRqjys, bo.getRqjys()); |
||||
|
lqw.eq(bo.getRqjygl() != null, DashboardOverview::getRqjygl, bo.getRqjygl()); |
||||
|
lqw.eq(bo.getJczs() != null, DashboardOverview::getJczs, bo.getJczs()); |
||||
|
lqw.eq(bo.getXzjc() != null, DashboardOverview::getXzjc, bo.getXzjc()); |
||||
|
lqw.eq(bo.getXzcf() != null, DashboardOverview::getXzcf, bo.getXzcf()); |
||||
|
lqw.eq(bo.getXzqz() != null, DashboardOverview::getXzqz, bo.getXzqz()); |
||||
|
lqw.eq(bo.getXzqt() != null, DashboardOverview::getXzqt, bo.getXzqt()); |
||||
|
lqw.eq(bo.getZfrys() != null, DashboardOverview::getZfrys, bo.getZfrys()); |
||||
|
lqw.eq(bo.getZfdws() != null, DashboardOverview::getZfdws, bo.getZfdws()); |
||||
|
lqw.eq(bo.getPjblsc() != null, DashboardOverview::getPjblsc, bo.getPjblsc()); |
||||
|
lqw.eq(bo.getAsbjzs() != null, DashboardOverview::getAsbjzs, bo.getAsbjzs()); |
||||
|
lqw.eq(bo.getJcpcl() != null, DashboardOverview::getJcpcl, bo.getJcpcl()); |
||||
|
lqw.eq(bo.getCfjccs() != null, DashboardOverview::getCfjccs, bo.getCfjccs()); |
||||
|
lqw.eq(bo.getCfcxs() != null, DashboardOverview::getCfcxs, bo.getCfcxs()); |
||||
|
lqw.eq(bo.getCfcxl() != null, DashboardOverview::getCfcxl, bo.getCfcxl()); |
||||
|
lqw.eq(bo.getCfbgs() != null, DashboardOverview::getCfbgs, bo.getCfbgs()); |
||||
|
lqw.eq(bo.getCfbgl() != null, DashboardOverview::getCfbgl, bo.getCfbgl()); |
||||
|
lqw.eq(bo.getJhzs() != null, DashboardOverview::getJhzs, bo.getJhzs()); |
||||
|
lqw.eq(bo.getYjzs() != null, DashboardOverview::getYjzs, bo.getYjzs()); |
||||
|
lqw.eq(bo.getSqzfzs() != null, DashboardOverview::getSqzfzs, bo.getSqzfzs()); |
||||
|
lqw.eq(bo.getJcpjs() != null, DashboardOverview::getJcpjs, bo.getJcpjs()); |
||||
|
lqw.eq(bo.getJctss() != null, DashboardOverview::getJctss, bo.getJctss()); |
||||
|
lqw.eq(bo.getZqsyzs() != null, DashboardOverview::getZqsyzs, bo.getZqsyzs()); |
||||
|
lqw.eq(bo.getFxxyyj() != null, DashboardOverview::getFxxyyj, bo.getFxxyyj()); |
||||
|
lqw.eq(bo.getGpjcyj() != null, DashboardOverview::getGpjcyj, bo.getGpjcyj()); |
||||
|
lqw.eq(bo.getYcrys() != null, DashboardOverview::getYcrys, bo.getYcrys()); |
||||
|
lqw.eq(bo.getYcxwcs() != null, DashboardOverview::getYcxwcs, bo.getYcxwcs()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getIsDelete()), DashboardOverview::getIsDelete, bo.getIsDelete()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getBureauDeptId()), DashboardOverview::getBureauDeptId, bo.getBureauDeptId()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDeptId()), DashboardOverview::getDeptId, bo.getDeptId()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getOrganId()), DashboardOverview::getOrganId, bo.getOrganId()); |
||||
|
return lqw; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增大屏总览 |
||||
|
* |
||||
|
* @param bo 大屏总览 |
||||
|
* @return 是否新增成功 |
||||
|
*/ |
||||
|
@Override |
||||
|
public Boolean insertByBo(DashboardOverviewBo bo) { |
||||
|
DashboardOverview add = MapstructUtils.convert(bo, DashboardOverview.class); |
||||
|
validEntityBeforeSave(add); |
||||
|
boolean flag = baseMapper.insert(add) > 0; |
||||
|
if (flag) { |
||||
|
bo.setId(add.getId()); |
||||
|
} |
||||
|
return flag; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改大屏总览 |
||||
|
* |
||||
|
* @param bo 大屏总览 |
||||
|
* @return 是否修改成功 |
||||
|
*/ |
||||
|
@Override |
||||
|
public Boolean updateByBo(DashboardOverviewBo bo) { |
||||
|
DashboardOverview update = MapstructUtils.convert(bo, DashboardOverview.class); |
||||
|
validEntityBeforeSave(update); |
||||
|
return baseMapper.updateById(update) > 0; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 保存前的数据校验 |
||||
|
*/ |
||||
|
private void validEntityBeforeSave(DashboardOverview entity){ |
||||
|
//TODO 做一些数据校验,如唯一约束
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 校验并批量删除大屏总览信息 |
||||
|
* |
||||
|
* @param ids 待删除的主键集合 |
||||
|
* @param isValid 是否进行有效性校验 |
||||
|
* @return 是否删除成功 |
||||
|
*/ |
||||
|
@Override |
||||
|
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |
||||
|
if(isValid){ |
||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
|
} |
||||
|
return baseMapper.deleteByIds(ids) > 0; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,53 @@ |
|||||
|
<?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.DashboardOverviewMapper"> |
||||
|
|
||||
|
<!-- 查询执法力度统计数据 --> |
||||
|
<select id="queryLawEnforcementIntensity" resultType="com.zdxt.enforcementcode.domain.vo.LawEnforcementIntensityVo"> |
||||
|
SELECT |
||||
|
COALESCE(SUM(jczs), 0) AS jczs, |
||||
|
COALESCE(SUM(xzjc), 0) AS xzjc, |
||||
|
COALESCE(SUM(xzcf), 0) AS xzcf, |
||||
|
COALESCE(SUM(xzqz), 0) AS xzqz, |
||||
|
COALESCE(SUM(xzqt), 0) AS xzqt |
||||
|
FROM dashboard_overview |
||||
|
WHERE is_delete = '0' |
||||
|
<if test="cityCode != null and cityCode != ''"> |
||||
|
AND city_code = #{cityCode} |
||||
|
</if> |
||||
|
<if test="cityName != null and cityName != ''"> |
||||
|
AND city_name LIKE CONCAT('%', #{cityName}, '%') |
||||
|
</if> |
||||
|
<if test="districtCode != null and districtCode != ''"> |
||||
|
AND district_code = #{districtCode} |
||||
|
</if> |
||||
|
<if test="districtName != null and districtName != ''"> |
||||
|
AND district_name LIKE CONCAT('%', #{districtName}, '%') |
||||
|
</if> |
||||
|
<if test="streetCode != null and streetCode != ''"> |
||||
|
AND street_code = #{streetCode} |
||||
|
</if> |
||||
|
<if test="streetName != null and streetName != ''"> |
||||
|
AND street_name LIKE CONCAT('%', #{streetName}, '%') |
||||
|
</if> |
||||
|
<if test="level != null"> |
||||
|
AND level = #{level} |
||||
|
</if> |
||||
|
<if test="year != null"> |
||||
|
AND year = #{year} |
||||
|
</if> |
||||
|
<if test="month != null"> |
||||
|
AND month = #{month} |
||||
|
</if> |
||||
|
<if test="startMonth != null"> |
||||
|
AND month >= #{startMonth} |
||||
|
</if> |
||||
|
<if test="endMonth != null"> |
||||
|
AND month <= #{endMonth} |
||||
|
</if> |
||||
|
|
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
Loading…
Reference in new issue