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
4e2e53e4bd
  1. 4
      script/sql/zfjd-refactoring-v1/其他/njy/2026-1.10.0.sql
  2. 34
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/cim/CimDashboardOverviewDataSumController.java
  3. 14
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/cim/CimDashboardOverviewJobController.java
  4. 3
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/StatisticalPanelCityController.java
  5. 2
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/StatisticalPanelController.java
  6. 17
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/report/RegistrationController.java
  7. 18
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/report/StatisticsComplaintController.java
  8. 7
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/CimDashboardOverviewVo.java
  9. 15
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/mapper/CimDashboardOverviewMapper.java
  10. 31
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/ICimDashboardOverviewDataSumService.java
  11. 2
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IComplaintStatisticsService.java
  12. 171
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/CimDashboardOverviewDataSumSserviceImpl.java
  13. 7
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/ComplaintStatisticsServiceImpl.java
  14. 4
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/StatisticalPaneServiceCityImpl.java
  15. 144
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/CimDashboardOverviewMapper.xml
  16. 62
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/StatisticalPanelCityMapper.xml
  17. 10
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/StatisticalPanelMapper.xml

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

@ -115,5 +115,5 @@ ALTER TABLE dashboard_trend_stat_domain CHANGE fourthTime fourthTime varchar(100
ALTER TABLE zfjd_ef20_1_2026_07_13.dashboard_area_info ADD area_code varchar(100) NULL COMMENT '行政区编码'; ALTER TABLE 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; ALTER TABLE dashboard_area_info CHANGE area_code area_code varchar(100) NULL COMMENT '行政区编码' AFTER name;

34
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/cim/CimDashboardOverviewDataSumController.java

@ -49,6 +49,16 @@ public class CimDashboardOverviewDataSumController {
return R.ok(vo); return R.ok(vo);
} }
/**
* Cim-大屏总览 按区域查询 计划总数-预告总数-涉企执法总数-检查评价总数-检查投诉总数-平均检查频次
* @param bo
* @return
*/
@GetMapping("/getDashboardOverviewAreaMonthDataSum")
public R<CimDashboardOverviewVo> getDashboardOverviewAreaMonthDataSum(CimDashboardOverviewQueryBo bo){
CimDashboardOverviewVo vo= cimDashboardOverviewDataSumService.getDashboardOverviewAreaMonthDataSum(bo);
return R.ok(vo);
}
/** /**
* Cim-大屏总览-区域月数据汇总-企业数量-执法单位数-执法人员数 * Cim-大屏总览-区域月数据汇总-企业数量-执法单位数-执法人员数
@ -66,9 +76,9 @@ public class CimDashboardOverviewDataSumController {
* @return * @return
*/ */
@GetMapping("/getHighCheckAreaMonthDataSumMap") @GetMapping("/getHighCheckAreaMonthDataSumMap")
public R<Map<String,Object>> getHighCheckAreaMonthDataSumMap() { public R<Map<String,Object>> getHighCheckAreaMonthDataSumMap(CimDashboardOverviewQueryBo bo) {
// 查询数据 // 查询数据
return R.ok(cimDashboardOverviewDataSumService.getHighCheckAreaMonthDataSumMap()); return R.ok(cimDashboardOverviewDataSumService.getHighCheckAreaMonthDataSumMap(bo));
} }
@ -136,6 +146,16 @@ public class CimDashboardOverviewDataSumController {
return R.ok(cimDashboardOverviewDataSumService.getTrendAreaMonthDataSumMap()); return R.ok(cimDashboardOverviewDataSumService.getTrendAreaMonthDataSumMap());
} }
/**
* 下转联动某个区域查询对应区域街道的数据
* @param bo
* @return
*/
@GetMapping("/getAreaQuarterlyRegionList")
public R<List<CimDashboardOverviewVo>> getAreaQuarterlyRegionList(CimDashboardOverviewQueryBo bo) {
return R.ok(cimDashboardOverviewDataSumService.getAreaQuarterlyRegionList(bo));
}
/** /**
* Cim大屏-态势感知-领域月数据汇总-趋势行为分析 * Cim大屏-态势感知-领域月数据汇总-趋势行为分析
* @return * @return
@ -147,4 +167,14 @@ public class CimDashboardOverviewDataSumController {
return R.ok(cimDashboardOverviewDataSumService.getTrendFieldMonthDataSumMap()); return R.ok(cimDashboardOverviewDataSumService.getTrendFieldMonthDataSumMap());
} }
/**
* 下转联动某个区域查询对应区域领域的数据(季度)
* @param bo
* @return
*/
@GetMapping("/getAreaDomainQuarterList")
public R<List<CimDashboardOverviewVo>> getAreaDomainQuarterList(CimDashboardOverviewQueryBo bo) {
return R.ok(cimDashboardOverviewDataSumService.getAreaDomainQuarterList(bo));
}
} }

14
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/cim/CimDashboardOverviewJobController.java

@ -40,6 +40,20 @@ public class CimDashboardOverviewJobController {
cimDashboardOverviewDataSumService.getMonthDataSum(); cimDashboardOverviewDataSumService.getMonthDataSum();
return R.ok(); return R.ok();
} }
/**
* Cim-大屏总览
* 执法监管
*月度数据
* 按区域统计执法人员数-执法单位数-企业总数
* @param
* @return
*/
@GetMapping("/getAreaMonthDataSum")
public R<Void> getAreaMonthDataSum(){
//模拟测试定时任务插入新数据(月度)
cimDashboardOverviewDataSumService.getAreaMonthDataSum();
return R.ok();
}

3
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/StatisticalPanelCityController.java

