26 changed files with 1577 additions and 123 deletions
@ -0,0 +1,272 @@ |
|||
package com.zdxt.app.controller; |
|||
|
|||
|
|||
import com.google.common.collect.Lists; |
|||
import com.zdxt.auth.project.system.dept.mapper.DeptMapper; |
|||
import com.zdxt.auth.project.system.user.mapper.UserMapper; |
|||
import com.zdxt.code.domain.*; |
|||
import com.zdxt.code.mapper.Zfryjdm2405301Mapper; |
|||
import com.zdxt.code.service.EnforcementCheckStatisticsService; |
|||
import com.zdxt.common.ZDResponse; |
|||
import com.zdxt.common.controller.BaseController; |
|||
import com.zdxt.common.util.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.text.ParseException; |
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
|
|||
|
|||
/** |
|||
* 行政执法检查统计Controller |
|||
* |
|||
* @author zouyaxin |
|||
* @date 2024/8/29 |
|||
*/ |
|||
|
|||
@Controller |
|||
@RequestMapping("/app/enforcementCheckStatistics") |
|||
public class AppEnforcementCheckStatisticsController extends BaseController { |
|||
private String prefix = "code/enforcementCheckStatistics"; |
|||
|
|||
@Autowired |
|||
private EnforcementCheckStatisticsService enforcementCheckStatisticsService; |
|||
@Autowired |
|||
private UserMapper userMapper; |
|||
@Autowired |
|||
private Zfryjdm2405301Mapper zfryjdm2405301Mapper; |
|||
@Autowired |
|||
private DeptMapper deptMapper; |
|||
|
|||
@GetMapping ("/queryList/{year}/{month}") |
|||
@ResponseBody |
|||
public void queryList(HttpServletResponse response, @PathVariable String year, @PathVariable List<Integer> month) throws ParseException {//以执法主体维度统计
|
|||
EnforcementCheckStatistics enforcementCheckStatistics=new EnforcementCheckStatistics(); |
|||
String month1=StringUtils.join(month,","); |
|||
enforcementCheckStatistics.setYear(year); |
|||
enforcementCheckStatistics.setMonth(month1); |
|||
System.out.println(enforcementCheckStatistics); |
|||
//查出区下所有区的id
|
|||
List<EnforcementCheckStatistics> areaAllList = enforcementCheckStatisticsService.selectAllAreaList(); |
|||
//存放以区id为键,该id下的所有记录为值
|
|||
Map<String,List<EnforcementCheckStatistics>> list=new HashMap<>(); |
|||
for(int i=0;i<areaAllList.size();i++) { |
|||
areaAllList.get(i).setMonth(enforcementCheckStatistics.getMonth()); |
|||
areaAllList.get(i).setYear(enforcementCheckStatistics.getYear()); |
|||
EnforcementCheckStatistics enforcementCheckStatistics1 = areaAllList.get(i); |
|||
//查找出该区下的所有执法记录
|
|||
List<EnforcementCheckStatistics> statisticslist = enforcementCheckStatisticsService.selectEnforcementCheckStatisticsList(enforcementCheckStatistics1); |
|||
//以区id为键,区下所有执法记录为值
|
|||
list.put(areaAllList.get(i).getDeptName(), statisticslist);//区名为键
|
|||
//list.put(areaAllList.get(i).getDeptId(), statisticslist);
|
|||
} |
|||
EnforcementCheckStatistics e2=new EnforcementCheckStatistics(); |
|||
e2.setYear(year); |
|||
e2.setMonth(month1); |
|||
list.put("市",enforcementCheckStatisticsService.selectEnforcementCheckStatisticsCityList(e2));//区外也加入
|
|||
List<String> inOrderList=new ArrayList<>(); |
|||
Collections.addAll(inOrderList,"福田区","罗湖区","盐田区","南山区","宝安区","龙岗区","龙华区", |
|||
"坪山区","光明区","大鹏新区","深汕特别合作区","市"); |
|||
List<EnterpriseStreet> enterpriseStreet=enforcementCheckStatisticsService.selectEnterpriseStreetList(); |
|||
enforcementCheckStatisticsService.excelExport(response,enforcementCheckStatistics,inOrderList,list,enterpriseStreet); |
|||
} |
|||
|
|||
//http://10.132.108.3:85/enforcementCheckStatistics/queryEnterpriseAddressList?enterpriseAddress=地区名
|
|||
@GetMapping ("/queryEnterpriseAddressList") |
|||
@ResponseBody |
|||
public void queryEnterpriseAddressList(HttpServletResponse response, @RequestParam String enterpriseAddress) |
|||
{ |
|||
EnterpriseStreet enterpriseStreet=new EnterpriseStreet(); |
|||
enterpriseStreet.setEnterpriseAddress(enterpriseAddress); |
|||
List<EnterpriseStreet> enterpriseStreetList=enforcementCheckStatisticsService.selectEnterpriseName(enterpriseStreet); |
|||
System.out.println(enterpriseStreetList); |
|||
enforcementCheckStatisticsService.excelExport2(response,enterpriseStreetList,enterpriseAddress); |
|||
} |
|||
//http://localhost:85/enforcementCheckStatistics/queryAllList/2024-8-26/2024-8-28
|
|||
@GetMapping ("/queryAllList/{startTime}/{endTime}") |
|||
@ResponseBody |
|||
public void queryAllList(HttpServletResponse response, @PathVariable String startTime, @PathVariable String endTime) throws ParseException {//以企业维度统计
|
|||
EnforcementCheckStatistics enforcementCheckStatistics=new EnforcementCheckStatistics(); |
|||
/* String month1=StringUtils.join(month,","); |
|||
enforcementCheckStatistics.setYear(year); |
|||
enforcementCheckStatistics.setMonth(month1);*/ |
|||
enforcementCheckStatistics.setStartTime(startTime); |
|||
enforcementCheckStatistics.setEndTime(endTime); |
|||
enforcementCheckStatistics.setNowTime(new Date()); |
|||
List<EnforcementCheckStatistics> enforcementCheckStatisticsList=enforcementCheckStatisticsService.selectAllStatisticsList(enforcementCheckStatistics); |
|||
List<String> inOrderList=new ArrayList<>(); |
|||
Collections.addAll(inOrderList,"福田区","罗湖区","盐田区","南山区","宝安区","龙岗区","龙华区", |
|||
"坪山区","光明区","大鹏新区","深汕特别合作区"); |
|||
Map<String,List<EnforcementCheckStatistics>> enforcementCheckStatisticsMap=new HashMap<>(); |
|||
for(int i=0;i<inOrderList.size();i++){ |
|||
String area=inOrderList.get(i); |
|||
//List<EnforcementCheckStatistics> e1=enforcementCheckStatisticsList.stream().filter(item->item.getEnterpriseAddress().contains(area)).collect(Collectors.toList());
|
|||
List<EnforcementCheckStatistics> e1=new ArrayList<>(); |
|||
if(area.equals("光明区")){//光明区特殊处理
|
|||
//e1 = enforcementCheckStatisticsList.stream().collect(Collectors.groupingBy(item -> ((item.getEnterpriseAddress().contains(area)||(item.getEnterpriseAddress().contains("光明新区")))? area : "其他")));
|
|||
e1=enforcementCheckStatisticsList.stream().filter(item->(item.getEnterpriseAddress().contains(area)||item.getEnterpriseAddress().contains("光明新区"))).collect(Collectors.toList()); |
|||
}else { |
|||
// e1 = enforcementCheckStatisticsList.stream().collect(Collectors.groupingBy(item -> (item.getEnterpriseAddress().contains(area)? area : "其他")));
|
|||
e1=enforcementCheckStatisticsList.stream().filter(item->item.getEnterpriseAddress().contains(area)).collect(Collectors.toList()); |
|||
} |
|||
enforcementCheckStatisticsMap.put(area,e1); |
|||
} |
|||
//将地址不属于各个区的筛出来放入执法记录map
|
|||
List<EnforcementCheckStatistics> qt=enforcementCheckStatisticsList.stream().filter(item->!( |
|||
item.getEnterpriseAddress().contains("福田区")||item.getEnterpriseAddress().contains("罗湖区")|| |
|||
item.getEnterpriseAddress().contains("盐田区")||item.getEnterpriseAddress().contains("南山区")|| |
|||
item.getEnterpriseAddress().contains("宝安区")||item.getEnterpriseAddress().contains("龙岗区")|| |
|||
item.getEnterpriseAddress().contains("龙华区")||item.getEnterpriseAddress().contains("坪山区")|| |
|||
item.getEnterpriseAddress().contains("大鹏新区")||item.getEnterpriseAddress().contains("深汕特别合作区")|| |
|||
item.getEnterpriseAddress().contains("光明区")||item.getEnterpriseAddress().contains("光明新区"))) |
|||
.collect(Collectors.toList()); |
|||
enforcementCheckStatisticsMap.put("其他",qt); |
|||
List<EnterpriseStreet> enterpriseStreet=enforcementCheckStatisticsService.selectEnterpriseStreetList(); |
|||
inOrderList.add("其他"); |
|||
enforcementCheckStatisticsService.excelExport(response,enforcementCheckStatistics,inOrderList,enforcementCheckStatisticsMap,enterpriseStreet); |
|||
} |
|||
@GetMapping("/statisticsIndicator") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicator(){ |
|||
return ZDResponse.success("统计成功", enforcementCheckStatisticsService.sjtjzb()); |
|||
} |
|||
@GetMapping("/statisticsIndicator1") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicator1(){ |
|||
return ZDResponse.success("企业维度统计成功",enforcementCheckStatisticsService.enterpriseStatistics()); |
|||
} |
|||
@GetMapping("/statisticsIndicator2") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicator2(){ |
|||
return ZDResponse.success("执法主体维度统计成功",enforcementCheckStatisticsService.enforcementStatistics()); |
|||
} |
|||
@GetMapping("/statisticsIndicator3/{startTime}/{endTime}/{dateType}") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicator3(@PathVariable String startTime,@PathVariable String endTime,@PathVariable int dateType){ |
|||
return ZDResponse.success("执法检查维度统计成功",enforcementCheckStatisticsService.checkStatistics(startTime,endTime,dateType)); |
|||
} |
|||
@GetMapping("/statisticsIndicator4/{startTime}/{endTime}/{dateType}") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicator4(@PathVariable String startTime,@PathVariable String endTime,@PathVariable int dateType){ |
|||
return ZDResponse.success("投诉维度统计成功",enforcementCheckStatisticsService.complaintStatistics(startTime,endTime,dateType)); |
|||
} |
|||
@GetMapping("/statisticsIndicator5") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicator5(){ |
|||
return ZDResponse.success("检查计划维度统计成功",enforcementCheckStatisticsService.planStatistics()); |
|||
} |
|||
@GetMapping("/statisticsIndicator6/{startTime}/{endTime}/{dateType}") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicator6(@PathVariable String startTime,@PathVariable String endTime,@PathVariable int dateType){ |
|||
return ZDResponse.success("预警维度统计成功",enforcementCheckStatisticsService.warningStatistics(startTime,endTime,dateType)); |
|||
} |
|||
@GetMapping("/huan/{bureauDeptId}") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicator4(@PathVariable String bureauDeptId){ |
|||
return ZDResponse.success("执法主体执法环比成功",enforcementCheckStatisticsService.Include(bureauDeptId)); |
|||
} |
|||
@GetMapping("/statisticsIndicatorWaring/{startTime}/{endTime}/{dateType}") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicatorWaring(@PathVariable String startTime,@PathVariable String endTime,@PathVariable int dateType){ |
|||
return ZDResponse.success("预警时间筛选",enforcementCheckStatisticsService.TimeFiltering3(startTime,endTime,dateType)); |
|||
} |
|||
@GetMapping("/statisticsIndicatorTest") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicatorTest(EnforcementRegistration enforcementRegistration){ |
|||
return ZDResponse.success("成功",enforcementRegistration); |
|||
} |
|||
|
|||
@GetMapping("/statisticsIndicatorPart1") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicatorPart1(EnforcementRegistration enforcementRegistration){ |
|||
if(enforcementRegistration.getBeginTime()==null||"".equals(enforcementRegistration.getBeginTime())){ |
|||
enforcementRegistration.setBeginTime("0"); |
|||
} |
|||
if(enforcementRegistration.getEndTime()==null||"".equals(enforcementRegistration.getEndTime())){ |
|||
enforcementRegistration.setEndTime("0"); |
|||
} |
|||
//当不需要时间筛选时startTime=0,endTime=0,dateType=0 月度 dateType=6,年度 dateType=5,季度 dateType=1 自定义时,startTime,endTime;dateType=0
|
|||
List<StatisticsIndicatorPart> statisticsIndicatorPartList =enforcementCheckStatisticsService.statisticsIndicatorPart1(enforcementRegistration); |
|||
return ZDResponse.success("成功", statisticsIndicatorPartList); |
|||
} |
|||
@GetMapping("/statisticsIndicatorPart2") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicatorPart2(SearchType searchType) throws ParseException { |
|||
|
|||
if(StringUtils.isNotEmpty(searchType.getEnterpriseTypeStr())){ |
|||
String[] split = searchType.getEnterpriseTypeStr().split(","); |
|||
List<String> strings = Arrays.asList(split); |
|||
searchType.setEnterpriseType(strings); |
|||
} |
|||
if(StringUtils.isNotEmpty(searchType.getCheckTypeStr())){ |
|||
String[] split = searchType.getCheckTypeStr().split(","); |
|||
List<String> strings = Arrays.asList(split); |
|||
List<Integer> transform = Lists.transform(strings, res -> { |
|||
return Integer.valueOf(res); |
|||
}); |
|||
searchType.setCheckType(transform); |
|||
} |
|||
if(StringUtils.isNotEmpty(searchType.getComplaintTypeStr())){ |
|||
String[] split = searchType.getComplaintTypeStr().split(","); |
|||
List<String> strings = Arrays.asList(split); |
|||
List<Integer> transform = Lists.transform(strings, res -> { |
|||
return Integer.valueOf(res); |
|||
}); |
|||
searchType.setComplaintType(transform); |
|||
} |
|||
//区域和企业类型传中文
|
|||
if(searchType.getBeginTime()==null||"".equals(searchType.getBeginTime())){ |
|||
searchType.setBeginTime("0"); |
|||
} |
|||
if(searchType.getEndTime()==null||"".equals(searchType.getEndTime())){ |
|||
searchType.setEndTime("0"); |
|||
} |
|||
List<StatisticsIndicatorPart> statisticsIndicatorPartList =enforcementCheckStatisticsService.statisticsIndicatorPart3(searchType); |
|||
return ZDResponse.success("成功",statisticsIndicatorPartList); |
|||
} |
|||
@GetMapping("/statisticsIndicatorPart3") |
|||
@ResponseBody |
|||
public ZDResponse statisticsIndicatorPart3(SearchType searchType) throws ParseException { |
|||
|
|||
if(StringUtils.isNotEmpty(searchType.getEnterpriseTypeStr())){ |
|||
String[] split = searchType.getEnterpriseTypeStr().split(","); |
|||
List<String> strings = Arrays.asList(split); |
|||
searchType.setEnterpriseType(strings); |
|||
} |
|||
if(StringUtils.isNotEmpty(searchType.getCheckTypeStr())){ |
|||
String[] split = searchType.getCheckTypeStr().split(","); |
|||
List<String> strings = Arrays.asList(split); |
|||
List<Integer> transform = Lists.transform(strings, res -> { |
|||
return Integer.valueOf(res); |
|||
}); |
|||
searchType.setCheckType(transform); |
|||
} |
|||
if(StringUtils.isNotEmpty(searchType.getComplaintTypeStr())){ |
|||
String[] split = searchType.getComplaintTypeStr().split(","); |
|||
List<String> strings = Arrays.asList(split); |
|||
List<Integer> transform = Lists.transform(strings, res -> { |
|||
return Integer.valueOf(res); |
|||
}); |
|||
searchType.setComplaintType(transform); |
|||
} |
|||
|
|||
if(searchType.getBeginTime()==null||"".equals(searchType.getBeginTime())){ |
|||
searchType.setBeginTime("0"); |
|||
} |
|||
if(searchType.getEndTime()==null||"".equals(searchType.getEndTime())){ |
|||
searchType.setEndTime("0"); |
|||
} |
|||
Long userId=searchType.getUserId(); |
|||
String lawCertificateNum=userMapper.selectUserById(userId).getLawCertificateNum(); |
|||
String deptId=zfryjdm2405301Mapper.selectZfryByZfCode(lawCertificateNum).getZzjgdm(); |
|||
/*String certificateNumber=userMapper.selectUserById(userId).getCertificateNumber(); |
|||
String deptId=zfryjdm2405301Mapper.selectZfryBySfz(certificateNumber).getZzjgdm();*/ |
|||
searchType.setUserId(null); |
|||
searchType.setBureauDeptId(deptId); |
|||
List<StatisticsIndicatorPart> statisticsIndicatorPartList =enforcementCheckStatisticsService.statisticsIndicatorPart3(searchType); |
|||
return ZDResponse.success("成功",statisticsIndicatorPartList); |
|||
} |
|||
} |
|||
@ -0,0 +1,317 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('企业端-执法部门预约记录列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<p>执法部门:</p> |
|||
<input type="text" name="bureauDeptName"/> |
|||
</li> |
|||
<li> |
|||
<p>执法人员:</p> |
|||
<input type="text" name="lawEnforcer"/> |
|||
</li> |
|||
<li> |
|||
<p>企业名称:</p> |
|||
<input type="text" name="enterpriseName"/> |
|||
</li> |
|||
<li> |
|||
<p>检查事项:</p> |
|||
<input type="text" name="lawEnforcementItemText"/> |
|||
</li> |
|||
<li> |
|||
<p>时段:</p> |
|||
<select id="year" name="year"> |
|||
<option value="">所有</option> |
|||
<option value="2024">2024</option> |
|||
</select> |
|||
<select id="dateSearch" name="dateSearch" onchange="timeType()" > |
|||
<option value="">所有</option> |
|||
<option value="year">年度</option> |
|||
<option value="quarter">季度</option> |
|||
<option value="month">月度</option> |
|||
</select> |
|||
<select id="quarter" name="quarter"> |
|||
<option value="">所有</option> |
|||
<option value="1">第一季度</option> |
|||
<option value="2">第二季度</option> |
|||
<option value="3">第三季度</option> |
|||
<option value="4">第四季度</option> |
|||
</select> |
|||
<select id="month" name="month"> |
|||
<option value="">所有</option> |
|||
<option value="01">1月</option> |
|||
<option value="02">2月</option> |
|||
<option value="03">3月</option> |
|||
<option value="04">4月</option> |
|||
<option value="05">5月</option> |
|||
<option value="06">6月</option> |
|||
<option value="07">7月</option> |
|||
<option value="08">8月</option> |
|||
<option value="09">9月</option> |
|||
<option value="10">10月</option> |
|||
<option value="11">11月</option> |
|||
<option value="12">12月</option> |
|||
</select> |
|||
</li> |
|||
<li class="select-time"> |
|||
<p>检查时间:</p> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-success btn-rounded btn-sm" onclick="search1()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-reset btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
<a class="btn btn-download btn-rounded btn-sm" onclick="download1()"><i class="fa fa-download"></i>下载</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-bordered"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="zdxtInclude :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('code:registration:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('code:registration:remove')}]]; |
|||
var detailFlag = [[${@permission.hasPermi('code:registration:datail')}]]; |
|||
var checkCategory=[[${@dict.getType('check_category')}]]; |
|||
var prefix = ctx + "code/registration"; |
|||
var searchType; |
|||
window.onload = function () { |
|||
$("#quarter").hide(); |
|||
$("#month").hide(); |
|||
}; |
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/staticEnforcementRegistration", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
detailUrl: prefix + "/detail/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "企业端-执法部门预约记录", |
|||
showHeader: false, |
|||
showFooter: false, |
|||
showColumns: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
columns: [ |
|||
{ |
|||
checkbox: false |
|||
}, |
|||
{ |
|||
field : 'bureauDeptName', |
|||
title : '执法部门' |
|||
}, |
|||
{ |
|||
field : 'lawEnforcement', |
|||
title : '执法人员', |
|||
formatter:function (value,row,index) { |
|||
name=""; |
|||
if(row.lawEnforcer!=""&&row.lawEnforcer!=null){ |
|||
name=row.lawEnforcer; |
|||
} |
|||
if(row.lawEnforcer!=""&&row.lawEnforcer!=null&&row.lawEnforcerTwo!=""&&row.lawEnforcerTwo!=null){ |
|||
name=name+","; |
|||
} |
|||
if(row.lawEnforcerTwo!=""&&row.lawEnforcerTwo!=null){ |
|||
name=name+row.lawEnforcerTwo; |
|||
} |
|||
return name; |
|||
} |
|||
}, |
|||
{ |
|||
field : 'enterpriseName', |
|||
title : '企业名称' |
|||
}, |
|||
{ |
|||
field : 'lawEnforcementItemText', |
|||
title : '检查事项' |
|||
}, |
|||
{ |
|||
field : 'total', |
|||
title : '检查次数', |
|||
align : 'center', |
|||
}, |
|||
{ |
|||
field : 'total', |
|||
title : '2次及以下', |
|||
align : 'center', |
|||
formatter:function (value,row,index) { |
|||
if(value <= 2){ |
|||
return value; |
|||
}else{ |
|||
return "-"; |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field : 'total', |
|||
title : '3至4次(黄色)', |
|||
align : 'center', |
|||
formatter:function (value,row,index) { |
|||
if(value >= 3 && value <= 4){ |
|||
return "<span style='color: yellow'>"+value+"</span>"; |
|||
}else{ |
|||
return "-"; |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field : 'total', |
|||
title : '5至6次(橙色)', |
|||
align : 'center', |
|||
formatter:function (value,row,index) { |
|||
if(value >= 5 && value <= 6){ |
|||
return "<span style='color: orange'>"+value+"</span>"; |
|||
}else{ |
|||
return "-"; |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field : 'total', |
|||
title : '7次及以上(红色)', |
|||
align : 'center', |
|||
formatter:function (value,row,index) { |
|||
if(value >= 7){ |
|||
return "<span style='color: red'>"+value+"</span>"; |
|||
}else{ |
|||
return "-"; |
|||
} |
|||
} |
|||
}, |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
function timeType() { |
|||
var dateSearch = document.getElementById("dateSearch"); |
|||
console.log(dateSearch.value); |
|||
if(dateSearch.value=="quarter"){ |
|||
$("#quarter").show(); |
|||
$("#month").hide(); |
|||
}else if(dateSearch.value=="month"){ |
|||
$("#quarter").hide(); |
|||
$("#month").show(); |
|||
}else { |
|||
$("#quarter").hide(); |
|||
$("#month").hide(); |
|||
} |
|||
} |
|||
function search1 (formId) { |
|||
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; |
|||
console.log(currentId); |
|||
var params = $.common.formToJSON(currentId); |
|||
searchType=params; |
|||
console.log(params); |
|||
$("#bootstrap-table").bootstrapTable('refresh', params); |
|||
zhanbi(); |
|||
|
|||
} |
|||
function zhanbi (){ |
|||
enforcementRegistration={ |
|||
"lawEnforcement":searchType.lawEnforcement, |
|||
"lawEnforcer":searchType.lawEnforcer, |
|||
"enterpriseName":searchType.enterpriseName, |
|||
"lawEnforcementItemText":searchType.lawEnforcementItemText, |
|||
"uniteCheck":searchType.uniteCheck, |
|||
"checkCategory":searchType.checkCategory, |
|||
"isComplaint":searchType.isComplaint, |
|||
"checkCss":searchType.checkCss, |
|||
"year":searchType.year, |
|||
"dateSearch":searchType.dateSearch, |
|||
"quarter":searchType.quarter, |
|||
"month":searchType.month, |
|||
"beginTime":searchType.beginTime, |
|||
"endTime":searchType.endTime, |
|||
}; |
|||
$.ajax({ |
|||
url:prefix+'/searchType', |
|||
type:'GET', |
|||
data:searchType, |
|||
success: function (response) { |
|||
console.log(check); |
|||
console.log('317'+response); |
|||
$('#a').html(response); |
|||
} |
|||
}) |
|||
} |
|||
$(document).ready(); |
|||
function download1(){ |
|||
/*startTime=searchType.beginTime; |
|||
endTime=searchType.endTime;*/ |
|||
/*$.ajax({ |
|||
url:ctx+"enforcementCheckStatistics/queryAllList/"+startTime+"/"+endTime, |
|||
type:'GET', |
|||
success: function (data) { |
|||
console.log('329'+data) |
|||
} |
|||
})*/ |
|||
/*this.download('/export',{ |
|||
...this.queryParameters |
|||
},`registration.xlsx`)*/ |
|||
//$.operate.get(ctx+"enforcementCheckStatistics/queryAllList", { "startTime": searchType.beginTime, "endTime": searchType.endTime }); |
|||
let table=document.getElementById('bootstrap-table'); |
|||
//let html=table.outerHTML; |
|||
let newTableHtml='<table><thead><tr>'; |
|||
let headers = table.querySelectorAll('thead tr th'); |
|||
headers.forEach((header, index) => { |
|||
console.log(header,index); |
|||
console.log(index !== 9); |
|||
if (index !== 9) { |
|||
newTableHtml += `<th>${header.innerText}</th>`; |
|||
} |
|||
}); |
|||
newTableHtml += '</tr></thead><tbody>'; |
|||
let rows = table.querySelectorAll('tbody tr'); |
|||
rows.forEach(row => { |
|||
newTableHtml += '<tr>'; |
|||
let cells = row.querySelectorAll('td'); |
|||
cells.forEach((cell, index) => { |
|||
if (index !== 9) { |
|||
newTableHtml += `<td>${cell.innerText}</td>`; |
|||
} |
|||
}); |
|||
newTableHtml += '</tr>'; |
|||
}); |
|||
newTableHtml += '</tbody></table>'; |
|||
let downloadLink=document.createElement("a"); |
|||
//document.body.append(downloadLink); |
|||
downloadLink.href='data:application/vnd.ms-excel,'+ encodeURIComponent(newTableHtml); |
|||
document.body.appendChild(downloadLink); |
|||
downloadLink.download='执法检查统计.xls'; |
|||
downloadLink.click(); |
|||
document.body.removeChild(downloadLink); |
|||
} |
|||
/*var table=document.getElementById('bootstrap-table'); |
|||
var rows=table.rows; |
|||
var data1=[]; |
|||
for(var i=0;i<rows.length;i++){ |
|||
var rowData=[]; |
|||
for(var j=0;j<rows[i].cells.length;j++){ |
|||
rowData.push(rows[i].cells[j].innerText); |
|||
} |
|||
data1.push(rowData) |
|||
} |
|||
var encodedUri=encodeURI(csvContent); |
|||
var link=do*/ |
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,113 @@ |
|||
package com.zdxt.code.domain.dto; |
|||
|
|||
/** |
|||
* 执法登记 统计 |
|||
*/ |
|||
public class EnforcementRegistrationDto { |
|||
|
|||
/** 被执法企业 */ |
|||
private String enterpriseName; |
|||
|
|||
/** 被执法企业税号 */ |
|||
private String enterpriseNumber; |
|||
|
|||
/** 执法人员姓名 */ |
|||
private String lawEnforcer; |
|||
|
|||
/** 执法人员ID */ |
|||
private Long lawEnforcerId; |
|||
|
|||
/** 执法人员2姓名 */ |
|||
private String lawEnforcerTwo; |
|||
|
|||
/** 执法人员2ID */ |
|||
private String lawEnforcerIdTwo; |
|||
|
|||
/** |
|||
* 检查事项 |
|||
*/ |
|||
private String lawEnforcementItemText; |
|||
|
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private Integer total; |
|||
|
|||
/** |
|||
* 局级部门 |
|||
*/ |
|||
private String bureauDeptName; |
|||
|
|||
|
|||
public String getEnterpriseName() { |
|||
return enterpriseName; |
|||
} |
|||
|
|||
public void setEnterpriseName(String enterpriseName) { |
|||
this.enterpriseName = enterpriseName; |
|||
} |
|||
|
|||
public String getEnterpriseNumber() { |
|||
return enterpriseNumber; |
|||
} |
|||
|
|||
public void setEnterpriseNumber(String enterpriseNumber) { |
|||
this.enterpriseNumber = enterpriseNumber; |
|||
} |
|||
|
|||
public String getLawEnforcer() { |
|||
return lawEnforcer; |
|||
} |
|||
|
|||
public void setLawEnforcer(String lawEnforcer) { |
|||
this.lawEnforcer = lawEnforcer; |
|||
} |
|||
|
|||
public Long getLawEnforcerId() { |
|||
return lawEnforcerId; |
|||
} |
|||
|
|||
public void setLawEnforcerId(Long lawEnforcerId) { |
|||
this.lawEnforcerId = lawEnforcerId; |
|||
} |
|||
|
|||
public String getLawEnforcerTwo() { |
|||
return lawEnforcerTwo; |
|||
} |
|||
|
|||
public void setLawEnforcerTwo(String lawEnforcerTwo) { |
|||
this.lawEnforcerTwo = lawEnforcerTwo; |
|||
} |
|||
|
|||
public String getLawEnforcerIdTwo() { |
|||
return lawEnforcerIdTwo; |
|||
} |
|||
|
|||
public void setLawEnforcerIdTwo(String lawEnforcerIdTwo) { |
|||
this.lawEnforcerIdTwo = lawEnforcerIdTwo; |
|||
} |
|||
|
|||
public String getLawEnforcementItemText() { |
|||
return lawEnforcementItemText; |
|||
} |
|||
|
|||
public void setLawEnforcementItemText(String lawEnforcementItemText) { |
|||
this.lawEnforcementItemText = lawEnforcementItemText; |
|||
} |
|||
|
|||
public Integer getTotal() { |
|||
return total; |
|||
} |
|||
|
|||
public void setTotal(Integer total) { |
|||
this.total = total; |
|||
} |
|||
|
|||
public String getBureauDeptName() { |
|||
return bureauDeptName; |
|||
} |
|||
|
|||
public void setBureauDeptName(String bureauDeptName) { |
|||
this.bureauDeptName = bureauDeptName; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue