Browse Source

提交执法导出,补充接口拦截

v2
chenrui 2 years ago
parent
commit
5ef3b734e0
  1. 29
      lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/IdCardCryptoUtil.java
  2. 6
      lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/jasypt/JasyptUtils.java
  3. 2
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/CorsFilter.java
  4. 48
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/ResourcesConfig.java
  5. 3
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/ShiroConfig.java
  6. 1
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/css/stat.css
  7. 12
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html
  8. 125
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/registrationDetail.html
  9. 90
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/analysis/analysis.html
  10. 10
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/registration/registration.html
  11. 16
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/LawEnforcementWarningListController.java
  12. 5
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalController.java
  13. 28
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java
  14. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseRankExcel.java
  15. 39
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticalVo.java
  16. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalMapper.java
  17. 18
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalServiceImpl.java
  18. 15
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  19. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml
  20. 32
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalMapper.xml

29
lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/IdCardCryptoUtil.java

@ -34,24 +34,25 @@ public class IdCardCryptoUtil {
String userNameCode = IdCardCryptoUtil.symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "汪鑫"); String userNameCode = IdCardCryptoUtil.symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "汪鑫");
// String secret = IdCardCryptoUtil.symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "ae739d8c-86ed-4898-b57d-eed3be42debf"); // String secret = IdCardCryptoUtil.symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "ae739d8c-86ed-4898-b57d-eed3be42debf");
String phone = IdCardCryptoUtil.symmetricDecryptIdCard("VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0", "3qQTst9aURL3pN5EzKtqVJnQv2Q0Ob3r+Gc9DXX/I30="); // String phone = IdCardCryptoUtil.symmetricDecryptIdCard("VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0", "3qQTst9aURL3pN5EzKtqVJnQv2Q0Ob3r+Gc9DXX/I30=");
String phone = IdCardCryptoUtil.symmetricDecryptIdCard("VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0", "Mi4URDD0cfD4kU4WK8t+sQ==");
// System.out.println(userIdCode); // System.out.println(userIdCode);
// System.out.println(phone); System.out.println(phone);
// System.out.println(userNameCode); // System.out.println(userNameCode);
// System.out.println(secret); //// System.out.println(secret);
Map<String,Object> heardMap = new HashMap<>(); // Map<String,Object> heardMap = new HashMap<>();
heardMap.put("x-auth-channel", IdUtil.simpleUUID()); // heardMap.put("x-auth-channel", IdUtil.simpleUUID());
heardMap.put("x-auth-app-code","zfjdm"); // heardMap.put("x-auth-app-code","zfjdm");
String s = IdCardCryptoUtil.httpSendPost("http://egbpub.siqhz.com/egb/api/thirdauth/pub/auth/token",userIdCode,userNameCode,"zfjdm"); // String s = IdCardCryptoUtil.httpSendPost("http://egbpub.siqhz.com/egb/api/thirdauth/pub/auth/token",userIdCode,userNameCode,"zfjdm");
System.out.println(s); // System.out.println(s);
//
//
String secret = IdCardCryptoUtil.symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "df00fe17-dd15-4def-b1ff-8128ffe068ec"); // String secret = IdCardCryptoUtil.symmetricEncryptIdCard("eWIzY3BMRVNEQXhvUUlXMA==", "df00fe17-dd15-4def-b1ff-8128ffe068ec");
Map<String,Object> params = new HashMap<>(); // Map<String,Object> params = new HashMap<>();
params.put("accessKeySign",secret); // params.put("accessKeySign",secret);
params.put("appCode","zfjdm"); // params.put("appCode","zfjdm");
// String data = HttpUtil.httpSendPost("http://egbpub.siqhz.com/egb/api/thirdauth/pub/auth/getUserInfo", // String data = HttpUtil.httpSendPost("http://egbpub.siqhz.com/egb/api/thirdauth/pub/auth/getUserInfo",
// JSONObject.toJSONString(params),new HashMap<>()); // JSONObject.toJSONString(params),new HashMap<>());
// System.out.println(data); // System.out.println(data);

6
lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/jasypt/JasyptUtils.java

