Browse Source

Merge branches 'dev' and 'wxz_thread_var_clean' of http://git.elinkit.com.cn:7070/r/epmet-cloud into wxz_thread_var_clean

dev_shibei_match
wxz 4 years ago
parent
commit
07823edf01
  1. 6
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java
  2. 2
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java
  3. 20
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallbackFactory.java
  4. 2
      epmet-auth/src/main/java/com/epmet/controller/AuthController.java
  5. 4
      epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java
  6. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java
  7. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/config/WebMvcConfig.java
  8. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java
  9. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java
  10. 19
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBackFactory.java
  11. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java
  12. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java
  13. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml
  14. 1
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  15. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBackFactory.java
  16. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java
  17. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java
  18. 35
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java
  19. 54
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java
  20. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java
  21. 29
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java
  22. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java
  23. 36
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java
  24. 47
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml
  25. 20
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml
  26. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml
  27. 5
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java
  28. 2
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java
  29. 20
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallbackFactory.java
  30. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
  31. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
  32. 20
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallbackFactory.java
  33. 3
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/EpmetMessageOpenFeignClient.java
  34. 2
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallback.java
  35. 20
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallbackFactory.java
  36. 9
      epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/OssFeignClient.java
  37. 2
      epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/fallback/OssFeignClientFallback.java
  38. 20
      epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/fallback/OssFeignClientFallbackFactory.java
  39. 3
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java
  40. 2
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java
  41. 20
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallbackFactory.java
  42. 5
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java
  43. 5
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java
  44. 2
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java
  45. 18
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallbackFactory.java
  46. 2
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java
  47. 20
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallbackFactory.java
  48. 10
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java
  49. 6
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java
  50. 2
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java
  51. 28
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBackFactory.java
  52. 7
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java
  53. 5
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  54. 2
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  55. 20
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBackFactory.java
  56. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  57. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  58. 20
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallbackFactory.java
  59. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  60. 5
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  61. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  62. 20
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallbackFactory.java
  63. 3
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/feign/GovVoiceOpenFeignClient.java
  64. 2
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/feign/fallback/GovVoiceOpenFeignClientFallback.java
  65. 20
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/feign/fallback/GovVoiceOpenFeignClientFallbackFactory.java
  66. 3
      epmet-module/oper-access/oper-access-client/src/main/java/com/epmet/feign/OperAccessOpenFeignClient.java
  67. 2
      epmet-module/oper-access/oper-access-client/src/main/java/com/epmet/feign/fallback/OperAccessOpenFeignClientFallback.java
  68. 19
      epmet-module/oper-access/oper-access-client/src/main/java/com/epmet/feign/fallback/OperAccessOpenFeignClientFallbackFactory.java
  69. 5
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java
  70. 2
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java
  71. 20
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallbackFactory.java
  72. 3
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java
  73. 2
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java
  74. 20
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallbackFactory.java
  75. 2
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml
  76. 5
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
  77. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java
  78. 20
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallbackFactory.java
  79. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java
  80. 1
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupCodeDao.xml
  81. 5
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java
  82. 2
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java
  83. 20
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallbackFactory.java
  84. 4
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java
  85. 3
      epmet-module/resi-voice/resi-voice-client/src/main/java/com/epmet/feign/ResiVoiceOpenFeignClient.java
  86. 2
      epmet-module/resi-voice/resi-voice-client/src/main/java/com/epmet/feign/fallback/ResiVoiceOpenFeignClientFallback.java
  87. 18
      epmet-module/resi-voice/resi-voice-client/src/main/java/com/epmet/feign/fallback/ResiVoiceOpenFeignClientFallbackFactory.java
  88. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  89. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
  90. 18
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallbackFactory.java
  91. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java
  92. 20
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java
  93. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java
  94. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml
  95. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml

6
epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java

