Browse Source

综合分析接口提交

v4
chenrui 2 years ago
parent
commit
dff711dfbe
  1. 42
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
  2. 333
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html
  3. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java
  4. 52
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java
  5. 19
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
  6. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

42
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html

@ -42,7 +42,7 @@
<li> <li>
<li class="select-time" id="quarterDom"> <li class="select-time" id="quarterDom">
<label>季度:</label> <label>季度:</label>
<select id="quarter" name="quarter" onchange="selectDate()"> <select id="quarter" name="quarter">
<option value="">请选择</option> <option value="">请选择</option>
<option value="1">1季度</option> <option value="1">1季度</option>
<option value="2">2季度</option> <option value="2">2季度</option>
@ -59,6 +59,18 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="static-content">
<ul>
<li id="b">
<p><span id="yearDate">2024</span>:</p>
<p><label>年度计划:</label><b><span id="yearTotal">0</span></b></p>
<p><label>季度计划:</label><b><span id="quarterTotal">0</span></b></p>
<p><label>月度计划:</label><b><span id="monthTotal">0</span></b></p>
</li>
</ul>
</div>
</form> </form>
</div> </div>
@ -143,7 +155,18 @@
type: "POST", type: "POST",
dataType: 'json', dataType: 'json',
success: function (data) { //成功,回调函数 success: function (data) { //成功,回调函数
console.log(data.data) console.log(data.data);
var e = data.data;
if(e != "undefined" && e != null){
$("#yearTotal").text(e.yearTotal);
$("#quarterTotal").text(e.quarterTotal);
$("#monthTotal").text(e.monthTotal);
}else {
$("#yearTotal").text(0);
$("#quarterTotal").text(0);
$("#monthTotal").text(0);
}
}, },
error: function (er) { //失败,回调函数 error: function (er) { //失败,回调函数
} }
@ -263,7 +286,6 @@
$("#yearDom").show(); $("#yearDom").show();
$("#quarterDom").hide(); $("#quarterDom").hide();
$("#monthDom").hide(); $("#monthDom").hide();
$("input[name='year']").val("");
document.getElementById("quarter").selectedIndex = -1; document.getElementById("quarter").selectedIndex = -1;
$("input[name='month']").val("") $("input[name='month']").val("")
}else if("quarter" == options.val()){ }else if("quarter" == options.val()){
@ -281,6 +303,11 @@
document.getElementById("quarter").selectedIndex = -1; document.getElementById("quarter").selectedIndex = -1;
$("input[name='month']").val("") $("input[name='month']").val("")
} }
if("year" != options.val()){
$("input[name='year']").val("");
var date = new Date();
$("#yearDate").text(date.getFullYear());
}
} }
@ -332,7 +359,13 @@
laydate.render({ laydate.render({
elem: '#yearSearch', elem: '#yearSearch',
type: 'year', type: 'year',
trigger: 'click' trigger: 'click',
change: function(value, date, endDate){
console.log(value); //得到日期生成的值,如:2017-08-18
console.log(date); //得到日期时间对象:{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
console.log(endDate); //得结束的日期时间对象,开启范围选择(range: true)才会返回。对象成员同上。
$("#yearDate").text(value)
}
}); });
laydate.render({ laydate.render({
elem: '#monthSearch', elem: '#monthSearch',
@ -480,7 +513,6 @@
console.log(params); console.log(params);
$("#bootstrap-table").bootstrapTable('refresh', params); $("#bootstrap-table").bootstrapTable('refresh', params);
this.changeEcharts(); this.changeEcharts();
} }
function changeEcharts() { function changeEcharts() {
staticAllProgram(); staticAllProgram();

333
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html

@ -9,9 +9,11 @@
<th:block th:include="zdxtInclude :: datetimepicker-css" /> <th:block th:include="zdxtInclude :: datetimepicker-css" />
<link type="text/css" href="/css/stat1.css" rel="stylesheet"/> <link type="text/css" href="/css/stat1.css" rel="stylesheet"/>
<style type="text/css"> <style type="text/css">
.select-list { .statwrap .panel-card{
float: right; width: 32%;
margin: 2% 0 1%; height: 35%;
background-color: #dedbd6;
margin: 30px 10px
} }
.statwrap { .statwrap {
@ -141,7 +143,6 @@
</style> </style>
</head> </head>
<body> <body>
<h1 class="page-title">综合统计分析</h1>
<form id="formId"> <form id="formId">
<div class="select-list"> <div class="select-list">
<ul> <ul>
@ -191,24 +192,30 @@
<div class="panel-card"> <div class="panel-card">
<div class="panel-card-top"> <div class="panel-card-top">
<div class="cont-title">执法部门数量</div> <div class="cont-title">执法部门数量</div>
<div class="cont-total"><b>48</b><span>个</span></div> <div class="cont-total"><b><span id="dept-total">--</span></b><span>个</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-rise">&#8593</span><span class="data-change">2</span><label>较上年</label></span> <span class="data-rise" id="dept-total-top">&#8593</span>
<span class="data-fall" id="dept-total-down">&#8595</span>
<span class="data-change" id="dept-huan">2</span><label>较上年</label>
</span>
</div> </div>
</div> </div>
<div class="panel-card-bottom"> <div class="panel-card-bottom">
<div class="panel-card-left"> <div class="panel-card-left">
<div class="cont-title">执法人员数量</div> <div class="cont-title">执法人员数量</div>
<div class="cont-total"><b>1,969</b><span>人</span></div> <div class="cont-total"><b><span id="user-total">1,969</span></b><span>人</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-fall">&#8595</span><span class="data-change">32</span><label>较上年</label> <span class="data-fall">&#8595</span>
<span class="data-change" id="user-huan">32</span><label>较上年</label>
</div> </div>
</div> </div>
<div class="panel-card-right"> <div class="panel-card-right">
<div class="cont-title">本单位执法人员数量</div> <div class="cont-title">本单位执法人员数量</div>
<div class="cont-total"><b>29</b><span>人</span></div> <div class="cont-total"><b><span id="oneself-user-total">29</span></b><span>人</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-fall">&#8595</span><span class="data-change">2</span><label>较上年</label> <span class="data-fall">&#8595</span>
<span class="data-change"><span id="oneself-user-huan">--</span></span>
<label>较上年</label>
</div> </div>
</div> </div>
</div> </div>
@ -217,24 +224,35 @@
<div class="panel-card"> <div class="panel-card">
<div class="panel-card-top"> <div class="panel-card-top">
<div class="cont-title">企业数量</div> <div class="cont-title">企业数量</div>
<div class="cont-total"><b>4,317,947</b><span>家</span></div> <div class="cont-total"><b><span id="enterprise-total"></span></b><span>家</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-rise">&#8593</span><span class="data-change">1.25万</span><label>较上年</label></span> <!-- <span class="data-rise">&#8593</span>-->
<span class="data-rise" id="enterprise-huan-top">&#8593</span>
<span class="data-fall" id="enterprise-huan-down">&#8595</span>
<span class="data-change" id="enterprise-huan">125000</span><label>较上年</label></span>
</div> </div>
</div> </div>
<div class="panel-card-bottom"> <div class="panel-card-bottom">
<div class="panel-card-left"> <div class="panel-card-left">
<div class="cont-title">续存企业数量</div> <div class="cont-title">续存企业数量</div>
<div class="cont-total"><b>3,568,481</b><span>家</span></div> <div class="cont-total"><b><span id="enterprise-xc-total"></span></b><span>家</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-rise">&#8593</span><span class="data-change">0.63万</span><label>较上年</label> <!-- <span class="data-rise">&#8593</span>-->
<span class="data-rise" id="enterprise-xc-huan-top">&#8593</span>
<span class="data-fall" id="enterprise-xc-huan-down">&#8595</span>
<span class="data-change" id="enterprise-xc-huan"></span><label>较上年</label>
</div> </div>
</div> </div>
<div class="panel-card-right"> <div class="panel-card-right">
<div class="cont-title">注销企业数量</div> <div class="cont-title">注销企业数量</div>
<div class="cont-total"><b>79,962</b><span>家</span></div> <div class="cont-total"><b>
<span id="enterprise-zx-total">--</span>
</b><span>家</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-fall">&#8595</span><span class="data-change">0.39万</span><label>较上年</label> <!-- <span class="data-fall">&#8595</span>-->
<span class="data-rise" id="enterprise-zx-huan-top">&#8593</span>
<span class="data-fall" id="enterprise-zx-huan-down">&#8595</span>
<span class="data-change" id="enterprise-zx-huan">0.39万</span><label>较上年</label>
</div> </div>
</div> </div>
</div> </div>
@ -243,24 +261,24 @@
<div class="panel-card"> <div class="panel-card">
<div class="panel-card-top"> <div class="panel-card-top">
<div class="cont-title">检查计划数量</div> <div class="cont-title">检查计划数量</div>
<div class="cont-total"><b>1,674</b><span>个</span></div> <div class="cont-total"><b><span id="program-total">1,674</span></b><span>个</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-rise">&#8593</span><span class="data-change">35</span><label>较上年</label></span> <span class="data-rise">&#8593</span><span class="data-change" id="program-huan">35</span><label>较上年</label></span>
</div> </div>
</div> </div>
<div class="panel-card-bottom"> <div class="panel-card-bottom">
<div class="panel-card-left"> <div class="panel-card-left">
<div class="cont-title">行政检查计划数量</div> <div class="cont-title">行政检查计划数量</div>
<div class="cont-total"><b>1,005</b><span>个</span></div> <div class="cont-total"><b><span id="program-xz-total">1,005</span></b><span>个</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-fall">&#8595</span><span class="data-change">62</span><label>较上年</label> <span class="data-fall">&#8595</span><span class="data-change" id="program-xz-huan">62</span><label>较上年</label>
</div> </div>
</div> </div>
<div class="panel-card-right"> <div class="panel-card-right">
<div class="cont-title">本单位检查计划数量</div> <div class="cont-title">本单位检查计划数量</div>
<div class="cont-total"><b>597</b><span>个</span></div> <div class="cont-total"><b><span id="program-dw-total">597</span></b><span>个</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-rise">&#8593</span><span class="data-change">26</span><label>较上年</label> <span class="data-rise">&#8593</span><span class="data-change" id="program-dw-huan">26</span><label>较上年</label>
</div> </div>
</div> </div>
</div> </div>
@ -269,24 +287,26 @@
<div class="panel-card"> <div class="panel-card">
<div class="panel-card-top"> <div class="panel-card-top">
<div class="cont-title">执法检查数量</div> <div class="cont-title">执法检查数量</div>
<div class="cont-total"><b>14,457</b><span>件</span></div> <div class="cont-total"><b><span id="regis-total">--</span></b><span>件</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-rise">&#8593</span><span class="data-change">33</span><label>较上年</label></span> <span class="data-rise">&#8593</span>
<span class="data-change" id="regis-huan">--</span><label>较上年</label>
</span>
</div> </div>
</div> </div>
<div class="panel-card-bottom"> <div class="panel-card-bottom">
<div class="panel-card-left"> <div class="panel-card-left">
<div class="cont-title">本单位检查数量</div> <div class="cont-title">本单位检查数量</div>
<div class="cont-total"><b>2,356</b><span>件</span></div> <div class="cont-total"><b><span id="regis-dw-total">--</span></b><span>件</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-rise">&#8593</span><span class="data-change">27</span><label>较上年</label> <span class="data-rise">&#8593</span><span class="data-change" id="regis-dw-huan">--</span><label>较上年</label>
</div> </div>
</div> </div>
<div class="panel-card-right"> <div class="panel-card-right">
<div class="cont-title">联合检查数量</div> <div class="cont-title">联合检查数量</div>
<div class="cont-total"><b>1,637</b><span>件</span></div> <div class="cont-total"><b><span id="regis-lh-total">--</span></b><span>件</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-rise">&#8593</span><span class="data-change">21</span><label>较上年</label> <span class="data-rise">&#8593</span><span class="data-change" id="regis-lh-huan">--</span><label>较上年</label>
</div> </div>
</div> </div>
</div> </div>
@ -295,24 +315,26 @@
<div class="panel-card"> <div class="panel-card">
<div class="panel-card-top"> <div class="panel-card-top">
<div class="cont-title">执法预警数量</div> <div class="cont-title">执法预警数量</div>
<div class="cont-total"><b>3,892</b><span>次</span></div> <div class="cont-total"><b><span id="warn-total">--</span></b><span>次</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-rise">&#8593</span><span class="data-change">199</span><label>较上年</label></span> <span class="data-rise">&#8593</span><span class="data-change" id="warn-huan">--</span><label>较上年</label></span>
</div> </div>
</div> </div>
<div class="panel-card-bottom"> <div class="panel-card-bottom">
<div class="panel-card-left"> <div class="panel-card-left">
<div class="cont-title">涉事单位数量</div> <div class="cont-title">涉事单位数量</div>
<div class="cont-total"><b>737</b><span>家</span></div> <div class="cont-total"><b><span id="warn-qy-total" class="data-change">--</span></b><span>家</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-fall">&#8595</span><span class="data-change">32</span><label>较上年</label> <span class="data-fall">&#8595</span><span class="data-change" id="warn-qy-huan">--</span><label>较上年</label>
</div> </div>
</div> </div>
<div class="panel-card-right"> <div class="panel-card-right">
<div class="cont-title">本单位发布预警数量</div> <div class="cont-title">本单位发布预警数量</div>
<div class="cont-total"><b>629</b><span>次</span></div> <div class="cont-total"><b><span id="warn-dw-total"></span></b><span>次</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-fall">&#8595</span><span class="data-change">41</span><label>较上年</label> <span class="data-fall" id="warn-dw-huan-top" style="display: none">&#8595</span>
<span class="data-rise" id="warn-dw-huan-down" style="display: none">&#8593</span>
<span class="data-change" id="warn-dw-huan">--</span><label>较上年</label>
</div> </div>
</div> </div>
</div> </div>
@ -321,24 +343,24 @@
<div class="panel-card"> <div class="panel-card">
<div class="panel-card-top"> <div class="panel-card-top">
<div class="cont-title">执法投诉数量</div> <div class="cont-title">执法投诉数量</div>
<div class="cont-total"><b>445</b><span>件</span></div> <div class="cont-total"><b><span id="complaint-total"></span></b><span>件</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-fall">&#8595</span><span class="data-change">26</span><label>较上年</label></span> <span class="data-fall">&#8595</span><span class="data-change" id="complaint-huan">--</span><label>较上年</label></span>
</div> </div>
</div> </div>
<div class="panel-card-bottom"> <div class="panel-card-bottom">
<div class="panel-card-left"> <div class="panel-card-left">
<div class="cont-title">入企不扫码投诉数量</div> <div class="cont-title">入企不扫码投诉数量</div>
<div class="cont-total"><b>79</b><span>件</span></div> <div class="cont-total"><b><span id="complaint-qy-total"></span></b><span>件</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-fall">&#8595</span><span class="data-change">11</span><label>较上年</label> <span class="data-fall">&#8595</span><span class="data-change" id="complaint-qy-huan">--</span><label>较上年</label>
</div> </div>
</div> </div>
<div class="panel-card-right"> <div class="panel-card-right">
<div class="cont-title">被投诉部门数量</div> <div class="cont-title">被投诉部门数量</div>
<div class="cont-total"><b>22</b><span>个</span></div> <div class="cont-total"><b><span id="complaint-dw-total"></span></b><span>个</span></div>
<div class="percent-tag"> <div class="percent-tag">
<span class="data-fall">&#8595</span><span class="data-change">2</span><label>较上年</label> <span class="data-fall">&#8595</span><span class="data-change" id="complaint-dw-huan">--</span><label>较上年</label>
</div> </div>
</div> </div>
</div> </div>
@ -348,11 +370,13 @@
<th:block th:include="zdxtInclude :: footer" /> <th:block th:include="zdxtInclude :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "code/enforcementInspectionProgram"; var prefix = ctx + "code/enforcementInspectionProgram";
var prefix2 = ctx + "code/statisticalPanel";
window.onload=function (){ window.onload=function (){
wTable(); // wTable();
$("#quarter").hide(); $("#quarter").hide();
$("#month").hide(); $("#month").hide();
} this.initData();
};
function restW(){ function restW(){
$('form').eq(0).trigger("reset"); $('form').eq(0).trigger("reset");
console.log($.common.formToJSON($('form').eq(0).attr('id'))); console.log($.common.formToJSON($('form').eq(0).attr('id')));
@ -361,7 +385,7 @@
} }
function timeType() { function timeType() {
var dateSearch = document.getElementById("dateSearch"); var dateSearch = document.getElementById("dateSearch");
console.log(dateSearch.value) console.log(dateSearch.value);
if(dateSearch.value=="quarter"){ if(dateSearch.value=="quarter"){
$("#quarter").show(); $("#quarter").show();
$("#month").hide(); $("#month").hide();
@ -377,6 +401,229 @@
document.getElementById("month").value=""; document.getElementById("month").value="";
} }
} }
/**
* 查询执法部门数据
*/
function queryStatisticalPanelDeptAndUser() {
$.ajax({
url: prefix2 + '/statisticalPanelDeptAndUser', //后台url
data: $("#formId").serialize(),
type: "GET",
dataType: 'json',
success: function (data) { //成功,回调函数
console.log(data.data);
var result = data.data;
if(result != null && result != undefined){
//本年数量
$("#dept-total").text(result.deptTotal);
this.showAndHide("dept-total-top","dept-total-down");
$("#user-total").text(result.userTotal);
this.showAndHide("user-total-top","user-total-down");
$("#oneself-user-total").text(result.oneselfUserTotal);
this.showAndHide("oneself-user-total-top","oneself-user-total-down");
//较上年数量
$("#dept-huan").text("-");
$("#user-huan").text("-");
$("#oneself-user-huan").text("-");
}
},
error: function (er) {}
});
}
/**
* 查询企业数据
*/
function enterprise() {
$.ajax({
url: prefix2 + '/enterprise', //后台url
data: $("#formId").serialize(),
type: "GET",
dataType: 'json',
success: function (data) { //成功,回调函数
console.log("企业数据",data.data);
var result = data.data.statisticsIndicatorPartList;
//企业
$("#enterprise-total").text(result[0].total);
$("#enterprise-huan").text(result[0].huan);
if(result[0].huan >= 0){
this.showAndHide("enterprise-total-top","enterprise-total-down");
}else{
this.showAndHide("enterprise-total-down","enterprise-total-top");
}
//注销
$("#enterprise-xc-total").text(result[1].total);
$("#enterprise-xc-huan").text(result[1].huan);
if(result[1].huan >= 0){
this.showAndHide("enterprise-xc-huan-top","enterprise-xc-huan-down");
}else{
this.showAndHide("enterprise-xc-huan-down","enterprise-xc-huan-top");
}
//续存
$("#enterprise-zx-total").text(result[2].total);
$("#enterprise-zx-huan").text(result[2].huan);
if(result[2].huan >= 0){
this.showAndHide("enterprise-zx-huan-top","enterprise-zx-huan-down");
}else{
this.showAndHide("enterprise-zx-huan-down","enterprise-zx-huan-top");
}
},
error: function (er) {}
});
}
/**
* 查询企业数据
*/
function statisticProgram() {
$.ajax({
url: prefix2 + '/statisticProgram', //后台url
data: $("#formId").serialize(),
type: "GET",
dataType: 'json',
success: function (data) { //成功,回调函数
console.log("企业数据",data.data);
var result = data.data.statisticsIndicatorPartList;
//总数量
$("#program-total").text(result[0].total);
$("#program-huan").text(result[0].huan);
if(result[0].huan >= 0){
this.showAndHide("program-huan-top","program-huan-down");
}else{
this.showAndHide("program-huan-down","program-huan-top");
}
//行政检查通知
$("#program-xz-total").text(result[1].total);
$("#program-xz-huan").text(result[1].huan);
if(result[1].huan >= 0){
this.showAndHide("program-xz-huan-top","program-xz-huan-down");
}else{
this.showAndHide("program-xz-huan-down","program-xz-huan-top");
}
//单位
$("#program-dw-total").text(result[2].total);
$("#program-dw-huan").text(result[2].huan);
if(result[2].huan >= 0){
this.showAndHide("program-dw-huan-top","program-dw-huan-down");
}else{
this.showAndHide("program-dw-huan-down","program-dw-huan-top");
}
},
error: function (er) {}
});
}
/**
* 查询执法登记数据
*/
function registration() {
$.ajax({
url: prefix2 + '/registration', //后台url
data: $("#formId").serialize(),
type: "GET",
dataType: 'json',
success: function (data) { //成功,回调函数
console.log(data.data);
var result = data.data.statisticsIndicatorPartList;
//企业
$("#regis-total").text(result[0].total);
$("#regis-huan").text(result[0].huan);
if(result[0].huan >= 0){
this.showAndHide("regis-huan-top","regis-huan-down");
}else{
this.showAndHide("regis-huan-down","regis-huan-top");
}
//注销
$("#regis-dw-total").text(result[1].total);
$("#regis-dw-huan").text(result[1].huan);
if(result[1].huan >= 0){
this.showAndHide("regis-dw-huan-top","regis-dw-huan-down");
}else{
this.showAndHide("regis-dw-huan-down","regis-dw-huan-top");
}
//续存
$("#regis-lh-total").text(result[2].total);
$("#regis-lh-huan").text(result[2].huan);
if(result[2].huan >= 0){
this.showAndHide("regis-lh-huan-top","regis-lh-huan-down");
}else{
this.showAndHide("regis-lh-huan-down","regis-lh-huan-top");
}
},
error: function (er) {}
});
}
/**
* 查询执法预警数据
*/
function warning() {
$.ajax({
url: prefix2 + '/warning', //后台url
data: $("#formId").serialize(),
type: "GET",
dataType: 'json',
success: function (data) { //成功,回调函数
console.log("预警数据",data.data);
var result = data.data.statisticsIndicatorPartList;
//企业
$("#warn-total").text(result[0].total);
$("#warn-huan").text(result[0].huan);
//注销
$("#warn-qy-total").text(result[1].total);
$("#warn-qy-huan").text(result[1].huan);
//续存
$("#warn-dw-total").text(result[2].total);
$("#warn-dw-huan").text(result[2].huan);
},
error: function (er) {}
});
}
function complaint() {
$.ajax({
url: prefix2 + '/complaint', //后台url
data: $("#formId").serialize(),
type: "GET",
dataType: 'json',
success: function (data) { //成功,回调函数
console.log("预警数据",data.data);
var result = data.data.statisticsIndicatorPartList;
//企业
$("#complaint-total").text(result[0].total);
$("#complaint-huan").text(result[0].huan);
//注销
$("#complaint-qy-total").text(result[1].total);
$("#complaint-qy-huan").text(result[1].huan);
//续存
$("#complaint-dw-total").text(result[2].total);
$("#complaint-dw-huan").text(result[2].huan);
},
error: function (er) {}
});
}
function initData() {
this.queryStatisticalPanelDeptAndUser();
this.enterprise();
this.registration();
this.warning();
this.complaint();
this.statisticProgram();
}
function showAndHide(showTarget,hideTarget) {
$("#" + showTarget).show();
$("#" + hideTarget).hide();
}
</script> </script>
</body> </body>
</html> </html>

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

@ -26,7 +26,7 @@ public class StatisticalPanelController extends BaseController {
@RequestMapping("/statisticalPanelDeptAndUser") @GetMapping("/statisticalPanelDeptAndUser")
@ResponseBody @ResponseBody
public ZDResponse statisticalPanelDeptAndUser(StatisticsIndicatorPart statisticsIndicatorPart){ public ZDResponse statisticalPanelDeptAndUser(StatisticsIndicatorPart statisticsIndicatorPart){
StatisticalPanelDto statisticalPanelDto = StatisticalPanelDto statisticalPanelDto =
@ -55,6 +55,16 @@ public class StatisticalPanelController extends BaseController {
public ZDResponse registration(StatisticsIndicatorPart statisticsIndicatorPart){ public ZDResponse registration(StatisticsIndicatorPart statisticsIndicatorPart){
return ZDResponse.success("成功",statisticalPaneService.registration(statisticsIndicatorPart)); return ZDResponse.success("成功",statisticalPaneService.registration(statisticsIndicatorPart));
} }
/**
* 登记
* @param statisticsIndicatorPart
* @return
*/
@GetMapping("/statisticProgram")
@ResponseBody
public ZDResponse statisticProgram(StatisticsIndicatorPart statisticsIndicatorPart){
return ZDResponse.success("成功",statisticalPaneService.statisticProgram(statisticsIndicatorPart));
}
/** /**
* 预警 * 预警

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

@ -1,5 +1,7 @@
package com.zdxt.code.service.impl; package com.zdxt.code.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.zdxt.auth.common.utils.StringUtils;
import com.zdxt.auth.dto.UserBean; 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;
@ -246,10 +248,13 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
//查询双系统执法人员信息 //查询双系统执法人员信息
Zfryjdm2405301 zfryjdm2405301 = Zfryjdm2405301 zfryjdm2405301 =
iZfryjdm2405301Service.selectZfryByZfCode(user.getLawCertificateNum()); iZfryjdm2405301Service.selectZfryByZfCode(user.getLawCertificateNum());
Integer oneselfUserTotal = 0;
if(BeanUtil.isNotEmpty(zfryjdm2405301)){
//通过机构代码查询执法主体信息 //通过机构代码查询执法主体信息
statisticsIndicatorPart.setCreditCode(zfryjdm2405301.getZzjgdm()); statisticsIndicatorPart.setCreditCode(zfryjdm2405301.getZzjgdm());
//本单位执法人员数量 //本单位执法人员数量
Integer oneselfUserTotal = statisticalPanelMapper.statisticalPanelOneselfDeptUser(statisticsIndicatorPart); oneselfUserTotal = statisticalPanelMapper.statisticalPanelOneselfDeptUser(statisticsIndicatorPart);
}
//默认今年 同比 对比上一年 上一个季度 上一个月 //默认今年 同比 对比上一年 上一个季度 上一个月
StatisticalPanelDto statisticalPanelDto = new StatisticalPanelDto(); StatisticalPanelDto statisticalPanelDto = new StatisticalPanelDto();
@ -288,32 +293,58 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
//统计执法计划总数 //统计执法计划总数
Integer allTotal = statisticalPanelMapper.statisticalPanelProgramTotal(statisticsIndicatorPart); Integer allTotal = statisticalPanelMapper.statisticalPanelProgramTotal(statisticsIndicatorPart);
//统计本单位执法计划总数 //统计本单位执法计划总数
Integer deptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart); Integer deptTotal = 0;
//获取执法部门ID
String s = this.takeDeptId();
if(StringUtils.isNotEmpty(s)){
statisticsIndicatorPart.setDeptId(s);
//统计本单位执法计划总数
deptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart);
statisticsIndicatorPart.setDeptId("");
}
//同比查询执法数据 //同比查询执法数据
//设置同比时间
//查询筛选条件-时间
statisticsIndicatorPart.setBeginTime(statisticsIndicatorPart2.getBeginTime());
statisticsIndicatorPart.setEndTime(statisticsIndicatorPart2.getEndTime());
//统计执法计划总数 //统计执法计划总数
Integer lastAllTotal = statisticalPanelMapper.statisticalPanelProgramTotal(statisticsIndicatorPart); Integer lastAllTotal = statisticalPanelMapper.statisticalPanelProgramTotal(statisticsIndicatorPart);
Integer lastDeptTotal = 0;
if(StringUtils.isNotEmpty(s)){
statisticsIndicatorPart.setDeptId(s);
//统计本单位执法计划总数 //统计本单位执法计划总数
Integer lastDeptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart); lastDeptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart);
statisticsIndicatorPart.setDeptId("");
}
List<StatisticsIndicatorPart> statisticsIndicatorParts = new ArrayList<>(); List<StatisticsIndicatorPart> statisticsIndicatorParts = new ArrayList<>();
//返回结果 //返回结果
//总检查计划数量结果 //总检查计划数量结果
StatisticsIndicatorPart statisticsIndicatorPart3 = new StatisticsIndicatorPart(); StatisticsIndicatorPart statisticsIndicatorPart3 = new StatisticsIndicatorPart();
statisticsIndicatorPart3.setTotal(allTotal); statisticsIndicatorPart3.setTotal(allTotal);
statisticsIndicatorPart3.setHuan((allTotal-lastAllTotal)); statisticsIndicatorPart3.setHuan((allTotal-lastAllTotal));
statisticsIndicatorParts.add(statisticsIndicatorPart3); statisticsIndicatorParts.add(statisticsIndicatorPart3);
//行政检查计划
StatisticsIndicatorPart statisticsIndicatorPart5 = new StatisticsIndicatorPart();
statisticsIndicatorPart5.setTotal(allTotal);
statisticsIndicatorPart5.setHuan((allTotal-lastAllTotal));
statisticsIndicatorParts.add(statisticsIndicatorPart5);
//本单位检查计划统计 //本单位检查计划统计
StatisticsIndicatorPart statisticsIndicatorPart4 = new StatisticsIndicatorPart(); StatisticsIndicatorPart statisticsIndicatorPart4 = new StatisticsIndicatorPart();
statisticsIndicatorPart4.setTotal(deptTotal); statisticsIndicatorPart4.setTotal(deptTotal);
statisticsIndicatorPart4.setHuan((deptTotal-lastDeptTotal)); statisticsIndicatorPart4.setHuan((deptTotal-lastDeptTotal));
statisticsIndicatorParts.add(statisticsIndicatorPart4);
//结果返回
return null; StatisticsIndicatorPart statisticsIndicatorPartResult = new StatisticsIndicatorPart();
statisticsIndicatorPartResult.setName("执法检查计划统计");
statisticsIndicatorPartResult.setStatisticsIndicatorPartList(statisticsIndicatorParts);
return statisticsIndicatorPartResult;
} }
@ -396,12 +427,15 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
String lawCertificateNum=userApi.getCurrentUser().getLawCertificateNum(); String lawCertificateNum=userApi.getCurrentUser().getLawCertificateNum();
if(lawCertificateNum!=null&&!"".equals(lawCertificateNum)){ if(lawCertificateNum!=null&&!"".equals(lawCertificateNum)){
//通过该帐号的执法证件号去查该帐号执法人员表中的信息 //通过该帐号的执法证件号去查该帐号执法人员表中的信息
String zzjgdm=iZfryjdm2405301Service.selectZfryByZfCode(lawCertificateNum).getZzjgdm(); Zfryjdm2405301 zfryjdm2405301 = iZfryjdm2405301Service.selectZfryByZfCode(lawCertificateNum);
if(BeanUtil.isNotEmpty(zfryjdm2405301)){
String zzjgdm= zfryjdm2405301.getZzjgdm();
if(zzjgdm!=null&&!"".equals(zzjgdm)){ if(zzjgdm!=null&&!"".equals(zzjgdm)){
//从信息中获取组织机构代码,以此查询sys_dept中的dept_Id //从信息中获取组织机构代码,以此查询sys_dept中的dept_Id
return iDeptService.selectDeptByCreditcode(zzjgdm).getDeptId(); return iDeptService.selectDeptByCreditcode(zzjgdm).getDeptId();
} }
} }
}
return null; return null;
} }

19
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml

@ -192,6 +192,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
<![CDATA[ create_time <= concat('%', #{endTime}, '%') ]]> <![CDATA[ create_time <= concat('%', #{endTime}, '%') ]]>
</if> </if>
<if test="year != null and year != ''">
and YEAR(create_time) = #{year}
</if>
<if test="quarter != null and quarter != '' ">
and QUARTER(create_time) = #{quarter}
</if>
<if test="month != null and month != '' ">
and DATE_FORMAT(create_time, '%Y-%m') = #{month}
</if>
AND bureau_dept_id is not null AND bureau_dept_id is not null
</where> </where>
GROUP BY bureau_dept_id GROUP BY bureau_dept_id
@ -214,6 +223,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
<![CDATA[ create_time <= concat('%', #{endTime}, '%') ]]> <![CDATA[ create_time <= concat('%', #{endTime}, '%') ]]>
</if> </if>
<if test="year != null and year != ''">
and YEAR(create_time) = #{year}
</if>
<if test="quarter != null and quarter != '' ">
and QUARTER(create_time) = #{quarter}
</if>
<if test="month != null and month != '' ">
and DATE_FORMAT(create_time, '%Y-%m') = #{month}
</if>
AND bureau_dept_id is not null AND bureau_dept_id is not null
</where> </where>
</select> </select>
@ -243,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and DATE_FORMAT(create_time, '%Y-%m') = #{month} and DATE_FORMAT(create_time, '%Y-%m') = #{month}
</if> </if>
AND bureau_dept_id is not null AND bureau_dept_id is not null
AND time_type is not null
</where> </where>
GROUP BY bureau_dept_id GROUP BY bureau_dept_id
order by total desc order by total desc

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

@ -61,8 +61,8 @@
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</if> </if>
<if test="bureauDeptId != null and bureauDeptId != '' "> <if test="deptId != null and deptId != '' ">
AND bureau_dept_id = #{bureauDeptId} AND bureau_dept_id = #{deptId}
</if> </if>
<if test="beginTime != null and beginTime != '' "> <if test="beginTime != null and beginTime != '' ">
<![CDATA[ AND create_time >= #{beginTime} ]]> <![CDATA[ AND create_time >= #{beginTime} ]]>

Loading…
Cancel
Save