@ -49,9 +49,9 @@ public final class JasyptUtils {
return encryptor.decrypt(text); return encryptor.decrypt(text);
} }
public static void main(String[] args) { public static void main(String[] args) {
// String s = encryptWithMD5("明文", "密钥"); String s = encryptWithMD5("qYf-NIgyRKG-5eybrclvnBogATPfOhpnAVp6yBas7RU", "ATPfOhpnAVp6yBas7RU");
// System.out.println(s); System.out.println(s);
String channelcs1 = decryptWithMD5("szsf@zfjd", "ATPfOhpnAVp6yBas7RU"); String channelcs1 = decryptWithMD5(s, "ATPfOhpnAVp6yBas7RU");
System.out.println(channelcs1); System.out.println(channelcs1);
} }
} }

2
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/CorsFilter.java

@ -60,7 +60,7 @@ public class CorsFilter implements Filter {
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
//配置可信域名 //配置可信域名
String[] authhosts = {"http://10.132.108.3:85","http://jdm.szssfj.cn","http://localhost:85","http://192.168.31.196:3301","http://192.168.31.196:85","http://127.0.0.1:85"}; String[] authhosts = {"http://10.132.108.3:85","http://jdm.szssfj.cn","http://localhost:85","http://192.168.31.196:3301","http://192.168.31.196:85","http://127.0.0.1:85","http://localhost:3301"};
String authost = ""; String authost = "";
HttpServletRequest httprequest = (HttpServletRequest) request; HttpServletRequest httprequest = (HttpServletRequest) request;
String origin = httprequest.getHeader("Origin"); String origin = httprequest.getHeader("Origin");

48
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/ResourcesConfig.java

@ -59,40 +59,16 @@ public class ResourcesConfig implements WebMvcConfigurer
/** /**
* 自定义拦截规则 * 自定义拦截规则
*/ */
// @Override @Override
// public void addInterceptors(InterceptorRegistry registry) public void addInterceptors(InterceptorRegistry registry)
// { {
//// registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**"); // registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**");
// registry.addInterceptor(new JWTInterceptor()) registry.addInterceptor(new JWTInterceptor())
// .addPathPatterns("/app/**") .addPathPatterns("/app/**")
// .excludePathPatterns("/app/thirdLogin/siqLogin","/app/thirdLogin/siqLoginTest", .excludePathPatterns("/app/thirdLogin/siqLogin","/app/thirdLogin/siqLoginTest",
// "/app/thirdLogin/getSiqCode", "/app/thirdLogin/getSiqCode",
// "/common/upload", "/app/thirdLogin/szyptLogin/**"
// "/app/thirdLogin/szyptLogin/**", );
// "/captcha/captchaImage/**", // 除了登录放行,其他接口都token验证
// "/appLogin","/login","/index", }
// "/enterpriseInformation",
// "/code/registration",
// "/code/linkage",
// "/code/ruleList",
// "/code/LawEnforcementWarningList",
// "/system/dept/**",
// "/system/user/**",
// "/system/role/**",
// "/system/post/**",
// "/system/menu/**",
// "/code/linkage/**",
// "/monitor/operlog",
// "/monitor/logininfor",
// "/system/dict",
// "/system/config",
// "/monitor/job",
// "/statistical/analysis",
// "/statistical/view",
// "/**/*.css",
// "/**/*.js", "/**/*.png", "/**/*.jpg",
// "/**/*.jpeg", "/**/*.gif", "/**/fonts/*"
// ).addPathPatterns("/**");
//// 除了登录放行,其他接口都token验证
// }
} }

3
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/ShiroConfig.java

@ -289,7 +289,8 @@ public class ShiroConfig {
// 不拦截app登录 // 不拦截app登录
filterChainDefinitionMap.put("/appAjaxLogin", "anon"); filterChainDefinitionMap.put("/appAjaxLogin", "anon");
filterChainDefinitionMap.put("/app/appLogin", "anon"); filterChainDefinitionMap.put("/app/appLogin", "anon");
filterChainDefinitionMap.put("/app/**", "anon"); filterChainDefinitionMap.put("/app/thirdLogin/testLogin", "anon");
// filterChainDefinitionMap.put("/app/**", "anon");
filterChainDefinitionMap.put("/app-z/**", "anon"); filterChainDefinitionMap.put("/app-z/**", "anon");
filterChainDefinitionMap.put("/Cesium-1.95/**", "anon"); filterChainDefinitionMap.put("/Cesium-1.95/**", "anon");
// 临时放开附件, 不然浏览器玩不了 // 临时放开附件, 不然浏览器玩不了

1
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/css/stat.css

@ -39,6 +39,7 @@ body {
top: 110px; top: 110px;
right: 1%; right: 1%;
align-items: center; align-items: center;
width: 67%;
} }
.seltime > i { .seltime > i {

12
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/LawEnforcementWarningList.html

@ -109,16 +109,15 @@
field : 'warningCause', field : 'warningCause',
title : '预警原因' title : '预警原因'
}, },
/*{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-eye"></i>详情</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }
}*/ }
] ]
}; };
$.table.init(options); $.table.init(options);
@ -132,6 +131,11 @@
]) ])
return map; return map;
} }
function detail(dictId) {
console.log(dictId)
var url = prefix + '/registrationDetail/' + dictId;
$.modal.openTab("字典数据", url);
}
</script> </script>
</body> </body>
</html> </html>

125
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/LawEnforcementWarningList/registrationDetail.html

@ -0,0 +1,125 @@
<!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="lawEnforcement"/>
<input type="hidden" th:value="${time}" name="dateSearch"/>
<input type="hidden" th:value="${enterpriseNumber}" name="enterpriseNumber"/>
</li>
<li>
<p>执法人员:</p>
<input type="text" name="lawEnforcer"/>
</li>
<li class="select-time">
<p>检查时间:</p>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginEnforcementTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endEnforcementTime]"/>
</li>
<li>
<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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 prefix = ctx + "code/registration";
$(function() {
var options = {
url: prefix + "/list",
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: true
},
{
field : 'id',
title : '主键ID',
visible: false
},
{
field : 'lawEnforcementCode',
title : '登记编号'
},
{
field : 'lawEnforcement',
title : '执法部门'
},
{
field : 'enterpriseName',
title : '企业名称'
},
{
field : 'enterpriseNumber',
title : '企业税号'
},
{
field : 'enforcementTime',
title : '执法时间'
},
{
field : 'lawEnforcer',
title : '执法人员姓名',
formatter:function (value,row,index) {
return value + ( row.lawEnforcerTwo != "" && row.lawEnforcerTwo !=null? "," + row.lawEnforcerTwo : "");
}
},
{
field : 'lawEnforcerTel',
title : '执法人员联系方式',
formatter:function (value,row,index) {
return (value != null && value != "" ? value : "") +
( row.lawEnforcerTelTwo != "" && row.lawEnforcerTelTwo !=null? "," + row.lawEnforcerTelTwo : "");
}
},
{
field : 'lawEnforcementItemText',
title : '执法事项'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i>详情</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

90
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/analysis/analysis.html

@ -6,10 +6,10 @@
<link type="text/css" href="/css/stat.css" rel="stylesheet"/> <link type="text/css" href="/css/stat.css" rel="stylesheet"/>
<style type="text/css"> <style type="text/css">
.modelDiv{ .modelDiv{
width: 20%; width: 25%;
position: absolute; position: absolute;
top: 6%; top: -170%;
right: 2%; right: 0%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -19,7 +19,7 @@
<body> <body>
<div class="statwrap"> <div class="statwrap">
<h1 class="headtit">深圳市各类行政检查实施情况分析</h1> <h1 class="headtit">深圳市各类行政检查实施情况分析</h1>
<div class="seltime"> <div class="seltime" id="searchDiv">
<i class="icsty"></i> <i class="icsty"></i>
<span><select id="qorm" name="qorm" onchange="selectDate()"> <span><select id="qorm" name="qorm" onchange="selectDate()">
<option value="q">季度</option> <option value="q">季度</option>
@ -50,14 +50,24 @@
<option value="11">11</option> <option value="11">11</option>
<option value="12">12</option> <option value="12">12</option>
</select>月度</span> </select>月度</span>
<span><button onclick="exportData()">导出</button></span> <span style="width: 20%"><select style="width: 80%" id="lawField" name="lawField" th:with="type=${@dict.getType('law_field')}" onchange="queryData()">
</div> <option value="">请选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>领域</span>
<span style="width: 20%">
<select style="width: 80%" id="checkCategory" name="checkCategory" th:with="type=${@dict.getType('check_category')}" onchange="queryData()">
<option value="">请选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>类别</span>
<div class="modelDiv"> <div class="modelDiv">
<span style="display:flex; width: 30%">导出模板:</span> <span style="display:flex; width: 50%">分析模板:</span>
<select name="excelModel" id="excelModel" th:with="type=${@dict.getType('excelModel')}" class="form-control"> <select name="excelModel" id="excelModel" th:with="type=${@dict.getType('excelModel')}" class="form-control">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</div> </div>
<span><button onclick="exportData()">导出</button></span>
</div>
<div class="statit"> <div class="statit">
<span id="one1" class="actit" onclick="setTab('one',1,5)">案件数量</span> <span id="one1" class="actit" onclick="setTab('one',1,5)">案件数量</span>
<span id="one2" onclick="setTab('one',2,5)">执法人员</span> <span id="one2" onclick="setTab('one',2,5)">执法人员</span>
@ -169,7 +179,7 @@
} }
}); });
} }
function queryEnterpriseAnalysis(qorm, year, quarter, month, month) { /*function queryEnterpriseAnalysis(qorm, year, quarter, month, month) {
$.ajax({ $.ajax({
url: prefix + '/enterpriseAnalysis', //后台url url: prefix + '/enterpriseAnalysis', //后台url
data: { data: {
@ -193,7 +203,7 @@
error: function (er) { //失败,回调函数 error: function (er) { //失败,回调函数
} }
}); });
} }*/
function queryEnterpriseSortAnalysis(qorm, year, quarter, month, month) { function queryEnterpriseSortAnalysis(qorm, year, quarter, month, month) {
$.ajax({ $.ajax({
url: prefix + '/enterpriseSortAnalysis', //后台url url: prefix + '/enterpriseSortAnalysis', //后台url
@ -224,6 +234,33 @@
}); });
} }
function queryEnterpriseAnalysis(obj) {
console.log(obj)
$.ajax({
url: prefix + '/enterpriseSortAnalysis', //后台url
data: obj,
type: "GET",
dataType: 'json',
success: function (data) { //成功,回调函数
console.log("==========")
console.log(data)
console.log("==========")
var dates = [];
for (var i=0; i<data.data.dates.length; i++) {
dates.push(data.data.dates[i]);
}
var nums = [];
for (var i=0; i<data.data.nums.length; i++) {
nums.push(data.data.nums[i]);
}
line_across("lineEnterprise", dates, nums);
},
error: function (er) { //失败,回调函数
}
});
}
function selectDate() { function selectDate() {
var qormElement = document.getElementById("qorm"); var qormElement = document.getElementById("qorm");
var qormValue = qormElement.options[qormElement.selectedIndex].value; var qormValue = qormElement.options[qormElement.selectedIndex].value;
@ -236,8 +273,24 @@
queryCaseAnalysis(qormValue, yearValue, quarterValue, monthValue); queryCaseAnalysis(qormValue, yearValue, quarterValue, monthValue);
queryEnforcerAnalysis(qormValue, yearValue, quarterValue, monthValue); queryEnforcerAnalysis(qormValue, yearValue, quarterValue, monthValue);
queryItemAnalysis(qormValue, yearValue, quarterValue, monthValue); queryItemAnalysis(qormValue, yearValue, quarterValue, monthValue);
queryEnterpriseAnalysis(qormValue, yearValue, quarterValue, monthValue); // queryEnterpriseAnalysis(qormValue, yearValue, quarterValue, monthValue);
queryEnterpriseSortAnalysis(qormValue, yearValue, quarterValue, monthValue); queryEnterpriseSortAnalysis(qormValue, yearValue, quarterValue, monthValue);
// queryEnterpriseLawFieldAnalysis(qormValue, yearValue, quarterValue, monthValue);
}
function queryData() {
var div = document.getElementById('searchDiv');
var selects = div.getElementsByTagName('select');
var obj = {};
for (var i = 0; i < selects.length; i++) {
var select = selects[i];
var name = select.name;
var value = select.options[select.selectedIndex].value;
console.log('Name:', name, 'Value:', value);
obj[name] = value;
}
queryEnterpriseAnalysis(obj)
} }
function caseAnalysis(dataList) { function caseAnalysis(dataList) {
@ -336,13 +389,22 @@
} }
/** /**
* 修改企业所属行业 * 导出excel
* @param id 主键 * @param id 主键
*/ */
function exportData() { function exportData() {
console.log(1111) // $.modal.open("数据导出模板选择" , prefix + "/analysisModel", 800, 300);
$.modal.open("数据导出模板选择" , prefix + "/analysisModel", 800, 300); var div = document.getElementById('searchDiv');
windows var selects = div.getElementsByTagName('select');
var obj = {};
for (var i = 0; i < selects.length; i++) {
var select = selects[i];
var name = select.name;
var value = select.options[select.selectedIndex].value;
console.log('Name:', name, 'Value:', value);
obj[name] = value;
}
window.location.href = prefix + "/export?statisticalStr=" + encodeURIComponent(JSON.stringify(obj));
} }
</script> </script>
</body> </body>

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

@ -31,16 +31,6 @@
<span>-</span> <span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endEnforcementTime]"/> <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endEnforcementTime]"/>
</li> </li>
<!-- <li>-->
<!-- <p>执法结果 :</p>-->
<!-- <select name="status">-->
<!-- <option value="">所有</option>-->
<!-- <option value="0">合格</option>-->
<!-- <option value="1">不合格</option>-->
<!-- </select>-->
<!-- </li>-->
<li> <li>
<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-success btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-reset btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>