@ -3,14 +3,14 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.CorsConfigResultDTO;
import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallback;
import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.List;
@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallback = EpmetAdminOpenFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallback = EpmetAdminOpenFeignClientFallback.class, url = "localhost:8082")
@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class)
//@FeignClient(name = ServiceConstant.EPMET_ADMIN_SERVER, fallbackFactory = EpmetAdminOpenFeignClientFallbackFactory.class, url = "localhost:8082")
public interface EpmetAdminOpenFeignClient {
/**

2
epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java

@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
//@Component
public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignClient {
@Override
public Result<List<CorsConfigResultDTO>> list() {

20
epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class EpmetAdminOpenFeignClientFallbackFactory implements FallbackFactory<EpmetAdminOpenFeignClient> {
private EpmetAdminOpenFeignClientFallback fallback = new EpmetAdminOpenFeignClientFallback();
@Override
public EpmetAdminOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

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

@ -15,7 +15,9 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.AuthorizationDTO;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.LoginDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.AuthService;
import com.epmet.service.CaptchaService;
import com.epmet.service.ResourceService;

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

@ -486,7 +486,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
dto.setMobile(formDTO.getMobile());
Result<List<CustomerStaffDTO>> customerStaffResult = epmetUserOpenFeignClient.getCustsomerStaffByIdAndPhone(dto);
if (!customerStaffResult.success()) {
logger.error(String.format("手机密码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg()));
logger.warn(String.format("手机密码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg()));
throw new RenException(customerStaffResult.getCode());
}
//2、密码是否正确
@ -529,7 +529,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
if(result.success()&&null!=result.getData()){
return result.getData();
}
logger.error(String .format("手机验证码获取组织,调用%s服务失败,入参手机号%s,密码%s,返回错误码%s,错误提示信息%s",
logger.warn(String .format("手机验证码获取组织,调用%s服务失败,入参手机号%s,密码%s,返回错误码%s,错误提示信息%s",
ServiceConstant.GOV_ORG_SERVER,
formDTO.getMobile(),
formDTO.getPassword(),

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java

@ -208,7 +208,7 @@ public class LogMsgSendFilter extends LevelFilter {
return slashMatcher.start();
} catch (Exception e) {
logger.warn("getCharacterPosition no matche", e);
return 0;
return string.length();
}
}

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

@ -66,7 +66,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
//日期格式转换
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.setDateFormat(new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE));
mapper.setDateFormat(new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN));
mapper.setTimeZone(TimeZone.getTimeZone("GMT+8"));
//Long类型转String类型

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/DataReportOpenFeignClient.java

@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.feign.impl.DataReportOpenFeignClientFallBack;
import com.epmet.feign.impl.DataReportOpenFeignClientFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -14,8 +15,8 @@ import org.springframework.web.bind.annotation.PathVariable;
* @author yinzuomei@elink-cn.com
* @date 2021/2/3 22:05
*/
// @FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallback = DataReportOpenFeignClientFallBack.class,url = "localhost:8109")
@FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallback = DataReportOpenFeignClientFallBack.class)
//@FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallbackFactory = DataReportOpenFeignClientFallBackFactory.class,url = "localhost:8109")
@FeignClient(name = ServiceConstant.DATA_REPORT_SERVER, fallbackFactory = DataReportOpenFeignClientFallBackFactory.class)
public interface DataReportOpenFeignClient {
/**
* @param agencyId

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBack.java

@ -7,7 +7,7 @@ import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.feign.DataReportOpenFeignClient;
import org.springframework.stereotype.Component;
@Component
//@Component
public class DataReportOpenFeignClientFallBack implements DataReportOpenFeignClient {
/**
* @param agencyId

19
epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBackFactory.java

@ -0,0 +1,19 @@
package com.epmet.feign.impl;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.DataReportOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class DataReportOpenFeignClientFallBackFactory implements FallbackFactory<DataReportOpenFeignClient> {
private DataReportOpenFeignClientFallBack fallback = new DataReportOpenFeignClientFallBack();
@Override
public DataReportOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java

@ -62,7 +62,9 @@ public interface ScreenWorkRecordOrgDailyDao extends BaseDao<ScreenWorkRecordOrg
List<String> selectCustomerTypeCode(@Param("dataType")String dataType, @Param("customerId")String customerId);
WorkRecordSubRank selectUpToCalAgency(@Param("agencyId")String agencyId, @Param("dateId")String dateId,@Param("typeCodeList") List<String> typeCodeList);
WorkRecordSubRank selectUpToCalAgency(@Param("agencyId")String agencyId,
@Param("dateId")String dateId,
@Param("typeCodeList") List<String> typeCodeList);
WorkRecordSubRank selectUpToCalGrid(@Param("gridId")String gridId, @Param("dateId")String dateId, @Param("typeCodeList")List<String> typeCodeList);
}

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java

@ -118,6 +118,9 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
for(ScreenCustomerAgencyCommonDTO agencyCommonDTO:agencyInfoDTO.getSubAgencies()){
WorkRecordSubRank agencyRes= baseDao.selectUpToCalAgency(agencyCommonDTO.getAgencyId(),dateId,typeCodeList);
if(null !=agencyRes){
agencyRes.setOrgId(agencyCommonDTO.getAgencyId());
agencyRes.setName(agencyCommonDTO.getAgencyName());
agencyRes.setIsDefault("no");
subAgencyRankList.add(agencyRes);
}else{
WorkRecordSubRank agencyDefault=new WorkRecordSubRank();
@ -135,6 +138,7 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
for(ScreenCustomerGridCommonDTO gridCommonDTO:agencyInfoDTO.getSubGrids()){
WorkRecordSubRank gridRes=baseDao.selectUpToCalGrid(gridCommonDTO.getGridId(),dateId,typeCodeList);
if (null != gridRes) {
gridRes.setIsDefault("no");
subGridList.add(gridRes);
} else {
WorkRecordSubRank gridResDefault = new WorkRecordSubRank();

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml

@ -109,8 +109,6 @@
<select id="selectUpToCalAgency" parameterType="map" resultType="com.epmet.plugins.result.WorkRecordSubRank">
SELECT
sca.AGENCY_ID AS orgId,
sca.AGENCY_NAME AS `NAME`,
sum( m.PARTICIPATE_USER_TOTAL ) AS participateUserTotal,
sum( m.ORGANIZE_TOTAL ) AS participateTotal
FROM
@ -131,8 +129,8 @@
<select id="selectUpToCalGrid" parameterType="map" resultType="com.epmet.plugins.result.WorkRecordSubRank">
SELECT
sca.GRID_ID AS orgId,
sca.grid_name AS `NAME`,
scg.GRID_ID AS orgId,
scg.grid_name AS `NAME`,
sum( m.PARTICIPATE_USER_TOTAL ) AS participateUserTotal,
sum( m.ORGANIZE_TOTAL ) AS participateTotal
FROM
@ -140,11 +138,11 @@
inner join screen_customer_grid scg
on(m.ORG_ID=scg.grid_id
and scg.DEL_FLAG='0'
AND scg.ALL_PARENT_IDS like concat('%',#{agencyId},'%')
)
WHERE
m.DEL_FLAG = '0'
AND m.DATE_ID = #{dateId}
and m.org_id=#{gridId}
AND m.TYPE_CODE IN
<foreach item="typeCode" collection="typeCodeList" open="(" separator="," close=")">
#{typeCode}

1
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

@ -241,6 +241,7 @@
WHERE
agency.DEL_FLAG = '0'
AND agency.AREA_CODE like concat(#{areaCode},'%')
AND LENGTH(agency.PARENT_AREA_CODE) &gt; 0
</select>
<!-- 查找组织下的部门 -->

2
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBackFactory.java

@ -14,7 +14,7 @@ public class DataStatisticalOpenFeignClientFallBackFactory implements FallbackFa
@Override
public DataStatisticalOpenFeignClient create(Throwable cause) {
log.error(ExceptionUtils.getThrowableErrorStackTrace(cause));//自己写的工具类
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

22
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java

@ -26,7 +26,8 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
* @author zhaoqifeng
* @date 2020/6/17 14:13
*/
List<IssueAgencyDTO> selectAgencyIssueTotal(@Param("customerId") String customerId, @Param("date") String date);
List<IssueAgencyDTO> selectAgencyIssueTotal(@Param("customerId") String customerId, @Param("date") String date,
@Param("gridList") List<String> gridList);
/**
* 获取当前日期组织下议题增量
@ -37,7 +38,8 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
* @author zhaoqifeng
* @date 2020/6/18 9:55
*/
List<IssueAgencyDTO> selectAgencyIssueInc(@Param("customerId") String customerId, @Param("date") String date);
List<IssueAgencyDTO> selectAgencyIssueInc(@Param("customerId") String customerId, @Param("date") String date,
@Param("gridList") List<String> gridList);
/**
* 已关闭议题统计
@ -48,7 +50,8 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
* @author zhaoqifeng
* @date 2020/6/18 14:41
*/
List<IssueAgencyDTO> selectAgencyClosedIssueTotal(@Param("customerId") String customerId, @Param("date") String date);
List<IssueAgencyDTO> selectAgencyClosedIssueTotal(@Param("customerId") String customerId, @Param("date") String date,
@Param("gridList") List<String> gridList);
/**
* 已关闭议题增量
@ -59,7 +62,8 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
* @author zhaoqifeng
* @date 2020/6/18 14:41
*/
List<IssueAgencyDTO> selectAgencyClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date);
List<IssueAgencyDTO> selectAgencyClosedIssueInc(@Param("customerId") String customerId, @Param("date") String date,
@Param("gridList") List<String> gridList);
/**
* @param issueEntity
@ -181,4 +185,14 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
List<IssueVoteStatisticalResultDTO> selectIssueVoteStatis(@Param("customerId") String customerId, @Param("dateId") String dateId);
List<IssueProjectCategoryDictDTO> selectCategory(@Param("customerId") String customerId, @Param("ids") Set<String> set);
List<IssueDTO> getIssueTotalList(@Param("customerId") String customerId, @Param("date") String date);
/**
* @Author sun
* @Description 查询议题库已删除网格下可能存在的项目Id集合
**/
List<String> selectProjectByGrids(@Param("gridIds") List<String> gridIds);
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java

@ -87,4 +87,12 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
* @return java.util.List<com.epmet.dto.org.CustomerStaffGridDTO>
*/
List<CustomerStaffGridDTO> getCustomerStaffGridList(@Param("customerId") String customerId);
List<String> getDelGridList(@Param("customerId") String customerId);
/**
* @Author sun
* @Description 查询客户已删除网格列表
**/
List<String> selectDelGridList(@Param("customerId") String customerId);
}

35
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java

@ -28,7 +28,7 @@ public interface IssueService {
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
*/
List<IssueAgencyDTO> getAgencyIssueTotal(String customerId, String date);
List<IssueAgencyDTO> getAgencyIssueTotal(String customerId, String date, List<String> gridList);
/**
* 获取当前日期组织下议题增量
@ -38,7 +38,7 @@ public interface IssueService {
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
*/
List<IssueAgencyDTO> getAgencyIssueInc(String customerId, String date);
List<IssueAgencyDTO> getAgencyIssueInc(String customerId, String date, List<String> gridList);
/**
* 获取截止当前日期组织下已关闭议题统计
@ -48,7 +48,7 @@ public interface IssueService {
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
*/
List<IssueAgencyDTO> getAgencyClosedIssueTotal(String customerId, String date);
List<IssueAgencyDTO> getAgencyClosedIssueTotal(String customerId, String date, List<String> gridList);
/**
* 获取当前日期组织下已关闭议题增量
@ -58,7 +58,7 @@ public interface IssueService {
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueAgencyDTO>
*/
List<IssueAgencyDTO> getAgencyClosedIssueInc(String customerId, String date);
List<IssueAgencyDTO> getAgencyClosedIssueInc(String customerId, String date, List<String> gridList);
/**
* @param issueEntity
@ -183,4 +183,31 @@ public interface IssueService {
* @date 2021.03.09 00:23
*/
Map<String,String> getIntegratedProjectCategory(Map<String, Set<String>> param,String customerId);
/**
* 获取议题总数
* @author zhaoqifeng
* @date 2021/7/20 16:20
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
*/
List<IssueDTO> getIssueTotalList(String customerId, String date);
/**
* 获取议题增量
* @author zhaoqifeng
* @date 2021/7/20 16:20
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
*/
List<IssueDTO> getIssueIncrList(String customerId, String date);
/**
* @Author sun
* @Description 查询议题库已删除网格下可能存在的项目Id集合
**/
List<String> getProjectByGrids(List<String> gridIds);
}

