Browse Source

执法投诉统计修改

v4
zouyx 2 years ago
parent
commit
b695704aa9
  1. 87
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
  2. 28
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
  3. 9
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/ComplaintStatistics.java
  4. 1
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml

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

@ -111,7 +111,7 @@
</div> </div>
</form> </form>
<div class="col-sm-12 select-table table-bordered"> <div class="col-sm-12 select-table table-bordered">
<div id="detail" class="detail-list"> <div id="detail" class="detail-list" style="width: 85%;">
<span id="closeButton" class="detail-close" onclick="closeC()">×</span> <span id="closeButton" class="detail-close" onclick="closeC()">×</span>
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
</div> </div>
@ -229,7 +229,7 @@
field : 'complaintDepartment', field : 'complaintDepartment',
title : '被投诉对象' title : '被投诉对象'
}, },
{ /*{
field : 'complaintType', field : 'complaintType',
title : '投诉类型', title : '投诉类型',
formatter:function (value,row,index) { formatter:function (value,row,index) {
@ -258,10 +258,13 @@
return '<span style="cursor: pointer;color: blue;" ONCLICK="sComplaint(\'' + row.complaintDepartment + '\')">'+cName+'</span>'; return '<span style="cursor: pointer;color: blue;" ONCLICK="sComplaint(\'' + row.complaintDepartment + '\')">'+cName+'</span>';
} }
} }
}, },*/
{ {
field : 'total', field : 'total',
title : '投诉数量' title : '投诉数量',
formatter:function (value,row,index) {
return '<span style="cursor: pointer;color: blue;" ONCLICK="sComplaint(\'' + row.complaintDepartmentId + '\')">'+value+'</span>';
}
}, },
] ]
}; };
@ -308,7 +311,13 @@
$(function() { $(function() {
var options3 = { var options3 = {
modalName: "类型显示", modalName: "类型显示",
pagination: true,
pageSize: 10,
columns: [ columns: [
{
field : 'complaintDepartment',
title : '被投诉对象'
},
{ {
field : 'complaintType', field : 'complaintType',
title : '投诉类型', title : '投诉类型',
@ -322,9 +331,49 @@
} }
}, },
{ {
field : 'total', field : 'problemDescription',
title : '投诉数量' 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 + '<img style="cursor: pointer;" src="' + list[i] + '" @click="openPicture(\''+list[i]+'\')"></img>';
}
}
return string;
}else{
/*let list=["http://localhost:8080/","D:/code/zdxt/zdxtLawEnforcementCode/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/template/a6c39541059498889daec9d3acd601a.png","/profile//2024/01/11/35082e876f84a21f40f075adf4f0da30.png"];
let string='';
if (list.length > 0) {
for (let i = 0; i < list.length; i++) {
string = string + '<img style="cursor: pointer;" src="' + list[i] + '" @click="openPicture(\''+list[i]+'\')"></img>';
}
}*/
return null;
}
}
},
{
field : 'enterpriseAddress',
title : '涉事地址',
},
{
field : 'linkman',
title : '联系人'
},
{
field : 'linkmanTel',
title : '联系电话'
},
{
field : 'complaintTime',
title : '投诉时间'
},
] ]
} }
$("#bootstrap-table").bootstrapTable(options3); $("#bootstrap-table").bootstrapTable(options3);
@ -508,7 +557,7 @@
} }
} }
function sComplaint(eName){ function sComplaint(eName){
console.log(eName); /*console.log(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);
if(eName!='空'){ if(eName!='空'){
@ -527,8 +576,30 @@
},error:function (xhr,status,error){ },error:function (xhr,status,error){
console.error("请求失败:",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(){ function closeC(){
$('#closeButton').hide(); $('#closeButton').hide();
$('#detail').hide(); $('#detail').hide();

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

@ -1,5 +1,6 @@
package com.zdxt.code.controller; package com.zdxt.code.controller;
import com.zdxt.auth.feign.ZdxtFileCommonApi;
import com.zdxt.auth.framework.web.domain.AjaxResult; import com.zdxt.auth.framework.web.domain.AjaxResult;
import com.zdxt.auth.project.system.dept.service.IDeptService; 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;
@ -11,6 +12,7 @@ import com.zdxt.code.service.ComplaintStatisticsService;
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;
import com.zdxt.common.zdxtFile.ZdxtFileCommon;
import com.zdxt.domain.auth.Dept; import com.zdxt.domain.auth.Dept;
import com.zdxt.domain.auth.DictData; import com.zdxt.domain.auth.DictData;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -42,6 +44,8 @@ public class ComplaintStaticController extends BaseController {
private DictDataMapper dictDataMapper; private DictDataMapper dictDataMapper;
@Autowired @Autowired
private IDeptService iDeptService; private IDeptService iDeptService;
@Autowired
private ZdxtFileCommonApi zdxtFileCommonApi;
private String prefix = "project/code/complaintStatic"; private String prefix = "project/code/complaintStatic";
@RequiresPermissions("code:complaintStatic:view") @RequiresPermissions("code:complaintStatic:view")
@GetMapping() @GetMapping()
@ -118,6 +122,30 @@ public class ComplaintStaticController extends BaseController {
} }
return getDataTable(complaintStatisticsList); 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<ComplaintStatistics> complaintStatisticsList=complaintStatisticsService.selectComplaintStatisticsList(complaintStatistics);
for(ComplaintStatistics c:complaintStatisticsList){
List<ZdxtFileCommon> zdxtFileCommonList=zdxtFileCommonApi.selectZdxtFileById(c.getCid());
List<String> 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") @RequiresPermissions("code:complaintStatic:list")
@PostMapping("/list2") @PostMapping("/list2")

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

@ -25,6 +25,7 @@ public class ComplaintStatistics extends BaseDomain {
public String total; public String total;
private Integer nullType; private Integer nullType;
public List<String> fileList;
public String getId() { public String getId() {
return id; return id;
} }
@ -176,4 +177,12 @@ public class ComplaintStatistics extends BaseDomain {
public void setEnterpriseAddress(String enterpriseAddress) { public void setEnterpriseAddress(String enterpriseAddress) {
this.enterpriseAddress = enterpriseAddress; this.enterpriseAddress = enterpriseAddress;
} }
public List<String> getFileList() {
return fileList;
}
public void setFileList(List<String> fileList) {
this.fileList = fileList;
}
} }

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

@ -34,6 +34,7 @@
#{complaintDepartmentIdList} #{complaintDepartmentIdList}
</foreach> </foreach>
</if> </if>
<if test="complaintDepartmentId!=null and complaintDepartmentId !=''"> and complaint_department_id =#{complaintDepartmentId}</if>
<if test="rid != null and rid != ''">and rid=#{rid}</if> <if test="rid != null and rid != ''">and rid=#{rid}</if>
<if test="complaintType != null and complaintType != ''">and complaint_type=#{complaintType}</if> <if test="complaintType != null and complaintType != ''">and complaint_type=#{complaintType}</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 --> <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->

Loading…
Cancel
Save