16
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/LawEnforcementWarningListController.java

@ -4,6 +4,7 @@ import java.util.List;
import com.zdxt.common.ZDResponse; import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController; import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.DateUtils;
import com.zdxt.common.util.TableDataInfo; import com.zdxt.common.util.TableDataInfo;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -121,4 +122,19 @@ public class LawEnforcementWarningListController extends BaseController
return lawEnforcementWarningListService.deleteLawEnforcementWarningListByIds(ids) > 0? return lawEnforcementWarningListService.deleteLawEnforcementWarningListByIds(ids) > 0?
ZDResponse.success("删除成功") : ZDResponse.error("删除失败"); ZDResponse.success("删除成功") : ZDResponse.error("删除失败");
} }
/**
* 查询执法登记列表
*/
@GetMapping( "/registrationDetail/{id}")
public String registrationDetail(@PathVariable("id") String id,ModelMap mmp)
{
LawEnforcementWarningList lawEnforcementWarningList =
lawEnforcementWarningListService.selectLawEnforcementWarningListById(id);
mmp.put("time", DateUtils.parseDateToStr("yyyy-MM",lawEnforcementWarningList.getWarningTime()));
mmp.put("enterpriseNumber", lawEnforcementWarningList.getEnterpriseNumber());
return prefix + "/registrationDetail";
}
} }

