Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev-V1.0.1
庄锐波 3 months ago
parent
commit
b592300c13
  1. 12
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/StatisticalPanelCityController.java
  2. 16
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/StatisticalPanelController.java
  3. 10
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/StatisticalPanelDistrictController.java
  4. 120
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/StatisticalPanelCityMapper.xml
  5. 120
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/StatisticalPanelDistrictMapper.xml
  6. 262
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/StatisticalPanelMapper.xml

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

@ -74,7 +74,7 @@ public class StatisticalPanelCityController {
return R.ok("联合检查", resMap); return R.ok("联合检查", resMap);
} }
/** 被执法企业次数排行 */ /** 监督端-被执法企业次数排行 */
@SaIgnore @SaIgnore
@PostMapping("/queryEnfEntSort") @PostMapping("/queryEnfEntSort")
@ResponseBody @ResponseBody
@ -85,7 +85,7 @@ public class StatisticalPanelCityController {
return R.ok("被执法企业次数排行", resMap); return R.ok("被执法企业次数排行", resMap);
} }
/** 执法单位执法数量排行 */ /** 监督端-执法单位执法数量排行 */
@SaIgnore @SaIgnore
@PostMapping("/queryEnforcementSort") @PostMapping("/queryEnforcementSort")
@ResponseBody @ResponseBody
@ -96,7 +96,7 @@ public class StatisticalPanelCityController {
return R.ok("执法单位执法数量排行", resMap); return R.ok("执法单位执法数量排行", resMap);
} }
/** 被投诉单位次数排行 */ /** 监督端-被投诉单位次数排行 */
@SaIgnore @SaIgnore
@PostMapping("/queryEntCSort") @PostMapping("/queryEntCSort")
@ResponseBody @ResponseBody
@ -107,7 +107,7 @@ public class StatisticalPanelCityController {
return R.ok("被投诉单位次数排行", resMap); return R.ok("被投诉单位次数排行", resMap);
} }
/** 委托执法数量及占比 */ /** 监督端-委托执法数量及占比 */
@SaIgnore @SaIgnore
@PostMapping("/queryAutoRate") @PostMapping("/queryAutoRate")
@ResponseBody @ResponseBody
@ -118,7 +118,7 @@ public class StatisticalPanelCityController {
return R.ok("委托执法数量及占比", resMap); return R.ok("委托执法数量及占比", resMap);
} }
/** 联合检查单位排行 */ /**监督端- 联合检查单位排行 */
@SaIgnore @SaIgnore
@PostMapping("/queryUnionSort") @PostMapping("/queryUnionSort")
@ResponseBody @ResponseBody
@ -129,7 +129,7 @@ public class StatisticalPanelCityController {
return R.ok("被执法企业次数排行", resMap); return R.ok("被执法企业次数排行", resMap);
} }
/** 执法人员涉企检查数是排行 */ /**监督端- 执法人员涉企检查数是排行 */
@SaIgnore @SaIgnore
@PostMapping("/queryLawEntSort") @PostMapping("/queryLawEntSort")
@ResponseBody @ResponseBody

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

