34 changed files with 1436 additions and 113 deletions
@ -0,0 +1,76 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en"> |
||||
|
<head> |
||||
|
<meta charset="UTF-8"> |
||||
|
<div id="complaintA" th:fragment="complaintA"> |
||||
|
<form id="formId"> |
||||
|
<div class="select-list"> |
||||
|
<ul> |
||||
|
<li> |
||||
|
<p>投诉对象:</p> |
||||
|
<input type="text" name="zfdw"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>投诉类型:</p> |
||||
|
<select name="checkCss" th:with="type=${@dict.getType('caseType')}"> |
||||
|
<option value="">所有</option> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>时段:</p> |
||||
|
<select id="year" name="year"> |
||||
|
<option value="">所有</option> |
||||
|
<option value="2024">2024</option> |
||||
|
</select> |
||||
|
<select id="dateSearch" name="dateSearch" onchange="timeType()" > |
||||
|
<option value="">所有</option> |
||||
|
<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="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
||||
|
<a class="btn btn-reset btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
||||
|
<a class="btn btn-download btn-rounded btn-sm" onclick="download1()"><i class="fa fa-download"></i>下载</a> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</form> |
||||
|
<div class="col-sm-12 select-table table-bordered"> |
||||
|
<table id="bootstrap-table"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</head> |
||||
|
<body> |
||||
|
<script> |
||||
|
window.onload = function () { |
||||
|
$("#quarter").hide(); |
||||
|
$("#month").hide(); |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,285 @@ |
|||||
|
<!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"> |
||||
|
<form id="formId"> |
||||
|
<div class="select-list"> |
||||
|
<ul> |
||||
|
<li> |
||||
|
<p>投诉对象:</p> |
||||
|
<input type="text" name="zfdw"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>投诉类型:</p> |
||||
|
<select name="checkCss" th:with="type=${@dict.getType('caseType')}"> |
||||
|
<option value="">所有</option> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>时段:</p> |
||||
|
<select id="year" name="year"> |
||||
|
<option value="2024">2024</option> |
||||
|
</select> |
||||
|
<select id="dateSearch" name="dateSearch" onchange="timeType1()" > |
||||
|
<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="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
||||
|
<a class="btn btn-reset btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
||||
|
<a class="btn btn-download btn-rounded btn-sm" onclick="complaintDownload1()"><i class="fa fa-download"></i>下载</a> |
||||
|
</li> |
||||
|
<ul> |
||||
|
<li id="complaintA" th:fragment="complaintA"> |
||||
|
<p th:text="|${year}年|"></p> |
||||
|
<p th:text="|投诉数量 ${Number1}|"></p> |
||||
|
<p th:text="|投诉对象 ${Number1}|"></p> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</form> |
||||
|
<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> |
||||
|
</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="search2('form',2)"><i class="fa fa-search"></i> 搜索</a> |
||||
|
<a class="btn btn-reset btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
||||
|
<a class="btn btn-download btn-rounded btn-sm" onclick="complaintDownload2()"><i class="fa fa-download"></i>下载</a> |
||||
|
</li> |
||||
|
</ul> |
||||
|
<ul> |
||||
|
<li id="complaintB" th:fragment="complaintB"> |
||||
|
<p th:text="|${year}年|"></p> |
||||
|
<p th:text="|投诉数量 ${Number3}|"></p> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
|
||||
|
</form> |
||||
|
<div class="col-sm-12 select-table table-bordered"> |
||||
|
<table id="bootstrap-table2" style="width: 550px"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<th:block th:include="zdxtInclude :: footer"/> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "code/complaintStatic"; |
||||
|
window.onload = function () { |
||||
|
$("#A").hide(); |
||||
|
$("#quarter").hide(); |
||||
|
$("#month").hide(); |
||||
|
$("#quarter2").hide(); |
||||
|
$("#month2").hide(); |
||||
|
} |
||||
|
$(function() { |
||||
|
var options1 = { |
||||
|
url: prefix + "/list1", |
||||
|
modalName: "执法投诉统计", |
||||
|
showHeader: true, |
||||
|
showFooter: false, |
||||
|
showColumns: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
//quarterBoolean:quarterBoolean, |
||||
|
columns: [ |
||||
|
{ |
||||
|
field : 'enterpriseName', |
||||
|
title : '投诉对象' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'numInt', |
||||
|
title : '投诉类型' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'lawEnforcementItemText', |
||||
|
title : '投诉数量' |
||||
|
}, |
||||
|
] |
||||
|
}; |
||||
|
$("#bootstrap-table1").bootstrapTable(options1); |
||||
|
}); |
||||
|
$(function() { |
||||
|
var options2 = { |
||||
|
url: prefix + "/list2", |
||||
|
modalName: "投诉类型统计", |
||||
|
showHeader: true, |
||||
|
showFooter: false, |
||||
|
showColumns: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
//quarterBoolean:quarterBoolean, |
||||
|
columns: [ |
||||
|
{ |
||||
|
field : 'name', |
||||
|
title : '投诉类型' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'numInt', |
||||
|
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 search2 (prefix,n) { |
||||
|
/*var currentId = $.common.isEmpty(formId) ? $('form').eq(1).attr('id') : formId2;*/ |
||||
|
var currentId=$('form').eq(n-1).attr('id') |
||||
|
console.log(currentId); |
||||
|
var params = $.common.formToJSON(currentId); |
||||
|
searchType=params; |
||||
|
console.log(params); |
||||
|
$('#bootstrap-table'+n).bootstrapTable('refresh', params); |
||||
|
} |
||||
|
function timeType1() { |
||||
|
var dateSearch = document.getElementById("dateSearch"); |
||||
|
console.log(dateSearch.value) |
||||
|
if(dateSearch.value=="quarter"){ |
||||
|
$("#quarter").show(); |
||||
|
$("#month").hide(); |
||||
|
}else if(dateSearch.value=="month"){ |
||||
|
$("#quarter").hide(); |
||||
|
$("#month").show(); |
||||
|
}else { |
||||
|
$("#quarter").hide(); |
||||
|
$("#month").hide(); |
||||
|
} |
||||
|
} |
||||
|
function timeType2() { |
||||
|
var dateSearch = document.getElementById("dateSearch2"); |
||||
|
console.log(dateSearch.value) |
||||
|
if(dateSearch.value=="quarter"){ |
||||
|
$("#quarter2").show(); |
||||
|
$("#month2").hide(); |
||||
|
}else if(dateSearch.value=="month"){ |
||||
|
$("#quarter2").hide(); |
||||
|
$("#month2").show(); |
||||
|
}else { |
||||
|
$("#quarter2").hide(); |
||||
|
$("#month2").hide(); |
||||
|
} |
||||
|
} |
||||
|
function complaintDownload1(){ |
||||
|
let table=document.getElementById('bootstrap-table1'); |
||||
|
let html=table.outerHTML; |
||||
|
let downloadLink=document.createElement("a"); |
||||
|
document.body.append(downloadLink); |
||||
|
downloadLink.href='data:application/vnd.ms-excel,'+ encodeURIComponent(html); |
||||
|
downloadLink.download='执法投诉统计.xls'; |
||||
|
downloadLink.click(); |
||||
|
} |
||||
|
function complaintDownload2(){ |
||||
|
let table=document.getElementById('bootstrap-table2'); |
||||
|
console.log(table); |
||||
|
let html=table.outerHTML; |
||||
|
let downloadLink=document.createElement("b"); |
||||
|
document.body.append(downloadLink); |
||||
|
downloadLink.href='data:application/vnd.ms-excel,'+ encodeURIComponent(html); |
||||
|
downloadLink.download='投诉类型统计.xls'; |
||||
|
downloadLink.click(); |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,106 @@ |
|||||
|
<!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="zfdw"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>执法人员:</p> |
||||
|
<input type="text" name="name"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<p>执法证号</p> |
||||
|
<input type="text" name="zfcode"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
||||
|
<a class="btn btn-reset btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
||||
|
<a class="btn btn-download btn-rounded btn-sm" onclick="download1()"><i class="fa fa-download"></i>下载</a> |
||||
|
</li> |
||||
|
</ul> |
||||
|
<ul> |
||||
|
<li id="b" th:fragment="b"> |
||||
|
<p th:text="|全市:执法部门 ${deptNumber} 执法人员 ${lawNumber}|"></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/deptStatic"; |
||||
|
$(function() { |
||||
|
var options = { |
||||
|
url: prefix + "/list", |
||||
|
createUrl: prefix + "/add", |
||||
|
updateUrl: prefix + "/edit/{id}", |
||||
|
removeUrl: prefix + "/remove", |
||||
|
detailUrl: prefix + "/detail/{id}", |
||||
|
exportUrl: prefix + "/export", |
||||
|
modalName: "执法部门统计", |
||||
|
showHeader: false, |
||||
|
showFooter: false, |
||||
|
showColumns: false, |
||||
|
showRefresh: false, |
||||
|
showToggle: false, |
||||
|
//quarterBoolean:quarterBoolean, |
||||
|
columns: [ |
||||
|
/*{ |
||||
|
checkbox: false |
||||
|
},*/ |
||||
|
/*{ |
||||
|
field : 'id', |
||||
|
title : '主键ID', |
||||
|
visible: false |
||||
|
},*/ |
||||
|
{ |
||||
|
field : 'zfdw', |
||||
|
title : '执法部门' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'name', |
||||
|
title : '执法人员', |
||||
|
}, |
||||
|
{ |
||||
|
field : 'zfcode', |
||||
|
title : '执法证号' |
||||
|
}, |
||||
|
{ |
||||
|
field : 'phoneNumber', |
||||
|
title : '联系方式' |
||||
|
|
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
function download1(){ |
||||
|
let table=document.getElementById('bootstrap-table'); |
||||
|
let html=table.outerHTML; |
||||
|
let downloadLink=document.createElement("a"); |
||||
|
document.body.append(downloadLink); |
||||
|
downloadLink.href='data:application/vnd.ms-excel,'+ encodeURIComponent(html); |
||||
|
downloadLink.download='执法部门统计.xls'; |
||||
|
downloadLink.click(); |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,12 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en"> |
||||
|
<head> |
||||
|
<meta charset="UTF-8"> |
||||
|
<li id="b" th:fragment="b"> |
||||
|
<p th:text="|全市:执法部门 ${deptNumber} 执法人员 ${lawNumber}|"></p> |
||||
|
</li> |
||||
|
</head> |
||||
|
<body> |
||||
|
|
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,15 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en"> |
||||
|
<head> |
||||
|
<meta charset="UTF-8"> |
||||
|
<li th:fragment="a"> |
||||
|
<p th:text="|联合检查 ${unite}|"></p> |
||||
|
<p th:text="|占比 ${uniteDouble}|"></p> |
||||
|
<p th:text="|${check} ${checkNumber}|"></p> |
||||
|
<p th:text="|占比 ${checkDouble}|"></p> |
||||
|
</li> |
||||
|
</head> |
||||
|
<body> |
||||
|
|
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,116 @@ |
|||||
|
package com.zdxt.code.controller; |
||||
|
|
||||
|
import com.zdxt.auth.project.system.dict.mapper.DictDataMapper; |
||||
|
import com.zdxt.code.domain.EnterpriseComplaint; |
||||
|
import com.zdxt.code.domain.SearchType; |
||||
|
import com.zdxt.code.domain.StatisticsIndicator; |
||||
|
import com.zdxt.code.service.IEnterpriseComplaintService; |
||||
|
import com.zdxt.common.controller.BaseController; |
||||
|
import com.zdxt.common.util.TableDataInfo; |
||||
|
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.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; |
||||
|
import java.util.Map; |
||||
|
import java.util.concurrent.ExecutorCompletionService; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
@Controller |
||||
|
@RequestMapping("/code/complaintStatic") |
||||
|
public class ComplaintStaticController extends BaseController { |
||||
|
@Autowired |
||||
|
private IEnterpriseComplaintService iEnterpriseComplaintService; |
||||
|
@Autowired |
||||
|
private DictDataMapper dictDataMapper; |
||||
|
private String prefix = "project/code/complaintStatic"; |
||||
|
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
||||
|
LocalDate localDate=LocalDate.now(); |
||||
|
@RequiresPermissions("code:complaintStatic:view") |
||||
|
@GetMapping() |
||||
|
public String complaintStatic(Model model) { |
||||
|
model.addAttribute("year",2024); |
||||
|
model.addAttribute("Number1",""); |
||||
|
model.addAttribute("Number2",""); |
||||
|
model.addAttribute("Number3",iEnterpriseComplaintService.selectEnterpriseComplaint(null).size()); |
||||
|
return prefix+"/complaintStatic"; |
||||
|
} |
||||
|
|
||||
|
@RequiresPermissions("code:complaintStatic:list") |
||||
|
@PostMapping("/list2") |
||||
|
@ResponseBody |
||||
|
public TableDataInfo complaint(SearchType searchType) { |
||||
|
if(searchType.getYear()==null||!"".equals(searchType.getYear())){ |
||||
|
searchType.setYear(localDate.getYear()+""); |
||||
|
} |
||||
|
EnterpriseComplaint enterpriseComplaint=new EnterpriseComplaint(); |
||||
|
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()); |
||||
|
enterpriseComplaint.setBeginTime(str.format(beginTime)); |
||||
|
enterpriseComplaint.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; |
||||
|
} |
||||
|
enterpriseComplaint.setBeginTime(str.format(beginTime)); |
||||
|
enterpriseComplaint.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()); |
||||
|
enterpriseComplaint.setBeginTime(str.format(beginTime)); |
||||
|
enterpriseComplaint.setEndTime(str.format(endTime)); |
||||
|
} |
||||
|
List<EnterpriseComplaint> enterpriseComplaintList=iEnterpriseComplaintService.selectEnterpriseComplaint(enterpriseComplaint); |
||||
|
int number=enterpriseComplaintList.size(); |
||||
|
Map<Integer,Long> map=enterpriseComplaintList.stream().collect(Collectors.groupingBy(item->item.getComplaintType()==null?100:item.getComplaintType(),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()){ |
||||
|
StatisticsIndicator s=new StatisticsIndicator(); |
||||
|
if(i==100){ |
||||
|
s.setName(""); |
||||
|
s.setNumInt(Integer.parseInt(map.get(100)+"")); |
||||
|
s.setPercentage((double)number/map.get(100)); |
||||
|
}else { |
||||
|
if(dictDataMap.containsKey(i+"")){ |
||||
|
s.setName(dictDataMap.get(i+"")); |
||||
|
}else { |
||||
|
s.setName(i+""); |
||||
|
} |
||||
|
s.setNumInt(Integer.parseInt(map.get(i)+"")); |
||||
|
s.setPercentage((double)map.get(i)/number); |
||||
|
} |
||||
|
list.add(s); |
||||
|
} |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,112 @@ |
|||||
|
package com.zdxt.code.controller; |
||||
|
|
||||
|
import com.zdxt.auth.project.system.dept.mapper.DeptMapper; |
||||
|
import com.zdxt.auth.project.system.user.mapper.UserMapper; |
||||
|
import com.zdxt.code.domain.EnforcementRegistration; |
||||
|
import com.zdxt.code.domain.Zfryjdm2405301; |
||||
|
import com.zdxt.code.domain.Zfztjdm111915; |
||||
|
import com.zdxt.code.mapper.Zfryjdm2405301Mapper; |
||||
|
import com.zdxt.code.mapper.Zfztjdm111915Mapper; |
||||
|
import com.zdxt.code.service.IZfryjdm2405301Service; |
||||
|
import com.zdxt.code.service.IZfztjdm111915Service; |
||||
|
import com.zdxt.common.controller.BaseController; |
||||
|
import com.zdxt.common.util.TableDataInfo; |
||||
|
import com.zdxt.domain.auth.Dept; |
||||
|
import com.zdxt.domain.auth.User; |
||||
|
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.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.function.Function; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
@Controller |
||||
|
@RequestMapping("/code/deptStatic") |
||||
|
public class DeptStaticController extends BaseController { |
||||
|
private String prefix = "project/code/deptStatic"; |
||||
|
@Autowired |
||||
|
private UserMapper userMapper; |
||||
|
@Autowired |
||||
|
private DeptMapper deptMapper; |
||||
|
@Autowired |
||||
|
private IZfryjdm2405301Service iZfryjdm2405301Service; |
||||
|
@Autowired |
||||
|
private IZfztjdm111915Service iZfztjdm111915Service; |
||||
|
|
||||
|
@RequiresPermissions("code:deptStatic:view") |
||||
|
@GetMapping() |
||||
|
public String registration(Model model) |
||||
|
{ |
||||
|
List<Zfztjdm111915> deptList=iZfztjdm111915Service.selectZfztjdmList(new Zfztjdm111915()); |
||||
|
List<Zfryjdm2405301> zfryjdm2405301List=iZfryjdm2405301Service.selectZfryjdmList2(null); |
||||
|
model.addAttribute("lawNumber",zfryjdm2405301List.size()); |
||||
|
model.addAttribute("deptNumber",deptList.size()); |
||||
|
return prefix + "/deptStatic"; |
||||
|
} |
||||
|
|
||||
|
@RequiresPermissions("code:deptStatic:list") |
||||
|
@PostMapping("/list") |
||||
|
@ResponseBody |
||||
|
public TableDataInfo list(Zfryjdm2405301 zfryjdm2405301) |
||||
|
{ |
||||
|
/*List<Dept> deptList=deptMapper.selectDeptList(new Dept()); |
||||
|
deptList=deptList.stream().filter(item->item.getDeptId()!=null&&!"".equals(item.getDeptId())&&item.getDeptName()!=null&&!"".equals(item.getDeptName())).collect(Collectors.toList()); |
||||
|
Map<String,String> deptIdMap=deptList.stream().collect(Collectors.toMap(Dept::getDeptId,Dept::getDeptName)); |
||||
|
Map<String,String> deptNameMap=deptList.stream().collect(Collectors.toMap(Dept::getDeptName,Dept::getDeptId)); |
||||
|
if(user.getIsMappingPerson()!=null&&!"".equals(user.getIsMappingPerson())){ |
||||
|
for(String s:deptNameMap.keySet()){ |
||||
|
if(s.contains(user.getIsMappingPerson())){ |
||||
|
user.setDeptId(deptNameMap.get(s)); |
||||
|
} |
||||
|
} |
||||
|
user.setIsMappingPerson(null); |
||||
|
} |
||||
|
startPage(); |
||||
|
List<User> list=userMapper.selectUserList(user); |
||||
|
for(int i=0;i<list.size();i++){ |
||||
|
if(deptIdMap.containsKey(list.get(i).getDeptId())){ |
||||
|
list.get(i).setIsMappingPerson(deptIdMap.get(list.get(i).getDeptId())); |
||||
|
}else{ |
||||
|
list.get(i).setIsMappingPerson(list.get(i).getDeptId()); |
||||
|
} |
||||
|
}*/ |
||||
|
startPage(); |
||||
|
List<Zfryjdm2405301> zfryjdm2405301List=iZfryjdm2405301Service.selectZfryjdmList2(zfryjdm2405301); |
||||
|
List<User> userlist=userMapper.selectUserList(new User()); |
||||
|
//userlist=userlist.stream().filter(item->item.getCertificateNumber()!=null&&!"".equals(item.getCertificateNumber())).collect(Collectors.toList());
|
||||
|
List<User> users=userlist.stream().filter(item->item.getCertificateNumber()!=null&&!"".equals(item.getCertificateNumber())).collect(Collectors.toList()); |
||||
|
Map<String,User> userMap=users.stream().collect(Collectors.toMap(User::getCertificateNumber, Function.identity())); |
||||
|
for(int i=0;i<zfryjdm2405301List.size();i++){ |
||||
|
if(zfryjdm2405301List.get(i).getSfzcodeEncrypt()!=null&&!"".equals(zfryjdm2405301List.get(i).getSfzcodeEncrypt())) { |
||||
|
if (userMap.containsKey(zfryjdm2405301List.get(i).getSfzcodeEncrypt())) { |
||||
|
zfryjdm2405301List.get(i).setPhoneNumber(userMap.get(zfryjdm2405301List.get(i).getSfzcodeEncrypt()).getPhonenumber()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/*List<User> users=new ArrayList<>(); |
||||
|
for(User u:list){ |
||||
|
if(u.getDeptId()!=null&&!"".equals(u.getDeptId())){ |
||||
|
|
||||
|
}else if(deptMap.containsKey(u.getDeptId())){ |
||||
|
u.setIsMappingPerson(deptMap.get(u.getDeptId())); |
||||
|
}else{ |
||||
|
u.setIsMappingPerson(u.getDeptId()); |
||||
|
} |
||||
|
users.add(u); |
||||
|
}*/ |
||||
|
|
||||
|
//list=users;
|
||||
|
return getDataTable(zfryjdm2405301List); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,15 @@ |
|||||
|
package com.zdxt.code.domain; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class Zfztjdm111915 { |
||||
|
private String id; |
||||
|
private String updateTime; |
||||
|
private String updateStatus; |
||||
|
private String SEQ; |
||||
|
private String INS; |
||||
|
private String dataPlace; |
||||
|
private String subName; |
||||
|
private String code; |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.zdxt.code.mapper; |
||||
|
|
||||
|
import com.zdxt.code.domain.Zfryjdm2405301; |
||||
|
import com.zdxt.code.domain.Zfztjdm111915; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface Zfztjdm111915Mapper { |
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @param |
||||
|
* @return 集合 |
||||
|
*/ |
||||
|
List<Zfztjdm111915> selectZfztjdmList(Zfztjdm111915 zfztjdm111915); |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
package com.zdxt.code.service; |
||||
|
|
||||
|
import com.zdxt.code.domain.Zfztjdm111915; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface IZfztjdm111915Service { |
||||
|
List<Zfztjdm111915>selectZfztjdmList(Zfztjdm111915 zfztjdm111915); |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
package com.zdxt.code.service.impl; |
||||
|
|
||||
|
import com.zdxt.code.domain.Zfryjdm2405301; |
||||
|
import com.zdxt.code.domain.Zfztjdm111915; |
||||
|
import com.zdxt.code.mapper.Zfztjdm111915Mapper; |
||||
|
import com.zdxt.code.service.IZfztjdm111915Service; |
||||
|
import com.zdxt.common.annotation.DataScope; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
public class Zfztjdm111915ServiceImpl implements IZfztjdm111915Service { |
||||
|
@Autowired |
||||
|
private Zfztjdm111915Mapper zfztjdm111915Mapper; |
||||
|
@Override |
||||
|
public List<Zfztjdm111915> selectZfztjdmList(Zfztjdm111915 zfztjdm111915){ |
||||
|
return zfztjdm111915Mapper.selectZfztjdmList(zfztjdm111915); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.zdxt.code.mapper.Zfztjdm111915Mapper"> |
||||
|
|
||||
|
<resultMap type="com.zdxt.code.domain.Zfztjdm111915" id="Zfztjdm111915Result"> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="updateTime" column="updatetime" /> |
||||
|
<result property="updateStatus" column="updatestatus" /> |
||||
|
<result property="SEQ" column="SEQ" /> |
||||
|
<result property="INS" column="INS" /> |
||||
|
<result property="dataPlace" column="data_place" /> |
||||
|
<result property="subName" column="sub_name" /> |
||||
|
<result property="code" column="code" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectZfztjdmVo"> |
||||
|
select id, updatetime, updatestatus, SEQ, INS, data_place, sub_name, code from Zfztjdm111915 |
||||
|
</sql> |
||||
|
<select id="selectZfztjdmList" parameterType="Zfztjdm111915" resultMap="Zfztjdm111915Result"> |
||||
|
<include refid="selectZfztjdmVo"></include> |
||||
|
<where> |
||||
|
<if test="subName!=null and subName!=''">and sub_name like concat('%',#{subName},'%')</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
</mapper> |
||||
Loading…
Reference in new issue