Browse Source

首页类型同步下

v6
蟑螂恶霸 1 year ago
parent
commit
6cada87dfc
  1. 14
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/home.html
  2. 29
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java
  3. 8
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

14
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/home.html

@ -126,7 +126,7 @@
<input type="text" class="layui-input" id="timeSelect" placeholder="时间筛选" /> <input type="text" class="layui-input" id="timeSelect" placeholder="时间筛选" />
</div> </div>
</div> </div>
<div class="link_btn"> <a href="/code/statisticalPanel/single-analysis">各市直执法单位综合分析</a> <a href="/code/statisticalPanel/overall-analysis"><span id="hasAll">各区执法单位综合分析</span></a> </div> <div class="link_btn"> <a href="/code/statisticalPanel/single-analysis" id="leftFlag">各市直执法单位综合分析</a> <a href="/code/statisticalPanel/overall-analysis"><span id="rightFlag">各区综合分析</span></a> </div>
<div class="count_box"> <div class="count_box">
<div class="count_item admin"> <div class="count_item admin">
<div class="count_tit"> <div class="count_tit">
@ -665,9 +665,17 @@
dataType: 'json', dataType: 'json',
contentType: "application/json", contentType: "application/json",
success: function (result) { success: function (result) {
if (1 == result.data.hasAll) { if (9 == result.data.roleFlag) {
$("#hasAll").text("各区执法综合分析") $("#leftFlag").hide();
$("#rightFlag").text(result.data.roleDept+"综合分析")
} else if (4 == result.data.roleFlag || 3 == result.data.roleFlag) {
$("#leftFlag").hide();
$("#rightFlag").text(result.data.roleDept+"综合分析")
} else if (1 == result.data.roleFlag) {
$("#leftFlag").text("各市值执法单位综合分析")
$("#rightFlag").text("各区直综合分析")
} }
non_jc_all = result.data.nonNum; non_jc_all = result.data.nonNum;
$("#jc_all").text(result.data.allNum); $("#jc_all").text(result.data.allNum);
$("#njc_all").text(result.data.nonNum); $("#njc_all").text(result.data.nonNum);

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

@ -1,6 +1,7 @@
package com.zdxt.code.controller; package com.zdxt.code.controller;
import com.zdxt.auth.dto.DeptBean; import com.zdxt.auth.dto.DeptBean;
import com.zdxt.auth.dto.UserBean;
import com.zdxt.auth.feign.DeptApi; import com.zdxt.auth.feign.DeptApi;
import com.zdxt.auth.feign.UserApi; import com.zdxt.auth.feign.UserApi;
import com.zdxt.auth.project.system.dict.service.IDictDataService; import com.zdxt.auth.project.system.dict.service.IDictDataService;
@ -227,9 +228,33 @@ public class StatisticalPanelController extends BaseController {
// 判断是不是司法局的人 // 判断是不是司法局的人
resMap.put("hasAll", 0); resMap.put("hasAll", 0);
DeptBean deptBean = deptApi.getDeptById(userApi.getCurrentUser().getDeptId()); UserBean ub = userApi.getCurrentUser();
DeptBean deptBean = deptApi.getDeptById(ub.getDeptId());
if (java.util.Objects.toString(deptBean.getZzDisplayPath(), "").contains("深圳市司法局")) { if (java.util.Objects.toString(deptBean.getZzDisplayPath(), "").contains("深圳市司法局")) {
resMap.put("hasAll", 1); // 市司法局
resMap.put("roleFlag", 99);
resMap.put("roleDept", deptBean.getDeptName());
} else if (java.util.Objects.toString(deptBean.getZzDisplayPath(), "").contains("司法局")) {
// 区司法局
resMap.put("roleFlag", 9);
String deptName = deptBean.getDeptName().replace("深圳市","").replace("司法局","");
resMap.put("roleDept", deptName);
} else {
deptBean = deptApi.iterationDeptParentToBureau(ub.getDeptId());
if (4 == deptBean.getZone()) {
// 街道
resMap.put("roleFlag", 4);
resMap.put("roleDept", deptBean.getDeptName());
} else if (3 == deptBean.getZone()) {
// 区直
resMap.put("roleFlag", 3);
resMap.put("roleDept", deptBean.getDeptName());
} else if (1 == deptBean.getZone()) {
// 市值
resMap.put("roleFlag", 1);
resMap.put("roleDept", deptBean.getDeptName());
}
// 迭代判断是否是区直
} }
// 全市行政检查数量 // 全市行政检查数量

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

@ -1975,9 +1975,9 @@
<!-- 行政检查类型统计 --> <!-- 行政检查类型统计 -->
<select id="analysis_registration_type" parameterType="SixAnalysisParams" resultType="map"> <select id="analysis_registration_type" parameterType="SixAnalysisParams" resultType="map">
select sdd.dict_label, count(r.check_category) as num from sys_dict_data sdd select sdd.dict_label, count(r.check_category) as num from sys_dict_data sdd
left join enforcement_registration r on r.check_category = sdd.dict_value left join enforcement_registration r on r.law_enforce_category = sdd.dict_value
<where> <where>
and sdd.dict_type = 'check_category' and sdd.dict_type = 'law_enforce_category'
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
@ -1986,7 +1986,7 @@
and r.law_enforcer is not null and r.law_enforcer is not null
and r.law_enforcer_two is not null and r.law_enforcer_two is not null
and r.is_complaint is not null and r.is_complaint is not null
and r.check_category is not null and r.law_enforce_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 != ''">
@ -2002,6 +2002,6 @@
${params.dataScope} ${params.dataScope}
</if> </if>
</where> </where>
group by r.check_category group by r.law_enforce_category
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save