Browse Source

监督端-统计修改

v4
zouyx 2 years ago
parent
commit
7c322ef7ac
  1. 435
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
  2. 3
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/deptStatic/deptStatic.html
  3. 11
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html
  4. 28
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
  5. 22
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statisticsEnterprise/statisticsEnterprise.html
  6. 129
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
  7. 9
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java
  8. 7
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComplaintStatisticsMapper.java
  9. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintStatisticsService.java
  10. 83
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java
  11. 32
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java
  12. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticsEnterpriseServiceImpl.java
  13. 16
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml
  14. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/Zfryjdm2405301Mapper.xml

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

@ -125,7 +125,6 @@
<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()" >
@ -162,13 +161,6 @@
<a class="btn btn-warning btn-sm" onclick="downloadC2()"><i class="fa fa-share-square-o"></i> 导出</a>
</li>
</ul>
<!--<ul>
<li id="complaintB" th:fragment="complaintB">
<p th:text="|${year}年|"></p>
<p th:text="|投诉数量 ${Number3}|"></p>
<p th:text="|占比总计 ${dou}|"></p>
</li>
</ul>-->
<div class="static-content" style="margin: 1% 0;">
<ul>
<li id="complaintB" th:fragment="complaintB">
@ -176,18 +168,39 @@
<p><label th:text="投诉数量"></label><b th:text="${Number3}"></b></p>
<p></i><label th:text="占比总计"></label><b th:text="${dou}"></b></p>
</li>
</ul>
<ul>
<li style="margin-top: 7px;">
<p>类型:</p>
<select id="qy" name="qy" th:with="type=${@dict.getType('address_type')}" onchange="searchComplaint2()">
<option value="type">投诉类型</option>
<option value="">全市</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
</ul>
</div>
</div>
</form>
<div class="cont-two">
<div class="cont-two" id="cont-two-1">
<table id="bootstrap-table2" style="width: 750px;"></table>
<!--<div id="container" style="width: 600px;height:450px;"></div>-->
<div class="chart-box">
<h3 class="chart-title">投诉类型数量及占比</h3>
<div id="echartComplaint" style="width: 600px;height:450px;"></div>
<div id="echartComplaint1" style="width: 600px;height:450px;"></div>
</div>
</div>
<div class="cont-two" id="cont-two-2">
<table id="bootstrap-table3" style="width: 750px;"></table>
<div class="chart-box">
<h3 class="chart-title">投诉企业所属区域数量及占比</h3>
<div id="echartComplaint2" style="width: 600px;height:450px;"></div>
</div>
</div>
<div class="cont-two" id="cont-two-3">
<table id="bootstrap-table4" style="width: 750px;"></table>
<div class="chart-box">
<h3 class="chart-title">投诉企业所属街道数量及占比</h3>
<div id="echartComplaint3" style="width: 600px;height:450px;"></div>
</div>
</div>
</div>
@ -200,7 +213,9 @@
var prefix = ctx + "code/complaintStatic";
var caseType=[[${@dict.getType('caseType')}]];
/*var myChart = echarts.init(document.getElementById('container'));*/
var myChart = echarts.init(document.getElementById('echartComplaint'));
var myChart1 = echarts.init(document.getElementById('echartComplaint1'));
var myChart2 = echarts.init(document.getElementById('echartComplaint2'));
var myChart3 = echarts.init(document.getElementById('echartComplaint3'));
var pieData;
var deptName;
window.onload = function () {
@ -211,6 +226,10 @@
$('#detail').hide();
rTable1();
rTable2();
$('#cont-two-1').show();
$('#cont-two-2').hide();
$('#cont-two-3').hide();
rTable2();
}
$(function() {
var options1 = {
@ -226,38 +245,11 @@
columns: [
{
field : 'complaintDepartment',
title : '被投诉对象'
title : '被投诉对象',
align : 'left',
width : 1050,
},
/*{
field : 'complaintType',
title : '投诉类型',
formatter:function (value,row,index) {
console.log(row.complaintDepartment);
var rowName=row.complaintDepartment;
var cName=document.getElementById('cType').value
if(cName==null||cName==""||cName==undefined){
if(row.complaintDepartment==null||row.complaintDepartment==""||row.complaintDepartment==undefined){
return '<span style="cursor: pointer;color: blue;" ONCLICK="sComplaint(\'' + '空' + '\')">'+'全部'+'</span>';
}else {
return '<span style="cursor: pointer;color: blue;" ONCLICK="sComplaint(\'' + row.complaintDepartment + '\')">'+'全部'+'</span>';
}
}
for(let i=0;i<caseType.length;i++){
if(cName==caseType[i].dictValue){
if(row.complaintDepartment==null||row.complaintDepartment==""||row.complaintDepartment==undefined){
return '<span style="cursor: pointer;color: blue;" ONCLICK="sComplaint(\'' + '空' + '\')">'+caseType[i].dictLabel+'</span>';
}else {
return '<span style="cursor: pointer;color: blue;" ONCLICK="sComplaint(\'' + row.complaintDepartment + '\')">'+caseType[i].dictLabel+'</span>';
}
}
}
if(row.complaintDepartment==null||row.complaintDepartment==""||row.complaintDepartment==undefined){
return '<span style="cursor: pointer;color: blue;" ONCLICK="sComplaint(\'' + '空' + '\')">'+cName+'</span>';
}else {
return '<span style="cursor: pointer;color: blue;" ONCLICK="sComplaint(\'' + row.complaintDepartment + '\')">'+cName+'</span>';
}
}
},*/
{
field : 'total',
title : '投诉数量',
@ -271,25 +263,13 @@
});
$(function() {
var options2 = {
//url: prefix + "/list2",
modalName: "投诉类型统计",
//method: 'post',
/*queryParams: function (params) {
return {
dateSearch:params.dateSearch,
month:params.month,
quarter:params.quarter,
year:params.year
};
},
queryParamsType:"",*/
sidePagination: "server",
showHeader: true,
showFooter: false,
showColumns: false,
showRefresh: false,
showToggle: false,
//quarterBoolean:quarterBoolean,
columns: [
{
field : 'name',
@ -307,6 +287,58 @@
}
$("#bootstrap-table2").bootstrapTable(options2);
});
$(function() {
var options = {
modalName: "投诉企业所属区域统计",
sidePagination: "server",
showHeader: true,
showFooter: false,
showColumns: false,
showRefresh: false,
showToggle: false,
columns: [
{
field : 'name',
title : '投诉企业所属区域'
},
{
field : 'numInt',
title : '投诉数量'
},
{
field : 'percentage',
title : '占比'
},
]
}
$("#bootstrap-table3").bootstrapTable(options);
});
$(function() {
var options = {
modalName: "投诉企业所属街道统计",
sidePagination: "server",
showHeader: true,
showFooter: false,
showColumns: false,
showRefresh: false,
showToggle: false,
columns: [
{
field : 'name',
title : '投诉企业所属街道'
},
{
field : 'numInt',
title : '投诉数量'
},
{
field : 'percentage',
title : '占比'
},
]
}
$("#bootstrap-table4").bootstrapTable(options);
});
$(function() {
var options3 = {
modalName: "类型显示",
@ -346,13 +378,6 @@
}
return string;
}else{
/*let list=["http://localhost:8080/","D:/code/zdxt/zdxtLawEnforcementCode/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/template/a6c39541059498889daec9d3acd601a.png","/profile//2024/01/11/35082e876f84a21f40f075adf4f0da30.png"];
let string='';
if (list.length > 0) {
for (let i = 0; i < list.length; i++) {
string = string + '<img style="cursor: pointer;" src="' + list[i] + '" @click="openPicture(\''+list[i]+'\')"></img>';
}
}*/
return null;
}
}
@ -380,10 +405,18 @@
function dataMake(res){
var newData=[];
for(let i=0;i<res.length;i++){
let d={};
d.name=res[i].name;
d.value=res[i].numInt;
d.percentage=res[i].percentage;
/*if(res[i].numInt>0) {
let d = {};
d.name = res[i].name;
d.value = res[i].numInt;
d.percentage = res[i].percentage;
console.log(d)
newData.push(d);
}*/
let d = {};
d.name = res[i].name;
d.value = res[i].numInt;
d.percentage = res[i].percentage;
console.log(d)
newData.push(d);
}
@ -413,9 +446,27 @@
})
}
function searchComplaint2 () {
rTable2();
var qy = document.getElementById("qy");
console.log(qy.value)
if(qy.value==""){
$('#cont-two-1').hide();
$('#cont-two-2').show();
$('#cont-two-3').hide();
rTable3();
}else if(qy.value=="type"){
$('#cont-two-1').show();
$('#cont-two-2').hide();
$('#cont-two-3').hide();
rTable2();
}else{
$('#cont-two-1').hide();
$('#cont-two-2').hide();
$('#cont-two-3').show();
rTable4();
}
var currentId=$('form').eq(1).attr('id');
var params = $.common.formToJSON(currentId);
params.qy=qy.value;
$.ajax({
url:prefix+'/searchType2',
type:'GET',
@ -455,14 +506,26 @@
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
color: ['#1f74f1', '#79e24a', '#41d5d3', '#f59036', '#fed100', '#ababac'],
/*color: ['#1f74f1', '#79e24a', '#41d5d3', '#f59036', '#fed100', '#ababac'],*/
color: [
'#9aa690', '#f4d1d7', '#c2cedc', '#e6d6d9',
'#686789', '#91a0a5', '#b57c82', '#feecd8',
'#ab545a', '#9fabb9', '#ecced0', '#8a95a9',
'#858FAC', '#B1722D',
],
series: [{
top: '5%',
left: '20%',
/*top: '5%',
left: '20%',*/
top:'-7%',
type: 'pie',
name: '名称',
radius: ['28%', '36%'],
center: ['50%', '30%'],
/*radius: ['28%', '36%'],
center: ['50%', '30%'],*/
radius:'65%',
itemStyle:{
borderWidth:2, //设置border的宽度有多大
borderColor:'#fff',
},
label: {
formatter: '{b}: {c} ({d}%)',
borderWidth: 1,
@ -481,7 +544,130 @@
data: pieData,
}]
}
myChart.setOption(option3);
myChart1.setOption(option3);
},
error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
function rTable3(){
var currentId=$('form').eq(1).attr('id')
var params = $.common.formToJSON(currentId);
params.qy=null;
$.ajax({
url: prefix + "/qyComplaintList",
method: 'post',
data:params,
success:function (response){
$('#bootstrap-table3').bootstrapTable('load', response);
pieData=dataMake(response.rows);
console.log(pieData);
var option = {
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
/*color: ['#1f74f1', '#79e24a', '#41d5d3', '#f59036', '#fed100', '#ababac'],*/
color: [
'#9aa690', '#f4d1d7', '#c2cedc', '#e6d6d9',
'#686789', '#91a0a5', '#b57c82', '#feecd8',
'#ab545a', '#9fabb9', '#ecced0', '#8a95a9',
'#858FAC', '#B1722D',
],
series: [{
/*top: '5%',
left: '20%',*/
top:'-7%',
type: 'pie',
name: '名称',
/*radius: ['28%', '36%'],
center: ['50%', '30%'],*/
radius:'65%',
itemStyle:{
borderWidth:2, //设置border的宽度有多大
borderColor:'#fff',
},
label: {
formatter: '{b}: {c} ({d}%)',
borderWidth: 1,
borderRadius: 4,
color: '#4F4F4F',
fontFamily: 'PingFangSC-Regular',
fontSize: '14',
rich: {
a: {
color: '#4F4F4F',
lineHeight: 18,
align: 'center'
}
}
},
data: pieData,
}]
}
myChart2.setOption(option);
},
error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})
}
function rTable4(){
var currentId=$('form').eq(1).attr('id')
var params = $.common.formToJSON(currentId);
$.ajax({
url: prefix + "/jdComplaintList",
method: 'post',
data:params,
success:function (response){
$('#bootstrap-table4').bootstrapTable('load', response);
pieData=dataMake(response.rows);
console.log(pieData);
var option = {
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
/*color: ['#1f74f1', '#79e24a', '#41d5d3', '#f59036', '#fed100', '#ababac'],*/
color: [
'#9aa690', '#f4d1d7', '#c2cedc', '#e6d6d9',
'#686789', '#91a0a5', '#b57c82', '#feecd8',
'#ab545a', '#9fabb9', '#ecced0', '#8a95a9',
'#858FAC', '#B1722D',
],
series: [{
/*top: '5%',
left: '20%',*/
top:'-7%',
type: 'pie',
name: '名称',
/*radius: ['28%', '36%'],
center: ['50%', '30%'],*/
radius:'65%',
itemStyle:{
borderWidth:2, //设置border的宽度有多大
borderColor:'#fff',
},
label: {
formatter: '{b}: {c} ({d}%)',
borderWidth: 1,
borderRadius: 4,
color: '#4F4F4F',
fontFamily: 'PingFangSC-Regular',
fontSize: '14',
rich: {
a: {
color: '#4F4F4F',
lineHeight: 18,
align: 'center'
}
}
},
data: pieData,
}]
}
myChart3.setOption(option);
},
error:function (xhr,status,error){
console.error("请求失败:",status,error);
@ -559,9 +745,30 @@
}
function complaintRest2(){
$('form').eq(1).trigger("reset");
searchComplaint2()
timeType2();
document.getElementById("qy").value="type";
searchComplaint2();
}
/*function typeMake(){
var qy = document.getElementById("qy");
console.log(qy.value)
if(qy.value==""){
$('#cont-two-1').hide();
$('#cont-two-2').show();
$('#cont-two-3').hide();
rTable3();
}else if(qy.value=="type"){
$('#cont-two-1').show();
$('#cont-two-2').hide();
$('#cont-two-3').hide();
rTable2();
}else{
$('#cont-two-1').hide();
$('#cont-two-2').hide();
$('#cont-two-3').show();
rTable4();
}
}*/
function downloadC1(){
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
@ -589,24 +796,64 @@
var currentId=$('form').eq(1).attr('id');
var params = $.common.formToJSON(currentId);
delete params.dateSearch;
$.ajax({
type: "POST",
data: JSON.stringify(params),
contentType: 'application/json',
//设置响应类型
xhrFields: {responseType: "blob"},
url: prefix+"/export2",
success: function (result) {
const link = document.createElement('a');
let blob = new Blob([result], {type: 'application/vnd.ms-excel'});
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
link.setAttribute('download', "投诉类型统计.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
}
})
if(document.getElementById("qy").value=="type") {
$.ajax({
type: "POST",
data: JSON.stringify(params),
contentType: 'application/json',
//设置响应类型
xhrFields: {responseType: "blob"},
url: prefix + "/export2",
success: function (result) {
const link = document.createElement('a');
let blob = new Blob([result], {type: 'application/vnd.ms-excel'});
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
link.setAttribute('download', "投诉类型统计.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
}
})
}else if(document.getElementById("qy").value==""){
$.ajax({
type: "POST",
data: JSON.stringify(params),
contentType: 'application/json',
//设置响应类型
xhrFields: {responseType: "blob"},
url: prefix + "/export3",
success: function (result) {
const link = document.createElement('a');
let blob = new Blob([result], {type: 'application/vnd.ms-excel'});
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
link.setAttribute('download', "投诉企业所属区域统计.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
}
})
}else{
$.ajax({
type: "POST",
data: JSON.stringify(params),
contentType: 'application/json',
//设置响应类型
xhrFields: {responseType: "blob"},
url: prefix + "/export4",
success: function (result) {
const link = document.createElement('a');
let blob = new Blob([result], {type: 'application/vnd.ms-excel'});
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
link.setAttribute('download', "投诉企业所属街道统计.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
}
})
}
}
</script>

3
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/deptStatic/deptStatic.html

@ -82,7 +82,8 @@
},*/
{
field : 'zfdw',
title : '部门名称'
title : '部门名称',
align: 'left',
},
{
field : 'name',

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

@ -606,11 +606,12 @@
color: ['#1f74f1', '#79e24a', '#41d5d3', '#f59036', '#fed100', '#ababac'],
series: [{
top: '20%',
left: '20%',
/*left: '20%',*/
type: 'pie',
name: '名称',
radius: ['30%', '45%'],
center: ['50%', '55%'],
/*radius: ['30%', '45%'],
center: ['50%', '55%'],*/
radius: '65%',
label: {
formatter: '{b}: {c} ({d}%)',
borderWidth: 1,
@ -626,6 +627,10 @@
}
}
},
itemStyle:{
borderWidth:2, //设置border的宽度有多大
borderColor:'#fff',
},
data: response,
}]
};

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

@ -106,6 +106,7 @@
<ul>
<li id="b">
<p><span id="yearDate"></span>:</p>
<p><label>年度计划</label><b><span id="total">0</span></b></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>
@ -139,15 +140,15 @@
</ul>
</div>
</form>
<div class="chart-box">
<div class="chart-box" id="chart-box-1">
<h3><span id="echarts1-title" class="chart-title"></span>年年度检查计划排行(TOP10)</h3>
<div class="echarts" id="echars2"></div>
</div>
<div class="chart-box">
<div class="chart-box" id="chart-box-2">
<h3 class="chart-title"><span id="echarts2-title" class="chart-title"></span>年季度检查计划排行(TOP10)</h3>
<div class="echarts" id="echars3"></div>
</div>
<div class="chart-box" style="width: 100%;">
<div class="chart-box" style="width: 100%;" id="chart-box-3">
<h3 class="chart-title"><span id="echarts3-title" class="chart-title"></span>年月度检查计划排行(TOP10)</h3>
<div class="echarts" id="echars4"></div>
</div>
@ -177,6 +178,9 @@
$("#quarter").hide();
$("#month").hide();
$("#select-time").hide();
$("#chart-box-1").hide();
$("#chart-box-2").hide();
$("#chart-box-3").hide();
echartsTotal();
};
@ -187,6 +191,15 @@
menu.className = i == cursel ? "actit" : "";
con.style.zIndex = i == cursel ? "1" : "-999";
}
if(cursel==2){
$("#chart-box-1").show();
$("#chart-box-2").show();
$("#chart-box-3").show();
}else if(cursel==1){
$("#chart-box-1").hide();
$("#chart-box-2").hide();
$("#chart-box-3").hide();
}
}
/** 检查事项 */
@ -200,10 +213,13 @@
console.log(data.data);
var e = data.data;
if(e != "undefined" && e != null){
let total=e.yearTotal+e.quarterTotal+e.monthTotal;
$("#total").text(total);
$("#yearTotal").text(e.yearTotal);
$("#quarterTotal").text(e.quarterTotal);
$("#monthTotal").text(e.monthTotal);
}else {
$("#total").text(0);
$("#yearTotal").text(0);
$("#quarterTotal").text(0);
$("#monthTotal").text(0);
@ -382,6 +398,12 @@
return "<div style='text-align: left'>"+ value +"</div>";
}
},
{
field : 'total',
title : '总数',
align : 'center',
width: 259,
},
{
field : 'yearTotal',
title : '年度计划',

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

@ -332,6 +332,13 @@
//data:params,
success:function (response){
$('#bootstrap-table2').bootstrapTable('load', response);
var eData=[];
for(let i=0;i<response.length;i++){
if(response[i].value>0){
eData.push(response[i]);
}
}
console.log(eData);
var option3 = {
/*color:['#1874CD','#3A5FCD','#436EEE','#4876FF','#1E90FF'],*/
/*tooltip: {},
@ -365,12 +372,13 @@
},*/
color: ['#1f74f1', '#79e24a', '#41d5d3', '#f59036', '#fed100', '#ababac'],
series: [{
top: '5%',
left: '20%',
top: '-7%',
/*left: '20%',*/
type: 'pie',
name: '名称',
radius: ['28%', '36%'],
center: ['50%', '30%'],
/*radius: ['28%', '36%'],
center: ['50%', '30%'],*/
radius: '70%',
label: {
formatter: '{b}: {c} ({d}%)',
borderWidth: 1,
@ -386,7 +394,11 @@
}
}
},
data: response,
itemStyle:{
borderWidth:2, //设置border的宽度有多大
borderColor:'#fff',
},
data: eData,
}]
}
myChart.setOption(option3);

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

@ -1,5 +1,6 @@
package com.zdxt.code.controller;
import cn.hutool.core.util.StrUtil;
import com.zdxt.auth.feign.ZdxtFileCommonApi;
import com.zdxt.auth.framework.web.domain.AjaxResult;
import com.zdxt.auth.project.system.dept.service.IDeptService;
@ -87,7 +88,13 @@ public class ComplaintStaticController extends BaseController {
public String searchType2(SearchType searchType,Model model){
model.addAttribute("year",searchType.getYear());
ComplaintStatistics complaintStatistics=dateMake(searchType);
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics);//权限
List<ComplaintStatistics> complaintStatisticsList =new ArrayList<>();
if(StrUtil.hasEmpty(searchType.getQy()) || searchType.getQy().equals("type")) {
complaintStatisticsList = complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics);//权限
}else{
String qy=dictDataMapper.selectDictLabel("address_type",searchType.getQy());
complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).stream().filter(item -> (!StrUtil.hasEmpty(item.getEnterpriseAddress()))&&(item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "新区"))).collect(Collectors.toList());
}
model.addAttribute("Number3",complaintStatisticsList.size());
model.addAttribute("dou","100%");
return prefix+"/complaintB";
@ -220,7 +227,107 @@ public class ComplaintStaticController extends BaseController {
styleRow2.setBorderLeft(BorderStyle.THIN);
styleRow2.setFont(font2);
//设置表头
String[] headerList = {"企业类型", "企业数量", "占比"};
String[] headerList = {"投诉类型", "企业数量", "占比"};
HSSFRow headerRow = sheet.createRow(0);
for (int i = 0; i < headerList.length; i++) {
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
for(int i=0;i<statisticsIndicatorList.size();i++){
HSSFRow row = sheet.createRow(i+1);
row.createCell(0).setCellValue(statisticsIndicatorList.get(i).getName());
row.createCell(1).setCellValue(statisticsIndicatorList.get(i).getNumInt());
row.createCell(2).setCellValue(statisticsIndicatorList.get(i).getPercentage());
}
httpServletResponse.setCharacterEncoding("UTF-8");
httpServletResponse.setContentType("application/vnd.ms-excel");
httpServletResponse.setHeader("Content-disposition", "attachment;filename=" + fileName);
httpServletResponse.flushBuffer();
workbook.write(httpServletResponse.getOutputStream());
workbook.close();
}
@PostMapping("/export3")
@ResponseBody
public void export3(HttpServletResponse httpServletResponse,@RequestBody SearchType searchType) throws IOException {
ComplaintStatistics complaintStatistics=dateMake(searchType);
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsLEFTEnterpriseList(complaintStatistics);//权限
List<StatisticsIndicator> statisticsIndicatorList=complaintStatisticsService.qyComplaintList(complaintStatisticsList,searchType);
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet("投诉企业所属区域统计");
//设置文件名称
String fileName = "投诉企业所属区域统计.xls";
//自适应列宽
sheet.setDefaultColumnWidth(20);//全局
//表头样式
HSSFFont font2=workbook.createFont();
font2.setFontName("微软雅黑");
font2.setBold(true);
font2.setFontHeightInPoints((short) 11);
HSSFCellStyle styleRow2=workbook.createCellStyle();
styleRow2.setWrapText(true);//换行
styleRow2.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
styleRow2.setFillPattern(FillPatternType.SOLID_FOREGROUND);
styleRow2.setAlignment(HorizontalAlignment.CENTER);
styleRow2.setVerticalAlignment(VerticalAlignment.CENTER);
styleRow2.setBorderTop(BorderStyle.THIN);
styleRow2.setBorderRight(BorderStyle.THIN);
styleRow2.setBorderBottom(BorderStyle.THIN);
styleRow2.setBorderLeft(BorderStyle.THIN);
styleRow2.setFont(font2);
//设置表头
String[] headerList = {"投诉企业所属区域", "企业数量", "占比"};
HSSFRow headerRow = sheet.createRow(0);
for (int i = 0; i < headerList.length; i++) {
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
cell.setCellStyle(styleRow2);
}
for(int i=0;i<statisticsIndicatorList.size();i++){
HSSFRow row = sheet.createRow(i+1);
row.createCell(0).setCellValue(statisticsIndicatorList.get(i).getName());
row.createCell(1).setCellValue(statisticsIndicatorList.get(i).getNumInt());
row.createCell(2).setCellValue(statisticsIndicatorList.get(i).getPercentage());
}
httpServletResponse.setCharacterEncoding("UTF-8");
httpServletResponse.setContentType("application/vnd.ms-excel");
httpServletResponse.setHeader("Content-disposition", "attachment;filename=" + fileName);
httpServletResponse.flushBuffer();
workbook.write(httpServletResponse.getOutputStream());
workbook.close();
}
@PostMapping("/export4")
@ResponseBody
public void export4(HttpServletResponse httpServletResponse,@RequestBody SearchType searchType) throws IOException {
ComplaintStatistics complaintStatistics=dateMake(searchType);
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsLEFTEnterpriseList(complaintStatistics);//权限
List<StatisticsIndicator> statisticsIndicatorList=complaintStatisticsService.jdComplaintList(complaintStatisticsList,searchType);
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet("投诉企业所属街道统计");
//设置文件名称
String fileName = "投诉企业所属街道统计.xls";
//自适应列宽
sheet.setDefaultColumnWidth(20);//全局
//表头样式
HSSFFont font2=workbook.createFont();
font2.setFontName("微软雅黑");
font2.setBold(true);
font2.setFontHeightInPoints((short) 11);
HSSFCellStyle styleRow2=workbook.createCellStyle();
styleRow2.setWrapText(true);//换行
styleRow2.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
styleRow2.setFillPattern(FillPatternType.SOLID_FOREGROUND);
styleRow2.setAlignment(HorizontalAlignment.CENTER);
styleRow2.setVerticalAlignment(VerticalAlignment.CENTER);
styleRow2.setBorderTop(BorderStyle.THIN);
styleRow2.setBorderRight(BorderStyle.THIN);
styleRow2.setBorderBottom(BorderStyle.THIN);
styleRow2.setBorderLeft(BorderStyle.THIN);
styleRow2.setFont(font2);
//设置表头
String[] headerList = {"投诉企业所属街道", "企业数量", "占比"};
HSSFRow headerRow = sheet.createRow(0);
for (int i = 0; i < headerList.length; i++) {
HSSFCell cell = headerRow.createCell(i);
@ -294,6 +401,24 @@ public class ComplaintStaticController extends BaseController {
List<ComplaintStatistics> list=complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics);
return getDataTable(list);
}
@RequiresPermissions("code:complaintStatic:list")
@PostMapping("/qyComplaintList")
@ResponseBody
public TableDataInfo qyComplaintList(SearchType searchType) {
ComplaintStatistics complaintStatistics=dateMake(searchType);
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsLEFTEnterpriseList(complaintStatistics);//权限
return getDataTable(complaintStatisticsService.qyComplaintList(complaintStatisticsList,searchType));
}
@RequiresPermissions("code:complaintStatic:list")
@PostMapping("/jdComplaintList")
@ResponseBody
public TableDataInfo jdComplaintList(SearchType searchType) {
ComplaintStatistics complaintStatistics=dateMake(searchType);
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsLEFTEnterpriseList(complaintStatistics);//权限
return getDataTable(complaintStatisticsService.jdComplaintList(complaintStatisticsList,searchType));
}
public List<Integer> yearMake(){
int current=LocalDate.now().getYear();
List<Integer> yearList=new ArrayList<>();

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

@ -164,7 +164,7 @@ public class EnforcementInspectionProgramController extends BaseController
styleRow2.setBorderLeft(BorderStyle.THIN);
styleRow2.setFont(font2);
//设置表头
String[] headerList = {"执法部门", "年度计划", "季度计划", "月度计划"};
String[] headerList = {"执法部门","总数", "年度计划", "季度计划", "月度计划"};
HSSFRow headerRow = sheet.createRow(0);
for (int i = 0; i < headerList.length; i++) {
HSSFCell cell = headerRow.createCell(i);
@ -175,9 +175,10 @@ public class EnforcementInspectionProgramController extends BaseController
for(int i=0;i<enforcementInspectionProgramDtos.size();i++){
HSSFRow row = sheet.createRow(i+1);
row.createCell(0).setCellValue(enforcementInspectionProgramDtos.get(i).getBureauDeptName());
row.createCell(1).setCellValue(enforcementInspectionProgramDtos.get(i).getYearTotal());
row.createCell(2).setCellValue(enforcementInspectionProgramDtos.get(i).getQuarterTotal());
row.createCell(3).setCellValue(enforcementInspectionProgramDtos.get(i).getMonthTotal());
row.createCell(1).setCellValue(enforcementInspectionProgramDtos.get(i).getTotal());
row.createCell(2).setCellValue(enforcementInspectionProgramDtos.get(i).getYearTotal());
row.createCell(3).setCellValue(enforcementInspectionProgramDtos.get(i).getQuarterTotal());
row.createCell(4).setCellValue(enforcementInspectionProgramDtos.get(i).getMonthTotal());
}
httpServletResponse.setCharacterEncoding("UTF-8");
httpServletResponse.setContentType("application/vnd.ms-excel");

7
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComplaintStatisticsMapper.java

@ -22,4 +22,11 @@ public interface ComplaintStatisticsMapper {
Integer insertComplaintStatistics(ComplaintStatistics complaintStatistics);
List<ComplaintStatistics> selectAppComplaintStatisticsP1(SearchType searchType);
/**
* 投诉统计表联企业信息表,获取企业注册地
* @param complaintStatistics
* @return
*/
List<ComplaintStatistics> selectComplaintStatisticsLEFTEnterpriseList(ComplaintStatistics complaintStatistics);
}

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintStatisticsService.java

@ -15,9 +15,15 @@ public interface ComplaintStatisticsService {
List<ComplaintStatistics> selectComplaintStatisticsGroupByType(ComplaintStatistics complaintStatistics);
List<ComplaintStatistics> selectComplaintStatisticsLEFTEnterpriseList(ComplaintStatistics complaintStatistics);
void insertComplaintStatistics(EnterpriseComplaint enterpriseComplaint);
List<StatisticsIndicator> type(List<ComplaintStatistics> complaintStatisticsList);
List<StatisticsIndicator> qyComplaintList(List<ComplaintStatistics> complaintStatisticsList,SearchType searchType);
List<StatisticsIndicator> jdComplaintList(List<ComplaintStatistics> complaintStatisticsList,SearchType searchType);
List<ComplaintStatistics> list1(SearchType searchType, ComplaintStatistics complaintStatistics);
}

83
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java

@ -1,5 +1,6 @@
package com.zdxt.code.service.impl;
import cn.hutool.core.util.StrUtil;
import com.zdxt.auth.project.system.dept.service.IDeptService;
import com.zdxt.auth.project.system.dict.mapper.DictDataMapper;
import com.zdxt.code.domain.ComplaintStatistics;
@ -40,6 +41,10 @@ public class ComplaintStatisticsImpl implements ComplaintStatisticsService {
return complaintStatisticsMapper.selectComplaintStatisticsGroupByType(complaintStatistics);
}
@Override
public List<ComplaintStatistics> selectComplaintStatisticsLEFTEnterpriseList(ComplaintStatistics complaintStatistics){
return complaintStatisticsMapper.selectComplaintStatisticsLEFTEnterpriseList(complaintStatistics);
}
@Override
public void insertComplaintStatistics(EnterpriseComplaint enterpriseComplaint) {
SimpleDateFormat str = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(enterpriseComplaint.getRelId()==null||"".equals(enterpriseComplaint.getRelId())){//入企不扫码
@ -135,7 +140,7 @@ public class ComplaintStatisticsImpl implements ComplaintStatisticsService {
Map<Integer,Long> map=complaintStatisticsList.stream().collect(Collectors.groupingBy(item->item.getEnforceType()==null?100:item.getEnforceType(),Collectors.counting()));
Map<String,String> dictDataMap=dictDataMapper.selectDictDataByType("caseType").stream().collect(Collectors.toMap(DictData::getDictValue,DictData::getDictLabel));
List<StatisticsIndicator> list=new ArrayList<>();
for(int i:map.keySet()){
/* for(int i:map.keySet()){
StatisticsIndicator s=new StatisticsIndicator();
if(i==100){
s.setName("");
@ -151,10 +156,86 @@ public class ComplaintStatisticsImpl implements ComplaintStatisticsService {
s.setPercentage((double)map.get(i)/number);
}
list.add(s);
}*/
for(String s:dictDataMap.keySet()){
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();
if(map.containsKey(Integer.parseInt(s))){
statisticsIndicator.setName(dictDataMap.get(s));
statisticsIndicator.setNumInt(Integer.parseInt(map.get(Integer.parseInt(s))+""));
statisticsIndicator.setPercentage((double)map.get(Integer.parseInt(s))/number);
map.remove(Integer.parseInt(s));
}else{
statisticsIndicator.setName(dictDataMap.get(s));
}
list.add(statisticsIndicator);
}
if(!map.isEmpty()){
int num=0;
for(int i:map.keySet()){
num=num+Integer.parseInt(map.get(i)+"");
}
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();
statisticsIndicator.setName("");
statisticsIndicator.setNumInt(num);
statisticsIndicator.setPercentage((double)num/number);
list.add(statisticsIndicator);
}
return list;
}
@Override
public List<StatisticsIndicator> qyComplaintList(List<ComplaintStatistics> complaintStatisticsList, SearchType searchType){
List<DictData> dictDataList=dictDataMapper.selectDictDataByType("address_type");
List<StatisticsIndicator> statisticsIndicatorList=new ArrayList<>();
List<ComplaintStatistics> fitterNullList=complaintStatisticsList.stream().filter(item -> !StrUtil.hasEmpty(item.getEnterpriseAddress())).collect(Collectors.toList());
List<ComplaintStatistics> complaintStatisticsAfterList=fitterNullList;
for(DictData dictData:dictDataList){
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();
statisticsIndicator.setName(dictData.getDictLabel());
if(!complaintStatisticsAfterList.isEmpty()) {
List<ComplaintStatistics> list = complaintStatisticsAfterList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + dictData.getDictLabel().substring(0, dictData.getDictLabel().indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + dictData.getDictLabel().substring(0, dictData.getDictLabel().indexOf("区")) + "新区")).collect(Collectors.toList());
statisticsIndicator.setNumInt(list.size());
statisticsIndicator.setPercentage((double) list.size() / complaintStatisticsList.size());
complaintStatisticsAfterList= complaintStatisticsAfterList.stream().filter(item -> !(item.getEnterpriseAddress().startsWith("深圳市" + dictData.getDictLabel().substring(0, dictData.getDictLabel().indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + dictData.getDictLabel().substring(0, dictData.getDictLabel().indexOf("区")) + "新区"))).collect(Collectors.toList());
}
statisticsIndicatorList.add(statisticsIndicator);
}
if(complaintStatisticsAfterList.size()+(complaintStatisticsList.size()- fitterNullList.size())>0){
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();
statisticsIndicator.setName("其他");
statisticsIndicator.setNumInt(complaintStatisticsAfterList.size()+(complaintStatisticsList.size()- fitterNullList.size()));
statisticsIndicator.setPercentage((double) (complaintStatisticsAfterList.size()+(complaintStatisticsList.size()- fitterNullList.size()))/ complaintStatisticsList.size());
statisticsIndicatorList.add(statisticsIndicator);
}
return statisticsIndicatorList;
}
@Override
public List<StatisticsIndicator> jdComplaintList(List<ComplaintStatistics> complaintStatisticsList, SearchType searchType){
String qy=dictDataMapper.selectDictLabel("address_type",searchType.getQy());
List<DictData> dictDataList=dictDataMapper.selectDictDataByType(searchType.getQy());
List<StatisticsIndicator> statisticsIndicatorList=new ArrayList<>();
complaintStatisticsList=complaintStatisticsList.stream().filter(item -> (!StrUtil.hasEmpty(item.getEnterpriseAddress()))&&(item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "区") || item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "新区"))).collect(Collectors.toList());
List<ComplaintStatistics> complaintStatisticsAfterList=complaintStatisticsList;
for(DictData dictData:dictDataList){
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();
statisticsIndicator.setName(dictData.getDictLabel());
if(!complaintStatisticsAfterList.isEmpty()) {
List<ComplaintStatistics> list = complaintStatisticsAfterList.stream().filter(item -> item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "区"+dictData.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "新区"+dictData.getDictLabel())).collect(Collectors.toList());
statisticsIndicator.setNumInt(list.size());
statisticsIndicator.setPercentage((double) list.size() / complaintStatisticsList.size());
complaintStatisticsAfterList= complaintStatisticsAfterList.stream().filter(item -> !(item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "区"+dictData.getDictLabel()) || item.getEnterpriseAddress().startsWith("深圳市" + qy.substring(0, qy.indexOf("区")) + "新区"+dictData.getDictLabel()))).collect(Collectors.toList());
}
statisticsIndicatorList.add(statisticsIndicator);
}
if(!complaintStatisticsAfterList.isEmpty()){
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();
statisticsIndicator.setName("其他");
statisticsIndicator.setNumInt(complaintStatisticsAfterList.size());
statisticsIndicator.setPercentage((double) (complaintStatisticsAfterList.size()) / complaintStatisticsList.size());
statisticsIndicatorList.add(statisticsIndicator);
}
return statisticsIndicatorList;
}
@Override
public List<ComplaintStatistics> list1(SearchType searchType,ComplaintStatistics complaintStatistics){
if(searchType.getcType()!=null&&!"".equals(searchType.getcType())) {
complaintStatistics.setEnforceType(Integer.parseInt(searchType.getcType()));

32
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java

@ -717,7 +717,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
styleRow2.setBorderLeft(BorderStyle.THIN);
styleRow2.setFont(font2);
//设置表头
String[] headerList = {"区域", "街道", "执法部门", "执法人员","企业名称","检查事项","联合检查","行政检查类别","是否扫码","未扫码原因","是否投诉","检查时间"};
String[] headerList = {"被检查企业名称","企业所属区域", "企业所属街道", "执法部门", "执法人员","检查事项","检查时间","联合检查","行政检查类别","是否扫码","未扫码原因","是否投诉"};
HSSFRow headerRow = sheet.createRow(0);
for (int i = 0; i < headerList.length; i++) {
HSSFCell cell = headerRow.createCell(i);
@ -732,12 +732,14 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
EnforcementRegistration e=enforcementRegistrationList.get(i);
HSSFRow row = sheet.createRow(i+1);
HSSFCell cell1 = row.createCell(0);
cell1.setCellValue(e.getQy());
cell1.setCellValue(e.getEnterpriseName());
HSSFCell cell2 = row.createCell(1);
cell2.setCellValue(e.getJd());
cell2.setCellValue(e.getQy());
HSSFCell cell3 = row.createCell(2);
cell3.setCellValue(e.getBureauDeptName());
cell3.setCellValue(e.getJd());
HSSFCell cell4 = row.createCell(3);
cell4.setCellValue(e.getBureauDeptName());
HSSFCell cell5 = row.createCell(4);
String name="";
if(!"".equals(e.getLawEnforcer())&&e.getLawEnforcer()!=null){
name=e.getLawEnforcer();
@ -748,40 +750,40 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
if(!"".equals(e.getLawEnforcerTwo())&&e.getLawEnforcerTwo()!=null){
name=name+e.getLawEnforcerTwo();
}
cell4.setCellValue(name);
HSSFCell cell5 = row.createCell(4);
cell5.setCellValue(e.getEnterpriseName());
cell5.setCellValue(name);
HSSFCell cell6 = row.createCell(5);
cell6.setCellValue(e.getLawEnforcementItemText());
HSSFCell cell7 = row.createCell(6);
HSSFCell cell12 = row.createCell(6 );
cell12.setCellValue(e.getCreateTime());
cell12.setCellStyle(dateStyle);
HSSFCell cell7 = row.createCell(7);
if(e.getUniteCheck()!=null&&!"".equals(e.getUniteCheck())){
cell7.setCellValue("是");
}else {
cell7.setCellValue("否");
}
HSSFCell cell8 = row.createCell(7);
HSSFCell cell8 = row.createCell(8);
if(dictDataMap1.containsKey(e.getCheckCategory())){
cell8.setCellValue(dictDataMap1.get(e.getCheckCategory()).getDictLabel());
}
HSSFCell cell9 = row.createCell(8);
HSSFCell cell9 = row.createCell(9);
if(e.getCheckCss()!=null&&!"".equals(e.getCheckCss())){
cell9.setCellValue("否");
}else {
cell9.setCellValue("是");
}
HSSFCell cell10 = row.createCell(9);
HSSFCell cell10 = row.createCell(10);
if(dictDataMap2.containsKey(e.getCheckCss())){
cell10.setCellValue(dictDataMap2.get(e.getCheckCss()).getDictLabel());
}
HSSFCell cell11 = row.createCell(10);
HSSFCell cell11 = row.createCell(11);
if(e.getIsComplaint()==0){
cell11.setCellValue("否");
}else {
cell11.setCellValue("是");
}
HSSFCell cell12 = row.createCell(11 );
cell12.setCellValue(e.getCreateTime());
cell12.setCellStyle(dateStyle);
}
//设置流格式
response.setCharacterEncoding("UTF-8");

12
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticsEnterpriseServiceImpl.java

@ -188,7 +188,13 @@ public class StatisticsEnterpriseServiceImpl implements StatisticsEnterpriseServ
@Override
public List<StatisticsIndicator> type(List<EnterpriseInformation> enterpriseInformationList){
List<DictData>list=iDictDataService.selectDictDataByType("enterpriseType");
List<DictData>dictDataList=list.subList(0,4);//截取掉其他
List<DictData> dictDataList=new ArrayList<>();
for(DictData d:list){
if(!d.getDictLabel().equals("其他")){
dictDataList.add(d);
}
}
/*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());
@ -198,6 +204,10 @@ public class StatisticsEnterpriseServiceImpl implements StatisticsEnterpriseServ
s.setValue(type.size());
s.setPercentage((double)type.size()/enterpriseInformationList.size());
statisticsIndicatorList.add(s);
}else{
StatisticsIndicator s=new StatisticsIndicator();
s.setName(d.getDictLabel());
statisticsIndicatorList.add(s);
}
}
List<EnterpriseInformation> qtList=enterpriseInformationList.stream().filter(item->!typeMake(dictDataList,item.getCompanyOrgType())).collect(Collectors.toList());

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

@ -47,6 +47,22 @@
</if>
</where>
</select>
<select id="selectComplaintStatisticsLEFTEnterpriseList" parameterType="ComplaintStatistics" resultMap="ComplaintStatisticsResult">
select c.id,c.enterprise_name,c.enterprise_number,i.enterprise_address from complaint_statistics c
left join (select enterprise_number, enterprise_address from enterprise_information group by enterprise_number order by is_delete asc) i
on c.enterprise_number=i.enterprise_number
<where>
and c.complaint_department_id is not null
and c.complaint_department is not null
and c.enforce_type is not null
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
</where>
</select>
<select id="selectComplaintStatisticsGroup" parameterType="ComplaintStatistics" resultMap="ComplaintStatisticsResult">
select complaint_department_id,count(*)as'total' from complaint_statistics
<where>

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

@ -50,10 +50,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="zfdw != null and zfdw != ''">and zfdw like concat('%',#{zfdw},'%')</if>
<if test="zfcode != null and zfcode != ''">and zfcode like concat('%',#{zfcode},'%')</if>
</where>
group by sfzcode
order by zzjgdm) z
group by sfzcode) z
left join (select phoneNumber, certificateNumber from sys_user where law_certificate_num is not null and user_source = 0 and status='0' and del_flag='0' group by certificateNumber) s
on z.sfzcode_encrypt=s.certificateNumber
order by zzjgdm
</select>
<update id="updateZfryjdmSfzcodeByid" parameterType="Zfryjdm2405301">

Loading…
Cancel
Save