Browse Source

Merge branch 'master' of http://git.elinkit.com.cn:7070/r/epmet-cloud into pingyin_master

master
wangxianzhang 3 years ago
parent
commit
ac091c4235
  1. 2
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/NewsDTO.java
  2. 3
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDeptDTO.java
  3. 2
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictDataDTO.java
  4. 3
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictTypeDTO.java
  5. 2
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysMenuDTO.java
  6. 3
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysParamsDTO.java
  7. 3
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysRegionDTO.java
  8. 3
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysRoleDTO.java
  9. 3
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysUserDTO.java
  10. 5
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/LogOperationResultDTO.java
  11. 1
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/Region.java
  12. 2
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/remote/ParamsRemoteService.java
  13. 1
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/LogOperationController.java
  14. 4
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDeptController.java
  15. 6
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictTypeController.java
  16. 8
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysMenuController.java
  17. 6
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysRegionController.java
  18. 5
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysRoleController.java
  19. 11
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysUserController.java
  20. 3
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/CorsConfigEntity.java
  21. 1
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/LogOperationEntity.java
  22. 9
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/RocketMQConsumerRegister.java
  23. 1
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/ProjectOperationLogListener.java
  24. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/NewsService.java
  25. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDeptService.java
  26. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictTypeService.java
  27. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysLogErrorService.java
  28. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysLogLoginService.java
  29. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysLogOperationService.java
  30. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysMenuService.java
  31. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysParamsService.java
  32. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysRegionService.java
  33. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysResourceService.java
  34. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysRoleService.java
  35. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysUserService.java
  36. 1
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/CorsConfigServiceImpl.java
  37. 1
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java
  38. 1
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/NewsServiceImpl.java
  39. 1
      epmet-auth/src/main/java/com/epmet/controller/BackDoorController.java
  40. 1
      epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java
  41. 2
      epmet-auth/src/main/java/com/epmet/controller/GovWebController.java
  42. 5
      epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java
  43. 5
      epmet-auth/src/main/java/com/epmet/controller/PublicUserLoginController.java
  44. 2
      epmet-auth/src/main/java/com/epmet/controller/SsoController.java
  45. 3
      epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java
  46. 2
      epmet-auth/src/main/java/com/epmet/jwt/JwtTokenUtils.java
  47. 1
      epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java
  48. 2
      epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java
  49. 4
      epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java
  50. 5
      epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java
  51. 2
      epmet-auth/src/main/java/com/epmet/service/impl/ResourceServiceImpl.java
  52. 3
      epmet-auth/src/test/java/com/epmet/TokenGenTest.java
  53. 5
      epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm
  54. 7
      epmet-cloud-generator/src/main/resources/template/index.vue.vm
  55. 1
      epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/util/TokenUtil.java
  56. 2
      epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/AbstractDataSourceNameFetcher.java
  57. 2
      epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java
  58. 2
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/aspect/DataFilterAspect.java
  59. 3
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/dto/form/StaffPermissionFormDTO.java
  60. 6
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/MybatisGovAccessFeignClient.java
  61. 3
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/MybatisGovOrgFeignClient.java
  62. 7
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/fallback/MybatisGovAccessFeignClientFallback.java
  63. 3
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/fallback/MybatisGovOrgFeignClientFallback.java
  64. 1
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/interceptor/DataFilterInterceptor.java
  65. 3
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java
  66. 1
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/register/MQAbstractRegister.java
  67. 1
      epmet-commons/epmet-commons-security/src/main/java/com/epmet/commons/security/jwt/JwtUtils.java
  68. 1
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java
  69. 7
      epmet-commons/epmet-commons-tools-wx-mp/src/main/java/com/epmet/wx/mp/handler/ScanHandler.java
  70. 7
      epmet-commons/epmet-commons-tools-wx-mp/src/main/java/com/epmet/wx/mp/handler/SubscribeHandler.java
  71. 2
      epmet-commons/epmet-commons-tools/pom.xml
  72. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/annotation/MaskResponse.java
  73. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/AsyncConfig.java
  74. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ThreadLocalConstant.java
  75. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/GenderEnum.java
  76. 43
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/IcResiUserSubStatusEnum.java
  77. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  78. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/EpmetBaseRequestInterceptor.java
  79. 11
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java
  80. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/config/WebMvcConfig.java
  81. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/GovTokenDto.java
  82. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/password/BCrypt.java
  83. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java
  84. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/EpmetRequestHolder.java
  85. 63
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java
  86. 35
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
  87. 3
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ModuleUtils.java
  88. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/TreeStringNode.java
  89. 17
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillCellMergeStrategy.java
  90. 162
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillRowMergeStrategy.java
  91. 105
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillRowMergeStrategy2.java
  92. 99
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/IdCardNoValidatorUtils.java
  93. 8
      epmet-gateway/src/main/java/com/epmet/auth/AuthProcessor.java
  94. 4
      epmet-gateway/src/main/java/com/epmet/filter/AuthFilter.java
  95. 3
      epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java
  96. 1
      epmet-gateway/src/main/java/com/epmet/healthcheck/HealthCheckController.java
  97. 2
      epmet-gateway/src/main/java/com/epmet/jwt/JwtTokenUtils.java
  98. 1
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgenctBasicDataFormDTO.java
  99. 7
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/AcUserAuthorizeDTO.java
  100. 7
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/AcUserDTO.java

2
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/NewsDTO.java

@ -8,10 +8,10 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;

3
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDeptDTO.java

@ -8,12 +8,11 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.epmet.commons.tools.utils.TreeNode;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

2
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictDataDTO.java

@ -8,10 +8,10 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.Min;

3
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictTypeDTO.java

@ -8,11 +8,10 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.Min;

2
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysMenuDTO.java

@ -8,11 +8,11 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.epmet.commons.tools.utils.TreeNode;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.Min;

3
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysParamsDTO.java

@ -8,11 +8,10 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;

3
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysRegionDTO.java

@ -8,9 +8,8 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.Min;

3
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysRoleDTO.java

@ -8,11 +8,10 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;

3
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysUserDTO.java

@ -8,11 +8,10 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

5
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/LogOperationResultDTO.java

