11 changed files with 1231 additions and 0 deletions
@ -0,0 +1,169 @@ |
|||
package com.zdxt.enforcementcode.controller.cim; |
|||
|
|||
|
|||
import cn.dev33.satoken.annotation.SaIgnore; |
|||
import com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo; |
|||
import com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo; |
|||
import com.zdxt.enforcementcode.service.ICimDashboardOverviewService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.dromara.common.core.domain.R; |
|||
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; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* cim大屏-大屏总览Controller |
|||
* |
|||
* @author niujiyi |
|||
* @date 2023-08-07 |
|||
*/ |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/cim/dashboardOverview") |
|||
public class CimDashboardOverviewController { |
|||
|
|||
private final ICimDashboardOverviewService cimDashboardOverviewService; |
|||
|
|||
/** |
|||
* Cim大屏-大屏总览:查询 涉企登记总数-行政执法数-非行政执法数-企业总数、同比、环比 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@SaIgnore |
|||
@GetMapping("/getEnfRegistrationCount") |
|||
public R<CimDashboardOverviewVo> getEnfRegistrationCount(CimDashboardOverviewQueryBo bo){ |
|||
|
|||
CimDashboardOverviewVo vo = new CimDashboardOverviewVo(); |
|||
//行政执法
|
|||
Long xzzfCount = cimDashboardOverviewService.getEnfRegistrationCount(bo); |
|||
vo.setXzzfs(xzzfCount); |
|||
//非行政执法
|
|||
Long fxzzfCount = cimDashboardOverviewService.getNonEnfRegistrationCount(bo); |
|||
vo.setFxzzfs(fxzzfCount); |
|||
//涉企登记总数
|
|||
vo.setSqdjzs(xzzfCount + fxzzfCount); |
|||
|
|||
//企业总数
|
|||
//同比
|
|||
//环比
|
|||
|
|||
return R.ok(vo); |
|||
} |
|||
|
|||
/** |
|||
* Cim大屏-大屏总览:查询 计划总数-预告总数-涉企执法总数-价差评价总数-检查投诉总数-平均检查频次 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@SaIgnore |
|||
@GetMapping("/getLawRegulationCount") |
|||
public R<CimDashboardOverviewVo> getLawRegulationCount(CimDashboardOverviewQueryBo bo){ |
|||
|
|||
CimDashboardOverviewVo vo = new CimDashboardOverviewVo(); |
|||
//计划总数
|
|||
Long jszsCount= cimDashboardOverviewService.getPlanCount(bo); |
|||
vo.setJhzs(jszsCount); |
|||
//预告总数
|
|||
Long ygzsCount= cimDashboardOverviewService.getNoticeCount(bo); |
|||
vo.setYgzs(ygzsCount); |
|||
//涉企执法总数
|
|||
Long sqzfzsCount= cimDashboardOverviewService.getEnfLawCount(bo); |
|||
vo.setSqzfzs(sqzfzsCount); |
|||
//检查评价总数
|
|||
Long jcpjzsCount= cimDashboardOverviewService.getLawEvaluateCount(bo); |
|||
vo.setJcpjzs(jcpjzsCount); |
|||
//检查投诉总数
|
|||
Long jctszsCount= cimDashboardOverviewService.getComplaintCount(bo); |
|||
vo.setJctszs(jctszsCount); |
|||
//平均检查频次
|
|||
Long bzfqyCount= cimDashboardOverviewService.getSubLawEntCount(bo); |
|||
Long xzzfCount= cimDashboardOverviewService.getEnfRegistrationCount(bo); |
|||
vo.setPjjcpc(xzzfCount/bzfqyCount); |
|||
|
|||
return R.ok(vo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* Cim大屏-大屏总览 查询 单独部门执法-联合执法-被执法企业-入企压减率-执法人员数-执法单位数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@SaIgnore |
|||
@GetMapping("getAdminLawCount") |
|||
public R<CimDashboardOverviewVo> getAdminLawCount(CimDashboardOverviewQueryBo bo){ |
|||
|
|||
CimDashboardOverviewVo vo = new CimDashboardOverviewVo(); |
|||
//单独部门执法
|
|||
Long ddbmzfCount=cimDashboardOverviewService.getSepDeptLawCount(bo); |
|||
vo.setDdbmzf(ddbmzfCount); |
|||
//联合执法
|
|||
Long lhzfCount= cimDashboardOverviewService.getUnionLawCount(bo); |
|||
vo.setLhzf(lhzfCount); |
|||
//被执法企业
|
|||
Long bzfqyCount= cimDashboardOverviewService.getSubLawEntCount(bo); |
|||
vo.setBzfqy(bzfqyCount); |
|||
//入企压减率
|
|||
Long xzzfCount= cimDashboardOverviewService.getEnfRegistrationCount(bo); |
|||
vo.setRqyjl(xzzfCount-(lhzfCount+ddbmzfCount)); |
|||
|
|||
//执法人员数
|
|||
//执法单位数
|
|||
return R.ok(vo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* Cim大屏-大屏总览 查询区域检查趋势分析 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@SaIgnore |
|||
@GetMapping("/getQuarterlyRegionList") |
|||
public R<List<CimDashboardOverviewVo>> getQuarterlyRegionList(CimDashboardOverviewQueryBo bo){ |
|||
List<CimDashboardOverviewVo> vo= cimDashboardOverviewService.getQuarterlyRegionList(bo); |
|||
return R.ok(vo); |
|||
} |
|||
|
|||
/** |
|||
* Cim大屏-大屏总览 查询领域检查趋势分析 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@SaIgnore |
|||
@GetMapping("/getDomainQuarterList") |
|||
public R<List<CimDashboardOverviewVo>> getDomainQuarterList(CimDashboardOverviewQueryBo bo){ |
|||
List<CimDashboardOverviewVo> vo= cimDashboardOverviewService.getDomainQuarterList(bo); |
|||
return R.ok(vo); |
|||
} |
|||
/** |
|||
* Cim大屏-大屏总览 查询 涉企执法登记类别 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@SaIgnore |
|||
@GetMapping("/getEnfRegistrationType") |
|||
public R<List<CimDashboardOverviewVo>> getEnfRegistrationType(CimDashboardOverviewQueryBo bo){ |
|||
List<CimDashboardOverviewVo> vo= cimDashboardOverviewService.getEnfRegistrationType(bo); |
|||
return R.ok(vo); |
|||
} |
|||
|
|||
/** |
|||
* Cim大屏-大屏总览 查询非行政涉企执法登记 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@SaIgnore |
|||
@GetMapping("/getNonEnfRegistraion") |
|||
public R<List<CimDashboardOverviewVo>> getNonEnfRegistraion(CimDashboardOverviewQueryBo bo){ |
|||
List<CimDashboardOverviewVo> vo= cimDashboardOverviewService.getNonEnfRegistraion(bo); |
|||
return R.ok(vo); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
package com.zdxt.enforcementcode.domain.bo; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
|
|||
@Data |
|||
public class CimDashboardOverviewQueryBo { |
|||
|
|||
|
|||
/** |
|||
* 通用时间 |
|||
*/ |
|||
private Date dateTime; |
|||
|
|||
/** |
|||
* 区域编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 月-开始时间 |
|||
*/ |
|||
private Date beginTime; |
|||
|
|||
/** |
|||
* 月-结束时间 |
|||
*/ |
|||
private Date endTime; |
|||
|
|||
/** |
|||
* 年份 |
|||
*/ |
|||
private String year; |
|||
|
|||
} |
|||
@ -0,0 +1,114 @@ |
|||
package com.zdxt.enforcementcode.domain.vo; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CimDashboardOverviewVo { |
|||
|
|||
|
|||
/** |
|||
* 涉企登记总数 |
|||
*/ |
|||
private Long sqdjzs; |
|||
|
|||
/** |
|||
* 行政执法数 |
|||
*/ |
|||
private Long xzzfs; |
|||
|
|||
/** |
|||
* 非行政执法数 |
|||
*/ |
|||
private Long fxzzfs; |
|||
|
|||
/** |
|||
* 计划总数 |
|||
*/ |
|||
private Long jhzs; |
|||
|
|||
/** |
|||
* 预告总数 |
|||
*/ |
|||
private Long ygzs; |
|||
|
|||
/** |
|||
* 涉企执法总数 |
|||
*/ |
|||
private Long sqzfzs; |
|||
|
|||
/** |
|||
* 检查评价总数 |
|||
*/ |
|||
private Long jcpjzs; |
|||
|
|||
/** |
|||
* 检查投诉总数 |
|||
*/ |
|||
private Long jctszs; |
|||
|
|||
/** |
|||
* 平均检查频次 |
|||
*/ |
|||
private Long pjjcpc; |
|||
|
|||
/** |
|||
* 单独部门执法 |
|||
*/ |
|||
private Long ddbmzf; |
|||
|
|||
/** |
|||
* 联合执法 |
|||
*/ |
|||
private Long lhzf; |
|||
|
|||
/** |
|||
* 被执法企业 |
|||
*/ |
|||
private Long bzfqy; |
|||
|
|||
/** |
|||
* 入企压减率 |
|||
*/ |
|||
private Long rqyjl; |
|||
|
|||
/** |
|||
* 编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 名称 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private Long number; |
|||
|
|||
/** |
|||
* 占比 |
|||
*/ |
|||
private Double proportion; |
|||
|
|||
/** |
|||
* 一季度 |
|||
*/ |
|||
private Long firstQuarter; |
|||
|
|||
/** |
|||
* 二季度 |
|||
*/ |
|||
private Long secondQuarter; |
|||
|
|||
/** |
|||
* 三季度 |
|||
*/ |
|||
private Long thirdQuarter; |
|||
|
|||
/** |
|||
* 四季度 |
|||
*/ |
|||
private Long fourthQuarter; |
|||
} |
|||
@ -0,0 +1,108 @@ |
|||
package com.zdxt.enforcementcode.mapper; |
|||
|
|||
import com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo; |
|||
import com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface CimDashboardOverviewMapper { |
|||
|
|||
/** |
|||
* 获取行政执法数 |
|||
* |
|||
* @return 获取行政执法数 |
|||
*/ |
|||
Long getEnfRegistrationCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
|
|||
/** |
|||
* 获取非行政执法数 |
|||
* |
|||
* @return 非行政执法数 |
|||
*/ |
|||
Long getNonEnfRegistrationCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取计划总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getPlanCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取预告总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getNoticeCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
|
|||
/** |
|||
* 获取涉企执法总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getEnfLawCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取检查评价总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getLawEvaluateCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取检查投诉总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getComplaintCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取被执法企业 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getSubLawEntCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取单独部门执法 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getSepDeptLawCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取联合执法 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getUnionLawCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取区域检查趋势分析(季度) |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
List<CimDashboardOverviewVo> getQuarterlyRegionList(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取领域检查趋势分析(季度) |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
List<CimDashboardOverviewVo> getDomainQuarterList(CimDashboardOverviewQueryBo bo); |
|||
|
|||
|
|||
/** |
|||
* 获取涉企登记执法类别 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
List<CimDashboardOverviewVo> getEnfRegistrationType(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取非行政执法 |
|||
*/ |
|||
List<CimDashboardOverviewVo> getNonEnfRegistraion(CimDashboardOverviewQueryBo bo); |
|||
} |
|||
@ -0,0 +1,114 @@ |
|||
package com.zdxt.enforcementcode.service; |
|||
|
|||
import com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo; |
|||
import com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo; |
|||
import com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* cim大屏-大屏总览 |
|||
*/ |
|||
public interface ICimDashboardOverviewService { |
|||
|
|||
|
|||
/** |
|||
* 获取行政执法数 |
|||
* |
|||
* @return 获取行政执法数 |
|||
*/ |
|||
Long getEnfRegistrationCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
|
|||
/** |
|||
* 获取非行政执法数 |
|||
* |
|||
* @return 非行政执法数 |
|||
*/ |
|||
Long getNonEnfRegistrationCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取计划总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getPlanCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取预告总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getNoticeCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
|
|||
/** |
|||
* 获取涉企执法总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getEnfLawCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取检查评价总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getLawEvaluateCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取检查投诉总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getComplaintCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取被执法企业 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getSubLawEntCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取单独部门执法 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getSepDeptLawCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取联合执法 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
Long getUnionLawCount(CimDashboardOverviewQueryBo bo); |
|||
|
|||
|
|||
|
|||
/** |
|||
* 获取区域检查趋势分析(季度) |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
List<CimDashboardOverviewVo> getQuarterlyRegionList(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取领域检查趋势分析(季度) |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
List<CimDashboardOverviewVo> getDomainQuarterList(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取涉企登记执法类别 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
List<CimDashboardOverviewVo> getEnfRegistrationType(CimDashboardOverviewQueryBo bo); |
|||
|
|||
/** |
|||
* 获取非行政执法 |
|||
*/ |
|||
List<CimDashboardOverviewVo> getNonEnfRegistraion(CimDashboardOverviewQueryBo bo); |
|||
} |
|||
@ -0,0 +1,172 @@ |
|||
package com.zdxt.enforcementcode.service.impl; |
|||
|
|||
import com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo; |
|||
import com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo; |
|||
import com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo; |
|||
import com.zdxt.enforcementcode.mapper.CimDashboardOverviewMapper; |
|||
import com.zdxt.enforcementcode.mapper.StatisticalPanelMapper; |
|||
import com.zdxt.enforcementcode.service.ICimDashboardOverviewService; |
|||
import io.swagger.v3.oas.models.security.SecurityScheme; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* cim大屏总览实现 |
|||
*/ |
|||
@Slf4j |
|||
@RequiredArgsConstructor |
|||
@Service |
|||
public class CimDashboardOverviewServiceImpl implements ICimDashboardOverviewService { |
|||
|
|||
|
|||
private final CimDashboardOverviewMapper cimDashboardOverviewMapper; |
|||
|
|||
private final StatisticalPanelMapper statisticalPanelMapper; |
|||
|
|||
/** |
|||
* 查询行政执法数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Long getEnfRegistrationCount(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getEnfRegistrationCount(bo); |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 查询非行政执法数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Long getNonEnfRegistrationCount(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getNonEnfRegistrationCount(bo); |
|||
} |
|||
|
|||
/** |
|||
* 查询计划总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Long getPlanCount(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getPlanCount(bo); |
|||
} |
|||
|
|||
/** |
|||
* 查询预告总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Long getNoticeCount(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getNoticeCount(bo); |
|||
} |
|||
|
|||
/** |
|||
* 查询涉企执法总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Long getEnfLawCount(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getEnfLawCount(bo); |
|||
} |
|||
|
|||
/** |
|||
* 查询检查评价总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Long getLawEvaluateCount(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getLawEvaluateCount(bo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 查询检查投诉总数 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Long getComplaintCount(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getComplaintCount(bo); |
|||
} |
|||
|
|||
/** |
|||
* 查询被执法企业 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Long getSubLawEntCount(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getSubLawEntCount(bo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 查询单独部门执法 |
|||
*/ |
|||
@Override |
|||
public Long getSepDeptLawCount(CimDashboardOverviewQueryBo bo){ |
|||
return cimDashboardOverviewMapper.getSepDeptLawCount(bo); |
|||
} |
|||
|
|||
/** |
|||
* 查询联合执法 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Long getUnionLawCount(CimDashboardOverviewQueryBo bo){ |
|||
return cimDashboardOverviewMapper.getUnionLawCount(bo); |
|||
} |
|||
|
|||
/** |
|||
* 查询区域检查趋势分析 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public List<CimDashboardOverviewVo> getQuarterlyRegionList(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getQuarterlyRegionList(bo); |
|||
} |
|||
|
|||
/** |
|||
* 查询领域检查趋势分析 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public List<CimDashboardOverviewVo> getDomainQuarterList(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getDomainQuarterList(bo); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 查询涉企执法登记类别 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public List<CimDashboardOverviewVo> getEnfRegistrationType(CimDashboardOverviewQueryBo bo){ |
|||
return cimDashboardOverviewMapper.getEnfRegistrationType(bo); |
|||
} |
|||
|
|||
/** |
|||
* 查询非行政涉企执法登记 |
|||
* @param bo |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public List<CimDashboardOverviewVo> getNonEnfRegistraion(CimDashboardOverviewQueryBo bo) { |
|||
return cimDashboardOverviewMapper.getNonEnfRegistraion(bo); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,456 @@ |
|||
<?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.CimDashboardOverviewMapper"> |
|||
|
|||
<!-- 获取行政执法数 --> |
|||
<select id="getEnfRegistrationCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
count(1) as xzzfs |
|||
from |
|||
enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_submit = 1 |
|||
and t1.is_delete = 0 |
|||
and t1.enterprise_name is not null |
|||
and t1.enterprise_number is not null |
|||
<if test="dateTime !=null"> |
|||
and t1.enforcement_time = #{dateTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 获取非行政执法数 --> |
|||
<select id="getNonEnfRegistrationCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
count(1) as fxzzfs |
|||
from |
|||
non_enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.has_delete = 0 |
|||
<if test="dateTime !=null"> |
|||
and T1.enforcement_time = #{dateTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 获取计划总数 --> |
|||
<select id="getPlanCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
count(1) as jhzs |
|||
from |
|||
efcode_cp_plan t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_delete = 0 |
|||
<if test="beginTime !=null"> |
|||
and t1.plan_date >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.plan_date <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 获取预告总数 --> |
|||
<select id="getNoticeCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
count(1) ygzs |
|||
from |
|||
efcode_cp_notice t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_delete = 0 |
|||
and t1.status=1 |
|||
<if test="beginTime !=null"> |
|||
and t1.publish_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.publish_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 获取涉企执法总数 --> |
|||
<select id="getEnfLawCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
count(1) sqzfzs |
|||
from |
|||
enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_delete = 0 |
|||
and t1.is_submit = 1 |
|||
and t1.enterprise_name is not null |
|||
and t1.enterprise_number is not null |
|||
<if test="beginTime !=null"> |
|||
and t1.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 获取检查评价总数 --> |
|||
<select id="getLawEvaluateCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
count(1) jcpjzs |
|||
from |
|||
enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_delete = 0 |
|||
and t1.is_submit = 1 |
|||
and t1.is_evaluate = 1 |
|||
and t1.enterprise_name is not null |
|||
and t1.enterprise_number is not null |
|||
<if test="beginTime !=null"> |
|||
and t1.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 获取检查投诉总数 --> |
|||
<select id="getComplaintCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
|
|||
select |
|||
count(1) jctszs |
|||
from |
|||
enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_delete = 0 |
|||
and t1.is_submit = 1 |
|||
and t1.is_complaint = 1 |
|||
and t1.enterprise_name is not null |
|||
and t1.enterprise_number is not null |
|||
<if test="beginTime !=null"> |
|||
and t1.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 获取被执法企业 --> |
|||
<select id="getSubLawEntCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
count(distinct t1.enterprise_number) as bzfqy |
|||
from |
|||
enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_delete = 0 |
|||
and t1.is_submit = 1 |
|||
and t1.enterprise_name is not null |
|||
and t1.enterprise_number is not null |
|||
<if test="beginTime !=null"> |
|||
and t1.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 单条检查数量统计 --> |
|||
<select id="getSepDeptLawCount" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo" resultType="java.lang.Long"> |
|||
select |
|||
( |
|||
select |
|||
count(1) |
|||
from |
|||
enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_submit = 1 |
|||
and t1.enterprise_name is not null |
|||
and t1.enterprise_number is not null |
|||
<if test="beginTime !=null"> |
|||
and t1.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
)+( |
|||
select |
|||
count(1) as _count |
|||
from |
|||
( |
|||
select |
|||
1 |
|||
from |
|||
enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_submit = 1 |
|||
and t1.enterprise_name is not null |
|||
and t1.enterprise_number is not null |
|||
and t1.union_no is not null |
|||
and t1.union_no != '' |
|||
<if test="beginTime !=null"> |
|||
and t1.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
GROUP BY t1.union_no HAVING COUNT(1) < 2) as t |
|||
) |
|||
</select> |
|||
|
|||
|
|||
<!-- 联合检查数量统计 --> |
|||
<select id="getUnionLawCount" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo" resultType="java.lang.Long"> |
|||
SELECT |
|||
COUNT(1) AS _count |
|||
FROM ( |
|||
SELECT |
|||
1 |
|||
FROM enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.is_submit = 1 |
|||
and t1.enterprise_name is not null |
|||
and t1.enterprise_number is not null |
|||
and t1.union_no IS NOT NULL |
|||
and t1.union_no != '' |
|||
<if test="beginTime !=null"> |
|||
and t1.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
GROUP BY t1.union_no |
|||
HAVING COUNT(1) > 1 |
|||
) AS t |
|||
</select> |
|||
|
|||
<!-- 获取区域检查趋势分析(季度) --> |
|||
<select id="getQuarterlyRegionList" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
t3.code, |
|||
t3.name, |
|||
sum(case when QUARTER(t1.enforcement_time)= 1 then 1 else 0 end) as firstQuarter, |
|||
sum(case when QUARTER(t1.enforcement_time)= 2 then 1 else 0 end) as secondQuarter, |
|||
sum(case when QUARTER(t1.enforcement_time)= 3 then 1 else 0 end) as thirdQuarter, |
|||
sum(case when QUARTER(t1.enforcement_time)= 4 then 1 else 0 end) as fourthQuarter |
|||
from |
|||
enforcement_registration t1 |
|||
left join sys_dept t2 |
|||
on t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 |
|||
on t2.area_node = t3.code and t3.`level` = 3 |
|||
<where> |
|||
t3.code is not null |
|||
and t1.is_delete = 0 |
|||
and t1.is_submit = 1 |
|||
<if test="year !=null and year !=''"> |
|||
and year(t1.enforcement_time)= #{year} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where> |
|||
group by |
|||
t3.code, |
|||
t3.name |
|||
</select> |
|||
|
|||
<!-- 获取领域检查趋势分析(季度) --> |
|||
<select id="getDomainQuarterList" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
t3.domain_id as code, |
|||
t3.domain_name as name, |
|||
sum(case when QUARTER(t1.enforcement_time)= 1 then 1 else 0 end) as firstQuarter, |
|||
sum(case when QUARTER(t1.enforcement_time)= 2 then 1 else 0 end) as secondQuarter, |
|||
sum(case when QUARTER(t1.enforcement_time)= 3 then 1 else 0 end) as thirdQuarter, |
|||
sum(case when QUARTER(t1.enforcement_time)= 4 then 1 else 0 end) as fourthQuarter |
|||
from enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_domain_dept t3 on |
|||
t2.dept_id = t3.dept_id |
|||
<where> |
|||
t3.domain_id is not null |
|||
and t1.is_delete = 0 |
|||
and t1.is_submit = 1 |
|||
<if test="year !=null and year !=''"> |
|||
and year(t1.enforcement_time)= #{year} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.domain_id = #{code} |
|||
</if> |
|||
</where> |
|||
group by |
|||
t3.domain_id , |
|||
t3.domain_name |
|||
</select> |
|||
|
|||
<!-- 获取涉企登记执法类别 --> |
|||
<select id="getEnfRegistrationType" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
t1.dict_label as name, |
|||
count(t2.check_category) as number |
|||
from |
|||
sys_dict_data t1 |
|||
left join enforcement_registration t2 on |
|||
t2.law_enforce_category = t1.dict_value |
|||
left join sys_dept t3 on |
|||
t2.bureau_dept_id = t3.dept_id |
|||
left join dashboard_area_info t4 on |
|||
t3.area_node = t4.code |
|||
<where> |
|||
t1.dict_type = 'law_enforce_category' |
|||
and t2.is_submit = 1 |
|||
and t2.enterprise_name is not null |
|||
and t2.enterprise_number is not null |
|||
<if test="beginTime !=null"> |
|||
and t2.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t2.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t4.code = #{code} |
|||
</if> |
|||
</where> |
|||
group by |
|||
t1.dict_label, |
|||
t2.law_enforce_category |
|||
</select> |
|||
|
|||
<!-- 获取非行政执法类别 --> |
|||
<select id="getNonEnfRegistraion" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|||
select |
|||
t1.dict_label as name, |
|||
t1.num as number, |
|||
ROUND(t1.num / t1.zs,2) as proportion |
|||
from |
|||
( |
|||
select |
|||
t1.dict_label, |
|||
count(t2.law_enforcement_type) as num, |
|||
(select |
|||
count(1) as num |
|||
from |
|||
non_enforcement_registration t1 |
|||
left join sys_dept t2 on |
|||
t1.bureau_dept_id = t2.dept_id |
|||
left join dashboard_area_info t3 on |
|||
t2.area_node = t3.code |
|||
<where> |
|||
t1.enterprise_name is not null |
|||
and t1.enterprise_number is not null |
|||
<if test="beginTime !=null"> |
|||
and t1.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t1.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t3.code = #{code} |
|||
</if> |
|||
</where>) as zs |
|||
from |
|||
sys_dict_data t1 |
|||
left join non_enforcement_registration t2 on |
|||
t2.law_enforcement_type = t1.dict_value |
|||
left join sys_dept t3 on |
|||
t2.bureau_dept_id = t3.dept_id |
|||
left join dashboard_area_info t4 on |
|||
t3.area_node = t4.code |
|||
<where> |
|||
t1.dict_type = 'no_check_category' |
|||
and t2.enterprise_name is not null |
|||
and t2.enterprise_number is not null |
|||
<if test="beginTime !=null"> |
|||
and t2.enforcement_time >= #{beginTime} |
|||
</if> |
|||
<if test="endTime !=null"> |
|||
and t2.enforcement_time <= #{endTime} |
|||
</if> |
|||
<if test="code !=null and code!=''"> |
|||
and t4.code = #{code} |
|||
</if> |
|||
</where> |
|||
group by |
|||
t1.dict_label, t2.law_enforcement_type) t1 |
|||
</select> |
|||
</mapper> |
|||
Loading…
Reference in new issue