Browse Source

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

dev_shibei_match
jianjun 4 years ago
parent
commit
7fc3ecb9cd
  1. 2
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallbackFactory.java
  2. 4
      epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java
  3. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml
  4. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/feign/impl/DataReportOpenFeignClientFallBackFactory.java
  5. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java
  6. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java
  7. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml
  8. 1
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  9. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBackFactory.java
  10. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java
  11. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java
  12. 35
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java
  13. 54
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java
  14. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java
  15. 29
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java
  16. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java
  17. 36
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java
  18. 47
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml
  19. 20
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml
  20. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml
  21. 2
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallbackFactory.java
  22. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallbackFactory.java
  23. 2
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallbackFactory.java
  24. 2
      epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/fallback/OssFeignClientFallbackFactory.java
  25. 2
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallbackFactory.java
  26. 2
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallbackFactory.java
  27. 2
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallbackFactory.java
  28. 10
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java
  29. 2
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBackFactory.java
  30. 7
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java
  31. 2
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBackFactory.java
  32. 48
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java
  33. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallbackFactory.java
  34. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallbackFactory.java
  35. 14
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/SpecialSubjectDTO.java
  36. 4
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java
  37. 9
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java
  38. 4
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleListResultDTO.java
  39. 14
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/SubjectArticleListResultDTO.java
  40. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/SubjectListResultDTO.java
  41. 20
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java
  42. 2
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/feign/fallback/GovVoiceOpenFeignClientFallbackFactory.java
  43. 5
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java
  44. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/SpecialSubjectDao.java
  45. 9
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/SpecialSubjectEntity.java
  46. 44
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java
  47. 1
      epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.6__add_del_staffid.sql
  48. 18
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml
  49. 4
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml
  50. 2
      epmet-module/oper-access/oper-access-client/src/main/java/com/epmet/feign/fallback/OperAccessOpenFeignClientFallbackFactory.java
  51. 2
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallbackFactory.java
  52. 7
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFootBarDTO.java
  53. 2
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java
  54. 4
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java
  55. 2
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallbackFactory.java
  56. 8
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFootBarEntity.java
  57. 1
      epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.12__add_float_icon_path.sql
  58. 6
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml
  59. 2
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeDetailDao.xml
  60. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallbackFactory.java
  61. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java
  62. 1
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupCodeDao.xml
  63. 2
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallbackFactory.java
  64. 4
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java
  65. 2
      epmet-module/resi-voice/resi-voice-client/src/main/java/com/epmet/feign/fallback/ResiVoiceOpenFeignClientFallbackFactory.java
  66. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallbackFactory.java
  67. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java
  68. 20
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java
  69. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java
  70. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/StaffPatrolRecordDao.xml
  71. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml

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

@ -14,7 +14,7 @@ public class EpmetAdminOpenFeignClientFallbackFactory implements FallbackFactory
@Override
public EpmetAdminOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

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-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml

@ -21,7 +21,7 @@
ca.id,
ca.customer_id,
ca.pid,
ca.pids,
IF('' = ca.pids, '0', ca.pids) AS "pids" ,
ca.all_parent_name,
ca.organization_name,
ca.level,

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