@ -1,12 +1,7 @@
package com.epmet.dto.region;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.util.Date;
/**
*
*/

1
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/region/Region.java

@ -9,7 +9,6 @@
package com.epmet.dto.region;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;

2
epmet-admin/epmet-admin-client/src/main/java/com/epmet/remote/ParamsRemoteService.java

@ -9,9 +9,9 @@
package com.epmet.remote;
import com.alibaba.fastjson.JSON;
import com.epmet.feign.ParamsFeignClient;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.feign.ParamsFeignClient;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

1
epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/LogOperationController.java

@ -3,7 +3,6 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.IpUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.LogOperationListFormDTO;

4
epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDeptController.java

@ -8,14 +8,14 @@
package com.epmet.controller;
import com.epmet.dto.SysDeptDTO;
import com.epmet.service.SysDeptService;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysDeptDTO;
import com.epmet.service.SysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

6
epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictTypeController.java

@ -8,18 +8,18 @@
package com.epmet.controller;
import com.epmet.dto.SysDictTypeDTO;
import com.epmet.service.SysDictTypeService;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysDictTypeDTO;
import com.epmet.entity.DictType;
import com.epmet.service.SysDictTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;

8
epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysMenuController.java

@ -8,16 +8,16 @@
package com.epmet.controller;
import com.epmet.dto.MenuResourceDTO;
import com.epmet.dto.SysMenuDTO;
import com.epmet.service.SysMenuService;
import com.epmet.service.SysResourceService;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.security.user.UserDetail;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.MenuResourceDTO;
import com.epmet.dto.SysMenuDTO;
import com.epmet.service.SysMenuService;
import com.epmet.service.SysResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

6
epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysRegionController.java

@ -8,9 +8,6 @@
package com.epmet.controller;
import com.epmet.dto.SysRegionDTO;
import com.epmet.dto.region.RegionProvince;
import com.epmet.service.SysRegionService;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.Result;
@ -19,6 +16,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysRegionDTO;
import com.epmet.dto.region.RegionProvince;
import com.epmet.service.SysRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

5
epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysRoleController.java

@ -8,9 +8,6 @@
package com.epmet.controller;
import com.epmet.dto.SysRoleDTO;
import com.epmet.service.SysRoleService;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -18,8 +15,10 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.SysRoleDTO;
import com.epmet.service.SysRoleDataScopeService;
import com.epmet.service.SysRoleMenuService;
import com.epmet.service.SysRoleService;
import com.epmet.service.SysRoleUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

11
epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysUserController.java

@ -8,16 +8,11 @@
package com.epmet.controller;
import com.epmet.commons.tools.security.user.SecurityUser;
import com.epmet.dto.PasswordDTO;
import com.epmet.dto.SysUserDTO;
import com.epmet.service.SysResourceService;
import com.epmet.service.SysUserService;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.bo.ResourceBO;
import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.security.user.SecurityUser;
import com.epmet.commons.tools.security.user.UserDetail;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
@ -27,9 +22,13 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.PasswordDTO;
import com.epmet.dto.SysUserDTO;
import com.epmet.excel.SysUserExcel;
import com.epmet.service.SysResourceService;
import com.epmet.service.SysRoleDataScopeService;
import com.epmet.service.SysRoleUserService;
import com.epmet.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

3
epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/CorsConfigEntity.java

@ -18,13 +18,10 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 跨域配置表
*

1
epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/LogOperationEntity.java

@ -18,7 +18,6 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

9
epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/RocketMQConsumerRegister.java

@ -4,19 +4,12 @@ import com.epmet.commons.rocketmq.constants.ConsomerGroupConstants;
import com.epmet.commons.rocketmq.constants.TopicConstants;
import com.epmet.commons.rocketmq.register.MQAbstractRegister;
import com.epmet.commons.rocketmq.register.MQConsumerProperties;
import com.epmet.commons.tools.enums.EnvEnum;
import com.epmet.mq.listener.listener.AuthOperationLogListener;
import com.epmet.mq.listener.listener.PointOperationLogListener;
import com.epmet.mq.listener.listener.ProjectOperationLogListener;
import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer;
import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.common.protocol.heartbeat.MessageModel;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
@Component
public class RocketMQConsumerRegister extends MQAbstractRegister {
@ -29,4 +22,4 @@ public class RocketMQConsumerRegister extends MQAbstractRegister {
// ...其他监听器类似
}
}
}

1
epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/ProjectOperationLogListener.java

@ -2,7 +2,6 @@ package com.epmet.mq.listener.listener;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.rocketmq.constants.MQUserPropertys;
import com.epmet.commons.rocketmq.messages.LoginMQMsg;
import com.epmet.commons.rocketmq.messages.ProjectChangedMQMsg;
import com.epmet.commons.tools.distributedlock.DistributedLock;
import com.epmet.commons.tools.exception.ExceptionUtils;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/NewsService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.NewsDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.NewsDTO;
import com.epmet.entity.NewsEntity;
import java.util.Map;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDeptService.java

@ -8,8 +8,8 @@
package com.epmet.service;
import com.epmet.dto.SysDeptDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.SysDeptDTO;
import com.epmet.entity.SysDeptEntity;
import java.util.List;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictTypeService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.SysDictTypeDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.SysDictTypeDTO;
import com.epmet.entity.DictType;
import com.epmet.entity.SysDictTypeEntity;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysLogErrorService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.SysLogErrorDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.SysLogErrorDTO;
import com.epmet.entity.SysLogErrorEntity;
import java.util.List;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysLogLoginService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.SysLogLoginDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.SysLogLoginDTO;
import com.epmet.entity.SysLogLoginEntity;
import java.util.List;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysLogOperationService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.SysLogOperationDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.SysLogOperationDTO;
import com.epmet.entity.SysLogOperationEntity;
import java.util.List;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysMenuService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.SysMenuDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.security.user.UserDetail;
import com.epmet.dto.SysMenuDTO;
import com.epmet.entity.SysMenuEntity;
import java.util.List;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysParamsService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.SysParamsDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.SysParamsDTO;
import com.epmet.entity.SysParamsEntity;
import java.util.List;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysRegionService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.SysRegionDTO;
import com.epmet.dto.region.RegionProvince;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.SysRegionEntity;
import java.util.List;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysResourceService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.MenuResourceDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.security.bo.ResourceBO;
import com.epmet.dto.MenuResourceDTO;
import com.epmet.entity.SysResourceEntity;
import java.util.List;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysRoleService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.SysRoleDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.SysRoleDTO;
import com.epmet.entity.SysRoleEntity;
import java.util.List;

