Browse Source

Merge branch 'dev-V1.10.0' of http://146.56.199.25:3000/zhuibobo/EnforcementCode-2.0 into dev-V1.10.0

dev-V1.10.0
parent
commit
4aa8c99940
  1. 5
      script/sql/zfjd-refactoring-v1/其他/njy/2026-1.10.0.sql
  2. 10
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/cim/CimDashboardOverviewController.java
  3. 2
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/move/MoveSupervisionController.java
  4. 4
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/CimDashboardOverviewVo.java
  5. 9
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/CimDashboardOverviewMapper.java
  6. 7
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/ICimDashboardOverviewService.java
  7. 19
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/CimDashboardOverviewServiceImpl.java
  8. 267
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/CimDashboardOverviewMapper.xml

5
script/sql/zfjd-refactoring-v1/其他/njy/2026-1.10.0.sql

@ -112,3 +112,8 @@ ALTER TABLE dashboard_trend_stat_domain ADD thirdTime varchar(100) NULL COMMENT
ALTER TABLE dashboard_trend_stat_domain CHANGE thirdTime thirdTime varchar(100) NULL COMMENT '三季度时间' AFTER thirdQuarter; ALTER TABLE dashboard_trend_stat_domain CHANGE thirdTime thirdTime varchar(100) NULL COMMENT '三季度时间' AFTER thirdQuarter;
ALTER TABLE dashboard_trend_stat_domain ADD fourthTime varchar(100) NULL COMMENT '四季度时间'; ALTER TABLE dashboard_trend_stat_domain ADD fourthTime varchar(100) NULL COMMENT '四季度时间';
ALTER TABLE dashboard_trend_stat_domain CHANGE fourthTime fourthTime varchar(100) NULL COMMENT '四季度时间' AFTER fourthQuarter; ALTER TABLE dashboard_trend_stat_domain CHANGE fourthTime fourthTime varchar(100) NULL COMMENT '四季度时间' AFTER fourthQuarter;
ALTER TABLE zfjd_ef20_1_2026_07_13.dashboard_area_info ADD area_code varchar(100) NULL COMMENT '行政区编码';
ALTER TABLE zfjd_ef20_1_2026_07_13.dashboard_area_info CHANGE area_code area_code varchar(100) NULL COMMENT '行政区编码' AFTER name;

10
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/cim/CimDashboardOverviewController.java

@ -15,6 +15,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
@ -58,6 +59,15 @@ public class CimDashboardOverviewController {
return R.ok(vo); return R.ok(vo);
} }
/**
* Cim大屏-大屏总览 查询各区执法人员数据,企业数量,执法单位数量
*/
@GetMapping("/getAreaCount")
public R<Map<String,Object>> getAreaCount(CimDashboardOverviewQueryBo bo){
return R.ok(cimDashboardOverviewService.getAreaCount(bo));
}
/** /**
* Cim大屏-大屏总览 查询 单独部门执法-联合执法-被执法企业-入企压减率-执法人员数-执法单位数 * Cim大屏-大屏总览 查询 单独部门执法-联合执法-被执法企业-入企压减率-执法人员数-执法单位数
* (实) * (实)

2
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/move/MoveSupervisionController.java

@ -1,6 +1,7 @@
package com.zdxt.enforcementcode.controller.web.supervision.move; package com.zdxt.enforcementcode.controller.web.supervision.move;
import cn.dev33.satoken.annotation.SaIgnore;
import com.zdxt.enforcementcode.domain.bo.DashboardTrendStatQueryBo; import com.zdxt.enforcementcode.domain.bo.DashboardTrendStatQueryBo;
import com.zdxt.enforcementcode.domain.vo.DashboardSituationAreaVo; import com.zdxt.enforcementcode.domain.vo.DashboardSituationAreaVo;
import com.zdxt.enforcementcode.domain.vo.DashboardSituationDomainVo; import com.zdxt.enforcementcode.domain.vo.DashboardSituationDomainVo;
@ -21,6 +22,7 @@ import java.util.Map;
/** /**
* 移动监督端 * 移动监督端
*/ */
@SaIgnore
@Validated @Validated
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController

4
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/CimDashboardOverviewVo.java