@ -188,8 +188,7 @@ public class StatisticalPanelController {
@PostMapping("/analysisNonRegistrationType") @PostMapping("/analysisNonRegistrationType")
@ResponseBody @ResponseBody
public R <List<Map<String,Object>>> analysisNonRegistrationType(@RequestBody SixAnalysisParamsBo params){ public R <List<Map<String,Object>>> analysisNonRegistrationType(@RequestBody SixAnalysisParamsBo params){
//SysDictDataVo dictParams = new SysDictDataVo();
//dictParams.setDictType("no_check_category");
List<SysDictDataVo> dicts = sysDictDataService.selectDictDataByType("no_check_category"); List<SysDictDataVo> dicts = sysDictDataService.selectDictDataByType("no_check_category");
List<Map<String, Object>> sourceMap = statisticalPaneService.analysisNonRegistrationType(params); List<Map<String, Object>> sourceMap = statisticalPaneService.analysisNonRegistrationType(params);
Integer nonAll = statisticalPaneService.analysis_non_enterprisesIns(params); Integer nonAll = statisticalPaneService.analysis_non_enterprisesIns(params);
@ -323,17 +322,12 @@ public class StatisticalPanelController {
// 被检查企业数 // 被检查企业数
params.setQy(deptParams.getDeptName()); params.setQy(deptParams.getDeptName());
// Integer ent_all_num = statisticalPaneService.analysisEnterprisesCountAll(params);
Integer ent_num = statisticalPaneService.analysisEnterprises(params); Integer ent_num = statisticalPaneService.analysisEnterprises(params);
// String ent_per = this.setPercentage((double)ent_num / ent_all_num);
resMap.put("entNum", ent_num); resMap.put("entNum", ent_num);
// resMap.put("entPer", ent_per);
// 投诉 // 投诉
Integer com_num = statisticalPaneService.analysisEnterprisesComplaint(params); Integer com_num = statisticalPaneService.analysisEnterprisesComplaint(params);
// String com_per = this.setPercentage((double)com_num / all_num);
resMap.put("comNum", com_num); resMap.put("comNum", com_num);
// resMap.put("comPer", com_per);
// 非行政执法 // 非行政执法
Map<String, Object> resNonTyps = new HashMap<>(); Map<String, Object> resNonTyps = new HashMap<>();
@ -362,7 +356,7 @@ public class StatisticalPanelController {
} }
/** /**
* 查询部门接口 * 监督端-查询部门接口
*/ */
@SaIgnore @SaIgnore
@PostMapping("/queryDept") @PostMapping("/queryDept")
@ -373,11 +367,17 @@ public class StatisticalPanelController {
} }
@SaIgnore @SaIgnore
/**
* 监督端-查询部门接口长度
*/
@PostMapping("/queryDeptLength") @PostMapping("/queryDeptLength")
@ResponseBody @ResponseBody
public R<List<SysDeptVo>> queryDeptLength(@RequestBody SysDeptBo bo){ public R<List<SysDeptVo>> queryDeptLength(@RequestBody SysDeptBo bo){
return R.ok("部门列表长度", sysDeptService.selectDepts(bo)); return R.ok("部门列表长度", sysDeptService.selectDepts(bo));
} }
/**
* 监督端-部门列表-街道和区直
*/
@SaIgnore @SaIgnore
@PostMapping("/queryStreetAndDistrict") @PostMapping("/queryStreetAndDistrict")
@ResponseBody @ResponseBody

10
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/controller/web/supervision/StatisticalPanelDistrictController.java

@ -62,7 +62,7 @@ public class StatisticalPanelDistrictController {
} }
/** 市数据 */ /** 监督端-市数据 */
@SaIgnore @SaIgnore
@PostMapping("/collectStatistics") @PostMapping("/collectStatistics")
@ResponseBody @ResponseBody
@ -73,7 +73,7 @@ public class StatisticalPanelDistrictController {
return R.ok("联合检查", resMap); return R.ok("联合检查", resMap);
} }
/** 被执法企业次数排行 */ /** 监督端-被执法企业次数排行 */
@SaIgnore @SaIgnore
@PostMapping("/queryEnfEntSort") @PostMapping("/queryEnfEntSort")
@ResponseBody @ResponseBody
@ -84,7 +84,7 @@ public class StatisticalPanelDistrictController {
return R.ok("被执法企业次数排行", resMap); return R.ok("被执法企业次数排行", resMap);
} }
/** 执法单位执法数量排行 */ /** 监督端-执法单位执法数量排行 */
@SaIgnore @SaIgnore
@PostMapping("/queryEnforcementSort") @PostMapping("/queryEnforcementSort")
@ResponseBody @ResponseBody
@ -95,7 +95,7 @@ public class StatisticalPanelDistrictController {
return R.ok("执法单位执法数量排行", resMap); return R.ok("执法单位执法数量排行", resMap);
} }
/** 被投诉单位次数排行 */ /** 监督端-被投诉单位次数排行 */
@SaIgnore @SaIgnore
@PostMapping("/queryEntCSort") @PostMapping("/queryEntCSort")
@ResponseBody @ResponseBody
@ -106,7 +106,7 @@ public class StatisticalPanelDistrictController {
return R.ok("被投诉单位次数排行", resMap); return R.ok("被投诉单位次数排行", resMap);
} }
/** 委托执法数量及占比 */ /** 监督端-委托执法数量及占比 */
@SaIgnore @SaIgnore
@PostMapping("/queryAutoRate") @PostMapping("/queryAutoRate")
@ResponseBody @ResponseBody

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