2
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysUserService.java

@ -8,9 +8,9 @@
package com.epmet.service;
import com.epmet.dto.SysUserDTO;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.SysUserDTO;
import com.epmet.entity.SysUserEntity;
import java.util.List;

1
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/CorsConfigServiceImpl.java

@ -13,7 +13,6 @@ import com.epmet.service.CorsConfigService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

1
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.epmet.auth.constants.AuthOperationEnum;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.feign.ResultDataResolver;

1
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/NewsServiceImpl.java

@ -9,7 +9,6 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.annotation.DataFilter;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.page.PageData;

1
epmet-auth/src/main/java/com/epmet/controller/BackDoorController.java

@ -3,7 +3,6 @@ package com.epmet.controller;
import com.epmet.redis.CustomerAppWxServiceUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Set;

1
epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java

@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
/**

2
epmet-auth/src/main/java/com/epmet/controller/GovWebController.java

@ -16,8 +16,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
/**
* @author sun

5
epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java

@ -29,7 +29,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@RestController
@RequestMapping("ic")

5
epmet-auth/src/main/java/com/epmet/controller/PublicUserLoginController.java

@ -1,7 +1,6 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
@ -13,11 +12,7 @@ import com.epmet.dto.form.PublicSendSmsCodeFormDTO;
import com.epmet.dto.form.RegisterFormDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.service.PublicUserLoginService;
import com.netflix.ribbon.proxy.annotation.Http;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpRequest;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.web.bind.annotation.*;
/**

2
epmet-auth/src/main/java/com/epmet/controller/SsoController.java

@ -6,8 +6,8 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.SsoEnteOrgFormDTO;
import com.epmet.dto.form.SsoLoginFormDTO;
import com.epmet.dto.form.SsoWorkLoginFormDTO;
import com.epmet.dto.form.SsoLoginOperFormDTO;
import com.epmet.dto.form.SsoWorkLoginFormDTO;
import com.epmet.dto.result.SsoLoginResultDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.service.SsoService;

3
epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java

@ -1,10 +1,7 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.UserDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.dto.result.UserTokenResultDTO;

2
epmet-auth/src/main/java/com/epmet/jwt/JwtTokenUtils.java

@ -11,14 +11,12 @@ package com.epmet.jwt;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.apache.commons.codec.binary.Base64;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

1
epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java

@ -5,7 +5,6 @@ import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;

2
epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java

@ -14,8 +14,6 @@ import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.utils.CpUserDetailRedis;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.form.CustomerStaffFormDTO;
import com.epmet.dto.form.GovWebLoginFormDTO;
import com.epmet.dto.form.GovWebOperLoginFormDTO;
import com.epmet.dto.result.GovWebOperLoginResultDTO;

4
epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java

@ -29,7 +29,9 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Service
@Slf4j

5
epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java

@ -16,7 +16,10 @@ import com.epmet.dto.PaCustomerDTO;
import com.epmet.dto.PaUserDTO;
import com.epmet.dto.PaUserWechatDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.dto.result.RegisterResultDTO;
import com.epmet.dto.result.SaveUserResultDTO;
import com.epmet.dto.result.SendVerificationCodeResultDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;

2
epmet-auth/src/main/java/com/epmet/service/impl/ResourceServiceImpl.java

@ -8,7 +8,6 @@
package com.epmet.service.impl;
import io.jsonwebtoken.Claims;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.enums.SuperAdminEnum;
import com.epmet.commons.tools.exception.ErrorCode;
@ -23,6 +22,7 @@ import com.epmet.feign.ResourceFeignClient;
import com.epmet.feign.UserFeignClient;
import com.epmet.jwt.JwtUtils;
import com.epmet.service.ResourceService;
import io.jsonwebtoken.Claims;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

3
epmet-auth/src/test/java/com/epmet/TokenGenTest.java

@ -1,12 +1,9 @@
package com.epmet;
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.security.dto.GovTokenDto;
import com.epmet.commons.tools.utils.CpUserDetailRedis;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.result.StaffLatestAgencyResultDTO;
import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;
import com.epmet.service.impl.GovLoginServiceImpl;

5
epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm

@ -17,8 +17,9 @@
</template>
<script>
import debounce from 'lodash/debounce'
export default {
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,

7
epmet-cloud-generator/src/main/resources/template/index.vue.vm

@ -43,9 +43,10 @@
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './${pathName}-add-or-update'
export default {
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './'
export default {
mixins: [mixinViewModule],
data () {
return {

1
epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/util/TokenUtil.java

@ -1,7 +1,6 @@
package com.epmet.common.token.util;
import com.epmet.common.token.property.TokenPropertise;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.CpUserDetailRedis;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

2
epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/AbstractDataSourceNameFetcher.java

@ -1,7 +1,5 @@
package com.epmet.commons.dynamic.datasource.util;
import com.epmet.commons.dynamic.datasource.enums.DataSourceEnum;
public abstract class AbstractDataSourceNameFetcher {
public abstract String fetchDataSourceName();

2
epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java

@ -2,9 +2,9 @@ package com.epmet.commons.extappauth.aspect;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.annotation.InternalAppRequestAuth;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.extappauth.jwt.JwtTokenUtils;
import com.epmet.commons.tools.exception.EpmetErrorCode;

2
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/aspect/DataFilterAspect.java

@ -1,8 +1,8 @@
package com.epmet.commons.mybatis.aspect;
import com.epmet.commons.mybatis.annotation.DataFilter;
import com.epmet.commons.mybatis.dto.form.GetSQLFilterFormDTO;
import com.epmet.commons.mybatis.feign.MybatisGovAccessFeignClient;
import com.epmet.commons.mybatis.dto.form.*;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.ThreadLocalConstant;
import com.epmet.commons.tools.exception.RenException;

3
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/dto/form/StaffPermissionFormDTO.java

@ -2,9 +2,6 @@ package com.epmet.commons.mybatis.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Set;
@Data
public class StaffPermissionFormDTO {

6
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/MybatisGovAccessFeignClient.java

@ -1,17 +1,13 @@
package com.epmet.commons.mybatis.feign;
import com.epmet.commons.mybatis.dto.form.*;
import com.epmet.commons.mybatis.dto.form.GetSQLFilterFormDTO;
import com.epmet.commons.mybatis.feign.fallback.MybatisGovAccessFeignClientFallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Set;
/**
* @Description
* @Author sun

3
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/MybatisGovOrgFeignClient.java

@ -1,6 +1,6 @@
package com.epmet.commons.mybatis.feign;
import com.epmet.commons.mybatis.dto.form.*;
import com.epmet.commons.mybatis.dto.form.DepartmentListResultDTO;
import com.epmet.commons.mybatis.feign.fallback.MybatisGovOrgFeignClientFallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.List;
import java.util.Set;
/**
* @Description

7
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/fallback/MybatisGovAccessFeignClientFallback.java

@ -1,16 +1,11 @@
package com.epmet.commons.mybatis.feign.fallback;
import com.epmet.commons.mybatis.dto.form.*;
import com.epmet.commons.mybatis.dto.form.GetSQLFilterFormDTO;
import com.epmet.commons.mybatis.feign.MybatisGovAccessFeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 调用政府端权限

3
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/fallback/MybatisGovOrgFeignClientFallback.java

@ -1,6 +1,6 @@
package com.epmet.commons.mybatis.feign.fallback;
import com.epmet.commons.mybatis.dto.form.*;
import com.epmet.commons.mybatis.dto.form.DepartmentListResultDTO;
import com.epmet.commons.mybatis.feign.MybatisGovOrgFeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
@ -8,7 +8,6 @@ import com.epmet.commons.tools.utils.Result;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Set;
/**
* 调用政府端权限

1
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/interceptor/DataFilterInterceptor.java

@ -10,7 +10,6 @@ package com.epmet.commons.mybatis.interceptor;
import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
import com.baomidou.mybatisplus.extension.handlers.AbstractSqlParserHandler;
import com.epmet.commons.mybatis.aspect.DataFilterAspect;
import com.epmet.commons.tools.constant.ThreadLocalConstant;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.executor.statement.StatementHandler;

3
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java

@ -1,11 +1,8 @@
package com.epmet.commons.rocketmq.messages;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 组织网格人员中间库数据上报MQ

1
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/register/MQAbstractRegister.java

@ -4,7 +4,6 @@ import com.epmet.commons.tools.exception.ExceptionUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer;
import org.apache.rocketmq.client.consumer.listener.MessageListener;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.common.protocol.heartbeat.MessageModel;
/**

1
epmet-commons/epmet-commons-security/src/main/java/com/epmet/commons/security/jwt/JwtUtils.java

@ -14,7 +14,6 @@ import io.jsonwebtoken.SignatureAlgorithm;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;

1
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/DemoApp.java

@ -2,7 +2,6 @@ package com.epmet.commons.thirdplat;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.thirdplat.dto.form.jcet.SsoTicketFormDTO;
import com.epmet.commons.thirdplat.dto.form.jcet.SsoTokenFormDTO;
import com.epmet.commons.thirdplat.encrypt.SignUtils;
import java.io.UnsupportedEncodingException;

7
epmet-commons/epmet-commons-tools-wx-mp/src/main/java/com/epmet/wx/mp/handler/ScanHandler.java

@ -1,14 +1,13 @@
package com.epmet.wx.mp.handler;
import java.util.Map;
import org.springframework.stereotype.Component;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.session.WxSessionManager;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
import org.springframework.stereotype.Component;
import java.util.Map;
/**
* @author Binary Wang(https://github.com/binarywang)

7
epmet-commons/epmet-commons-tools-wx-mp/src/main/java/com/epmet/wx/mp/handler/SubscribeHandler.java

@ -1,16 +1,15 @@
package com.epmet.wx.mp.handler;
import java.util.Map;
import com.epmet.wx.mp.builder.TextBuilder;
import org.springframework.stereotype.Component;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.session.WxSessionManager;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
import me.chanjar.weixin.mp.bean.result.WxMpUser;
import org.springframework.stereotype.Component;
import java.util.Map;
/**
* @author Binary Wang(https://github.com/binarywang)

2
epmet-commons/epmet-commons-tools/pom.xml

@ -24,7 +24,7 @@
<gson.version>2.8.6</gson.version>
<jsoup.version>1.11.3</jsoup.version>
<lombok.version>1.18.4</lombok.version>
<easyexcel.version>3.0.3</easyexcel.version>
<easyexcel.version>3.0.5</easyexcel.version>
</properties>
<dependencies>

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/annotation/MaskResponse.java

@ -1,10 +1,6 @@
package com.epmet.commons.tools.annotation;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import javassist.runtime.Inner;
import java.lang.annotation.*;
import java.util.function.Function;
/**
* 标记一个接口它的返回值中的某些字段需要打掩码

6
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/AsyncConfig.java

@ -1,7 +1,6 @@
package com.epmet.commons.tools.config;
import com.alibaba.ttl.TtlRunnable;
import com.alibaba.ttl.threadpool.TtlExecutors;
import org.slf4j.MDC;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@ -10,7 +9,10 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.Map;
import java.util.concurrent.*;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
/**
* 线程池配置类

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ThreadLocalConstant.java

@ -1,7 +1,5 @@
package com.epmet.commons.tools.constant;
import java.util.Map;
/**
* ThreadLocal常亮
*/

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/GenderEnum.java