@ -118,6 +118,10 @@ public class CimDashboardOverviewVo {
*/ */
private String code; private String code;
/**
* 行政区编码
*/
private String areaCode;
/** /**
* 名称 * 名称
*/ */

9
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/CimDashboardOverviewMapper.java

@ -37,6 +37,15 @@ public interface CimDashboardOverviewMapper extends BaseMapperPlus<DashboardOver
*/ */
Long getNonEnfRegistrationCount(CimDashboardOverviewQueryBo bo); Long getNonEnfRegistrationCount(CimDashboardOverviewQueryBo bo);
/**
* 获取执法人员数
*/
List<CimDashboardOverviewVo> getLawPersonnelCount(CimDashboardOverviewQueryBo bo);
/**
* 获取执法人员数
*/
List<CimDashboardOverviewVo> getLawUnitCount(CimDashboardOverviewQueryBo bo);
/** /**
* 获取计划总数(月) * 获取计划总数(月)
* @param bo * @param bo

7
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/ICimDashboardOverviewService.java

@ -3,8 +3,10 @@ package com.zdxt.enforcementcode.service;
import com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo; import com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo;
import com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo; import com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo;
import com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo; import com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo;
import io.netty.util.internal.MacAddressUtil;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* cim大屏-大屏总览 * cim大屏-大屏总览
@ -32,6 +34,11 @@ public interface ICimDashboardOverviewService {
*/ */
Long getNonEnfRegistrationCount(CimDashboardOverviewQueryBo bo); Long getNonEnfRegistrationCount(CimDashboardOverviewQueryBo bo);
/**
* 获取执法人员数,企业数量,执法单位数量
*/
Map<String,Object> getAreaCount(CimDashboardOverviewQueryBo bo);
/** /**
* 获取计划总数(月) * 获取计划总数(月)
* @param bo * @param bo

19
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/CimDashboardOverviewServiceImpl.java

@ -11,7 +11,9 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* cim大屏总览实现 * cim大屏总览实现
@ -57,6 +59,23 @@ public class CimDashboardOverviewServiceImpl implements ICimDashboardOverviewSer
return cimDashboardOverviewMapper.getNonEnfRegistrationCount(bo); return cimDashboardOverviewMapper.getNonEnfRegistrationCount(bo);
} }
/**
* 获取执法人员数,企业数量,执法单位数量
*/
@Override
public Map<String,Object> getAreaCount(CimDashboardOverviewQueryBo bo){
Map<String,Object> map=new HashMap<>();
//执法人员数量
List<CimDashboardOverviewVo> list1=cimDashboardOverviewMapper.getLawPersonnelCount(bo);
map.put("areaPersonnel",list1);
//执法单位数量
List<CimDashboardOverviewVo> list2=cimDashboardOverviewMapper.getLawUnitCount(bo);
map.put("areaUnit",list2);
//企业数量
return map;
};
/** /**
* 查询计划总数(月) * 查询计划总数(月)
* @param bo * @param bo

267
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/CimDashboardOverviewMapper.xml

@ -15,7 +15,6 @@
left join dashboard_area_info t3 on left join dashboard_area_info t3 on
t2.area_node = t3.code t2.area_node = t3.code
<where> <where>
t1.is_delete = 0 t1.is_delete = 0
and t1.bureau_dept_name is not null and t1.bureau_dept_name is not null
and t1.is_submit = 1 and t1.is_submit = 1
@ -127,6 +126,39 @@
</where> </where>
</select> </select>
<select id="getLawPersonnelCount" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo">
select
t1.code,
t1.area_code as areaCode,
t1.name,
t1.zfrys
from view_area_legal_officer t1
<where>
<if test="code!=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
t1.code=#{code}
</if>
</where>
</select>
<select id="getLawUnitCount" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo">
select
t1.code ,
t1.name ,
count(t2.dept_id) as zfdws
from
dashboard_area_info t1
inner join sys_dept t2
on t1.code = t2.area_node and t1.`level` = '3' and t2.`zone` in(1, 3, 4, 15, 16)
<where>
<if test="code!=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
t1.code=#{code}
</if>
</where>
group by
t1.code,
t1.name
</select>
<!-- 获取计划总数 (月)--> <!-- 获取计划总数 (月)-->
<select id="getPlanCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> <select id="getPlanCount" resultType="java.lang.Long" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo">
select select
@ -281,69 +313,6 @@
<!-- 获取单独部门执法 (实)--> <!-- 获取单独部门执法 (实)-->
<select id="getSepDeptLawCount" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo" resultType="java.lang.Long"> <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.is_delete = 0
and t1.enterprise_name is not null
and t1.enterprise_number is not null
and t1.bureau_dept_name is not null
and t1.dept_id is not null
and t1.law_enforcer_id is not null
and t1.law_enforcer_id_other is not null
and t1.law_enforcement_type is not null
and t1.bureau_dept_id is not null
<if test="dayTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d')
</if>
<if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
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.is_delete = 0
and t1.enterprise_name is not null
and t1.enterprise_number is not null
and t1.bureau_dept_name is not null
and t1.dept_id is not null
and t1.law_enforcer_id is not null
and t1.law_enforcer_id_other is not null
and t1.law_enforcement_type is not null
and t1.bureau_dept_id is not null
and t1.union_no is not null
and t1.union_no != ''
<if test="dayTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d')
</if>
<if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
and t3.code = #{code}
</if>
</where>
GROUP BY t1.union_no HAVING COUNT(1) &lt; 2) as t
)-->
select select
count(1) count(1)
from from
@ -376,45 +345,6 @@
<!-- 联合检查数量统计 (实)--> <!-- 联合检查数量统计 (实)-->
<select id="getUnionLawCount" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo" resultType="java.lang.Long"> <select id="getUnionLawCount" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo" resultType="java.lang.Long">
<!--SELECT
COUNT(1) AS lhjcs
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.is_delete = 0
and t1.enterprise_name is not null
and t1.enterprise_number is not null
and t1.bureau_dept_name is not null
and t1.dept_id is not null
and t1.law_enforcer_id is not null
and t1.law_enforcer_id_other is not null
and t1.law_enforcement_type is not null
and t1.bureau_dept_id is not null
and t1.union_no IS NOT NULL
and t1.union_no != ''
<if test="dayTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d')
</if>
<if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
and t3.code = #{code}
</if>
<if test="monthTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if>
<if test="enterpriseNumber !=null and enterpriseNumber !=''">
and t1.enterprise_number = #{enterpriseNumber}
</if>
</where>
GROUP BY t1.union_no
HAVING COUNT(1) &gt; 1
) AS t-->
select select
COUNT(distinct union_no) as lhjcs COUNT(distinct union_no) as lhjcs
from from
@ -452,72 +382,6 @@
<!-- 获取区域检查趋势分析(季度) --> <!-- 获取区域检查趋势分析(季度) -->
<select id="getQuarterlyRegionList" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> <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="yearTime !=null ">
and DATE_FORMAT(t1.enforcement_time,'%Y')= DATE_FORMAT(#{yearTime},'%Y')
</if>
<if test="code !=null and code!=''">
and t3.code = #{code}
</if>
</where>
group by
t3.code,
t3.name
<if test="Sorting =='GP'">
<if test="quarter=='Q1'">
order by
firstQuarter desc
</if>
<if test="quarter=='Q2'">
order by
secondQuarter desc
</if>
<if test="quarter=='Q3'">
order by
thirdQuarter desc
</if>
<if test="quarter=='Q4'">
order by
fourthQuarter desc
</if>
</if>
<if test="Sorting =='DP'">
<if test="quarter=='Q1'">
order by
firstQuarter
</if>
<if test="quarter=='Q2'">
order by
fourthQuarter
</if>
<if test="quarter=='Q3'">
order by
thirdQuarter
</if>
<if test="quarter=='Q4'">
order by
fourthQuarter
</if>
</if>
<if test="scope =='topFive'">
limit 5
</if>-->
SELECT SELECT
t3.code, t3.code,
t3.name, t3.name,
@ -542,71 +406,6 @@
<!-- 获取领域检查趋势分析(季度) --> <!-- 获取领域检查趋势分析(季度) -->
<select id="getDomainQuarterList" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> <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="yearTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y')= DATE_FORMAT(#{yearTime},'%Y')
</if>
<if test="code !=null and code!=''">
and t3.domain_id = #{code}
</if>
</where>
group by
t3.domain_id ,
t3.domain_name
<if test="Sorting =='GP'">
<if test="quarter=='Q1'">
order by
firstQuarter desc
</if>
<if test="quarter=='Q2'">
order by
secondQuarter desc
</if>
<if test="quarter=='Q3'">
order by
thirdQuarter desc
</if>
<if test="quarter=='Q4'">
order by
fourthQuarter desc
</if>
</if>
<if test="Sorting =='DP'">
<if test="quarter=='Q1'">
order by
firstQuarter
</if>
<if test="quarter=='Q2'">
order by
secondQuarter
</if>
<if test="quarter=='Q3'">
order by
thirdQuarter
</if>
<if test="quarter=='Q4'">
order by
fourthQuarter
</if>
</if>
<if test="scope =='topFive'">
limit 5
</if>-->
SELECT SELECT
t3.domain_id as code, t3.domain_id as code,
t3.domain_name as name, t3.domain_name as name,

Loading…
Cancel
Save