54
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java

@ -34,23 +34,23 @@ public class IssueServiceImpl implements IssueService {
private StatsIssueDao statsIssueDao;
@Override
public List<IssueAgencyDTO> getAgencyIssueTotal(String customerId, String date) {
return statsIssueDao.selectAgencyIssueTotal(customerId, date);
public List<IssueAgencyDTO> getAgencyIssueTotal(String customerId, String date, List<String> gridList) {
return statsIssueDao.selectAgencyIssueTotal(customerId, date, gridList);
}
@Override
public List<IssueAgencyDTO> getAgencyIssueInc(String customerId, String date) {
return statsIssueDao.selectAgencyIssueInc(customerId, date);
public List<IssueAgencyDTO> getAgencyIssueInc(String customerId, String date, List<String> gridList) {
return statsIssueDao.selectAgencyIssueInc(customerId, date, gridList);
}
@Override
public List<IssueAgencyDTO> getAgencyClosedIssueTotal(String customerId, String date) {
return statsIssueDao.selectAgencyClosedIssueTotal(customerId, date);
public List<IssueAgencyDTO> getAgencyClosedIssueTotal(String customerId, String date, List<String> gridList) {
return statsIssueDao.selectAgencyClosedIssueTotal(customerId, date, gridList);
}
@Override
public List<IssueAgencyDTO> getAgencyClosedIssueInc(String customerId, String date) {
return statsIssueDao.selectAgencyClosedIssueInc(customerId, date);
public List<IssueAgencyDTO> getAgencyClosedIssueInc(String customerId, String date, List<String> gridList) {
return statsIssueDao.selectAgencyClosedIssueInc(customerId, date, gridList);
}
/**
@ -169,4 +169,42 @@ public class IssueServiceImpl implements IssueService {
return map;
}
/**
* 获取议题总数
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
* @author zhaoqifeng
* @date 2021/7/20 16:20
*/
@Override
public List<IssueDTO> getIssueTotalList(String customerId, String date) {
return null;
}
/**
* 获取议题增量
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
* @author zhaoqifeng
* @date 2021/7/20 16:20
*/
@Override
public List<IssueDTO> getIssueIncrList(String customerId, String date) {
return null;
}
/**
* @Author sun
* @Description 查询议题库已删除网格下可能存在的项目Id集合
**/
@Override
public List<String> getProjectByGrids(List<String> gridIds) {
return statsIssueDao.selectProjectByGrids(gridIds);
}
}

17
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java

@ -17,6 +17,7 @@ import com.epmet.dto.stats.FactIssueGridMonthlyDTO;
import com.epmet.entity.stats.*;
import com.epmet.service.Issue.IssueService;
import com.epmet.service.StatsIssueService;
import com.epmet.service.org.CustomerGridService;
import com.epmet.service.project.ProjectService;
import com.epmet.service.stats.*;
import com.epmet.util.DimIdGenerator;
@ -57,6 +58,8 @@ public class StatsIssueServiceImpl implements StatsIssueService {
private FactIssueGridDailyService factIssueGridDailyService;
@Autowired
private FactIssueGridMonthlyService factIssueGridMonthlyService;
@Autowired
private CustomerGridService customerGridService;
@Override
public void agencyGridIssueStats(StatsFormDTO formDTO) {
@ -119,16 +122,17 @@ public class StatsIssueServiceImpl implements StatsIssueService {
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date);
//清空数据
factIssueAgencyDailyService.deleteByCustomerId(customerId, dimId.getDateId());
List<String> gridList = customerGridService.getDelGridList(customerId);
//获取当前客户下所有机关
List<DimAgencyDTO> agencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO);
//获取机关下议题各种状态的数目统计
List<IssueAgencyDTO> issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId, dateString);
List<IssueAgencyDTO> issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId, dateString, gridList);
//获取机关下议题各种状态的数目增量
List<IssueAgencyDTO> issueAgencyIncList = issueService.getAgencyIssueInc(customerId, dateString);
List<IssueAgencyDTO> issueAgencyIncList = issueService.getAgencyIssueInc(customerId, dateString, gridList);
//获取机关下已关闭议题统计
List<IssueAgencyDTO> issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString);
List<IssueAgencyDTO> issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString, gridList);
//获取机关下已关闭议题增量
List<IssueAgencyDTO> issueAgencyClosedIncList = issueService.getAgencyClosedIssueInc(customerId, dateString);
List<IssueAgencyDTO> issueAgencyClosedIncList = issueService.getAgencyClosedIssueInc(customerId, dateString, gridList);
//已结案项目统计
List<ProjectAgencyDTO> projectAgencyClosedTotalList = projectService.getAgencyClosedProjectTotal(customerId, dateString);
//已结案项目增量
@ -180,14 +184,15 @@ public class StatsIssueServiceImpl implements StatsIssueService {
dimAgencyDTO.setCustomerId(customerId);
//获取日期相关维度
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date);
List<String> gridList = customerGridService.getDelGridList(customerId);
//清空数据
factIssueAgencyMonthlyService.deleteByCustomerId(customerId, dimId.getMonthId());
//获取当前客户下所有机关
List<DimAgencyDTO> agencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO);
//获取机关下议题各种状态的数目统计
List<IssueAgencyDTO> issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId, dateString);
List<IssueAgencyDTO> issueAgencyTotalList = issueService.getAgencyIssueTotal(customerId, dateString, gridList);
//获取机关下已关闭议题统计
List<IssueAgencyDTO> issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString);
List<IssueAgencyDTO> issueAgencyClosedTotalList = issueService.getAgencyClosedIssueTotal(customerId, dateString, gridList);
//已结案项目统计
List<ProjectAgencyDTO> projectAgencyClosedTotalList = projectService.getAgencyClosedProjectTotal(customerId, dateString);
//统计机关下议题各个指标月度增量

29
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java

@ -12,6 +12,7 @@ import com.epmet.entity.project.ProjectProcessEntity;
import com.epmet.entity.stats.*;
import com.epmet.service.Issue.IssueService;
import com.epmet.service.StatsProjectService;
import com.epmet.service.org.CustomerGridService;
import com.epmet.service.project.ProjectProcessService;
import com.epmet.service.project.ProjectService;
import com.epmet.service.stats.*;
@ -29,6 +30,7 @@ import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
* 数据统计-项目独立于任何具体数据源外层的service
@ -59,6 +61,8 @@ public class StatsProjectServiceImpl implements StatsProjectService {
private FactGridProjectDailyService factGridProjectDailyService;
@Autowired
private FactGridProjectMonthlyService factGridProjectMonthlyService;
@Autowired
private CustomerGridService customerGridService;
/**
* @Author sun
@ -123,6 +127,31 @@ public class StatsProjectServiceImpl implements StatsProjectService {
log.info("StatsProjectServiceImpl.customerAgencyStats-根据客户Id查询项目进展表业务数据,对应客户Id:" + customerId);
List<ProjectProcessEntity> processList = projectProcessService.getProcessList(projectEntity);
//20210721 sun 业务逻辑调整,网格删除,组织没有删除情况,相应的组织层级数据统计应舍弃以删除网格数据 start
//处理逻辑:查询已删除网格下项目Id,将已查询的项目、节点数据中的脏数据剔除【项目库有张表有网格Id,可以查出每个项目所属网格,但是关联该表后sql查询效率极低固舍弃此方案】
//4-1.查询客户下已删除网格列表下存在的项目Id集合
List<String> list = customerGridService.getdelGridProjectIdList(customerId);
if (list.size() > NumConstant.ZERO) {
Map<String, String> map = list.stream().collect(Collectors.toMap(String::toString, v -> v, (c1, c2) -> c1));
//4-2.遍历删除项目主表查询的无效数据
Iterator<ProjectEntity> proiter = projectList.iterator();
while (proiter.hasNext()) {
ProjectEntity next = proiter.next();
if (map.containsKey(next.getId())) {
proiter.remove();
}
}
//4-3.遍历删除项目节点表查询的无效数据
Iterator<ProjectProcessEntity> iterator = processList.iterator();
while (iterator.hasNext()) {
ProjectProcessEntity next = iterator.next();
if (map.containsKey(next.getProjectId())) {
iterator.remove();
}
}
}
//20210721 sun end
//5:机关层级日月统计
if (null != dimAgencyList && dimAgencyList.size() > NumConstant.ZERO) {
//5.1:执行机关日数据统计

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java

@ -61,4 +61,20 @@ public interface CustomerGridService extends BaseService<CustomerGridEntity> {
* @return java.util.List<com.epmet.dto.org.CustomerStaffGridDTO>
*/
List<CustomerStaffGridDTO> getCustomerStaffGridList(String customerId);
/**
* 获取已删除的grid
* @author zhaoqifeng
* @date 2021/7/20 16:33
* @param customerId
* @return java.util.List<java.lang.String>
*/
List<String> getDelGridList(String customerId);
/**
* @Author sun
* @Description 查询客户下已删除网格列表下存在的项目Id集合
**/
List<String> getdelGridProjectIdList(String customerId);
}

