zouyx 2 years ago
parent
commit
e1752aa95c
  1. 14
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/fragmentW.html
  2. 171
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/statisticsWarning.html
  3. 28
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
  4. 147
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html
  5. 14
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/enterpriseFragment.html
  6. 296
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html
  7. 9
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
  8. 131
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java
  9. 11
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java
  10. 278
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java
  11. 139
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsWarningController.java
  12. 18
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseInformation.java
  13. 8
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticsIndicator.java
  14. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnterpriseInformationMapper.java
  15. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/LawEnforcementWarningListMapper.java
  16. 3
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java
  17. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ILawEnforcementWarningListService.java
  18. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/StatisticalPaneService.java
  19. 14
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java
  20. 5
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/LawEnforcementWarningListServiceImpl.java
  21. 8
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneImpl.java
  22. 1
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  23. 16
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml
  24. 23
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/LawEnforcementWarningListMapper.xml

14
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/fragmentW.html

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<li id="fragmentW" th:fragment="fragmentW">
<p th:text="|${year}年|"></p>
<p th:text="|投诉数量 ${Number1}|"></p>
<p th:text="|投诉对象 ${Number2}|"></p>
</li>
</head>
<body>
</body>
</html>

171
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/statisticsWarning.html

@ -0,0 +1,171 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('执法预警统计')"/>
<link type="text/css" href="/css/stat1.css" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<p>执法部门:</p>
<input type="text" name="bureauDeptId"/>
</li>
<li>
<p>企业名称:</p>
<input type="text" name="name"/>
</li>
<li>
<p>时段:</p>
<select id="year" name="year">
<!--<option value="2024">2024</option>-->
<option th:each="y:${yearList}" th:text="${y}" th:value="${y}"></option>
</select>
<select id="dateSearch" name="dateSearch" onchange="timeType()">
<option value="year">年度</option>
<option value="quarter">季度</option>
<option value="month">月度</option>
</select>
<select id="quarter" name="quarter">
<option value="">所有</option>
<option value="1">第一季度</option>
<option value="2">第二季度</option>
<option value="3">第三季度</option>
<option value="4">第四季度</option>
</select>
<select id="month" name="month">
<option value="">所有</option>
<option value="01">1月</option>
<option value="02">2月</option>
<option value="03">3月</option>
<option value="04">4月</option>
<option value="05">5月</option>
<option value="06">6月</option>
<option value="07">7月</option>
<option value="08">8月</option>
<option value="09">9月</option>
<option value="10">10月</option>
<option value="11">11月</option>
<option value="12">12月</option>
</select>
</li>
<li>
<a class="btn btn-success btn-rounded btn-sm" onclick="searchW()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-rounded btn-sm" onclick="restW()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-download btn-rounded btn-sm" onclick="download1()"><i class="fa fa-download"></i>导出</a>
</li>
</ul>
<ul>
<li id="fragmentW" th:fragment="fragmentW">
<p th:text="|${year}年|"></p>
<p th:text="|投诉数量 ${Number1}|"></p>
<p th:text="|投诉对象 ${Number2}|"></p>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="zdxtInclude :: footer" />
<script th:inline="javascript">
var prefix = ctx + "code/statisticsWarning";
window.onload=function (){
wTable();
$("#quarter").hide();
$("#month").hide();
}
$(function() {
var options = {
modalName: "执法预警统计",
showHeader: true,
showFooter: true,
showColumns: false,
showRefresh: false,
showToggle: false,
pagination: true,
pageSize: 10,
pageList: [10, 25, 50],
//quarterBoolean:quarterBoolean,
columns: [
{
field : 'enforcementDepartment',
title : '执法部门'
},
{
field : 'enterpriseName',
title : '企业名称'
},
{
field : 'warningCause',
title : '原因'
},
{
field : 'enforcementNumber',
title : '预警次数'
}
]
}
$("#bootstrap-table").bootstrapTable(options);
});
function searchW () {
wTable()
var currentId = $('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
$.ajax({
url: prefix + '/searchType',
type: 'GET',
data: params,
success: function (response) {
$('#fragmentW').html(response);
}
})
}
function wTable(){
var currentId=$('form').eq(0).attr('id')
var params = $.common.formToJSON(currentId);
$.ajax({
url: prefix + "/list",
method: 'post',
data:params,
success:function (response){
$('#bootstrap-table').bootstrapTable('load', response);
},error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
function restW(){
$('form').eq(0).trigger("reset");
console.log($.common.formToJSON($('form').eq(0).attr('id')));
searchW();
timeType();
}
function timeType() {
var dateSearch = document.getElementById("dateSearch");
console.log(dateSearch.value)
if(dateSearch.value=="quarter"){
$("#quarter").show();
$("#month").hide();
document.getElementById("month").value="";
}else if(dateSearch.value=="month"){
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").show();
}else {
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").hide();
document.getElementById("month").value="";
}
}
</script>

28
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html

@ -41,7 +41,8 @@
<li>
<p>时段:</p>
<select id="year" name="year">
<option value="2024">2024</option>
<!--<option value="2024">2024</option>-->
<option th:each="y:${yearList}" th:text="${y}" th:value="${y}"></option>
</select>
<select id="dateSearch" name="dateSearch" onchange="timeType1()" >
<option value="year">年度</option>
@ -75,6 +76,7 @@
<a class="btn btn-success btn-rounded btn-sm" onclick="searchComplaint1()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-rounded btn-sm" onclick="complaintRest(1)"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-download btn-rounded btn-sm" onclick="complaintDownload1()"><i class="fa fa-download"></i>导出</a>
<a id="closeButton" onclick="closeC()">关闭</a>
</li>
<ul>
<li id="complaintA" th:fragment="complaintA">
@ -87,7 +89,9 @@
</div>
</form>
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table>
<div id="detail" style="width: 500px; margin-left: 528px;margin-top: 111px;position: absolute;">
<table id="bootstrap-table"></table>
</div>
<table id="bootstrap-table1"></table>
</div>
</div>
@ -98,7 +102,8 @@
<li>
<p>时段:</p>
<select id="year2" name="year">
<option value="2024">2024</option>
<!--<option value="2024">2024</option>-->
<option th:each="y:${yearList}" th:text="${y}" th:value="${y}"></option>
</select>
<select id="dateSearch2" name="dateSearch" onchange="timeType2()" >
<option value="year">年度</option>
@ -144,9 +149,9 @@
</div>
</form>
<div >
<table id="bootstrap-table2" style="width: 550px;margin-left:0px"></table>
<div id="container" style="width: 700px;height:550px;margin-right:0px"></div>
<div>
<table id="bootstrap-table2" style="width: 550px;"></table>
<div id="container" style="width: 700px;height:550px;"></div>
</div>
</div>
</div>
@ -165,7 +170,8 @@
$("#month").hide();
$("#quarter2").hide();
$("#month2").hide();
$("#bootstrap-table").hide();
$('#detail').hide();
$('#closeButton').hide();
rTable1();
rTable("formId",2)
}
@ -445,13 +451,19 @@
success:function (response){
console.log(response);
debugger
$('#bootstrap-table').show();
$('#closeButton').show();
$('#detail').show();
$('#bootstrap-table').bootstrapTable('load', response);
},error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
function closeC(){
debugger
$('#closeButton').hide();
$('#detail').hide();
}
function complaintRest(n){
$('form').eq(n-1).trigger("reset");
searchComplaint("formId",n)

147
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html

@ -139,48 +139,52 @@
</div>
</div>
<div id="one-tab2" class="tab-content">
<form id="formId2">
<div class="select-list">
<ul>
<li>
<p>时段:</p>
<select id="year2" name="year">
<option value="2024">2024</option>
</select>
<select id="dateSearch2" name="dateSearch" onchange="timeType2()">
<option value="year">年度</option>
<option value="quarter">季度</option>
<option value="month">月度</option>
</select>
<select id="quarter2" name="quarter">
<option value="">所有</option>
<option value="1">第一季度</option>
<option value="2">第二季度</option>
<option value="3">第三季度</option>
<option value="4">第四季度</option>
</select>
<select id="month2" name="month">
<option value="">所有</option>
<option value="01">1月</option>
<option value="02">2月</option>
<option value="03">3月</option>
<option value="04">4月</option>
<option value="05">5月</option>
<option value="06">6月</option>
<option value="07">7月</option>
<option value="08">8月</option>
<option value="09">9月</option>
<option value="10">10月</option>
<option value="11">11月</option>
<option value="12">12月</option>
</select>
</li>
</ul>
</div>
<a class="btn btn-success btn-rounded btn-sm" onclick="search2()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-rounded btn-sm" onclick="rest2()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</form>
<div id="container1" style="width: 550px;height:550px;margin-right:0px"></div>
<div style="display: grid;grid-template-columns: 1fr 1fr;gap: 10px;">
<div>
<form id="formId2">
<div class="select-list">
<ul>
<li>
<p>时段:</p>
<select id="year2" name="year">
<!--<option value="2024">2024</option>-->
<option th:each="y:${yearList}" th:text="${y}" th:value="${y}"></option>
</select>
<select id="dateSearch2" name="dateSearch" onchange="timeType2()">
<option value="year">年度</option>
<option value="quarter">季度</option>
<option value="month">月度</option>
</select>
<select id="quarter2" name="quarter">
<option value="">所有</option>
<option value="1">第一季度</option>
<option value="2">第二季度</option>
<option value="3">第三季度</option>
<option value="4">第四季度</option>
</select>
<select id="month2" name="month">
<option value="">所有</option>
<option value="01">1月</option>
<option value="02">2月</option>
<option value="03">3月</option>
<option value="04">4月</option>
<option value="05">5月</option>
<option value="06">6月</option>
<option value="07">7月</option>
<option value="08">8月</option>
<option value="09">9月</option>
<option value="10">10月</option>
<option value="11">11月</option>
<option value="12">12月</option>
</select>
</li>
</ul>
</div>
<a class="btn btn-success btn-rounded btn-sm" onclick="search2()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-rounded btn-sm" onclick="rest2()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</form>
<div id="container1" style="width: 500px;height:500px;margin-right:0px"></div>
</div>
<div id="container2" style="width: 550px;height:550px;margin-right:0px"></div>
</div>
</div>
@ -205,7 +209,12 @@
var searchType;
var rowData=[];
var echart1=echarts.init(document.getElementById('container1'));
/*var chart2=echarts.inint(document.getElementById('container2'))*/
var echart2=echarts.init(document.getElementById('container2'));
var echart3=echarts.init(document.getElementById('container3'));
var echart4=echarts.init(document.getElementById('container4'));
var currentYear = new Date().getFullYear();
var currentMonth = new Date().getMonth()+1;
var currentQuarter=quarterMake(currentMonth);
//console.log(uniteNumber);
//console.log(checkCategory);
window.onload = function () {
@ -215,7 +224,10 @@
$("#month2").hide();
rTable();
echarts1();
};
echarts2();
echarts3();
echarts4();
}
$(function() {
var options = {
modalName: "执法记录统计",
@ -230,7 +242,7 @@
//quarterBoolean:quarterBoolean,
columns: [
{
field : 'lawEnforcement',
field : 'bureauDeptName',
title : '执法部门'
},
{
@ -335,13 +347,15 @@
color:['#1874CD','#3A5FCD','#436EEE','#4876FF','#1E90FF','#63B8FF'],
tooltip: {},
legend: {
top:'1%',
data: ['投诉类型统计']
},
series: [
{
name: '投诉类型统计',
type: 'pie',
radius: ['40%', '70%'],
radius: ['15%', '30%'],
center:['50%','50%'],
data: response,
label: {
show: true,
@ -377,14 +391,43 @@
var dateSearch = document.getElementById("dateSearch");
console.log(dateSearch.value);
if(dateSearch.value=="quarter"){
$("#year").show();
if(document.getElementById("year").value==''){
document.getElementById("year").value=currentYear;
}
$("#select-time").hide();
document.getElementById("startTime").value="";
document.getElementById("endTime").value="";
$("#quarter").show();
$("#month").hide();
document.getElementById("month").value="";
}else if(dateSearch.value=="month"){
$("#year").show();
if(document.getElementById("year").value==''){
document.getElementById("year").value=currentYear;
}
$("#select-time").hide();
document.getElementById("startTime").value="";
document.getElementById("endTime").value="";
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").show();
}else if(dateSearch.value=="select-time"){
$("#select-time").show();
$("#year").hide();
document.getElementById("year").value="";
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").hide();
document.getElementById("month").value="";
}else {
$("#year").show();
if(document.getElementById("year").value==''){
document.getElementById("year").value=currentYear;
}
$("#select-time").hide();
document.getElementById("startTime").value="";
document.getElementById("endTime").value="";
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").hide();
@ -523,6 +566,18 @@
}
var encodedUri=encodeURI(csvContent);
var link=do*/
function quarterMake(month){
let quarter=Math.ceil(month);
if(quarter==1){
return"第一季度";
}else if(quarter==2){
return"第二季度";
}else if(quarter==3){
return"第三季度";
}else if(quarter==4){
return"第四季度";
}
}
</script>
</body>
</html>

14
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/enterpriseFragment.html

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<li th:fragment="enterpriseFragment">
<p th:text="|${year}年|"></p>
<p th:text="|企业数量 ${number2}|"></p>
<p th:text="|占比总计 ${number3}|"></p>
</li>
</head>
<body>
</body>
</html>

296
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html

@ -0,0 +1,296 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('企业统计')"/>
<link type="text/css" href="/css/stat1.css" rel="stylesheet"/>
<style>
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
</style>
</head>
<body>
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<div class="statit">
<span id="one1" class="actit" onclick="setTab('one',1,2)">企业数量统计</span>
<span id="one2" onclick="setTab('one',2,2)">企业类型统计</span>
</div>
<div id="one-tab1" class="tab-content active">
<div>
<p th:text="全市"></p>
<p th:text="|企业数量 ${number}|"></p>
<p th:text="|续存企业数量 ${exist}|"></p>
<p th:text="|注销企业数量 ${logout}|"></p>
<a class="btn btn-download btn-rounded btn-sm" onclick="complaintDownload1()"><i class="fa fa-download"></i>导出</a>
</div>
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table1"></table>
</div>
</div>
<div id="one-tab2" class="tab-content">
<form id="formId2">
<div class="select-list">
<ul>
<li>
<p>时段:</p>
<select id="year2" name="year">
<!--<option value="2024">2024</option>-->
<option th:each="y:${yearList}" th:text="${y}" th:value="${y}"></option>
</select>
<select id="dateSearch2" name="dateSearch" onchange="timeType2()" ><!--创建时间-->
<option value="year">年度</option>
<option value="quarter">季度</option>
<option value="month">月度</option>
</select>
<select id="quarter2" name="quarter">
<option value="">所有</option>
<option value="1">第一季度</option>
<option value="2">第二季度</option>
<option value="3">第三季度</option>
<option value="4">第四季度</option>
</select>
<select id="month2" name="month">
<option value="">所有</option>
<option value="01">1月</option>
<option value="02">2月</option>
<option value="03">3月</option>
<option value="04">4月</option>
<option value="05">5月</option>
<option value="06">6月</option>
<option value="07">7月</option>
<option value="08">8月</option>
<option value="09">9月</option>
<option value="10">10月</option>
<option value="11">11月</option>
<option value="12">12月</option>
</select>
</li>
<li>
<a class="btn btn-success btn-rounded btn-sm" onclick="eSearch2()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-rounded btn-sm" onclick="eRest2()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-download btn-rounded btn-sm" onclick="complaintDownload(2)"><i class="fa fa-download"></i>下载</a>
</li>
</ul>
<ul>
<li id="enterpriseFragment" th:fragment="enterpriseFragment">
<p th:text="|${year}年|"></p>
<p th:text="|企业数量 ${number2}|"></p>
<p th:text="|占比总计 ${number3}|"></p>
</li>
</ul>
</div>
</form>
<div>
<table id="bootstrap-table2" style="width: 550px;"></table>
<div id="container" style="width: 700px;height:550px;"></div>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="zdxtInclude :: footer"/>
<th:block th:include="zdxtInclude ::echarts-js"/>
<script th:inline="javascript">
var prefix = ctx + "code/statisticsEnterprise";
var myChart = echarts.init(document.getElementById('container'));
window.onload = function () {
$("#quarter2").hide();
$("#month2").hide();
eTable1();
eTable2();
}
$(function() {
var options1 = {
modalName: "企业统计",
showHeader: true,
showFooter: false,
showColumns: false,
showRefresh: false,
showToggle: false,
/*pagination: true,
pageSize: 10,
pageList: [10, 25, 50],*/
//quarterBoolean:quarterBoolean,
columns: [
{
field : 'name',
title : '区域',
formatter:function (value,row,index) {
return '<span ONCLICK="jd(\'' + value + '\')">'+value+'</span>';
}
},
{
field : 'totalNumber',
title : '企业数量',
},
{
field : 'numInt',
title : '续存企业数量',
},
{
field : 'value',
title : '注销企业数量',
}
]
};
$("#bootstrap-table1").bootstrapTable(options1);
});
$(function() {
var options2 = {
modalName: "投诉类型统计",
showHeader: true,
showFooter: false,
showColumns: false,
showRefresh: false,
showToggle: false,
//quarterBoolean:quarterBoolean,
columns: [
{
field : 'name',
title : '企业类型'
},
{
field : 'value',
title : '企业数量'
},
{
field : 'percentage',
title : '占比'
},
]
}
$("#bootstrap-table2").bootstrapTable(options2);
});
function setTab(prefix, num, total) {
console.log( document.getElementById(`${prefix}1`))
for (let i = 1; i <= total; i++) {
document.getElementById(`${prefix}${i}`).classList.remove('actit');
document.getElementById(`${prefix}-tab${i}`).classList.remove('active');
}
document.getElementById(`${prefix}${num}`).classList.add('actit');
document.getElementById(`${prefix}-tab${num}`).classList.add('active');
}
function eTable1(){
/*var currentId=$('form').eq(0).attr('id')
var params = $.common.formToJSON(currentId);*/
$.ajax({
url: prefix + "/listQY",
method: 'GET',
success:function (response){
console.log(response);
$('#bootstrap-table1').bootstrapTable('load', response);
},error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
function eTable2(){
var currentId=$('form').eq(1).attr('id')
var params = $.common.formToJSON(currentId);
$.ajax({
url: prefix + "/type",
method: 'GET',
data:params,
success:function (response){
$('#bootstrap-table2').bootstrapTable('load', response);
var option3 = {
color:['#1874CD','#3A5FCD','#436EEE','#4876FF','#1E90FF'],
tooltip: {},
legend: {
data: ['投诉类型统计']
},
series: [
{
name: '投诉类型统计',
type: 'pie',
radius: ['40%', '70%'],
data: response,
label: {
show: true,
formatter: function (arg) {
console.log(arg);
return arg.name + " " + arg.value + " " + arg.percent + "%";
}
},
}
]
}
myChart.setOption(option3);
debugger;
},error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
function eSearch2 () {
eTable2();
var currentId=$('form').eq(1).attr('id');
var params = $.common.formToJSON(currentId);
$.ajax({
url:prefix+'/searchType',
type:'GET',
data:params,
success: function (response) {
$('#enterpriseFragment').html(response);
}
})
};
function jd(n){
let nameData={};
nameData.name=n;
console.log(n)
console.log(nameData)
$.ajax({
url:prefix+'/listJD',
type:'GET',
data:nameData,
success:function (response){
console.log(response)
},error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
function timeType2() {
var dateSearch = document.getElementById("dateSearch2");
console.log(dateSearch.value)
if(dateSearch.value=="quarter"){
$("#quarter2").show();
$("#month2").hide();
document.getElementById("month2").value="";
}else if(dateSearch.value=="month"){
$("#quarter2").hide();
document.getElementById("quarter2").value="";
$("#month2").show();
}else {
debugger
$("#quarter2").hide();
document.getElementById("quarter2").value="";
$("#month2").hide();
document.getElementById("month2").value="";
}
}
function eRest2(){
$('form').eq(1).trigger("reset");
eSearch2();
timeType2();
}
</script>
</body>
</html>

9
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java

@ -53,6 +53,7 @@ public class ComplaintStaticController extends BaseController {
LocalDate endTime = localDate.withYear(Integer.valueOf(localDate.getYear())).withMonth(12).with(TemporalAdjusters.lastDayOfMonth());
complaintStatistics.setBeginTime(str.format(beginTime));
complaintStatistics.setEndTime(str.format(endTime));
model.addAttribute("yearList",yearMake());
model.addAttribute("year",localDate.getYear());
model.addAttribute("Number1",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());
model.addAttribute("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size());
@ -200,4 +201,12 @@ public class ComplaintStaticController extends BaseController {
}
return complaintStatistics;
}
public List<Integer> yearMake(){
int current=LocalDate.now().getYear();
List<Integer> yearList=new ArrayList<>();
for(int i=current;i>=2023;i--){
yearList.add(i);
}
return yearList;
}
}

131
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

@ -1,12 +1,10 @@
package com.zdxt.code.controller;
import java.lang.reflect.Array;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -74,6 +72,7 @@ public class EnforcementRegistrationController extends BaseController
List<EnforcementRegistration> uniteList=list.stream().filter(item->item.getUniteCheck()!=null&&!"".equals(item.getUniteCheck())).collect(Collectors.toList());
List<EnforcementRegistration> checkList=list.stream().filter(item->item.getCheckCategory()!=null&&!"".equals(item.getCheckCategory())&&item.getCheckCategory().equals("01")).collect(Collectors.toList());
String checkName=iDictDataService.selectDictLabel("check_category","01");
model.addAttribute("yearList",yearMake());
model.addAttribute("unite",uniteList.size());
model.addAttribute("uniteDouble",String.format("%.3f",((double)uniteList.size()/list.size())));
model.addAttribute("check",checkName);//!!
@ -192,49 +191,88 @@ public class EnforcementRegistrationController extends BaseController
@RequiresPermissions("code:registration:list")
@PostMapping("/echarts2")
@ResponseBody
public List<StatisticsIndicator> echarts2(EnforcementRegistration enforcementRegistration){
public List<StatisticsIndicator> echarts2(){
List<StatisticsIndicator> statisticsIndicatorList=new ArrayList<>();
List<StatisticsIndicator> sList1=new ArrayList<>();
StatisticsIndicator s1=new StatisticsIndicator();
StatisticsIndicator s2=new StatisticsIndicator();
s1.setName("echart1");
s2.setName("echart2");
List<StatisticsIndicator> sList2=new ArrayList<>();
enforcementRegistration.setYear(LocalDate.now().getYear()+"");
Map<String,DictData> dictDataMap=iDictDataService.selectDictDataByType("check_category").stream().collect(Collectors.toMap(DictData::getDictValue,Function.identity()));
LocalDate localDate=LocalDate.now();
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd");
EnforcementRegistration enforcementRegistration =new EnforcementRegistration();
LocalDate beginTime=localDate.withYear(Integer.valueOf(localDate.getYear())).withMonth(1).withDayOfMonth(1);
LocalDate endTime = localDate.withYear(Integer.valueOf(localDate.getYear())).withMonth(12).with(TemporalAdjusters.lastDayOfMonth());
enforcementRegistration.setBeginTime(str.format(beginTime));
enforcementRegistration.setEndTime(str.format(endTime));
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList1(enforcementRegistration);
Map<String,Long> checkMap=list.stream().collect(Collectors.groupingBy(item->item.getCheckCategory()==null||"".equals(item.getCheckCategory())?"空":item.getCheckCategory(),Collectors.counting()));
for(String s:checkMap.keySet()){
Map<String,List<EnforcementRegistration>> map=list.stream().collect(Collectors.groupingBy(EnforcementRegistration::getBureauDeptId));
for(String s:map.keySet()){
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();
if(dictDataMap.containsKey(s)){
statisticsIndicator.setName(dictDataMap.get(s).getDictLabel());
}else if(s.equals("空")){
statisticsIndicator.setName(null);
}else {
statisticsIndicator.setName(s);
}
statisticsIndicator.setValue(Integer.parseInt(checkMap.get(s)+""));
sList1.add(statisticsIndicator);
statisticsIndicator.setName(map.get(s).get(0).getBureauDeptName());
statisticsIndicator.setValue(map.get(s).size());
statisticsIndicatorList.add(statisticsIndicator);
}
s1.setStatisticsIndicatorList(sList1);
statisticsIndicatorList.add(s1);
Map<String,Long> yearMap=list.stream().collect(Collectors.groupingBy(item->item.getBureauDeptId()==null||"".equals(item.getBureauDeptId())?"空":item.getBureauDeptId(),Collectors.counting()));
Map<String,Dept> deptMap=iDeptService.selectDeptAll().stream().collect(Collectors.toMap(Dept::getDeptId, Function.identity()));
for(String s:yearMap.keySet()){
Collections.sort(statisticsIndicatorList);
Collections.reverse(statisticsIndicatorList);
if(statisticsIndicatorList.size()>=10){
return statisticsIndicatorList.subList(0,9);
}
return statisticsIndicatorList;
}
/**
* 季度柱状图
*/
@RequiresPermissions("code:registration:list")
@PostMapping("/echarts3")
@ResponseBody
public List<StatisticsIndicator> echarts3(){
List<StatisticsIndicator> statisticsIndicatorList=new ArrayList<>();
EnforcementRegistration enforcementRegistration=new EnforcementRegistration();
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd");
DateTimeFormatter str3=DateTimeFormatter.ofPattern("MM");
LocalDate localDate=LocalDate.now();
localDate=localDate.minusMonths(3);
int quarter=(int)Math.ceil(Double.valueOf(str3.format(localDate))/3);
LocalDate beginTime=localDate.withMonth(quarter*3-2).withDayOfMonth(1);
LocalDate endTime=localDate.withMonth(quarter*3).with(TemporalAdjusters.lastDayOfMonth());
enforcementRegistration.setBeginTime(str.format(beginTime));
enforcementRegistration.setEndTime(str.format(endTime));
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList1(enforcementRegistration);
Map<String,List<EnforcementRegistration>> map=list.stream().collect(Collectors.groupingBy(EnforcementRegistration::getBureauDeptId));
for(String s:map.keySet()){
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();
if(deptMap.containsKey(s)){
statisticsIndicator.setName(deptMap.get(s).getDeptName());
}else if(s.equals("空")){
statisticsIndicator.setName(null);
}else {
statisticsIndicator.setName(s);
}
statisticsIndicator.setValue(Integer.parseInt(yearMap.get(s)+""));
sList2.add(statisticsIndicator);
statisticsIndicator.setName(map.get(s).get(0).getBureauDeptName());
statisticsIndicator.setValue(map.get(s).size());
statisticsIndicatorList.add(statisticsIndicator);
}
Collections.sort(statisticsIndicatorList);
Collections.reverse(statisticsIndicatorList);
if(statisticsIndicatorList.size()>=10){
return statisticsIndicatorList.subList(0,9);
}
return statisticsIndicatorList;
}
@RequiresPermissions("code:registration:list")
@PostMapping("/echarts4")
@ResponseBody
public List<StatisticsIndicator> echarts4(){
List<StatisticsIndicator> statisticsIndicatorList=new ArrayList<>();
EnforcementRegistration enforcementRegistration=new EnforcementRegistration();
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate localDate=LocalDate.now();
LocalDate beginTime=localDate.withDayOfMonth(1);
LocalDate endTime = localDate.with(TemporalAdjusters.lastDayOfMonth());
enforcementRegistration.setBeginTime(str.format(beginTime));
enforcementRegistration.setEndTime(str.format(endTime));
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList1(enforcementRegistration);
Map<String,List<EnforcementRegistration>> map=list.stream().collect(Collectors.groupingBy(EnforcementRegistration::getBureauDeptId));
for(String s:map.keySet()){
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();
statisticsIndicator.setName(map.get(s).get(0).getBureauDeptName());
statisticsIndicator.setValue(map.get(s).size());
statisticsIndicatorList.add(statisticsIndicator);
}
Collections.sort(statisticsIndicatorList);
Collections.reverse(statisticsIndicatorList);
if(statisticsIndicatorList.size()>=10){
return statisticsIndicatorList.subList(0,9);
}
s2.setStatisticsIndicatorList(sList2);
statisticsIndicatorList.add(s2);
return statisticsIndicatorList;
}
@ -411,7 +449,12 @@ public class EnforcementRegistrationController extends BaseController
registration.setParams(params);
return ZDResponse.success("查询成功", registration);
}
public List<Integer> yearMake(){
int current=LocalDate.now().getYear();
List<Integer> yearList=new ArrayList<>();
for(int i=current;i>=2023;i--){
yearList.add(i);
}
return yearList;
}
}

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

@ -1,7 +1,9 @@
package com.zdxt.code.controller;
import com.zdxt.code.service.StatisticalPaneService;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -12,11 +14,18 @@ import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class StatisticalPanelController extends BaseController {
@Autowired
private StatisticalPaneService statisticalPaneService;
@RequestMapping("/")
public ZDResponse home(){
return ZDResponse.success();
}
@RequestMapping("/")
public ZDResponse complaint(){
return ZDResponse.success("");
}
}

278
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsEnterpriseController.java

@ -0,0 +1,278 @@
package com.zdxt.code.controller;
import com.zdxt.auth.project.system.dict.service.IDictDataService;
import com.zdxt.code.domain.ComplaintStatistics;
import com.zdxt.code.domain.EnterpriseInformation;
import com.zdxt.code.domain.SearchType;
import com.zdxt.code.domain.StatisticsIndicator;
import com.zdxt.code.service.IEnterpriseInformationService;
import com.zdxt.common.controller.BaseController;
import com.zdxt.domain.auth.DictData;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Controller
@RequestMapping("/code/statisticsEnterprise")
public class StatisticsEnterpriseController extends BaseController
{
private String prefix = "project/code/statisticsEnterprise";
@Autowired
private IEnterpriseInformationService iEnterpriseInformationService;
@Autowired
private IDictDataService iDictDataService;
@RequiresPermissions("code:statisticsEnterprise:view")
@GetMapping()
public String statisticsEnterprise(Model model) {
LocalDate localDate=LocalDate.now();
List<EnterpriseInformation> enterpriseInformationList=iEnterpriseInformationService.selectEnterpriseInformationList1(new EnterpriseInformation());
List<EnterpriseInformation> existList= enterpriseInformationList.stream().filter(item->item.getIsDelete()==0).collect(Collectors.toList());
List<EnterpriseInformation> logoutList= enterpriseInformationList.stream().filter(item->item.getIsDelete()==1).collect(Collectors.toList());
model.addAttribute("yearList",yearMake());
model.addAttribute("number",enterpriseInformationList.size());//企业总数
model.addAttribute("exist",existList.size());//续存数量
model.addAttribute("logout",logoutList.size());//注销数量
model.addAttribute("year",localDate.getYear());
model.addAttribute("number2",enterpriseInformationList.size());//企业总数--Tap2
model.addAttribute("number3","100%");
return prefix+"/statisticsEnterprise";
}
@RequiresPermissions("code:statisticsEnterprise:list")
@GetMapping("/listQY")
@ResponseBody
public List<StatisticsIndicator> statisticsEnterpriseQY() {
List<DictData>dictDataList=iDictDataService.selectDictDataByType("address_type");//有序->区
Map<String,String> dictDataMap=dictDataList.stream().collect(Collectors.toMap(DictData::getDictValue,DictData::getDictLabel));
List<String> list=new ArrayList<>();//无序->深圳市+区
for(String s:dictDataMap.keySet()){
list.add("深圳市"+dictDataMap.get(s));
}
List<EnterpriseInformation> enterpriseInformationList=iEnterpriseInformationService.selectEnterpriseInformationList1(new EnterpriseInformation());
List<StatisticsIndicator> statisticsIndicatorList=new ArrayList<>();
for(DictData d:dictDataList){
StatisticsIndicator s=new StatisticsIndicator();
String name=d.getDictLabel();
List<EnterpriseInformation> qyList=new ArrayList<>();//有序区--企业
if(name.equals("深圳市光明区")){
qyList=enterpriseInformationList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+name)||item.getEnterpriseAddress().startsWith("深圳市光明新区")).collect(Collectors.toList());
}else{
qyList=enterpriseInformationList.stream().filter(item->item.getEnterpriseAddress().startsWith("深圳市"+name)).collect(Collectors.toList());
}
List<EnterpriseInformation> existList= qyList.stream().filter(item->item.getIsDelete()==0).collect(Collectors.toList());
List<EnterpriseInformation> logoutList= qyList.stream().filter(item->item.getIsDelete()==1).collect(Collectors.toList());
s.setName(name);
s.setTotalNumber(qyList.size());
s.setNumInt(existList.size());
s.setValue(logoutList.size());
statisticsIndicatorList.add(s);
}
List<EnterpriseInformation> qtList=enterpriseInformationList.stream().filter(item->!qyMake(list,item.getEnterpriseAddress())).collect(Collectors.toList());
qtList = qtList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市光明新区")).collect(Collectors.toList());
if(qtList!=null&&qtList.size()>0) {
List<EnterpriseInformation> existList = qtList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList());
List<EnterpriseInformation> logoutList = qtList.stream().filter(item -> item.getIsDelete() == 1).collect(Collectors.toList());
StatisticsIndicator s = new StatisticsIndicator();
s.setName("其他");
s.setTotalNumber(qtList.size());
s.setNumInt(existList.size());
s.setValue(logoutList.size());
statisticsIndicatorList.add(s);
}
return statisticsIndicatorList;
}
@RequiresPermissions("code:statisticsEnterprise:list")
@GetMapping("/listJD")
@ResponseBody
public List<StatisticsIndicator> statisticsEnterpriseJD(SearchType searchType) {
List<DictData>dictDataList=iDictDataService.selectDictDataByType("address_type");
Map<String,String> qyMap=dictDataList.stream().collect(Collectors.toMap(DictData::getDictLabel,DictData::getDictValue));
if(qyMap.containsKey(searchType.getName())) {
List<DictData> jdDictList = iDictDataService.selectDictDataByType(qyMap.get(searchType.getName()));//有序街道
Map<String, String> jdMap = jdDictList.stream().collect(Collectors.toMap(DictData::getDictValue, DictData::getDictLabel));
List<EnterpriseInformation> enterpriseInformationList = iEnterpriseInformationService.selectEnterpriseInformationList1(new EnterpriseInformation());//所有企业
if (searchType.getName().equals("光明区")) {//将该区内的过滤出来
enterpriseInformationList=enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市"+ searchType.getName())|| item.getEnterpriseAddress().startsWith("深圳市光明新区")).collect(Collectors.toList());
} else {
enterpriseInformationList=enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市"+ searchType.getName())).collect(Collectors.toList());
}
List<StatisticsIndicator> statisticsIndicatorList = new ArrayList<>();
for (DictData d : jdDictList) {//遍历按序版的区域list
StatisticsIndicator s = new StatisticsIndicator();
String name = d.getDictLabel();
List<EnterpriseInformation> qyList = new ArrayList<>();
if (searchType.getName().equals("光明区")) {
qyList = enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市"+ searchType.getName() + name) || item.getEnterpriseAddress().startsWith("深圳市光明新区"+ name)).collect(Collectors.toList());
} else {
qyList = enterpriseInformationList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市"+ searchType.getName() + name)).collect(Collectors.toList());
}
List<EnterpriseInformation> existList = qyList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList());
List<EnterpriseInformation> logoutList = qyList.stream().filter(item -> item.getIsDelete() == 1).collect(Collectors.toList());
s.setName(name);
s.setTotalNumber(qyList.size());
s.setNumInt(existList.size());
s.setValue(logoutList.size());
statisticsIndicatorList.add(s);
}
List<EnterpriseInformation> qtList=enterpriseInformationList.stream().filter(item->!jdMake(searchType.getName(),jdDictList,item.getEnterpriseAddress())).collect(Collectors.toList());
if(qtList!=null&&qtList.size()>0) {
List<EnterpriseInformation> existList = qtList.stream().filter(item -> item.getIsDelete() == 0).collect(Collectors.toList());
List<EnterpriseInformation> logoutList = qtList.stream().filter(item -> item.getIsDelete() == 1).collect(Collectors.toList());
StatisticsIndicator s = new StatisticsIndicator();
s.setName("其他");
s.setTotalNumber(qtList.size());
s.setNumInt(existList.size());
s.setValue(logoutList.size());
statisticsIndicatorList.add(s);
}
return statisticsIndicatorList;
}
return null;
}
@RequiresPermissions("code:statisticsEnterprise:list")
@GetMapping("/type")
@ResponseBody
public List<StatisticsIndicator> statistics(SearchType searchType) {
EnterpriseInformation enterpriseInformation=dateMake(searchType);
List<EnterpriseInformation> enterpriseInformationList=iEnterpriseInformationService.selectEnterpriseInformationList1(enterpriseInformation);
List<DictData>list=iDictDataService.selectDictDataByType("enterpriseType");
List<DictData>dictDataList=list.subList(0,4);//截取掉其他
List<StatisticsIndicator> statisticsIndicatorList=new ArrayList<>();
for(DictData d:dictDataList){
List<EnterpriseInformation> type=enterpriseInformationList.stream().filter(item->item.getCompanyOrgType().contains(d.getDictLabel())).collect(Collectors.toList());
if(type!=null&&type.size()>0){
StatisticsIndicator s=new StatisticsIndicator();
s.setName(d.getDictLabel());
s.setValue(type.size());
s.setPercentage((double)type.size()/enterpriseInformationList.size());
statisticsIndicatorList.add(s);
}
}
List<EnterpriseInformation> qtList=enterpriseInformationList.stream().filter(item->!typeMake(dictDataList,item.getCompanyOrgType())).collect(Collectors.toList());
if(qtList!=null&&qtList.size()>0){
StatisticsIndicator s=new StatisticsIndicator();
s.setName("其他");
s.setValue(qtList.size());
s.setPercentage((double)qtList.size()/enterpriseInformationList.size());
statisticsIndicatorList.add(s);
}
return statisticsIndicatorList;
}
@RequiresPermissions("code:statisticsEnterprise:view")
@GetMapping("/search")
public String Search(Model model,SearchType searchType) {
EnterpriseInformation enterpriseInformation=dateMake(searchType);
List<EnterpriseInformation> enterpriseInformationList=iEnterpriseInformationService.selectEnterpriseInformationList1(enterpriseInformation);
List<DictData>dictDataList=iDictDataService.selectDictDataByType("enterpriseType");
List<StatisticsIndicator> statisticsIndicatorList=new ArrayList<>();
for(DictData d:dictDataList){
List<EnterpriseInformation> type=enterpriseInformationList.stream().filter(item->item.getCompanyOrgType().contains(d.getDictLabel())).collect(Collectors.toList());
if(type!=null&&type.size()>0){
StatisticsIndicator s=new StatisticsIndicator();
s.setName(d.getDictLabel());
s.setValue(type.size());
s.setPercentage((double)type.size()/enterpriseInformationList.size());
statisticsIndicatorList.add(s);
}
}
model.addAttribute("year",searchType.getYear());
model.addAttribute("number2",enterpriseInformationList.size());//企业总数--Tap2
model.addAttribute("number3","100%");
return prefix+"/enterpriseFragment";
}
public Boolean qyMake(List<String> stringList,String s){
for (String string : stringList) {
if (s.startsWith(string)) {
return true;
}
}
return false;
}
public Boolean jdMake(String qy,List<DictData> stringList,String s){
if(qy.equals("光明区")){
for(DictData d:stringList){
if(s.startsWith("深圳市"+qy+d.getDictLabel())||s.startsWith("深圳市光明新区"+d.getDictLabel())){
return true;
}
}
}else {
for (DictData d : stringList) {
if (s.startsWith("深圳市"+qy+d.getDictLabel())) {
return true;
}
}
}
return false;
}
public Boolean typeMake(List<DictData> dictDataList,String s){
for(DictData d:dictDataList){
if(s.contains(d.getDictLabel())){
return true;
}
}
return false;
}
private EnterpriseInformation dateMake(SearchType searchType){
LocalDate localDate=LocalDate.now();
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd");
if(searchType.getYear()==null||"".equals(searchType.getYear())){
searchType.setYear(localDate.getYear()+"");
}
EnterpriseInformation enterpriseInformation=new EnterpriseInformation();
if(searchType.getMonth()!=null&&!"".equals(searchType.getMonth())){
LocalDate beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(Integer.valueOf(searchType.getMonth())).withDayOfMonth(1);
LocalDate endTime = beginTime.with(TemporalAdjusters.lastDayOfMonth());
enterpriseInformation.setBeginTime(str.format(beginTime));
enterpriseInformation.setEndTime(str.format(endTime));
}else if(searchType.getQuarter()!=null&&!"".equals(searchType.getQuarter())){
LocalDate beginTime=LocalDate.now();
LocalDate endTime=LocalDate.now();
switch (searchType.getQuarter()){
case "1":
beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(1).withDayOfMonth(1);
endTime=beginTime.withMonth(3).with(TemporalAdjusters.lastDayOfMonth());
break;
case "2":
beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(4).withDayOfMonth(1);
endTime=beginTime.withMonth(6).with(TemporalAdjusters.lastDayOfMonth());
break;
case "3":
beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(7).withDayOfMonth(1);
endTime=beginTime.withMonth(9).with(TemporalAdjusters.lastDayOfMonth());
break;
case "4":
beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(10).withDayOfMonth(1);
endTime=beginTime.withMonth(12).with(TemporalAdjusters.lastDayOfMonth());
break;
}
enterpriseInformation.setBeginTime(str.format(beginTime));
enterpriseInformation.setEndTime(str.format(endTime));
}else {
LocalDate beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(1).withDayOfMonth(1);
LocalDate endTime = localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(12).with(TemporalAdjusters.lastDayOfMonth());
enterpriseInformation.setBeginTime(str.format(beginTime));
enterpriseInformation.setEndTime(str.format(endTime));
}
return enterpriseInformation;
}
public List<Integer> yearMake(){
int current=LocalDate.now().getYear();
List<Integer> yearList=new ArrayList<>();
for(int i=current;i>=2023;i--){
yearList.add(i);
}
return yearList;
}
}

139
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticsWarningController.java

@ -0,0 +1,139 @@
package com.zdxt.code.controller;
import com.zdxt.code.domain.ComplaintStatistics;
import com.zdxt.code.domain.EnforcementRegistration;
import com.zdxt.code.domain.LawEnforcementWarningList;
import com.zdxt.code.domain.SearchType;
import com.zdxt.code.service.ILawEnforcementWarningListService;
import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.TableDataInfo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.List;
@Controller
@RequestMapping("/code/statisticsWarning")
public class StatisticsWarningController extends BaseController {
private String prefix = "project/code/statisticsWarning";
@Autowired
private ILawEnforcementWarningListService iLawEnforcementWarningListService;
@RequiresPermissions("code:statisticsWarning:view")
@GetMapping()
public String StatisticsWarning(Model model)
{
LawEnforcementWarningList lawEnforcementWarningList=new LawEnforcementWarningList();
LocalDate localDate=LocalDate.now();
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate beginTime=localDate.withYear(Integer.valueOf(localDate.getYear())).withMonth(1).withDayOfMonth(1);
LocalDate endTime = localDate.withYear(Integer.valueOf(localDate.getYear())).withMonth(12).with(TemporalAdjusters.lastDayOfMonth());
lawEnforcementWarningList.setBeginTime(str.format(beginTime));
lawEnforcementWarningList.setEndTime(str.format(endTime));
List<LawEnforcementWarningList> lawEnforcementWarningListList=iLawEnforcementWarningListService.selectLawEnforcementWarningListList1(lawEnforcementWarningList);
int Number1=0;
for(LawEnforcementWarningList l:lawEnforcementWarningListList){
Number1=Number1+l.getEnforcementNumber();
}
model.addAttribute("yearList",yearMake());
model.addAttribute("year",localDate.getYear());
model.addAttribute("Number1",Number1);
model.addAttribute("Number2",lawEnforcementWarningListList.size());
return prefix + "/statisticsWarning";
}
@RequiresPermissions("code:statisticsWarning:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo statisticsWarningList(SearchType searchType) {
LawEnforcementWarningList lawEnforcementWarningList=dateMake(searchType);
if(searchType.getBureauDeptId()!=null&&!"".equals(searchType.getBureauDeptId())){
lawEnforcementWarningList.setEnforcementDepartment(searchType.getBureauDeptId());
}
if(searchType.getName()!=null&&!"".equals(searchType.getName())){
lawEnforcementWarningList.setEnterpriseName(searchType.getName());
}
startPage();
List<LawEnforcementWarningList> lawEnforcementWarningListList=iLawEnforcementWarningListService.selectLawEnforcementWarningListList1(lawEnforcementWarningList);
return getDataTable(lawEnforcementWarningListList);
}
@RequiresPermissions("code:statisticsWarning:list")
@GetMapping("/searchType")
public String searchType(SearchType searchType,Model model){
LawEnforcementWarningList lawEnforcementWarningList=dateMake(searchType);
if(searchType.getBureauDeptId()!=null&&!"".equals(searchType.getBureauDeptId())){
lawEnforcementWarningList.setEnforcementDepartment(searchType.getBureauDeptId());
}
if(searchType.getName()!=null&&!"".equals(searchType.getName())){
lawEnforcementWarningList.setEnterpriseName(searchType.getName());
}
List<LawEnforcementWarningList> lawEnforcementWarningListList=iLawEnforcementWarningListService.selectLawEnforcementWarningListList1(lawEnforcementWarningList);
int Number1=0;
for(LawEnforcementWarningList l:lawEnforcementWarningListList){
Number1=Number1+l.getEnforcementNumber();
}
model.addAttribute("year",searchType.getYear());
model.addAttribute("Number1",Number1);
model.addAttribute("Number2",lawEnforcementWarningListList.size());
return prefix+"/fragmentW";
}
private LawEnforcementWarningList dateMake(SearchType searchType){
LocalDate localDate=LocalDate.now();
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd");
if(searchType.getYear()==null||"".equals(searchType.getYear())){
searchType.setYear(localDate.getYear()+"");
}
LawEnforcementWarningList lawEnforcementWarningList =new LawEnforcementWarningList();
if(searchType.getMonth()!=null&&!"".equals(searchType.getMonth())){
LocalDate beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(Integer.valueOf(searchType.getMonth())).withDayOfMonth(1);
LocalDate endTime = beginTime.with(TemporalAdjusters.lastDayOfMonth());
lawEnforcementWarningList.setBeginTime(str.format(beginTime));
lawEnforcementWarningList.setEndTime(str.format(endTime));
}else if(searchType.getQuarter()!=null&&!"".equals(searchType.getQuarter())){
LocalDate beginTime=LocalDate.now();
LocalDate endTime=LocalDate.now();
switch (searchType.getQuarter()){
case "1":
beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(1).withDayOfMonth(1);
endTime=beginTime.withMonth(3).with(TemporalAdjusters.lastDayOfMonth());
break;
case "2":
beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(4).withDayOfMonth(1);
endTime=beginTime.withMonth(6).with(TemporalAdjusters.lastDayOfMonth());
break;
case "3":
beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(7).withDayOfMonth(1);
endTime=beginTime.withMonth(9).with(TemporalAdjusters.lastDayOfMonth());
break;
case "4":
beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(10).withDayOfMonth(1);
endTime=beginTime.withMonth(12).with(TemporalAdjusters.lastDayOfMonth());
break;
}
lawEnforcementWarningList.setBeginTime(str.format(beginTime));
lawEnforcementWarningList.setEndTime(str.format(endTime));
}else {
LocalDate beginTime=localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(1).withDayOfMonth(1);
LocalDate endTime = localDate.withYear(Integer.valueOf(searchType.getYear())).withMonth(12).with(TemporalAdjusters.lastDayOfMonth());
lawEnforcementWarningList.setBeginTime(str.format(beginTime));
lawEnforcementWarningList.setEndTime(str.format(endTime));
}
return lawEnforcementWarningList;
}
public List<Integer> yearMake(){
int current=LocalDate.now().getYear();
List<Integer> yearList=new ArrayList<>();
for(int i=current;i>=2023;i--){
yearList.add(i);
}
return yearList;
}
}

18
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseInformation.java

@ -106,6 +106,8 @@ public class EnterpriseInformation extends BaseDomain
* 二维码地址
*/
private String qrCodeUrl;
private String beginTime;
private String endTime;
public String getReason() {
return reason;
@ -305,6 +307,22 @@ public class EnterpriseInformation extends BaseDomain
this.qrCodeUrl = qrCodeUrl;
}
public String getBeginTime() {
return beginTime;
}
public void setBeginTime(String beginTime) {
this.beginTime = beginTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
@Override
public String getSearchValue() {
return searchValue;

8
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticsIndicator.java

@ -8,7 +8,7 @@ import java.text.DecimalFormat;
import java.util.List;
@Data
public class StatisticsIndicator extends BaseDomain {
public class StatisticsIndicator extends BaseDomain implements Comparable<StatisticsIndicator>{
private String name;
private int value;
private int numInt;
@ -24,6 +24,7 @@ public class StatisticsIndicator extends BaseDomain {
private List<LawEnforcementWarningList> lawEnforcementWarningListList;
private List<String> stringList;
private String percentage;
private Integer totalNumber;
public void setNumDouble(Double numDouble) {
this.numDouble = new Double(String.format("%.3f",numDouble));
@ -32,4 +33,9 @@ public class StatisticsIndicator extends BaseDomain {
DecimalFormat str=new DecimalFormat("0.00%");
this.percentage=str.format(numDouble);
}
@Override
public int compareTo(StatisticsIndicator o) {
return this.getValue()-o.getValue();
}
}

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnterpriseInformationMapper.java

@ -34,7 +34,7 @@ public interface EnterpriseInformationMapper
* @return 企业信息登记集合
*/
List<EnterpriseInformation> selectEnterpriseInformationList(EnterpriseInformation enterpriseInformation);
List<EnterpriseInformation> selectEnterpriseInformationList1(EnterpriseInformation enterpriseInformation);
/**
* 查询企业信息以及二维码信息
* @param enterpriseInformation

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/LawEnforcementWarningListMapper.java

@ -26,7 +26,7 @@ public interface LawEnforcementWarningListMapper
* @return 执法预警列表集合
*/
List<LawEnforcementWarningList> selectLawEnforcementWarningListList(LawEnforcementWarningList lawEnforcementWarningList);
List<LawEnforcementWarningList> selectLawEnforcementWarningListList1(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 查询企业预警信息
* @param lawEnforcementWarningList

3
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java

@ -34,6 +34,9 @@ public interface IEnterpriseInformationService
* @return 企业信息登记集合
*/
List<EnterpriseInformation> selectEnterpriseInformationList(EnterpriseInformation enterpriseInformation);
List<EnterpriseInformation> selectEnterpriseInformationList1(EnterpriseInformation enterpriseInformation);
/**
* 查询企业信息登记列表
*

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

@ -27,6 +27,8 @@ public interface ILawEnforcementWarningListService
*/
List<LawEnforcementWarningList> selectLawEnforcementWarningListList(LawEnforcementWarningList lawEnforcementWarningList);
List<LawEnforcementWarningList> selectLawEnforcementWarningListList1(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 查询企业预警信息
* @param lawEnforcementWarningList

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

@ -0,0 +1,4 @@
package com.zdxt.code.service;
public interface StatisticalPaneService {
}

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

@ -7,11 +7,9 @@ import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -29,7 +27,6 @@ import com.zdxt.code.service.IQrCodeGenerateHistoryService;
import com.zdxt.code.utils.HttpUtil;
import com.zdxt.code.utils.PasswordTools;
import com.zdxt.code.utils.QRCodeUtil;
import com.zdxt.code.utils.ServiceInvocation;
import com.zdxt.common.util.DateUtils;
import com.zdxt.common.util.StringUtils;
import lombok.extern.slf4j.Slf4j;
@ -120,7 +117,16 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
// }
return enterpriseInformationMapper.selectEnterpriseInformationList(enterpriseInformation);
}
@Override
public List<EnterpriseInformation> selectEnterpriseInformationList1(EnterpriseInformation enterpriseInformation)
{
// if ("3".equals(enterpriseInformation.getReason())) {
// Map<String, Object> tmp = new HashMap<>();
// tmp.put("reason", 3);
// enterpriseInformation.setParams(tmp);
// }
return enterpriseInformationMapper.selectEnterpriseInformationList1(enterpriseInformation);
}
@Override
public List<EnterpriseInformation> selectEnterpriseInformationAndQrInfo(EnterpriseInformation enterpriseInformation) {
return enterpriseInformationMapper.selectEnterpriseInformationAndQrInfo(enterpriseInformation);

5
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/LawEnforcementWarningListServiceImpl.java

@ -45,6 +45,11 @@ public class LawEnforcementWarningListServiceImpl implements ILawEnforcementWarn
{
return lawEnforcementWarningListMapper.selectLawEnforcementWarningListList(lawEnforcementWarningList);
}
@Override
public List<LawEnforcementWarningList> selectLawEnforcementWarningListList1(LawEnforcementWarningList lawEnforcementWarningList)
{
return lawEnforcementWarningListMapper.selectLawEnforcementWarningListList1(lawEnforcementWarningList);
}
@Override
public List<LawEnforcementWarningList> selectLawEnforcementWarningByEnterpriseNumber(LawEnforcementWarningList lawEnforcementWarningList) {

8
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneImpl.java

@ -0,0 +1,8 @@
package com.zdxt.code.service.impl;
import com.zdxt.code.service.StatisticalPaneService;
import org.springframework.stereotype.Service;
@Service
public class StatisticalPaneImpl implements StatisticalPaneService {
}

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

@ -152,7 +152,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEnforcementRegistrationList1" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult">
<include refid="selectEnforcementRegistrationVo"/>
<where>
and law_enforcement is not null
and bureau_dept_name is not null
and law_enforcement_id is not null
and enterprise_name is not null

16
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml

@ -66,7 +66,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by create_time desc
</select>
<select id="selectEnterpriseInformationList1" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult">
<include refid="selectEnterpriseInformationVo"/>
<where>
<if test="enterpriseAddress != null and enterpriseAddress != ''"> and enterprise_address like concat('%', #{enterpriseAddress}, '%')</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
and is_delete is not null
and company_org_type is not null
and enterprise_address is not null
</where>
</select>
<select id="selectEnterpriseInformationAndQrInfo" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult">
SELECT
ei.*,gh.qr_code_url

23
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/LawEnforcementWarningListMapper.xml

@ -80,6 +80,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY warning_level ASC,create_time DESC LIMIT 1000000000
) t GROUP BY t.enterprise_number order by t.create_time desc
</select>
<select id="selectLawEnforcementWarningListList1" parameterType="LawEnforcementWarningList" resultMap="LawEnforcementWarningListResult">
SELECT * FROM (
SELECT
id,
warning_time, warning_cause, warning_level ,
create_time, enterprise_name, enterprise_number,
enforcement_number,warn_type,enforcement_department,
enforcement_department_id,begin_time,end_time
FROM law_enforcement_warning_list
<where>
and warn_type=0
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="enforcementDepartment != null and enforcementDepartment != ''"> and enforcement_department like concat('%', #{enforcementDepartment}, '%')</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
</where>
ORDER BY warning_level ASC,create_time DESC LIMIT 1000000000
) t GROUP BY t.enterprise_number order by t.create_time desc
</select>
<select id="selectLawEnforcementWarningByEnterpriseNumber" parameterType="LawEnforcementWarningList"
resultMap="LawEnforcementWarningListResult">

Loading…
Cancel
Save