From b695704aa99fd37e9521bb2a36806cfdf5f6471c Mon Sep 17 00:00:00 2001 From: zouyx <1798599149@qq.com> Date: Wed, 13 Nov 2024 14:50:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A7=E6=B3=95=E6=8A=95=E8=AF=89=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../code/complaintStatic/complaintStatic.html | 87 +++++++++++++++++-- .../controller/ComplaintStaticController.java | 28 ++++++ .../zdxt/code/domain/ComplaintStatistics.java | 9 ++ .../mapper/ComplaintStatisticsMapper.xml | 1 + 4 files changed, 117 insertions(+), 8 deletions(-) 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 0d19187c..866aafc8 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 @@ -111,7 +111,7 @@
-
+
×
@@ -229,7 +229,7 @@ field : 'complaintDepartment', title : '被投诉对象' }, - { + /*{ field : 'complaintType', title : '投诉类型', formatter:function (value,row,index) { @@ -258,10 +258,13 @@ return ''+cName+''; } } - }, + },*/ { field : 'total', - title : '投诉数量' + title : '投诉数量', + formatter:function (value,row,index) { + return ''+value+''; + } }, ] }; @@ -308,7 +311,13 @@ $(function() { var options3 = { modalName: "类型显示", + pagination: true, + pageSize: 10, columns: [ + { + field : 'complaintDepartment', + title : '被投诉对象' + }, { field : 'complaintType', title : '投诉类型', @@ -322,9 +331,49 @@ } }, { - field : 'total', - title : '投诉数量' - } + field : 'problemDescription', + title : '投诉内容' + }, + { + field : 'fileList', + title : '附件', + formatter:function (value,row,index) { + if(value!=null) { + let string=''; + if (value.length > 0) { + for (let i = 0; i < list.length; i++) { + string = string + ''; + } + } + return string; + }else{ + /*let list=["http://localhost:8080/","D:/code/zdxt/zdxtLawEnforcementCode/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/template/a6c39541059498889daec9d3acd601a.png","/profile//2024/01/11/35082e876f84a21f40f075adf4f0da30.png"]; + let string=''; + if (list.length > 0) { + for (let i = 0; i < list.length; i++) { + string = string + ''; + } + }*/ + return null; + } + } + }, + { + field : 'enterpriseAddress', + title : '涉事地址', + }, + { + field : 'linkman', + title : '联系人' + }, + { + field : 'linkmanTel', + title : '联系电话' + }, + { + field : 'complaintTime', + title : '投诉时间' + }, ] } $("#bootstrap-table").bootstrapTable(options3); @@ -508,7 +557,7 @@ } } function sComplaint(eName){ - console.log(eName); + /*console.log(eName); var currentId=$('form').eq(0).attr('id') var params = $.common.formToJSON(currentId); if(eName!='空'){ @@ -527,8 +576,30 @@ },error:function (xhr,status,error){ console.error("请求失败:",status,error); } + })*/ + var currentId=$('form').eq(0).attr('id') + var params = $.common.formToJSON(currentId); + params.name=eName; + $.ajax({ + url: prefix + "/list", + method: 'post', + data:params, + success:function (response){ + $('#closeButton').show(); + $('#detail').show(); + $('#bootstrap-table').bootstrapTable('load', response); + },error:function (xhr,status,error){ + console.error("请求失败:",status,error); + } }) } + function openPicture(url){ + if(url!=null&&url!=''){ + this.$message.warning('图片不存在'); + }else{ + window.open(url); + } + } function closeC(){ $('#closeButton').hide(); $('#detail').hide(); 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 515e639b..5cad8485 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 @@ -1,5 +1,6 @@ package com.zdxt.code.controller; +import com.zdxt.auth.feign.ZdxtFileCommonApi; import com.zdxt.auth.framework.web.domain.AjaxResult; import com.zdxt.auth.project.system.dept.service.IDeptService; import com.zdxt.auth.project.system.dict.mapper.DictDataMapper; @@ -11,6 +12,7 @@ import com.zdxt.code.service.ComplaintStatisticsService; import com.zdxt.code.service.IEnterpriseComplaintService; import com.zdxt.common.controller.BaseController; import com.zdxt.common.util.TableDataInfo; +import com.zdxt.common.zdxtFile.ZdxtFileCommon; import com.zdxt.domain.auth.Dept; import com.zdxt.domain.auth.DictData; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -42,6 +44,8 @@ public class ComplaintStaticController extends BaseController { private DictDataMapper dictDataMapper; @Autowired private IDeptService iDeptService; + @Autowired + private ZdxtFileCommonApi zdxtFileCommonApi; private String prefix = "project/code/complaintStatic"; @RequiresPermissions("code:complaintStatic:view") @GetMapping() @@ -118,6 +122,30 @@ public class ComplaintStaticController extends BaseController { } return getDataTable(complaintStatisticsList); } + @RequiresPermissions("code:complaintStatic:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SearchType searchType) { + ComplaintStatistics complaintStatistics=dateMake(searchType); + if(searchType.getCType()!=null&&!"".equals(searchType.getCType())) { + complaintStatistics.setComplaintType(Integer.parseInt(searchType.getCType())); + } + if(searchType.getName()!=null&&!"".equals(searchType.getName())){//搜索条件内有投诉对象时 + complaintStatistics.setComplaintDepartmentId(searchType.getName()); + } + List complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics); + for(ComplaintStatistics c:complaintStatisticsList){ + List zdxtFileCommonList=zdxtFileCommonApi.selectZdxtFileById(c.getCid()); + List strings=new ArrayList<>(); + if(zdxtFileCommonList.size()>0){ + for(ZdxtFileCommon z:zdxtFileCommonList){ + strings.add(z.getUploadPath()); + } + c.setFileList(strings); + } + } + return getDataTable(complaintStatisticsList); + } @RequiresPermissions("code:complaintStatic:list") @PostMapping("/list2") 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 c99f9b31..dc6e18d9 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 @@ -25,6 +25,7 @@ public class ComplaintStatistics extends BaseDomain { public String total; private Integer nullType; + public List fileList; public String getId() { return id; } @@ -176,4 +177,12 @@ public class ComplaintStatistics extends BaseDomain { public void setEnterpriseAddress(String enterpriseAddress) { this.enterpriseAddress = enterpriseAddress; } + + public List getFileList() { + return fileList; + } + + public void setFileList(List fileList) { + this.fileList = fileList; + } } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml index fd1f892f..65b3974b 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml @@ -34,6 +34,7 @@ #{complaintDepartmentIdList} + and complaint_department_id =#{complaintDepartmentId} and rid=#{rid} and complaint_type=#{complaintType}