Browse Source

综合分析 市 的提交(未完成)

v6
蟑螂恶霸 1 year ago
parent
commit
7681188ac5
  1. 6
      lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/IdCardCryptoUtil.java
  2. 8
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application.yml
  3. 166
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/single-analysis.html
  4. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java
  5. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java
  6. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/StatisticalPaneService.java
  7. 26
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java
  8. 74
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

6
lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/IdCardCryptoUtil.java

@ -35,12 +35,12 @@ public class IdCardCryptoUtil {
String userIdCode = IdCardCryptoUtil.symmetricEncryptIdCard("VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0", "123456789123456789");
String userNameCode = IdCardCryptoUtil.symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "汪鑫");
// String secret = IdCardCryptoUtil.symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "ae739d8c-86ed-4898-b57d-eed3be42debf");
// String secret = IdCardCryptoUtil.symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "439e0031b9b65409baf00447c24dc3e2");
// String phone = IdCardCryptoUtil.symmetricDecryptIdCard("VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0", "3qQTst9aURL3pN5EzKtqVJnQv2Q0Ob3r+Gc9DXX/I30=");
String phone = IdCardCryptoUtil.symmetricDecryptIdCard("VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0", "AoQTc5m7o+maPsiYiikzYA==");
String phone = IdCardCryptoUtil.symmetricDecryptIdCard("VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0", "KhuopMQUFOBBxWMHlfjUkP8USnpWP93VYayhcB9l84g=");
// System.out.println(userIdCode);
System.out.println(userIdCode);
System.out.println(phone);
// System.out.println(userNameCode);
//// System.out.println(secret);

8
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application.yml

@ -81,12 +81,12 @@ spring:
# 启用cas单点登录环境
# - cas
# 启用mysql版本
- druidDev
- dev
# - druidDev
# - dev
# - druidTest
# - test
# - druidPro
# - pro
- druidPro
- pro
#分布式任务中心
# - job

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