@ -13,7 +13,7 @@ public class DataReportOpenFeignClientFallBackFactory implements FallbackFactory
@Override
public DataReportOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(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();

2
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

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.debug(String.format("FeignClient调用发生异常,异常信息:%s", 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 baseDao.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},

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

@ -14,7 +14,7 @@ public class EpmetCommonServiceOpenFeignClientFallbackFactory implements Fallbac
@Override
public EpmetCommonServiceOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

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

@ -14,7 +14,7 @@ public class EpmetHeartOpenFeignClientFallbackFactory implements FallbackFactory
@Override
public EpmetHeartOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

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

@ -14,7 +14,7 @@ public class EpmetMessageOpenFeignClientFallbackFactory implements FallbackFacto
@Override
public EpmetMessageOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

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

@ -14,7 +14,7 @@ public class OssFeignClientFallbackFactory implements FallbackFactory<OssFeignCl
@Override
public OssFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

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

@ -14,7 +14,7 @@ public class EpmetPointOpenFeignClientFallbackFactory implements FallbackFactory
@Override
public EpmetPointOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(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/EpmetThirdOpenFeignClientFallbackFactory.java

@ -12,7 +12,7 @@ public class EpmetThirdOpenFeignClientFallbackFactory implements FallbackFactory
private EpmetThirdOpenFeignClientFallback fallback = new EpmetThirdOpenFeignClientFallback();
@Override
public EpmetThirdOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(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/ThirdOpenFeignClientFallbackFactory.java

@ -14,7 +14,7 @@ public class ThirdOpenFeignClientFallbackFactory implements FallbackFactory<Thir
@Override
public ThirdOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(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));
}

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

@ -22,7 +22,7 @@ public class GovAccessFeignClientFallBackFactory implements FallbackFactory<GovA
@Override
public GovAccessFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(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());

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

@ -14,7 +14,7 @@ public class GovIssueOpenFeignClientFallBackFactory implements FallbackFactory<G
@Override
public GovIssueOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

48
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java

@ -17,6 +17,7 @@
package com.epmet.service.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
@ -31,10 +32,12 @@ import com.epmet.dto.result.StaffGridResultDTO;
import com.epmet.feign.*;
import com.epmet.service.StaffAgencyService;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
@ -214,13 +217,45 @@ public class StaffAgencyServiceImpl implements StaffAgencyService {
**/
@Override
public Result<CustomerGridByUserIdResultDTO> getLatestGrid(LatestGridFormDTO latestGridFormDTO) {
Result<CustomerGridByUserIdResultDTO> latestGridResult =
epmetUserFeignClient.getStaffLatestGrid(latestGridFormDTO);
//首先获取该员工的网格列表 如果为空则直接返回
Result<List<CustomerGridByUserIdResultDTO>> staffGridListResult = govOrgFeignClient.getMyGrids(latestGridFormDTO.getStaffId());
if (staffGridListResult == null || !staffGridListResult.success() || CollectionUtils.isEmpty(staffGridListResult.getData())){
logger.warn("getLatestGrid method getMyGrids return null,param:{}", JSON.toJSONString(latestGridFormDTO));
return new Result<>();
}
//获取该工作人员的最后访问记录 如果不为空 判断下是否所访问网格有效 无效则取工作人员的任意网格返回并生成记录 否则 直接返回访问记录中的网格
Result<CustomerGridByUserIdResultDTO> latestGridResult = epmetUserFeignClient.getStaffLatestGrid(latestGridFormDTO);
if (latestGridResult.success() && null != latestGridResult.getData() && StringUtils.isNotBlank(latestGridResult.getData().getGridId())) {
long count = staffGridListResult.getData().stream().filter(o -> o.getGridId().equals(latestGridResult.getData().getGridId())).count();
//count 如果==0 说明访问记录中的网格已经无效了 则直接查询工作人员最新的网格作为进入的网格
if (count == 0){
Result<CustomerGridByUserIdResultDTO> staffGridResult = getStaffLatestGridAndSaveVisitRecord(latestGridFormDTO);
if (staffGridResult != null) {
return staffGridResult;
}
}
return latestGridResult;
} else {
Result<CustomerGridByUserIdResultDTO> staffGridResult =
govOrgFeignClient.getStaffGrid(latestGridFormDTO);
Result<CustomerGridByUserIdResultDTO> staffGridResult = getStaffLatestGridAndSaveVisitRecord(latestGridFormDTO);
if (staffGridResult != null) {
return staffGridResult;
}
}
logger.info(String.format("客户id%s,staffId%s查询最后一次登录网格为空",latestGridFormDTO.getCustomerId(),latestGridFormDTO.getStaffId()));
return new Result<>();
}
/**
* desc: 根据参数获取工作人员最新网格 并生成网格网格记录
*
* @param latestGridFormDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.CustomerGridByUserIdResultDTO>
* @author LiuJanJun
* @date 2021/7/27 4:04 下午
*/
@Nullable
private Result<CustomerGridByUserIdResultDTO> getStaffLatestGridAndSaveVisitRecord(LatestGridFormDTO latestGridFormDTO) {
Result<CustomerGridByUserIdResultDTO> staffGridResult = govOrgFeignClient.getStaffGrid(latestGridFormDTO);
if (staffGridResult.success() && null != staffGridResult.getData() && StringUtils.isNotBlank(staffGridResult.getData().getGridId())) {
StaffGridVisitedFormDTO gridRecordParam = new StaffGridVisitedFormDTO();
gridRecordParam.setGridId(staffGridResult.getData().getGridId());
@ -232,10 +267,7 @@ public class StaffAgencyServiceImpl implements StaffAgencyService {
}
return staffGridResult;
}
}
logger.info(String.format("客户id%s,staffId%s查询最后一次登录网格为空",latestGridFormDTO.getCustomerId(),latestGridFormDTO.getStaffId()));
//.error(StaffAgencyConstant.QUERY_LATEST_GRID_INFO_FAILED)
return new Result<>();
return null;
}

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

@ -14,7 +14,7 @@ public class GovOrgOpenFeignClientFallbackFactory implements FallbackFactory<Gov
@Override
public GovOrgOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

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

@ -14,7 +14,7 @@ public class GovProjectOpenFeignClientFallbackFactory implements FallbackFactory
@Override
public GovProjectOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

14
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/SpecialSubjectDTO.java

@ -103,6 +103,18 @@ public class SpecialSubjectDTO implements Serializable {
*/
private Date updatedTime;
// 扩展属性
/**
* 标签名
*/
private String tagName;
/**
* 扩展属性标签颜色
*/
private String tagColor;
/**
* 删除人id
*/
private String delStaffId;
}

4
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java

@ -2,6 +2,7 @@ package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@ -12,7 +13,10 @@ import java.io.Serializable;
@Data
public class HotSubjectTagFormDTO implements Serializable {
private static final long serialVersionUID = -5526800827207175876L;
public interface HotSubjectTagGroup {}
private String customerId;
@NotBlank(message = "orgId不能为空", groups = HotSubjectTagGroup.class)
private String orgId;
@NotBlank(message = "pids不能为空", groups = HotSubjectTagGroup.class)
private String pids;
}

9
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java

@ -29,4 +29,13 @@ public class QuerySpecialSubFormDTO implements Serializable {
*/
@NotBlank(message = "pids不能为空", groups = AddUserInternalGroup.class)
private String pids;
/**
* 当前登录用户userId,
*/
private String userId;
/**
* 当前登录用户客户id
*/
private String customerId;
}

4
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleListResultDTO.java

@ -43,4 +43,8 @@ public class ArticleListResultDTO implements Serializable {
* */
private String tagName;
/**
* 文章封面
* */
private String articleCoverImg;
}

14
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/SubjectArticleListResultDTO.java

@ -44,4 +44,18 @@ public class SubjectArticleListResultDTO implements Serializable {
*/
private String tagNames;
/**
* 文章封面
*/
private String articleCoverImg;
public SubjectArticleListResultDTO() {
this.articleTitle = "";
this.articleContent = "";
this.articleId = "";
this.publisherName = "";
this.publishDate = "";
this.tagNames = "";
this.articleCoverImg = "";
}
}

5
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/SubjectListResultDTO.java

@ -14,11 +14,6 @@ public class SubjectListResultDTO implements Serializable {
private static final long serialVersionUID = -7761847964768693672L;
/**
* 专题ID
*/
private String specialSubjectId;
/**
* 标签ID
*/

20
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java

@ -1,8 +1,10 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 专题管理已有专题列表
@ -40,4 +42,22 @@ public class WorkSpecialSubjectResultDTO implements Serializable {
private String addOrgId;
private String orgLevel;
/**
* 创建时间-前端无用
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 创建人-前端无用
*/
private String createdBy;
/**
* 新增此专题用户所属的组织id
* mean:当前人是谁
* -前端无用
*/
private String addUserAgencyId;
}

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

@ -14,7 +14,7 @@ public class GovVoiceOpenFeignClientFallbackFactory implements FallbackFactory<G
@Override
public GovVoiceOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

5
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java

@ -93,7 +93,9 @@ public class SpecialSubjectController {
* @Date 2021/7/15 21:17
**/
@PostMapping("existedlist")
public Result<List<WorkSpecialSubjectResultDTO>> queryExistedList(@RequestBody QuerySpecialSubFormDTO formDTO) {
public Result<List<WorkSpecialSubjectResultDTO>> queryExistedList(@LoginUser TokenDto tokenDto, @RequestBody QuerySpecialSubFormDTO formDTO) {
formDTO.setUserId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO, QuerySpecialSubFormDTO.AddUserInternalGroup.class);
return new Result<List<WorkSpecialSubjectResultDTO>>().ok(specialSubjectService.queryExistedList(formDTO));
}
@ -107,6 +109,7 @@ public class SpecialSubjectController {
*/
@PostMapping("hot-subject-taglist")
public Result<List<TagInfoResultDTO>> hotSubjectTagList(@LoginUser TokenDto tokenDto, @RequestBody HotSubjectTagFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, HotSubjectTagFormDTO.HotSubjectTagGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<TagInfoResultDTO>>().ok(specialSubjectService.hotSubjectTagList(formDTO));
}

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/SpecialSubjectDao.java

@ -38,6 +38,6 @@ public interface SpecialSubjectDao extends BaseDao<SpecialSubjectEntity> {
List<SpecialSubjectDTO> queryExistedList(@Param("orgId") String orgId,@Param("notList")List<String> notList);
SpecialSubjectEntity getInfo(@Param("tagId") String tagId);
SpecialSubjectDTO getInfo(@Param("tagId") String tagId);
}

9
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/SpecialSubjectEntity.java

@ -44,7 +44,7 @@ public class SpecialSubjectEntity extends BaseEpmetEntity {
* 标签id
*/
private String tagId;
private String tagName;
/**
* 新增此专题的用户id
*/
@ -52,6 +52,7 @@ public class SpecialSubjectEntity extends BaseEpmetEntity {
/**
* 新增此专题时用户所在的组织id或者网格id
* mean:给谁添加的
*/
private String addOrgId;
@ -76,7 +77,13 @@ public class SpecialSubjectEntity extends BaseEpmetEntity {
/**
* 新增此专题用户所属的组织id
* mean:当前人是谁
*/
private String addUserAgencyId;
/**
* 删除人id
*/
private String delStaffId;
}

44
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java

@ -145,6 +145,8 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
QuerySpecialSubFormDTO querySpecialSubFormDTO=new QuerySpecialSubFormDTO();
querySpecialSubFormDTO.setOrgId(formDTO.getOrgId());
querySpecialSubFormDTO.setPids(formDTO.getPids());
querySpecialSubFormDTO.setUserId(formDTO.getAddUserId());
querySpecialSubFormDTO.setCustomerId(formDTO.getCustomerId());
List<WorkSpecialSubjectResultDTO> havedList=this.queryExistedList(querySpecialSubFormDTO);
List<String> haveTagIds=havedList.stream().map(WorkSpecialSubjectResultDTO::getTagId).distinct().collect(Collectors.toList());
haveTagIds.forEach(tagId->{
@ -156,6 +158,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
SpecialSubjectEntity insertEntity = ConvertUtils.sourceToTarget(formDTO, SpecialSubjectEntity.class);
StaffInfoFromDTO staffInfoFromDTO = new StaffInfoFromDTO();
staffInfoFromDTO.setStaffId(formDTO.getAddUserId());
staffInfoFromDTO.setCustomerId(formDTO.getCustomerId());
Result<MineResultDTO> result = govOrgOpenFeignClient.queryStaffProfile(staffInfoFromDTO);
if(result.success()&&null!=result.getData()){
insertEntity.setAddUserAgencyId(result.getData().getAgencyId());
@ -180,6 +183,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
SpecialSubjectEntity original = baseDao.selectById(formDTO.getSpecialSubjectId());
if (null != original) {
if (!original.getAddOrgId().equals(formDTO.getOrgId())) {
log.warn("当前专题id=" + original.getId() + ";是属于orgId=" + original.getAddOrgId() + ";当前用户正处在orgId=" + formDTO.getOrgId()+";所以无权删除");
throw new RenException(EpmetErrorCode.CAN_NOT_DEL_SPECIAL_PROJECT.getCode(), EpmetErrorCode.CAN_NOT_DEL_SPECIAL_PROJECT.getMsg());
}
baseDao.delSpecialSubject(formDTO.getSpecialSubjectId(), formDTO.getUserId());
@ -197,6 +201,13 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
*/
@Override
public List<WorkSpecialSubjectResultDTO> queryExistedList(QuerySpecialSubFormDTO formDTO) {
StaffInfoFromDTO staffInfoFromDTO = new StaffInfoFromDTO();
staffInfoFromDTO.setStaffId(formDTO.getUserId());
staffInfoFromDTO.setCustomerId(formDTO.getCustomerId());
Result<MineResultDTO> staffResult = govOrgOpenFeignClient.queryStaffProfile(staffInfoFromDTO);
if (!staffResult.success() && null == staffResult.getData()) {
throw new RenException("查询当前工作人员信息异常");
}
List<WorkSpecialSubjectResultDTO> resultDTOList = new ArrayList<>();
List<String> notList = new ArrayList<>();
//当前组织或者网格自己建立的
@ -207,9 +218,20 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
result.setSpecialSubjectId(dto.getId());
result.setTagId(dto.getTagId());
result.setTagName(dto.getTagName());
//1、如果当前专题是给当前所在组织(or网格)添加的;
//2、当前工作人员所属的组织,与专题添加人所属的组织一致,同时满足这两个条件即可删除
if(dto.getAddUserAgencyId().equals(staffResult.getData().getAgencyId())
&& dto.getAddOrgId().equals(formDTO.getOrgId())){
result.setCanDel(true);
}else{
result.setCanDel(false);
}
result.setAddOrgId(dto.getAddOrgId());
result.setOrgLevel(dto.getOrgLevel());
result.setTagColor(dto.getTagColor());
result.setCreatedTime(dto.getCreatedTime());
result.setCreatedBy(dto.getCreatedBy());
result.setAddUserAgencyId(dto.getAddUserAgencyId());
currentOrgList.add(result);
});
if (CollectionUtils.isNotEmpty(currentOrgList)) {
@ -229,9 +251,20 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
result.setSpecialSubjectId(dto.getId());
result.setTagId(dto.getTagId());
result.setTagName(dto.getTagName());
//1、如果当前专题是给当前所在组织(or网格)添加的;
//2、当前工作人员所属的组织,与专题添加人所属的组织一致,同时满足这两个条件即可删除
if (dto.getAddUserAgencyId().equals(staffResult.getData().getAgencyId())
&& dto.getAddOrgId().equals(formDTO.getOrgId())) {
result.setCanDel(true);
} else {
result.setCanDel(false);
}
result.setAddOrgId(dto.getAddOrgId());
result.setOrgLevel(dto.getOrgLevel());
result.setTagColor(dto.getTagColor());
result.setCreatedTime(dto.getCreatedTime());
result.setCreatedBy(dto.getCreatedBy());
result.setAddUserAgencyId(dto.getAddUserAgencyId());
resultDTOList.add(result);
});
}
@ -280,14 +313,17 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl<SpecialSubjectDao
@Override
public List<PreviewResultDTO> preview(PreviewFormDTO formDTO) {
List<PreviewResultDTO> result = new ArrayList<>();
if (CollectionUtils.isNotEmpty(formDTO.getTagIdList())) {
formDTO.getTagIdList().forEach(tagId -> {
PreviewResultDTO previewResultDTO = new PreviewResultDTO();
SpecialSubjectEntity subjectEntity = baseDao.getInfo(tagId);
previewResultDTO.setSpecialSubjectId(subjectEntity.getId());
previewResultDTO.setTagName(subjectEntity.getTagName());
previewResultDTO.setArticleList(articleService.getArticleListByTag(tagId, formDTO.getPageNo(), formDTO.getPageSize()));
// SpecialSubjectDTO subject = baseDao.getInfo(tagId);
// previewResultDTO.setSpecialSubjectId(subject.getId());
// previewResultDTO.setTagName(subject.getTagName());
previewResultDTO.setArticleList(articleService.getArticleListByTag(tagId, formDTO.getPageNo() - NumConstant.ONE,
formDTO.getPageSize()));
result.add(previewResultDTO);
});
}
return result;
}

1
epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.6__add_del_staffid.sql

@ -0,0 +1 @@
alter table special_subject add COLUMN DEL_STAFF_ID VARCHAR(64) COMMENT '删除人id' AFTER ADD_USER_AGENCY_ID;

18
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml

@ -355,15 +355,18 @@
art.PUBLISHER_NAME AS publisherName,
art.PUBLISH_DATE AS publishDate,
IFNULL( art.PREVIEW_CONTENT, '' ) AS articleContent,
IFNULL( art.TAGS, '' ) AS tagNames
IFNULL( art.TAGS, '' ) AS tagNames,
IFNULL(ac.IMG_URL,'') AS articleCoverImg
FROM ARTICLE art
LEFT JOIN ARTICLE_PUBLISH_RANGE prange ON
(art.ID = prange.ARTICLE_ID AND prange.DEL_FLAG = '0' AND prange.PUBLISH_STATUS = 'published' AND prange.GRID_ID = #{gridId} )
(art.ID = prange.ARTICLE_ID AND prange.DEL_FLAG = '0' AND prange.PUBLISH_STATUS = 'published')
LEFT JOIN article_tags ats ON (ats.ARTICLE_ID = art.ID)
LEFT JOIN article_cover ac ON (ac.ARTICLE_ID = art.ID AND ac.DEL_FLAG = 0)
WHERE
art.DEL_FLAG = '0'
AND art.STATUS_FLAG = 'published'
AND ats.TAG_ID = #{tagId}
AND prange.GRID_ID = #{gridId}
ORDER BY
art.PUBLISH_DATE DESC,
art.CREATED_TIME DESC
@ -372,8 +375,7 @@
<!-- 专题列表查询 -->
<select id="subjectList" resultType="com.epmet.dto.result.SubjectListResultDTO">
SELECT
ss.ID AS specialSubjectId,
ss.TAG_ID,
DISTINCT (ss.TAG_ID) AS tagId,
tc.TAG_NAME,
tc.TAG_COLOR
FROM special_subject ss
@ -388,23 +390,27 @@
<foreach collection="pidList" item="pid" separator=" , ">
#{pid}
</foreach>
,ss.CREATED_TIME DESC
</select>
<select id="selectArticleListByTag" resultType="com.epmet.dto.result.ArticleListResultDTO">
SELECT
art.ID AS articleId,
art.TITLE AS articleTitle,
art.PUBLISHER_NAME AS publishName,
art.PUBLISH_DATE AS publishDate,
ac.IMG_URL AS articleCoverImg,
date_format(art.PUBLISH_DATE,'%Y-%m-%d') AS publishDate,
IFNULL(art.PREVIEW_CONTENT,'') AS articleContent,
IFNULL(art.TAGS,'') AS tagName
FROM
ARTICLE art
INNER JOIN ARTICLE_PUBLISH_RANGE prange
LEFT JOIN article_cover ac ON art.ID = ac.ARTICLE_ID
LEFT JOIN ARTICLE_PUBLISH_RANGE prange
ON art.ID = prange.ARTICLE_ID
AND
prange.DEL_FLAG = '0'
AND
prange.PUBLISH_STATUS = 'published'
WHERE
art.DEL_FLAG = '0'
AND art.STATUS_FLAG = 'published'

4
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml

@ -4,7 +4,7 @@
<mapper namespace="com.epmet.dao.SpecialSubjectDao">
<update id="delSpecialSubject" parameterType="map">
update special_subject set del_flag='1',UPDATED_BY=#{userId},UPDATED_TIME=Now()
update special_subject set del_flag='1',UPDATED_BY=#{userId},UPDATED_TIME=Now(),DEL_STAFF_ID=#{userId}
where id=#{id}
</update>
@ -28,7 +28,7 @@
</if>
order by ss.CREATED_TIME desc
</select>
<select id="getInfo" resultType="com.epmet.entity.SpecialSubjectEntity">
<select id="getInfo" resultType="com.epmet.dto.SpecialSubjectDTO">
SELECT
ss.id,
TAG_NAME

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

@ -13,7 +13,7 @@ public class OperAccessOpenFeignClientFallbackFactory implements FallbackFactory
@Override
public OperAccessOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

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

@ -14,7 +14,7 @@ public class OperCrmOpenFeignClientFallbackFactory implements FallbackFactory<Op
@Override
public OperCrmOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

7
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/CustomerFootBarDTO.java

@ -17,9 +17,10 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -100,4 +101,8 @@ public class CustomerFootBarDTO implements Serializable {
private Boolean display;
/**
* 浮起时图标
*/
private String floatIconPath;
}

2
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/CustomerFootBarFormDTO.java

@ -69,6 +69,8 @@ public class CustomerFootBarFormDTO {
@NotNull(message = "显示状态不能为空", groups = { UpdateDisplayStatusGroup.class })
private Boolean display;
@NotBlank(message = "浮起时图标不能为空", groups = { CreateFootBarGroup.class, UpdateFootBarGroup.class })
private String floatIconPath;
/**
* 排序索引号dto
*/

4
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFootBarResultDTO.java

@ -108,4 +108,8 @@ public class CustomerFootBarResultDTO implements Serializable {
private String defaultPageTitle;
/**
* 浮起时图标
*/
private String floatIconPath;
}

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

@ -14,7 +14,7 @@ public class OperCustomizeOpenFeignClientFallbackFactory implements FallbackFact
@Override
public OperCustomizeOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

8
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/CustomerFootBarEntity.java

@ -18,13 +18,10 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* APP底部菜单栏信息
*
@ -80,4 +77,9 @@ public class CustomerFootBarEntity extends BaseEpmetEntity {
*/
private Boolean display;
/**
* 浮起时图标
*/
private String floatIconPath;
}

1
epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.12__add_float_icon_path.sql

@ -0,0 +1 @@
alter table customer_foot_bar add COLUMN FLOAT_ICON_PATH VARCHAR(255) COMMENT '凸起时图标路径' AFTER SELECTED_ICON_PATH;

6
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml

@ -95,7 +95,8 @@
created_by,
created_time,
updated_by,
updated_time
updated_time,
FLOAT_ICON_PATH as floatIconPath
FROM
customer_foot_bar
<where>
@ -152,7 +153,8 @@
created_by,
created_time,
updated_by,
updated_time
updated_time,
FLOAT_ICON_PATH as floatIconPath
from customer_foot_bar
where CUSTOMER_ID = #{customerId}
and APP_TYPE = #{appType}

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
(

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

@ -14,7 +14,7 @@ public class ResiGroupOpenFeignClientFallbackFactory implements FallbackFactory<
@Override
public ResiGroupOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(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>

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

@ -14,7 +14,7 @@ public class ResiPartyMemberOpenFeignClientFallbackFactory implements FallbackFa
@Override
public ResiPartyMemberOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(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 =

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

@ -12,7 +12,7 @@ public class ResiVoiceOpenFeignClientFallbackFactory implements FallbackFactory<
private ResiVoiceOpenFeignClientFallback fallback = new ResiVoiceOpenFeignClientFallback();
@Override
public ResiVoiceOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}
}

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

@ -12,7 +12,7 @@ public class EpmetUserOpenFeignClientFallbackFactory implements FallbackFactory<
private EpmetUserOpenFeignClientFallback fallback = new EpmetUserOpenFeignClientFallback();
@Override
public EpmetUserOpenFeignClient create(Throwable cause) {
log.debug(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(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