Compare commits

...

9 Commits
master ... v2

  1. 2
      lib/EmergencyService/pom.xml
  2. 27
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.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/FilterConfig.java
  5. 139
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/XssRequestWrappers.java
  6. 11
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/shiro/web/filter/captcha/CaptchaValidateFilter.java
  7. 4
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/web/page/TableDataInfo.java
  8. 4
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/controller/DeptController.java
  9. 8
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/service/DeptServiceImpl.java
  10. 4
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/user/controller/LoginController.java
  11. 3
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/user/controller/UserController.java
  12. 2
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml
  13. 2
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml
  14. 5
      lib/EmergencyService/zdxtEmergencyBootStart/pom.xml
  15. 4
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/css/stat.css
  16. 15
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/js/charts-analy.js
  17. 30
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/login.html
  18. 245
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/analysis/analysis.html
  19. 3
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/edit.html
  20. 2
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/information.html
  21. 40
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/add.html
  22. 45
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/edit.html
  23. 24
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/ruleItemList.html
  24. 56
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statistical.html
  25. 8
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/dept/dept.html
  26. 2
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/user/edit.html
  27. 24
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/user/resetPwd.html
  28. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java
  29. 64
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalController.java
  30. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/RuleItemList.java
  31. 46
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java
  32. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml
  33. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/RuleItemListMapper.xml
  34. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/RuleListMapper.xml
  35. 66
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalMapper.xml
  36. 2
      lib/ZdxtComponent/pom.xml

2
lib/EmergencyService/pom.xml

@ -13,7 +13,7 @@
<module>zdxtEmergencyBootStart</module>
<module>zdxtEmergencyAppService</module>
<module>zdxtEmergencyLogService</module>
<module>zdxtEmergencyExcelService</module>
<!-- <module>zdxtEmergencyExcelService</module>-->
<module>zdxtEmergencyMessageService</module>
<module>zdxtLawEnforcementCodeService</module>
<module>zdxtEmergencyDictService</module>

27
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseInformationController.java

@ -109,7 +109,25 @@ public class AppEnterpriseInformationController extends BaseController
return enterpriseInformationService.updateEnterpriseInformation(enterpriseInformation) > 0 ?
ZDResponse.success("修改成功"): ZDResponse.error("修改失败");
}
@PostMapping("/editNotQX")
@ResponseBody
public ZDResponse editNotQX(@RequestBody EnterpriseInformation enterpriseInformation)
{
int i=enterpriseInformationService.updateEnterpriseInformation(enterpriseInformation);
return i > 0 ?
ZDResponse.success("修改成功"): ZDResponse.error("修改失败");
}
@PostMapping("/unsubscribeNotQX")
@ResponseBody
public ZDResponse unsubscribeNotQX(@RequestBody EnterpriseInformation enterpriseInformation)
{
if(enterpriseInformation.getEnterpriseNumber()!=null&&!"".equals(enterpriseInformation.getEnterpriseNumber())){
enterpriseInformation.setId(enterpriseInformationService.selectEnterpriseInformationByNum(enterpriseInformation.getEnterpriseNumber()).getId());enterpriseInformationService.selectEnterpriseInformationByNum(enterpriseInformation.getEnterpriseNumber());
}
int i=enterpriseInformationService.updateEnterpriseInformation(enterpriseInformation);
return i > 0 ?
ZDResponse.success("注销成功"): ZDResponse.error("注销失败");
}
/**
* 修改保存企业信息登记
@ -272,7 +290,10 @@ public class AppEnterpriseInformationController extends BaseController
@ResponseBody
public ZDResponse addQrCode(@PathVariable("num") String num)
{
return enterpriseInformationService.insertQrCode(num) > 0 ?
ZDResponse.success("失效成功"): ZDResponse.error("失效失败");
int i = enterpriseInformationService.insertQrCode(num);
if(i == 3){
return ZDResponse.success("二维码生成时效不足24小时");
}
return i > 0 ? ZDResponse.success("失效成功"): ZDResponse.error("失效失败");
}
}

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

@ -61,7 +61,7 @@ public class CorsFilter implements Filter {
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",
"http://localhost:3301","http://192.168.110.35:3301","http://localhost:86","http://192.168.110.41:3301","http://192.168.31.71:3301"};
"http://localhost:3301","http://192.168.110.35:3301","http://192.168.110.41:3301","http://10.132.108.3:81"};
String authost = "";
HttpServletRequest httprequest = (HttpServletRequest) request;
String origin = httprequest.getHeader("Origin");

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

@ -1,5 +1,6 @@
package com.zdxt.auth.framework.config;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.DispatcherType;
@ -40,17 +41,27 @@ public class FilterConfig
@Bean
public FilterRegistrationBean xssFilterRegistration()
{
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setDispatcherTypes(DispatcherType.REQUEST);
registration.setFilter(new XssAndSqlFilter());
registration.addUrlPatterns(StringUtils.split(urlPatterns, ","));
registration.setName("xssFilter");
registration.setOrder(Integer.MAX_VALUE);
Map<String, String> initParameters = Maps.newHashMap();
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
// 设置过滤器的分发类型为请求类型
registrationBean.setDispatcherTypes(DispatcherType.REQUEST);
// 创建XssFilter的实例
registrationBean.setFilter(new XssFilter());
// 添加过滤器需要拦截的URL模式,这些模式从配置文件中的"urlPatterns"属性读取
registrationBean.addUrlPatterns(StringUtils.split(urlPatterns, ","));
// 设置过滤器的名称
registrationBean.setName("XssFilter");
// 设置过滤器的执行顺序,数值越小,优先级越高
registrationBean.setOrder(9999);
// 创建一个Map,用于存储过滤器的初始化参数
Map<String, String> initParameters = new HashMap<>();
// 将配置文件中的"excludes"属性设置到过滤器的初始化参数中
initParameters.put("excludes", excludes);
// 将配置文件中的"enabled"属性设置到过滤器的初始化参数中
initParameters.put("enabled", enabled);
registration.setInitParameters(initParameters);
return registration;
// 将初始化参数设置到FilterRegistrationBean中
registrationBean.setInitParameters(initParameters);
// 返回FilterRegistrationBean,包含了XssFilter的配置信息
return registrationBean;
}
@Bean
public FilterRegistrationBean hostfilter() {
@ -61,7 +72,24 @@ public class FilterConfig
registration.setOrder(1); // 值越小,Filter越靠前。
return registration;
}
// @Bean
public String getEnabled() {
return enabled;
}
public void setEnabled(String enabled) {
this.enabled = enabled;
}
public String getExcludes() {
return excludes;
}
public void setExcludes(String excludes) {
this.excludes = excludes;
}
// @Bean
// public FilterRegistrationBean corsNewFilter() {
// UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
// CorsConfiguration config = new CorsConfiguration();

139
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/config/XssRequestWrappers.java

@ -0,0 +1,139 @@
package com.zdxt.auth.framework.config;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
/**
* @ClassName XssRequestWrappers
* @Description TODO
* @Author chenrui
* @Date 202/11/05
* @Version 1.0
*/
public class XssRequestWrappers extends HttpServletRequestWrapper {
private CommonsMultipartResolver multiparResolver = new CommonsMultipartResolver();
public XssRequestWrappers(HttpServletRequest request) {
super(request);
String type = request.getHeader("Content-Type");
if (!StringUtils.isEmpty(type) && type.contains("multipart/form-data")) {
MultipartHttpServletRequest multipartHttpServletRequest = multiparResolver.resolveMultipart(request);
Map<String, String[]> stringMap = multipartHttpServletRequest.getParameterMap();
if (!stringMap.isEmpty()) {
for (String key : stringMap.keySet()) {
String value = multipartHttpServletRequest.getParameter(key);
striptXSS(key);
striptXSS(value);
}
}
super.setRequest(multipartHttpServletRequest);
}
}
@Override
public String[] getParameterValues(String parameter) {
String[] values = super.getParameterValues(parameter);
if (values == null) {
return null;
}
int count = values.length;
String[] encodedValues = new String[count];
for (int i = 0; i < count; i++) {
encodedValues[i] = striptXSS(values[i]);
}
return encodedValues;
}
@Override
public String getParameter(String parameter) {
String value = super.getParameter(parameter);
return striptXSS(value);
}
@Override
public String getHeader(String name) {
String value = super.getHeader(name);
return striptXSS(value);
}
@Override
public Map<String, String[]> getParameterMap() {
Map<String, String[]> map1 = super.getParameterMap();
Map<String, String[]> escapseMap = new HashMap<String, String[]>();
Set<String> keys = map1.keySet();
for (String key : keys) {
String[] valArr = map1.get(key);
if (valArr != null && valArr.length > 0) {
String[] escapseValArr = new String[valArr.length];
for (int i = 0; i < valArr.length; i++) {
String escapseVal = striptXSS(valArr[i]);
escapseValArr[i] = escapseVal;
}
escapseMap.put(key, escapseValArr);
}
}
return escapseMap;
}
//处理非法内容,如果有新的在此处增加即可
public static String striptXSS(String value) {
if (value != null) {
// 替换空字符串,以便清除潜在的恶意脚本
value = value.replaceAll("", "");
// 移除<script>标签及其内容
Pattern scriptPattern = Pattern.compile("<script>(.*?)</script>", Pattern.CASE_INSENSITIVE);
value = scriptPattern.matcher(value).replaceAll("");
// 移除带有src属性的标签,支持单引号和双引号包围的属性值
scriptPattern = Pattern.compile("src[\r\n]*=[\r\n]*\\'(.*?)\\'", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);
value = scriptPattern.matcher(value).replaceAll("");
scriptPattern = Pattern.compile("src[\r\n]*=[\r\n]*\\\"(.*?)\\\"", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);
value = scriptPattern.matcher(value).replaceAll("");
// 移除</script>标签
scriptPattern = Pattern.compile("</script>", Pattern.CASE_INSENSITIVE);
value = scriptPattern.matcher(value).replaceAll("");
// 移除以<script...>开头的标签
scriptPattern = Pattern.compile("<script(.*?)>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);
value = scriptPattern.matcher(value).replaceAll("");
// 移除eval()函数调用
scriptPattern = Pattern.compile("eval\\((.*?)\\)", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);
value = scriptPattern.matcher(value).replaceAll("");
// 移除expression()函数调用
scriptPattern = Pattern.compile("e­xpression\\((.*?)\\)", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);
value = scriptPattern.matcher(value).replaceAll("");
// 移除以"javascript:"开头的字符串
scriptPattern = Pattern.compile("javascript:", Pattern.CASE_INSENSITIVE);
value = scriptPattern.matcher(value).replaceAll("");
// 移除以"vbscript:"开头的字符串
scriptPattern = Pattern.compile("vbscript:", Pattern.CASE_INSENSITIVE);
value = scriptPattern.matcher(value).replaceAll("");
// 移除以"onload..."开头的字符串
scriptPattern = Pattern.compile("onload(.*?)=", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);
value = scriptPattern.matcher(value).replaceAll("");
// 移除包含任何<和>字符的字符串
scriptPattern = Pattern.compile(".*<.*", Pattern.CASE_INSENSITIVE);
value = scriptPattern.matcher(value).replaceAll("");
}
// 返回处理后的字符串
return value;
}
}

11
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/shiro/web/filter/captcha/CaptchaValidateFilter.java

@ -3,6 +3,8 @@ package com.zdxt.auth.framework.shiro.web.filter.captcha;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import com.zdxt.auth.project.system.user.util.AesHelper;
import org.apache.shiro.web.filter.AccessControlFilter;
import com.google.code.kaptcha.Constants;
import com.zdxt.auth.common.constant.ShiroConstants;
@ -54,18 +56,15 @@ public class CaptchaValidateFilter extends AccessControlFilter
{
return true;
}
return validateResponse(httpServletRequest, httpServletRequest.getParameter(ShiroConstants.CURRENT_VALIDATECODE));
String requestParameter = AesHelper.desEncrypt(httpServletRequest.getParameter(ShiroConstants.CURRENT_VALIDATECODE));
return validateResponse(httpServletRequest, requestParameter);
}
public boolean validateResponse(HttpServletRequest request, String validateCode)
{
Object obj = ShiroUtils.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY);
String code = String.valueOf(obj != null ? obj : "");
if (StringUtils.isEmpty(validateCode) || !validateCode.equalsIgnoreCase(code))
{
return false;
}
return true;
return !StringUtils.isEmpty(validateCode) && validateCode.equalsIgnoreCase(code);
}
@Override