36
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java

@ -2,6 +2,7 @@ package com.epmet.service.org.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.org.CustomerGridDao;
import com.epmet.dto.group.AgencyDTO;
@ -10,10 +11,12 @@ import com.epmet.dto.group.result.GridIdListByCustomerResultDTO;
import com.epmet.dto.org.CustomerStaffGridDTO;
import com.epmet.dto.org.GridInfoDTO;
import com.epmet.entity.org.CustomerGridEntity;
import com.epmet.service.Issue.IssueService;
import com.epmet.service.org.CustomerGridService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -23,6 +26,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
@Autowired
private CustomerGridDao customerGridDao;
@Autowired
private IssueService issueService;
@Override
public List<CustomerGridEntity> listGridsByCreateTime(Date start, Date end) {
@ -79,4 +84,35 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
public List<CustomerStaffGridDTO> getCustomerStaffGridList(String customerId) {
return customerGridDao.getCustomerStaffGridList(customerId);
}
/**
* 获取已删除的grid
*
* @param customerId
* @return java.util.List<java.lang.String>
* @author zhaoqifeng
* @date 2021/7/20 16:33
*/
@Override
public List<String> getDelGridList(String customerId) {
return customerGridDao.getDelGridList(customerId);
}
/**
* @Author sun
* @Description 查询客户下已删除网格列表下存在的项目Id集合
**/
@Override
public List<String> getdelGridProjectIdList(String customerId) {
List<String> resultList = new ArrayList<>();
//1.查询客户已删除网格列表
List<String> gridIds = customerGridDao.selectDelGridList(customerId);
if (gridIds.size() < NumConstant.ONE) {
return resultList;
}
//2.查询议题库已删除网格下可能存在的项目Id集合
resultList = issueService.getProjectByGrids(gridIds);
return resultList;
}
}

47
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml

@ -13,6 +13,11 @@
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND DATE(UPDATED_TIME) <![CDATA[ <= ]]> #{date}
<if test="gridList != null and gridList.size() > 0">
<foreach collection="gridList" item="gridId" index="index">
AND GRID_ID != #{gridId}
</foreach>
</if>
GROUP BY
ORG_ID, ISSUE_STATUS
</select>
@ -34,6 +39,11 @@
i.DEL_FLAG = '0'
AND i.CUSTOMER_ID = #{customerId}
AND DATE(ip.CREATED_TIME) = #{date}
<if test="gridList != null and gridList.size() > 0">
<foreach collection="gridList" item="gridId" index="index">
AND i.GRID_ID != #{gridId}
</foreach>
</if>
GROUP BY
i.ORG_ID,
ip.ISSUE_STATUS
@ -55,6 +65,11 @@
AND ISSUE_STATUS = 'closed'
AND CUSTOMER_ID = #{customerId}
AND DATE(UPDATED_TIME) <![CDATA[ <= ]]> #{date}
<if test="gridList != null and gridList.size() > 0">
<foreach collection="gridList" item="gridId" index="index">
AND GRID_ID != #{gridId}
</foreach>
</if>
GROUP BY
ORG_ID,
RESOLVE_TYPE
@ -72,6 +87,11 @@
AND ISSUE_STATUS = 'closed'
AND CUSTOMER_ID = #{customerId}
AND DATE(UPDATED_TIME) = #{date}
<if test="gridList != null and gridList.size() > 0">
<foreach collection="gridList" item="gridId" index="index">
AND GRID_ID != #{gridId}
</foreach>
</if>
GROUP BY
ORG_ID,
RESOLVE_TYPE
@ -301,4 +321,31 @@
</foreach>
order by a.category_type,a.sort
</select>
<select id="getIssueTotalList" resultType="com.epmet.dto.issue.IssueDTO">
SELECT ORG_ID AS "agencyId",
ORG_ID_PATH AS "pIds",
ISSUE_STATUS AS "status",
COUNT(ID) AS "count"
FROM
issue
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND DATE(UPDATED_TIME) <![CDATA[ <= ]]> #{date}
GROUP BY
ORG_ID, ISSUE_STATUS
</select>
<select id="selectProjectByGrids" resultType="java.lang.String">
SELECT DISTINCT
ipr.project_id
FROM
issue_project_relation ipr
INNER JOIN issue i ON ipr.issue_id = i.id
WHERE 1=1
<foreach collection="gridIds" item="id" open="AND (" separator=" OR " close=")">
i.grid_id = #{id}
</foreach>
</select>
</mapper>

20
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml

@ -106,4 +106,24 @@
csg.DEL_FLAG = '0'
AND csg.CUSTOMER_ID = #{customerId}
</select>
<select id="getDelGridList" resultType="java.lang.String">
select
ID
from
customer_grid
where
DEL_FLAG = '1'
and customer_id = #{customerId}
</select>
<select id="selectDelGridList" resultType="java.lang.String">
SELECT
id
FROM
customer_grid
WHERE
del_flag != '0'
AND customer_id = #{customerId}
</select>
</mapper>

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml

@ -29,6 +29,8 @@
customer_id,
month_id,
org_id,
pid,
pids,
org_name,
meeting_code,
type_code,
@ -51,6 +53,8 @@
#{monthId},
#{item.orgId},
#{item.pid},
#{item.pids},
#{item.orgName},
#{item.meetingCode},

5
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java