5
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalController.java

@ -1,5 +1,7 @@
package com.zdxt.code.controller; package com.zdxt.code.controller;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.zdxt.code.domain.StatisticalVo; import com.zdxt.code.domain.StatisticalVo;
import com.zdxt.code.domain.LawEnforcerExcel; import com.zdxt.code.domain.LawEnforcerExcel;
import com.zdxt.code.service.StatisticalService; import com.zdxt.code.service.StatisticalService;
@ -107,7 +109,8 @@ public class StatisticalController {
} }
@GetMapping("/export") @GetMapping("/export")
public void export(HttpServletResponse response,StatisticalVo statisticalVo) { public void export(HttpServletResponse response,String statisticalStr) {
StatisticalVo statisticalVo = JSONObject.parseObject(statisticalStr,StatisticalVo.class);;
if("1".equals(statisticalVo.getExcelModel())){ if("1".equals(statisticalVo.getExcelModel())){
statisticalService.exportLawEnforcerExcel(response,statisticalVo); statisticalService.exportLawEnforcerExcel(response,statisticalVo);

28
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java

@ -148,6 +148,18 @@ public class EnforcementRegistration extends BaseDomain
/** 超时几天(临时用的, 判断检查时间是否超过5天) */ /** 超时几天(临时用的, 判断检查时间是否超过5天) */
private long outTimeDayNum; private long outTimeDayNum;
/**
* 执法领域
*/
private String lawField;
/**
* 执法类别
*/
private String checkCategory;
public String getCheckCss() { public String getCheckCss() {
return checkCss; return checkCss;
} }
@ -509,4 +521,20 @@ public class EnforcementRegistration extends BaseDomain
public void setLawEnforcementBasisText(String lawEnforcementBasisText) { public void setLawEnforcementBasisText(String lawEnforcementBasisText) {
this.lawEnforcementBasisText = lawEnforcementBasisText; this.lawEnforcementBasisText = lawEnforcementBasisText;
} }
public String getLawField() {
return lawField;
}
public void setLawField(String lawField) {
this.lawField = lawField;
}
public String getCheckCategory() {
return checkCategory;
}
public void setCheckCategory(String checkCategory) {
this.checkCategory = checkCategory;
}
} }

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseRankExcel.java

@ -14,7 +14,7 @@ public class EnterpriseRankExcel {
@ExcelExport("企业名称") @ExcelExport("企业名称")
private String enterpriseName; private String enterpriseName;
@ExcelExport("被执法数量") @ExcelExport("被执法数量")
private String total; private Integer total;
public String getEnterpriseName() { public String getEnterpriseName() {
return enterpriseName; return enterpriseName;
@ -24,11 +24,11 @@ public class EnterpriseRankExcel {
this.enterpriseName = enterpriseName; this.enterpriseName = enterpriseName;
} }
public String getTotal() { public Integer getTotal() {
return total; return total;
} }
public void setTotal(String total) { public void setTotal(Integer total) {
this.total = total; this.total = total;
} }
} }

39
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticalVo.java

@ -57,14 +57,21 @@ public class StatisticalVo extends BaseDomain {
private String date; private String date;
/** /**
* 导出模板类 * 导出模板类型
*/ */
private String clazz; private String excelModel;
/** /**
* 导出模板类型 * 执法领域
*/ */
private String excelModel; private String lawField;
/**
* 执法类别
*/
private String checkCategory;
private String enterpriseName;
public String getName() { public String getName() {
return name; return name;
@ -193,4 +200,28 @@ public class StatisticalVo extends BaseDomain {
public void setExcelModel(String excelModel) { public void setExcelModel(String excelModel) {
this.excelModel = excelModel; this.excelModel = excelModel;
} }
public String getLawField() {
return lawField;
}
public void setLawField(String lawField) {
this.lawField = lawField;
}
public String getCheckCategory() {
return checkCategory;
}
public void setCheckCategory(String checkCategory) {
this.checkCategory = checkCategory;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
} }

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalMapper.java

@ -48,5 +48,18 @@ public interface StatisticalMapper {
List<StatisticalVo> itemAnalysis(StatisticalVo statisticalVo); List<StatisticalVo> itemAnalysis(StatisticalVo statisticalVo);
List<StatisticalVo> enterpriseAnalysis(StatisticalVo statisticalVo); List<StatisticalVo> enterpriseAnalysis(StatisticalVo statisticalVo);
List<StatisticalVo> enterpriseSortAnalysis(StatisticalVo statisticalVo); List<StatisticalVo> enterpriseSortAnalysis(StatisticalVo statisticalVo);
/**
* 统计企业排名数据
* @param statisticalVo
* @return
*/
List<StatisticalVo> enterpriseCompanyAnalysis(StatisticalVo statisticalVo);
/**
*
* @param statisticalVo
* @return
*/
List<StatisticalVo> enterpriseTableAnalysis(StatisticalVo statisticalVo); List<StatisticalVo> enterpriseTableAnalysis(StatisticalVo statisticalVo);
} }

18
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalServiceImpl.java

@ -1,5 +1,7 @@
package com.zdxt.code.service.impl; package com.zdxt.code.service.impl;
import cn.hutool.core.util.StrUtil;
import com.zdxt.code.domain.EnterpriseRankExcel;
import com.zdxt.code.domain.LawEnforcerExcel; import com.zdxt.code.domain.LawEnforcerExcel;
import com.zdxt.code.domain.LinkageDict; import com.zdxt.code.domain.LinkageDict;
import com.zdxt.code.domain.StatisticalVo; import com.zdxt.code.domain.StatisticalVo;
@ -134,15 +136,17 @@ public class StatisticalServiceImpl implements StatisticalService
@Override @Override
public void exportEnterpriseRankExcel(HttpServletResponse response,StatisticalVo statisticalVo) { public void exportEnterpriseRankExcel(HttpServletResponse response,StatisticalVo statisticalVo) {
this.putParams(statisticalVo); this.putParams(statisticalVo);
List<StatisticalVo> statisticalVos = statisticalMapper.enforcerAnalysis(statisticalVo); List<StatisticalVo> statisticalVos = statisticalMapper.enterpriseCompanyAnalysis(statisticalVo);
List<LawEnforcerExcel> lawEnforcerExcels = new ArrayList<>(); List<EnterpriseRankExcel> enterpriseRankExcels = new ArrayList<>();
statisticalVos.forEach(res ->{ statisticalVos.forEach(res ->{
LawEnforcerExcel lawEnforcerExcel = new LawEnforcerExcel(); EnterpriseRankExcel enterpriseRankExcel = new EnterpriseRankExcel();
lawEnforcerExcel.setName(res.getLawEnforcer()); if(StrUtil.isNotEmpty(res.getEnterpriseName())){
lawEnforcerExcel.setTotal(res.getTotal()); enterpriseRankExcel.setEnterpriseName(res.getEnterpriseName());
lawEnforcerExcels.add(lawEnforcerExcel); enterpriseRankExcel.setTotal(res.getTotal());
enterpriseRankExcels.add(enterpriseRankExcel);
}
}); });
ExcelUtils.export(response, "企业被执法排序表",lawEnforcerExcels, LawEnforcerExcel.class); ExcelUtils.export(response, "企业排序表",enterpriseRankExcels, EnterpriseRankExcel.class);
} }

15
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

@ -39,6 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="enforce" column="enforce" /> <result property="enforce" column="enforce" />
<result property="checkCss" column="check_css" /> <result property="checkCss" column="check_css" />
<result property="enforceReason" column="enforce_reason" /> <result property="enforceReason" column="enforce_reason" />
<result property="lawField" column="law_field" />
<result property="checkCategory" column="check_category" />
</resultMap> </resultMap>
<resultMap type="com.zdxt.code.domain.EnforceRegCount" id="EnforceRegCountResult"> <resultMap type="com.zdxt.code.domain.EnforceRegCount" id="EnforceRegCountResult">
@ -48,7 +50,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectEnforcementRegistrationVo"> <sql id="selectEnforcementRegistrationVo">
select id, law_enforcement, law_enforcement_id, enforce, check_css, enforce_reason, enterprise_id, enterprise_name, enterprise_number, enforcement_time, create_time, create_by, law_enforcer, law_enforcer_id, law_enforcer_tel, law_enforcer_two, law_enforcer_id_two, law_enforcer_tel_two, subsidiaryer, subsidiaryer_id, subsidiaryer_tel, law_enforcement_item, law_enforcement_item_text, law_enforcement_basis, remark, reslut, user_id, dept_id, is_delete, status, law_enforcement_code,is_complaint,is_submit, unite_check from enforcement_registration select id, law_enforcement, law_enforcement_id, enforce, enterprise_id, enterprise_name,
enterprise_number, enforcement_time, create_time, create_by, law_enforcer, law_enforcer_id,
law_enforcer_tel, law_enforcer_two, law_enforcer_id_two, law_enforcer_tel_two, subsidiaryer,
subsidiaryer_id, subsidiaryer_tel, law_enforcement_item, law_enforcement_item_text,
law_enforcement_basis, remark, reslut, user_id, dept_id, is_delete, status, law_enforcement_code,
is_complaint,is_submit, unite_check,check_css, enforce_reason, law_field,check_category from enforcement_registration
</sql> </sql>
<select id="selectEnforcementRegistrationList" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult"> <select id="selectEnforcementRegistrationList" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult">
@ -163,6 +170,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lawEnforcementCode != null and lawEnforcementCode != ''">law_enforcement_code,</if> <if test="lawEnforcementCode != null and lawEnforcementCode != ''">law_enforcement_code,</if>
<if test="isSubmit != null "> is_submit,</if> <if test="isSubmit != null "> is_submit,</if>
<if test="uniteCheck != null and uniteCheck != ''"> unite_check,</if> <if test="uniteCheck != null and uniteCheck != ''"> unite_check,</if>
<if test="lawField != null and lawField != ''"> law_field,</if>
<if test="checkCategory != null and checkCategory != ''"> check_category,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if> <if test="id != null and id != ''">#{id},</if>
@ -199,6 +208,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lawEnforcementCode != null and lawEnforcementCode != ''">#{lawEnforcementCode},</if> <if test="lawEnforcementCode != null and lawEnforcementCode != ''">#{lawEnforcementCode},</if>
<if test="isSubmit != null "> #{isSubmit},</if> <if test="isSubmit != null "> #{isSubmit},</if>
<if test="uniteCheck != null and uniteCheck != ''"> #{uniteCheck},</if> <if test="uniteCheck != null and uniteCheck != ''"> #{uniteCheck},</if>
<if test="lawField != null and lawField != ''"> #{lawField},</if>
<if test="checkCategory != null and checkCategory != ''"> #{checkCategory},</if>
</trim> </trim>
</insert> </insert>
@ -237,6 +248,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null ">status = #{status},</if> <if test="status != null ">status = #{status},</if>
<if test="lawEnforcementCode != null and lawEnforcementCode != ''">law_enforcement_code = #{lawEnforcementCode},</if> <if test="lawEnforcementCode != null and lawEnforcementCode != ''">law_enforcement_code = #{lawEnforcementCode},</if>
<if test="isSubmit != null ">is_submit = #{isSubmit},</if> <if test="isSubmit != null ">is_submit = #{isSubmit},</if>
<if test="lawField != null and lawField != ''"> law_field = #{lawField},</if>
<if test="checkCategory != null and checkCategory != ''"> check_category = #{checkCategory},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml

@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.reason != null and params.reason == 3"> <if test="params.reason != null and params.reason == 3">
and enterprise_number in (select enterprise_number from enterprise_law_enforcement WHERE curdate() &lt;= DATE_ADD(check_time, INTERVAL 5 DAY)) and enterprise_number in (select enterprise_number from enterprise_law_enforcement WHERE curdate() &lt;= DATE_ADD(check_time, INTERVAL 5 DAY))
</if> </if>
<if test="enterpriseNumbers != null and enterpriseNumbers.size > 0 "> <if test="enterpriseNumbers != null and enterpriseNumbers.size() > 0 ">
and enterprise_number in and enterprise_number in
<foreach collection="enterpriseNumbers" item="enterpriseNumber" separator="," open="(" close=")"> <foreach collection="enterpriseNumbers" item="enterpriseNumber" separator="," open="(" close=")">
#{enterpriseNumber} #{enterpriseNumber}

32
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalMapper.xml

@ -18,6 +18,9 @@
<result property="name" column="name" /> <result property="name" column="name" />
<result property="value" column="value" /> <result property="value" column="value" />
<result property="date" column="date" /> <result property="date" column="date" />
<result property="enterpriseName" column="enterprise_name" />
<result property="checkCategory" column="check_category" />
<result property="lawField" column="law_field" />
</resultMap> </resultMap>
@ -203,11 +206,40 @@
<if test="params.yearMonth != null and params.yearMonth != ''"> <if test="params.yearMonth != null and params.yearMonth != ''">
AND DATE_FORMAT(enforcement_time, '%Y-%m') = #{params.yearMonth} AND DATE_FORMAT(enforcement_time, '%Y-%m') = #{params.yearMonth}
</if> </if>
<if test="lawField != null and lawField != ''">
AND law_field = #{lawField}
</if>
<if test="checkCategory != null and checkCategory != ''">
AND check_category = #{checkCategory}
</if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</where> </where>
GROUP BY DATE_FORMAT(enforcement_time, '%Y-%m-%d') ORDER BY enforcement_time ASC GROUP BY DATE_FORMAT(enforcement_time, '%Y-%m-%d') ORDER BY enforcement_time ASC
</select> </select>
<select id="enterpriseCompanyAnalysis" parameterType="StatisticalVo" resultMap="StatisticalVoResult">
select enterprise_name ,count(1) as total from enforcement_registration
<where>
<if test="params.startDate != null and params.startDate != ''">
AND DATE_FORMAT(enforcement_time, '%Y-%m') &gt;= #{params.startDate}
</if>
<if test="params.endDate != null and params.endDate != ''">
AND DATE_FORMAT(enforcement_time, '%Y-%m') &lt;= #{params.endDate}
</if>
<if test="params.yearMonth != null and params.yearMonth != ''">
AND DATE_FORMAT(enforcement_time, '%Y-%m') = #{params.yearMonth}
</if>
<if test="lawField != null and lawField != ''">
AND law_field = #{lawField}
</if>
<if test="checkCategory != null and checkCategory != ''">
AND check_category = #{checkCategory}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
GROUP BY enterprise_number ORDER BY total desc
</select>
<select id="enterpriseTableAnalysis" parameterType="StatisticalVo" resultMap="StatisticalVoResult"> <select id="enterpriseTableAnalysis" parameterType="StatisticalVo" resultMap="StatisticalVoResult">
select enterprise_name as name,count(1) as total, DATE_FORMAT(enforcement_time, '%Y-%m-%d') as `date` from enforcement_registration select enterprise_name as name,count(1) as total, DATE_FORMAT(enforcement_time, '%Y-%m-%d') as `date` from enforcement_registration

Loading…
Cancel
Save