4
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/framework/web/page/TableDataInfo.java

@ -5,7 +5,7 @@ import java.util.List;
/**
* 表格分页数据对象
*
*
* @author ruoyi
*/
public class TableDataInfo implements Serializable
@ -33,7 +33,7 @@ public class TableDataInfo implements Serializable
/**
* 分页
*
*
* @param list 列表数据
* @param total 总记录数
*/

4
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/controller/DeptController.java

@ -77,7 +77,7 @@ public class DeptController extends BaseController {
/**
* 新增部门
*/
// @GetMapping("/add/{parentId}")
@GetMapping("/add/{parentId}")
public String add(@PathVariable("parentId") String parentId, ModelMap mmap)
{
mmap.put("dept", deptService.selectDeptById(parentId));
@ -165,7 +165,7 @@ public class DeptController extends BaseController {
*/
@Log(title = "部门管理", businessType = BusinessType.DELETE)
@RequiresPermissions("system:dept:remove")
// @GetMapping("/remove/{deptId}")
@GetMapping("/remove/{deptId}")
@ResponseBody
public AjaxResult remove(@PathVariable("deptId") String deptId)
{

8
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/dept/service/DeptServiceImpl.java

@ -1,5 +1,6 @@
package com.zdxt.auth.project.system.dept.service;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.zdxt.auth.common.constant.UserConstants;
@ -30,6 +31,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.Date;
@ -229,7 +231,7 @@ public class DeptServiceImpl implements IDeptService
public boolean checkDeptExistUser(String deptId)
{
int result = deptMapper.checkDeptExistUser(deptId);
return result > 0 ? true : false;
return result > 0;
}
/**
@ -261,6 +263,8 @@ public class DeptServiceImpl implements IDeptService
}
dept.setCreateBy(ShiroUtils.getLoginName());
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
//默认部门ID
dept.setDeptId(IdUtil.simpleUUID());
return deptMapper.insertDept(dept);
}
@ -552,7 +556,7 @@ public class DeptServiceImpl implements IDeptService
String encodeStr = "";
try {
messageDigest = MessageDigest.getInstance("SHA-256");
messageDigest.update(str.getBytes("UTF-8"));
messageDigest.update(str.getBytes(StandardCharsets.UTF_8));
encodeStr = byte2Hex(messageDigest.digest());
} catch (Exception e) {
throw e;

4
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/user/controller/LoginController.java

@ -92,8 +92,10 @@ public class LoginController extends BaseController
@ResponseBody
public AjaxResult ajaxLogin(String secretName, String secretKey, Boolean rememberMe, String type, String clientid) {
// username = username.toUpperCase();
//解密
//解密 密码
secretKey = AesHelper.desEncrypt(secretKey);
//解密 用户名
secretName = AesHelper.desEncrypt(secretName);
// UsernamePasswordToken token = new UsernamePasswordToken(username, password, false);
UserToken token = new UserToken(secretName, secretKey, LoginType.PASSWORD);
//禁止使用rememberMe

3
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/user/controller/UserController.java

@ -15,6 +15,7 @@ import com.zdxt.auth.project.system.post.service.IPostService;
import com.zdxt.auth.project.system.role.service.IRoleService;
import com.zdxt.auth.project.system.user.mapper.UserMapper;
import com.zdxt.auth.project.system.user.service.IUserService;
import com.zdxt.auth.project.system.user.util.AesHelper;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.util.StringUtils;
import com.zdxt.domain.auth.Post;
@ -251,6 +252,8 @@ public class UserController extends BaseController
@ResponseBody
public AjaxResult resetPwdSave(User user)
{
String pass = AesHelper.desEncrypt(user.getPassword());
user.setPassword(pass);
userService.checkUserAllowed(user);
if (userService.resetUserPwd(user) > 0)
{

2
lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml

@ -223,7 +223,7 @@
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
</select>
<insert id="insertDept" parameterType="Dept" keyProperty="deptId" useGeneratedKeys="true">
<insert id="insertDept" parameterType="Dept" keyProperty="deptId">
insert into sys_dept(
<if test="deptId != null and deptId != ''">dept_id,</if>
<if test="parentId != null and parentId != ''">parent_id,</if>

2
lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml

@ -105,7 +105,7 @@
<select id="selectUserList" parameterType="User" resultMap="UserResult">
select u.user_id, u.dept_id, u.login_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.type, d.dept_name, u.law_certificate_num,
d.leader,u.tenant_code,t.tenant_code, t.tenant_name, t.contact_man, t.contact_number, t.address
d.leader,u.tenant_code, t.tenant_name, t.contact_man, t.contact_number, t.address
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_tenant t on t.tenant_code = u.tenant_code

5
lib/EmergencyService/zdxtEmergencyBootStart/pom.xml

@ -52,11 +52,6 @@
<artifactId>zdxtTableManagementComponent</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>EmergencyService</groupId>
<artifactId>zdxtEmergencyExcelService</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>ZdxtComponent</groupId>

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

@ -39,7 +39,7 @@ body {
top: 110px;
right: 1%;
align-items: center;
width: 67%;
width: 70%;
}
.seltime > i {
@ -96,7 +96,7 @@ body {
display: none;
position: relative;
margin: 2.0rem 0 0;
height: calc(100% - 9rem);
height: calc(100% - 15rem);
clear: both;
}

15
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/static/js/charts-analy.js

@ -65,7 +65,7 @@ var echartUtil = {
};
var _this = this;
var myChartLine = echarts.init(document.getElementById(targetId));
var myColor = ['#3C83FF']
var myColor = ['#3C83FF'];
var option = {
grid: { //直角坐标系内绘图网格
top: '10%',
@ -112,7 +112,7 @@ var echartUtil = {
var traceValue;
for (var i = 0; i < dataAll.dataX.length; i++) {
if (data === dataAll.dataX[i]) {
traceValue = dataAll.dataY[i]
traceValue = dataAll.dataY[i];
break
}
}
@ -120,7 +120,7 @@ var echartUtil = {
'{a|' + data + '}',
'{b|' + traceValue + '}',
'{c|件}'
]
];
return arr.join('')
},
textStyle: {
@ -194,14 +194,14 @@ var echartUtil = {
var traceValue;
for (var i = 0; i < dataAll.dataX.length; i++) {
if (data.name === dataAll.dataX[i]) {
traceValue = dataAll.dataPercent[i]
traceValue = dataAll.dataPercent[i];
break
}
}
var arr = [
'{a|' + traceValue + '}',
'{b|%}'
]
];
return arr.join('');
},
textStyle: {
@ -239,8 +239,11 @@ var echartUtil = {
]
};
myChartLine.setOption(option, true);
window.addEventListener("resize", function () {
myChartLine.resize();
});
}
}
};
/*******1.检查类别***********/
// var dataX = ['生态环境检查', '卫生健康检查', '商务领域检查', '财务领域检查', '水务领域检查']

30
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/login.html

@ -87,15 +87,15 @@
<input class="pwsty" type="password" placeholder="请输入密码" id="login-password" name="password" />
<!--<a href="#" class="fortxt">忘记密码?</a> -->
<div class="vcbox" th:if="${captchaEnabled==true}">
<div class="inptit">验证码</div>
<input class="vcsty" type="text" placeholder="请输入验证码" name="validateCode" maxlength="6" autocomplete="off" />
<div class="vcode">
<a href="javascript:void(0);" title="点击更换验证码">
<img th:src="@{captcha/captchaImage(type=${captchaType})}" class="imgcode" width="85%"/>
</a>
</div>
</div>
<!--<div class="vcbox" th:if="${captchaEnabled==true}">-->
<!-- <div class="inptit">验证码</div>-->
<!-- <input class="vcsty" type="text" placeholder="请输入验证码" name="validateCode" maxlength="6" autocomplete="off" />-->
<!-- <div class="vcode">-->
<!-- <a href="javascript:void(0);" title="点击更换验证码">-->
<!-- <img th:src="@{captcha/captchaImage(type=${captchaType})}" class="imgcode" width="85%"/>-->
<!-- </a>-->
<!-- </div>-->
<!--</div>-->
<div class="logindiv">
<div>
<input class="checksty" name="" type="checkbox" value="" checked="checked" /><span class="remtxt">记住密码</span>
@ -140,14 +140,14 @@
/*登录*/
$("#login").click(function(){
login();
})
});
$(document).keypress(function (e) {
if (e.keyCode == 13){
login();
}
})
})
});
/**
* 登录
@ -162,9 +162,9 @@
type: "post",
url: ctx + "login",
data: {
"secretName": userName,
"secretName": Encrypt(userName),
"secretKey": Encrypt(passWord),
"validateCode": validateCode
"validateCode": Encrypt(validateCode)
//"rememberMe": rememberMe
},
success: function(r) {
@ -173,7 +173,7 @@
$.ajaxSettings.beforeSend =function(xhr,request){
xhr.setRequestHeader("token",r.data);
}
};
location.href = ctx + 'index';
} else {
@ -203,7 +203,7 @@
}
</script>
<script>
if(window.top!==window.self){window.top.location=window.location};
if(window.top!==window.self){window.top.location=window.location}
</script>
</body>
</html>

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

@ -21,22 +21,27 @@
<h1 class="headtit">深圳市各类行政检查实施情况分析</h1>
<div class="seltime" id="searchDiv">
<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="m">月度</option>
</select>年度</span>
<span><select id="year" name="year" onchange="selectDate()">
</select></span>
<span>年度:<select id="year" name="year" onchange="selectDate()">
<option value="2027">2027</option>
<option value="2026">2026</option>
<option value="2025">2025</option>
<option value="2024">2024</option>
<option value="2023">2023</option>
<option value="2022">2022</option>
</select>年度</span>
<span><select id="quarter" name="quarter" onchange="selectDate()">
</select></span>
<span id="quarterName">季度:</span>
<select id="quarter" name="quarter" onchange="selectDate()">
<option value="q1">1季度</option>
<option value="q2">2季度</option>
<option value="q3">3季度</option>
<option value="q4">4季度</option>
</select>季度</span>
<span><select id="month" name="month" onchange="selectDate()">
</select>
<span id="monthName">月度:</span>
<select id="month" name="month" onchange="selectDate()">
<option value="01">1</option>
<option value="02">2</option>
<option value="03">3</option>
@ -49,16 +54,16 @@
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>月度</span>
<span style="width: 20%"><select style="width: 80%" id="lawField" name="lawField" th:with="type=${@dict.getType('law_field')}" onchange="queryData()">
</select>
<span style="width: 20%">领域:<select style="width: 80%" id="lawField" name="lawField" th:with="type=${@dict.getType('law_field')}" onchange="selectDate()">
<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()">
</select></span>
<span style="width: 20%">类别:
<select style="width: 80%" id="checkCategory" name="checkCategory" th:with="type=${@dict.getType('check_category')}" onchange="selectDate()">
<option value="">请选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>类别</span>
</select></span>
<div class="modelDiv">
<span style="display:flex; width: 50%">分析模板:</span>
<select name="excelModel" id="excelModel" th:with="type=${@dict.getType('excelModel')}" class="form-control">
@ -99,9 +104,29 @@
<script th:inline="javascript">
var prefix = ctx + "statistical";
var currId = "con_one_1";
window.onload = function () {
var date = new Date();
$("#year").val(date.getFullYear());
var currentQuarter = getCurrentQuarter();
if(currentQuarter == 1){
$("#quarter").val("q1");
}else if(currentQuarter == 2){
$("#quarter").val("q2");
}else if(currentQuarter == 3){
$("#quarter").val("q3");
}else if(currentQuarter == 4){
$("#quarter").val("q4");
}
// 初始化月份
var month = date.getMonth() + 1;
if(month <= 9){
$("#month").val("0" + month);
}else{
$("#month").val(month);
}
selectDate();
}
};
function setTab(name, cursel, n) {
for (i = 1; i <= n; i++) {
@ -110,9 +135,29 @@
menu.className = i == cursel ? "actit" : "";
con.style.display = i == cursel ? "block" : "none";
}
currId = "con_" + name + "_" + cursel;
selectDate();
}
function queryCaseAnalysis(qorm, year, quarter, month, month) {
function getCurrentQuarter() {
var currentMonth = new Date().getMonth() + 1; // 获取当前月份,从1开始
if (currentMonth <= 3) {
return 1; // 第一季度
} else if (currentMonth <= 6) {
return 2; // 第二季度
} else if (currentMonth <= 9) {
return 3; // 第三季度
} else {
return 4; // 第四季度
}
}
function queryCaseAnalysis(qorm, year, quarter, month) {
if(qorm=="m"){
quarter="";
}else{
month="";
}
$.ajax({
url: prefix + '/caseAnalysis', //后台url
data: {
@ -120,6 +165,8 @@
"year": year,
"quarter": quarter,
"month": month,
"lawField": $('#lawField').val(),
"checkCategory": $('#checkCategory').val(),
},
type: "GET",
dataType: 'json',
@ -130,7 +177,12 @@
}
});
}
function queryEnforcerAnalysis(qorm, year, quarter, month, month) {
function queryEnforcerAnalysis(qorm, year, quarter, month) {
if(qorm=="m"){
quarter="";
}else{
month="";
}
$.ajax({
url: prefix + '/enforcerAnalysis', //后台url
data: {
@ -138,6 +190,8 @@
"year": year,
"quarter": quarter,
"month": month,
"lawField": $('#lawField').val(),
"checkCategory": $('#checkCategory').val(),
},
type: "GET",
dataType: 'json',
@ -154,7 +208,12 @@
}
});
}
function queryItemAnalysis(qorm, year, quarter, month, month) {
function queryItemAnalysis(qorm, year, quarter, month) {
if(qorm=="m"){
quarter="";
}else{
month="";
}
$.ajax({
url: prefix + '/itemAnalysis', //后台url
data: {
@ -162,6 +221,8 @@
"year": year,
"quarter": quarter,
"month": month,
"lawField": $('#lawField').val(),
"checkCategory": $('#checkCategory').val(),
},
type: "GET",
dataType: 'json',
@ -179,7 +240,12 @@
}
});
}
/*function queryEnterpriseAnalysis(qorm, year, quarter, month, month) {
function queryEnterpriseAnalysis(qorm, year, quarter, month) {
if(qorm=="m"){
quarter="";
}else{
month="";
}
$.ajax({
url: prefix + '/enterpriseAnalysis', //后台url
data: {
@ -187,6 +253,8 @@
"year": year,
"quarter": quarter,
"month": month,
"lawField": $('#lawField').val(),
"checkCategory": $('#checkCategory').val(),
},
type: "GET",
dataType: 'json',
@ -203,8 +271,13 @@
error: function (er) { //失败,回调函数
}
});
}*/
function queryEnterpriseSortAnalysis(qorm, year, quarter, month, month) {
}
function queryEnterpriseSortAnalysis(qorm, year, quarter, month) {
if(qorm=="m"){
quarter="";
}else{
month="";
}
$.ajax({
url: prefix + '/enterpriseSortAnalysis', //后台url
data: {
@ -212,13 +285,15 @@
"year": year,
"quarter": quarter,
"month": month,
"lawField": $('#lawField').val(),
"checkCategory": $('#checkCategory').val(),
},
type: "GET",
dataType: 'json',
success: function (data) { //成功,回调函数
console.log("==========")
console.log(data)
console.log("==========")
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]);
@ -234,7 +309,7 @@
});
}
function queryEnterpriseAnalysis(obj) {
/* function queryEnterpriseAnalysis(obj) {
console.log(obj)
$.ajax({
url: prefix + '/enterpriseSortAnalysis', //后台url
@ -258,24 +333,50 @@
error: function (er) { //失败,回调函数
}
});
}
}*/
function selectDate() {
var qormElement = document.getElementById("qorm");
var qormValue = qormElement.options[qormElement.selectedIndex].value;
// 判断选择的月度还是季度
if ("m"==qormValue) {
$("#monthName").show();
$("#quarterName").hide();
$("#month").show();
$("#quarter").hide();
} else {
$("#monthName").hide();
$("#quarterName").show();
$("#month").hide();
$("#quarter").show();
}
var yearElement = document.getElementById("year");
var yearValue = yearElement.options[yearElement.selectedIndex].value;
var quarterElement = document.getElementById("quarter");
var quarterValue = quarterElement.options[quarterElement.selectedIndex].value;
var monthElement = document.getElementById("month");
var monthValue = monthElement.options[monthElement.selectedIndex].value;
queryCaseAnalysis(qormValue, yearValue, quarterValue, monthValue);
queryEnforcerAnalysis(qormValue, yearValue, quarterValue, monthValue);
queryItemAnalysis(qormValue, yearValue, quarterValue, monthValue);
// queryEnterpriseAnalysis(qormValue, yearValue, quarterValue, monthValue);
queryEnterpriseSortAnalysis(qormValue, yearValue, quarterValue, monthValue);
// queryEnterpriseLawFieldAnalysis(qormValue, yearValue, quarterValue, monthValue);
if(currId == 'con_one_1'){
queryCaseAnalysis(qormValue, yearValue, quarterValue, monthValue);
}
if(currId == 'con_one_2'){
queryEnforcerAnalysis(qormValue, yearValue, quarterValue, monthValue);
}
if(currId == 'con_one_3'){
queryItemAnalysis(qormValue, yearValue, quarterValue, monthValue);
}
if(currId == 'con_one_4'){
queryEnterpriseAnalysis(qormValue, yearValue, quarterValue, monthValue);
}
if(currId == 'con_one_5'){
queryEnterpriseSortAnalysis(qormValue, yearValue, quarterValue, monthValue);
}
}
function queryData() {
var div = document.getElementById('searchDiv');
@ -290,11 +391,11 @@
obj[name] = value;
}
queryEnterpriseAnalysis(obj)
// queryEnterpriseAnalysis(obj)
}
function caseAnalysis(dataList) {
console.log(dataList)
console.log(dataList);
var arr = [];
var arrName = [];
var total = 0;
@ -321,6 +422,10 @@
echartUtil.dataPercent = arrPercent;
echartUtil.dataSum = new Array(arrName.length).fill(100);
echartUtil.initSchedule("echartLine");
var myChart = echarts.init(document.getElementById("echartLine"));
window.addEventListener("resize", function () {
myChart.resize();
});
}
function bar_across(targetId, names, values) {
@ -346,7 +451,9 @@
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
myChart.resize();
window.addEventListener('resize', () => { myChart.resize(); });
window.addEventListener("resize", function () {
myChart.resize();
});
}
function pie_rose(targetId, datas) {
@ -362,7 +469,7 @@
calculable : true,
series : [
{
name:'面积模式',
name:'统计数据',
type:'pie',
roseType : 'area',
data: datas
@ -372,7 +479,9 @@
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
myChart.resize();
window.addEventListener('resize', () => { myChart.resize(); });
window.addEventListener("resize", function () {
myChart.resize();
});
}
function line_across(targetId, dates, nums) {
@ -384,15 +493,19 @@
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
// myChart.resize();
// window.addEventListener('resize', () => { myChart.resize(); });
myChart.resize();
window.addEventListener('resize', () => { myChart.resize(); });
// window.addEventListener("resize", function () {
// myChart.resize();
// });
}
/**
* 导出excel
* @param id 主键
*/
function exportData() {
/*function exportData() {
// $.modal.open("数据导出模板选择" , prefix + "/analysisModel", 800, 300);
var div = document.getElementById('searchDiv');
var selects = div.getElementsByTagName('select');
@ -405,6 +518,62 @@
obj[name] = value;
}
window.location.href = prefix + "/export?statisticalStr=" + encodeURIComponent(JSON.stringify(obj));
}*/
function exportData() {
console.log($('#excelModel').val())
var exportData= {
"qorm": $('#qorm').val(),
"year": $('#year').val(),
"quarter": $('#quarter').val(),
"month": $('#month').val(),
"lawField": $('#lawField').val(),
"checkCategory": $('#checkCategory').val(),
};
if(exportData.qorm=="m"){
exportData.quarter="";
}else{
exportData.month="";
};
if($('#excelModel').val()==1) {
$.ajax({
type: "POST",
data: JSON.stringify(exportData),
contentType: 'application/json',
//设置响应类型
xhrFields: {responseType: "blob"},
url: prefix+"/exportLawEnforcerExcel",
success: function (result) {
const link = document.createElement('a');
let blob = new Blob([result], {type: 'application/vnd.ms-excel'});
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
link.setAttribute('download', "执法人员模板.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
}
})
}else if($('#excelModel').val()==2) {
$.ajax({
type: "POST",
data: JSON.stringify(exportData),
contentType: 'application/json',
//设置响应类型
xhrFields: {responseType: "blob"},
url: prefix+"/exportEnterpriseRankExcel",
success: function (result) {
const link = document.createElement('a');
let blob = new Blob([result], {type: 'application/vnd.ms-excel'});
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
link.setAttribute('download', "企业排序模板.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
}
})
}
}
</script>
</body>

3
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/edit.html

@ -23,8 +23,9 @@
<div class="form-group">
<label class="col-sm-3 control-label">企业类型:</label>
<div class="col-sm-8">
<select name="enterpriseType" class="form-control m-b">
<select name="companyOrgType" class="form-control m-b" th:with="type=${@dict.getType('enterpriseType')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{companyOrgType}"></option>
</select>
</div>
</div>

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

@ -20,7 +20,7 @@
</li>
<li>
<p>企业类型:</p>
<select name="enterpriseType" th:with="type=${@dict.getType('enterpriseType')}">
<select name="companyOrgType" th:with="type=${@dict.getType('enterpriseType')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>

40
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/add.html

@ -13,6 +13,16 @@
<input name="cycleTime" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<select name="timeType" class="form-control m-b" id="timeType">
<option value="month">月</option>
<option value="quarter">季</option>
<option value="year">年</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">告警次数:</label>
<div class="col-sm-8">
@ -22,10 +32,13 @@
<div class="form-group">
<label class="col-sm-3 control-label">告警级别:</label>
<div class="col-sm-8">
<select name="alarmType" class="form-control m-b" th:with="type=${@dict.getType('warnLevel')}">
<select name="alarmType" class="form-control m-b" th:with="type=${@dict.getType('warnLevel')}" id="alarmType" onclick="colorChange()">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
<label id="firstColor" style="color: red">红色</label>
<label id="secondColor" style="color: orange">橙色</label>
<label id="thirdColor" style="color: #fefc14">黄色</label>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
@ -41,6 +54,11 @@
<th:block th:include="zdxtInclude :: footer" />
<script type="text/javascript">
var prefix = ctx + "code/ruleItemList";
window.onload = function () {
$("#firstColor").hide();
$("#secondColor").hide();
$("#thirdColor").hide();
};
$("#form-list-add").validate({
focusCleanup: true
});
@ -50,6 +68,26 @@
$.operate.save(prefix + "/add", $('#form-list-add').serialize());
}
}
function colorChange(){
let type=document.getElementById("alarmType");
if(type.value=="1"){
$("#firstColor").show();
$("#secondColor").hide();
$("#thirdColor").hide();
}else if(type.value=="2"){
$("#firstColor").hide();
$("#secondColor").show();
$("#thirdColor").hide();
} else if(type.value=="3"){
$("#firstColor").hide();
$("#secondColor").hide();
$("#thirdColor").show();
}else{
$("#firstColor").hide();
$("#secondColor").hide();
$("#thirdColor").hide();
}
}
</script>
</body>
</html>

45
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/edit.html

@ -13,6 +13,16 @@
<input name="cycleTime" th:field="*{cycleTime}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<select name="timeType" class="form-control m-b" id="timeType" th:field="*{timeType}">
<option value="month">月</option>
<option value="quarter">季</option>
<option value="year">年</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">告警次数:</label>
<div class="col-sm-8">
@ -22,16 +32,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">告警级别:</label>
<div class="col-sm-8">
<select name="alarmType" class="form-control m-b" th:with="type=${@dict.getType('warnLevel')}">
<select name="alarmType" class="form-control m-b" th:with="type=${@dict.getType('warnLevel')}" id="alarmType" onclick="colorChange()">
<option value="">所有</option>
<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}" th:field="*{alarmType}"></option>
</select>
</div>
<label id="firstColor" style="color: red;margin-top: 10px;">红色</label>
<label id="secondColor" style="color: orange;margin-top: 10px;">橙色</label>
<label id="thirdColor" style="color: #fefc14;margin-top: 10px;">黄色</label>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<select name="status" class="form-control m-b">
<select name="status" class="form-control m-b" th:field="*{status}">
<option value="0">启用</option>
<option value="1">禁用</option>
</select>
@ -42,6 +55,12 @@
<th:block th:include="zdxtInclude :: footer" />
<script type="text/javascript">
var prefix = ctx + "code/ruleItemList";
window.onload = function () {
/*$("#firstColor").hide();
$("#secondColor").hide();
$("#thirdColor").hide();*/
colorChange();
};
$("#form-list-edit").validate({
focusCleanup: true
});
@ -51,6 +70,26 @@
$.operate.save(prefix + "/edit", $('#form-list-edit').serialize());
}
}
function colorChange(){
let type=document.getElementById("alarmType");
if(type.value=="1"){
$("#firstColor").show();
$("#secondColor").hide();
$("#thirdColor").hide();
}else if(type.value=="2"){
$("#firstColor").hide();
$("#secondColor").show();
$("#thirdColor").hide();
} else if(type.value=="3"){
$("#firstColor").hide();
$("#secondColor").hide();
$("#thirdColor").show();
}else{
$("#firstColor").hide();
$("#secondColor").hide();
$("#thirdColor").hide();
}
}
</script>
</body>
</html>

