Browse Source

执法类型的统计改了标识

v6
蟑螂恶霸 1 year ago
parent
commit
533de01d65
  1. 4
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java
  2. 9
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseComplaintController.java
  3. 50
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java
  4. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseComplaint.java
  5. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java
  6. 95
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

4
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java

@ -253,7 +253,7 @@ public class AppEnforcementRegistrationController extends BaseController
startPage();
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnterpriseRegistrationList(enforcementRegistration);
DictDataBean dictParams = new DictDataBean();
dictParams.setDictType("check_category");
dictParams.setDictType("law_enforce_category");
List<DictDataBean> dicts = dictDataApi.getDictData(dictParams);
for (EnforcementRegistration ee : list) {
// 判断是否投诉
@ -268,7 +268,7 @@ public class AppEnforcementRegistrationController extends BaseController
}
// 执法类别
for (DictDataBean dict : dicts) {
if (dict.getDictValue().equals(ee.getCheckCategory())) {
if (dict.getDictValue().equals(ee.getLawEnforceCategory())) {
ee.setCheckCategoryText(dict.getDictLabel());
}
}

9
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseComplaintController.java

@ -83,6 +83,9 @@ public class AppEnterpriseComplaintController extends BaseController {
@PostMapping("/queryList")
@ResponseBody
public TableDataInfo queryList(@RequestBody EnterpriseComplaint enterpriseComplaint) {
DictDataBean dictParams = new DictDataBean();
dictParams.setDictType("caseType");
List<DictDataBean> dicts = dictDataApi.getDictData(dictParams);
int total = enterpriseComplaintService.selectTotal(enterpriseComplaint);
List<EnterpriseComplaint> pageList = enterpriseComplaintService.selectEnterpriseComplaintList(enterpriseComplaint);
//手动分页
@ -97,6 +100,12 @@ public class AppEnterpriseComplaintController extends BaseController {
}
});
for (int i = 0; i < pageList.size(); i++) {
// 执法类别
for (DictDataBean dict : dicts) {
if (dict.getDictValue().equals(pageList.get(i).getEnforceType().toString())) {
pageList.get(i).setEnforceTypeStr(dict.getDictLabel());
}
}
if(StringUtils.isNotEmpty(pageList.get(i).getRelId())){
EnforcementRegistration enforcementRegistration =
enforcementRegistrationMapper.selectEnforcementRegistrationById(pageList.get(i).getRelId());

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

@ -1,8 +1,10 @@
package com.zdxt.code.controller;
import com.zdxt.auth.dto.DeptBean;
import com.zdxt.auth.dto.DictDataBean;
import com.zdxt.auth.dto.UserBean;
import com.zdxt.auth.feign.DeptApi;
import com.zdxt.auth.feign.DictDataApi;
import com.zdxt.auth.feign.UserApi;
import com.zdxt.auth.project.system.dict.service.IDictDataService;
import com.zdxt.code.domain.SixAnalysisParams;
@ -36,6 +38,8 @@ public class StatisticalPanelController extends BaseController {
@Autowired private IDictDataService iDictDataService;
@Autowired private DeptApi deptApi;
@Autowired private UserApi userApi;
@Autowired
private DictDataApi dictDataApi;
@GetMapping("/statisticalPanelDeptAndUser")
@ -402,13 +406,51 @@ public class StatisticalPanelController extends BaseController {
@PostMapping("/analysisNonRegistrationType")
@ResponseBody
public ZDResponse analysisNonRegistrationType(@RequestBody SixAnalysisParams params){
List<Map<String, Object>> resMaps = statisticalPaneService.analysisNonRegistrationType(params);
DictDataBean dictParams = new DictDataBean();
dictParams.setDictType("no_check_category");
List<DictDataBean> dicts = dictDataApi.getDictData(dictParams);
List<Map<String, Object>> sourceMap = statisticalPaneService.analysisNonRegistrationType(params);
Integer nonAll = statisticalPaneService.analysis_non_enterprisesIns(params);
for (Map<String, Object> resMap : resMaps) {
double num = Double.parseDouble(resMap.get("num").toString());
List<Map<String, Object>> resMaps = new ArrayList<>();
for (DictDataBean dd : dicts) {
Map<String, Object> tmp = new HashMap<>();
tmp.put("dict_label", dd.getDictLabel());
tmp.put("num", 0);
tmp.put("per", "0.0");
for (Map<String, Object> smap : sourceMap) {
if (dd.getDictLabel().equals(smap.get("dict_label"))) {
double num = Double.parseDouble(smap.get("num").toString());
String per = this.setPercentage((num / nonAll));
resMap.put("per", per);
tmp.put("num", num);
tmp.put("per", per);
break;
}
}
resMaps.add(tmp);
}
// List<Map<String, Object>> nonTypes = statisticalPaneService.analysisNonRegistrationType(params);
// Integer nonAll = statisticalPaneService.analysis_non_enterprisesIns(params);
// resMap.put("njcNum", nonAll);
// for (DictData dictData : checkCategory) {
// Map<String, Object> tmp = new HashMap<>();
// tmp.put("label", dictData.getDictLabel());
// tmp.put("num", 0);
// tmp.put("per", 0.0);
// for (Map<String, Object> map : nonTypes) {
// if (map.get("dict_label").toString().equals(dictData.getDictLabel())) {
// double num = Double.parseDouble(map.get("num").toString());
// String per = this.setPercentage((num / nonAll));
// tmp.put("num", num);
// tmp.put("per", per);
// }
// }
// resNonTyps.put("key_"+dictData.getDictValue(), tmp);
// }
return ZDResponse.success("被查企业", resMaps);
}
/** 非行政检查类型 - 统计 */

12
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseComplaint.java

@ -94,7 +94,17 @@ public class EnterpriseComplaint extends BaseDomain
*/
private String complaintItemNames;
private String enforceTypeStr;
private String createTimeStr;
private String complaintTypeStr;
private String createTimeStr;
public String getComplaintTypeStr() {
return complaintTypeStr;
}
public void setComplaintTypeStr(String complaintTypeStr) {
this.complaintTypeStr = complaintTypeStr;
}
public String getEnforcementTime() {
return enforcementTime;
}

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java

@ -371,7 +371,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
String unionNo = IdUtil.simpleUUID();
enforcementRegistration.setUnionNo(unionNo);
enforcementRegistration.setUniteCheck("1"); // 为了适应来代码中的联合执法编码
enforcementRegistration.setCheckCss(unionNo); // 为了适应来代码中的联合执法编码
// enforcementRegistration.setCheckCss(unionNo); // 为了适应来代码中的联合执法编码
}
// 新增检查登记
// 业务又改了 保存和提交都走新增, 区别是保存后的可以修改, 提交后的不能修改.(这块在controller控制了isSubmit状态)
@ -479,7 +479,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
String unionNo = IdUtil.simpleUUID();
enforcementRegistration.setUnionNo(unionNo);
enforcementRegistration.setUniteCheck("1"); // 为了适应来代码中的联合执法编码
enforcementRegistration.setCheckCss(unionNo); // 为了适应来代码中的联合执法编码
// enforcementRegistration.setCheckCss(unionNo); // 为了适应来代码中的联合执法编码
}
UserBean user = userApi.getUserByUserId(enforcementRegistration.getUserId());
@ -1176,7 +1176,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
// 正常登记为一个小时范围, 补录为为单天
EnforcementRegistration er = new EnforcementRegistration();
er.setEnterpriseNumber(enterpriseNumber);
if ("3".equals(checkCss)) {
if ("9".equals(checkCss)) {
// String now = now_tmp.format(date_formatter);
er.setCheckCss(enforcementTime);
} else if ("edit".equals(checkCss)) {

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

@ -138,7 +138,7 @@
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})
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} or sd.area_node = #{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>
@ -191,7 +191,7 @@
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})
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} or sd.area_node = #{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>
@ -244,7 +244,7 @@
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})
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} or sd.area_node = #{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>
@ -783,7 +783,7 @@
<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 like concat('%',#{userId}, '%')) </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})
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} or sd.area_node = #{deptId})
</if>
<!-- <if test="qy != null and qy != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or-->
@ -895,7 +895,7 @@
<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 like concat('%',#{userId}, '%')) </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})
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} or sd.area_node = #{deptId})
</if>
<!-- <if test="qy != null and qy != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or-->
@ -957,7 +957,7 @@
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})
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} or sd.area_node = #{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>
@ -1018,7 +1018,7 @@
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})
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} or sd.area_node = #{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>
@ -1154,7 +1154,7 @@
and r.bureau_dept_id is not null
<!-- <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})
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} or sd.area_node = #{deptId})
</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>
@ -1179,7 +1179,7 @@
and (r.union_no IS NOT NULL and r.union_no != '')
<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})
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} or sd.area_node = #{deptId})
</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 != ''">
@ -1208,7 +1208,7 @@
and (r.union_no IS NOT NULL and r.union_no != '')
<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})
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} or sd.area_node = #{deptId})
</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 != ''">
@ -1233,7 +1233,7 @@
and r.bureau_dept_id is not null
<!-- <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})
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} or sd.area_node = #{deptId})
</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>
@ -1263,7 +1263,7 @@
and r.union_no IS NOT NULL and r.union_no != ''
<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})
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} or sd.area_node = #{deptId})
</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>
@ -1294,7 +1294,7 @@
and (r.union_no IS NOT NULL and r.union_no != '')
<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})
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} or sd.area_node = #{deptId})
</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 != ''">
@ -1329,7 +1329,7 @@
and (r.union_no IS NOT NULL and r.union_no != '')
<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})
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} or sd.area_node = #{deptId})
</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 != ''">
@ -1364,7 +1364,7 @@
and (r.union_no is null or r.union_no = '')
<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})
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} or sd.area_node = #{deptId})
</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>
@ -1388,7 +1388,7 @@
and r.union_no is not null and r.union_no != ''
<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})
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} or sd.area_node = #{deptId})
</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>
@ -1416,7 +1416,7 @@
and (r.union_no is null or r.union_no = '')
<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})
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} or sd.area_node = #{deptId})
</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 != ''">
@ -1444,7 +1444,7 @@
and r.union_no is not null and r.union_no != ''
<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})
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} or sd.area_node = #{deptId})
</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 != ''">
@ -1476,7 +1476,7 @@
and (r.union_no is null or r.union_no = '')
<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})
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} or sd.area_node = #{deptId})
</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 != ''">
@ -1504,7 +1504,7 @@
and r.union_no is not null and r.union_no != ''
<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})
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} or sd.area_node = #{deptId})
</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 != ''">
@ -1535,7 +1535,7 @@
and r.bureau_dept_id is not null
<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})
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} or sd.area_node = #{deptId})
</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>
@ -1561,7 +1561,7 @@
and r.bureau_dept_id is not null
<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})
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} or sd.area_node = #{deptId})
</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>
@ -1729,7 +1729,7 @@
and r.bureau_dept_id is not null
<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})
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} or sd.area_node = #{deptId})
</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>
@ -1757,7 +1757,7 @@
and r.bureau_dept_id is not null
<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})
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} or sd.area_node = #{deptId})
</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>
@ -1789,7 +1789,7 @@
and r.bureau_dept_id is not null
<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})
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} or sd.area_node = #{deptId})
</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>
@ -1819,7 +1819,7 @@
and r.bureau_dept_id is not null
<!-- <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})
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} or sd.area_node = #{deptId})
</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>
@ -1868,7 +1868,7 @@
and r.bureau_dept_id is not null
<!-- <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})
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} or sd.area_node = #{deptId})
</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>
@ -1897,7 +1897,7 @@
and r.bureau_dept_id is not null
<!-- <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})
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} or sd.area_node = #{deptId})
</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>
@ -1926,7 +1926,7 @@
and r.bureau_dept_id is not null
<!-- <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})
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} or sd.area_node = #{deptId})
</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>
@ -1943,35 +1943,34 @@
<!-- 非行政检查类型统计 -->
<select id="analysis_non_registration_type" parameterType="SixAnalysisParams" resultType="map">
select sdd.dict_label, count(nr.law_enforcement_type) as num from sys_dict_data sdd
left join non_enforcement_registration nr on nr.law_enforcement_type = sdd.dict_value
select sdd.dict_label, count(r.law_enforcement_type) as num from sys_dict_data sdd
left join non_enforcement_registration r on r.law_enforcement_type = sdd.dict_value
<where>
and sdd.dict_type = 'no_check_category'
and nr.bureau_dept_name is not null
and nr.dept_id is not null
and nr.enterprise_name is not null
and nr.enterprise_number is not null
and nr.law_enforcer_id is not null
and nr.law_enforcer_id_other is not null
and nr.law_enforcement_type is not null
and nr.bureau_dept_id is not null
<if test="params.zone != null and params.zone != ''"> and nr.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>
and r.bureau_dept_id is not null
and r.law_enforcer_id is not null
and r.law_enforcer_id_other is not null
and r.enterprise_number is not null
and r.law_enforcement_type is not null
and r.bureau_dept_id is not null
<!-- <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 nr.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{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} or sd.area_node = #{deptId})
</if>
<if test="uniteCheck == '0'.toString()"> and (nr.union_no is not null and nr.union_no != '')</if>
<if test="uniteCheck == '1'.toString()"> and (nr.union_no is null or nr.union_no = '')</if>
<if test="userId != null and userId != '' ">and( nr.law_enforcer_id=#{userId} or nr.law_enforcer_id_two=#{userId}) </if>
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(nr.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if>
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(nr.enforcement_time,'%Y-%m-%d') </if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '1'.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_other=#{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="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if>
<if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 -->
${params.dataScope}
</if>
</where>
group by nr.law_enforcement_type order by sdd.dict_sort asc
group by r.law_enforcement_type
</select>
<!-- 行政检查类型统计 -->
<select id="analysis_registration_type" parameterType="SixAnalysisParams" resultType="map">
select sdd.dict_label, count(r.check_category) as num from sys_dict_data sdd
@ -1990,7 +1989,7 @@
and r.bureau_dept_id is not null
<!-- <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})
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} or sd.area_node = #{deptId})
</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is null or r.union_no = '')</if>

Loading…
Cancel
Save