@ -2,6 +2,8 @@ package com.epmet.commons.tools.enums;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import java.util.Objects;
public enum GenderEnum {
MAN("1", "男"),
WOMAN("2", "女"),
@ -19,7 +21,7 @@ public enum GenderEnum {
public static String getName(String code) {
GenderEnum[] genderEnums = values();
for (GenderEnum genderEnum : genderEnums) {
if (genderEnum.getCode() == code) {
if (Objects.equals(genderEnum.getCode(), code)) {
return genderEnum.getName();
}
}

43
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/IcResiUserSubStatusEnum.java

@ -0,0 +1,43 @@
package com.epmet.commons.tools.enums;
/**
* 用户详细状态01新增02导入03迁入04新生11迁出21死亡 未完待续
*/
public enum IcResiUserSubStatusEnum {
/**
* 环境变量枚举
*/
ADD("01", "新增"),
IMPORT("02", "导入"),
MOVE_IN("03", "迁入"),
BIRTH("04", "新生"),
MOVE_OUT("11", "迁出"),
DIED("21", "死亡");
private final String subStatus;
private final String statusDesc;
IcResiUserSubStatusEnum(String subStatus, String statusDesc) {
this.subStatus = subStatus;
this.statusDesc = statusDesc;
}
public static IcResiUserSubStatusEnum getEnum(String subStatus) {
IcResiUserSubStatusEnum[] values = IcResiUserSubStatusEnum.values();
for (IcResiUserSubStatusEnum value : values) {
if (value.getSubStatus().equals(subStatus)) {
return value;
}
}
return IcResiUserSubStatusEnum.ADD;
}
public String getSubStatus() {
return subStatus;
}
public String getStatusDesc() {
return statusDesc;
}
}

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -254,6 +254,7 @@ public enum EpmetErrorCode {
IC_NAT_IDCARD_NATTIME(8923,"已存在相同记录"),
IC_NAT(8924,"平台已存在记录,请去修改原有记录"),
RESI_IC_NAT(8925,"已存在记录,请联系社区工作人员修改"),
IC_MOVE_IN(8926,"居民信息中房屋信息与当前选择房屋不一致,是否更新?"),
//通用错误码 start

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/EpmetBaseRequestInterceptor.java

@ -25,7 +25,7 @@ public class EpmetBaseRequestInterceptor implements RequestInterceptor {
// Map<String, String> requestHeaders = getHeadersFromRequest();
log.info("EpmetBaseRequestInterceptor#apply#inheritableAdditionalHeaders:" + requestHeaders);
log.debug("EpmetBaseRequestInterceptor#apply#inheritableAdditionalHeaders:" + requestHeaders);
if (requestHeaders != null && requestHeaders.size() > 0) {
for (Map.Entry<String, String> kv : requestHeaders.entrySet()) {
@ -59,4 +59,4 @@ public class EpmetBaseRequestInterceptor implements RequestInterceptor {
return headers;
}
}
}

11
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java

@ -13,8 +13,10 @@ import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
/**
* desc:脱敏处理器
*/
@Slf4j
public class MaskProcessor {
@ -42,20 +44,15 @@ public class MaskProcessor {
if (object instanceof Result) {
mask(((Result<?>) object).getData());
return;
} else if (object instanceof PageData) {
mask(((PageData<?>) object).getList());
return;
} else if (object instanceof List) {
((List)object).forEach(e -> mask(e));
return;
} else if (object instanceof Map) {
maskMap((Map) object);
return;
} else if (object.getClass().getName().startsWith(EPMET_PACKAGE_PREFIX)) {
// 自定义bean,走反射
maskEpmetBean(object);
return;
}
}
@ -77,14 +74,12 @@ public class MaskProcessor {
if (value != null && value.getClass().getName().startsWith(EPMET_PACKAGE_PREFIX)) {
// 是epmet的对象
maskEpmetBean(value);
continue;
} else if (value instanceof String) {
int index = fieldNames.indexOf(key);
if (index != -1) {
String maskResult = maskString((String) value, fieldsMaskType.get(index));
entry.setValue(maskResult);
}
continue;
}
}
}

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/config/WebMvcConfig.java

@ -9,12 +9,12 @@
package com.epmet.commons.tools.security.config;
import com.epmet.commons.tools.security.resolver.LoginUserHandlerMethodArgumentResolver;
import com.epmet.commons.tools.security.resolver.UserDetailHandlerMethodArgumentResolver;
import com.epmet.commons.tools.utils.DateUtils;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.epmet.commons.tools.security.resolver.UserDetailHandlerMethodArgumentResolver;
import com.epmet.commons.tools.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/GovTokenDto.java

@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
import lombok.Data;
import java.io.Serializable;
import java.util.Comparator;
import java.util.List;
import java.util.Set;

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/password/BCrypt.java

@ -1,8 +1,6 @@
package com.epmet.commons.tools.security.password;
import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;

5
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java

@ -27,17 +27,12 @@ import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.support.WebDataBinderFactory;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer;
import org.springframework.web.servlet.HandlerMapping;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* @LoginUser注解的方法参数注入当前登录用户

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/EpmetRequestHolder.java

@ -1,7 +1,6 @@
package com.epmet.commons.tools.utils;
import com.alibaba.ttl.TransmittableThreadLocal;
import com.epmet.commons.tools.constant.StrConstant;
import org.apache.commons.lang3.StringUtils;
import java.util.HashMap;

63
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java

@ -64,6 +64,36 @@ public class ExcelUtils {
out.close();
}
/**
* Excel导出
*
* @param response response
* @param fileName 文件名
* @param list 数据List
* @param pojoClass 对象Class
*/
public static void exportExcelEpmet(HttpServletResponse response, String fileName, Collection<?> list,
Class<?> pojoClass) throws IOException {
if(StringUtils.isBlank(fileName)){
//当前日期
fileName = DateUtils.format(new Date());
}
ExportParams exportParams = new ExportParams();
//设置导出的样式
exportParams.setStyle(EasyPoiExcelExportStylerImpl.class);
//设置sheet名称
exportParams.setSheetName("Sheet1");
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
Sheet sheet1 = workbook.getSheetAt(0);
sheet1.setDefaultColumnWidth(50*256);
//sheet1.setDefaultRowHeight((short)(2*256));
ServletOutputStream out = ExcelUtils.getOutputStreamForExcelEpmet(fileName,response);
workbook.write(out);
out.flush();
out.close();
}
/**
* Excel导出先sourceList转换成List<targetClass>再导出
*
@ -84,6 +114,26 @@ public class ExcelUtils {
exportExcel(response, fileName, targetList, targetClass);
}
/**
* Excel导出先sourceList转换成List<targetClass>再导出
*
* @param response response
* @param fileName 文件名
* @param sourceList 原数据List
* @param targetClass 目标对象Class
*/
public static void exportEpmetExcel(HttpServletResponse response, String fileName, Collection<?> sourceList,
Class<?> targetClass) throws Exception {
List<Object> targetList = new ArrayList<>(sourceList.size());
for(Object source : sourceList){
Object target = targetClass.newInstance();
BeanUtils.copyProperties(source, target);
targetList.add(target);
}
exportExcelEpmet(response, fileName, targetList, targetClass);
}
public static ServletOutputStream getOutputStreamForExcel(String fileName, HttpServletResponse response) throws IOException {
fileName = URLEncoder.encode(fileName, "UTF-8");
if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")){
@ -97,6 +147,19 @@ public class ExcelUtils {
return response.getOutputStream();
}
public static ServletOutputStream getOutputStreamForExcelEpmet(String fileName, HttpServletResponse response) throws IOException {
fileName = URLEncoder.encode(fileName, "UTF-8");
if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")){
fileName = fileName + ".xls";
}
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf8");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
response.addHeader("Access-Control-Expose-Headers", "Content-disposition");
return response.getOutputStream();
}
/**
* desc:easypoi导出多个sheet
* @param fileName

35
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java

@ -143,6 +143,41 @@ public class HttpClientManager {
}
/**
* desc: 发送json post 请求
* param: url,jsonStrParam
* return: CallResult<String>
* date: 2019/2/21 9:12
*
* @author: jianjun liu
*/
public Result<String> sendPostAndHeader(String url, Map<String, Object> paramsMap, Map<String,String> headerMap) {
try {
HttpPost httppost = new HttpPost(url);
httppost.setConfig(requestConfig);
httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_FORM_URL_ENCODED);
if (null != headerMap){
headerMap.forEach((k,v) -> {
httppost.addHeader(k,v);
});
}
List<NameValuePair> list = new ArrayList<NameValuePair>();
for (String key : paramsMap.keySet()) {
list.add(new BasicNameValuePair(key, String.valueOf(paramsMap.get(key))));
}
UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(list, UTF8);
httppost.setEntity(urlEncodedFormEntity);
return execute(httppost, false);
} catch (Exception e) {
log.error("send exception", e);
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
/**
* desc: 发送json post 请求
* param: url,jsonStrParam

3
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ModuleUtils.java

@ -2,13 +2,10 @@ package com.epmet.commons.tools.utils;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.CharEncoding;
import org.springframework.util.Base64Utils;
import org.springframework.util.StringUtils;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/TreeStringNode.java

@ -8,7 +8,6 @@
package com.epmet.commons.tools.utils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;

17
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillCellMergeStrategy.java

@ -28,6 +28,10 @@ public class ExcelFillCellMergeStrategy implements CellWriteHandler {
* 从下标n行开始合并
*/
private int mergeRowIndex;
/**
* 默认隐藏第一列 用于合并数据
*/
private boolean hiddenFirst = true;
public ExcelFillCellMergeStrategy() {
}
@ -36,6 +40,11 @@ public class ExcelFillCellMergeStrategy implements CellWriteHandler {
this.mergeRowIndex = mergeRowIndex;
this.mergeColumnIndexArr = mergeColumnIndexArr;
}
public ExcelFillCellMergeStrategy(int mergeRowIndex, int[] mergeColumnIndexArr,boolean hiddenFirst) {
this.mergeRowIndex = mergeRowIndex;
this.mergeColumnIndexArr = mergeColumnIndexArr;
this.hiddenFirst = hiddenFirst;
}
@Override
public void beforeCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Head head, Integer columnIndex, Integer relativeRowIndex, Boolean isHead) {
@ -45,7 +54,9 @@ public class ExcelFillCellMergeStrategy implements CellWriteHandler {
@Override
public void afterCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) {
// 隐藏id列
writeSheetHolder.getSheet().setColumnHidden(0, true);
if (hiddenFirst ){
writeSheetHolder.getSheet().setColumnHidden(0, true);
}
}
@Override
@ -91,9 +102,9 @@ public class ExcelFillCellMergeStrategy implements CellWriteHandler {
// 将当前单元格数据与上一个单元格数据比较
Boolean dataBool = preData.equals(curData);
//此处需要注意:因为我是按照序号确定是否需要合并的,所以获取每一行第一列数据和上一行第一列数据进行比较,如果相等合并
Boolean bool = cell.getRow().getCell(0).getStringCellValue().equals(cell.getSheet().getRow(curRowIndex - 1).getCell(0).getStringCellValue());
if (!dataBool || !bool) {
if (!dataBool) {
return;
}
Sheet sheet = writeSheetHolder.getSheet();

162
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillRowMergeStrategy.java

@ -0,0 +1,162 @@
package com.epmet.commons.tools.utils.poi.excel.handler;
import com.alibaba.excel.write.handler.RowWriteHandler;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCell;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMergeCells;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheet;
import java.lang.reflect.Field;
/**
* desc:按行对单元格合并策略 依据是第一列的值
*
* @author liujianjun
*/
@Slf4j
public class ExcelFillRowMergeStrategy implements RowWriteHandler {
/**
* 分段总数据量 本批次写入的数据总量
*/
private Integer secTotalCount;
/**
* 需要合并的列 下标
*/
private int[] mergeColumnIndexArr;
/**
* 默认隐藏第一列 用于合并数据
*/
private boolean hiddenFirst = true;
//已合并单元格数
private int mergedTotalCount = 0;
//合并行计数
private int count;
public ExcelFillRowMergeStrategy(int[] mergeColumnIndexArr) {
this.mergeColumnIndexArr = mergeColumnIndexArr;
}
public ExcelFillRowMergeStrategy(int[] mergeColumnIndexArr, boolean hiddenFirst) {
this.mergeColumnIndexArr = mergeColumnIndexArr;
this.hiddenFirst = hiddenFirst;
}
@Override
public void beforeRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Integer rowIndex, Integer relativeRowIndex, Boolean isHead) {
}
@Override
public void afterRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Integer relativeRowIndex, Boolean isHead) {
// 隐藏id列
if (hiddenFirst) {
writeSheetHolder.getSheet().setColumnHidden(0, true);
}
}
@Override
public void afterRowDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Integer relativeRowIndex, Boolean isHead) {
//当前行索引
int curRowNum = row.getRowNum();
if (mergeColumnIndexArr != null && mergeColumnIndexArr.length > 0 && !isHead) {
//当前行第一列单元格
Cell curA1Cell = row.getCell(0);
Object curA1Data = curA1Cell.getCellType() == CellType.STRING ? curA1Cell.getStringCellValue() : curA1Cell.getNumericCellValue();
//上一行第一列单元格
Cell preA1Cell = row.getSheet().getRow(curRowNum - 1).getCell(0);
Object preA1Data = preA1Cell.getCellType() == CellType.STRING ? preA1Cell.getStringCellValue() : preA1Cell.getNumericCellValue();
log.info("curRowNum:{},是否相等:{}",curRowNum,curA1Data.equals(preA1Data));
if (curA1Data.equals(preA1Data)){
count ++;
log.info("需要合并的列数:{}",count);
}else {
if (count > 0){
log.info("需要合并了");
for (int i = 0; i < mergeColumnIndexArr.length; i++) {
mergeSomeRow(writeSheetHolder,curRowNum,count,i);
}
count = 0;
}
}
if (curRowNum == secTotalCount && count > 0){
for (int i = 0; i < mergeColumnIndexArr.length; i++) {
mergeSomeRow(writeSheetHolder,curRowNum + 1,count,i);
}
}
}
}
/*private void mergeSameRow(WriteSheetHolder writeSheetHolder, int curRowIndex, int curColIndex) {
Sheet sheet = writeSheetHolder.getSheet();
List<CellRangeAddress> mergeRegions = sheet.getMergedRegions();
boolean isMerged = false;
for (int i = 0; i < mergeRegions.size() && !isMerged; i++) {
CellRangeAddress cellRangeAddr = mergeRegions.get(i);
// 若上一个单元格已经被合并,则先移出原有的合并单元,再重新添加合并单元
if (cellRangeAddr.isInRange(curRowIndex - 1, curColIndex)) {
sheet.removeMergedRegion(i);
cellRangeAddr.setLastRow(curRowIndex);
sheet.addMergedRegionUnsafe(cellRangeAddr);
isMerged = true;
}
}
// 若上一个单元格未被合并,则新增合并单元
if (!isMerged) {
CellRangeAddress cellRangeAddress = new CellRangeAddress(curRowIndex - 1, curRowIndex, curColIndex, curColIndex);
sheet.addMergedRegionUnsafe(cellRangeAddress);
}
}
*/
/**
* 按列合并单元格
* @param writeSheetHolder
* @param curRowIndex 当前行索引有n行固定行就加n
* @param needMergeNum 需要合并的行数
* @param curColIndex 需要合并的列
*/
private void mergeSomeRow(WriteSheetHolder writeSheetHolder, int curRowIndex, int needMergeNum, int curColIndex) {
Sheet sheet = writeSheetHolder.getSheet();
try {
CellRangeAddress cellAddresses = new CellRangeAddress(curRowIndex - needMergeNum - 1, curRowIndex-1, curColIndex, curColIndex);
Field sh = sheet.getClass().getDeclaredField("_sh");
sh.setAccessible(true);
XSSFSheet shSheet = (XSSFSheet)sh.get(sheet);
CTWorksheet worksheet = shSheet.getCTWorksheet();
CTMergeCells ctMergeCells = mergedTotalCount > 0 ? worksheet.getMergeCells() : worksheet.addNewMergeCells();
CTMergeCell ctMergeCell = ctMergeCells.addNewMergeCell();
ctMergeCell.setRef(cellAddresses.formatAsString());
mergedTotalCount ++;
} catch (Exception e) {
e.printStackTrace();
}
}
public void setSecTotalCount(Integer secTotalCount) {
this.secTotalCount = secTotalCount;
}
}

105
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillRowMergeStrategy2.java

@ -0,0 +1,105 @@
package com.epmet.commons.tools.utils.poi.excel.handler;
import com.alibaba.excel.write.handler.RowWriteHandler;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.util.CellRangeAddress;
import java.util.List;
/**
* desc:按行对单元格合并策略 依据是第一列的值
*
* @author liujianjun
*/
@Slf4j
public class ExcelFillRowMergeStrategy2 implements RowWriteHandler {
/**
* 需要合并的列 下标
*/
private int[] mergeColumnIndexArr;
/**
* 从下标n行开始合并
*/
private int mergeRowIndex;
/**
* 默认隐藏第一列 用于合并数据
*/
private boolean hiddenFirst = true;
public ExcelFillRowMergeStrategy2(int mergeRowIndex, int[] mergeColumnIndexArr) {
this.mergeRowIndex = mergeRowIndex;
this.mergeColumnIndexArr = mergeColumnIndexArr;
}
public ExcelFillRowMergeStrategy2(int mergeRowIndex, int[] mergeColumnIndexArr, boolean hiddenFirst) {
this.mergeRowIndex = mergeRowIndex;
this.mergeColumnIndexArr = mergeColumnIndexArr;
this.hiddenFirst = hiddenFirst;
}
@Override
public void beforeRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Integer rowIndex, Integer relativeRowIndex, Boolean isHead) {
}
@Override
public void afterRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Integer relativeRowIndex, Boolean isHead) {
// 隐藏id列
if (hiddenFirst) {
writeSheetHolder.getSheet().setColumnHidden(0, true);
}
}
@Override
public void afterRowDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Integer relativeRowIndex, Boolean isHead) {
//当前行索引
int curRowNum = row.getRowNum();
if (mergeColumnIndexArr != null && mergeColumnIndexArr.length > 0 && !isHead) {
//当前行第一列单元格
Cell curA1Cell = row.getCell(0);
Object curA1Data = curA1Cell.getCellType() == CellType.STRING ? curA1Cell.getStringCellValue() : curA1Cell.getNumericCellValue();
//上一行第一列单元格
Cell preA1Cell = row.getSheet().getRow(curRowNum - 1).getCell(0);
Object preA1Data = preA1Cell.getCellType() == CellType.STRING ? preA1Cell.getStringCellValue() : preA1Cell.getNumericCellValue();
if (curA1Data.equals(preA1Data)) {
for (int value : mergeColumnIndexArr) {
mergeSameRow(writeSheetHolder, curRowNum, value);
}
}
}
}
private void mergeSameRow(WriteSheetHolder writeSheetHolder, int curRowIndex, int curColIndex) {
Sheet sheet = writeSheetHolder.getSheet();
List<CellRangeAddress> mergeRegions = sheet.getMergedRegions();
boolean isMerged = false;
for (int i = 0; i < mergeRegions.size() && !isMerged; i++) {
CellRangeAddress cellRangeAddr = mergeRegions.get(i);
// 若上一个单元格已经被合并,则先移出原有的合并单元,再重新添加合并单元
if (cellRangeAddr.isInRange(curRowIndex - 1, curColIndex)) {
sheet.removeMergedRegion(i);
cellRangeAddr.setLastRow(curRowIndex);
sheet.addMergedRegionUnsafe(cellRangeAddr);
isMerged = true;
}
}
// 若上一个单元格未被合并,则新增合并单元
if (!isMerged) {
CellRangeAddress cellRangeAddress = new CellRangeAddress(curRowIndex - 1, curRowIndex, curColIndex, curColIndex);
sheet.addMergedRegionUnsafe(cellRangeAddress);
}
}
}

99
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/IdCardNoValidatorUtils.java

@ -1,16 +1,20 @@
package com.epmet.commons.tools.validator;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Hashtable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static java.util.regex.Pattern.*;
import static java.util.regex.Pattern.compile;
/**
* 身份证号校验
@ -22,6 +26,15 @@ public class IdCardNoValidatorUtils {
private static Logger logger = LoggerFactory.getLogger(IdCardNoValidatorUtils.class);
/**
* 15位身份证号
*/
private static final Integer FIFTEEN_ID_CARD = 15;
/**
* 18位身份证号
*/
private static final Integer EIGHTEEN_ID_CARD = 18;
/**
* 身份证验证
*
@ -199,5 +212,89 @@ public class IdCardNoValidatorUtils {
return gender;
}
/**
* 根据身份证号获取年龄
*
* @param IDCard 完整身份证号码
* @return java.lang.Integer
* @author work@yujt.net.cn
* @date 2019/9/20 14:26
*/
public static Integer getAge(String IDCard) {
int age;
LocalDate now = LocalDate.now();
int nowYear = now.getYear();
int nowMonth = now.getMonthValue();
int cardYear = 0;
int cardMonth = 0;
if (StringUtils.isNotBlank(IDCard) && isValid(IDCard)) {
if (IDCard.length() == FIFTEEN_ID_CARD) {
// 身份证上的年份(15位身份证为1980年前的)
String uyear = "19" + IDCard.substring(6, 8);
cardYear = Integer.parseInt(uyear);
// 身份证上的月份
String uyue = IDCard.substring(8, 10);
cardMonth = Integer.parseInt(uyue);
} else if (IDCard.length() == EIGHTEEN_ID_CARD) {
// 身份证上的年份
String year = IDCard.substring(6).substring(0, 4);
cardYear = Integer.parseInt(year);
// 身份证上的月份
String yue = IDCard.substring(10).substring(0, 2);
cardMonth = Integer.parseInt(yue);
}
}
// 当前月份大于用户出身的月份表示已过生日
if (cardMonth <= nowMonth) {
age = nowYear - cardYear + 1;
// 当前用户还没过生
} else {
age = nowYear - cardYear;
}
return age;
}
/**
* 身份证验证是否有效
*
* @param id 号码内容
* @return boolean
* @author
* @date
*/
public static boolean isValid(String id) {
Boolean validResult = true;
//校验长度只能为15或18
int len = id.length();
if (len != FIFTEEN_ID_CARD && len != EIGHTEEN_ID_CARD) {
validResult = false;
}
//校验生日
if (!validDate(id)) {
validResult = false;
}
return validResult;
}
/**
* 校验生日
*
* @param id
* @return
*/
private static boolean validDate(String id) {
try {
String birth = id.length() == FIFTEEN_ID_CARD ? "19" + id.substring(6, 12) : id.substring(6, 14);
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
Date birthDate = sdf.parse(birth);
if (!birth.equals(sdf.format(birthDate))) {
return false;
}
} catch (ParseException e) {
return false;
}
return true;
}
}

8
epmet-gateway/src/main/java/com/epmet/auth/AuthProcessor.java

@ -1,15 +1,7 @@
package com.epmet.auth;
import com.alibaba.fastjson.JSON;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.nio.charset.StandardCharsets;
public abstract class AuthProcessor {

4
epmet-gateway/src/main/java/com/epmet/filter/AuthFilter.java

@ -9,18 +9,16 @@
package com.epmet.filter;
import com.alibaba.fastjson.JSON;
import com.epmet.feign.ResourceFeignClient;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.security.user.UserDetail;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.ResourceFeignClient;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;

3
epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java

@ -9,7 +9,8 @@ import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.Arrays;
import java.util.List;
/**
* app接口权限过滤器

1
epmet-gateway/src/main/java/com/epmet/healthcheck/HealthCheckController.java

@ -1,7 +1,6 @@
package com.epmet.healthcheck;
import com.epmet.commons.tools.utils.Result;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

2
epmet-gateway/src/main/java/com/epmet/jwt/JwtTokenUtils.java

@ -11,14 +11,12 @@ package com.epmet.jwt;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.apache.commons.codec.binary.Base64;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

1
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/datastats/form/AgenctBasicDataFormDTO.java

@ -1,7 +1,6 @@
package com.epmet.dataaggre.dto.datastats.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import com.epmet.dataaggre.dto.resigroup.form.CandidateListFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;

7
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/AcUserAuthorizeDTO.java

@ -1,8 +1,9 @@
package com.epmet.dataaggre.dto.epmettduck;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -17,7 +18,7 @@ public class AcUserAuthorizeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*
*/
private String id;
@ -82,4 +83,4 @@ public class AcUserAuthorizeDTO implements Serializable {
*/
private Date updatedTime;
}
}

7
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/AcUserDTO.java

@ -17,9 +17,10 @@
package com.epmet.dataaggre.dto.epmettduck;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -34,7 +35,7 @@ public class AcUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*
*/
private String id;
@ -118,4 +119,4 @@ public class AcUserDTO implements Serializable {
*/
private Date updatedTime;
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save