Browse Source

综合分析权限好了

v6
蟑螂恶霸 1 year ago
parent
commit
374330ee72
  1. 10
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppThirdLoginController.java
  2. 3
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/XssAndSqlFilter.java
  3. 3
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml
  4. 30
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/statistical/scripts/charts-analyov.js
  5. 26
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/overall-analysis.html
  6. 58
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/single-analysis.html
  7. 93
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java
  8. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java
  9. 108
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java
  10. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  11. 70
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

10
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppThirdLoginController.java

@ -174,8 +174,8 @@ public class AppThirdLoginController {
public ZDResponse szyptGetToken(@RequestParam("code") String code, @RequestParam("url") String url){
try {
System.out.println("====================== 获取政务微信认证签名URL ======================");
log.info("获取政务微信认证签名code:{}",code);
log.info("获取政务微信认证签名URL:{}",url);
System.out.println(url);
// 获取 access_token
String accessTokenJson = HttpUtil.HttpSendGet(szyptUrl + "/cgi-bin/gettoken?corpid="+szyptCorpid+"&corpsecret="+szyptCorpsecret, null);
JSONObject tokenObj = JSONObject.parseObject(accessTokenJson);
@ -183,14 +183,15 @@ public class AppThirdLoginController {
String jsapiTicket = HttpUtil.HttpSendGet(szyptUrl + "/cgi-bin/get_jsapi_ticket?access_token="+token, null);
JSONObject ticketObj = JSONObject.parseObject(jsapiTicket);
String ticket = ticketObj.getString("ticket");
System.out.println("====================== jsapiTicket ======================");
System.out.println(ticket);
System.out.println("====================== jsapiTicket ======================");
log.info("====================== jsapiTicket start ======================");
log.info("ticket: {}",ticket);
log.info("====================== jsapiTicket end ======================");
long timestamp = System.currentTimeMillis() / 1000;
//随机字符串
String nonceStr = "Wm3WZYTPz0wzccnW";
String signature = getSignature(ticket, nonceStr, timestamp, url);
log.info("signature: {}",signature);
Map<String, Object> data = new HashMap<>();
data.put("agentid", szyptAgentid);
@ -200,6 +201,7 @@ public class AppThirdLoginController {
data.put("signature", signature);
return ZDResponse.success("操作成功", data);
} catch (Exception e) {
log.error(e.getMessage());
e.printStackTrace();
}

3
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/XssAndSqlFilter.java

@ -36,7 +36,8 @@ public class XssAndSqlFilter implements Filter {
HttpServletRequest req = (HttpServletRequest) request;
//获取请求你ip后的全部路径
String uri = req.getRequestURI();
if (uri.indexOf("/system/notice/") >= 0) {
if (uri.indexOf("/system/notice/") >= 0
|| uri.indexOf("/app/enterpriseInformation/getEnterpriseInfoBySj") >= 0) {
chain.doFilter(request, response);
return;
}

3
lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml

@ -152,6 +152,9 @@
<if test="deptName != null and deptName != ''">
AND dept_name like concat('%', #{deptName}, '%')
</if>
<if test="isDeleted != null and isDeleted != ''">
AND isDeleted = #{isDeleted}
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>

30
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/statistical/scripts/charts-analyov.js

@ -27,11 +27,11 @@ var complaint_order_chart = null;
var bureau_order_chart = null;
/** 各区综合分析 */
function sixIndicators_area(qy) {
function sixIndicators_area(deptId, area) {
$.ajax({
url: ctx + "code/statisticalPanel/sixIndicators_area",
type: "get",
data: {dateType: "year", year:"2025", qy:qy},
data: {dateType: "year", year:"2025", deptId: deptId, qy: area},
success: function(res) {
if(res.success) {
// chartArea(res.data);
@ -165,12 +165,12 @@ function sixIndicators_area(qy) {
}
/** 检查类别数量及占比 */
function reg_type(qy) {
function reg_type(deptId) {
$.ajax({
// url: ctx + "code/registration/echarts1",
url: ctx + "code/statisticalPanel/staisticalCheck_category",
type: "get",
data: {year: '2025', dateSearch: 'year', qy:qy},
data: {year: '2025', dateType: 'year', deptId: deptId},
success: function(res) {
var types = []
for (var i=0; i<res.data.length; i++) {
@ -188,12 +188,12 @@ function reg_type(qy) {
}
/** 企业类别数量及占比 */
function enterprise_type(qy) {
function enterprise_type(deptId) {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalEnterprise_category",
// url: ctx + "code/statisticsEnterprise/type",
type: "get",
data: {qy:qy},
data: {year: '2025', dateSearch: 'year', deptId: deptId},
success: function(res) {
var types = []
for (var i=0; i<res.data.length; i++) {
@ -211,12 +211,12 @@ function enterprise_type(qy) {
}
/** 投诉类别数量及占比 */
function complaint_type(qy) {
function complaint_type(deptId) {
$.ajax({
// url: ctx + "code/complaintStatic/list2",
url: ctx + "code/statisticalPanel/staisticalEnforce_type",
type: "get",
data: {dateSearch:'year', year:'2025', qy:qy},
data: {dateType:'year', year:'2025', deptId: deptId},
success: function(res) {
var types = []
for (var i = 0; i < res.data.length; i++) {
@ -234,11 +234,11 @@ function complaint_type(qy) {
}
/** 被检查企业次数排行 */
function reg_order(qy) {
function reg_order(deptId) {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalRegistration_order",
type: "get",
data: {dateType:'year', year:'2025', qy:qy},
data: {dateType:'year', year:'2025', deptId: deptId},
success: function(res) {
var datas = res.data;
var top_num = 10;
@ -261,11 +261,11 @@ function reg_order(qy) {
}
/** 被投诉单位排行 */
function complaint_order(qy) {
function complaint_order(deptId) {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalComplaint_order",
type: "get",
data: {dateType:'year', year:'2025', qy:qy},
data: {dateType:'year', year:'2025', deptId: deptId},
success: function(res) {
var datas = res.data;
var top_num = 10;
@ -289,11 +289,11 @@ function complaint_order(qy) {
}
/** 执法检查数量排行 */
function bureau_order(qy) {
function bureau_order(deptId) {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalBureau_order",
type: "get",
data: {dateType:'year', year:'2025', qy:qy},
data: {dateType:'year', year:'2025', deptId: deptId},
success: function(res) {
var datas = res.data;
var top_num = 10;
@ -552,7 +552,7 @@ function chartEnterpriseType() {
},
series: [
{
name: '企业类别数量及占比',
name: '被检查企业类别数量及占比',
type: 'pie',
radius: ['43%', '60%'],
avoidLabelOverlap: false,

26
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/overall-analysis.html

@ -165,7 +165,7 @@
<div class="chart_box" id="countInspect"></div>
</div>
<div class="data_cont threebox">
<h3 class="chart_tit">企业类别数量及占比</h3>
<h3 class="chart_tit">被检查企业类别数量及占比</h3>
<div class="chart_box" id="countCommpany"></div>
</div>
<div class="data_cont threebox">
@ -256,11 +256,11 @@
queryDept();
});
function sixIndicators(qy) {
function sixIndicators(deptId, area) {
$.ajax({
url: ctx + "code/statisticalPanel/sixIndicators",
type: "get",
data: {dateType: "year", year:"2025", qy: qy},
data: {dateType: "year", year:"2025", deptId: deptId, qy: area},
success: function(res) {
if(res.success) {
const indicators = res.data;
@ -316,9 +316,9 @@
const datas = res.data;
var html = '';
if(datas.length >= 11) {
html += '<dd class="check_label" onclick="changeArea(\'2\', '+null+')">全区</dd>';
html += '<dd class="check_label" onclick="changeArea(null, null)">全区</dd>';
$("#dept_flag").html('全区')
changeArea('2', null)
changeArea(null, null)
} else {
var area = datas[0].deptName;
$("#dept_flag").html(area)
@ -346,14 +346,14 @@
}
function changeArea(id, area) {
sixIndicators(area)
sixIndicators_area(area);
reg_type(area);
enterprise_type(area);
complaint_type(area);
reg_order(area);
complaint_order(area);
bureau_order(area);
sixIndicators(id, area)
sixIndicators_area(id, area);
reg_type(id);
enterprise_type(id);
complaint_type(id);
reg_order(id);
complaint_order(id);
bureau_order(id);
if (null == area) area = "全区"
$("#dept_flag").html(area)
}

58
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/single-analysis.html

@ -129,7 +129,7 @@
<span class="data-rise" id="" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id=""><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
</div>
<div class="data_item">
<div class="cont-title">企业数量</div>
<div class="cont-title">企业数量(全市)</div>
<div class="cont-total"><b><span id="regis-total">-</span></b>
<div class="nece-data">
<div class="percent-tag">
@ -267,9 +267,6 @@
var ctx="/"
$(function(){
sixIndicators(null);
checkCategory();
enforceType();
queryDept();
});
@ -277,15 +274,16 @@
$.ajax({
url: ctx + "code/statisticalPanel/sixIndicators",
type: "get",
data: {dateType: "year", year:"2025", bureauDeptId: deptId},
data: {dateType: "year", year:"2025", deptId: deptId},
success: function(res) {
if(res.success) {
const indicators = res.data;
html = "";
for(var i=0; i < indicators.length; i++) {
var indicator = indicators[i];
var title = indicator.title=="企业数量"?"企业数量(全市)":indicator.title;
html += '<div class="data_item">';
html += ' <div class="cont-title">'+indicator.title+'</div>';
html += ' <div class="cont-title">'+title+'</div>';
html += ' <div class="cont-total"><b><span id="regis-total">'+indicator.num+'</span></b>';
html += ' <div class="nece-data">';
html += ' <div class="percent-tag">';
@ -323,11 +321,11 @@
}
/** 检查类别 */
function checkCategory() {
function checkCategory(deptId) {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalCheck_category",
type: "get",
data: {dateType: "year", year:"2025"},
data: {dateType: "year", year:"2025", deptId: deptId},
success: function(res) {
if(res.success) {
var html = "";
@ -349,11 +347,11 @@
}
/** 投诉类型 */
function enforceType() {
function enforceType(deptId) {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalEnforce_type",
type: "get",
data: {dateType: "year", year:"2025"},
data: {dateType: "year", year:"2025", deptId: deptId},
success: function(res) {
if(res.success) {
var html = "<h3 class=\"chart_tit\">行政执法投诉类别及占比</h3>";
@ -382,9 +380,17 @@
data: {zone: "1"},
success: function(res) {
if(res.success) {
$("#dept_flag").html('全市直')
var html = '<dd class="check_label" onclick="changeArea(\'1\', \'全市直\')">全市直</dd>';
const datas = res.data;
var html = '';
if(datas.length >= 29) {
html += '<dd class="check_label" onclick="changeArea(\'2\', \'全市直\')">全市直</dd>';
$("#dept_flag").html('全市直')
changeArea('2', null)
} else {
var area = datas[0].deptName;
$("#dept_flag").html(area)
changeArea(datas[0].deptId, area)
}
for(var i=0; i<datas.length; i++) {
html += '<dd class="check_label" onclick="changeArea(\''+datas[i].deptId+'\',\''+datas[i].deptName+'\')">'+datas[i].deptName+'</dd>'
}
@ -407,8 +413,11 @@
}
function changeArea(id, area) {
console.log(id)
sixIndicators(id);
checkCategory(id);
enforceType(id);
queryDept(id);
if (null == area) area = "全市值"
$("#dept_flag").html(area)
}
@ -443,8 +452,9 @@
/*******职权使用次数排行***********/
// 基于准备好的dom,初始化echarts实例
function tmp1() {
var myChart = echarts.init(document.getElementById('powerNumber'));
// 指定图表的配置项和数据
@ -538,12 +548,12 @@
myChart.setOption(option);
window.addEventListener("resize",function(){
myChart.resize();
});
});
}
/*******职权被投诉次数排行***********/
function tmp2() {
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('powerComplaint'));
@ -578,7 +588,8 @@
xAxis : [
{
type : 'category',
data : ['深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局'],
// data : ['深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局','深圳市司法局'],
data : [],
axisLine: {show: false},
axisTick: {show: false},
axisLabel: {
@ -622,7 +633,8 @@
backgroundStyle: {
borderRadius: [10, 10, 0, 0]
},
data:[13, 12, 11, 9, 8, 7, 6, 5, 5, 4],
// data:[13, 12, 11, 9, 8, 7, 6, 5, 5, 4],
data:[],
color:'#7ca9fb',
itemStyle: {
borderRadius: [10, 10, 0, 0]
@ -639,13 +651,10 @@
window.addEventListener("resize",function(){
myChart.resize();
});
}
//*****************职权使用率
$(function () {
xdnx();
function xdnx() {
// 基于准备好的dom,初始化echarts实例
@ -761,8 +770,7 @@ function xdnx() {
});
}
});
</script>
</body>

93
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java

@ -1,7 +1,9 @@
package com.zdxt.code.controller;
import com.zdxt.auth.common.utils.StringUtils;
import com.zdxt.auth.dto.DeptBean;
import com.zdxt.auth.feign.DeptApi;
import com.zdxt.auth.project.system.dict.service.IDictDataService;
import com.zdxt.code.domain.ComprehensiveAnalysis;
import com.zdxt.code.domain.SixAnalysis;
import com.zdxt.code.domain.SixAnalysisParams;
@ -11,6 +13,7 @@ import com.zdxt.code.service.StatisticalPaneService;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
import com.zdxt.domain.auth.Dept;
import com.zdxt.domain.auth.DictData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
@ -22,7 +25,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 综合统计
@ -34,6 +39,7 @@ public class StatisticalPanelController extends BaseController {
@Autowired
private StatisticalPaneService statisticalPaneService;
@Autowired private IDictDataService iDictDataService;
@Autowired private DeptApi deptApi;
@ -129,93 +135,6 @@ public class StatisticalPanelController extends BaseController {
@GetMapping("/sixIndicators")
@ResponseBody
public ZDResponse sixIndicators(SixAnalysisParams params){
// // 获取当前月的 今天 / 第一天
// LocalDate current_day = LocalDate.now(); // 当月的今天
// LocalDate current_one_day = current_day.withDayOfMonth(1); // 当月第一天
// LocalDate current_finally_day = current_day.with(TemporalAdjusters.lastDayOfMonth()); // 当月最后一天
// // 获取上个月的 今天 / 第一天
// LocalDate last_day = current_day.minusMonths(1); // 上月的今天
// LocalDate last_one_day = current_day.minusMonths(1).withDayOfMonth(1); // 上月第一天
// LocalDate last_finally_day = current_day.minusMonths(1).with(TemporalAdjusters.lastDayOfMonth()); // 上月最后一天
//
//
// // 如果当前日期是这个月的最后一天 or 当前月份天>上一月最后一天,则调整到上个月的最后一天
// if (current_day.getDayOfMonth() > last_day.lengthOfMonth() || current_day.equals(current_finally_day)) {
// last_day = last_finally_day;
// }
//
// List<SixAnalysis> all_area=new ArrayList<>();
//
// // 涉企检查数量
// SixAnalysis registration = new SixAnalysis();
// all_area.add(registration);
// registration.setTitle("涉企检查数量");
// int reg_num = statisticalPaneService.staisticalRegistration(params);
// registration.setNum(reg_num);
// registration.setRing_ratio("0");
// registration.setYoy("0");
// // 联合检查数量
// SixAnalysis unite_registration = new SixAnalysis();
// all_area.add(unite_registration);
// unite_registration.setTitle("联合检查数量");
// params.setUniteCheck("0");
// int unite_reg_num = statisticalPaneService.staisticalRegistration(params);
// unite_registration.setNum(unite_reg_num);
// unite_registration.setRing_ratio("0");
// unite_registration.setYoy("0");
// params.setUniteCheck(null);
// // 行政检查预告数量
// SixAnalysis lawEnforcement = new SixAnalysis();
// all_area.add(lawEnforcement);
// lawEnforcement.setTitle("行政检查预告数量");
// int law_num = statisticalPaneService.staisticalLawEnforcement(params);
// lawEnforcement.setNum(law_num);
// lawEnforcement.setRing_ratio("0");
// lawEnforcement.setYoy("0");
// //涉企投诉数量
// SixAnalysis complaint = new SixAnalysis();
// all_area.add(complaint);
// complaint.setTitle("涉企投诉数量");
// int com_num = statisticalPaneService.staisticalComplaint(params);
// complaint.setNum(com_num);
// complaint.setRing_ratio("0");
// complaint.setYoy("0");
// //企业数量
// SixAnalysis enterprise = new SixAnalysis();
// all_area.add(enterprise);
// enterprise.setTitle("企业数量");
// int ent_num = statisticalPaneService.staisticalEnterprise(params);
// enterprise.setNum(ent_num);
// enterprise.setRing_ratio("0");
// enterprise.setYoy("0");
//
// params.setDateType("day");
// /** -------- 本月 -------- */
// params.setBeginTime(current_one_day.toString());
// params.setEndTime(current_finally_day.toString());
//
// registration.setCurrent_month_num(statisticalPaneService.staisticalRegistration(params));
// params.setUniteCheck("0");
// unite_registration.setCurrent_month_num(statisticalPaneService.staisticalRegistration(params));
// params.setUniteCheck(null);
// lawEnforcement.setCurrent_month_num(statisticalPaneService.staisticalLawEnforcement(params));
// complaint.setCurrent_month_num(statisticalPaneService.staisticalComplaint(params));
// enterprise.setCurrent_month_num(statisticalPaneService.staisticalEnterprise(params));
//
// /** -------- 昨天 -------- */
// LocalDate yesterday = LocalDate.now().minusDays(1);
// params.setBeginTime(yesterday.toString());
// params.setEndTime(yesterday.toString());
//
// registration.setYesterday_num(statisticalPaneService.staisticalRegistration(params));
// params.setUniteCheck("0");
// unite_registration.setYesterday_num(statisticalPaneService.staisticalRegistration(params));
// params.setUniteCheck(null);
// lawEnforcement.setYesterday_num(statisticalPaneService.staisticalLawEnforcement(params));
// complaint.setYesterday_num(statisticalPaneService.staisticalComplaint(params));
// enterprise.setYesterday_num(statisticalPaneService.staisticalEnterprise(params));
//
// return ZDResponse.success("总数据统计", all_area);
return ZDResponse.success("总数据统计", statisticalPaneService.sixIndicators(params));
}

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java

@ -771,7 +771,18 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
// 将查询字符串拆分为键值对
Map<String, String> queryParams = new HashMap<>();
if (query != null) {
String[] pairs = query.split("&");
String split_flag = "&";
if (query.indexOf("&") < 0) {
if (query.indexOf("&") < 0) {
split_flag = "%26";
} else {
split_flag = "&";
}
} else {
split_flag = "&";
}
// String split_flag = query.indexOf("&") < 0 ?"%26":"&"; // 有些链接的 & 会被转义成 %26
String[] pairs = query.split(split_flag);
for (String pair : pairs) {
int idx = pair.indexOf("=");
String key = pair.substring(0, idx);

108
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java

@ -647,10 +647,13 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
*/
@Override
public List<SixAnalysis> sixIndicators(SixAnalysisParams params) {
// if (StringUtils.isNotEmpty(params.getQy())) {
// String qy=iDictDataService.selectDictLabel("address_Type",params.getQy());
// params.setQy(qy);
// }
// 如果部门为空这表示全了全部, 如果是区直则定位为 区 的deptId, 市则 市的deptId, 全市则 深圳市的部门id
if (StringUtils.isEmpty(params.getDeptId())) {
Dept deptParams = new Dept();
deptParams.setIsDeleted("深圳市/区");
List<Dept> depts = iDeptService.selectDeptList(deptParams);
params.setDeptId(depts.get(0).getDeptId());
}
// 获取当前月的 今天 / 第一天
LocalDate current_day = LocalDate.now(); // 当月的今天
@ -667,13 +670,16 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
last_day = last_finally_day;
}
String tmpArea = params.getQy();
params.setQy(null);
List<SixAnalysis> all_area=new ArrayList<>();
/** -------- 总数 -------- */
// 涉企检查数量
SixAnalysis registration = new SixAnalysis();
all_area.add(registration);
registration.setTitle("涉企检查数量");
int reg_num = this.staisticalRegistration(params);
int reg_num = statisticalPanelMapper.staisticalRegistration(params);
double reg_rr_num = statisticalPanelMapper.staisticalRegistration_rr(params);
double reg_yoy_num = statisticalPanelMapper.staisticalRegistration_yoy(params);
registration.setNum(reg_num);
@ -684,7 +690,7 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
all_area.add(unite_registration);
unite_registration.setTitle("联合检查数量");
params.setUniteCheck("0");
int unite_reg_num = this.staisticalRegistration(params);
int unite_reg_num = statisticalPanelMapper.staisticalRegistration(params);
double unite_reg_rr_num = statisticalPanelMapper.staisticalRegistration_rr(params);
double unite_reg_yoy_num = statisticalPanelMapper.staisticalRegistration_yoy(params);
unite_registration.setNum(unite_reg_num);
@ -725,9 +731,11 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
SixAnalysis enterprise = new SixAnalysis();
all_area.add(enterprise);
enterprise.setTitle("企业数量");
params.setQy(tmpArea);
int ent_num = statisticalPanelMapper.staisticalEnterprise(params);
double ent_rr_num = statisticalPanelMapper.staisticalEnterprise_rr(params);
double ent_yoy_num = statisticalPanelMapper.staisticalEnterprise_yoy(params);
params.setQy(null);
enterprise.setNum(ent_num);
enterprise.setRing_ratio(this.calculateRingRatio(ent_rr_num, ent_num));
enterprise.setYoy(this.calculateYearOverYear(ent_yoy_num, ent_num));
@ -742,10 +750,12 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
params.setUniteCheck("0");
unite_registration.setCurrent_month_num(statisticalPanelMapper.staisticalRegistration(params));
params.setUniteCheck(null);
lawEnforcement.setCurrent_month_num(this.staisticalLawEnforcement(params));
complaint.setCurrent_month_num(this.staisticalComplaint(params));
lawEnforcement.setCurrent_month_num(statisticalPanelMapper.staisticalLawEnforcement(params));
complaint.setCurrent_month_num(statisticalPanelMapper.staisticalComplaint(params));
// warning.setCurrent_month_num(statisticalPanelMapper.staisticalWarning(params));
enterprise.setCurrent_month_num(this.staisticalEnterprise(params));
params.setQy(tmpArea);
enterprise.setCurrent_month_num(statisticalPanelMapper.staisticalEnterprise(params));
params.setQy(null);
/** -------- 昨天 -------- */
LocalDate yesterday = LocalDate.now().minusDays(1);
@ -756,10 +766,12 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
params.setUniteCheck("0");
unite_registration.setYesterday_num(statisticalPanelMapper.staisticalRegistration(params));
params.setUniteCheck(null);
lawEnforcement.setYesterday_num(this.staisticalLawEnforcement(params));
complaint.setYesterday_num(this.staisticalComplaint(params));
lawEnforcement.setYesterday_num(statisticalPanelMapper.staisticalLawEnforcement(params));
complaint.setYesterday_num(statisticalPanelMapper.staisticalComplaint(params));
// warning.setYesterday_num(statisticalPanelMapper.staisticalWarning(params));
enterprise.setYesterday_num(this.staisticalEnterprise(params));
params.setQy(tmpArea);
enterprise.setYesterday_num(statisticalPanelMapper.staisticalEnterprise(params));
params.setQy(null);
return all_area;
}
@ -795,38 +807,69 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
@Override
public List<Map<String, Object>> sixIndicators_area(SixAnalysisParams params) {
// 如果部门为空这表示全了全部, 如果是区直则定位为 区 的deptId, 市则 市的deptId, 全市则 深圳市的部门id
String tmp_deptId = params.getDeptId();
Dept deptParams = new Dept();
deptParams.setZone(2);
List<Dept> depts = iDeptService.selectDeptList(deptParams);
String area_flag = params.getQy();
List<DictData> area_list = iDictDataService.selectDictDataByType("address_Type");
// List<DictData> area_list = iDictDataService.selectDictDataByType("address_Type");
List<Map<String, Object>> all_area=new ArrayList<>();
for(DictData area:area_list) {
for(Dept area:depts) {
Map<String, Object> info = new HashMap<>();
info.put("area", area.getDictLabel());
params.setQy(area.getDictLabel());
info.put("area", area.getDeptName());
// params.setQy(area.getDictLabel());
String area_dict = area.getDeptName();
List<SixAnalysis> areas = new ArrayList<>();
params.setQy(null);
if (StringUtils.isEmpty(tmp_deptId)) {
params.setDeptId(area.getDeptId());
}
/** -------- 总数 -------- */
// 涉企检查数量
SixAnalysis registration = new SixAnalysis();
areas.add(registration);
registration.setTitle("涉企检查次数");
registration.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?statisticalPanelMapper.staisticalRegistration(params):0);
if (area_flag.equals(area_dict) || StringUtils.isEmpty(area_flag)) {
registration.setNum(statisticalPanelMapper.staisticalRegistration(params));
} else {
registration.setNum(0);
}
// registration.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?statisticalPanelMapper.staisticalRegistration(params):0);
// 联合检查数量
SixAnalysis unite_registration = new SixAnalysis();
areas.add(unite_registration);
unite_registration.setTitle("联合检查次数");
params.setUniteCheck("0");
unite_registration.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?statisticalPanelMapper.staisticalRegistration(params):0);
if (area_flag.equals(area_dict) || StringUtils.isEmpty(area_flag)) {
unite_registration.setNum(statisticalPanelMapper.staisticalRegistration(params));
} else {
unite_registration.setNum(0);
}
// unite_registration.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?statisticalPanelMapper.staisticalRegistration(params):0);
params.setUniteCheck(null);
// 行政检查预告数量
SixAnalysis lawEnforcement = new SixAnalysis();
areas.add(lawEnforcement);
lawEnforcement.setTitle("行政检查预告次数");
lawEnforcement.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?this.staisticalLawEnforcement(params):0);
if (area_flag.equals(area_dict) || StringUtils.isEmpty(area_flag)) {
lawEnforcement.setNum(statisticalPanelMapper.staisticalLawEnforcement(params));
} else {
lawEnforcement.setNum(0);
}
// lawEnforcement.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?statisticalPanelMapper.staisticalLawEnforcement(params):0);
//涉企投诉数量
SixAnalysis complaint = new SixAnalysis();
areas.add(complaint);
complaint.setTitle("涉企投诉次数");
complaint.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?this.staisticalComplaint(params):0);
if (area_flag.equals(area_dict) || StringUtils.isEmpty(area_flag)) {
complaint.setNum(statisticalPanelMapper.staisticalComplaint(params));
} else {
complaint.setNum(0);
}
// complaint.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?statisticalPanelMapper.staisticalComplaint(params):0);
//执法预警数量
// SixAnalysis warning = new SixAnalysis();
// areas.add(warning);
@ -836,7 +879,13 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
SixAnalysis enterprise = new SixAnalysis();
areas.add(enterprise);
enterprise.setTitle("企业数量");
enterprise.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?this.staisticalEnterprise(params):0);
if (area_flag.equals(area_dict) || StringUtils.isEmpty(area_flag)) {
params.setQy(area_dict);
enterprise.setNum(statisticalPanelMapper.staisticalEnterprise(params));
} else {
enterprise.setNum(0);
}
// enterprise.setNum(area_flag.equals(params.getQy()) || StringUtils.isEmpty(area_flag)?statisticalPanelMapper.staisticalEnterprise(params):0);
info.put("list", areas);
all_area.add(info);
}
@ -846,19 +895,23 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
/** 排行 */
@Override
@DataScope(userAlias = "r", deptAlias = "r", deptField = "bureau_dept_id")
public List<Map<String, Object>> staisticalRegistration_order(SixAnalysisParams params) {
return statisticalPanelMapper.staisticalRegistration_order(params);
}
@Override
// @DataScope(deptAlias = "c", deptField = "complaint_department_id")
public List<Map<String, Object>> staisticalComplaint_order(SixAnalysisParams params) {
return statisticalPanelMapper.staisticalComplaint_order(params);
}
@Override
// @DataScope(userAlias = "r", deptAlias = "r", deptField = "bureau_dept_id")
public List<Map<String, Object>> staisticalBureau_order(SixAnalysisParams params) {
return statisticalPanelMapper.staisticalBureau_order(params);
}
@Override
// @DataScope(userAlias = "r", deptAlias = "r", deptField = "bureau_dept_id")
public List<Map<String, Object>> staisticalCheck_category(SixAnalysisParams params) {
List<Map<String, Object>> results = new ArrayList<>();
List<DictData> checkCategory = iDictDataService.selectDictDataByType("check_category");
@ -879,7 +932,11 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
}
for (Map<String, Object> tmpMap : results) {
double per = Double.parseDouble(tmpMap.get("num").toString()) / total * 100;
tmpMap.put("per", String.format("%.2f", per)+"%");
if (Double.isNaN(per)) {
tmpMap.put("per", 0+"%");
} else {
tmpMap.put("per", String.format("%.2f", per)+"%");
}
}
return results;
}
@ -931,6 +988,7 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
}
@Override
// @DataScope(deptAlias = "c", deptField = "complaint_department_id")
public List<Map<String, Object>> staisticalEnforce_type(SixAnalysisParams params) {
List<Map<String, Object>> results = new ArrayList<>();
List<DictData> checkCategory = iDictDataService.selectDictDataByType("caseType");
@ -951,7 +1009,11 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
}
for (Map<String, Object> tmpMap : results) {
double per = Double.parseDouble(tmpMap.get("num").toString()) / total * 100;
tmpMap.put("per", String.format("%.2f", per)+"%");
if (Double.isNaN(per)) {
tmpMap.put("per", 0+"%");
} else {
tmpMap.put("per", String.format("%.2f", per)+"%");
}
}
return results.subList(0, Math.min(6, results.size()));
}

4
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

@ -147,10 +147,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and enforcement_time &lt;= #{params.endTime}
</if>
<if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 -->
${params.dataScope}
</if>
</where>
order by enforcement_time desc
</select>

70
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

@ -136,6 +136,9 @@
<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 != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
@ -185,6 +188,9 @@
<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 != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
@ -234,6 +240,9 @@
<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 != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
@ -277,8 +286,10 @@
<if test="params.zone != null and params.zone != ''">
and n.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="deptId != null and deptId != ''">
and n.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -316,6 +327,9 @@
<if test="params.zone != null and params.zone != ''">
and n.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="deptId != null and deptId != ''">
and n.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
@ -355,6 +369,9 @@
<if test="params.zone != null and params.zone != ''">
and n.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="deptId != null and deptId != ''">
and n.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
@ -398,8 +415,10 @@
<if test="params.zone != null and params.zone != ''">
and c.complaint_department_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="deptId != null and deptId != ''">
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and c.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -439,8 +458,10 @@
<if test="params.zone != null and params.zone != ''">
and c.complaint_department_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="deptId != null and deptId != ''">
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and c.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -480,8 +501,10 @@
<if test="params.zone != null and params.zone != ''">
and c.complaint_department_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="deptId != null and deptId != ''">
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and c.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -520,7 +543,9 @@
and w.enterprise_number is not null
and warn_type = 1
<if test="userId != null and userId != '' ">and( w.law_enforcer_id=#{userId} or w.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and w.bureau_dept_id=#{bureauDeptId}</if>
<if test="deptId != null and deptId != ''">
and w.enforcement_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -557,7 +582,9 @@
and w.enterprise_number is not null
and warn_type = 1
<if test="userId != null and userId != '' ">and( w.law_enforcer_id=#{userId} or w.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and w.bureau_dept_id=#{bureauDeptId}</if>
<if test="deptId != null and deptId != ''">
and w.enforcement_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -594,7 +621,9 @@
and w.enterprise_number is not null
and warn_type = 1
<if test="userId != null and userId != '' ">and( w.law_enforcer_id=#{userId} or w.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and w.bureau_dept_id=#{bureauDeptId}</if>
<if test="deptId != null and deptId != ''">
and w.enforcement_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -633,7 +662,6 @@
and e.company_org_type is not null
and e.enterprise_address is not null
<if test="userId != null and userId != '' ">and( e.law_enforcer_id=#{userId} or e.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and e.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -666,7 +694,6 @@
and e.company_org_type is not null
and e.enterprise_address is not null
<if test="userId != null and userId != '' ">and( e.law_enforcer_id=#{userId} or e.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and e.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -703,7 +730,6 @@
and e.company_org_type is not null
and e.enterprise_address is not null
<if test="userId != null and userId != '' ">and( e.law_enforcer_id=#{userId} or e.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and e.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -752,7 +778,9 @@
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if>
<if test="deptId != null and deptId != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -792,7 +820,9 @@
and c.enforce_type is not null
and c.enterprise_number is not null
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and c.bureau_dept_id=#{bureauDeptId}</if>
<if test="deptId != null and deptId != ''">
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -840,7 +870,9 @@
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if>
<if test="deptId != null and deptId != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -890,10 +922,12 @@
<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 != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -942,6 +976,9 @@
<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 != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
@ -974,6 +1011,7 @@
${params.dataScope}
</if>
</where>
group by enterprise_number
</select>
<!-- 投诉类型 -->
<select id="staisticalEnforce_type" parameterType="SixAnalysisParams" resultType="map">
@ -986,8 +1024,10 @@
<if test="params.zone != null and params.zone != ''">
and c.complaint_department_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="deptId != null and deptId != ''">
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and c.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))

Loading…
Cancel
Save