@ -65,9 +65,10 @@ public class StatisticalPanelCityController {
/** 监督端-市数据 */ /** 监督端-市数据 */
@SaIgnore
@PostMapping("/collectStatistics") @PostMapping("/collectStatistics")
@ResponseBody @ResponseBody
public R<Map<String, Object>> analysisLawUnion(@RequestBody SixAnalysisParamsBo params){ public R<Map<String, Object>> analysisLawUnion( SixAnalysisParamsBo params){
// 全市行政检查数量 // 全市行政检查数量
Map<String, Object> resMap = statisticalPaneCityService.collectStatistics(params); Map<String, Object> resMap = statisticalPaneCityService.collectStatistics(params);
return R.ok("联合检查", resMap); return R.ok("联合检查", resMap);

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

@ -42,6 +42,7 @@ public class StatisticalPanelController {
* *
* @param params * @param params
* */ * */
@SaIgnore
@PostMapping("/analysisEnterprisesCoordination") @PostMapping("/analysisEnterprisesCoordination")
@ResponseBody @ResponseBody
public R<Map<String,Object>> analysisEnterprisesCoordination(@RequestBody(required = false) SixAnalysisParamsBo params){ public R<Map<String,Object>> analysisEnterprisesCoordination(@RequestBody(required = false) SixAnalysisParamsBo params){
@ -210,6 +211,7 @@ public class StatisticalPanelController {
} }
/** 监督端-行政时间维度 */ /** 监督端-行政时间维度 */
@SaIgnore
@PostMapping("/analysisTime") @PostMapping("/analysisTime")
@ResponseBody @ResponseBody
public R <Map<String,Object>> analysisEnterprisesInsTime(@RequestBody SixAnalysisParamsBo params){ public R <Map<String,Object>> analysisEnterprisesInsTime(@RequestBody SixAnalysisParamsBo params){

17
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/report/RegistrationController.java

@ -2,6 +2,7 @@ package com.zdxt.enforcementcode.controller.web.supervision.report;
import cn.dev33.satoken.annotation.SaIgnore; import cn.dev33.satoken.annotation.SaIgnore;
import com.zdxt.enforcementcode.domain.bo.EnforcementRegistrationBo; import com.zdxt.enforcementcode.domain.bo.EnforcementRegistrationBo;
import com.zdxt.enforcementcode.domain.vo.ComplaintStatisticsVo;
import com.zdxt.enforcementcode.domain.vo.EnforcementRegistrationVo; import com.zdxt.enforcementcode.domain.vo.EnforcementRegistrationVo;
import com.zdxt.enforcementcode.domain.vo.report.ChartDataVo; import com.zdxt.enforcementcode.domain.vo.report.ChartDataVo;
import com.zdxt.enforcementcode.domain.vo.report.RegistrationAnalysisVo; import com.zdxt.enforcementcode.domain.vo.report.RegistrationAnalysisVo;
@ -9,6 +10,7 @@ import com.zdxt.enforcementcode.domain.vo.report.RegistrationExportVo;
import com.zdxt.enforcementcode.domain.vo.report.RegistrationExportV2Vo; import com.zdxt.enforcementcode.domain.vo.report.RegistrationExportV2Vo;
import com.zdxt.enforcementcode.domain.vo.report.RegistrationStatisticsVo; import com.zdxt.enforcementcode.domain.vo.report.RegistrationStatisticsVo;
import com.zdxt.enforcementcode.report.IEnforcementRegistrationReportReport; import com.zdxt.enforcementcode.report.IEnforcementRegistrationReportReport;
import com.zdxt.enforcementcode.service.IComplaintStatisticsService;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -34,11 +36,11 @@ import java.util.List;
public class RegistrationController { public class RegistrationController {
private final IEnforcementRegistrationReportReport registrationReport; private final IEnforcementRegistrationReportReport registrationReport;
private final IComplaintStatisticsService complaintStatisticsService;
/** /**
* 接口1:涉企执法统计指标 * 接口1:涉企执法统计指标
*/ */
@SaIgnore
@GetMapping("/statistics") @GetMapping("/statistics")
public R<RegistrationStatisticsVo> statistics(EnforcementRegistrationBo bo) { public R<RegistrationStatisticsVo> statistics(EnforcementRegistrationBo bo) {
return R.ok(registrationReport.statistics(bo)); return R.ok(registrationReport.statistics(bo));
@ -55,7 +57,6 @@ public class RegistrationController {
/** /**
* 接口2-V2:涉企执法统计列表(SQL JOIN字典表排序 + 服务端分页,当前使用) * 接口2-V2:涉企执法统计列表(SQL JOIN字典表排序 + 服务端分页,当前使用)
*/ */
@SaIgnore
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<EnforcementRegistrationVo> list(EnforcementRegistrationBo bo, PageQuery pageQuery) { public TableDataInfo<EnforcementRegistrationVo> list(EnforcementRegistrationBo bo, PageQuery pageQuery) {
return registrationReport.listForV2(bo, pageQuery); return registrationReport.listForV2(bo, pageQuery);
@ -156,11 +157,21 @@ public class RegistrationController {
* @param bo * @param bo
* @return * @return
*/ */
@SaIgnore
@GetMapping("/unionList") @GetMapping("/unionList")
public R<List<EnforcementRegistrationVo>> unionList(EnforcementRegistrationBo bo) public R<List<EnforcementRegistrationVo>> unionList(EnforcementRegistrationBo bo)
{ {
List<EnforcementRegistrationVo> returnList = registrationReport.selectEnforcementRegistrationAndAddressList(bo); List<EnforcementRegistrationVo> returnList = registrationReport.selectEnforcementRegistrationAndAddressList(bo);
return R.ok(returnList); return R.ok(returnList);
} }
/**
* 监督端-查询是否投诉明细
* @param rid
* @return
*/
@GetMapping("/complaintByRid")
public R<ComplaintStatisticsVo> complaintByRid(String rid){
ComplaintStatisticsVo vo=complaintStatisticsService.selectById(rid);
return R.ok(vo);
}
} }

18
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/report/StatisticsComplaintController.java

@ -1,5 +1,6 @@
package com.zdxt.enforcementcode.controller.web.supervision.report; package com.zdxt.enforcementcode.controller.web.supervision.report;
import com.zdxt.enforcementcode.domain.ComplaintStatistics;
import com.zdxt.enforcementcode.domain.bo.ComplaintStatisticsBo; import com.zdxt.enforcementcode.domain.bo.ComplaintStatisticsBo;
import com.zdxt.enforcementcode.domain.vo.report.*; import com.zdxt.enforcementcode.domain.vo.report.*;
import com.zdxt.enforcementcode.report.IStatisticsComplaintReport; import com.zdxt.enforcementcode.report.IStatisticsComplaintReport;
@ -10,6 +11,7 @@ import org.dromara.common.core.domain.R;
import org.dromara.common.excel.utils.ExcelUtil; import org.dromara.common.excel.utils.ExcelUtil;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -47,6 +49,22 @@ public class StatisticsComplaintController {
return reportService.detailList(bo, pageQuery); return reportService.detailList(bo, pageQuery);
} }
/**
* 监督端-投诉明细
* @param id
* @param model
* @return
*/
/*@GetMapping("/details/{id}")
public String complaintsReportDetails(@PathVariable("id") String id, Model model) {
ComplaintStatistics complaintStatistics = complaintsReportService.complaintById(id);
model.addAttribute("complaintStatistics", complaintStatistics);
List<MssqOrderFlow> mssqOrderFlowList = iEnterpriseComplaintService.selectEnterpriseComplaintProcess(complaintStatistics.getCid());
model.addAttribute("mssqOrderFlowList", mssqOrderFlowList);
return prefix + "/details.html";
}*/
/** Tab2-投诉类型统计 */ /** Tab2-投诉类型统计 */
@GetMapping("/typeStatList") @GetMapping("/typeStatList")
public R<List<ComplaintReportTypeStatVo>> typeStatList(ComplaintStatisticsBo bo) { public R<List<ComplaintReportTypeStatVo>> typeStatList(ComplaintStatisticsBo bo) {

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

@ -93,6 +93,13 @@ public class CimDashboardOverviewVo {
*/ */
private Long lhzfs; private Long lhzfs;
private Long lhzfcs;
/**
* 检查次数
*/
private Long jccs;
/** /**
* 联合执法数同比(增长率,百分比,如 15.5 表示 +15.5%) * 联合执法数同比(增长率,百分比,如 15.5 表示 +15.5%)
*/ */

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

@ -43,7 +43,7 @@ public interface CimDashboardOverviewMapper extends BaseMapperPlus<DashboardOver
List<CimDashboardOverviewVo> getLawPersonnelCount(CimDashboardOverviewQueryBo bo); List<CimDashboardOverviewVo> getLawPersonnelCount(CimDashboardOverviewQueryBo bo);
/** /**
* 获取执法人员数 * 获取执法单位数
*/ */
List<CimDashboardOverviewVo> getLawUnitCount(CimDashboardOverviewQueryBo bo); List<CimDashboardOverviewVo> getLawUnitCount(CimDashboardOverviewQueryBo bo);
/** /**
@ -110,6 +110,13 @@ public interface CimDashboardOverviewMapper extends BaseMapperPlus<DashboardOver
*/ */
List<CimDashboardOverviewVo> getQuarterlyRegionList(CimDashboardOverviewQueryBo bo); List<CimDashboardOverviewVo> getQuarterlyRegionList(CimDashboardOverviewQueryBo bo);
/**
* 下转联动某个区域查询对应区域街道的数据
* @param bo
* @return
*/
List<CimDashboardOverviewVo> getAreaQuarterlyRegionList(CimDashboardOverviewQueryBo bo);
/** /**
* 获取领域检查趋势分析(季度) * 获取领域检查趋势分析(季度)
* @param bo * @param bo
@ -117,6 +124,12 @@ public interface CimDashboardOverviewMapper extends BaseMapperPlus<DashboardOver
*/ */
List<CimDashboardOverviewVo> getDomainQuarterList(CimDashboardOverviewQueryBo bo); List<CimDashboardOverviewVo> getDomainQuarterList(CimDashboardOverviewQueryBo bo);
/**
* 下转联动某个区域查询对应区域领域的数据(季度)
* @param bo
* @return
*/
List<CimDashboardOverviewVo> getAreaDomainQuarterList(CimDashboardOverviewQueryBo bo);
/** /**
* 获取涉企登记执法类别(实) * 获取涉企登记执法类别(实)

31
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/ICimDashboardOverviewDataSumService.java

@ -21,6 +21,13 @@ public interface ICimDashboardOverviewDataSumService {
*/ */
Boolean getMonthDataSum(); Boolean getMonthDataSum();
/**
* Cim大屏-按区域统计-企业数量-执法人员数-执法单位数
* 定时任务调用方法
* @param
* @return
*/
Boolean getAreaMonthDataSum();
/** /**
* Cim大屏-查询大屏总览汇总月度数据 * Cim大屏-查询大屏总览汇总月度数据
@ -28,6 +35,11 @@ public interface ICimDashboardOverviewDataSumService {
*/ */
List<CimDashboardOverviewVo> getDashboardOverviewMonthDataSum(); List<CimDashboardOverviewVo> getDashboardOverviewMonthDataSum();
/**
* Cim大屏-按区域条件查询月度数据
*/
CimDashboardOverviewVo getDashboardOverviewAreaMonthDataSum(CimDashboardOverviewQueryBo bo);
/** /**
* Cim大屏-大屏总览企业数量-执法单位数-执法人员数 * Cim大屏-大屏总览企业数量-执法单位数-执法人员数
@ -54,7 +66,7 @@ public interface ICimDashboardOverviewDataSumService {
* Cim大屏-查询高频检查预警-区域月度数据 * Cim大屏-查询高频检查预警-区域月度数据
* @return * @return
*/ */
Map<String,Object> getHighCheckAreaMonthDataSumMap(); Map<String,Object> getHighCheckAreaMonthDataSumMap(CimDashboardOverviewQueryBo bo);
/** /**
* Cim大屏-查询高频检查预警-领域月度数据 * Cim大屏-查询高频检查预警-领域月度数据
@ -132,6 +144,14 @@ public interface ICimDashboardOverviewDataSumService {
*/ */
Map<String,Object> getTrendAreaMonthDataSumMap(); Map<String,Object> getTrendAreaMonthDataSumMap();
/**
* 下转联动某个区域查询对应区域街道的数据
* @param bo
* @return
*/
List<CimDashboardOverviewVo> getAreaQuarterlyRegionList(CimDashboardOverviewQueryBo bo);
/** /**
* Cim大屏-查询态势感知-趋势行为分析-领域月度数据 * Cim大屏-查询态势感知-趋势行为分析-领域月度数据
* 定时任务调用方法 * 定时任务调用方法
@ -139,10 +159,17 @@ public interface ICimDashboardOverviewDataSumService {
*/ */
Boolean getTrendFieldMonthDataSum(); Boolean getTrendFieldMonthDataSum();
/** /**
* Cim大屏-查询态势感知-趋势行为分析-领域月度数据 * Cim大屏-查询态势感知-趋势行为分析-领域月度数据
* @return * @return
*/ */
Map<String,Object> getTrendFieldMonthDataSumMap(); Map<String,Object> getTrendFieldMonthDataSumMap();
/**
* 下转联动某个区域查询对应区域领域的数据(季度)
* @param bo
* @return
*/
List<CimDashboardOverviewVo> getAreaDomainQuarterList(CimDashboardOverviewQueryBo bo);
} }

2
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/IComplaintStatisticsService.java

@ -24,6 +24,8 @@ public interface IComplaintStatisticsService {
*/ */
ComplaintStatisticsVo queryById(Long id); ComplaintStatisticsVo queryById(Long id);
ComplaintStatisticsVo selectById(String rid);
/** /**
* 分页查询【请填写功能名称】列表 * 分页查询【请填写功能名称】列表
* *

171
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/CimDashboardOverviewDataSumSserviceImpl.java

@ -12,6 +12,7 @@ import com.zdxt.enforcementcode.mapper.*;
import com.zdxt.enforcementcode.service.ICimDashboardOverviewDataSumService; import com.zdxt.enforcementcode.service.ICimDashboardOverviewDataSumService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.utils.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -102,17 +103,95 @@ public class CimDashboardOverviewDataSumSserviceImpl implements ICimDashboardOve
/*vo.setQyzs(0L); /*vo.setQyzs(0L);
vo.setQyzshb(0L); vo.setQyzshb(0L);
vo.setQyzstb(0L);*/ vo.setQyzstb(0L);*/
/**
* 暂存需要确认数据来源 //执法人员数:未传区域编码时查询结果是各区明细,需要汇总求和
* 暂时未取数-执法人员数,执法单位数(月) long zfrysSum = 0L;
* List<CimDashboardOverviewVo> lawPersonnelList = cimDashboardOverviewMapper.getLawPersonnelCount(bo);
* 暂时未取数-区域-企业数量-执法单位数-执法人员数(月) if (lawPersonnelList != null) {
*/ for (CimDashboardOverviewVo item : lawPersonnelList) {
if (item.getZfrys() != null) {
zfrysSum += item.getZfrys();
}
}
}
vo.setZfrys(zfrysSum);
//执法单位数:未传区域编码时查询结果是各区明细,需要汇总求和
long zfdwsSum = 0L;
List<CimDashboardOverviewVo> lawUnitList = cimDashboardOverviewMapper.getLawUnitCount(bo);
if (lawUnitList != null) {
for (CimDashboardOverviewVo item : lawUnitList) {
if (item.getZfdws() != null) {
zfdwsSum += item.getZfdws();
}
}
}
vo.setZfdws(zfdwsSum);
//添加月度数据 //添加月度数据
Boolean flag = insertNewData(vo); Boolean flag = insertNewData(vo);
return flag; return flag;
} }
/**
* Cim大屏-按区域统计-企业数量-执法人员数-执法单位数
* 定时任务调用方法
* @return
*/
@Override
public Boolean getAreaMonthDataSum(){
//CimDashboardOverviewQueryBo bo= getDateTime();
List<CimDashboardOverviewVo> list=cimDashboardOverviewMapper.getLawPersonnelCount(null);
List<CimDashboardOverviewVo> list1=cimDashboardOverviewMapper.getLawUnitCount(null);
// 1. 高频检查区域:VO(code/name/number) → 实体(areaCode/areaName/gpjcqy)
List<DashboardOverviewPersonnel> areaPersonnelList = new ArrayList<>();
if (list != null) {
for (CimDashboardOverviewVo vo : list) {
DashboardOverviewPersonnel entity = new DashboardOverviewPersonnel();
entity.setCityCode("440300");
entity.setCityName("深圳市");
entity.setDistrictCode(vo.getCode());
entity.setDistrictName(vo.getName());
entity.setZfrys(vo.getZfrys());
entity.setLevel(2L);
entity.setYear(getDateTime().getYear());
entity.setMonth(getDateTime().getMonth());
entity.setIsDelete("0");
areaPersonnelList.add(entity);
}
}
// 2. 高频检查区域执法单位联合执法数:VO(bueauDeptId/bureauDeptName/number) → 实体(bureauDeptId/bureauDeptName/lhzfcs)
List<DashboardOverviewUnit> areaUnionList = new ArrayList<>();
if (list1 != null) {
for (CimDashboardOverviewVo vo : list1) {
DashboardOverviewUnit entity = new DashboardOverviewUnit();
entity.setCityCode("440300");
entity.setCityName("深圳市");
entity.setDistrictCode(vo.getCode());
entity.setDistrictName(vo.getName());
entity.setZfdws(vo.getZfdws());
entity.setLevel(2L);
entity.setYear(getDateTime().getYear());
entity.setMonth(getDateTime().getMonth());
entity.setIsDelete("0");
areaUnionList.add(entity);
}
}
//新增数据到数据汇总表
if (!areaPersonnelList.isEmpty()) {
dashboardOverviewPersonnelMapper.insertBatch(areaPersonnelList);
}
if (!areaUnionList.isEmpty()) {
dashboardOverviewUnitMapper.insertBatch(areaUnionList);
}
return true;
}
/** /**
* Cim-大屏总览 * Cim-大屏总览
* 获取月度数据 * 获取月度数据
@ -129,6 +208,36 @@ public class CimDashboardOverviewDataSumSserviceImpl implements ICimDashboardOve
return cimDashboardOverviewMapper.selectVoList(queryWrapper); return cimDashboardOverviewMapper.selectVoList(queryWrapper);
} }
/**
* Cim大屏-按区域条件查询月度数据
*/
@Override
public CimDashboardOverviewVo getDashboardOverviewAreaMonthDataSum(CimDashboardOverviewQueryBo bo) {
CimDashboardOverviewVo vo=new CimDashboardOverviewVo();
// 区域计划总数
bo.setMonthTime(getDateTime().getMonthTime());
Long jhzs=cimDashboardOverviewMapper.getPlanCount(bo);
vo.setJhzs(jhzs);
//区域预告总数
Long ygzs=cimDashboardOverviewMapper.getNoticeCount(bo);
vo.setYgzs(ygzs);
//涉企执法总数
Long sqzfzs=cimDashboardOverviewMapper.getEnfLawCount(bo);
vo.setSqzfzs(sqzfzs);
//稽查反馈总数
Long jcfkzs=cimDashboardOverviewMapper.getLawEvaluateCount(bo);
vo.setJcpjzs(jcfkzs);
//检查投诉总数
Long jctszs=cimDashboardOverviewMapper.getComplaintCount(bo);
vo.setJctszs(jctszs);
//平均检查频次
Long bzfqy=cimDashboardOverviewMapper.getSubLawEntCount(bo);
Long xzzf=cimDashboardOverviewMapper.getEnfRegistrationCount(bo);
if(bzfqy!=0) {
vo.setPjjcpc(xzzf / bzfqy);
}
return vo;
}
/** /**
* Cim大屏-大屏总览企业数量-执法单位数-执法人员数 * Cim大屏-大屏总览企业数量-执法单位数-执法人员数
@ -201,8 +310,10 @@ public class CimDashboardOverviewDataSumSserviceImpl implements ICimDashboardOve
add.setJctszs(vo.getJctszs()); add.setJctszs(vo.getJctszs());
add.setPjjcpc(vo.getPjjcpc()); add.setPjjcpc(vo.getPjjcpc());
add.setQyzs(vo.getQyzs()); add.setQyzs(vo.getQyzs());
add.setQyzshb(vo.getQyzshb()); /*add.setQyzshb(vo.getQyzshb());
add.setQyzstb(vo.getQyzstb()); add.setQyzstb(vo.getQyzstb());*/
add.setZfrys(vo.getZfrys());
add.setZfdws(vo.getZfdws());
// 年份、月份 // 年份、月份
add.setYear(cal.get(Calendar.YEAR)); add.setYear(cal.get(Calendar.YEAR));
add.setMonth(cal.get(Calendar.MONTH) + 1); add.setMonth(cal.get(Calendar.MONTH) + 1);
@ -258,7 +369,7 @@ public class CimDashboardOverviewDataSumSserviceImpl implements ICimDashboardOve
entity.setCityName("深圳市"); entity.setCityName("深圳市");
entity.setBureauDeptId(vo.getBueauDeptId()); entity.setBureauDeptId(vo.getBueauDeptId());
entity.setBureauDeptName(vo.getBureauDeptName()); entity.setBureauDeptName(vo.getBureauDeptName());
entity.setLhzfcs(vo.getNumber()); entity.setLhzfcs(vo.getLhzfcs());
entity.setLevel(2L); entity.setLevel(2L);
entity.setYear(getDateTime().getYear()); entity.setYear(getDateTime().getYear());
entity.setMonth(getDateTime().getMonth()); entity.setMonth(getDateTime().getMonth());
@ -276,7 +387,7 @@ public class CimDashboardOverviewDataSumSserviceImpl implements ICimDashboardOve
entity.setCityName("深圳市"); entity.setCityName("深圳市");
entity.setBureauDeptId(vo.getBueauDeptId()); entity.setBureauDeptId(vo.getBueauDeptId());
entity.setBureauDeptName(vo.getBureauDeptName()); entity.setBureauDeptName(vo.getBureauDeptName());
entity.setJccs(vo.getNumber()); entity.setJccs(vo.getJccs());
entity.setLevel(2L); entity.setLevel(2L);
entity.setYear(getDateTime().getYear()); entity.setYear(getDateTime().getYear());
entity.setMonth(getDateTime().getMonth()); entity.setMonth(getDateTime().getMonth());
@ -323,34 +434,39 @@ public class CimDashboardOverviewDataSumSserviceImpl implements ICimDashboardOve
* @return * @return
*/ */
@Override @Override
public Map<String, Object> getHighCheckAreaMonthDataSumMap() { public Map<String, Object> getHighCheckAreaMonthDataSumMap(CimDashboardOverviewQueryBo bo) {
LambdaQueryWrapper<DashboardHighCheckArea> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DashboardHighCheckArea> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(DashboardHighCheckArea::getLevel, 2); queryWrapper.eq(DashboardHighCheckArea::getLevel, 2);
queryWrapper.eq(DashboardHighCheckArea::getIsDelete, "0"); queryWrapper.eq(DashboardHighCheckArea::getIsDelete, "0");
queryWrapper.eq(DashboardHighCheckArea::getYear, getDateTime().getYear()); queryWrapper.eq(DashboardHighCheckArea::getYear, getDateTime().getYear());
queryWrapper.eq(DashboardHighCheckArea::getMonth, getDateTime().getMonth()); queryWrapper.eq(DashboardHighCheckArea::getMonth, getDateTime().getMonth());
queryWrapper.eq(StringUtils.isNotBlank(bo.getCode()),DashboardHighCheckArea::getAreaCode,bo.getCode());
List<DashboardHighCheckArea> areaList = dashboardHighCheckAreaMapper.selectList(queryWrapper); List<DashboardHighCheckArea> areaList = dashboardHighCheckAreaMapper.selectList(queryWrapper);
LambdaQueryWrapper<DashboardHighCheckUnionArea> queryWrapper1 = new LambdaQueryWrapper<>(); /*LambdaQueryWrapper<DashboardHighCheckUnionArea> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(DashboardHighCheckUnionArea::getLevel, 2); queryWrapper1.eq(DashboardHighCheckUnionArea::getLevel, 2);
queryWrapper1.eq(DashboardHighCheckUnionArea::getIsDelete, "0"); queryWrapper1.eq(DashboardHighCheckUnionArea::getIsDelete, "0");
queryWrapper1.eq(DashboardHighCheckUnionArea::getYear, getDateTime().getYear()); queryWrapper1.eq(DashboardHighCheckUnionArea::getYear, getDateTime().getYear());
queryWrapper1.eq(DashboardHighCheckUnionArea::getMonth, getDateTime().getMonth()); queryWrapper1.eq(DashboardHighCheckUnionArea::getMonth, getDateTime().getMonth());
List<DashboardHighCheckUnionArea> unionList = dashboardhighcheckunionMapper.selectList(queryWrapper1); List<DashboardHighCheckUnionArea> unionList = dashboardhighcheckunionMapper.selectList(queryWrapper1);*/
bo.setMonthTime(getDateTime().getMonthTime());
List<CimDashboardOverviewVo> unionList= cimDashboardOverviewMapper.getHighCheckAreaUnionNoRanking(bo);
LambdaQueryWrapper<DashboardHighCheckFrequencyArea> queryWrapper2 = new LambdaQueryWrapper<>(); /*LambdaQueryWrapper<DashboardHighCheckFrequencyArea> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.eq(DashboardHighCheckFrequencyArea::getLevel, 2); queryWrapper2.eq(DashboardHighCheckFrequencyArea::getLevel, 2);
queryWrapper2.eq(DashboardHighCheckFrequencyArea::getIsDelete, "0"); queryWrapper2.eq(DashboardHighCheckFrequencyArea::getIsDelete, "0");
queryWrapper2.eq(DashboardHighCheckFrequencyArea::getYear, getDateTime().getYear()); queryWrapper2.eq(DashboardHighCheckFrequencyArea::getYear, getDateTime().getYear());
queryWrapper2.eq(DashboardHighCheckFrequencyArea::getMonth, getDateTime().getMonth()); queryWrapper2.eq(DashboardHighCheckFrequencyArea::getMonth, getDateTime().getMonth());
List<DashboardHighCheckFrequencyArea> freqList = dashboardHighCheckFrequencyAreaMapper.selectList(queryWrapper2); List<DashboardHighCheckFrequencyArea> freqList = dashboardHighCheckFrequencyAreaMapper.selectList(queryWrapper2);*/
List<CimDashboardOverviewVo> freqList=cimDashboardOverviewMapper.getHighCheckAreaenfRegistraionRanking(bo);
LambdaQueryWrapper<DashboardHighCheckEnterprise> queryWrapper3 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DashboardHighCheckEnterprise> queryWrapper3 = new LambdaQueryWrapper<>();
queryWrapper3.eq(DashboardHighCheckEnterprise::getLevel, 2); queryWrapper3.eq(DashboardHighCheckEnterprise::getLevel, 2);
queryWrapper3.eq(DashboardHighCheckEnterprise::getIsDelete, "0"); queryWrapper3.eq(DashboardHighCheckEnterprise::getIsDelete, "0");
queryWrapper3.eq(DashboardHighCheckEnterprise::getYear, getDateTime().getYear()); queryWrapper3.eq(DashboardHighCheckEnterprise::getYear, getDateTime().getYear());
queryWrapper3.eq(DashboardHighCheckEnterprise::getMonth, getDateTime().getMonth()); queryWrapper3.eq(DashboardHighCheckEnterprise::getMonth, getDateTime().getMonth());
queryWrapper.eq(StringUtils.isNotBlank(bo.getCode()),DashboardHighCheckArea::getAreaCode,bo.getCode());
List<DashboardHighCheckEnterprise> enterpriseList = dashboardHighCheckEnterpriseMapper.selectList(queryWrapper3); List<DashboardHighCheckEnterprise> enterpriseList = dashboardHighCheckEnterpriseMapper.selectList(queryWrapper3);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("areaList", areaList); map.put("areaList", areaList);
@ -1126,6 +1242,19 @@ public class CimDashboardOverviewDataSumSserviceImpl implements ICimDashboardOve
return map; return map;
} }
/**
* 下转联动某个区域查询对应区域街道的数据
* @param bo
* @return
*/
@Override
public List<CimDashboardOverviewVo> getAreaQuarterlyRegionList(CimDashboardOverviewQueryBo bo) {
List<CimDashboardOverviewVo> list= cimDashboardOverviewMapper.getAreaQuarterlyRegionList(bo);
return list;
}
/** /**
* 构建区域趋势统计数据副本(用于高频/低频区域结果) * 构建区域趋势统计数据副本(用于高频/低频区域结果)
* 单独构建新对象,避免同一区域在多个季度上榜时 jccs 值被覆盖 * 单独构建新对象,避免同一区域在多个季度上榜时 jccs 值被覆盖
@ -1262,6 +1391,18 @@ public class CimDashboardOverviewDataSumSserviceImpl implements ICimDashboardOve
} }
/**
* 下转联动某个区域查询对应区域领域的数据(季度)
* @param bo
* @return
*/
@Override
public List<CimDashboardOverviewVo> getAreaDomainQuarterList(CimDashboardOverviewQueryBo bo) {
List<CimDashboardOverviewVo> list=cimDashboardOverviewMapper.getAreaDomainQuarterList(bo);
return list;
}
/** /**
* 构建领域结果 * 构建领域结果
* *

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

@ -44,6 +44,13 @@ public class ComplaintStatisticsServiceImpl implements IComplaintStatisticsServi
return baseMapper.selectVoById(id); return baseMapper.selectVoById(id);
} }
@Override
public ComplaintStatisticsVo selectById(String rid){
LambdaQueryWrapper<ComplaintStatistics> lqw =new LambdaQueryWrapper<>();
lqw.eq(ComplaintStatistics::getRid,rid);
return baseMapper.selectVoOne(lqw);
}
/** /**
* 分页查询【请填写功能名称】列表 * 分页查询【请填写功能名称】列表
* *

4
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/StatisticalPaneServiceCityImpl.java

@ -2,9 +2,6 @@ package com.zdxt.enforcementcode.service.impl;
import com.zdxt.enforcementcode.common.annotation.DataScope; import com.zdxt.enforcementcode.common.annotation.DataScope;
import com.zdxt.enforcementcode.domain.EnforcementRegistration;
import com.zdxt.enforcementcode.domain.EnterpriseComplaint;
import com.zdxt.enforcementcode.domain.EnterpriseEvaluate;
import com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo; import com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo;
import com.zdxt.enforcementcode.domain.vo.EnforcementRegistrationVo; import com.zdxt.enforcementcode.domain.vo.EnforcementRegistrationVo;
import com.zdxt.enforcementcode.domain.vo.EnterpriseComplaintVo; import com.zdxt.enforcementcode.domain.vo.EnterpriseComplaintVo;
@ -12,7 +9,6 @@ import com.zdxt.enforcementcode.domain.vo.EnterpriseEvaluateVo;
import com.zdxt.enforcementcode.mapper.StatisticalPanelCityMapper; import com.zdxt.enforcementcode.mapper.StatisticalPanelCityMapper;
import com.zdxt.enforcementcode.service.IStatisticalPaneCityService; import com.zdxt.enforcementcode.service.IStatisticalPaneCityService;
import org.dromara.common.core.utils.StringUtils; import org.dromara.common.core.utils.StringUtils;
import org.dromara.system.domain.SysDictData;
import org.dromara.system.domain.bo.SysDictDataBo; import org.dromara.system.domain.bo.SysDictDataBo;
import org.dromara.system.domain.vo.SysDictDataVo; import org.dromara.system.domain.vo.SysDictDataVo;
import org.dromara.system.service.ISysDeptService; import org.dromara.system.service.ISysDeptService;

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

@ -30,7 +30,7 @@
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d')
</if> </if>
<if test="monthTime !=null"> <if test="monthTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') &gt;= DATE_FORMAT(#{monthTime},'%Y-%m') and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
<if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'"> <if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
@ -115,7 +115,7 @@
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d')
</if> </if>
<if test="monthTime !=null"> <if test="monthTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{monthTime},'%Y-%m-%d') and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
<if test="enterpriseNumber !=null and enterpriseNumber !=''"> <if test="enterpriseNumber !=null and enterpriseNumber !=''">
and t1.enterprise_number = #{enterpriseNumber} and t1.enterprise_number = #{enterpriseNumber}
@ -126,6 +126,7 @@
</where> </where>
</select> </select>
<!-- 获取执法人员数 -->
<select id="getLawPersonnelCount" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> <select id="getLawPersonnelCount" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo">
select select
t1.code, t1.code,
@ -134,12 +135,16 @@
t1.zfrys t1.zfrys
from view_area_legal_officer t1 from view_area_legal_officer t1
<where> <where>
<if test="monthTime !=null">
and DATE_FORMAT(t1.CD_TIME,'%Y-%m')= DATE_FORMAT(#{monthTime},'%Y-%m')
</if>
<if test="code!=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'"> <if test="code!=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
t1.code=#{code} and t1.code=#{code}
</if> </if>
</where> </where>
</select> </select>
<!-- 获取执法单位数据 -->
<select id="getLawUnitCount" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> <select id="getLawUnitCount" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo">
select select
t1.code , t1.code ,
@ -148,10 +153,13 @@
from from
dashboard_area_info t1 dashboard_area_info t1
inner join sys_dept t2 inner join sys_dept t2
on t1.code = t2.area_node and t1.`level` = '3' and t2.`zone` in(1, 3, 4, 15, 16) on t1.code = t2.area_node and t1.`level` = '3' and t2.`zone` in(1,3,4,5,6,15,16)
<where> <where>
<if test="code!=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'"> <if test="code!=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
t1.code=#{code} and t1.code=#{code}
</if>
<if test="monthTime !=null">
and DATE_FORMAT(t2.create_time,'%Y-%m')= DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
</where> </where>
group by group by
@ -174,7 +182,7 @@
<if test="monthTime !=null"> <if test="monthTime !=null">
and DATE_FORMAT(t1.plan_date,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m') and DATE_FORMAT(t1.plan_date,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
<if test="code !=null and code!=''"> <if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
and t3.code = #{code} and t3.code = #{code}
</if> </if>
</where> </where>
@ -196,7 +204,7 @@
<if test="monthTime !=null"> <if test="monthTime !=null">
and DATE_FORMAT(t1.publish_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m') and DATE_FORMAT(t1.publish_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
<if test="code !=null and code!=''"> <if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
and t3.code = #{code} and t3.code = #{code}
</if> </if>
</where> </where>
@ -220,7 +228,7 @@
<if test="monthTime !=null"> <if test="monthTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m') and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
<if test="code !=null and code!=''"> <if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
and t3.code = #{code} and t3.code = #{code}
</if> </if>
</where> </where>
@ -245,7 +253,7 @@
<if test="monthTime !=null"> <if test="monthTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m') and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
<if test="code !=null and code!=''"> <if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
and t3.code = #{code} and t3.code = #{code}
</if> </if>
</where> </where>
@ -271,7 +279,7 @@
<if test="monthTime !=null"> <if test="monthTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m') and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
<if test="code !=null and code!=''"> <if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
and t3.code = #{code} and t3.code = #{code}
</if> </if>
</where> </where>
@ -404,6 +412,53 @@
GROUP BY t3.code, t3.name GROUP BY t3.code, t3.name
</select> </select>
<!-- 下转联动某个区域查询对应区域街道的数据 -->
<select id="getAreaQuarterlyRegionList" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo">
SELECT
t3.code,
t3.name,
CONCAT(FLOOR((year(NOW())* 4 + QUARTER(NOW()) - 5) / 4), 'Q', (year(NOW())* 4 + QUARTER(NOW()) - 5) % 4 + 1) as firstTime,
coalesce(q.first_quarter, 0) as firstQuarter,
CONCAT(FLOOR((year(NOW())* 4 + QUARTER(NOW()) - 4) / 4), 'Q', (year(NOW())* 4 + QUARTER(NOW()) - 4) % 4 + 1) as secondTime,
coalesce(q.second_quarter, 0) as secondQuarter,
CONCAT(FLOOR((year(NOW())* 4 + QUARTER(NOW()) - 3) / 4), 'Q', (year(NOW())* 4 + QUARTER(NOW()) - 3) % 4 + 1) as thirdTime,
coalesce(q.third_quarter, 0) as thirdQuarter,
CONCAT(FLOOR((year(NOW())* 4 + QUARTER(NOW()) - 2) / 4), 'Q', (year(NOW())* 4 + QUARTER(NOW()) - 2) % 4 + 1) as fourthTime,
coalesce(q.fourth_quarter, 0) as fourthQuarter,
coalesce(q.total_cnt, 0) as total_cnt
FROM dashboard_area_info t3
LEFT JOIN (
SELECT
a.code,
SUM(case when year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) = year(NOW())* 4 + QUARTER(NOW()) - 4 then 1 else 0 end) as first_quarter,
SUM(case when year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) = year(NOW())* 4 + QUARTER(NOW()) - 3 then 1 else 0 end) as second_quarter,
SUM(case when year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) = year(NOW())* 4 + QUARTER(NOW()) - 2 then 1 else 0 end) as third_quarter,
SUM(case when year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) = year(NOW())* 4 + QUARTER(NOW()) - 1 then 1 else 0 end) as fourth_quarter,
COUNT(1) as total_cnt
FROM enforcement_registration t1
INNER JOIN dashboard_area_info a
ON t1.enterprise_address LIKE CONCAT('%', a.name, '%')
WHERE a.level = 4
AND a.is_delete = '0'
<if test="code!=null and code !='' and code!='20220210190102183-D7DD-E31F5E9C1'">
AND a.parent_code = #{code}
</if>
AND t1.is_delete = 0
AND t1.is_submit = 1
AND t1.enterprise_name IS NOT NULL
AND t1.enterprise_number IS NOT NULL
and year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) between year(NOW())* 4 + QUARTER(NOW()) - 4 and year(NOW())* 4 + QUARTER(NOW()) - 1
GROUP BY a.code
) q ON t3.code = q.code
WHERE t3.level = 4
AND t3.is_delete = '0'
<if test="code!=null and code !='' and code!='20220210190102183-D7DD-E31F5E9C1'">
AND t3.parent_code = #{code}
</if>
ORDER BY t3.code
</select>
<!-- 获取领域检查趋势分析(季度) --> <!-- 获取领域检查趋势分析(季度) -->
<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 SELECT
@ -432,6 +487,59 @@
t3.domain_name t3.domain_name
</select> </select>
<!-- 下转联动某个区域查询对应区域领域的数据(季度) -->
<select id="getAreaDomainQuarterList" 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,
CONCAT(FLOOR((year(NOW())* 4 + QUARTER(NOW())-4-1)/ 4), 'Q', (year(NOW())* 4 + QUARTER(NOW())-4-1)%4 + 1) as firstTime,
coalesce(q.first_quarter, 0) as firstQuarter,
CONCAT(FLOOR((year(NOW())* 4 + QUARTER(NOW())-3-1)/ 4), 'Q', (year(NOW())* 4 + QUARTER(NOW())-3-1)%4 + 1) as secondTime,
coalesce(q.second_quarter, 0) as secondQuarter,
CONCAT(FLOOR((year(NOW())* 4 + QUARTER(NOW())-2-1)/ 4), 'Q', (year(NOW())* 4 + QUARTER(NOW())-2-1)%4 + 1) as thirdTime,
coalesce(q.third_quarter, 0) as thirdQuarter,
CONCAT(FLOOR((year(NOW())* 4 + QUARTER(NOW())-1-1)/ 4), 'Q', (year(NOW())* 4 + QUARTER(NOW())-1-1)%4 + 1) as fourthTime,
coalesce(q.fourth_quarter, 0) as fourthQuarter,
coalesce(q.total_cnt, 0) as total_cnt
FROM (
<!-- 该区下有部门的领域(去重)-->
SELECT DISTINCT
d.domain_id,
d.domain_name
FROM dashboard_domain_dept d
INNER JOIN sys_dept sd ON d.dept_id = sd.dept_id
<where>
<if test="code!=null and code !='' and code!='20220210190102183-D7DD-E31F5E9C1'">
AND sd.area_node = #{code}
</if>
</where>
) t3
LEFT JOIN (
SELECT
d.domain_id,
SUM(case when year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) = year(NOW())* 4 + QUARTER(NOW())-4 then 1 else 0 end) as first_quarter,
SUM(case when year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) = year(NOW())* 4 + QUARTER(NOW())-3 then 1 else 0 end) as second_quarter,
SUM(case when year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) = year(NOW())* 4 + QUARTER(NOW())-2 then 1 else 0 end) as third_quarter,
SUM(case when year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) = year(NOW())* 4 + QUARTER(NOW())-1 then 1 else 0 end) as fourth_quarter,
COUNT(1) as total_cnt
FROM enforcement_registration t1
INNER JOIN sys_dept t2 ON t1.bureau_dept_id = t2.dept_id
INNER JOIN dashboard_domain_dept d ON t2.dept_id = d.dept_id
<where>
<if test="code!=null and code !='' and code!='20220210190102183-D7DD-E31F5E9C1'">
t2.area_node = #{code}
</if>
AND d.domain_id IS NOT NULL
AND t1.is_delete = 0
AND t1.is_submit = 1
and year(t1.enforcement_time)* 4 + QUARTER(t1.enforcement_time) between year(NOW())* 4 + QUARTER(NOW())-4 and year(NOW())* 4 + QUARTER(NOW())-1
</where>
GROUP BY d.domain_id
) q ON t3.domain_id = q.domain_id
ORDER BY t3.domain_id;
</select>
<!-- 获取涉企登记执法类别 (实)--> <!-- 获取涉企登记执法类别 (实)-->
<select id="getEnfRegistrationType" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> <select id="getEnfRegistrationType" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo">
select select
@ -575,6 +683,9 @@
<if test="monthTime !=null"> <if test="monthTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m') and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
<if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
and t3.code = #{code}
</if>
and t3.level !=1 and t3.level !=1
</where> </where>
group by group by
@ -586,14 +697,14 @@
select select
t1.bureau_dept_id as bueauDeptId, t1.bureau_dept_id as bueauDeptId,
t1.bureau_dept_name as bureauDeptName, t1.bureau_dept_name as bureauDeptName,
count(t4.sl) as number count(t4.sl) as lhzfcs
from from
enforcement_registration t1 enforcement_registration t1
left join sys_dept t2 on inner join sys_dept t2 on
t1.bureau_dept_id = t2.dept_id t1.bureau_dept_id = t2.dept_id
left join dashboard_area_info t3 on inner join dashboard_area_info t3 on
t2.area_node = t3.code t2.area_node = t3.code
left join ( inner join (
select select
t1.enterprise_number , t1.enterprise_number ,
t1.enterprise_name , t1.enterprise_name ,
@ -630,6 +741,9 @@
<if test="monthTime !=null"> <if test="monthTime !=null">
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m') and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m')
</if> </if>
<if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'">
and t3.code = #{code}
</if>
</where> </where>
group by group by
t1.bureau_dept_id, t1.bureau_dept_id,
@ -642,7 +756,7 @@
select select
t1.bureau_dept_id as bueauDeptId, t1.bureau_dept_id as bueauDeptId,
t1.bureau_dept_name as bureauDeptName, t1.bureau_dept_name as bureauDeptName,
count(t4.sl) as number count(t4.sl) as jccs
from from
enforcement_registration t1 enforcement_registration t1
left join sys_dept t2 on left join sys_dept t2 on

62
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/StatisticalPanelCityMapper.xml

@ -162,15 +162,71 @@
<!-- 所有重点领域类 --> <!-- 所有重点领域类 -->
<select id="query_law_field_count" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> <select id="query_law_field_count" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map">
SELECT r.law_field, CAST(COUNT(1) AS CHAR) AS cnt FROM enforcement_registration r WHERE enforcement_time IS NOT null and r.bureau_dept_name is not null and r.is_submit = 1 and r.law_enforcement_id is not null and r.enterprise_name is not null and r.enterprise_number is not null and r.law_enforcer is not null and r.law_enforcer_two is not null and r.is_complaint is not null and r.check_category is not null and r.bureau_dept_id is not null and law_field is not null <!--SELECT r.law_field, CAST(COUNT(1) AS CHAR) AS cnt FROM enforcement_registration r
WHERE enforcement_time IS NOT null
and r.bureau_dept_name is not null
and r.is_submit = 1
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
and r.law_enforcer is not null
and r.law_enforcer_two is not null
and r.is_complaint is not null
and r.check_category is not null
and r.bureau_dept_id is not null
and law_field is not null-->
select
r.bureau_dept_id,
case r.bureau_dept_id
when '20210922213242905-1183-F9897C287' then '01'
when '20210922213242781-25B8-DF4A0AB32' then '02'
when '20210922213015633-2458-5A5E07C0C' then '03'
when '20210922213015704-F9CB-3AFDBC097' then '04'
when '20210922213015633-2459-6D7CB4903' then '05'
when '20210922212956790-EDA0-123260206' then '06'
when '20210922213220191-2F55-3493B378E' then '07'
when '20221024170151446-F82B-F4F56D018' then '08'
when '20210922213219489-1142-3C752622D' then '09'
else ''
end as law_field,
CAST(count(1) AS CHAR) AS cnt
from
enforcement_registration r
<where>
and r.is_submit = 1
and r.is_delete =0
and enforcement_time IS NOT null
and r.bureau_dept_name is not null
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
and r.law_enforcer is not null
and r.law_enforcer_two is not null
and r.is_complaint is not null
and r.check_category is not null
and r.bureau_dept_id is not null
and r.bureau_dept_id in (
'20210922213242905-1183-F9897C287',
'20210922213242781-25B8-DF4A0AB32',
'20210922213015633-2458-5A5E07C0C',
'20210922213015704-F9CB-3AFDBC097',
'20210922213015633-2459-6D7CB4903',
'20210922212956790-EDA0-123260206',
'20210922213220191-2F55-3493B378E',
'20221024170151446-F82B-F4F56D018',
'20210922213219489-1142-3C752622D'
)
<if test="beginTime != null and beginTime != ''"> and r.enforcement_time &gt;= #{beginTime} </if> <if test="beginTime != null and beginTime != ''"> and r.enforcement_time &gt;= #{beginTime} </if>
<if test="endTime != null and endTime != ''"> and r.enforcement_time &lt; #{endTime} </if> <if test="endTime != null and endTime != ''"> and r.enforcement_time &lt;= #{endTime} </if>
<if test="zone == 1">and r.zone = 1</if> <if test="zone == 1">and r.zone = 1</if>
<if test="filterDepts != null and filterDepts.size() > 0"> <if test="filterDepts != null and filterDepts.size() > 0">
and r.bureau_dept_id in <foreach collection="filterDepts" item="bureau_dept_id" open="(" separator="," close=")"> #{bureau_dept_id} </foreach> and r.bureau_dept_id in <foreach collection="filterDepts" item="bureau_dept_id" open="(" separator="," close=")"> #{bureau_dept_id} </foreach>
</if> </if>
<if test="params.dataScope != null and params.dataScope != ''"> ${params.dataScope} </if> <if test="params.dataScope != null and params.dataScope != ''"> ${params.dataScope} </if>
GROUP BY r.law_field ORDER BY cnt DESC; </where>
group by r.bureau_dept_id,law_field
ORDER BY cnt DESC
</select> </select>
<!-- 行政执法投诉类别 --> <!-- 行政执法投诉类别 -->

10
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/StatisticalPanelMapper.xml

@ -1639,6 +1639,7 @@
and r.is_complaint is not null and r.is_complaint is not null
and r.check_category is not null and r.check_category is not null
and r.bureau_dept_id is not null and r.bureau_dept_id is not null
and enforcement_time &lt; DATE_FORMAT(NOW(), '%Y-%m-01')
<!-- <if test="params.zone != null and params.zone != ''"> and r.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>--> <!-- <if test="params.zone != null and params.zone != ''"> and r.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>-->
<if test="deptId != null and deptId != ''"> <if test="deptId != null and deptId != ''">
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId})
@ -1646,8 +1647,8 @@
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if> <if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if> <if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<!-- <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%'))</if>--> <!-- <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%'))</if>-->
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if> <if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') &gt;= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if>
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if> <if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') &lt;= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if>
<if test="params.dataScope != null and params.dataScope != ''"> <if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
@ -1697,6 +1698,7 @@
and r.is_complaint is not null and r.is_complaint is not null
and r.check_category is not null and r.check_category is not null
and r.bureau_dept_id is not null and r.bureau_dept_id is not null
and enforcement_time &lt; DATE_FORMAT(NOW(), '%Y-%m-01')
<!-- <if test="params.zone != null and params.zone != ''"> and r.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>--> <!-- <if test="params.zone != null and params.zone != ''"> and r.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>-->
<if test="deptId != null and deptId != ''"> <if test="deptId != null and deptId != ''">
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId})
@ -1704,8 +1706,8 @@
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if> <if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if> <if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<!-- <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if>--> <!-- <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if>-->
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if> <if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') &gt;= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if>
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if> <if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') &lt;= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if>
<if test="params.dataScope != null and params.dataScope != ''"> <if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}

Loading…
Cancel
Save