@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.EpmetCommonServiceOpenFeignClientFallback;
import com.epmet.feign.fallback.EpmetCommonServiceOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
@ -19,8 +20,8 @@ import java.util.Map;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 10:28
*/
@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class, url = "http://192.168.1.132:8103")
@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallbackFactory = EpmetCommonServiceOpenFeignClientFallbackFactory.class)
//@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallbackFactory = EpmetCommonServiceOpenFeignClientFallbackFactory.class, url = "http://192.168.1.132:8103")
public interface EpmetCommonServiceOpenFeignClient {
/**
* @param formDTO

2
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java

@ -17,7 +17,7 @@ import java.util.Map;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 10:32
*/
@Component
//@Component
public class EpmetCommonServiceOpenFeignClientFallback implements EpmetCommonServiceOpenFeignClient {
@Override
public Result<List<WorkDayResultDTO>> detentionDays(List<WorkDayFormDTO> formDTO) {

20
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class EpmetCommonServiceOpenFeignClientFallbackFactory implements FallbackFactory<EpmetCommonServiceOpenFeignClient> {
private EpmetCommonServiceOpenFeignClientFallback fallback = new EpmetCommonServiceOpenFeignClientFallback();
@Override
public EpmetCommonServiceOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java

@ -6,6 +6,7 @@ import com.epmet.dto.ActInfoDTO;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.CommonCustomerFormDTO;
import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallback;
import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@ -19,7 +20,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:25
*/
@FeignClient(name = ServiceConstant.EPMET_HEART_SERVER, fallback = EpmetHeartOpenFeignClientFallback.class)
@FeignClient(name = ServiceConstant.EPMET_HEART_SERVER, fallbackFactory = EpmetHeartOpenFeignClientFallbackFactory.class)
public interface EpmetHeartOpenFeignClient {
/**

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java

@ -17,7 +17,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:26
*/
@Component
//@Component
public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignClient {
/**

20
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.EpmetHeartOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class EpmetHeartOpenFeignClientFallbackFactory implements FallbackFactory<EpmetHeartOpenFeignClient> {
private EpmetHeartOpenFeignClientFallback fallback = new EpmetHeartOpenFeignClientFallback();
@Override
public EpmetHeartOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

3
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/EpmetMessageOpenFeignClient.java

@ -11,6 +11,7 @@ import com.epmet.dto.form.WxSubscribeMessageFormDTO;
import com.epmet.dto.form.WxSubscribeUpdateFormDTO;
import com.epmet.dto.result.SendVerificationCodeResultDTO;
import com.epmet.feign.fallback.EpmetMessageOpenFeignClientFallback;
import com.epmet.feign.fallback.EpmetMessageOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
@ -27,7 +28,7 @@ import java.util.List;
* @date 2020/6/4 13:47
*/
//@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallback = EpmetMessageOpenFeignClientFallback.class,url = "http://127.0.0.1:8085")
@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallback = EpmetMessageOpenFeignClientFallback.class)
@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallbackFactory = EpmetMessageOpenFeignClientFallbackFactory.class)
public interface EpmetMessageOpenFeignClient {
/**
* 发送短信

2
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallback.java

@ -22,7 +22,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:48
*/
@Component
//@Component
public class EpmetMessageOpenFeignClientFallback implements EpmetMessageOpenFeignClient {
@Override

20
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class EpmetMessageOpenFeignClientFallbackFactory implements FallbackFactory<EpmetMessageOpenFeignClient> {
private EpmetMessageOpenFeignClientFallback fallback = new EpmetMessageOpenFeignClientFallback();
@Override
public EpmetMessageOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

9
epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/OssFeignClient.java

@ -12,6 +12,7 @@ import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.feign.fallback.OssFeignClientFallback;
import com.epmet.feign.fallback.OssFeignClientFallbackFactory;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.cloud.openfeign.FeignClient;
@ -28,10 +29,10 @@ import org.springframework.web.multipart.MultipartFile;
* @author Mark sunlightcs@gmail.c om
* @since 1.1.0
*/
@FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallback =
OssFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallback =
// OssFeignClientFallback.class)
@FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallbackFactory =
OssFeignClientFallbackFactory.class)
//@FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallbackFactory =
// OssFeignClientFallbackFactory.class)
public interface OssFeignClient {
/**
* 文件上传

2
epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/fallback/OssFeignClientFallback.java

@ -22,7 +22,7 @@ import org.springframework.web.multipart.MultipartFile;
* @author Mark sunlightcs@gmail.c om
* @since 1.1.0
*/
@Component
//@Component
public class OssFeignClientFallback implements OssFeignClient {
@Override

20
epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/fallback/OssFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.OssFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class OssFeignClientFallbackFactory implements FallbackFactory<OssFeignClient> {
private OssFeignClientFallback fallback = new OssFeignClientFallback();
@Override
public OssFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

3
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java

@ -8,6 +8,7 @@ import com.epmet.dto.form.CommonUserFormDTO;
import com.epmet.dto.form.GroupPointFormDTO;
import com.epmet.dto.result.ResiPointDetailResultDTO;
import com.epmet.feign.fallback.EpmetPointOpenFeignClientFallback;
import com.epmet.feign.fallback.EpmetPointOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -18,7 +19,7 @@ import org.springframework.web.bind.annotation.RequestBody;
* @author wangc
* @date 2020/7/9 13:25
*/
@FeignClient(name = ServiceConstant.EPMET_POINT_SERVER, fallback = EpmetPointOpenFeignClientFallback.class)
@FeignClient(name = ServiceConstant.EPMET_POINT_SERVER, fallbackFactory = EpmetPointOpenFeignClientFallbackFactory.class)
public interface EpmetPointOpenFeignClient {
/**

2
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java

@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestParam;
* @Auth wangc
* @Date 2020-07-10 09:14
*/
@Component
//@Component
public class EpmetPointOpenFeignClientFallback implements EpmetPointOpenFeignClient {
@Override
public Result<ResiPointDetailResultDTO> myPoint(CommonUserFormDTO param) {

20
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.EpmetPointOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class EpmetPointOpenFeignClientFallbackFactory implements FallbackFactory<EpmetPointOpenFeignClient> {
private EpmetPointOpenFeignClientFallback fallback = new EpmetPointOpenFeignClientFallback();
@Override
public EpmetPointOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

5
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java

@ -6,6 +6,7 @@ import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.EpmetThirdOpenFeignClientFallback;
import com.epmet.feign.fallback.EpmetThirdOpenFeignClientFallbackFactory;
import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import feign.codec.Encoder;
@ -24,9 +25,9 @@ import java.util.List;
* @author zhaoqifeng
* @date 2021/3/18 14:18
*/
// @FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = EpmetThirdOpenFeignClientFallback.class,configuration =
// @FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallbackFactory = EpmetThirdOpenFeignClientFallbackFactory.class,configuration =
// EpmetThirdOpenFeignClient.MultipartSupportConfig.class,url = "localhost:8110")
@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = EpmetThirdOpenFeignClientFallback.class, configuration =
@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallbackFactory = EpmetThirdOpenFeignClientFallbackFactory.class, configuration =
EpmetThirdOpenFeignClient.MultipartSupportConfig.class)
public interface EpmetThirdOpenFeignClient {
/**

5
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java

@ -6,14 +6,15 @@ import com.epmet.dto.form.SaveOrUpdateCustSelPlatformFormDTO;
import com.epmet.dto.form.ThirdPlatformFormDTO;
import com.epmet.dto.result.ThirdplatformResultDTO;
import com.epmet.feign.fallback.ThirdOpenFeignClientFallback;
import com.epmet.feign.fallback.ThirdOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class, url = "http://localhost:8110")
@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallbackFactory = ThirdOpenFeignClientFallbackFactory.class)
//@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallbackFactory = ThirdOpenFeignClientFallbackFactory.class, url = "http://localhost:8110")
public interface ThirdOpenFeignClient {
/**

2
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java

@ -18,7 +18,7 @@ import java.util.List;
* @author zhaoqifeng
* @date 2021/3/18 14:17
*/
@Component
//@Component
public class EpmetThirdOpenFeignClientFallback implements EpmetThirdOpenFeignClient {
/**

18
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallbackFactory.java

@ -0,0 +1,18 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.EpmetThirdOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class EpmetThirdOpenFeignClientFallbackFactory implements FallbackFactory<EpmetThirdOpenFeignClient> {
private EpmetThirdOpenFeignClientFallback fallback = new EpmetThirdOpenFeignClientFallback();
@Override
public EpmetThirdOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

2
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java

@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
//@Component
public class ThirdOpenFeignClientFallback implements ThirdOpenFeignClient {
@Override
public Result saveOrUpdateSelectedPlatformsInfo(SaveOrUpdateCustSelPlatformFormDTO input) {

20
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.ThirdOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class ThirdOpenFeignClientFallbackFactory implements FallbackFactory<ThirdOpenFeignClient> {
private ThirdOpenFeignClientFallback fallback = new ThirdOpenFeignClientFallback();
@Override
public ThirdOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

10
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java

@ -25,16 +25,8 @@ import java.util.List;
@RequestMapping("pacustomer")
public class PaCustomerController {
@Autowired
private PaUserService paUserService;
@Autowired
private PaCustomerService paCustomerService;
@Autowired
private PaCustomerAgencyService paCustomerAgencyService;
@Autowired
private PaCustomerUserAgencyService paCustomerUserAgencyService;
@Autowired
private CustomerMpService customerMpService;
@GetMapping("{id}")
public Result<PaCustomerDTO> get(@PathVariable("id") String id){
@ -130,7 +122,7 @@ public class PaCustomerController {
* @Description 根据初始化状态获取公众号注册的客户列表
**/
@PostMapping(value = "registerbyauth")
public Result<List<RegisterByAuthResultDTO>> registerByAuth(@LoginUser TokenDto tokenDTO, @RequestBody RegisterByAuthFormDTO formDTO) {
public Result<List<RegisterByAuthResultDTO>> registerByAuth(@RequestBody RegisterByAuthFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<List<RegisterByAuthResultDTO>>().ok( paCustomerService.registerByAuth(formDTO));
}

6
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java

@ -4,15 +4,15 @@ import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.InitDefaultOperationsFormDTO;
import com.epmet.dto.form.ListOpePermsFormDTO;
import com.epmet.feign.fallback.GovAccessFeignClientFallBack;
import com.epmet.feign.fallback.GovAccessFeignClientFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.Set;
//@FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallback = GovAccessFeignClientFallBack.class, url = "http://localhost:8099")
@FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallback = GovAccessFeignClientFallBack.class)
//@FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallbackFactory = GovAccessFeignClientFallBackFactory.class, url = "http://localhost:8099")
@FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallbackFactory = GovAccessFeignClientFallBackFactory.class)
public interface GovAccessFeignClient {
/**

2
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java

@ -14,7 +14,7 @@ import java.util.Set;
* @Description
* @Author sun
*/
@Component
//@Component
public class GovAccessFeignClientFallBack implements GovAccessFeignClient {

28
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBackFactory.java

@ -0,0 +1,28 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.GovAccessFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* @Description fallBackFactory用于抛出异常之后返回一个Fallback降级处理对象
* @author wxz
* @date 2021.07.15 09:54:14
*/
@Component
@Slf4j
public class GovAccessFeignClientFallBackFactory implements FallbackFactory<GovAccessFeignClient> {
/**
* 降级处理对象
*/
private GovAccessFeignClientFallBack fallBack = new GovAccessFeignClientFallBack();
@Override
public GovAccessFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallBack;
}
}

7
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java

@ -439,6 +439,7 @@ public class AccessServiceImpl implements AccessService {
@Override
public Set<String> listOperationPermissions(String staffId, String currAgencyId) {
Set<String> filtedOps = new HashSet<>();
LoginUserDetailsResultDTO userDetails = getLoginUserDetails(loginUserUtil.getLoginUserApp(), loginUserUtil.getLoginUserClient(), loginUserUtil.getLoginUserId());
if (userDetails == null) {
@ -476,7 +477,9 @@ public class AccessServiceImpl implements AccessService {
CustomerAgencyDTO currAgencyDto = currAgencyRst.getData();
if (currAgencyDto == null || currAgencyDto.getId() == null) {
throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode(), "操作权限不足,当前组织信息不存在");
logger.warn(String.format("根据组织ID:{}未找到组织信息,返回空权限列表", currAgencyId));
return filtedOps;
//throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode(), "操作权限不足,当前组织信息不存在");
}
// 获取机关单位中的角色
@ -489,8 +492,6 @@ public class AccessServiceImpl implements AccessService {
String currOrgIdPath = getOrgIdPath(currAgencyDto);
String currOrgRelation = getCurrOrgRelation(belongOrgIdPath, currOrgIdPath);
Set<String> filtedOps = new HashSet<>();
if (!CollectionUtils.isEmpty(roleList)) {
roleList.forEach(role -> {
List<RoleOpeScopeResultDTO> opeAndScopeDTO = listAllRoleOperationScopesByRoleId(role.getId());

5
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -6,6 +6,7 @@ import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBackFactory;
import com.epmet.project.dto.CustomerCategoryDTO;
import com.epmet.project.dto.result.ProjectCategoryDictResultDTO;
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
@ -34,8 +35,8 @@ import java.util.Map;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:37
*/
@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class)
//@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class,url = "localhost:8101")
@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallbackFactory = GovIssueOpenFeignClientFallBackFactory.class)
//@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallbackFactory = GovIssueOpenFeignClientFallBackFactory.class,url = "localhost:8101")
public interface GovIssueOpenFeignClient {
/**

2
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -30,7 +30,7 @@ import java.util.Map;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:43
*/
@Component
//@Component
public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient {
@Override
public Result<ApplicationDetailResultDTO> applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO) {

20
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.GovIssueOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class GovIssueOpenFeignClientFallBackFactory implements FallbackFactory<GovIssueOpenFeignClient> {
private GovIssueOpenFeignClientFallBack fallback = new GovIssueOpenFeignClientFallBack();
@Override
public GovIssueOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -8,6 +8,7 @@ import com.epmet.dto.CustomerPartyBranchDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.GovOrgOpenFeignClientFallback;
import com.epmet.feign.fallback.GovOrgOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@ -20,8 +21,8 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:37
*/
//@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgOpenFeignClientFallback.class, url = "localhost:8092")
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgOpenFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class, url = "localhost:8092")
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class)
public interface GovOrgOpenFeignClient {
/**

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -19,7 +19,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:37
*/
@Component
//@Component
public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
@Override
public Result<CustomerAgencyDTO> getAgencyById(String agencyId) {

20
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.GovOrgOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class GovOrgOpenFeignClientFallbackFactory implements FallbackFactory<GovOrgOpenFeignClient> {
private GovOrgOpenFeignClientFallback fallback = new GovOrgOpenFeignClientFallback();
@Override
public GovOrgOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

3
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -314,6 +314,7 @@
INNER JOIN customer_agency ca ON cg.pid = ca.id
WHERE cg.del_flag = '0'
AND ca.del_flag = '0'
AND cg.SYNC_FLAG='1'
AND cg.id IN
<foreach item="id" collection="gridIdList" open="(" separator="," close=")">
#{id}
@ -428,6 +429,7 @@
) agency ON grid.PID = agency.ID
WHERE
grid.del_flag = 0
and grid.SYNC_FLAG='1'
<if test='areaCode != "" and areaCode != null'>
AND grid.area_code LIKE CONCAT(#{areaCode},'%')
</if>
@ -467,6 +469,7 @@
) agency ON a.PID = agency.ID
WHERE
a.del_flag = 0
and a.SYNC_FLAG='1'
AND a.customer_id = #{customerId}
) AS c
ORDER BY CONVERT ( gridName USING gbk ) ASC

5
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java

@ -7,6 +7,7 @@ import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback;
import com.epmet.feign.fallback.GovProjectOpenFeignClientFallbackFactory;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@ -22,8 +23,8 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:32
*/
// @FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectOpenFeignClientFallback.class,url = "localhost:8102")
@FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectOpenFeignClientFallback.class)
// @FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallbackFactory = GovProjectOpenFeignClientFallbackFactory.class,url = "localhost:8102")
@FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallbackFactory = GovProjectOpenFeignClientFallbackFactory.class)
public interface GovProjectOpenFeignClient {
/**
* 待处理项目列表

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java

@ -19,7 +19,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:33
*/
@Component
//@Component
public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignClient {
@Override
public Result<List<PendProjectListResultDTO>> getPendProjectList(ProjectListFromDTO fromDTO) {

20
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.GovProjectOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class GovProjectOpenFeignClientFallbackFactory implements FallbackFactory<GovProjectOpenFeignClient> {
private GovProjectOpenFeignClientFallback fallback = new GovProjectOpenFeignClientFallback();
@Override
public GovProjectOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

3
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/feign/GovVoiceOpenFeignClient.java

@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.GovVoiceOpenFeignClientFallback;
import com.epmet.feign.fallback.GovVoiceOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -18,7 +19,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 16:01
*/
@FeignClient(name = ServiceConstant.GOV_VOICE_SERVER, fallback = GovVoiceOpenFeignClientFallback.class)
@FeignClient(name = ServiceConstant.GOV_VOICE_SERVER, fallbackFactory = GovVoiceOpenFeignClientFallbackFactory.class)
public interface GovVoiceOpenFeignClient {
/**

2
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/feign/fallback/GovVoiceOpenFeignClientFallback.java

@ -16,7 +16,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 16:01
*/
@Component
//@Component
public class GovVoiceOpenFeignClientFallback implements GovVoiceOpenFeignClient {
@Override
public Result<List<TagInfoResultDTO>> resiTagList(ResiTagListFormDTO formDto) {

20
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/feign/fallback/GovVoiceOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.GovVoiceOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class GovVoiceOpenFeignClientFallbackFactory implements FallbackFactory<GovVoiceOpenFeignClient> {
private GovVoiceOpenFeignClientFallback fallback = new GovVoiceOpenFeignClientFallback();
@Override
public GovVoiceOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

3
epmet-module/oper-access/oper-access-client/src/main/java/com/epmet/feign/OperAccessOpenFeignClient.java

@ -1,5 +1,6 @@
package com.epmet.feign;
import com.epmet.feign.fallback.OperAccessOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@ -13,7 +14,7 @@ import com.epmet.feign.fallback.OperAccessOpenFeignClientFallback;
* @Date 2020/5/21 15:17 本服务对外开放的API,其他服务通过引用此client调用该服务
*/
// , url = "http://localhost:8093"
@FeignClient(name = ServiceConstant.OPER_ACCESS_SERVER, fallback = OperAccessOpenFeignClientFallback.class)
@FeignClient(name = ServiceConstant.OPER_ACCESS_SERVER, fallbackFactory = OperAccessOpenFeignClientFallbackFactory.class)
public interface OperAccessOpenFeignClient {
/**
* @param

2
epmet-module/oper-access/oper-access-client/src/main/java/com/epmet/feign/fallback/OperAccessOpenFeignClientFallback.java

@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
* @Author yinzuomei
* @Date 2020/5/21 15:47
*/
@Component
//@Component
public class OperAccessOpenFeignClientFallback implements OperAccessOpenFeignClient {
@Override
public Result clearOperUserAccess() {

19
epmet-module/oper-access/oper-access-client/src/main/java/com/epmet/feign/fallback/OperAccessOpenFeignClientFallbackFactory.java

@ -0,0 +1,19 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.OperAccessOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class OperAccessOpenFeignClientFallbackFactory implements FallbackFactory<OperAccessOpenFeignClient> {
private OperAccessOpenFeignClientFallback fallback = new OperAccessOpenFeignClientFallback();
@Override
public OperAccessOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

5
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java

@ -10,6 +10,7 @@ import com.epmet.dto.result.CustomerRelationInfoResultDTO;
import com.epmet.dto.result.GridCountResultDTO;
import com.epmet.dto.result.ThirdplatApiserviceResultDTO;
import com.epmet.feign.fallback.OperCrmOpenFeignClientFallback;
import com.epmet.feign.fallback.OperCrmOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -24,8 +25,8 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:25
*/
@FeignClient(name = ServiceConstant.OPER_CRM_SERVER, fallback = OperCrmOpenFeignClientFallback.class)
// @FeignClient(name = ServiceConstant.OPER_CRM_SERVER, fallback = OperCrmOpenFeignClientFallback.class, url = "localhost:8090")
@FeignClient(name = ServiceConstant.OPER_CRM_SERVER, fallbackFactory = OperCrmOpenFeignClientFallbackFactory.class)
// @FeignClient(name = ServiceConstant.OPER_CRM_SERVER, fallbackFactory = OperCrmOpenFeignClientFallbackFactory.class, url = "localhost:8090")
public interface OperCrmOpenFeignClient {
/**
* 获取客户信息

2
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java

@ -21,7 +21,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:26
*/
@Component
//@Component
public class OperCrmOpenFeignClientFallback implements OperCrmOpenFeignClient {
@Override
public Result<CustomerDTO> getCustomerInfo(CustomerDTO dto) {

20
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.OperCrmOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class OperCrmOpenFeignClientFallbackFactory implements FallbackFactory<OperCrmOpenFeignClient> {
private OperCrmOpenFeignClientFallback fallback = new OperCrmOpenFeignClientFallback();
@Override
public OperCrmOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

3
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java

@ -3,6 +3,7 @@ package com.epmet.feign;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerFootBarDTO;
import com.epmet.dto.form.CustomerFootBarFormDTO;
import com.epmet.feign.fallback.OperCustomizeOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
@ -28,7 +29,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:16
*/
@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallback = OperCustomizeOpenFeignClientFallback.class)
@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallbackFactory = OperCustomizeOpenFeignClientFallbackFactory.class)
public interface OperCustomizeOpenFeignClient {
@PostMapping(value = "/oper/customize/customerfootbar/customerfootbars", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)

2
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java

@ -21,7 +21,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:23
*/
@Component
//@Component
public class OperCustomizeOpenFeignClientFallback implements OperCustomizeOpenFeignClient {
@Override
public Result<List<CustomerFootBarDTO>> getCustomerfootbars(CustomerFootBarFormDTO formDTO) {

20
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.OperCustomizeOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class OperCustomizeOpenFeignClientFallbackFactory implements FallbackFactory<OperCustomizeOpenFeignClient> {
private OperCustomizeOpenFeignClientFallback fallback = new OperCustomizeOpenFeignClientFallback();
@Override
public OperCustomizeOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

2
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml

@ -38,7 +38,7 @@
hc.CONFIGURATION_DESCRIPTION,
chd.REGION,
chd.CONFIGURATION,
chd.DEMO_DATA,
hc.DEMO_DATA,
chd.DISPLAY_ORDER
FROM
(

5
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java

@ -12,6 +12,7 @@ import com.epmet.resi.group.dto.topic.form.*;
import com.epmet.resi.group.dto.topic.result.*;
import com.epmet.resi.group.dto.topic.result.TopicInfoResultDTO;
import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallback;
import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallbackFactory;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
@ -26,8 +27,8 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:16
*/
@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class,url = "localhost:8095")
@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallbackFactory = ResiGroupOpenFeignClientFallbackFactory.class)
//@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallbackFactory = ResiGroupOpenFeignClientFallbackFactory.class,url = "localhost:8095")
public interface ResiGroupOpenFeignClient {
@PostMapping("/resi/group/group/gov-edit-auditing-list")

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java

@ -25,7 +25,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:17
*/
@Component
//@Component
public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClient {
@Override
public Result<List<ApplyingGroupResultDTO>> govEditAuditingList(CommonGridAndPageFormDTO param) {

20
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.resi.group.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class ResiGroupOpenFeignClientFallbackFactory implements FallbackFactory<ResiGroupOpenFeignClient> {
private ResiGroupOpenFeignClientFallback fallback = new ResiGroupOpenFeignClientFallback();
@Override
public ResiGroupOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java

@ -224,6 +224,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
calendar.set(Calendar.YEAR, calendar.get(Calendar.YEAR) + NumConstant.FIFTY);
groupInvitationEntity.setValidEndTime(calendar.getTime());
groupInvitationEntity.setResiGroupId(formDTO.getGroupId());
groupInvitationEntity.setCustomerId(resiGroupDTO.getCustomerId());
insert(groupInvitationEntity);
CreateGroupInvitationResultDTO resultDTO = new CreateGroupInvitationResultDTO();
resultDTO.setInvitationId(groupInvitationEntity.getId());

1
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupCodeDao.xml

@ -22,6 +22,7 @@
<if test='null != gridId and "" != gridId'>
and rg.grid_id = #{gridId}
</if>
order by rgc.CREATED_TIME desc limit 1
</select>
</mapper>

5
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java

@ -9,6 +9,7 @@ import com.epmet.resi.partymember.dto.partymember.form.PartyMemberBaseInfoAddFor
import com.epmet.resi.partymember.dto.partymember.result.PartyMemberBaseInfoDetailResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.PartymemberBaseInfoResultDTO;
import com.epmet.resi.partymember.feign.fallback.ResiPartyMemberOpenFeignClientFallback;
import com.epmet.resi.partymember.feign.fallback.ResiPartyMemberOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@ -21,8 +22,8 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:12
*/
//@FeignClient(name = ServiceConstant.RESI_PARTYMEMBER_SERVER, fallback = ResiPartyMemberOpenFeignClientFallback.class,url = "http://localhost:8096")
@FeignClient(name = ServiceConstant.RESI_PARTYMEMBER_SERVER, fallback = ResiPartyMemberOpenFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.RESI_PARTYMEMBER_SERVER, fallbackFactory = ResiPartyMemberOpenFeignClientFallbackFactory.class,url = "http://localhost:8096")
@FeignClient(name = ServiceConstant.RESI_PARTYMEMBER_SERVER, fallbackFactory = ResiPartyMemberOpenFeignClientFallbackFactory.class)
public interface ResiPartyMemberOpenFeignClient {
/**

2
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java

@ -20,7 +20,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:14
*/
@Component
//@Component
public class ResiPartyMemberOpenFeignClientFallback implements ResiPartyMemberOpenFeignClient {
@Override

20
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallbackFactory.java

@ -0,0 +1,20 @@
package com.epmet.resi.partymember.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class ResiPartyMemberOpenFeignClientFallbackFactory implements FallbackFactory<ResiPartyMemberOpenFeignClient> {
private ResiPartyMemberOpenFeignClientFallback fallback = new ResiPartyMemberOpenFeignClientFallback();
@Override
public ResiPartyMemberOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

4
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

@ -290,6 +290,10 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
//补充信息更新到党员基本信息表
PartymemberInfoDTO partyMemberInfo = partymemberInfoService.getPartyMemberInfo(infoDTO);
if (null == partyMemberInfo) {
log.warn("partymemberInfoService.getPartyMemberInfo return null,this partyMember maybe have audited,param:{}", JSON.toJSON(infoDTO));
return new Result();
}
infoDTO.setId(partyMemberInfo.getId());
partymemberInfoService.updateById(ConvertUtils.sourceToTarget(infoDTO, PartymemberInfoEntity.class));
PartymemberConfirmManualDTO partymemberConfirmManualDTO =

3
epmet-module/resi-voice/resi-voice-client/src/main/java/com/epmet/feign/ResiVoiceOpenFeignClient.java

@ -1,5 +1,6 @@
package com.epmet.feign;
import com.epmet.feign.fallback.ResiVoiceOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
@ -11,6 +12,6 @@ import com.epmet.feign.fallback.ResiVoiceOpenFeignClientFallback;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:01
*/
@FeignClient(name = ServiceConstant.RESI_VOICE_SERVER, fallback = ResiVoiceOpenFeignClientFallback.class)
@FeignClient(name = ServiceConstant.RESI_VOICE_SERVER, fallbackFactory = ResiVoiceOpenFeignClientFallbackFactory.class)
public interface ResiVoiceOpenFeignClient {
}

2
epmet-module/resi-voice/resi-voice-client/src/main/java/com/epmet/feign/fallback/ResiVoiceOpenFeignClientFallback.java

@ -9,6 +9,6 @@ import org.springframework.stereotype.Component;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:05
*/
@Component
//@Component
public class ResiVoiceOpenFeignClientFallback implements ResiVoiceOpenFeignClient {
}

18
epmet-module/resi-voice/resi-voice-client/src/main/java/com/epmet/feign/fallback/ResiVoiceOpenFeignClientFallbackFactory.java

@ -0,0 +1,18 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.ResiVoiceOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class ResiVoiceOpenFeignClientFallbackFactory implements FallbackFactory<ResiVoiceOpenFeignClient> {
private ResiVoiceOpenFeignClientFallback fallback = new ResiVoiceOpenFeignClientFallback();
@Override
public ResiVoiceOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

6
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

@ -7,7 +7,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallback;
import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@ -21,8 +21,8 @@ import java.util.Map;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:09
*/
//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class, url = "localhost:8087")
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087")
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class)
public interface EpmetUserOpenFeignClient {
/**

2
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java

@ -19,7 +19,7 @@ import java.util.Map;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:10
*/
@Component
//@Component
public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClient {
@Override

18
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallbackFactory.java

@ -0,0 +1,18 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.feign.EpmetUserOpenFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class EpmetUserOpenFeignClientFallbackFactory implements FallbackFactory<EpmetUserOpenFeignClient> {
private EpmetUserOpenFeignClientFallback fallback = new EpmetUserOpenFeignClientFallback();
@Override
public EpmetUserOpenFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java

@ -74,7 +74,7 @@ public interface UserWechatDao extends BaseDao<UserWechatEntity>{
* @author wangc
* @date 2020.07.27 00:58
**/
List<CustomerUser4PointResultDTO> selectResiAndStrangerInfo(@Param("userIds") List<String> userIds, @Param("realName")String realName);
List<CustomerUser4PointResultDTO> selectResiAndStrangerInfo(@Param("customerId") String customerId, @Param("realName")String realName);
//临时用下in
List<UserWechatDTO> selectNotInUserBaseInfoTemp();

20
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java

@ -49,6 +49,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.stream.Collectors;
@ -190,23 +191,10 @@ public class GridLatestServiceImpl extends BaseServiceImpl<GridLatestDao, GridLa
**/
@Override
public List<CustomerUser4PointResultDTO> getCustomerUsers(CustomerUserFormDTO customerUserFormDTO) {
List<CustomerUser4PointResultDTO> allData = new LinkedList<>();
List<String> userIds = baseDao.selectAllUserByCustomerId(customerUserFormDTO.getCustomerId());
if(null == userIds) userIds = new LinkedList<>();
CommonCustomerFormDTO customerParam = new CommonCustomerFormDTO();
customerParam.setCustomerId(customerUserFormDTO.getCustomerId());
Result<List<String>> volunteer = epmetHeartOpenFeignClient.volunteerUserIds(customerParam);
if(volunteer.success() && null != volunteer.getData() && !volunteer.getData().isEmpty()){
userIds.addAll(volunteer.getData());
userIds = userIds.stream().distinct().collect(Collectors.toList());
}
if(null == userIds || userIds.isEmpty()){
return allData;
}
PageHelper.startPage(customerUserFormDTO.getPageNo(),customerUserFormDTO.getPageSize());
allData = userWechatDao.selectResiAndStrangerInfo(userIds,customerUserFormDTO.getName());
if(null == allData || allData.isEmpty()){
return allData;
List<CustomerUser4PointResultDTO> allData = userWechatDao.selectResiAndStrangerInfo(customerUserFormDTO.getCustomerId(),customerUserFormDTO.getName());
if (CollectionUtils.isEmpty(allData)){
return new ArrayList<>();
}
allData.forEach(info -> {
if(StringUtils.isNotBlank(info.getUserId())){

1
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java

@ -311,6 +311,7 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us
userCustomerDao.updateRegistered(userResiInfoDTO.getCustomerId(), userResiInfoDTO.getUserId());
}else{
log.error("手机号客户内不可用,没有更新用户信息,param:{}", JSON.toJSONString(userResiInfoDTO));
throw new RenException(EpmetErrorCode.THE_MOBILE_HAS_BEEN_USED.getCode());
}
return result;

2
epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml

@ -22,7 +22,7 @@
pr.STAFF_ID = #{userId}
</foreach>
)
GROUP BY pr.STAFF_ID ORDER BY pr.CREATED_TIME DESC)t
ORDER BY pr.CREATED_TIME DESC)t GROUP BY STAFF_ID
</select>
<!-- 巡查记录查询 -->

4
epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml

@ -125,9 +125,7 @@
wechat.DEL_FLAG = '0'
AND (wechat.NICKNAME IS NOT NULL OR wechat.NICKNAME <![CDATA[ <> ]]> '')
AND (base.SURNAME IS NOT NULL OR base.SURNAME <![CDATA[ <> ]]> '')
<foreach collection="userIds" item="item" open="AND (" separator=" OR " close=" )">
wechat.USER_ID = #{item}
</foreach>
AND wechat.CUSTOMER_ID = #{customerId}
<if test='null != realName and "" != realName'>
AND (base.REAL_NAME LIKE concat('%',#{realName},'%') OR wechat.NICKNAME LIKE concat('%',#{realName},'%'))
</if>

Loading…
Cancel
Save