@ -4,126 +4,6 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zdxt.enforcementcode.mapper.StatisticalPanelCityMapper"> <mapper namespace="com.zdxt.enforcementcode.mapper.StatisticalPanelCityMapper">
<resultMap type="com.zdxt.enforcementcode.domain.EnforcementRegistration" id="EnforcementRegistrationResult">
<result property="id" column="id" />
<result property="lawEnforcement" column="law_enforcement" />
<result property="lawEnforcementId" column="law_enforcement_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="enterpriseNumber" column="enterprise_number" />
<result property="enforcementTime" column="enforcement_time" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="lawEnforcer" column="law_enforcer" />
<result property="lawEnforcerId" column="law_enforcer_id" />
<result property="lawEnforcerTel" column="law_enforcer_tel" />
<result property="lawEnforcerTwo" column="law_enforcer_two" />
<result property="lawEnforcerIdTwo" column="law_enforcer_id_two" />
<result property="lawEnforcerTelTwo" column="law_enforcer_tel_two" />
<result property="subsidiaryer" column="subsidiaryer" />
<result property="subsidiaryerId" column="subsidiaryer_id" />
<result property="subsidiaryerTel" column="subsidiaryer_tel" />
<result property="lawEnforcementItem" column="law_enforcement_item" />
<result property="lawEnforcementItemText" column="law_enforcement_item_text" />
<result property="lawEnforcementBasis" column="law_enforcement_basis" />
<result property="lawEnforcementBasisText" column="law_enforcement_basis_text" />
<result property="remark" column="remark" />
<result property="reslut" column="reslut" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="isDelete" column="is_delete" />
<result property="status" column="status" />
<result property="lawEnforcementCode" column="law_enforcement_code" />
<result property="isComplaint" column="is_complaint" />
<result property="isSubmit" column="is_submit" />
<result property="uniteCheck" column="unite_check" />
<result property="enforce" column="enforce" />
<result property="checkCss" column="check_css" />
<result property="enforceReason" column="enforce_reason" />
<result property="lawField" column="law_field" />
<result property="checkCategory" column="check_category" />
<result property="bureauDeptId" column="bureau_dept_id" />
<result property="bureauDeptName" column="bureau_dept_name" />
<result property="isEvaluate" column="is_evaluate" />
<result property="lawId" column="law_id" />
<result property="lawText" column="law_text" />
<result property="numLeft" column="numLeft" />
<result property="numRight" column="numRight" />
<result property="unionNo" column="union_no" />
<result property="hasUnion" column="has_union" />
<result property="hasAuto" column="has_auto" />
<result property="lawEnforceCategory" column="law_enforce_category" />
<result property="entrustDeptId" column="entrust_dept_id" />
<result property="entrustDeptName" column="entrust_dept_name" />
<result property="enterpriseAddress" column="enterprise_address" />
<result property="district" column="district" />
<result property="street" column="street" />
</resultMap>
<resultMap type="com.zdxt.enforcementcode.domain.EnterpriseComplaint" id="EnterpriseComplaintResult">
<result property="id" column="id" />
<result property="relId" column="rel_id" />
<result property="enforceType" column="enforce_type" />
<result property="problemDescription" column="problem_description" />
<result property="enterpriseAddress" column="enterprise_address" />
<result property="linkman" column="linkman" />
<result property="linkmanTel" column="linkman_tel" />
<result property="comOrOpi" column="com_or_opi" />
<result property="authorization" column="authorization" />
<result property="createTime" column="create_time" />
<result property="proWoCode" column="pro_wo_code" />
<result property="enterpriseNumber" column="enterprise_number" />
<result property="enterpriseName" column="enterprise_name" />
<result property="status" column="status" />
<result property="evaluateTime" column="evaluate_time" />
<result property="complaintDepartments" column="complaint_departments" />
<result property="complaintDepartmentIds" column="complaint_department_ids" />
<result property="enforcementTime" column="enforcement_time" />
<result property="handleTime" column="handle_time" />
<result property="complaintType" column="complaint_type" />
<result property="complaintItemCodes" column="complaint_item_codes" />
<result property="complaintItemNames" column="complaint_item_names" />
<result property="complaintRecordItem" column="complaint_record_item" />
<result property="recordType" column="record_type" />
</resultMap>
<resultMap type="com.zdxt.enforcementcode.domain.EnterpriseEvaluate" id="EnterpriseEvaluateResult">
<result property="id" column="id" />
<result property="enforcementName" column="enforcement_name" />
<result property="enforcementId" column="enforcement_id" />
<result property="evaluateDescription" column="evaluate_description" />
<result property="linkman" column="linkman" />
<result property="linkmanTel" column="linkman_tel" />
<result property="authorization" column="authorization" />
<result property="createTime" column="create_time" />
<result property="enterpriseNumber" column="enterprise_number" />
<result property="enterpriseName" column="enterprise_name" />
<result property="inspectionEfficiency" column="inspection_efficiency" />
<result property="checkEffect" column="check_effect" />
<result property="checkQuality" column="check_quality" />
<result property="serviceExperience" column="service_experience" />
<result property="checkEffectiveness" column="check_effectiveness" />
<result property="proceduralLegality" column="procedural_legality" />
<result property="batchId" column="batch_id" />
<result property="satisfactionLevel" column="satisfaction_level" />
<result property="otherProblemSwitch" column="other_problem_switch" />
<result property="problem1" column="problem1" />
<result property="problem2" column="problem2" />
<result property="problem3" column="problem3" />
<result property="problem4" column="problem4" />
<result property="problem5" column="problem5" />
<result property="checkAttitude" column="check_attitude" />
</resultMap>
<resultMap type="com.zdxt.enforcementcode.domain.vo.StatisticsIndicatorPartVo" id="StatisticalVoResult">
<result property="createTime" column="create_time" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="name" column="name" />
</resultMap>
<sql id="selectEnforcementRegistrationVo"> <sql id="selectEnforcementRegistrationVo">
r.id, r.id,
r.law_enforcement as lawEnforcement, r.law_enforcement as lawEnforcement,

