Browse Source

投诉字段相关修改

v4
zouyx 2 years ago
parent
commit
12511b1762
  1. 99
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/complaintStatic/complaintStatic.html
  2. 2
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html
  3. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/ComplaintStaticController.java
  4. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ComplaintStatisticsImpl.java
  5. 10
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComplaintStatisticsMapper.xml

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

@ -94,7 +94,7 @@
</li>
<li>
<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="complaintRest(1)"><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>
<a class="btn btn-warning btn-sm" onclick="downloadC1()"><i class="fa fa-share-square-o"></i> 导出</a>
</li>
</ul>
@ -157,8 +157,8 @@
</select>
</li>
<li>
<a class="btn btn-success btn-sm" onclick="searchComplaint('form',2)"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-sm" onclick="complaintRest(2)"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-success btn-sm" onclick="searchComplaint2()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-sm" onclick="complaintRest2()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-warning btn-sm" onclick="downloadC2()"><i class="fa fa-share-square-o"></i> 导出</a>
</li>
</ul>
@ -209,9 +209,8 @@
$("#quarter2").hide();
$("#month2").hide();
$('#detail').hide();
$('#closeButton').hide();
rTable1();
rTable("formId",2)
rTable2();
}
$(function() {
var options1 = {
@ -319,7 +318,7 @@
title : '被投诉对象'
},
{
field : 'complaintType',
field : 'enforceType',
title : '投诉类型',
formatter:function (value,row,index) {
for(let i=0;i<caseType.length;i++){
@ -401,7 +400,6 @@
document.getElementById(`${prefix}-tab${num}`).classList.add('active');
}
function searchComplaint1 () {
rTable1();
var currentId=$('form').eq(0).attr('id');
var params = $.common.formToJSON(currentId);
@ -414,12 +412,12 @@
}
})
}
function searchComplaint (name,n) {
rTable(name,n)
var currentId=$('form').eq(n-1).attr('id');
function searchComplaint2 () {
rTable2();
var currentId=$('form').eq(1).attr('id');
var params = $.common.formToJSON(currentId);
$.ajax({
url:prefix+'/searchType'+n,
url:prefix+'/searchType2',
type:'GET',
data:params,
success: function (response) {
@ -441,51 +439,22 @@
}
})
}
function rTable(name,n){
var currentId=$('form').eq(n-1).attr('id')
function rTable2(){
var currentId=$('form').eq(1).attr('id')
var params = $.common.formToJSON(currentId);
$.ajax({
url: prefix + "/list2",
method: 'post',
data:params,
success:function (response){
$('#bootstrap-table' + n).bootstrapTable('load', response);
if(n==2) {
$('#bootstrap-table2').bootstrapTable('load', response);
pieData=dataMake(response.rows);
console.log(pieData);
//option3.series.data=pieData;
var option3 = {
/*color:['#1874CD','#3A5FCD','#436EEE','#4876FF','#1E90FF','#63B8FF'],
tooltip: {},
legend: {
data: ['投诉类型统计']
},
series: [
{
name: '投诉类型统计',
type: 'pie',
radius: ['30%', '40%'],
data: pieData,
label: {
show: true,
formatter: function (arg) {
console.log(arg);
return arg.name + " " + arg.value + " " + arg.percent + "%";
}
},
}
]*/
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
/*legend: {
x : 'left',
y : 'center',
itemGap: 20,
orient: 'vercital'
},*/
color: ['#1f74f1', '#79e24a', '#41d5d3', '#f59036', '#fed100', '#ababac'],
series: [{
top: '5%',
@ -513,7 +482,6 @@
}]
}
myChart.setOption(option3);
}
},
error:function (xhr,status,error){
console.error("请求失败:",status,error);
@ -557,26 +525,6 @@
}
}
function sComplaint(eName){
/*console.log(eName);
var currentId=$('form').eq(0).attr('id')
var params = $.common.formToJSON(currentId);
if(eName!='空'){
params.name=eName;
}
console.log(params);
$.ajax({
url: prefix + "/eType",
method: 'post',
data:params,
success:function (response){
console.log(response);
$('#closeButton').show();
$('#detail').show();
$('#bootstrap-table').bootstrapTable('load', response);
},error:function (xhr,status,error){
console.error("请求失败:",status,error);
}
})*/
var currentId=$('form').eq(0).attr('id')
var params = $.common.formToJSON(currentId);
params.name=eName;
@ -585,7 +533,6 @@
method: 'post',
data:params,
success:function (response){
$('#closeButton').show();
$('#detail').show();
$('#bootstrap-table').bootstrapTable('load', response);
},error:function (xhr,status,error){
@ -602,20 +549,18 @@
}
}
function closeC(){
$('#closeButton').hide();
$('#detail').hide();
}
function complaintRest(n){
$('form').eq(n-1).trigger("reset");
searchComplaint("formId",n)
if(n==2){
timeType2();
}
else if(n==1){
timeType1();
searchComplaint1();
$('#bootstrap-table').hide();
}
function complaintRest1(){
$('form').eq(0).trigger("reset");
searchComplaint1();
timeType1();
$('#detail').hide();
}
function complaintRest2(){
$('form').eq(1).trigger("reset");
searchComplaint2()
timeType2();
}
function downloadC1(){
var currentId=$('form').eq(0).attr('id');

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

@ -975,7 +975,7 @@
title: '企业名称'
},
{
field: 'complaintType',
field: 'enforceType',
title: '投诉类型',
formatter:function (value,row,index) {
debugger

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

@ -69,7 +69,7 @@ public class ComplaintStaticController extends BaseController {
model.addAttribute("year",searchType.getYear());
ComplaintStatistics complaintStatistics=dateMake(searchType);
if(searchType.getcType()!=null&&!"".equals(searchType.getcType())) {
complaintStatistics.setComplaintType(Integer.parseInt(searchType.getcType()));
complaintStatistics.setEnforceType(Integer.parseInt(searchType.getcType()));
}
Map<String, Dept> deptMap=new HashMap<>();
if(searchType.getName()!=null&&!"".equals(searchType.getName())){//搜索条件内有投诉对象时
@ -107,7 +107,7 @@ public class ComplaintStaticController extends BaseController {
public TableDataInfo list(SearchType searchType) {
ComplaintStatistics complaintStatistics=dateMake(searchType);
if(searchType.getcType()!=null&&!"".equals(searchType.getcType())) {
complaintStatistics.setComplaintType(Integer.parseInt(searchType.getcType()));
complaintStatistics.setEnforceType(Integer.parseInt(searchType.getcType()));
}
if(searchType.getName()!=null&&!"".equals(searchType.getName())){//搜索条件内有投诉对象时
complaintStatistics.setComplaintDepartmentId(searchType.getName());

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

@ -132,7 +132,7 @@ public class ComplaintStatisticsImpl implements ComplaintStatisticsService {
@Override
public List<StatisticsIndicator> type(List<ComplaintStatistics> complaintStatisticsList){
int number=complaintStatisticsList.size();
Map<Integer,Long> map=complaintStatisticsList.stream().collect(Collectors.groupingBy(item->item.getComplaintType()==null?100:item.getComplaintType(),Collectors.counting()));
Map<Integer,Long> map=complaintStatisticsList.stream().collect(Collectors.groupingBy(item->item.getEnforceType()==null?100:item.getEnforceType(),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()){
@ -157,7 +157,7 @@ public class ComplaintStatisticsImpl implements ComplaintStatisticsService {
@Override
public List<ComplaintStatistics> list1(SearchType searchType,ComplaintStatistics complaintStatistics){
if(searchType.getcType()!=null&&!"".equals(searchType.getcType())) {
complaintStatistics.setComplaintType(Integer.parseInt(searchType.getcType()));
complaintStatistics.setEnforceType(Integer.parseInt(searchType.getcType()));
}
Map<String, Dept> deptMap=new HashMap<>();
if(searchType.getName()!=null&&!"".equals(searchType.getName())){//搜索条件内有投诉对象时

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

@ -28,6 +28,7 @@
<where>
and complaint_department_id is not null
and complaint_department is not null
and enforce_type is not null
<if test="complaintDepartmentIdList != null and complaintDepartmentIdList.size()>0">
and complaint_department_id in
<foreach collection="complaintDepartmentIdList" item="complaintDepartmentIdList" open="(" separator="," close=")">
@ -36,6 +37,7 @@
</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="enforceType != null and enforceType != ''">and enforce_type=#{enforceType}</if>
<if test="complaintType != null and complaintType != ''">and complaint_type=#{complaintType}</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
@ -50,12 +52,14 @@
<where>
and complaint_department_id is not null
and complaint_department is not null
and enforce_type is not null
<if test="complaintDepartmentIdList != null and complaintDepartmentIdList.size()>0">
and complaint_department_id in
<foreach collection="complaintDepartmentIdList" item="complaintDepartmentIdList" open="(" separator="," close=")">
#{complaintDepartmentIdList}
</foreach>
</if>
<if test="enforceType != null and enforceType != ''">and enforce_type=#{enforceType}</if>
<if test="complaintType != null and complaintType != ''">and complaint_type=#{complaintType}</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
@ -68,11 +72,13 @@
</where>
</select>
<select id="selectComplaintStatisticsGroupByType" parameterType="ComplaintStatistics" resultMap="ComplaintStatisticsResult">
select complaint_type,count(*)as'total' from complaint_statistics
select enforce_type,count(*)as'total' from complaint_statistics
<where>
and complaint_department is not null
and complaint_department_id is not null
and enforce_type is not null
<if test="complaintDepartmentId!=null and complaintDepartmentId !=''"> and complaint_department_id =#{complaintDepartmentId}</if>
<if test="enforceType != null and enforceType != ''">and enforce_type=#{enforceType}</if>
<if test="complaintType != null and complaintType != ''">and complaint_type=#{complaintType}</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &gt;= STR_TO_DATE(#{beginTime},'%Y-%m-%d')
@ -81,7 +87,7 @@
and DATE_FORMAT(complaint_time,'%Y-%m-%d') &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d')
</if>
</where>
group by complaint_type
group by enforce_type
order by total desc
</select>
<insert id="insertComplaintStatistics" parameterType="ComplaintStatistics">

Loading…
Cancel
Save