From b798e73a6f280bb6176b130789b925a6080ec00b Mon Sep 17 00:00:00 2001
From: zouyx <1798599149@qq.com>
Date: Fri, 25 Apr 2025 17:00:48 +0800
Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E7=9D=A3=E7=AB=AF-=E6=8A=95=E8=AF=89?=
=?UTF-8?q?=E4=B8=BE=E6=8A=A5=E5=B9=B6=E5=85=A5=E6=89=A7=E6=B3=95=E6=8A=95?=
=?UTF-8?q?=E8=AF=89=E5=88=86=E6=9E=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../code/complaintStatic/complaintA.html | 2 +-
.../code/complaintStatic/complaintStatic.html | 115 +++++++----
.../project/code/complaintStatic/details.html | 182 ++++++++++++++++++
.../complaintsReport/complaintsReport.html | 53 +++--
.../controller/ComplaintStaticController.java | 73 ++++++-
.../ComplaintsReportController.java | 4 +-
.../zdxt/code/domain/ComplaintStatistics.java | 49 +++++
.../mapper/ComplaintStatisticsMapper.java | 4 +-
.../service/ComplaintStatisticsService.java | 1 +
.../code/service/ComplaintsReportService.java | 4 +-
.../service/impl/ComplaintStatisticsImpl.java | 21 ++
.../impl/ComplaintsReportServiceImpl.java | 16 +-
.../mapper/ComplaintStatisticsMapper.xml | 39 +++-
13 files changed, 483 insertions(+), 80 deletions(-)
create mode 100644 lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/details.html
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintA.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintA.html
index f411c62b..d6f28d2b 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintA.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintA.html
@@ -3,7 +3,7 @@
-
+
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
index 6e8fb45e..0576ca52 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
@@ -49,35 +49,40 @@
-
被投诉对象:
-
+
-
投诉类型:
-
+ -
+
涉事地址:
+
+
-
时段:
-
+
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
@@ -92,6 +97,12 @@
+ -
+
自定义时间:
+
+ -
+
+
-
搜索
重置
@@ -101,7 +112,7 @@
-
-
+
@@ -219,9 +230,11 @@
var myChart3 = echarts.init(document.getElementById('echartComplaint3'));
var pieData;
var deptName;
+ var currentYear = new Date().getFullYear();
window.onload = function () {
$("#quarter").hide();
$("#month").hide();
+ $("#day").hide();
$("#quarter2").hide();
$("#month2").hide();
$('#detail').hide();
@@ -383,7 +396,7 @@
return value;
}
},
- {
+/* {
field : 'problemDescription',
title : '投诉内容'
},
@@ -415,11 +428,17 @@
{
field : 'linkmanTel',
title : '联系电话'
- },
+ },*/
{
field : 'complaintTime',
title : '投诉时间'
},
+ {
+ title : '投诉情况',
+ formatter:function (value,row,index) {
+ return ''+'详情'+'';
+ }
+ },
]
};
$("#bootstrap-table").bootstrapTable(options3);
@@ -701,18 +720,47 @@
var dateSearch = document.getElementById("dateSearch");
console.log(dateSearch.value);
if(dateSearch.value=="quarter"){
+ $("#year").show();
+ if(document.getElementById("year").value==''){
+ document.getElementById("year").value=currentYear;
+ }
+ $("#day").hide();
+ document.getElementById("beginTime").value="";
+ document.getElementById("endTime").value="";
$("#quarter").show();
$("#month").hide();
- document.getElementById("month").value="";
+ document.getElementById("month").value="0";
}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();
- document.getElementById("quarter").value="";
+ document.getElementById("quarter").value="0";
$("#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 {
+ $("#year").show();
+ if(document.getElementById("year").value==''){
+ document.getElementById("year").value=currentYear;
+ }
+ $("#day").hide();
+ document.getElementById("beginTime").value="";
+ document.getElementById("endTime").value="";
$("#quarter").hide();
- document.getElementById("quarter").value="";
+ document.getElementById("quarter").value="0";
$("#month").hide();
- document.getElementById("month").value="";
+ document.getElementById("month").value="0";
}
}
function timeType2() {
@@ -736,7 +784,8 @@
function sComplaint(eName){
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
- params.name=eName;
+ // params.name=eName;
+ params.complaintDepartmentId=eName;
$.ajax({
url: prefix + "/list",
method: 'post',
@@ -772,26 +821,10 @@
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 openReport(id){
+ console.log(id);
+ $.modal.openClose("投诉举报详情", prefix + "/details/" + id);
+ }
function downloadC1(){
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/details.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/details.html
new file mode 100644
index 00000000..4cec6ec4
--- /dev/null
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/details.html
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintsReport/complaintsReport.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintsReport/complaintsReport.html
index 32a42c40..11c4e5dd 100644
--- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintsReport/complaintsReport.html
+++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintsReport/complaintsReport.html
@@ -17,16 +17,27 @@
-
-
被投诉对象:
-
+ 投诉对象:
+
-
投诉类型:
-
-
-
+
+
+
+ -
+
投诉时间:
+
+ -
+
+
+ -
+
涉事地址:
+
+
-
搜索
重置
@@ -57,9 +68,20 @@
pageSize: 10,
pageList: [10, 25, 50],
columns: [
+ {
+ checkbox: true
+ },
{
field: 'complaintDepartment',
- title: '投诉部门'
+ title: '投诉对象'
+ },
+ {
+ field: 'enforcementTime',
+ title: '执法时间'
+ },
+ {
+ field: 'complaintTime',
+ title: '投诉时间'
},
{
field: 'enforceType',
@@ -74,6 +96,10 @@
}
},
{
+ field: 'enterpriseAddress',
+ title: '涉事地址'
+ },
+ /*{
field: 'problemDescription',
title: '描述'
},
@@ -84,11 +110,11 @@
{
field: 'results',
title: '处理结果',
- },
+ },*/
{
- title:'操作',
- formatter(value, row, index){
- return ' 查看 ';
+ title: '操作',
+ formatter(value, row, index) {
+ return '详情 ';
}
}
]
@@ -102,8 +128,8 @@
var $table = $('#bootstrap-table');
var pageNumber = $table.bootstrapTable('getOptions').pageNumber;
var pageSize = $table.bootstrapTable('getOptions').pageSize;
- params.pageNumber=pageNumber;
- params.pageSize=pageSize;
+ params.pageNumber = pageNumber;
+ params.pageSize = pageSize;
$.ajax({
url: prefix + "/list",
method: 'post',
@@ -124,7 +150,8 @@
$('form').eq(0).trigger("reset");
searchReport();
}
- function openDetails(id){
+
+ function openDetails(id) {
$.modal.openClose("投诉举报详情", prefix + "/details/" + id);
}
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
index 0d5881a0..196277ed 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
+++ b/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.code.domain.*;
import com.zdxt.code.service.ComplaintStatisticsService;
+import com.zdxt.code.service.ComplaintsReportService;
import com.zdxt.code.service.IEnterpriseComplaintService;
import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.TableDataInfo;
@@ -47,6 +48,10 @@ public class ComplaintStaticController extends BaseController {
private IDeptService iDeptService;
@Autowired
private ZdxtFileCommonApi zdxtFileCommonApi;
+ @Autowired
+ private ComplaintsReportService complaintsReportService;
+ @Autowired
+ private IEnterpriseComplaintService iEnterpriseComplaintService;
private String prefix = "project/code/complaintStatic";
@RequiresPermissions("code:complaintStatic:view")
@GetMapping()
@@ -59,7 +64,8 @@ public class ComplaintStaticController extends BaseController {
complaintStatistics.setBeginTime(str.format(beginTime));
complaintStatistics.setEndTime(str.format(endTime));
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("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size());
model.addAttribute("Number3",complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics).size());//权限
@@ -69,7 +75,7 @@ public class ComplaintStaticController extends BaseController {
@RequiresPermissions("code:complaintStatic:list")
@GetMapping("/searchType1")
- public String searchType1(SearchType searchType,Model model){
+/* public String searchType1(SearchType searchType,Model model){
model.addAttribute("year",searchType.getYear());
ComplaintStatistics complaintStatistics=dateMake(searchType);
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("Number2",complaintStatisticsService.selectComplaintStatisticsGroup(complaintStatistics).size());//待权限1209
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 deptMap=new HashMap<>();
+ if(complaintStatistics.getComplaintDepartment()!=null&&!"".equals(complaintStatistics.getComplaintDepartment())){//搜索条件内有投诉对象时
+ List 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")
@PostMapping("/list1")
@ResponseBody
- public TableDataInfo complaint1(SearchType searchType) {
+/* public TableDataInfo complaint1(SearchType searchType) {
ComplaintStatistics complaintStatistics=dateMake(searchType);
- /*startPage();*/
List complaintStatisticsList=complaintStatisticsService.list1(searchType,complaintStatistics);
return getDataTable(complaintStatisticsList);
+ }*/
+ public TableDataInfo complaint1(ComplaintStatistics complaintStatistics) {
+ List complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsListGroupDeptList(complaintStatistics);
+ return getDataTable(complaintStatisticsList);
}
@RequiresPermissions("code:complaintStatic:list")
@PostMapping("/list")
@ResponseBody
- public TableDataInfo list(SearchType searchType) {
+/* public TableDataInfo list(SearchType searchType) {
ComplaintStatistics complaintStatistics=dateMake(searchType);
if(searchType.getcType()!=null&&!"".equals(searchType.getcType())) {
complaintStatistics.setEnforceType(Integer.parseInt(searchType.getcType()));
}
if(searchType.getName()!=null&&!"".equals(searchType.getName())){//搜索条件内有投诉对象时
complaintStatistics.setComplaintDepartmentId(searchType.getName());
- }
+ }*/
+ public TableDataInfo list(ComplaintStatistics complaintStatistics) {
List complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics);
for(ComplaintStatistics c:complaintStatisticsList){
List zdxtFileCommonList=zdxtFileCommonApi.selectZdxtFileById(c.getCid());
@@ -454,6 +496,25 @@ public class ComplaintStaticController extends BaseController {
List complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsLEFTEnterpriseList(complaintStatistics);//权限
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 mssqOrderFlowList = iEnterpriseComplaintService.selectEnterpriseComplaintProcess(complaintStatistics.getCid());
+ List 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 yearMake(){
int current=LocalDate.now().getYear();
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintsReportController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintsReportController.java
index 5d616d78..0118ebaa 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintsReportController.java
+++ b/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")
@PostMapping("/list")
@ResponseBody
- public TableDataInfo complaintGetComplaintDepartment(SearchType searchType) {
+ public TableDataInfo complaintGetComplaintDepartment(ComplaintStatistics complaintStatistics) {
startPage();
- List list = complaintsReportService.complaintGetComplaintDepartment(searchType);
+ List list = complaintsReportService.complaintGetComplaintDepartment(complaintStatistics);
return getDataTable(list);
}
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/ComplaintStatistics.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/ComplaintStatistics.java
index ded1e90a..03f6ce44 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/ComplaintStatistics.java
+++ b/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 enforcementTime;
+ private String timeType;
+ private String year;
+ private String quarter;
+ private String month;
+
public String getId() {
return id;
}
@@ -228,4 +237,44 @@ public class ComplaintStatistics extends BaseDomain {
public void setResults(String 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;
+ }
}
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComplaintStatisticsMapper.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComplaintStatisticsMapper.java
index 3c7d646c..d4319cef 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComplaintStatisticsMapper.java
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/ComplaintStatisticsMapper.java
@@ -31,10 +31,10 @@ public interface ComplaintStatisticsMapper {
List selectComplaintStatisticsLEFTEnterpriseList(ComplaintStatistics complaintStatistics);
/**
* 获取投诉举报列表,合并两个投诉表的投诉部门
- * @param searchType
+ * @param complaintStatistics
* @return
*/
- List complaintGetComplaintDepartment(SearchType searchType);
+ List complaintGetComplaintDepartment(ComplaintStatistics complaintStatistics);
/**
* 根据投诉统计id获取投诉举报详情
* @param id
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintStatisticsService.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintStatisticsService.java
index 7489a4b8..300a3d74 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintStatisticsService.java
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintStatisticsService.java
@@ -26,4 +26,5 @@ public interface ComplaintStatisticsService {
List jdComplaintList(List complaintStatisticsList,SearchType searchType);
List list1(SearchType searchType, ComplaintStatistics complaintStatistics);
+ List selectComplaintStatisticsListGroupDeptList(ComplaintStatistics complaintStatistics);
}
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintsReportService.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintsReportService.java
index 6f4d0ed8..dea2713b 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintsReportService.java
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ComplaintsReportService.java
@@ -8,10 +8,10 @@ import java.util.List;
public interface ComplaintsReportService {
/**
* 获取投诉举报列表,合并两个投诉表的投诉部门
- * @param searchType
+ * @param complaintStatistics
* @return
*/
- List complaintGetComplaintDepartment(SearchType searchType);
+ List complaintGetComplaintDepartment(ComplaintStatistics complaintStatistics);
/**
* 根据投诉统计id获取投诉举报详情
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java
index 4b979541..3cb94089 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java
@@ -238,4 +238,25 @@ public class ComplaintStatisticsImpl implements ComplaintStatisticsService {
}
return complaintStatisticsList;
}
+
+ @Override
+ public List selectComplaintStatisticsListGroupDeptList(ComplaintStatistics complaintStatistics) {
+ Map deptMap=new HashMap<>();
+ if(complaintStatistics.getComplaintDepartment()!=null&&!"".equals(complaintStatistics.getComplaintDepartment())){//搜索条件内有投诉对象时
+ List 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 complaintStatisticsList=complaintStatisticsMapper.selectComplaintStatisticsGroup(complaintStatistics);
+ for (int i=0;i complaintGetComplaintDepartment(SearchType searchType) {
- List list=complaintStatisticsMapper.complaintGetComplaintDepartment(searchType);
- for(int i = 0; i<(Math.min(list.size(), searchType.getPageNumber() * searchType.getPageSize())); i++){
-/* List mssqOrderFlowList =iEnterpriseComplaintService.selectEnterpriseComplaintProcess(list.get(i).getCid());
+ public List complaintGetComplaintDepartment(ComplaintStatistics complaintStatistics) {
+ List list=complaintStatisticsMapper.complaintGetComplaintDepartment(complaintStatistics);
+/* for(int i = 0; i<(Math.min(list.size(), searchType.getPageNumber() * searchType.getPageSize())); i++){
+ List mssqOrderFlowList =iEnterpriseComplaintService.selectEnterpriseComplaintProcess(list.get(i).getCid());
if(mssqOrderFlowList.size()>0){
list.get(i).setProgress(mssqOrderFlowList.get(0).getOperName());
if(mssqOrderFlowList.get(0).getState()==20){
@@ -48,15 +48,15 @@ public class ComplaintsReportServiceImpl implements ComplaintsReportService {
}else{
list.get(i).setResults("处理中");
}
- }*/
-/* list.get(i).setProgress("市统一受理分拨中心");
- list.get(i).setResults("拟交办/转送处理");*/
+ }
+ list.get(i).setProgress("市统一受理分拨中心");
+ list.get(i).setResults("拟交办/转送处理");
List mssqOrderFlowList =iEnterpriseComplaintService.selectEnterpriseComplaintProcess(list.get(i).getCid());
if(mssqOrderFlowList.size()>0) {
list.get(i).setProgress(mssqOrderFlowList.get(0).getAppOrgShortname());
list.get(i).setResults(mssqOrderFlowList.get(0).getOperName());
}
- }
+ }*/
return list;
}
diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml
index 9a3c083d..7898a176 100644
--- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml
+++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml
@@ -46,7 +46,20 @@
and DATE_FORMAT(complaint_time,'%Y-%m-%d') <= STR_TO_DATE(#{endTime},'%Y-%m-%d')
+ and enterprise_address like concat('%',#{enterpriseAddress},'%')
+ and YEAR(complaint_time)=#{year} and MONTH(complaint_time)=#{month}
+ and YEAR(complaint_time)=#{year} and QUARTER(complaint_time)=#{quarter}
+ and YEAR(complaint_time)=#{year}
+
+
+ and DATE_FORMAT(complaint_time,'%Y-%m-%d') >= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
+
+
+ and DATE_FORMAT(complaint_time,'%Y-%m-%d') <= STR_TO_DATE(#{endTime},'%Y-%m-%d')
+
+
+ order by complaint_time desc
select c.id,c.enterprise_name,c.enterprise_number,i.enterprise_address from complaint_statistics c
@@ -84,6 +97,18 @@
and DATE_FORMAT(complaint_time,'%Y-%m-%d') <= STR_TO_DATE(#{endTime},'%Y-%m-%d')
+ and enterprise_address like concat('%',#{enterpriseAddress},'%')
+ and YEAR(complaint_time)=#{year} and MONTH(complaint_time)=#{month}
+ and YEAR(complaint_time)=#{year} and QUARTER(complaint_time)=#{quarter}
+ and YEAR(complaint_time)=#{year}
+
+
+ and DATE_FORMAT(complaint_time,'%Y-%m-%d') >= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
+
+
+ and DATE_FORMAT(complaint_time,'%Y-%m-%d') <= STR_TO_DATE(#{endTime},'%Y-%m-%d')
+
+
group by complaint_department_id
order by total desc
@@ -161,11 +186,11 @@
-
+
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,
- c.enforce_type, c.problem_description,c.cid,c.id,ec.pro_wo_code from complaint_statistics c
- left join (select id, bureau_dept_id, bureau_dept_name from enforcement_registration
+ 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,enforcement_time from enforcement_registration
where enterprise_number is not null and check_category is not null) r
on c.rid = r.id
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.enforce_type is not null
and c.enterprise_number is not null
- and c.enforce_type=#{cType}
- and( c.complaint_department like concat('%',#{name},'%') or r.bureau_dept_name like concat('%',#{name},'%') )
+ and c.enforce_type=#{enforceType}
+ and( c.complaint_department like concat('%',#{complaintDepartment},'%') or r.bureau_dept_name like concat('%',#{complaintDepartment},'%') )
+ and c.complaint_time>=STR_TO_DATE(#{beginTime},'%Y-%m-%d')
+ and c.complaint_time>=STR_TO_DATE(#{endTime},'%Y-%m-%d')
+ and c.enterprise_address like concat('%',#{enterpriseAddress},'%')
+ order by complaint_time desc
select (CASE WHEN c.rid IS NULL THEN c.complaint_department_id ELSE r.bureau_dept_id END) AS complaint_department_id,