120
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/StatisticalPanelDistrictMapper.xml

@ -4,126 +4,6 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zdxt.enforcementcode.mapper.StatisticalPanelDistrictMapper"> <mapper namespace="com.zdxt.enforcementcode.mapper.StatisticalPanelDistrictMapper">
<resultMap type="com.zdxt.enforcementcode.domain.EnforcementRegistration" id="EnforcementRegistrationResult">
<result property="id" column="id" />
<result property="lawEnforcement" column="law_enforcement" />
<result property="lawEnforcementId" column="law_enforcement_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="enterpriseNumber" column="enterprise_number" />
<result property="enforcementTime" column="enforcement_time" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="lawEnforcer" column="law_enforcer" />
<result property="lawEnforcerId" column="law_enforcer_id" />
<result property="lawEnforcerTel" column="law_enforcer_tel" />
<result property="lawEnforcerTwo" column="law_enforcer_two" />
<result property="lawEnforcerIdTwo" column="law_enforcer_id_two" />
<result property="lawEnforcerTelTwo" column="law_enforcer_tel_two" />
<result property="subsidiaryer" column="subsidiaryer" />
<result property="subsidiaryerId" column="subsidiaryer_id" />
<result property="subsidiaryerTel" column="subsidiaryer_tel" />
<result property="lawEnforcementItem" column="law_enforcement_item" />
<result property="lawEnforcementItemText" column="law_enforcement_item_text" />
<result property="lawEnforcementBasis" column="law_enforcement_basis" />
<result property="lawEnforcementBasisText" column="law_enforcement_basis_text" />
<result property="remark" column="remark" />
<result property="reslut" column="reslut" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="isDelete" column="is_delete" />
<result property="status" column="status" />
<result property="lawEnforcementCode" column="law_enforcement_code" />
<result property="isComplaint" column="is_complaint" />
<result property="isSubmit" column="is_submit" />
<result property="uniteCheck" column="unite_check" />
<result property="enforce" column="enforce" />
<result property="checkCss" column="check_css" />
<result property="enforceReason" column="enforce_reason" />
<result property="lawField" column="law_field" />
<result property="checkCategory" column="check_category" />
<result property="bureauDeptId" column="bureau_dept_id" />
<result property="bureauDeptName" column="bureau_dept_name" />
<result property="isEvaluate" column="is_evaluate" />
<result property="lawId" column="law_id" />
<result property="lawText" column="law_text" />
<result property="numLeft" column="numLeft" />
<result property="numRight" column="numRight" />
<result property="unionNo" column="union_no" />
<result property="hasUnion" column="has_union" />
<result property="hasAuto" column="has_auto" />
<result property="lawEnforceCategory" column="law_enforce_category" />
<result property="entrustDeptId" column="entrust_dept_id" />
<result property="entrustDeptName" column="entrust_dept_name" />
<result property="enterpriseAddress" column="enterprise_address" />
<result property="district" column="district" />
<result property="street" column="street" />
</resultMap>
<resultMap type="com.zdxt.enforcementcode.domain.EnterpriseComplaint" id="EnterpriseComplaintResult">
<result property="id" column="id" />
<result property="relId" column="rel_id" />
<result property="enforceType" column="enforce_type" />
<result property="problemDescription" column="problem_description" />
<result property="enterpriseAddress" column="enterprise_address" />
<result property="linkman" column="linkman" />
<result property="linkmanTel" column="linkman_tel" />
<result property="comOrOpi" column="com_or_opi" />
<result property="authorization" column="authorization" />
<result property="createTime" column="create_time" />
<result property="proWoCode" column="pro_wo_code" />
<result property="enterpriseNumber" column="enterprise_number" />
<result property="enterpriseName" column="enterprise_name" />
<result property="status" column="status" />
<result property="evaluateTime" column="evaluate_time" />
<result property="complaintDepartments" column="complaint_departments" />
<result property="complaintDepartmentIds" column="complaint_department_ids" />
<result property="enforcementTime" column="enforcement_time" />
<result property="handleTime" column="handle_time" />
<result property="complaintType" column="complaint_type" />
<result property="complaintItemCodes" column="complaint_item_codes" />
<result property="complaintItemNames" column="complaint_item_names" />
<result property="complaintRecordItem" column="complaint_record_item" />
<result property="recordType" column="record_type" />
</resultMap>
<resultMap type="com.zdxt.enforcementcode.domain.EnterpriseEvaluate" id="EnterpriseEvaluateResult">
<result property="id" column="id" />
<result property="enforcementName" column="enforcement_name" />
<result property="enforcementId" column="enforcement_id" />
<result property="evaluateDescription" column="evaluate_description" />
<result property="linkman" column="linkman" />
<result property="linkmanTel" column="linkman_tel" />
<result property="authorization" column="authorization" />
<result property="createTime" column="create_time" />
<result property="enterpriseNumber" column="enterprise_number" />
<result property="enterpriseName" column="enterprise_name" />
<result property="inspectionEfficiency" column="inspection_efficiency" />
<result property="checkEffect" column="check_effect" />
<result property="checkQuality" column="check_quality" />
<result property="serviceExperience" column="service_experience" />
<result property="checkEffectiveness" column="check_effectiveness" />
<result property="proceduralLegality" column="procedural_legality" />
<result property="batchId" column="batch_id" />
<result property="satisfactionLevel" column="satisfaction_level" />
<result property="otherProblemSwitch" column="other_problem_switch" />
<result property="problem1" column="problem1" />
<result property="problem2" column="problem2" />
<result property="problem3" column="problem3" />
<result property="problem4" column="problem4" />
<result property="problem5" column="problem5" />
<result property="checkAttitude" column="check_attitude" />
</resultMap>
<resultMap type="com.zdxt.enforcementcode.domain.vo.StatisticsIndicatorPartVo" id="StatisticalVoResult">
<result property="createTime" column="create_time" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="name" column="name" />
</resultMap>
<sql id="selectEnforcementRegistrationVo"> <sql id="selectEnforcementRegistrationVo">
r.id, r.id,
r.law_enforcement as lawEnforcement, r.law_enforcement as lawEnforcement,

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