@ -32,31 +32,146 @@
<label class="select_time">2025年第1季度<a></a></label>
<span>综合数据</span></div>
</div>
<div class="data_cont" id = "sixIndicators"></div>
<div class="data_cont" id = "sixIndicators">
<div class="data_item">
<div class="cont-title">涉企检查数量</div>
<div class="cont-total"><b><span id="regis-total">-</span></b>
<div class="nece-data">
<div class="percent-tag">
<label id="">昨日</label>
<span class="data-change" id="">-</span> </div>
<div class="percent-tag">
<label id="">本月</label>
<span class="data-change" id="">-</span> </div>
</div>
</div>
<div class="percent-tag">
<label id="">同比</label>
<span class="data-rise" id=""><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id="" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
<div class="percent-tag">
<label id="">环比</label>
<span class="data-rise" id="" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id=""><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
</div>
<div class="data_item">
<div class="cont-title">联合检查数量</div>
<div class="cont-total"><b><span id="joint-total">-</span></b>
<div class="nece-data">
<div class="percent-tag">
<label id="">昨日</label>
<span class="data-change" id="">-</span> </div>
<div class="percent-tag">
<label id="">本月</label>
<span class="data-change" id="">-</span> </div>
</div>
</div>
<div class="percent-tag">
<label id="">同比</label>
<span class="data-rise" id=""><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id="" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
<div class="percent-tag">
<label id="">环比</label>
<span class="data-rise" id="" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id=""><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
</div>
<div class="data_item">
<div class="cont-title">行政检查预告数量</div>
<div class="cont-total"><b><span id="notice-total">-</span></b>
<div class="nece-data">
<div class="percent-tag">
<label id="">昨日</label>
<span class="data-change" id="">-</span> </div>
<div class="percent-tag">
<label id="">本月</label>
<span class="data-change" id="">-</span> </div>
</div>
</div>
<div class="percent-tag">
<label id="">同比</label>
<span class="data-rise" id=""><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id="" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
<div class="percent-tag">
<label id="">环比</label>
<span class="data-rise" id="" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id=""><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
</div>
<div class="data_item">
<div class="cont-title">涉企投诉数量</div>
<div class="cont-total"><b><span id="regis-total">-</span></b>
<div class="nece-data">
<div class="percent-tag">
<label id="">昨日</label>
<span class="data-change" id="">-</span> </div>
<div class="percent-tag">
<label id="">本月</label>
<span class="data-change" id="">-</span> </div>
</div>
</div>
<div class="percent-tag">
<label id="">同比</label>
<span class="data-rise" id=""><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id="" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
<div class="percent-tag">
<label id="">环比</label>
<span class="data-rise" id="" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id=""><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
</div>
<div class="data_item">
<div class="cont-title">执法预警数量</div>
<div class="cont-total"><b><span id="regis-total">-</span></b>
<div class="nece-data">
<div class="percent-tag">
<label id="">昨日</label>
<span class="data-change" id="">-</span> </div>
<div class="percent-tag">
<label id="">本月</label>
<span class="data-change" id="">-</span> </div>
</div>
</div>
<div class="percent-tag">
<label id="">同比</label>
<span class="data-rise" id=""><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id="" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
<div class="percent-tag">
<label id="">环比</label>
<span class="data-rise" id="" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id=""><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
</div>
<div class="data_item">
<div class="cont-title">企业数量</div>
<div class="cont-total"><b><span id="regis-total">-</span></b>
<div class="nece-data">
<div class="percent-tag">
<label id="">昨日</label>
<span class="data-change" id="">-</span> </div>
<div class="percent-tag">
<label id="">本月</label>
<span class="data-change" id="">-</span> </div>
</div>
</div>
<div class="percent-tag">
<label id="">同比</label>
<span class="data-rise" id=""><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id="" style="display: none;"><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
<div class="percent-tag">
<label id="">环比</label>
<span class="data-rise" id="" style="display: none;"><i class="fa fa fa-long-arrow-up"></i></span> <span class="data-fall" id=""><i class="fa fa fa-long-arrow-down"></i></span> <span class="data-change" id="">-%</span> </div>
</div>
</div>
<div class="echarts_box">
<div class="inner">
<div class="twobox">
<div class="data_cont threebox">
<h3 class="chart_tit">行政检查类别及占比</h3>
<div class="count_wrap">
<div class="count_wrap" id="check_category">
<div class="count_item">
<label>日常检查</label>
<span class="number_count">1024</span><span class="number_percent">42.68%</span></div>
<span class="number_count">-</span><span class="number_percent">-%</span></div>
<div class="count_item">
<label>上级交办</label>
<span class="number_count">1024</span><span class="number_percent">42.68%</span></div>
<span class="number_count">-</span><span class="number_percent">-%</span></div>
<div class="count_item">
<label>其他机关移送</label>
<span class="number_count">1024</span><span class="number_percent">42.68%</span></div>
<span class="number_count">-</span><span class="number_percent">-%</span></div>
<div class="count_item">
<label>重点领域治理</label>
<span class="number_count">1024</span><span class="number_percent">42.68%</span></div>
<span class="number_count">-</span><span class="number_percent">-%</span></div>
<div class="count_item">
<label>投诉举报</label>
<span class="number_count">1024</span><span class="number_percent">42.68%</span></div>
<span class="number_count">-</span><span class="number_percent">-%</span></div>
<div class="count_item">
<label>其他</label>
<span class="number_count">1024</span><span class="number_percent">42.68%</span></div>
<span class="number_count">-</span><span class="number_percent">-%</span></div>
</div>
</div>
@ -153,13 +268,14 @@
$(function(){
sixIndicators();
checkCategory();
});
function sixIndicators() {
$.ajax({
url: ctx + "code/statisticalPanel/sixIndicators",
type: "get",
data: {dateType: "year", year:"2025"},
data: {dateType: "year", year:"2025", params:{"zone":1}},
success: function(res) {
if(res.success) {
const indicators = res.data;
@ -204,9 +320,35 @@
});
}
$('.fold_cont dd:first').addClass('selchk');//给第一个dd追加
//each遍历元素
function checkCategory() {
$.ajax({
url: ctx + "code/statisticalPanel/staisticalCheck_category",
type: "get",
data: {dateType: "year", year:"2025"},
success: function(res) {
console.log(res);
if(res.success) {
var html = "";
const datas = res.data;
for(var i=0; i<datas.length; i++) {
html += '<div class="count_item">'
html += ' <label>'+datas[i].category+'</label>'
html += ' <span class="number_count">'+datas[i].num+'</span>'
html += ' <span class="number_percent">'+datas[i].per+'</span>'
html += '</div>'
}
$("#check_category").html(html);
}
},
error: function (error) {
$.modal.alertWarning("获取分析数据失败。");
}
});
}
$('.fold_cont dd:first').addClass('selchk');//给第一个dd追加
//each遍历元素
$(".fold_cont dd").each(function () {
$(this).click(function () { //点击事件
//当点击自身的时候添加,及删除同级的

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

@ -145,6 +145,12 @@ public class StatisticalPanelController extends BaseController {
return ZDResponse.success("被检查企业次数排行", statisticalPaneService.staisticalBureau_order(params));
}
@GetMapping("/staisticalCheck_category")
@ResponseBody
public ZDResponse staisticalCheck_category(SixAnalysisParams params){
return ZDResponse.success("行政检查类别及占比", statisticalPaneService.staisticalCheck_category(params));
}

4
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java

@ -106,4 +106,8 @@ public interface StatisticalPanelMapper {
List<Map<String, Object>> staisticalRegistration_order(SixAnalysisParams params);
List<Map<String, Object>> staisticalComplaint_order(SixAnalysisParams params);
List<Map<String, Object>> staisticalBureau_order(SixAnalysisParams params);
/** 检查类别 */
List<Map<String, Object>> staisticalCheck_category(SixAnalysisParams params);
}

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/StatisticalPaneService.java

@ -57,5 +57,7 @@ public interface StatisticalPaneService {
List<Map<String, Object>> staisticalComplaint_order(SixAnalysisParams params);
List<Map<String, Object>> staisticalBureau_order(SixAnalysisParams params);
/** 检查类别 */
List<Map<String, Object>> staisticalCheck_category(SixAnalysisParams params);
}

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

@ -828,6 +828,32 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
return statisticalPanelMapper.staisticalBureau_order(params);
}
@Override
public List<Map<String, Object>> staisticalCheck_category(SixAnalysisParams params) {
List<Map<String, Object>> results = new ArrayList<>();
List<DictData> checkCategory = iDictDataService.selectDictDataByType("check_category");
List<Map<String, Object>> tmpMaps = statisticalPanelMapper.staisticalCheck_category(params);
double total = 0;
for (DictData dict : checkCategory) {
Map<String, Object> info = new HashMap<>();
info.put("category", dict.getDictLabel());
info.put("num", 0);
for(Map<String, Object> tmpMap : tmpMaps) {
if (dict.getDictValue().equals(tmpMap.get("category").toString())) {
info.put("num", tmpMap.get("num"));
total+= Integer.parseInt(tmpMap.get("num").toString());
break;
}
}
results.add(info);
}
for (Map<String, Object> tmpMap : results) {
double per = Double.parseDouble(tmpMap.get("num").toString()) / total * 100;
tmpMap.put("per", String.format("%.2f", per)+"%");
}
return results;
}
/**
* 计算环比增长率
* @param currentPeriodValue 当期数值

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

@ -108,6 +108,9 @@
and r.is_complaint is not null
and r.check_category 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="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
@ -150,6 +153,9 @@
and r.is_complaint is not null
and r.check_category 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="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
@ -192,6 +198,9 @@
and r.is_complaint is not null
and r.check_category 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="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
@ -228,6 +237,9 @@
left join (select * from enterprise_information group by enterprise_number) e on n.enterprise_number=e.enterprise_number
<where>
and n.enterprise_number is not null
<if test="params.zone != null and params.zone != ''">
and n.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
@ -260,6 +272,9 @@
left join (select * from enterprise_information group by enterprise_number) e on n.enterprise_number=e.enterprise_number
<where>
and n.enterprise_number is not null
<if test="params.zone != null and params.zone != ''">
and n.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
@ -292,6 +307,9 @@
left join (select * from enterprise_information group by enterprise_number) e on n.enterprise_number=e.enterprise_number
<where>
and n.enterprise_number is not null
<if test="params.zone != null and params.zone != ''">
and n.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone})
</if>
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
@ -328,6 +346,9 @@
and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type 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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and c.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
@ -362,6 +383,9 @@
and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type 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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and c.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
@ -396,6 +420,9 @@
and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type 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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and c.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
@ -752,4 +779,51 @@
group by r.bureau_dept_id order by num desc
</select>
<select id="staisticalCheck_category" parameterType="SixAnalysisParams" resultType="map">
select r.check_category as category, 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>
and r.bureau_dept_name is not null
and r.law_enforcement_id is not null
and r.enterprise_name is not null
and r.enterprise_number is not null
and r.law_enforcer is not null
and r.law_enforcer_two is not null
and r.is_complaint is not null
and r.check_category is not null
and r.bureau_dept_id is not null
<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="uniteCheck == '0'.toString()"> and r.unite_check is not null</if>
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{userId}) </if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if>
<if test="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
<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' ">
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>
</where>
group by r.check_category
</select>
</mapper>
Loading…
Cancel
Save