24
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/ruleItemList.html

@ -12,7 +12,13 @@
<ul>
<li>
<p>周期:</p>
<input type="text" name="cycleTime"/>
<input type="text" name="cycleTime" style="width: 80px;"/>
<select name="timeType">
<option value="">所有</option>
<option value="month">月</option>
<option value="quarter">季</option>
<option value="year">年</option>
</select>
</li>
<li>
<p>告警次数:</p>
@ -20,7 +26,7 @@
</li>
<li>
<p>告警级别:</p>
<select name="alarmType" th:with="type=${@dict.getType('')}">
<select name="alarmType" th:with="type=${@dict.getType('warnLevel')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
@ -29,6 +35,8 @@
<p>状态:</p>
<select name="status">
<option value="">所有</option>
<option value="0">启用</option>
<option value="1">禁用</option>
</select>
</li>
<li>
@ -86,7 +94,17 @@
},
{
field : 'cycleTime',
title : '周期(月)'
title : '周期',
formatter:function (value,row,index){
console.log(row)
if(row.timeType=="year"){
return '<span>'+value+'年</span>'
}else if(row.timeType=="quarter"){
return '<span>'+value+'季</span>'
}else{
return '<span>'+value+'月</span>'
}
}
},
{
field : 'existAlarm',

56
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statistical.html

@ -14,9 +14,11 @@
<i class="icsty"></i>
<span>
<select id="year" name="year" onchange="selectDate()">
<option value="2024">2024</option>
<option value="2023">2023</option>
<option value="2022">2022</option>
<option value="2026">2026</option>
<option value="2025">2025</option>
<option value="2024">2024</option>
<option value="2023">2023</option>
<option value="2022">2022</option>
</select>年度
</span>
<span>
@ -153,6 +155,7 @@
</div>
<div id="con_one_4" class="tab_item">
<span style="font-size: 20px;">企业数量总计:<span id="enterprise_Total"></span></span>
<div class="tab_cont">
<div class="listhead">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="desktab">
@ -220,7 +223,7 @@
window.onload = function () {
selectDate();
}
};
function setTab(name, cursel, n) {
for (i = 1; i <= n; i++) {
@ -277,12 +280,12 @@
dataY: dataY,
dataSum: dataSum,
dataPercent: dataPercent,
}
};
initSchedule(data);
}
function initSchedule(dataAll) {
var _this = this;
var myColor = ['#3C83FF']
var myColor = ['#3C83FF'];
var option = {
tooltip: {
trigger: 'item'
@ -332,7 +335,7 @@
var traceValue;
for (var i = 0; i < dataAll.dataX.length; i++) {
if (data === dataAll.dataX[i]) {
traceValue = dataAll.dataY[i]
traceValue = dataAll.dataY[i];
break
}
}
@ -340,7 +343,7 @@
'{a|' + data + '}',
'{b|' + traceValue + '}',
'{c|件}'
]
];
return arr.join('')
},
formatter: function (params) {
@ -423,14 +426,14 @@
var traceValue;
for (var i = 0; i < dataAll.dataX.length; i++) {
if (data.name === dataAll.dataX[i]) {
traceValue = dataAll.dataPercent[i]
traceValue = dataAll.dataPercent[i];
break
}
}
var arr = [
'{a|' + traceValue + '}',
'{b|%}'
]
];
return arr.join('');
},
textStyle: {
@ -468,7 +471,7 @@
]
};
echartLine.setOption(option, true);
};
}
/** 案件数量 */
function queryCaseAnalysis(qorm, year, quarter, month,industryValue) {
@ -533,7 +536,7 @@
};
// 使用刚指定的配置项和数据显示图表。
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();
@ -567,6 +570,7 @@
var tabStr = fillTable(tmpList);
document.getElementById("echartEnforcerTable").innerHTML = tabStr;
enforcerAnalysis(enforcers, nums);
},
error: function (er) { //失败,回调函数
@ -579,7 +583,6 @@
var myChart = echarts.init(document.getElementById('echartEnforcer'));
var app = {};
option = null;
option = {
backgroundColor: '',
tooltip: {
@ -645,7 +648,7 @@
position: 'top',
formatter: '{c}',
textStyle: {
color: '#666', //color of value
color: '#3786ef', //color of value
fontSize: 14
}
}
@ -653,13 +656,13 @@
itemStyle: {
//通常情况下:
normal: {
barBorderRadius: 20,
barBorderRadius: 10,
//每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
color: function (params) {
var colorList = [
//['#f43e30', '#fa8576'],
//['#0db62a', '#38dc6f'],
//['#ff730a', '#ffb233'],
['#f43e30', '#fa8576'],
['#0db62a', '#38dc6f'],
['#ff730a', '#ffb233'],
['#3786ef', '#81c0f8'],
['#3786ef', '#81c0f8'],
['#3786ef', '#81c0f8'],
@ -667,16 +670,21 @@
];
var index = params.dataIndex;
if (params.dataIndex >= colorList.length) {
index = params.dataIndex - colorList.length;
index = 0;
index = params.dataIndex - (colorList.length - 1);
}
return new echarts.graphic.LinearGradient(0, 0, 0, 1,
// var color1 = colorList[index][0];
// var color2 = colorList[index][1];
// console.log(color1)
// console.log(color2)
return new echarts.graphic.LinearGradient(0, 0 ,0, 1,
[{
offset: 0,
color: colorList[index][0]
color: '#3786ef'
},
{
offset: 1,
color: colorList[index][1]
color: '#81c0f8'
}
]);
},
@ -724,7 +732,8 @@
barDatas.push(list[i].total);
tmpList.push({name: list[i].name, value: list[i].total})
}
document.getElementById("enterprise_Total").innerText=data.data.length;
console.log(data);
var tabStr = fillTable(tmpList);
document.getElementById("echartSortTable").innerHTML = tabStr;
@ -966,7 +975,6 @@
function queryData() {
var div = document.getElementById('seltime');
var selects = div.getElementsByTagName('select');
debugger
var obj = {};
for (var i = 0; i < selects.length; i++) {
var select = selects[i];

8
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/dept/dept.html

@ -29,9 +29,9 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add(100,820,508)" shiro:hasPermission="system:dept:add">
<i class="fa fa-plus"></i> 新增
</a>
<!-- <a class="btn btn-success" onclick="$.operate.add(100,820,508)" shiro:hasPermission="system:dept:add">-->
<!-- <i class="fa fa-plus"></i> 新增-->
<!-- </a>-->
<a class="btn btn-primary" onclick="$.operate.edit(null,820,508)" shiro:hasPermission="system:dept:edit">
<i class="fa fa-edit"></i> 修改
</a>
@ -50,7 +50,7 @@
var editFlag = [[${@permission.hasPermi('system:dept:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:dept:remove')}]];
var datas = [[${@dict.getType('sys_normal_disable')}]];
var prefix = ctx + "system/dept"
var prefix = ctx + "system/dept";
$(function() {
var options = {

2
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/user/edit.html

@ -36,7 +36,7 @@
<div class="form-group">
<label class="col-sm-4 control-label is-required">手机号码:</label>
<div class="col-sm-8">
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" th:field="*{phonenumber}" required>
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="50" th:field="*{phonenumber}" required>
</div>
</div>
</div>

24
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/system/user/resetPwd.html

@ -22,23 +22,45 @@
</form>
</div>
<th:block th:include="include :: footer" />
<script src="../../../static/js/crypto-js.js" th:src="@{/js/crypto-js.js}"></script>
<script type="text/javascript">
$("#form-user-resetPwd").validate({
rules:{
password:{
required:true,
minlength: 5,
maxlength: 20
maxlength: 100
},
},
focusCleanup: true
});
function submitHandler() {
var password = $("#password").val();
$("#password").val(Encrypt(password));
if ($.validate.form()) {
$.operate.save(ctx + "system/user/resetPwd", $('#form-user-resetPwd').serialize());
}
}
/**
* 加密密码
* @param passWord
* @constructor
*/
function Encrypt(passWord) {
var keyStr = '1234567898745621';
var ivStr = keyStr;
var key = CryptoJS.enc.Utf8.parse(keyStr);
var iv = CryptoJS.enc.Utf8.parse(ivStr);
var srcs = CryptoJS.enc.Utf8.parse(passWord);
var encrypted = CryptoJS.AES.encrypt(srcs, key, {
iv: iv,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.ZeroPadding
});
return CryptoJS.enc.Base64.stringify(encrypted.ciphertext);
}
</script>
</body>

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java

@ -5,6 +5,7 @@ import java.util.List;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.zdxt.auth.project.system.dict.mapper.DictDataMapper;
import com.zdxt.code.domain.QrCodeGenerateHistory;
import com.zdxt.code.service.IQrCodeGenerateHistoryService;
import com.zdxt.code.utils.PasswordTools;
@ -37,6 +38,8 @@ public class EnterpriseInformationController extends BaseController
@Autowired
private IQrCodeGenerateHistoryService iQrCodeGenerateHistoryService;
@Autowired
private DictDataMapper dictDataMapper;
@RequiresPermissions("code:information:view")
@GetMapping()
@ -55,6 +58,9 @@ public class EnterpriseInformationController extends BaseController
@ResponseBody
public TableDataInfo list(EnterpriseInformation enterpriseInformation)
{
if(StrUtil.isNotEmpty(enterpriseInformation.getEnterpriseType())){
enterpriseInformation.setCompanyOrgType(dictDataMapper.selectDictLabel("enterpriseType",enterpriseInformation.getCompanyOrgType()));
}
startPage();
List<EnterpriseInformation> list = enterpriseInformationService.selectEnterpriseInformationList(enterpriseInformation);
return getDataTable(list);

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

@ -7,14 +7,17 @@ import com.zdxt.code.domain.LawEnforcerExcel;
import com.zdxt.code.service.StatisticalService;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.util.ExcelUtils;
import org.apache.poi.hssf.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -122,4 +125,65 @@ public class StatisticalController {
public String analysisModel() {
return prefix2 + "/analysisModel";
}
@PostMapping("/exportLawEnforcerExcel")
public void exportLawEnforcerExcel(HttpServletResponse httpServletResponse,StatisticalVo statisticalVo) throws IOException {
List<StatisticalVo> statisticalVos = statisticalService.enforcerAnalysis(statisticalVo);
System.out.println(statisticalVos);
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet("执法人员模板");
//设置文件名称
String fileName = "执法人员模板.xls";
//设置表头
String[] headerList = {"行政检查执法人员", "经办案件数量"};
HSSFRow headerRow = sheet.createRow(0);
for (int i = 0; i < headerList.length; i++) {
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
}
for(int i=0;i<statisticalVos.size();i++){
HSSFRow row = sheet.createRow(i+1);
HSSFCell cell1=row.createCell(0);
HSSFCell cell2=row.createCell(1);
cell1.setCellValue(statisticalVos.get(i).getLawEnforcer());
cell2.setCellValue(statisticalVos.get(i).getTotal());
}
httpServletResponse.setCharacterEncoding("UTF-8");
httpServletResponse.setContentType("application/vnd.ms-excel");
httpServletResponse.setHeader("Content-disposition", "attachment;filename=" + fileName);
httpServletResponse.flushBuffer();
workbook.write(httpServletResponse.getOutputStream());
workbook.close();
}
@PostMapping("/exportEnterpriseRankExcel")
public void exportEnterpriseRankExcel(HttpServletResponse httpServletResponse,StatisticalVo statisticalVo) throws IOException {
List<StatisticalVo> statisticalVos = statisticalService.enterpriseTableAnalysis(statisticalVo);
System.out.println(statisticalVos);
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet("企业排序模板");
//设置文件名称
String fileName = "企业排序模板.xls";
//设置表头
String[] headerList = {"企业名称", "行政检查次数"};
HSSFRow headerRow = sheet.createRow(0);
for (int i = 0; i < headerList.length; i++) {
HSSFCell cell = headerRow.createCell(i);
HSSFRichTextString text = new HSSFRichTextString(headerList[i]);
cell.setCellValue(text);
}
for(int i=0;i<statisticalVos.size();i++){
HSSFRow row = sheet.createRow(i+1);
HSSFCell cell1=row.createCell(0);
HSSFCell cell2=row.createCell(1);
cell1.setCellValue(statisticalVos.get(i).getName());
cell2.setCellValue(statisticalVos.get(i).getTotal());
}
httpServletResponse.setCharacterEncoding("UTF-8");
httpServletResponse.setContentType("application/vnd.ms-excel");
httpServletResponse.setHeader("Content-disposition", "attachment;filename=" + fileName);
httpServletResponse.flushBuffer();
workbook.write(httpServletResponse.getOutputStream());
workbook.close();
}
}

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/RuleItemList.java

@ -20,8 +20,9 @@ public class RuleItemList extends BaseDomain
/** 关联主表ID */
private String ruleId;
/** 周期内,多少个月内 */
/** 周期 */
private Long cycleTime;
private String timeType;
/** 告警次数 */
private Long existAlarm;
@ -98,12 +99,22 @@ public class RuleItemList extends BaseDomain
return status;
}
public String getTimeType() {
return timeType;
}
public void setTimeType(String timeType) {
this.timeType = timeType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("ruleId", getRuleId())
.append("cycleTime", getCycleTime())
.append("timeType", getTimeType())
.append("existAlarm", getExistAlarm())
.append("alarmType", getAlarmType())
.append("status", getStatus())

46
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java

@ -16,6 +16,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSON;
@ -248,18 +249,19 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
//查询最新的二维码数据
QrCodeGenerateHistory qrCodeGenerateHistory1 =
iQrCodeGenerateHistoryService.selectQrCodeGenerateHistoryByNewest(enterpriseInformation.getEnterpriseNumber());
//判断二维码生成时间
Instant instant = qrCodeGenerateHistory1.getGenerateTime().toInstant();
ZoneId zoneId = ZoneId.systemDefault();
// atZone()方法返回在指定时区从此Instant生成的ZonedDateTime。
LocalDateTime date1 = instant.atZone(zoneId).toLocalDateTime();
//当前时间
LocalDateTime date2 = LocalDateTime.now();
//判断相差多少个小时
long hoursDiff = ChronoUnit.HOURS.between(date1, date2);
if(hoursDiff < 24){
log.error("二维码生成时间不足24小时");
return 0;
if(BeanUtil.isNotEmpty(qrCodeGenerateHistory1)){//判断二维码生成时间
Instant instant = qrCodeGenerateHistory1.getGenerateTime().toInstant();
ZoneId zoneId = ZoneId.systemDefault();
// atZone()方法返回在指定时区从此Instant生成的ZonedDateTime。
LocalDateTime date1 = instant.atZone(zoneId).toLocalDateTime();
//当前时间
LocalDateTime date2 = LocalDateTime.now();
//判断相差多少个小时
long hoursDiff = ChronoUnit.HOURS.between(date1, date2);
if (hoursDiff < 24) {
log.error("二维码生成时间不足24小时");
return 0;
}
}
// TODO 企业添加成功,生成企业二维码
String text = "https://www.baidu.com/s?ie=UTF-8&wd=%E7%99%BE%E5%BA%A6";
@ -352,6 +354,25 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
@Override
public int insertQrCode(String num) {
//查询最新的二维码数据
QrCodeGenerateHistory qrCodeGenerateHistory1 =
iQrCodeGenerateHistoryService.selectQrCodeGenerateHistoryByNewest(num);
//判断二维码生成时间
Instant instant = qrCodeGenerateHistory1.getGenerateTime().toInstant();
ZoneId zoneId = ZoneId.systemDefault();
// atZone()方法返回在指定时区从此Instant生成的ZonedDateTime。
LocalDateTime date1 = instant.atZone(zoneId).toLocalDateTime();
//当前时间
LocalDateTime date2 = LocalDateTime.now();
//判断相差多少个小时
long hoursDiff = ChronoUnit.HOURS.between(date1, date2);
if(hoursDiff < 24){
log.error("二维码生成时间不足24小时");
return 3;
}
// 先将与之关联的其他二维码都失效
QrCodeGenerateHistory qrParams = new QrCodeGenerateHistory();
qrParams.setEnterpriseNumber(num);
@ -395,5 +416,4 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
}
return 0;
}
}

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

@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="enterpriseNumber != null and enterpriseNumber != ''"> and enterprise_number like concat('%', #{enterpriseNumber}, '%')</if>
<if test="enterpriseType != null and enterpriseType != ''"> and enterprise_type = #{enterpriseType}</if>
<if test="companyOrgType != null and companyOrgType != ''"> and company_org_type = #{companyOrgType}</if>
<if test="companyOrgType != null and companyOrgType != ''"> and company_org_type like concat('%', #{companyOrgType}, '%')</if>
<if test="enterpriseAddress != null and enterpriseAddress != ''"> and enterprise_address like concat('%', #{enterpriseAddress}, '%')</if>
<if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
<if test="registeredCapital != null and registeredCapital != ''"> and registered_capital = #{registeredCapital}</if>

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/RuleItemListMapper.xml

@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectRuleItemListVo">
select id, rule_id, cycle_time, exist_alarm, exist_alarm_end, alarm_type, status from rule_item_list
select id, rule_id, cycle_time,time_type, exist_alarm, exist_alarm_end, alarm_type, status from rule_item_list
</sql>
<select id="selectRuleItemListList" parameterType="RuleItemList" resultMap="RuleItemListResult">
@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="ruleId != null and ruleId != ''"> and rule_id = #{ruleId}</if>
<if test="cycleTime != null "> and cycle_time = #{cycleTime}</if>
<if test="timeType != null and timeType != ''"> and time_type = #{timeType}</if>
<if test="existAlarm != null "> and exist_alarm = #{existAlarm}</if>
<if test="alarmType != null and alarmType != ''"> and alarm_type = #{alarmType}</if>
<if test="status != null "> and status = #{status}</if>
@ -41,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null and id != ''">id,</if>
<if test="ruleId != null and ruleId != ''">rule_id,</if>
<if test="cycleTime != null ">cycle_time,</if>
<if test="timeType != null and timeType != ''">time_type,</if>
<if test="existAlarm != null ">exist_alarm,</if>
<if test="alarmType != null and alarmType != ''">alarm_type,</if>
<if test="status != null ">status,</if>
@ -49,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null and id != ''">#{id},</if>
<if test="ruleId != null and ruleId != ''">#{ruleId},</if>
<if test="cycleTime != null ">#{cycleTime},</if>
<if test="timeType != null and timeType != ''">#{timeType},</if>
<if test="existAlarm != null ">#{existAlarm},</if>
<if test="alarmType != null and alarmType != ''">#{alarmType},</if>
<if test="status != null ">#{status},</if>
@ -60,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="ruleId != null and ruleId != ''">rule_id = #{ruleId},</if>
<if test="cycleTime != null ">cycle_time = #{cycleTime},</if>
<if test="timeType != null and timeType != ''">time_type = #{timeType},</if>
<if test="existAlarm != null ">exist_alarm = #{existAlarm},</if>
<if test="alarmType != null and alarmType != ''">alarm_type = #{alarmType},</if>
<if test="status != null ">status = #{status},</if>

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

@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectRuleListVo"/>
<where>
<if test="ruleName != null and ruleName != ''"> and rule_name like concat('%', #{ruleName}, '%')</if>
<if test="ruleCode != null and ruleCode != ''"> and rule_code = #{ruleCode}</if>
<if test="ruleCode != null and ruleCode != ''"> and rule_code like concat('%', #{ruleCode}, '%')</if>
<if test="validBeginTime != null "> and valid_begin_time = #{validBeginTime}</if>
<if test="validEndTime != null "> and valid_end_time = #{validEndTime}</if>
<if test="userId != null "> and user_id = #{userId}</if>

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

@ -41,10 +41,7 @@
<select id="statisticalLawEnforcementItem" parameterType="StatisticalVo" resultMap="StatisticalVoResult">
select law_enforcement_item,count(*) as total from enforcement_registration er
where DATE_FORMAT(er.enforcement_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m') and law_enforcement_item is not null
<if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 -->
${params.dataScope}
</if>
GROUP BY law_enforcement_item
</select>
<select id="statisticalLawEnforcer" parameterType="StatisticalVo" resultMap="StatisticalVoResult">
@ -66,10 +63,6 @@
enforcement_registration er
<where>
and DATE_FORMAT( er.enforcement_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' )
<if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 -->
${params.dataScope}
</if>
</where>
GROUP BY
law_enforcer_id_two) t GROUP BY t.law_enforcer_id order by t.total desc
@ -78,8 +71,6 @@
SELECT er.law_enforcer, er.law_enforcer_id, count(1) AS total
FROM enforcement_registration er
WHERE DATE_FORMAT( er.enforcement_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' )
<!-- 数据范围过滤 -->
${params.dataScope}
GROUP BY er.law_enforcer_id order by total desc
</select>
<select id="statisticalEnterpriseType" parameterType="StatisticalVo" resultMap="StatisticalVoResult">
@ -96,10 +87,6 @@
on ei.enterprise_type = sdd.dict_value
<where>
and DATE_FORMAT( er.enforcement_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' )
<if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 -->
${params.dataScope}
</if>
</where>
</select>
@ -110,10 +97,6 @@
from enforcement_registration er
<where>
AND DATE_FORMAT(er.enforcement_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' )
<if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 -->
${params.dataScope}
</if>
</where>
</select>
@ -139,8 +122,12 @@
<if test="industry!= null and industry!= ''">
AND ei.industry = #{industry}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="lawField!= null and lawField!= ''">
AND er.law_field = #{lawField}
</if>
<if test="checkCategory!= null and checkCategory!= ''">
AND er.check_category = #{checkCategory}
</if>
</where>
GROUP BY er.law_enforcement_id ORDER BY total DESC limit 100
</select>
@ -162,8 +149,12 @@
<if test="industry!= null and industry!= ''">
AND ei.industry = #{industry}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="lawField!= null and lawField!= ''">
AND er.law_field = #{lawField}
</if>
<if test="checkCategory!= null and checkCategory!= ''">
AND er.check_category = #{checkCategory}
</if>
</where>
GROUP BY er.law_enforcer_id ORDER BY total DESC limit 100
</select>
@ -187,8 +178,12 @@
<if test="industry!= null and industry!= '' ">
AND ei.industry = #{industry}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="lawField!= null and lawField!= ''">
AND r.law_field = #{lawField}
</if>
<if test="checkCategory!= null and checkCategory!= ''">
AND r.check_category = #{checkCategory}
</if>
GROUP BY d.id ORDER BY total DESC limit 100
</select>
@ -209,8 +204,12 @@
<if test="industry!= null and industry!= ''">
AND i.industry = #{industry}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="lawField!= null and lawField!= ''">
AND r.law_field = #{lawField}
</if>
<if test="checkCategory!= null and checkCategory!= ''">
AND r.check_category = #{checkCategory}
</if>
</where>
GROUP BY i.company_org_type ORDER BY total DESC limit 100
</select>
@ -233,8 +232,6 @@
<if test="checkCategory != null and checkCategory != ''">
AND check_category = #{checkCategory}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
GROUP BY DATE_FORMAT(enforcement_time, '%Y-%m-%d') ORDER BY enforcement_time ASC
</select>
@ -256,8 +253,6 @@
<if test="checkCategory != null and checkCategory != ''">
AND check_category = #{checkCategory}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
GROUP BY enterprise_number ORDER BY total desc
</select>
@ -277,8 +272,15 @@
<if test="params.yearMonth != null and params.yearMonth != ''">
AND DATE_FORMAT(er.enforcement_time, '%Y-%m') = #{params.yearMonth}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="industry!= null and industry!= '' ">
AND ei.industry = #{industry}
</if>
<if test="lawField!= null and lawField!= ''">
AND er.law_field = #{lawField}
</if>
<if test="checkCategory!= null and checkCategory!= ''">
AND er.check_category = #{checkCategory}
</if>
</where>
GROUP BY DATE_FORMAT(enforcement_time, '%Y-%m-%d'), er.enterprise_number ORDER BY total DESC limit 100
</select>

2
lib/ZdxtComponent/pom.xml

@ -14,7 +14,7 @@
<module>zdxtVisualizationComponent</module>
<module>zdxtBaiduUeditorComponent</module>
<module>zdxtTableManagementComponent</module>
<module>zdxtExcelComponent</module>
<!-- <module>zdxtExcelComponent</module>-->
<module>zdxtDynamicFormComponent</module>
<module>zdxtAutoCodeComponent</module>
</modules>

Loading…
Cancel
Save