@ -29,13 +29,6 @@
<result property="qrCodeUrl" column="qr_code_url" /> <result property="qrCodeUrl" column="qr_code_url" />
</resultMap> </resultMap>
<resultMap type="com.zdxt.enforcementcode.domain.bo.StatisticsIndicatorPartBo" id="StatisticalVoResult">
<result property="createTime" column="create_time" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="name" column="name" />
</resultMap>
<select id="statisticalPanelDept" resultType="integer" parameterType="com.zdxt.enforcementcode.domain.bo.StatisticsIndicatorPartBo"> <select id="statisticalPanelDept" resultType="integer" parameterType="com.zdxt.enforcementcode.domain.bo.StatisticsIndicatorPartBo">
select count(*) from (select * from ZFZTJDM111915 group by CODE) x select count(*) from (select * from ZFZTJDM111915 group by CODE) x
</select> </select>
@ -122,7 +115,6 @@
<!-- 执法登记 --> <!-- 执法登记 -->
<select id="staisticalRegistration" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> <select id="staisticalRegistration" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer">
select count(1) from enforcement_registration r select count(1) from enforcement_registration r
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number -->
<where> <where>
and r.bureau_dept_name is not null and r.bureau_dept_name is not null
and r.is_submit = 1 and r.is_submit = 1
@ -143,15 +135,7 @@
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</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="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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(r.enforcement_time)=#{year} and YEAR(r.enforcement_time)=#{year}
</if> </if>
@ -168,14 +152,11 @@
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d')
</if> </if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
<!-- <if test="params.dataScope != null and params.dataScope != ''">-->
<!-- ${params.dataScope}-->
<!-- </if>-->
</where> </where>
</select> </select>
<select id="staisticalRegistration_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> <select id="staisticalRegistration_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double">
select count(1) from enforcement_registration r select count(1) from enforcement_registration r
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number -->
<where> <where>
and r.bureau_dept_name is not null and r.bureau_dept_name is not null
and r.is_submit = 1 and r.is_submit = 1
@ -197,14 +178,7 @@
<if test="uniteCheck == '1'.toString()"> and r.unite_check is 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 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="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(r.enforcement_time)+1=#{year} and YEAR(r.enforcement_time)+1=#{year}
</if> </if>
@ -228,7 +202,6 @@
</select> </select>
<select id="staisticalRegistration_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> <select id="staisticalRegistration_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double">
select count(1) from enforcement_registration r select count(1) from enforcement_registration r
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number -->
<where> <where>
and r.bureau_dept_name is not null and r.bureau_dept_name is not null
and r.is_submit = 1 and r.is_submit = 1
@ -250,14 +223,7 @@
<if test="uniteCheck == '1'.toString()"> and r.unite_check is 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 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="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(r.enforcement_time)+1=#{year} and YEAR(r.enforcement_time)+1=#{year}
</if> </if>
@ -283,7 +249,6 @@
<!-- 执法预告 --> <!-- 执法预告 -->
<select id="staisticalLawEnforcement" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> <select id="staisticalLawEnforcement" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer">
select count(1) from enterprise_law_enforcement n select count(1) from enterprise_law_enforcement n
<!-- left join (select * from enterprise_information group by enterprise_number) e on n.enterprise_number=e.enterprise_number -->
<where> <where>
and n.enterprise_number is not null and n.enterprise_number is not null
<if test="params.zone != null and params.zone != ''"> <if test="params.zone != null and params.zone != ''">
@ -293,14 +258,7 @@
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}) 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>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if> <if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(n.check_time)=#{year} and YEAR(n.check_time)=#{year}
</if> </if>
@ -324,7 +282,6 @@
</select> </select>
<select id="staisticalLawEnforcement_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> <select id="staisticalLawEnforcement_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double">
select count(1) from enterprise_law_enforcement n select count(1) from enterprise_law_enforcement n
<!-- left join (select * from enterprise_information group by enterprise_number) e on n.enterprise_number=e.enterprise_number -->
<where> <where>
and n.enterprise_number is not null and n.enterprise_number is not null
<if test="params.zone != null and params.zone != ''"> <if test="params.zone != null and params.zone != ''">
@ -335,14 +292,6 @@
</if> </if>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </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="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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(n.check_time)+1=#{year} and YEAR(n.check_time)+1=#{year}
</if> </if>
@ -366,7 +315,6 @@
</select> </select>
<select id="staisticalLawEnforcement_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> <select id="staisticalLawEnforcement_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double">
select count(1) from enterprise_law_enforcement n select count(1) from enterprise_law_enforcement n
<!-- left join (select * from enterprise_information group by enterprise_number) e on n.enterprise_number=e.enterprise_number -->
<where> <where>
and n.enterprise_number is not null and n.enterprise_number is not null
<if test="params.zone != null and params.zone != ''"> <if test="params.zone != null and params.zone != ''">
@ -377,14 +325,6 @@
</if> </if>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </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="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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(n.check_time)+1=#{year} and YEAR(n.check_time)+1=#{year}
</if> </if>
@ -410,7 +350,6 @@
<!-- 执法投诉 --> <!-- 执法投诉 -->
<select id="staisticalComplaint" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> <select id="staisticalComplaint" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer">
select count(1) from complaint_statistics c select count(1) from complaint_statistics c
<!-- left join (select * from enterprise_information group by enterprise_number) e on c.enterprise_number=e.enterprise_number -->
<where> <where>
and (c.rid is not null or c.complaint_department_id is not null) and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type is not null and c.enforce_type is not null
@ -422,14 +361,7 @@
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}) 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>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if> <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(c.complaint_time)=#{year} and YEAR(c.complaint_time)=#{year}
</if> </if>
@ -453,7 +385,6 @@
</select> </select>
<select id="staisticalComplaint_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> <select id="staisticalComplaint_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double">
select count(1) from complaint_statistics c select count(1) from complaint_statistics c
<!-- left join (select * from enterprise_information group by enterprise_number) e on c.enterprise_number=e.enterprise_number -->
<where> <where>
and (c.rid is not null or c.complaint_department_id is not null) and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type is not null and c.enforce_type is not null
@ -465,14 +396,7 @@
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}) 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>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if> <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(c.complaint_time)+1=#{year} and YEAR(c.complaint_time)+1=#{year}
</if> </if>
@ -496,7 +420,6 @@
</select> </select>
<select id="staisticalComplaint_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> <select id="staisticalComplaint_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double">
select count(1) from complaint_statistics c select count(1) from complaint_statistics c
<!-- left join (select * from enterprise_information group by enterprise_number) e on c.enterprise_number=e.enterprise_number -->
<where> <where>
and (c.rid is not null or c.complaint_department_id is not null) and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type is not null and c.enforce_type is not null
@ -508,14 +431,7 @@
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}) 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>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if> <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(c.complaint_time)+1=#{year} and YEAR(c.complaint_time)+1=#{year}
</if> </if>
@ -541,7 +457,6 @@
<!-- 执法预警 --> <!-- 执法预警 -->
<select id="staisticalWarning" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> <select id="staisticalWarning" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer">
select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w
<!-- left join (select * from enterprise_information group by enterprise_number) e on w.enterprise_number=e.enterprise_number -->
<where> <where>
and w.enterprise_number is not null and w.enterprise_number is not null
and warn_type = 1 and warn_type = 1
@ -549,14 +464,6 @@
<if test="deptId != null and deptId != ''"> <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}) 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>
<!-- <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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(w.create_time)=#{year} and YEAR(w.create_time)=#{year}
</if> </if>
@ -580,7 +487,6 @@
</select> </select>
<select id="staisticalWarning_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> <select id="staisticalWarning_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double">
select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w
<!-- left join (select * from enterprise_information group by enterprise_number) e on w.enterprise_number=e.enterprise_number -->
<where> <where>
and w.enterprise_number is not null and w.enterprise_number is not null
and warn_type = 1 and warn_type = 1
@ -588,14 +494,7 @@
<if test="deptId != null and deptId != ''"> <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}) 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>
<!-- <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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(w.create_time)+1=#{year} and YEAR(w.create_time)+1=#{year}
</if> </if>
@ -619,7 +518,6 @@
</select> </select>
<select id="staisticalWarning_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> <select id="staisticalWarning_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double">
select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w
<!-- left join (select * from enterprise_information group by enterprise_number) e on w.enterprise_number=e.enterprise_number -->
<where> <where>
and w.enterprise_number is not null and w.enterprise_number is not null
and warn_type = 1 and warn_type = 1
@ -627,14 +525,6 @@
<if test="deptId != null and deptId != ''"> <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}) 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>
<!-- <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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="dateType != null and dateType != '' and dateType == 'year' "> <if test="dateType != null and dateType != '' and dateType == 'year' ">
and YEAR(w.create_time)+1=#{year} and YEAR(w.create_time)+1=#{year}
</if> </if>
@ -767,7 +657,6 @@
<!-- 被检查企业次数排行 --> <!-- 被检查企业次数排行 -->
<select id="staisticalRegistration_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> <select id="staisticalRegistration_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map">
select r.enterprise_name, count(1) as num from enforcement_registration r select r.enterprise_name, count(1) as num from enforcement_registration r
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number -->
<where> <where>
and r.bureau_dept_name is not null and r.bureau_dept_name is not null
and r.is_submit = 1 and r.is_submit = 1
@ -785,35 +674,13 @@
<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})
</if> </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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="beginTime != null and beginTime != ''"> <if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime} and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime}
</if> </if>
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if> </if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and QUARTER(r.create_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and MONTH(r.create_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')-->
<!-- </if>-->
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''"> <if test="params.dataScope != null and params.dataScope != ''">
@ -828,7 +695,6 @@
<!-- 被投诉单位排行 --> <!-- 被投诉单位排行 -->
<select id="staisticalComplaint_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> <select id="staisticalComplaint_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map">
select c.complaint_department, count(1) as num from complaint_statistics c select c.complaint_department, count(1) as num from complaint_statistics c
<!-- left join (select * from enterprise_information group by enterprise_number) e on c.enterprise_number=e.enterprise_number -->
<where> <where>
and (c.rid is not null or c.complaint_department_id is not null) and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type is not null and c.enforce_type is not null
@ -837,35 +703,13 @@
<if test="deptId != null and deptId != ''"> <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}) 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>
<!-- <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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="beginTime != null and beginTime != ''"> <if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >=#{beginTime} and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >=#{beginTime}
</if> </if>
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if> </if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- and QUARTER(c.complaint_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- and MONTH(c.complaint_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_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}
@ -879,8 +723,7 @@
<!-- 执法检查数量排行 --> <!-- 执法检查数量排行 -->
<select id="staisticalBureau_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> <select id="staisticalBureau_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map">
select r.bureau_dept_name, count(1) as num from enforcement_registration r select r.bureau_dept_name, count(1) as num from enforcement_registration r
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number --> <where>
<where>
and r.bureau_dept_name is not null and r.bureau_dept_name is not null
and r.is_submit = 1 and r.is_submit = 1
and r.law_enforcement_id is not null and r.law_enforcement_id is not null
@ -897,35 +740,13 @@
<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})
</if> </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), '新区%'))-->
<!-- <if test="jd != null and jd != ''">-->
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or-->
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))-->
<!-- </if>-->
<!-- </if>-->
<if test="beginTime != null and beginTime != ''"> <if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime} and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime}
</if> </if>
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if> </if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and QUARTER(r.create_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and MONTH(r.create_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_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}
@ -976,21 +797,6 @@
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if> </if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and QUARTER(r.create_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and MONTH(r.create_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_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}
@ -1032,21 +838,7 @@
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%')) e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))
</if> </if>
</if> </if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and QUARTER(r.create_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(r.create_time)=#{year}-->
<!-- and MONTH(r.create_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')-->
<!-- </if>-->
<if test="beginTime != null and beginTime != ''"> <if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime} and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime}
</if> </if>
@ -1089,21 +881,7 @@
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime}
</if> </if>
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- and QUARTER(c.complaint_time)=#{quarter}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">-->
<!-- and YEAR(c.complaint_time)=#{year}-->
<!-- and MONTH(c.complaint_time)=#{month}-->
<!-- </if>-->
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">-->
<!-- and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')-->
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_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}
@ -1152,11 +930,10 @@
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
<!-- <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})
</if> </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') >= 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') >= 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 != ''">
@ -1231,11 +1008,9 @@
and r.enterprise_number is not null and r.enterprise_number is not null
and r.law_enforcer is not null and r.law_enforcer is not null
and r.bureau_dept_id 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 != ''"> <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})
</if> </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') >= 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') >= 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 != ''">
@ -1648,13 +1423,10 @@
and (c.rid is not null or c.complaint_department_id is not null) and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type is not null and c.enforce_type is not null
and c.enterprise_number is not null and c.enterprise_number is not null
<!-- <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 != ''"> <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}) 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>
<!-- <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>-->
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if> <if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(c.complaint_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(c.complaint_time,'%Y-%m-%d') </if> <if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d') </if>
<if test="params.dataScope != null and params.dataScope != ''"> <if test="params.dataScope != null and params.dataScope != ''">

Loading…
Cancel
Save