Browse Source

监督端-投诉举报并入执法投诉分析

v6
zouyx 2 years ago
parent
commit
b798e73a6f
  1. 2
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintA.html
  2. 113
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
  3. 182
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/details.html
  4. 53
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintsReport/complaintsReport.html
  5. 73
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
  6. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintsReportController.java
  7. 49
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/ComplaintStatistics.java
  8. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComplaintStatisticsMapper.java
  9. 1
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintStatisticsService.java
  10. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintsReportService.java
  11. 21
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java
  12. 16
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintsReportServiceImpl.java
  13. 39
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml

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

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<li id="complaintA" th:fragment="complaintA"> <li id="complaintA" th:fragment="complaintA">
<p th:text="|${year}年:|"></p> <p th:text="${selectTime}"></p>
<p><label th:text="投诉数量"></label><b th:text="${Number1}"></b></p> <p><label th:text="投诉数量"></label><b th:text="${Number1}"></b></p>
<p></i><label th:text="被投诉对象"></label><b th:text="${Number2}"></b></p> <p></i><label th:text="被投诉对象"></label><b th:text="${Number2}"></b></p>
</li> </li>

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

@ -49,35 +49,40 @@
<ul> <ul>
<li> <li>
<p>被投诉对象:</p> <p>被投诉对象:</p>
<input type="text" name="name"/> <input type="text" name="complaintDepartment" style="width: 150px"/>
</li> </li>
<li> <li>
<p>投诉类型:</p> <p>投诉类型:</p>
<select id="cType" name="cType" th:with="type=${@dict.getType('caseType')}"> <select id="cType" name="complaintType" th:with="type=${@dict.getType('caseType')}" style="width: 100px">
<option value="">所有</option> <option value="0">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>
<li>
<p>涉事地址:</p>
<input type="text" name="enterpriseAddress" style="width: 150px"/>
</li>
<li> <li>
<p>时段:</p> <p>时段:</p>
<select id="year" name="year"> <select id="year" name="year" style="width: 60px">
<!--<option value="2024">2024</option>--> <!--<option value="2024">2024</option>-->
<option th:each="y:${yearList}" th:text="${y}" th:value="${y}"></option> <option th:each="y:${yearList}" th:text="${y}" th:value="${y}"></option>
</select> </select>
<select id="dateSearch" name="dateSearch" onchange="timeType1()" > <select id="dateSearch" name="timeType" onchange="timeType1()" style="width: 100px">
<option value="year">年度</option> <option value="year">年度</option>
<option value="quarter">季度</option> <option value="quarter">季度</option>
<option value="month">月度</option> <option value="month">月度</option>
<option value="day">自定义时间</option>
</select> </select>
<select id="quarter" name="quarter"> <select id="quarter" name="quarter" style="width: 100px">
<option value="">所有</option> <option value="0">所有</option>
<option value="1">第一季度</option> <option value="1">第1季度</option>
<option value="2">第二季度</option> <option value="2">第2季度</option>
<option value="3">第三季度</option> <option value="3">第3季度</option>
<option value="4">第四季度</option> <option value="4">第4季度</option>
</select> </select>
<select id="month" name="month"> <select id="month" name="month" style="width: 60px">
<option value="">所有</option> <option value="0">所有</option>
<option value="01">1月</option> <option value="01">1月</option>
<option value="02">2月</option> <option value="02">2月</option>
<option value="03">3月</option> <option value="03">3月</option>
@ -92,6 +97,12 @@
<option value="12">12月</option> <option value="12">12月</option>
</select> </select>
</li> </li>
<li id="day" class="day" style="display: flex;">
<p>自定义时间:</p>
<input type="text" class="time-input" id="beginTime" placeholder="开始时间" name="beginTime" style="width: 100px"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime" style="width: 100px"/>
</li>
<li> <li>
<a class="btn btn-success btn-sm" onclick="searchComplaint1()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-success btn-sm" onclick="searchComplaint1()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-sm" onclick="complaintRest1()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-reset btn-sm" onclick="complaintRest1()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -101,7 +112,7 @@
<div class="static-content"> <div class="static-content">
<ul> <ul>
<li id="complaintA" th:fragment="complaintA"> <li id="complaintA" th:fragment="complaintA">
<p th:text="|${year}年:|"></p> <p th:text="${selectTime}"></p>
<p><label th:text="投诉数量"></label><b th:text="${Number1}"></b></p> <p><label th:text="投诉数量"></label><b th:text="${Number1}"></b></p>
<p></i><label th:text="被投诉对象"></label><b th:text="${Number2}"></b></p> <p></i><label th:text="被投诉对象"></label><b th:text="${Number2}"></b></p>
</li> </li>
@ -219,9 +230,11 @@
var myChart3 = echarts.init(document.getElementById('echartComplaint3')); var myChart3 = echarts.init(document.getElementById('echartComplaint3'));
var pieData; var pieData;
var deptName; var deptName;
var currentYear = new Date().getFullYear();
window.onload = function () { window.onload = function () {
$("#quarter").hide(); $("#quarter").hide();
$("#month").hide(); $("#month").hide();
$("#day").hide();
$("#quarter2").hide(); $("#quarter2").hide();
$("#month2").hide(); $("#month2").hide();
$('#detail').hide(); $('#detail').hide();
@ -383,7 +396,7 @@
return value; return value;
} }
}, },
{ /* {
field : 'problemDescription', field : 'problemDescription',
title : '投诉内容' title : '投诉内容'
}, },
@ -415,11 +428,17 @@
{ {
field : 'linkmanTel', field : 'linkmanTel',
title : '联系电话' title : '联系电话'
}, },*/
{ {
field : 'complaintTime', field : 'complaintTime',
title : '投诉时间' title : '投诉时间'
}, },
{
title : '投诉情况',
formatter:function (value,row,index) {
return '<span style="cursor: pointer;color: blue;" ONCLICK="openReport(\'' + row.id + '\')">'+'详情'+'</span>';
}
},
] ]
}; };
$("#bootstrap-table").bootstrapTable(options3); $("#bootstrap-table").bootstrapTable(options3);
@ -701,18 +720,47 @@
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"){
$("#year").show();
if(document.getElementById("year").value==''){
document.getElementById("year").value=currentYear;
}
$("#day").hide();
document.getElementById("beginTime").value="";
document.getElementById("endTime").value="";
$("#quarter").show(); $("#quarter").show();
$("#month").hide(); $("#month").hide();
document.getElementById("month").value=""; document.getElementById("month").value="0";
}else if(dateSearch.value=="month"){ }else if(dateSearch.value=="month"){
$("#year").show();
if(document.getElementById("year").value==''){
document.getElementById("year").value=currentYear;
}
$("#day").hide();
document.getElementById("beginTime").value="";
document.getElementById("endTime").value="";
$("#quarter").hide(); $("#quarter").hide();
document.getElementById("quarter").value=""; document.getElementById("quarter").value="0";
$("#month").show(); $("#month").show();
}else if(dateSearch.value=="day"){
$("#day").show();
$("#year").hide();
document.getElementById("year").value="";
$("#quarter").hide();
document.getElementById("quarter").value="0";
$("#month").hide();
document.getElementById("month").value="0";
}else { }else {
$("#year").show();
if(document.getElementById("year").value==''){
document.getElementById("year").value=currentYear;
}
$("#day").hide();
document.getElementById("beginTime").value="";
document.getElementById("endTime").value="";
$("#quarter").hide(); $("#quarter").hide();
document.getElementById("quarter").value=""; document.getElementById("quarter").value="0";
$("#month").hide(); $("#month").hide();
document.getElementById("month").value=""; document.getElementById("month").value="0";
} }
} }
function timeType2() { function timeType2() {
@ -736,7 +784,8 @@
function sComplaint(eName){ function sComplaint(eName){
var currentId=$('form').eq(0).attr('id'); var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId); var params = $.common.formToJSON(currentId);
params.name=eName; // params.name=eName;
params.complaintDepartmentId=eName;
$.ajax({ $.ajax({
url: prefix + "/list", url: prefix + "/list",
method: 'post', method: 'post',
@ -772,26 +821,10 @@
document.getElementById("qy").value="type"; document.getElementById("qy").value="type";
searchComplaint2(); searchComplaint2();
} }
/*function typeMake(){ function openReport(id){
var qy = document.getElementById("qy"); console.log(id);
console.log(qy.value) $.modal.openClose("投诉举报详情", prefix + "/details/" + id);
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(){ function downloadC1(){
var currentId=$('form').eq(0).attr('id'); var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId); var params = $.common.formToJSON(currentId);

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

@ -0,0 +1,182 @@
<!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('执法投诉统计')"/>
<th:block th:include="zdxtInclude :: datetimepicker-css"/>
<link type="text/css" href="/css/stat1.css" rel="stylesheet"/>
<link href="/layui/css/layui.css" rel="stylesheet">
<style>
.tab-content {
display: none;
width: 100%;
height: calc(100% - 50px);
}
.tab-content.active {
display: block;
}
</style>
</head>
<body>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<div class="container-div">
<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 class="form-horizontal m">
<div class="form-group">
<div class="form-group">
<div class="col-sm-8"
th:if="${mssqOrderFlowList != null and mssqOrderFlowList.size()>0}">
<div class="layui-timeline" th:each="mssqOrderFlow,status:${mssqOrderFlowList}">
<div class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis" th:if="${status.first}"></i>
<i class="layui-icon layui-timeline-axis" th:if="${!status.first}" style="color: rgba(0,0,0,0.5)"></i>
<!-- <img src="/img/icon_doing.png" th:if="${status.first}"/>-->
<!-- <img src="/img/icon_done.png" th:if="${!status.first}"/>-->
<div class="layui-timeline-content layui-text">
<h3 class="layui-timeline-title"
th:text="${mssqOrderFlow.appOrgShortname}"></h3>
<ul>
<li style="display: flex"><strong>处理部门:</strong>
<p th:text="${mssqOrderFlow.appOrgName}"></p></li>
<li style="display: flex"><strong>处理意见:</strong>
<p th:text="${mssqOrderFlow.approveContent}"></p></li>
<!-- <li style="display: flex"><strong>处理结果:</strong>
<p th:text="${mssqOrderFlow.operName}"></p></li>-->
<li style="display: flex"><strong>处理时间:</strong>
<p th:text="${mssqOrderFlow.approveTime}"></p></li>
<!-- <li th:if="${mssqOrderFlow.AppFiles!=null}"><strong>处理时间:</strong><p th:text="${mssqOrderFlow.AppFiles.fileName}" onclick="openFile(this)"></p></li>-->
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div id="one-tab2" class="tab-content">
<form class="form-horizontal m" id="form-information-add">
<div class="form-group">
<label class="col-sm-3 control-label">投诉部门:</label>
<div class="col-sm-8">
<input name="enterpriseName" th:value="${complaintStatistics.complaintDepartment}"
class="form-control" disabled type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">投诉时间:</label>
<div class="col-sm-8">
<input name="enterpriseName"
th:value="${complaintStatistics.enterpriseComplaint.createTimeStr}"
class="form-control" disabled type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">投诉类型:</label>
<div class="col-sm-8">
<input name="enterpriseName"
th:value="${complaintStatistics.enterpriseComplaint.enforceTypeStr}"
class="form-control" disabled type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">投诉内容:</label>
<div class="col-sm-8">
<input name="enterpriseName"
th:value="${complaintStatistics.enterpriseComplaint.problemDescription}"
class="form-control" disabled type="textarea">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">涉事地址:</label>
<div class="col-sm-8">
<input name="enterpriseName"
th:value="${complaintStatistics.enterpriseComplaint.enterpriseAddress}"
class="form-control" disabled type="textarea">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">附件:</label>
<div class="col-sm-8">
<img th:src="${url}" th:each="url:${complaintStatistics.fileList}"
style="height: 100px;width: 100px;padding: 10px;cursor: pointer;"
onclick="openPicture(this)"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">授权状态:</label>
<div class="col-sm-8" th:if="${complaintStatistics.enterpriseComplaint.authorization==1}"
style="padding: 6px">
<input type="checkbox" title="同意" lay-text="同意" checked disabled><label
style="margin-left: 10px;margin-right: 15px;">同意</label>
<input type="checkbox" title="不同意" disabled><label
style="margin-left: 10px;margin-right: 15px;">不同意</label>
</div>
<div class="col-sm-8" th:if="${complaintStatistics.enterpriseComplaint.authorization==0}"
style="padding: 6px">
<input type="checkbox" title="同意" lay-text="同意" disabled><label
style="margin-left: 10px;margin-right: 15px;">同意</label>
<input type="checkbox" title="不同意" checked disabled><label
style="margin-left: 10px;margin-right: 15px;">不同意</label>
</div>
</div>
<div class="form-group" th:if="${complaintStatistics.enterpriseComplaint.authorization==1}">
<label class="col-sm-3 control-label">联系人:</label>
<div class="col-sm-8">
<input name="enterpriseName"
th:value="${complaintStatistics.enterpriseComplaint.linkman}"
class="form-control" disabled type="text">
</div>
</div>
<div class="form-group" th:if="${complaintStatistics.enterpriseComplaint.authorization==1}">
<label class="col-sm-3 control-label">联系电话:</label>
<div class="col-sm-8">
<input name="enterpriseName"
th:value="${complaintStatistics.enterpriseComplaint.linkmanTel}"
class="form-control" disabled type="text">
</div>
</div>
</form>
</div>
</div>
</div>
<th:block th:include="zdxtInclude :: footer"/>
<script th:inline="javascript">
function openPicture(body) {
url = body.src;
if (url != null && url != '') {
window.open(url);
} else {
this.$message.warning('图片不存在');
}
}
function openFile(body) {
url = body.value;
if (url != null && url != '') {
window.open(url);
} else {
this.$message.warning('图片不存在');
}
}
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');
}
</script>
</body>
</html>

53
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintsReport/complaintsReport.html

@ -17,16 +17,27 @@
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
<p>被投诉对象:</p> <p>投诉对象:</p>
<input type="text" name="name"/> <input type="text" name="complaintDepartment"/>
</li> </li>
<li> <li>
<p>投诉类型:</p> <p>投诉类型:</p>
<select id="cType" name="cType" th:with="type=${@dict.getType('caseType')}"> <select id="enforceType" name="enforceType" th:with="type=${@dict.getType('caseType')}" style="width: 100px">
<option value="">所有</option> <option value="0">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>
<li id="select-time" class="select-time">
<p>投诉时间:</p>
<input type="text" class="time-input" id="beginTime" placeholder="开始时间" name="beginTime"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
</li>
<li>
<p>涉事地址:</p>
<input type="text" name="enterpriseAddress"/>
</li>
<li> <li>
<a class="btn btn-success btn-sm" onclick="searchReport()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-success btn-sm" onclick="searchReport()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-sm" onclick="reportRest()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-reset btn-sm" onclick="reportRest()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -57,9 +68,20 @@
pageSize: 10, pageSize: 10,
pageList: [10, 25, 50], pageList: [10, 25, 50],
columns: [ columns: [
{
checkbox: true
},
{ {
field: 'complaintDepartment', field: 'complaintDepartment',
title: '投诉部门' title: '投诉对象'
},
{
field: 'enforcementTime',
title: '执法时间'
},
{
field: 'complaintTime',
title: '投诉时间'
}, },
{ {
field: 'enforceType', field: 'enforceType',
@ -74,6 +96,10 @@
} }
}, },
{ {
field: 'enterpriseAddress',
title: '涉事地址'
},
/*{
field: 'problemDescription', field: 'problemDescription',
title: '描述' title: '描述'
}, },
@ -84,11 +110,11 @@
{ {
field: 'results', field: 'results',
title: '处理结果', title: '处理结果',
}, },*/
{ {
title:'操作', title: '操作',
formatter(value, row, index){ formatter(value, row, index) {
return '<a class="btn btn-success btn-xs " onclick="openDetails(\'' + row.id + '\')"><i class="fa fa-edit"></i> 查看</a> '; return '<a class="btn btn-success btn-xs " onclick="openDetails(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ';
} }
} }
] ]
@ -102,8 +128,8 @@
var $table = $('#bootstrap-table'); var $table = $('#bootstrap-table');
var pageNumber = $table.bootstrapTable('getOptions').pageNumber; var pageNumber = $table.bootstrapTable('getOptions').pageNumber;
var pageSize = $table.bootstrapTable('getOptions').pageSize; var pageSize = $table.bootstrapTable('getOptions').pageSize;
params.pageNumber=pageNumber; params.pageNumber = pageNumber;
params.pageSize=pageSize; params.pageSize = pageSize;
$.ajax({ $.ajax({
url: prefix + "/list", url: prefix + "/list",
method: 'post', method: 'post',
@ -124,7 +150,8 @@
$('form').eq(0).trigger("reset"); $('form').eq(0).trigger("reset");
searchReport(); searchReport();
} }
function openDetails(id){
function openDetails(id) {
$.modal.openClose("投诉举报详情", prefix + "/details/" + id); $.modal.openClose("投诉举报详情", prefix + "/details/" + id);
} }

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

@ -7,6 +7,7 @@ import com.zdxt.auth.project.system.dept.service.IDeptService;
import com.zdxt.auth.project.system.dict.mapper.DictDataMapper; import com.zdxt.auth.project.system.dict.mapper.DictDataMapper;
import com.zdxt.code.domain.*; import com.zdxt.code.domain.*;
import com.zdxt.code.service.ComplaintStatisticsService; import com.zdxt.code.service.ComplaintStatisticsService;
import com.zdxt.code.service.ComplaintsReportService;
import com.zdxt.code.service.IEnterpriseComplaintService; import com.zdxt.code.service.IEnterpriseComplaintService;
import com.zdxt.common.controller.BaseController; import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.TableDataInfo; import com.zdxt.common.util.TableDataInfo;
@ -47,6 +48,10 @@ public class ComplaintStaticController extends BaseController {
private IDeptService iDeptService; private IDeptService iDeptService;
@Autowired @Autowired
private ZdxtFileCommonApi zdxtFileCommonApi; private ZdxtFileCommonApi zdxtFileCommonApi;
@Autowired
private ComplaintsReportService complaintsReportService;
@Autowired
private IEnterpriseComplaintService iEnterpriseComplaintService;
private String prefix = "project/code/complaintStatic"; private String prefix = "project/code/complaintStatic";
@RequiresPermissions("code:complaintStatic:view") @RequiresPermissions("code:complaintStatic:view")
@GetMapping() @GetMapping()
@ -59,7 +64,8 @@ public class ComplaintStaticController extends BaseController {
complaintStatistics.setBeginTime(str.format(beginTime)); complaintStatistics.setBeginTime(str.format(beginTime));
complaintStatistics.setEndTime(str.format(endTime)); complaintStatistics.setEndTime(str.format(endTime));
model.addAttribute("yearList",yearMake()); model.addAttribute("yearList",yearMake());
model.addAttribute("year",localDate.getYear()); // model.addAttribute("year",localDate.getYear());
model.addAttribute("selectTime",localDate.getYear()+"年");
model.addAttribute("Number1",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size()); model.addAttribute("Number1",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());
model.addAttribute("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size()); model.addAttribute("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size());
model.addAttribute("Number3",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());//权限 model.addAttribute("Number3",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());//权限
@ -69,7 +75,7 @@ public class ComplaintStaticController extends BaseController {
@RequiresPermissions("code:complaintStatic:list") @RequiresPermissions("code:complaintStatic:list")
@GetMapping("/searchType1") @GetMapping("/searchType1")
public String searchType1(SearchType searchType,Model model){ /* public String searchType1(SearchType searchType,Model model){
model.addAttribute("year",searchType.getYear()); model.addAttribute("year",searchType.getYear());
ComplaintStatistics complaintStatistics=dateMake(searchType); ComplaintStatistics complaintStatistics=dateMake(searchType);
if(searchType.getcType()!=null&&!"".equals(searchType.getcType())) { if(searchType.getcType()!=null&&!"".equals(searchType.getcType())) {
@ -84,6 +90,38 @@ public class ComplaintStaticController extends BaseController {
model.addAttribute("Number1",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());//待权限1209 model.addAttribute("Number1",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());//待权限1209
model.addAttribute("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size());//待权限1209 model.addAttribute("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size());//待权限1209
return prefix+"/complaintA"; return prefix+"/complaintA";
}*/
public String searchType1(ComplaintStatistics complaintStatistics,Model model){
if(complaintStatistics.getTimeType().equals("month")){
model.addAttribute("selectTime",complaintStatistics.getYear()+'年'+complaintStatistics.getMonth()+"月");
}else if(complaintStatistics.getTimeType().equals("quarter")){
model.addAttribute("selectTime",complaintStatistics.getYear()+"年第"+complaintStatistics.getQuarter()+"季");
}else if(complaintStatistics.getTimeType().equals("year")){
model.addAttribute("selectTime",complaintStatistics.getYear()+'年');
}else if(complaintStatistics.getTimeType().equals("day")){
if(complaintStatistics.getBeginTime()!=null&&!complaintStatistics.equals("")){
if(complaintStatistics.getBeginTime()!=null&&!complaintStatistics.equals("")){
model.addAttribute("selectTime",complaintStatistics.getBeginTime()+"~"+complaintStatistics.getEndTime());
}else {
model.addAttribute("selectTime",complaintStatistics.getBeginTime()+"~至今");
}
}else {
if(complaintStatistics.getBeginTime()!=null&&!complaintStatistics.equals("")){
model.addAttribute("selectTime","~"+complaintStatistics.getEndTime());
}else {
model.addAttribute("selectTime","");
}
}
}
Map<String, Dept> deptMap=new HashMap<>();
if(complaintStatistics.getComplaintDepartment()!=null&&!"".equals(complaintStatistics.getComplaintDepartment())){//搜索条件内有投诉对象时
List<Dept> deptList=iDeptService.selectDeptByDeptName(complaintStatistics.getComplaintDepartment());
deptMap=deptList.stream().collect(Collectors.toMap(Dept::getDeptId, Function.identity()));
complaintStatistics.setComplaintDepartmentIdList(new ArrayList<>(deptMap.keySet()));
}
model.addAttribute("Number1",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());
model.addAttribute("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size());
return prefix+"/complaintA";
} }
/** /**
@ -126,23 +164,27 @@ public class ComplaintStaticController extends BaseController {
@RequiresPermissions("code:complaintStatic:list") @RequiresPermissions("code:complaintStatic:list")
@PostMapping("/list1") @PostMapping("/list1")
@ResponseBody @ResponseBody
public TableDataInfo complaint1(SearchType searchType) { /* public TableDataInfo complaint1(SearchType searchType) {
ComplaintStatistics complaintStatistics=dateMake(searchType); ComplaintStatistics complaintStatistics=dateMake(searchType);
/*startPage();*/
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.list1(searchType,complaintStatistics); List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.list1(searchType,complaintStatistics);
return getDataTable(complaintStatisticsList); return getDataTable(complaintStatisticsList);
}*/
public TableDataInfo complaint1(ComplaintStatistics complaintStatistics) {
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsListGroupDeptList(complaintStatistics);
return getDataTable(complaintStatisticsList);
} }
@RequiresPermissions("code:complaintStatic:list") @RequiresPermissions("code:complaintStatic:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(SearchType searchType) { /* public TableDataInfo list(SearchType searchType) {
ComplaintStatistics complaintStatistics=dateMake(searchType); ComplaintStatistics complaintStatistics=dateMake(searchType);
if(searchType.getcType()!=null&&!"".equals(searchType.getcType())) { if(searchType.getcType()!=null&&!"".equals(searchType.getcType())) {
complaintStatistics.setEnforceType(Integer.parseInt(searchType.getcType())); complaintStatistics.setEnforceType(Integer.parseInt(searchType.getcType()));
} }
if(searchType.getName()!=null&&!"".equals(searchType.getName())){//搜索条件内有投诉对象时 if(searchType.getName()!=null&&!"".equals(searchType.getName())){//搜索条件内有投诉对象时
complaintStatistics.setComplaintDepartmentId(searchType.getName()); complaintStatistics.setComplaintDepartmentId(searchType.getName());
} }*/
public TableDataInfo list(ComplaintStatistics complaintStatistics) {
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics); List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics);
for(ComplaintStatistics c:complaintStatisticsList){ for(ComplaintStatistics c:complaintStatisticsList){
List<ZdxtFileCommon> zdxtFileCommonList=zdxtFileCommonApi.selectZdxtFileById(c.getCid()); List<ZdxtFileCommon> zdxtFileCommonList=zdxtFileCommonApi.selectZdxtFileById(c.getCid());
@ -454,6 +496,25 @@ public class ComplaintStaticController extends BaseController {
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsLEFTEnterpriseList(complaintStatistics);//权限 List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsLEFTEnterpriseList(complaintStatistics);//权限
return getDataTable(complaintStatisticsService.jdComplaintList(complaintStatisticsList,searchType)); return getDataTable(complaintStatisticsService.jdComplaintList(complaintStatisticsList,searchType));
} }
@GetMapping("/details/{id}")
public String complaintsReportDetails(@PathVariable("id") String id, Model model) {
ComplaintStatistics complaintStatistics = complaintsReportService.complaintById(id);
model.addAttribute("complaintStatistics", complaintStatistics);
// List<MssqOrderFlow> mssqOrderFlowList = iEnterpriseComplaintService.selectEnterpriseComplaintProcess(complaintStatistics.getCid());
List<MssqOrderFlow> mssqOrderFlowList=new ArrayList<>();
MssqOrderFlow mssqOrderFlow1=new MssqOrderFlow();
mssqOrderFlow1.setAppOrgName("处理部门1");
mssqOrderFlow1.setApproveContent("处理1");
mssqOrderFlow1.setApproveTime("2025-03-20 12:30");
MssqOrderFlow mssqOrderFlow2=new MssqOrderFlow();
mssqOrderFlow2.setAppOrgName("处理部门2");
mssqOrderFlow2.setApproveContent("处理2");
mssqOrderFlow2.setApproveTime("2025-03-20 14:30");
mssqOrderFlowList.add(mssqOrderFlow2);
mssqOrderFlowList.add(mssqOrderFlow1);
model.addAttribute("mssqOrderFlowList", mssqOrderFlowList);
return prefix + "/details.html";
}
public List<Integer> yearMake(){ public List<Integer> yearMake(){
int current=LocalDate.now().getYear(); int current=LocalDate.now().getYear();

4
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintsReportController.java

@ -34,9 +34,9 @@ public class ComplaintsReportController extends BaseController {
@RequiresPermissions("code:complaintsReport:view") @RequiresPermissions("code:complaintsReport:view")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo complaintGetComplaintDepartment(SearchType searchType) { public TableDataInfo complaintGetComplaintDepartment(ComplaintStatistics complaintStatistics) {
startPage(); startPage();
List<ComplaintStatistics> list = complaintsReportService.complaintGetComplaintDepartment(searchType); List<ComplaintStatistics> list = complaintsReportService.complaintGetComplaintDepartment(complaintStatistics);
return getDataTable(list); return getDataTable(list);
} }

49
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/ComplaintStatistics.java

@ -37,6 +37,15 @@ public class ComplaintStatistics extends BaseDomain {
*/ */
private String results; private String results;
/**
* 执法时间
*/
private String enforcementTime;
private String timeType;
private String year;
private String quarter;
private String month;
public String getId() { public String getId() {
return id; return id;
} }
@ -228,4 +237,44 @@ public class ComplaintStatistics extends BaseDomain {
public void setResults(String results) { public void setResults(String results) {
this.results = results; this.results = results;
} }
public String getEnforcementTime() {
return enforcementTime;
}
public void setEnforcementTime(String enforcementTime) {
this.enforcementTime = enforcementTime;
}
public String getTimeType() {
return timeType;
}
public void setTimeType(String timeType) {
this.timeType = timeType;
}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public String getQuarter() {
return quarter;
}
public void setQuarter(String quarter) {
this.quarter = quarter;
}
public String getMonth() {
return month;
}
public void setMonth(String month) {
this.month = month;
}
} }

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

@ -31,10 +31,10 @@ public interface ComplaintStatisticsMapper {
List<ComplaintStatistics> selectComplaintStatisticsLEFTEnterpriseList(ComplaintStatistics complaintStatistics); List<ComplaintStatistics> selectComplaintStatisticsLEFTEnterpriseList(ComplaintStatistics complaintStatistics);
/** /**
* 获取投诉举报列表,合并两个投诉表的投诉部门 * 获取投诉举报列表,合并两个投诉表的投诉部门
* @param searchType * @param complaintStatistics
* @return * @return
*/ */
List<ComplaintStatistics> complaintGetComplaintDepartment(SearchType searchType); List<ComplaintStatistics> complaintGetComplaintDepartment(ComplaintStatistics complaintStatistics);
/** /**
* 根据投诉统计id获取投诉举报详情 * 根据投诉统计id获取投诉举报详情
* @param id * @param id

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

@ -26,4 +26,5 @@ public interface ComplaintStatisticsService {
List<StatisticsIndicator> jdComplaintList(List<ComplaintStatistics> complaintStatisticsList,SearchType searchType); List<StatisticsIndicator> jdComplaintList(List<ComplaintStatistics> complaintStatisticsList,SearchType searchType);
List<ComplaintStatistics> list1(SearchType searchType, ComplaintStatistics complaintStatistics); List<ComplaintStatistics> list1(SearchType searchType, ComplaintStatistics complaintStatistics);
List<ComplaintStatistics> selectComplaintStatisticsListGroupDeptList(ComplaintStatistics complaintStatistics);
} }

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

@ -8,10 +8,10 @@ import java.util.List;
public interface ComplaintsReportService { public interface ComplaintsReportService {
/** /**
* 获取投诉举报列表,合并两个投诉表的投诉部门 * 获取投诉举报列表,合并两个投诉表的投诉部门
* @param searchType * @param complaintStatistics
* @return * @return
*/ */
List<ComplaintStatistics> complaintGetComplaintDepartment(SearchType searchType); List<ComplaintStatistics> complaintGetComplaintDepartment(ComplaintStatistics complaintStatistics);
/** /**
* 根据投诉统计id获取投诉举报详情 * 根据投诉统计id获取投诉举报详情

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

@ -238,4 +238,25 @@ public class ComplaintStatisticsImpl implements ComplaintStatisticsService {
} }
return complaintStatisticsList; return complaintStatisticsList;
} }
@Override
public List<ComplaintStatistics> selectComplaintStatisticsListGroupDeptList(ComplaintStatistics complaintStatistics) {
Map<String, Dept> deptMap=new HashMap<>();
if(complaintStatistics.getComplaintDepartment()!=null&&!"".equals(complaintStatistics.getComplaintDepartment())){//搜索条件内有投诉对象时
List<Dept> deptList=iDeptService.selectDeptByDeptName(complaintStatistics.getComplaintDepartment());
deptMap=deptList.stream().collect(Collectors.toMap(Dept::getDeptId, Function.identity()));
complaintStatistics.setComplaintDepartmentIdList(new ArrayList<>(deptMap.keySet()));
}else {
deptMap=iDeptService.selectDeptAll().stream().collect(Collectors.toMap(Dept::getDeptId, Function.identity()));
}
List<ComplaintStatistics> complaintStatisticsList=complaintStatisticsMapper.selectComplaintStatisticsGroup(complaintStatistics);
for (int i=0;i<complaintStatisticsList.size();i++){
if(deptMap.containsKey(complaintStatisticsList.get(i).getComplaintDepartmentId())){
complaintStatisticsList.get(i).setComplaintDepartment(deptMap.get(complaintStatisticsList.get(i).getComplaintDepartmentId()).getDeptName());
}/*else {
complaintStatisticsList.get(i).setComplaintDepartment(complaintStatisticsList.get(i).getComplaintDepartmentId());
}*/
}
return complaintStatisticsList;
}
} }

16
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintsReportServiceImpl.java

@ -37,10 +37,10 @@ public class ComplaintsReportServiceImpl implements ComplaintsReportService {
private IEnterpriseComplaintService iEnterpriseComplaintService; private IEnterpriseComplaintService iEnterpriseComplaintService;
@Override @Override
public List<ComplaintStatistics> complaintGetComplaintDepartment(SearchType searchType) { public List<ComplaintStatistics> complaintGetComplaintDepartment(ComplaintStatistics complaintStatistics) {
List<ComplaintStatistics> list=complaintStatisticsMapper.complaintGetComplaintDepartment(searchType); List<ComplaintStatistics> list=complaintStatisticsMapper.complaintGetComplaintDepartment(complaintStatistics);
for(int i = 0; i<(Math.min(list.size(), searchType.getPageNumber() * searchType.getPageSize())); i++){ /* for(int i = 0; i<(Math.min(list.size(), searchType.getPageNumber() * searchType.getPageSize())); i++){
/* List<MssqOrderFlow> mssqOrderFlowList =iEnterpriseComplaintService.selectEnterpriseComplaintProcess(list.get(i).getCid()); List<MssqOrderFlow> mssqOrderFlowList =iEnterpriseComplaintService.selectEnterpriseComplaintProcess(list.get(i).getCid());
if(mssqOrderFlowList.size()>0){ if(mssqOrderFlowList.size()>0){
list.get(i).setProgress(mssqOrderFlowList.get(0).getOperName()); list.get(i).setProgress(mssqOrderFlowList.get(0).getOperName());
if(mssqOrderFlowList.get(0).getState()==20){ if(mssqOrderFlowList.get(0).getState()==20){
@ -48,15 +48,15 @@ public class ComplaintsReportServiceImpl implements ComplaintsReportService {
}else{ }else{
list.get(i).setResults("处理中"); list.get(i).setResults("处理中");
} }
}*/ }
/* list.get(i).setProgress("市统一受理分拨中心"); list.get(i).setProgress("市统一受理分拨中心");
list.get(i).setResults("拟交办/转送处理");*/ list.get(i).setResults("拟交办/转送处理");
List<MssqOrderFlow> mssqOrderFlowList =iEnterpriseComplaintService.selectEnterpriseComplaintProcess(list.get(i).getCid()); List<MssqOrderFlow> mssqOrderFlowList =iEnterpriseComplaintService.selectEnterpriseComplaintProcess(list.get(i).getCid());
if(mssqOrderFlowList.size()>0) { if(mssqOrderFlowList.size()>0) {
list.get(i).setProgress(mssqOrderFlowList.get(0).getAppOrgShortname()); list.get(i).setProgress(mssqOrderFlowList.get(0).getAppOrgShortname());
list.get(i).setResults(mssqOrderFlowList.get(0).getOperName()); list.get(i).setResults(mssqOrderFlowList.get(0).getOperName());
} }
} }*/
return list; return list;
} }

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

@ -46,7 +46,20 @@
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d') and DATE_FORMAT(complaint_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if> </if>
<if test="enterpriseAddress != null and enterpriseAddress != ''">and enterprise_address like concat('%',#{enterpriseAddress},'%')</if>
<if test="timeType != null and timeType != '' and timeType == 'month'"> and YEAR(complaint_time)=#{year} and MONTH(complaint_time)=#{month}</if>
<if test="timeType != null and timeType != '' and timeType == 'quarter'"> and YEAR(complaint_time)=#{year} and QUARTER(complaint_time)=#{quarter}</if>
<if test="timeType != null and timeType != '' and timeType == 'year'"> and YEAR(complaint_time)=#{year}</if>
<if test="timeType != null and timeType != '' and timeType == 'day'">
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
</if>
</where> </where>
order by complaint_time desc
</select> </select>
<select id="selectComplaintStatisticsLEFTEnterpriseList" parameterType="ComplaintStatistics" resultMap="ComplaintStatisticsResult"> <select id="selectComplaintStatisticsLEFTEnterpriseList" parameterType="ComplaintStatistics" resultMap="ComplaintStatisticsResult">
select c.id,c.enterprise_name,c.enterprise_number,i.enterprise_address from complaint_statistics c select c.id,c.enterprise_name,c.enterprise_number,i.enterprise_address from complaint_statistics c
@ -84,6 +97,18 @@
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d') and DATE_FORMAT(complaint_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if> </if>
<if test="enterpriseAddress != null and enterpriseAddress != ''">and enterprise_address like concat('%',#{enterpriseAddress},'%')</if>
<if test="timeType != null and timeType != '' and timeType == 'month'"> and YEAR(complaint_time)=#{year} and MONTH(complaint_time)=#{month}</if>
<if test="timeType != null and timeType != '' and timeType == 'quarter'"> and YEAR(complaint_time)=#{year} and QUARTER(complaint_time)=#{quarter}</if>
<if test="timeType != null and timeType != '' and timeType == 'year'"> and YEAR(complaint_time)=#{year}</if>
<if test="timeType != null and timeType != '' and timeType == 'day'">
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
</if>
group by complaint_department_id group by complaint_department_id
order by total desc order by total desc
</where> </where>
@ -161,11 +186,11 @@
</if> </if>
</where> </where>
</select> </select>
<select id="complaintGetComplaintDepartment" parameterType="SearchType" resultMap="ComplaintStatisticsResult"> <select id="complaintGetComplaintDepartment" parameterType="ComplaintStatistics" resultMap="ComplaintStatisticsResult">
select (CASE WHEN c.rid IS NULL THEN c.complaint_department_id ELSE r.bureau_dept_id END) AS complaint_department_id, select (CASE WHEN c.rid IS NULL THEN c.complaint_department_id ELSE r.bureau_dept_id END) AS complaint_department_id,
(CASE WHEN c.rid IS NULL THEN c.complaint_department ELSE r.bureau_dept_name END) AS complaint_department, (CASE WHEN c.rid IS NULL THEN c.complaint_department ELSE r.bureau_dept_name END) AS complaint_department,
c.enforce_type, c.problem_description,c.cid,c.id,ec.pro_wo_code from complaint_statistics c c.enforce_type, c.complaint_time,c.cid,c.id,ec.pro_wo_code,r.enforcement_time as enforcementTime,c.enterprise_address as enterpriseAddress from complaint_statistics c
left join (select id, bureau_dept_id, bureau_dept_name from enforcement_registration left join (select id, bureau_dept_id, bureau_dept_name,enforcement_time from enforcement_registration
where enterprise_number is not null and check_category is not null) r where enterprise_number is not null and check_category is not null) r
on c.rid = r.id on c.rid = r.id
left join enterprise_complaint ec left join enterprise_complaint ec
@ -174,9 +199,13 @@
and (c.rid is not null or c.complaint_department_id is not null) and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type is not null and c.enforce_type is not null
and c.enterprise_number is not null and c.enterprise_number is not null
<if test="cType != null and cType != '' ">and c.enforce_type=#{cType}</if> <if test="enforceType != null and enforceType != '' ">and c.enforce_type=#{enforceType}</if>
<if test="name != null and name != '' ">and( c.complaint_department like concat('%',#{name},'%') or r.bureau_dept_name like concat('%',#{name},'%') )</if> <if test="complaintDepartment != null and complaintDepartment != '' ">and( c.complaint_department like concat('%',#{complaintDepartment},'%') or r.bureau_dept_name like concat('%',#{complaintDepartment},'%') )</if>
<if test="beginTime != null and beginTime != '' ">and c.complaint_time>=STR_TO_DATE(#{beginTime},'%Y-%m-%d')</if>
<if test="endTime != null and endTime != '' ">and c.complaint_time>=STR_TO_DATE(#{endTime},'%Y-%m-%d')</if>
<if test="enterpriseAddress != null and enterpriseAddress != '' ">and c.enterprise_address like concat('%',#{enterpriseAddress},'%')</if>
</where> </where>
order by complaint_time desc
</select> </select>
<select id="complaintGetComplaintDepartmentById" parameterType="String" resultMap="ComplaintStatisticsResult"> <select id="complaintGetComplaintDepartmentById" parameterType="String" resultMap="ComplaintStatisticsResult">
select (CASE WHEN c.rid IS NULL THEN c.complaint_department_id ELSE r.bureau_dept_id END) AS complaint_department_id, select (CASE WHEN c.rid IS NULL THEN c.complaint_department_id ELSE r.bureau_dept_id END) AS complaint_department_id,

Loading…
Cancel
Save