Browse Source

Merge remote-tracking branch 'remotes/origin/dev'

# Conflicts:
#	epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml
#	epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml
master
jianjun 4 years ago
parent
commit
a75c0da088
  1. 8
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java
  2. 7
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  3. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java
  4. 28
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/UserEventLogoResultDTO.java
  5. 6
      epmet-module/data-aggregator/data-aggregator-server/pom.xml
  6. 20
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java
  7. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/ResiUserBadgeDao.java
  8. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java
  9. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
  10. 35
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  11. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java
  12. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
  13. 13
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/ResiUserBadgeDao.xml
  14. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
  15. 85
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ResiEventDTO.java
  16. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java
  17. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java
  18. 34
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java
  19. 20
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
  20. 26
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
  21. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java
  22. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java
  23. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
  24. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.23__resi_event.sql
  25. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
  26. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
  27. 19
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
  28. 2
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java
  29. 2
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppDao.java
  30. 2
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java
  31. 4
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java
  32. 3
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppDao.xml
  33. 28
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  34. 5
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/RedDotFormDTO.java
  35. 5
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java
  36. 20
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java
  37. 20
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java
  38. 22
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java
  39. 66
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/OrgLevelEnums.java
  40. 37
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  41. 20
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  42. 34
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java
  43. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
  44. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java
  45. 24
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java
  46. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
  47. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
  48. 24
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java
  49. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
  50. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java
  51. 33
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  52. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
  53. 27
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
  54. 34
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  55. 10
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
  56. 21
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
  57. 47
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/EventProjectInfoDTO.java
  58. 42
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ChooseResolveFormDTO.java
  59. 29
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/CloseResiEventFormDTO.java
  60. 24
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventDetailFormDTO.java
  61. 32
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventListFormDTO.java
  62. 23
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventShiftProjectDTO.java
  63. 97
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java
  64. 41
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MentionUserFormDTO.java
  65. 42
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportedFormDTO.java
  66. 34
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReCallEventFormDTO.java
  67. 34
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyFormDTO.java
  68. 26
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyListFormDTO.java
  69. 34
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReportOrgFormDTO.java
  70. 85
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java
  71. 43
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UpdateViewTimeFormDTO.java
  72. 44
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UserMentionFormDTO.java
  73. 108
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java
  74. 48
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventListResultDTO.java
  75. 17
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventToProjectResultDTO.java
  76. 65
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportedResultDTO.java
  77. 34
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java
  78. 22
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java
  79. 38
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ReplyListResultDTO.java
  80. 24
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventIdDTO.java
  81. 30
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventManageRedDotRes.java
  82. 61
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UserMentionResultDTO.java
  83. 12
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  84. 13
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  85. 52
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/EventConstant.java
  86. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java
  87. 61
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ResiEventAction.java
  88. 30
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/EventController.java
  89. 18
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java
  90. 216
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java
  91. 113
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventReplyController.java
  92. 11
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
  93. 12
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventAttachmentDao.java
  94. 91
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventDao.java
  95. 70
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventMentionDao.java
  96. 47
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventOperationLogDao.java
  97. 45
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReplyDao.java
  98. 67
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReportOrgDao.java
  99. 76
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventAttachmentEntity.java
  100. 146
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventEntity.java

8
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java

@ -187,7 +187,13 @@ public enum RequirePermissionEnum {
/**
* 基层治理-巡查
*/
WORK_GRASSROOT_GOVERN_PATROL("work_grassroot_govern_patrol","基层治理:巡查","巡查");
WORK_GRASSROOT_GOVERN_PATROL("work_grassroot_govern_patrol","基层治理:巡查","巡查"),
/**
* 基层治理-群众直报 功能入口
*/
RESI_EVENT_MANAGE("resi_event_manage","基层治理:群众直报","基层治理-群众直报");
private String key;
private String name;

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

@ -95,6 +95,13 @@ public enum EpmetErrorCode {
IMG_SCAN_FAILED(8504,"图片审核失败,请重新上传"),
PROJECT_IS_CLOSED(8601,"项目已结案"),
VOTE_ISSUE_PLEASE(8602,"请先选择支持或反对,再发表您的想法"),
RESI_EVENT_READ(8603,"当前事件正在处理中,不能撤回"),
RESI_EVENT_NOT_MY_REPORTED(8604,"当前事件不是您发布的,无权操作"),
CAN_NOT_REPLY_RESI_EVENT_GOV(8605,"办结、立项处理后不可回复"),
CAN_NOT_REPLY_RESI_EVENT_SELF(8606,"当前事件待处理,不可回复"),
RESI_EVENT_CAN_NOT_CLOSE_CASE(8607,"事件尚未处理,请处理完成后进行办结"),
RESI_EVENT_SHIFT_PROJECT(8608,"事件已立项,请勿重复操作"),
// 爱心互助 居民端
NOT_IN_THE_SIGN_IN_RANGE(8510, "您还未进入指定的签到范围~"),
// 活动报名失败,弹窗:志愿者认证

5
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java

@ -30,8 +30,11 @@ public interface ResultDataResolver {
//}
/**
* @Description 获取Result种的data如果失败(返回result为null或者result.success为false)那么抛出异常
* @Description
* @return
* @param targetServiceName 目标service名称
* @param errorCode 错误码可以为空为空则使用上游服务抛出的错误码
* @param errorInternalMsg 错误信息可以为空为空则使用上游服务抛出的异常信息
* @author wxz
* @date 2021.06.07 22:45
*/

28
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/UserEventLogoResultDTO.java

@ -0,0 +1,28 @@
package com.epmet.dataaggre.dto.epmetuser.result;
import lombok.Data;
import java.io.Serializable;
/**
* 人大代表个人中心是否显示@me
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 15:01
*/
@Data
public class UserEventLogoResultDTO implements Serializable {
private static final long serialVersionUID = 3232361347890014097L;
/**
* true:人大代表false不是人大代表此列用来判断是否显示@我
*/
private Boolean isNpc;
/**
* 展示红点true隐藏false
*/
private Boolean redDot;
public UserEventLogoResultDTO(){
this.isNpc=false;
this.redDot=false;
}
}

6
epmet-module/data-aggregator/data-aggregator-server/pom.xml

@ -76,6 +76,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-user-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

20
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java

@ -8,15 +8,10 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberStatsFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolDateListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolRecordListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.OpenStaffDetailResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDateListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolRecordListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PersonalPatrolListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
@ -201,4 +196,17 @@ public class EpmetUserController {
}
/**
* 我要报事-人大代表个人中心 是否显示@我是否显示红点
*
* @param tokenDto
* @return com.epmet.commons.tools.utils.Result<com.epmet.dataaggre.dto.epmetuser.result.UserEventLogoResultDTO>
* @author yinzuomei
* @date 2021/8/3 15:07
*/
@PostMapping("mentionme")
public Result<UserEventLogoResultDTO> mentionMeEvent(@LoginUser TokenDto tokenDto){
return new Result<UserEventLogoResultDTO>().ok(epmetUserService.mentionMeEvent(tokenDto.getUserId()));
}
}

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/ResiUserBadgeDao.java

@ -20,6 +20,7 @@ package com.epmet.dataaggre.dao.epmetuser;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.entity.epmetuser.ResiUserBadgeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 用户徽章关系表
@ -30,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ResiUserBadgeDao extends BaseDao<ResiUserBadgeEntity> {
ResiUserBadgeEntity selectUserByBadge(@Param("userId")String userId, @Param("badgeKey")String badgeKey);
}

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java

@ -68,4 +68,6 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
List<String> selectDepartmentNameList(ProjectDTO project);
List<ProjectDistributionResultDTO> selectList(@Param("customerId") String customerId,@Param("list")List<String> issueIds);
int countRedDot(String userId);
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java

@ -86,4 +86,14 @@ public interface EpmetUserService {
* @Author sun
**/
List<StaffRoleListResultDTO> getStaffRoleList(String customerId, String userId);
/**
* 我要报事-人大代表个人中心 是否显示@我是否显示红点
*
* @param userId
* @return com.epmet.dataaggre.dto.epmetuser.result.UserEventLogoResultDTO
* @author yinzuomei
* @date 2021/8/3 15:09
*/
UserEventLogoResultDTO mentionMeEvent(String userId);
}

35
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -3,11 +3,9 @@ package com.epmet.dataaggre.service.epmetuser.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.BadgeConstant;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmetuser.CustomerStaffDao;
import com.epmet.dataaggre.dao.epmetuser.StaffPatrolRecordDao;
import com.epmet.dataaggre.dao.epmetuser.StaffRoleDao;
import com.epmet.dataaggre.dao.epmetuser.UserBaseInfoDao;
import com.epmet.dataaggre.dao.epmetuser.*;
import com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO;
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolDetailDTO;
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolRecordDTO;
@ -19,10 +17,12 @@ import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
import com.epmet.dataaggre.entity.epmetuser.ResiUserBadgeEntity;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.dataaggre.service.epmetuser.StaffPatrolDetailService;
import com.epmet.dataaggre.service.epmetuser.StaffPatrolRecordService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.govproject.GovProjectService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -57,6 +57,10 @@ public class EpmetUserServiceImpl implements EpmetUserService {
private StaffRoleDao staffRoleDao;
@Resource
private CustomerStaffDao customerStaffDao;
@Autowired
private ResiUserBadgeDao resiUserBadgeDao;
@Autowired
private GovProjectService govProjectService;
/**
* @Description 根据UserIds查询
@ -395,5 +399,28 @@ public class EpmetUserServiceImpl implements EpmetUserService {
return staffRoleDao.selectStaffRoleList(customerId, userId);
}
/**
* 我要报事-人大代表个人中心 是否显示@我是否显示红点
*
* @param userId
* @return com.epmet.dataaggre.dto.epmetuser.result.UserEventLogoResultDTO
* @author yinzuomei
* @date 2021/8/3 15:09
*/
@Override
public UserEventLogoResultDTO mentionMeEvent(String userId) {
UserEventLogoResultDTO resultDTO = new UserEventLogoResultDTO();
ResiUserBadgeEntity resiUserBadgeEntity = resiUserBadgeDao.selectUserByBadge(userId, BadgeConstant.BADGE_KEY_NPC);
//是否是人大代表
if (null != resiUserBadgeEntity) {
resultDTO.setIsNpc(true);
}
//展示红点:true;隐藏:false
if(govProjectService.countRedDot(userId)>0){
resultDTO.setRedDot(true);
};
return resultDTO;
}
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java

@ -41,4 +41,14 @@ public interface GovProjectService {
List<ProjectDistributionResultDTO> queryProjectDistribution(ProjectDistributionFormDTO formDTO);
/**
* 查询resi_event_mention
*
* @param userId
* @return int
* @author yinzuomei
* @date 2021/8/3 15:27
*/
int countRedDot(String userId);
}

14
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java

@ -233,4 +233,18 @@ public class GovProjectServiceImpl implements GovProjectService {
throw new RenException("计算首次响应时间失败");
}
}
/**
* 查询resi_event_mention
*
* @param userId
* @return int
* @author yinzuomei
* @date 2021/8/3 15:27
*/
@Override
public int countRedDot(String userId) {
return projectDao.countRedDot(userId);
}
}

13
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/ResiUserBadgeDao.xml

@ -3,4 +3,17 @@
<mapper namespace="com.epmet.dataaggre.dao.epmetuser.ResiUserBadgeDao">
<select id="selectUserByBadge" parameterType="map" resultType="com.epmet.dataaggre.entity.epmetuser.ResiUserBadgeEntity">
SELECT
rub.*
FROM
resi_user_badge rub
INNER JOIN badge b ON ( rub.BADGE_ID = b.ID )
WHERE
rub.DEL_FLAG = '0'
AND b.DEL_FLAG = '0'
AND rub.USER_ID = #{userId}
AND b.BADGE_KEY = #{badgeKey}
AND rub.CERTIFICATION_AUTID_STATUS = 'approved'
</select>
</mapper>

11
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml

@ -144,4 +144,15 @@
</foreach>
order by p.CREATED_TIME desc
</select>
<select id="countRedDot" parameterType="java.lang.String" resultType="int">
SELECT
count(1) as total
FROM
resi_event_mention rem
WHERE
rem.DEL_FLAG = '0'
AND rem.RED_DOT = '1'
AND rem.USER_ID = #{userId}
</select>
</mapper>

85
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ResiEventDTO.java

@ -0,0 +1,85 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.project;
import lombok.Data;
import java.io.Serializable;
/**
* 居民报事表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@Data
public class ResiEventDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 事件id
*/
private String resiEventId;
/**
* 报给
网格grid
社区community
街道:street
区县级: district
市级: city
省级:province
*/
private String orgType;
/**
* 报给的组织或者网格id
*/
private String orgId;
/**
* org_id的上级组织idorg_id是跟组织此列为0
*/
private String orgPid;
/**
* org_id的所有上级组织idorg_id是跟组织此列为0
*/
private String orgPids;
/**
* 含义已读read未读un_read组织下的工作人员从待处理=>处理中点击查看详情前更新为已读
*/
private String orgRead;
/**
* (1)含义1:展示红点0不展示(2)注意发布事件插入数据时为1(3)何时更新人大代表回复or报事人回复or工作人员回复立项办结更新为1
*/
private Boolean redDot;
private String projectId;
private String createdBy;
}

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java

@ -81,4 +81,5 @@ public interface ProjectConstant {
* 项目来源于 工作端立项
*/
String PROJECT_ORIGIN_AGENCY="agency";
String PROJECT_ORIGIN_EVENT="resi_event";
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java

@ -19,10 +19,7 @@ package com.epmet.dao.project;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.project.ProjectAgencyDTO;
import com.epmet.dto.project.ProjectCategoryDTO;
import com.epmet.dto.project.ProjectGridDTO;
import com.epmet.dto.project.ProjectPointDTO;
import com.epmet.dto.project.*;
import com.epmet.dto.project.result.ProjectExceedParamsResultDTO;
import com.epmet.entity.project.ProjectEntity;
import org.apache.ibatis.annotations.Mapper;
@ -194,4 +191,11 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
List<String> selectClosedProjectIds(@Param("customerId")String customerId,
@Param("origin")String origin,
@Param("projectStatus")String projectStatus);
/**
* 获取已转项目事件事件
* @param customerId
* @return
*/
List<ResiEventDTO> getEventList(@Param("customerId")String customerId);
}

34
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java

@ -206,24 +206,54 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
Map<String, OrgStatisticsResultDTO> projectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.RESOLVED,
OrgTypeConstant.AGENCY);
Map<String, OrgStatisticsResultDTO> eventProjectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.RESOLVED,
ProjectConstant.PROJECT_ORIGIN_EVENT);
if (!projectResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = projectResolvedTotal.get(item.getAgencyId());
int sum = item.getApprovalProjectResolvedCount();
if (null != dto) {
sum = sum + dto.getSum();
}
item.setApprovalProjectResolvedCount(sum);
});
}
if (!eventProjectResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = eventProjectResolvedTotal.get(item.getAgencyId());
int sum = item.getApprovalProjectResolvedCount();
if (null != dto) {
item.setApprovalProjectResolvedCount(dto.getSum());
sum = sum + dto.getSum();
}
item.setApprovalProjectResolvedCount(sum);
});
}
// 当前组织内:来源于议题的项目:结案无需解决数
Map<String, OrgStatisticsResultDTO> projectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.UNRESOLVED,
OrgTypeConstant.AGENCY);
Map<String, OrgStatisticsResultDTO> eventProjectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.UNRESOLVED,
ProjectConstant.PROJECT_ORIGIN_EVENT);
if (!projectUnResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = projectUnResolvedTotal.get(item.getAgencyId());
int sum = item.getApprovalProjectUnResolvedCount();
if (null != dto) {
sum = sum + dto.getSum();
}
item.setApprovalProjectUnResolvedCount(sum);
});
}
if (!eventProjectUnResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = eventProjectUnResolvedTotal.get(item.getAgencyId());
int sum = item.getApprovalProjectUnResolvedCount();
if (null != dto) {
item.setApprovalProjectUnResolvedCount(dto.getSum());
sum = sum + dto.getSum();
}
item.setApprovalProjectUnResolvedCount(sum);
});
}
}

20
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java

@ -108,6 +108,8 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
Map<String,Integer> issueProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_ISSUE,DimObjectStatusConstant.UNRESOLVED);
Map<String,Integer> approvalProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_AGENCY,DimObjectStatusConstant.RESOLVED);
Map<String,Integer> approvalProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_AGENCY,DimObjectStatusConstant.UNRESOLVED);
Map<String,Integer> eventProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_EVENT,DimObjectStatusConstant.RESOLVED);
Map<String,Integer> eventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_EVENT,DimObjectStatusConstant.UNRESOLVED);
Map<String, Integer> inGroupTopicResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.RESOLVED,NumConstant.ZERO_STR);
Map<String, Integer> inGroupTopicUnResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.UNRESOLVED,NumConstant.ZERO_STR);
Map<String, GovernGridClosedTotalCommonDTO> dtoMap=getGovernGridClosedTotalCommonDTOMap(customerId,gridIds);
@ -142,14 +144,24 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
insertEntity.setIssueProjectUnResolvedCount(issueProjectUnResolvedMap.get(insertEntity.getGridId()));
}
//7、当前网格内:项目立项,结案已解决数;默认为0,
int resolveCount = 0;
if(approvalProjectResolvedMap.containsKey(insertEntity.getGridId())){
insertEntity.setApprovalProjectResolvedCount(approvalProjectResolvedMap.get(insertEntity.getGridId()));
resolveCount = resolveCount + approvalProjectResolvedMap.get(insertEntity.getGridId());
}
if(eventProjectResolvedMap.containsKey(insertEntity.getGridId())){
resolveCount = resolveCount + eventProjectResolvedMap.get(insertEntity.getGridId());
}
insertEntity.setApprovalProjectResolvedCount(resolveCount);
// 8、当前网格内:项目立项,结案无需解决数;默认为0,
int unResolveCount = 0;
if(approvalProjectUnResolvedMap.containsKey(insertEntity.getGridId())){
insertEntity.setApprovalProjectUnResolvedCount(approvalProjectUnResolvedMap.get(insertEntity.getGridId()));
unResolveCount = resolveCount + approvalProjectUnResolvedMap.get(insertEntity.getGridId());
}
if(eventProjectUnResolvedMap.containsKey(insertEntity.getGridId())){
unResolveCount = resolveCount + eventProjectUnResolvedMap.get(insertEntity.getGridId());
}
insertEntity.setApprovalProjectUnResolvedCount(unResolveCount);
// 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
// 9、当前网格内,未出小组即未转议题的:话题关闭已解决数
if(inGroupTopicResolvedMap.containsKey(insertEntity.getGridId())){
@ -318,7 +330,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
// 12、来源于议题的项目,未出网格(在网格内流转的)结案并且无需解决的项目数
fromIssueUnResolvedInGridCount += 1;
}
} else if (ProjectConstant.PROJECT_ORIGIN_AGENCY.equals(governProjectInfoDTO.getOrigin())) {
} else if (ProjectConstant.PROJECT_ORIGIN_AGENCY.equals(governProjectInfoDTO.getOrigin()) || ProjectConstant.PROJECT_ORIGIN_EVENT.equals(governProjectInfoDTO.getOrigin())) {
if (ProjectConstant.RESOLVED.equals(governProjectInfoDTO.getIsResolved())) {
// 13、来源于项目立项的项目,未出网格(在网格内流转的)结案,并且已解决的项目数;因现在网格不能立项,所以此列默认为0
fromAgencyResolvedInGridCount += 1;

26
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java

@ -16,6 +16,7 @@ import com.epmet.dto.issue.IssueDTO;
import com.epmet.dto.party.PartyMemberDTO;
import com.epmet.dto.project.FinishOrgDTO;
import com.epmet.dto.project.ProcessInfoDTO;
import com.epmet.dto.project.ResiEventDTO;
import com.epmet.dto.project.result.ProjectOrgPeriodResultDTO;
import com.epmet.dto.result.WorkDayResultDTO;
import com.epmet.dto.topic.ResiTopicDTO;
@ -41,10 +42,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -128,6 +126,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
List<ProjectDTO> projectList = projectService.getProjectInfo(customerId, dateString);
factOriginProjectMainDailyService.deleteByDate(customerId, dateString);
if (!CollectionUtils.isEmpty(projectList)) {
Map<String, ResiEventDTO> projectEventMap = projectService.getEventList(customerId);
//提取议题ID
List<String> issueIds =
projectList.stream().filter(item -> ProjectConstant.ISSUE.equals(item.getOrigin())).map(ProjectDTO::getOriginId).collect(Collectors.toList());
@ -154,11 +153,6 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
entity.setMonthId(dimId.getMonthId());
entity.setWeekId(dimId.getWeekId());
entity.setDateId(dimId.getDateId());
if (ProjectConstant.ISSUE.equals(project.getOrigin())) {
entity.setIssueId(project.getOriginId());
} else {
entity.setIssueId("");
}
entity.setProjectStatus(project.getStatus());
entity.setIsResolved(project.getClosedStatus());
entity.setCreatedTime(project.getCreatedTime());
@ -168,6 +162,20 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
entity.setTopicId("");
entity.setTopicCreatorId("");
entity.setGridId("");
if (ProjectConstant.ISSUE.equals(project.getOrigin())) {
entity.setIssueId(project.getOriginId());
} else if (ProjectConstant.PROJECT_ORIGIN_EVENT.equals(project.getOrigin())){
entity.setIssueId("");
ResiEventDTO eventDTO = projectEventMap.get(project.getId());
if (null != eventDTO) {
if (ProjectConstant.PUBLISHER_TYPE_GRID.equals(eventDTO.getOrgType())) {
entity.setGridId(eventDTO.getOrgId());
entity.setTopicCreatorId(eventDTO.getCreatedBy());
}
}
} else {
entity.setIssueId("");
}
String[] pIds = project.getOrgIdPath().split(StrConstant.COLON);
if (pIds.length > 1) {
entity.setPid(pIds[pIds.length - 2]);

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

@ -270,7 +270,7 @@ public class StatsIssueServiceImpl implements StatsIssueService {
//已结案项目统计
List<ProjectGridDTO> closedProjectTotalList = projectService.getGridClosedProjectTotal(customerId, dateString);
//已结案项目增量
List<ProjectGridDTO> closedProjectIncList = projectService.getGridClosedProjectTotal(customerId, dateString);
List<ProjectGridDTO> closedProjectIncList = projectService.getGridClosedProjectInc(customerId, dateString);
Map<String, Long> resolveMap= new HashMap<>();
Map<String, Long> unResolveMap = new HashMap<>();

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java

@ -22,6 +22,7 @@ import com.epmet.dto.ProjectCategoryDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.project.ProjectAgencyDTO;
import com.epmet.dto.project.ProjectGridDTO;
import com.epmet.dto.project.ResiEventDTO;
import com.epmet.dto.project.result.ProjectExceedParamsResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity;
import com.epmet.entity.project.ProjectEntity;
@ -191,4 +192,11 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @return
*/
List<String> selectClosedProjectIds(String customerId,String origin ,String projectStatus);
/**
* 获取事件信息
* @param customerId
* @return
*/
Map<String, ResiEventDTO> getEventList(String customerId);
}

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java

@ -23,10 +23,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.project.ProjectDao;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.project.ProjectAgencyDTO;
import com.epmet.dto.project.ProjectCategoryDTO;
import com.epmet.dto.project.ProjectGridDTO;
import com.epmet.dto.project.ProjectPointDTO;
import com.epmet.dto.project.*;
import com.epmet.dto.project.result.ProjectExceedParamsResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity;
import com.epmet.entity.project.ProjectEntity;
@ -37,6 +34,7 @@ import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
@ -239,5 +237,14 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return baseDao.selectClosedProjectIds(customerId,origin,projectStatus);
}
@Override
public Map<String, ResiEventDTO> getEventList(String customerId) {
List<ResiEventDTO> list = baseDao.getEventList(customerId);
if (org.apache.commons.collections4.CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return list.stream().collect(Collectors.toMap(ResiEventDTO::getProjectId, Function.identity()));
}
}

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.23__resi_event.sql

@ -0,0 +1,3 @@
ALTER TABLE `epmet_data_statistical`.`fact_origin_project_main_daily`
MODIFY COLUMN `ORIGIN` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目来源 来源:议题issue 组织agency,事件resi_event' AFTER `PIDS`,
MODIFY COLUMN `ORIGIN_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目来源ID:议题id ;or组织id,事件ID' AFTER `ORIGIN`;

3
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

@ -707,7 +707,8 @@
) a ON fm.GRID_ID = a.orgId
WHERE
PROJECT_STATUS = 'closed'
AND ORIGIN = "issue"
AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event')
AND GRID_ID != ''
AND CUSTOMER_ID = #{customerId}
AND DATE_ID &lt;= #{dateId}
GROUP BY

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -1083,7 +1083,7 @@
FROM
fact_origin_project_main_daily
WHERE
ORIGIN = 'agency'
(ORIGIN = 'agency' OR ORIGIN = 'resi_event')
AND CUSTOMER_ID = #{customerId}
<if test='null != dateId and "" != dateId'>
AND DATE_ID = #{dateId}
@ -1101,7 +1101,7 @@
FROM
fact_origin_project_main_daily
WHERE
ORIGIN = 'agency'
(ORIGIN = 'agency' OR ORIGIN = 'resi_event')
AND CUSTOMER_ID = #{customerId}
<if test='null != dateId and "" != dateId'>
AND DATE_ID &lt;= #{dateId}

19
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml

@ -55,7 +55,7 @@
FROM project
WHERE
DEL_FLAG = '0'
AND ORIGIN = 'issue'
AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event')
AND STATUS = 'closed'
AND CUSTOMER_ID = #{customerId}
AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') <![CDATA[ <= ]]> #{date}
@ -69,7 +69,7 @@
FROM project
WHERE
DEL_FLAG = '0'
AND ORIGIN = 'issue'
AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event')
AND STATUS = 'closed'
AND CUSTOMER_ID = #{customerId}
AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') = #{date}
@ -220,4 +220,19 @@
AND p.ORIGIN =#{origin}
</if>
</select>
<select id="getEventList" resultType="com.epmet.dto.project.ResiEventDTO">
select rero.RESI_EVENT_ID,
rero.ORG_TYPE,
rero.ORG_ID,
rero.ORG_PID,
rero.ORG_PIDS,
re.CREATED_BY,
re.PROJECT_ID
from resi_event_report_org rero
inner join resi_event re on rero.RESI_EVENT_ID = re.id and re.SHIFT_PROJECT = 1 and re.DEL_FLAG = '0'
where rero.del_flag = '0'
and rero.CUSTOMER_ID = #{customerId}
</select>
</mapper>

2
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java

@ -103,7 +103,7 @@ public class ExternalAppController {
*/
@PostMapping("/list")
public Result<PageData<ExternalAppResultDTO>> list(@RequestBody ExternalAppFormDTO formDTO) {
PageData<ExternalAppResultDTO> page = externalAppService.listPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getCustomerId());
PageData<ExternalAppResultDTO> page = externalAppService.listPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getCustomerId(), formDTO.getCustomerType());
return new Result<PageData<ExternalAppResultDTO>>().ok(page);
}

2
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppDao.java

@ -39,7 +39,7 @@ public interface ExternalAppDao extends BaseDao<ExternalAppEntity> {
ExternalAppResultDTO getByNameAndCustomerId(@Param("appName") String appName, @Param("customerId") String customerId);
List<ExternalAppResultDTO> list(@Param("customerId") String customerId);
List<ExternalAppResultDTO> list(@Param("customerId") String customerId, @Param("customerType") String customerType);
List<String> getCustomerIds();

2
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java

@ -35,7 +35,7 @@ public interface ExternalAppService {
ExternalAppResultDTO updateById(String appId, String appName, String customerId, String customerType);
PageData<ExternalAppResultDTO> listPage(Integer pageNo, Integer pageSize, String customerId);
PageData<ExternalAppResultDTO> listPage(Integer pageNo, Integer pageSize, String customerId, String customerType);
List<String> getCustomerIds();

4
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java

@ -158,9 +158,9 @@ public class ExternalAppServiceImpl implements ExternalAppService {
}
@Override
public PageData<ExternalAppResultDTO> listPage(Integer pageNo, Integer pageSize, String customerId) {
public PageData<ExternalAppResultDTO> listPage(Integer pageNo, Integer pageSize, String customerId, String customerType) {
PageHelper.startPage(pageNo, pageSize);
List<ExternalAppResultDTO> list = externalAppDao.list(customerId);
List<ExternalAppResultDTO> list = externalAppDao.list(customerId, customerType);
for (ExternalAppResultDTO app : list) {
// 设置客户类型中文
app.setCustomerTypeName(CustomerTypeEnum.getName(app.getCustomerType()));

3
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppDao.xml

@ -45,6 +45,9 @@
<if test="customerId != null and customerId != ''">
AND ea.CUSTOMER_ID = #{customerId}
</if>
<if test="customerType != null and customerType != ''">
AND ea.CUSTOMER_TYPE = #{customerType}
</if>
</where>
</select>

28
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java

@ -22,6 +22,7 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AliyunGroup;
import com.epmet.commons.tools.validator.group.QcloudGroup;
import com.epmet.commons.tools.validator.group.QiniuGroup;
import com.epmet.constants.PrivacyType;
import com.epmet.dto.UploadDTO;
import com.epmet.dto.form.RemoveFileFormDTO;
import com.epmet.dto.result.UploadImgResultDTO;
@ -373,4 +374,31 @@ public class OssController {
return ossService.uploadImgV2(file, null, customerId);
}
/**
* @Description 上传报事文件(目前只有图片)
* @return
* @author wxz
* @date 2021.08.03 16:23
*/
@PostMapping("upload-resi-event-file")
public Result<UploadImgResultDTO> uploadResiEventFile(@RequestPart(value = "file") MultipartFile file, @RequestParam("customerId") String customerId) {
// 体积限制
int sizeMb = 10;
int sizeThreshold = sizeMb * 1024 * 1024; // 大小限制10m
if (file.getSize() > sizeThreshold) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode(),
EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg().concat(",限制在").concat(String.valueOf(sizeMb)).concat("M以内"));
}
// 格式限制,只允许png和jpeg
if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType())
&& !MediaType.IMAGE_JPEG_VALUE.equals(file.getContentType())) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg());
}
return ossService.uploadImgV2(file, PrivacyType.EXTERNAL, customerId);
}
}

5
epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/RedDotFormDTO.java

@ -25,5 +25,10 @@ public class RedDotFormDTO implements Serializable {
*/
//@NotBlank(message = "网格id不能为空")
private String gridId;
/**
* 当前工作人员所属的组织id
*/
private String agencyId;
}

5
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java

@ -32,6 +32,9 @@ public class WorkGrassRootsFunctionConstant {
*/
public static final String WORK_GRASSROOTS_BADGE="work_grassroots_badge";
/**
* 基层治理-群众直报 功能入口
*/
public static final String RESI_EVENT_MANAGE="resi_event_manage";
}

20
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java

@ -44,6 +44,8 @@ public class RemindServiceImpl implements RemindService {
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Override
public RedDotResultDTO queryGridRedDot(RedDotFormDTO formDTO) {
@ -217,12 +219,11 @@ public class RemindServiceImpl implements RemindService {
RedDotResultDTO redDotResultDTO = new RedDotResultDTO();
redDotResultDTO.setOtherGridRedDot(false);
redDotResultDTO.setFunctionList(Collections.EMPTY_LIST);
List<String> functionList = new ArrayList<>();
List<RedDotDetialDTO> details = new ArrayList<>();
Result<List<CustomerGridByUserIdResultDTO>> govOrgResult = govOrgFeignClient.getMyGrids(formDTO.getStaffId());
if (govOrgResult.success() && !CollectionUtils.isEmpty(govOrgResult.getData())) {
List<String> functionList = new ArrayList<>();
List<RedDotDetialDTO> details = new ArrayList<>();
List<String> gridIdList = govOrgResult.getData().stream().map(CustomerGridByUserIdResultDTO::getGridId).collect(Collectors.toList());
//1、群组管理(待审核的小组申请、变更小组申请)
@ -335,11 +336,20 @@ public class RemindServiceImpl implements RemindService {
}
});
}
redDotResultDTO.setFunctionList(functionList);
redDotResultDTO.setDetails(details);
} else {
logger.warn(String.format("基层治理红点查询,获取工作人员所属网格失败,当前staffId=%s", formDTO.getStaffId()));
}
// 群众直报:当前工作人员所属的组织存在待处理(未读的)、有新的回复的(相当于处理中有红点的)记录就显示红点
if(org.apache.commons.lang3.StringUtils.isNotBlank(formDTO.getAgencyId())){
Result<ResiEventManageRedDotRes> projectRes=govProjectOpenFeignClient.queryResiEventManageRedDot(formDTO.getAgencyId());
if(projectRes.success()&&null !=projectRes.getData()&&projectRes.getData().getTotalCount()>0){
functionList.add(WorkGrassRootsFunctionConstant.RESI_EVENT_MANAGE);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.RESI_EVENT_MANAGE, projectRes.getData().getTotalCount().longValue()));
}
}
redDotResultDTO.setFunctionList(functionList);
redDotResultDTO.setDetails(details);
return redDotResultDTO;
}

20
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/5 5:23 下午
* @DESC
*/
@Data
public class EventTitleOrgResultDTO implements Serializable {
private static final long serialVersionUID = -517506506008916648L;
private String agencyId;
private String gridId;
private String gridName;
}

22
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/4 5:48 下午
* @DESC
*/
@Data
public class OrgNameByTypeResultDTO implements Serializable {
private static final long serialVersionUID = -6544341694748437312L;
private String orgId;
private String orgType;
private String orgName;
}

66
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/OrgLevelEnums.java

@ -0,0 +1,66 @@
package com.epmet.enums;
import lombok.extern.slf4j.Slf4j;
import java.util.Optional;
/**
* @Description 入职级别枚举
* @author wxz
* @date 2021.08.03 14:29:01
*/
@Slf4j
public enum OrgLevelEnums {
GRID("grid", "网格"),
COMMUNITY("community", "社区"),
STREET("street", "街道"),
DISTRICT("district", "区"),
CITY("city", "市"),
PROVINCE("province", "省"),
DEPARTMENT("department", "部门"),
;
private String level;
private String levelName;
OrgLevelEnums(String level, String levelName) {
this.level = level;
this.levelName = levelName;
}
/**
* @Description 级别枚举对象
* @return
* @author wxz
* @date 2021.08.03 14:46
*/
public static OrgLevelEnums getLevelObject(String level) {
for (OrgLevelEnums l :OrgLevelEnums.values()) {
if (l.getLevel().equals(level)) {
return l;
}
}
return null;
}
/**
* @Description 级别中文名称
* @return
* @author wxz
* @date 2021.08.03 14:47
*/
public static String getLevelName(String level) {
OrgLevelEnums levelObject = getLevelObject(level);
return levelObject == null ? null : levelObject.getLevelName();
}
public String getLevel() {
return level;
}
public String getLevelName() {
return levelName;
}
}

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

@ -370,4 +370,41 @@ public interface GovOrgOpenFeignClient {
*/
@PostMapping("/gov/org/staff/mine")
Result<MineResultDTO> queryStaffProfile(@RequestBody StaffInfoFromDTO fromDTO);
/**
* @Description 查询工作人员名字 xx组织-章三
* @Param userId
* @author zxc
* @date 2021/8/4 4:23 下午
*/
@PostMapping("/gov/org/staff/staffname")
Result<String> staffName(@RequestParam("userId")String userId);
/**
* @Description 查询网格名字
* @Param gridName
* @author zxc
* @date 2021/8/4 4:26 下午
*/
@PostMapping("/gov/org/customergrid/selectgridname")
Result<String> gridName(@RequestParam("gridId")String gridId);
/**
* @Description 根据类型查询组织名称
* @Param formList
* @author zxc
* @date 2021/8/4 6:14 下午
*/
@PostMapping("/gov/org/customergrid/selectorgnamebytype")
Result<List<String>> selectOrgNameByType(@RequestBody List<String> formList);
/**
* @Description 根据人查询所在组织
* @Param userId
* @author zxc
* @date 2021/8/5 10:08 上午
*/
@PostMapping("/gov/org/customergrid/selectorgsbyuserid")
Result<List<String>> selectOrgsByUserId(@RequestParam("userId")String userId);
}

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

@ -215,6 +215,26 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "mine", fromDTO);
}
@Override
public Result<String> staffName(String userId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "staffName", userId);
}
@Override
public Result<String> gridName(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "gridName", gridId);
}
@Override
public Result<List<String>> selectOrgNameByType(List<String> formList) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectOrgNameByType", formList);
}
@Override
public Result<List<String>> selectOrgsByUserId(String userId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectOrgsByUserId", userId);
}
@Override
public Result<String> selectPidsByGridId(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectPidsByGridId", gridId);

34
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java

@ -252,4 +252,38 @@ public class CustomerGridController {
public Result<String> selectPidsByGridId(@RequestParam("gridId") String gridId){
return new Result<String>().ok(customerGridService.selectPidsByGridId(gridId));
}
/**
* @Description 查询网格名字
* @Param gridId
* @author zxc
* @date 2021/8/4 4:26 下午
*/
@PostMapping("selectgridname")
Result<String> gridName(@RequestParam("gridId")String gridId){
return new Result<String>().ok(customerGridService.gridName(gridId));
}
/**
* @Description 根据类型查询组织名称
* @Param formList
* @author zxc
* @date 2021/8/4 6:14 下午
*/
@PostMapping("selectorgnamebytype")
public Result<List<String>> selectOrgNameByType(@RequestBody List<String> formList){
return new Result<List<String>>().ok(customerGridService.selectOrgNameByType(formList));
}
/**
* @Description 根据人查询所在组织
* @Param userId
* @author zxc
* @date 2021/8/5 10:08 上午
*/
@PostMapping("/selectorgsbyuserid")
public Result<List<String>> selectOrgsByUserId(@RequestParam("userId")String userId){
return new Result<List<String>>().ok(customerGridService.selectOrgsByUserId(userId));
}
}

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java

@ -17,7 +17,9 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -29,6 +31,7 @@ import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.excel.CustomerStaffGridExcel;
import com.epmet.service.CustomerStaffGridService;
@ -131,4 +134,15 @@ public class CustomerStaffGridController {
public Result<List<GridStaffResultDTO>> selectGridStaffByGridIds(@RequestBody List<String> gridIds){
return new Result<List<GridStaffResultDTO>>().ok(customerStaffGridService.selectGridStaffByGridIds(gridIds));
}
/**
* @Description 查询ORG
* @Param userId
* @author zxc
* @date 2021/8/5 5:36 下午
*/
@PostMapping("eventorg")
public Result<List<EventTitleOrgResultDTO>> eventOrg(@LoginUser TokenDto tokenDto){
return new Result<List<EventTitleOrgResultDTO>>().ok(customerStaffGridService.eventOrg(tokenDto.getUserId()));
}
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java

@ -12,10 +12,7 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -157,4 +154,15 @@ public class StaffController {
ValidatorUtils.validateEntity(fromDTO, StaffBasicInfoFromDTO.AddUserInternalGroup.class);
return staffService.staffBasicInfo(fromDTO);
}
/**
* @Description 查询工作人员名字
* @Param userId
* @author zxc
* @date 2021/8/4 3:38 下午
*/
@PostMapping("staffname")
public Result<String> staffName(@RequestParam("userId")String userId){
return new Result<String>().ok(staffService.staffName(userId));
}
}

24
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java

@ -276,4 +276,28 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
* @date 2021/7/16 9:52 上午
*/
String selectPidsByGridId(@Param("gridId")String gridId);
/**
* @Description 查询网格名字
* @Param gridId
* @author zxc
* @date 2021/8/4 4:30 下午
*/
String gridName(String gridId);
/**
* @Description 查询组织名字
* @Param orgIds
* @author zxc
* @date 2021/8/4 6:25 下午
*/
List<String> selectOrgNameByType(@Param("orgIds") List<String> orgIds);
/**
* @Description 根据人查询所在组织
* @Param userId
* @author zxc
* @date 2021/8/5 10:08 上午
*/
List<String> selectOrgsByUserId(@Param("userId") String userId);
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java

@ -108,4 +108,12 @@ public interface CustomerStaffAgencyDao extends BaseDao<CustomerStaffAgencyEntit
* @date 2020/8/17 10:19 上午
*/
List<String> getAgencyStaffList(@Param("agencyId")String agencyId);
/**
* @Description 查询工作人员所属组织名字
* @Param staffId
* @author zxc
* @date 2021/8/4 3:54 下午
*/
String selectStaffBelongAgency(@Param("staffId")String staffId);
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java

@ -22,6 +22,7 @@ import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerStaffDepartmentDTO;
import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import org.apache.ibatis.annotations.Mapper;
@ -106,4 +107,12 @@ public interface CustomerStaffGridDao extends BaseDao<CustomerStaffGridEntity> {
* @date 2021/6/8 3:36 下午
*/
List<GridStaffResultDTO> selectGridStaffByGridIds(@Param("gridIds") List<String> gridIds);
/**
* @Description 查询ORG
* @Param userId
* @author zxc
* @date 2021/8/5 5:36 下午
*/
List<EventTitleOrgResultDTO> eventOrg(@Param("userId") String userId);
}

24
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java

@ -295,4 +295,28 @@ public interface CustomerGridService extends BaseService<CustomerGridEntity> {
* @date 2021/7/16 9:52 上午
*/
String selectPidsByGridId(String gridId);
/**
* @Description 查询网格名字
* @Param gridId
* @author zxc
* @date 2021/8/4 4:26 下午
*/
String gridName(String gridId);
/**
* @Description 根据类型查询组织名称
* @Param formList
* @author zxc
* @date 2021/8/4 6:14 下午
*/
List<String> selectOrgNameByType(List<String> formList);
/**
* @Description 根据人查询所在组织
* @Param userId
* @author zxc
* @date 2021/8/5 10:08 上午
*/
List<String> selectOrgsByUserId(String userId);
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java

@ -26,6 +26,7 @@ import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CommonStaffInfoResultDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
@ -126,4 +127,12 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
* @date 2021/6/8 3:36 下午
*/
List<GridStaffResultDTO> selectGridStaffByGridIds(List<String> gridIds);
/**
* @Description 查询ORG
* @Param userId
* @author zxc
* @date 2021/8/5 5:36 下午
*/
List<EventTitleOrgResultDTO> eventOrg(String userId);
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java

@ -105,4 +105,12 @@ public interface StaffService {
* @author sun
*/
Result<BasicInfoResultDTO> staffBasicInfo(StaffBasicInfoFromDTO fromDTO);
/**
* @Description 查询工作人员名字
* @Param userId
* @author zxc
* @date 2021/8/4 3:38 下午
*/
String staffName(String userId);
}

33
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -721,4 +721,37 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
}
return "";
}
/**
* @Description 查询网格名字
* @Param gridId
* @author zxc
* @date 2021/8/4 4:26 下午
*/
@Override
public String gridName(String gridId) {
return baseDao.gridName(gridId);
}
/**
* @Description 根据类型查询组织名称
* @Param formList
* @author zxc
* @date 2021/8/4 6:14 下午
*/
@Override
public List<String> selectOrgNameByType(List<String> formList) {
return baseDao.selectOrgNameByType(formList);
}
/**
* @Description 根据人查询所在组织
* @Param userId
* @author zxc
* @date 2021/8/5 10:08 上午
*/
@Override
public List<String> selectOrgsByUserId(String userId) {
return baseDao.selectOrgsByUserId(userId);
}
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java

@ -31,6 +31,7 @@ import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
@ -181,4 +182,15 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl<CustomerStaffG
}
return data;
}
/**
* @Description 查询ORG
* @Param userId
* @author zxc
* @date 2021/8/5 5:36 下午
*/
@Override
public List<EventTitleOrgResultDTO> eventOrg(String userId) {
return baseDao.eventOrg(userId);
}
}

27
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java

@ -7,6 +7,7 @@ import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.CustomerStaffAgencyDao;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
@ -14,6 +15,7 @@ import com.epmet.entity.CustomerAgencyEntity;
import com.epmet.entity.CustomerStaffAgencyEntity;
import com.epmet.feign.*;
import com.epmet.service.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -51,6 +53,8 @@ public class StaffServiceImpl implements StaffService {
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private RedisUtils redisUtils;
@Autowired
private CustomerStaffAgencyDao customerStaffAgencyDao;
@Override
public Result<StaffsInAgencyResultDTO> getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) {
@ -274,4 +278,27 @@ public class StaffServiceImpl implements StaffService {
public Result<BasicInfoResultDTO> staffBasicInfo(StaffBasicInfoFromDTO fromDTO) {
return epmetUserOpenFeignClient.getStaffBasicInfo(fromDTO);
}
/**
* @Description 查询工作人员名字
* @Param userId
* @author zxc
* @date 2021/8/4 3:38 下午
*/
@Override
public String staffName(String userId) {
// 查询所属组织名字
String agencyName = customerStaffAgencyDao.selectStaffBelongAgency(userId);
if (StringUtils.isEmpty(agencyName)){
throw new RenException("查询工作人员所属组织名称为空");
}
StaffBasicInfoFromDTO formDTO = new StaffBasicInfoFromDTO();
formDTO.setStaffId(userId);
Result<BasicInfoResultDTO> staffBasicInfo = epmetUserOpenFeignClient.getStaffBasicInfo(formDTO);
if (!staffBasicInfo.success()){
throw new RenException("查询工作人员姓名失败");
}
String result = agencyName.concat(staffBasicInfo.getData().getRealName());
return result;
}
}

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

@ -584,4 +584,38 @@
<select id="selectPidsByGridId" resultType="java.lang.String">
SELECT PIDS FROM customer_grid WHERE DEL_FLAG = '0' AND ID = #{gridId}
</select>
<!-- 查询网格名字 -->
<select id="gridName" resultType="java.lang.String">
SELECT
CONCAT(ca.ORGANIZATION_NAME,'-',cg.GRID_NAME) AS gridName
FROM customer_grid cg
LEFT JOIN customer_agency ca ON (ca.id = cg.PID AND ca.DEL_FLAG = '0')
WHERE cg.DEL_FLAG = 0
AND cg.ID = #{gridId}
</select>
<!-- 查询组织名字 -->
<select id="selectOrgNameByType" resultType="java.lang.String">
SELECT GRID_NAME AS orgName FROM customer_grid WHERE DEL_FLAG = '0'
AND(
<foreach collection="orgIds" item="orgId" separator=" or ">
id = #{orgId}
</foreach>
)
UNION ALL
SELECT ORGANIZATION_NAME AS orgName FROM customer_agency WHERE DEL_FLAG = '0'
AND(
<foreach collection="orgIds" item="orgId" separator=" or ">
id = #{orgId}
</foreach>
)
</select>
<!-- 根据人查询所在组织 -->
<select id="selectOrgsByUserId" resultType="java.lang.String">
SELECT GRID_ID AS orgId FROM customer_staff_grid WHERE del_flag = '0' AND USER_ID = #{userId}
union ALL
SELECT agency_id AS orgId FROM customer_staff_agency WHERE del_flag = '0' and USER_ID = #{userId}
</select>
</mapper>

10
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml

@ -152,4 +152,14 @@
del_flag = '0'
AND agency_id = #{agencyId}
</select>
<!-- 查询工作人员所属组织名字 -->
<select id="selectStaffBelongAgency" resultType="java.lang.String">
SELECT
CONCAT(ca.ORGANIZATION_NAME,'-') AS agencyName
FROM customer_staff_agency sa
LEFT JOIN customer_agency ca ON (ca.ID = sa.AGENCY_ID AND ca.DEL_FLAG = '0')
WHERE sa.DEL_FLAG = 0
AND sa.USER_ID = #{staffId}
</select>
</mapper>

21
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml

@ -102,6 +102,27 @@
)
</select>
<!-- 查询ORG -->
<select id="eventOrg" resultType="com.epmet.dto.result.EventTitleOrgResultDTO">
SELECT
sa.AGENCY_ID AS agencyId,
sa.AGENCY_ID AS gridId,
ca.ORGANIZATION_NAME AS gridName
FROM customer_staff_agency sa
LEFT JOIN customer_agency ca ON (ca.ID = sa.AGENCY_ID AND ca.DEL_FLAG = 0)
WHERE sa.DEL_FLAG = 0
AND sa.USER_ID = #{userId}
UNION ALL
SELECT
cg.PID AS agencyId,
sg.GRID_ID AS gridId,
cg.GRID_NAME AS gridName
FROM customer_staff_grid sg
LEFT JOIN customer_grid cg ON (cg.ID = sg.GRID_ID AND cg.DEL_FLAG = 0)
WHERE sg.DEL_FLAG = 0
AND sg.USER_ID = #{userId}
</select>
<!-- 批量插入网格工作人员 -->
<insert id="insertBatch" parameterType="java.util.List">
insert into customer_staff_grid

47
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/EventProjectInfoDTO.java

@ -0,0 +1,47 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/3 1:38 下午
* @DESC
*/
@Data
public class EventProjectInfoDTO implements Serializable {
private static final long serialVersionUID = 5622220354099001615L;
/**
* 项目ID
*/
private String projectId;
/**
* 操作人xxx社区-张三
*/
private String operationName;
/**
* 操作时间
*/
private String operationTime;
@JsonIgnore
private String userId;
/**
* 报事说明
*/
private String projectDeclare;
public EventProjectInfoDTO() {
this.projectId = "";
this.operationName = "";
this.operationTime = "";
this.projectDeclare = "";
}
}

42
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ChooseResolveFormDTO.java

@ -0,0 +1,42 @@
package com.epmet.dto.form;
import com.epmet.dto.result.ResiEventIdDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 选择已解决未解决
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 13:53
*/
@Data
public class ChooseResolveFormDTO extends ResiEventIdDTO implements Serializable {
private static final long serialVersionUID = 7888566055415227282L;
public interface AddUserInternalGroup {
}
/**
* 是否解决已解决 resolved未解决 un_solved
*/
@NotBlank(message = "resolveStatus不能为空",groups = AddUserInternalGroup.class)
private String resolveStatus;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

29
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/CloseResiEventFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 报事-办结 入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/5 10:44
*/
@Data
public class CloseResiEventFormDTO implements Serializable {
private static final long serialVersionUID = -3621650590714057648L;
public interface AddUserInternalGroup {
}
@NotBlank(message = "eventId不能为空", groups = AddUserInternalGroup.class)
private String eventId;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
private String userId;
}

24
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventDetailFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/3 1:27 下午
* @DESC
*/
@Data
public class EventDetailFormDTO implements Serializable {
private static final long serialVersionUID = -297495947153154171L;
public interface EventDetailForm{}
@NotBlank(message = "报事ID不能为空",groups = EventDetailForm.class)
private String eventId;
private String orgId;
}

32
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventListFormDTO.java

@ -0,0 +1,32 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/3 10:43 上午
* @DESC
*/
@Data
public class EventListFormDTO implements Serializable {
private static final long serialVersionUID = 5882062169112022561L;
public interface EventListForm{}
/**
* 报事列表类型处理中processed 待处理undisposed 已办结transferred
*/
@NotBlank(message = "报事列表类型不能为空",groups = EventListForm.class)
private String eventType;
@NotBlank(message = "",groups = EventListForm.class)
private String orgId;
private Integer pageNo;
private Integer pageSize;
}

23
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventShiftProjectDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 事件立项入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/5 16:15
*/
@Data
public class EventShiftProjectDTO implements Serializable {
private static final long serialVersionUID = 5519721673862754305L;
//转项目的人
private String userId;
private String eventId;
private String projectId;
private Date shiftProjectTime;
private String userAgencyId;
}

97
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java

@ -0,0 +1,97 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* 事件-里项目
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/5 15:19
*/
@Data
public class EventToProjectFormDTO implements Serializable {
private static final long serialVersionUID = 3392008990676159012L;
public interface AddUserInternalGroup {
}
public interface ApprovalCategory extends CustomerClientShowGroup {
}
/**
* 事件id
*/
@NotBlank(message = "事件id不能为空", groups = AddUserInternalGroup.class)
private String eventId;
/**
* 项目方案 1000
*/
@Length(min = 1, max = 1000, message = "项目方案1000字", groups = {ApprovalCategory.class})
private String publicReply;
/**
* 内部备注 1000
* 21.08.09 直接立项的内部备注是必填的然后议题转项目和我要直报转项目的都是非必填的
*/
//@Length(min = 1, max = 1000, message = "内部备注1000字", groups = {ApprovalCategory.class})
private String internalRemark;
/**
* 吹哨勾选的工作人员信息集合,不可为空
*/
@Valid
private List<TickStaffFormDTO> staffList;
/**
* 项目所选分类集合不可为空
*/
@Valid
private List<CategoryOrTagFormDTO> categoryList;
/**
* 项目所选标签集合
*/
private List<CategoryOrTagFormDTO> tagList;
@Length(min = 1, max = 20, message = "项目标题不能超过20位", groups = {ApprovalCategory.class})
private String title;
/**
* 公开答复对应文件集合
*/
private List<FileDTO> publicFile;
/**
* 内部备注对应文件集合
*/
private List<FileDTO> internalFile;
//定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置]
private String locateAddress;
//定位经度
private String locateLongitude;
//定位纬度
private String locateDimension;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
private String app;
private String client;
}

41
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MentionUserFormDTO.java

@ -0,0 +1,41 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* 被艾特的人
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 15:51
*/
@Data
public class MentionUserFormDTO implements Serializable {
/**
* 人大代表用户id
*/
private String userId;
/**
* 人大代表注册网格id
*/
private String gridId;
/**
* 人大代表注册网格所属社区id
*/
private String agencyId;
/**
* 注册网格的所有上级
*/
private String pids;
/**
* 人大代表姓名
*/
private String userShowName;
}

42
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportedFormDTO.java

@ -0,0 +1,42 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 我的报事列表查询
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 14:07
*/
@Data
public class MyReportedFormDTO implements Serializable {
private static final long serialVersionUID = 8426911903236849796L;
public interface AddUserInternalGroup {
}
/**
* 未处理:un_read处理中processing已办结closed_case
*/
@NotBlank(message = "statusCondition不能为空",groups = AddUserInternalGroup.class)
private String statusCondition;
private Integer pageNo;
private Integer pageSize;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

34
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReCallEventFormDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.form;
import com.epmet.dto.result.ResiEventIdDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 撤回事件入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 11:28
*/
@Data
public class ReCallEventFormDTO extends ResiEventIdDTO implements Serializable {
private static final long serialVersionUID = 2127663703852717437L;
public interface AddUserInternalGroup {
}
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

34
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyFormDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 回复通用入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/4 14:16
*/
@Data
public class ReplyFormDTO implements Serializable {
private static final long serialVersionUID = 1653042839040178697L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
@NotBlank(message = "事件id不能为空",groups = AddUserInternalGroup.class)
private String resiEventId;
@Length(min = 1, max = 200, message = "请填写回复内容,最多输入200字", groups = AddUserShowGroup.class)
private String content;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
private String userId;
}

26
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyListFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/3 11:07 上午
* @DESC
*/
@Data
public class ReplyListFormDTO implements Serializable {
private static final long serialVersionUID = 3875624725235229558L;
public interface ReplyListForm{}
@NotBlank(message = "报事ID不能为空",groups = ReplyListForm.class)
private String resiEventId;
@NotBlank(message = "当前用户id不能为空",groups = ReplyListForm.class)
private String currentUserId;
}

34
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReportOrgFormDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* 报给谁
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 15:51
*/
@Data
public class ReportOrgFormDTO implements Serializable {
/**
* 报给 网格grid 社区community 街道:street 区县级: district 市级: city 省级:province
*/
private String orgLevel;
/**
* 报给的组织或者网格id
*/
private String orgId;
/**
* org_id的上级组织idorg_id是跟组织此列为0
*/
private String orgPid;
/**
* org_id的所有上级组织idorg_id是跟组织此列为0
*/
private String orgPids;
}

85
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java

@ -0,0 +1,85 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.FileCommonDTO;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
/**
* 我要报事-提交
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 10:46
*/
@Data
public class ResiEventFormDTO implements Serializable {
private static final long serialVersionUID = -778643059131036832L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
/**
* 用户所在网格id
*/
@NotBlank(message = "不能为空",groups = AddUserInternalGroup.class)
private String gridId;
/**
* 事件内容最多1000
*/
@Length(min = 1, max = 1000, message = "请填写内容,最多输入1000字", groups = AddUserShowGroup.class)
private String eventContent;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
/**
* 地址
*/
@NotBlank(message = "地址不能为空",groups = AddUserShowGroup.class)
private String address;
/**
* 附件列表
*/
private List<FileCommonDTO> attachmentList;
/**
* @的人
*/
private List<MentionUserFormDTO> npcUserList;
/**
* 报给谁
*/
@NotEmpty(message = "不能为空",groups = AddUserInternalGroup.class)
private List<ReportOrgFormDTO> orgList;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups =AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

43
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UpdateViewTimeFormDTO.java

@ -0,0 +1,43 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/3 10:55 上午
* @DESC 报事-首次查看事件-两端通用
*/
@Data
public class UpdateViewTimeFormDTO implements Serializable {
private static final long serialVersionUID = 7104400078458366322L;
public interface AddUserInternalGroup {
}
public interface GovInternalGroup {
}
// 居民端:resi_user;工作端:staff
@NotBlank(message = "viewType不能为空", groups = AddUserInternalGroup.class)
private String viewType;
@NotBlank(message = "eventId不能为空", groups = AddUserInternalGroup.class)
private String eventId;
@NotBlank(message = "orgId不能为空", groups = GovInternalGroup.class)
private String orgId;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
}

44
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UserMentionFormDTO.java

@ -0,0 +1,44 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 我要报事-人大代表未读/已读列表入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/4 9:34
*/
@Data
public class UserMentionFormDTO implements Serializable {
private static final long serialVersionUID = 7548058964554418080L;
public interface AddUserInternalGroup {
}
/**
* 未读un_read;已读read
*/
@NotBlank(message = "readFlag不能为空", groups = AddUserInternalGroup.class)
private String readFlag;
@NotNull(message = "pageNo不能为空", groups = AddUserInternalGroup.class)
private Integer pageNo;
@NotNull(message = "pageSize不能为空", groups = AddUserInternalGroup.class)
private Integer pageSize;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
}

108
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java

@ -0,0 +1,108 @@
package com.epmet.dto.result;
import com.epmet.dto.EventProjectInfoDTO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/8/3 1:30 下午
* @DESC
*/
@Data
public class EventDetailResultDTO implements Serializable {
private static final long serialVersionUID = 3905105043326445613L;
/**
* 报事时间
*/
private String eventTime;
/**
* 报事内容
*/
private String eventContent;
/**
* 报事地址
*/
private String eventAddress;
/**
* 所属网格xx社区-xx网格
*/
private String gridName;
@JsonIgnore
private String gridId;
/**
* 是否办结truefalse
*/
private Boolean isClosed;
/**
* 是否解决truefalse
*/
private Boolean isResolve;
/**
* 是否可以撤回truefalse
*/
private Boolean isRollback;
/**
* 报事图片
*/
private List<String> eventImgs;
/**
* 报事提到的人
*/
private List<String> eventPerson;
/**
* 被提到的组织
*/
private List<String> eventOrg;
/**
* 报事人名字
*/
private String eventPeopleName;
@JsonIgnore
private String eventUserId;
/**
* 项目信息
*/
private EventProjectInfoDTO projectInfo;
@JsonIgnore
private List<String> orgNameList;
@JsonIgnore
private String projectId;
@JsonIgnore
private Boolean isProject;
public EventDetailResultDTO() {
this.eventTime = "";
this.eventContent = "";
this.eventAddress = "";
this.gridName = "";
this.isClosed = false;
this.isResolve = false;
this.isRollback = false;
this.eventImgs = new ArrayList<>();
this.eventPerson = new ArrayList<>();
this.projectInfo = new EventProjectInfoDTO();
}
}

48
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventListResultDTO.java

@ -0,0 +1,48 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/8/3 10:41 上午
* @DESC
*/
@Data
public class EventListResultDTO implements Serializable {
private static final long serialVersionUID = -8550265282744924930L;
/**
* 报事标题
*/
private String eventContent;
/**
* 报事时间
*/
private String eventTime;
/**
* 报事ID
*/
private String eventId;
/**
* 是否立项truefalse
*/
private Boolean isProject;
/**
* 红点显示true显示false不显示
*/
private Boolean redDot;
/**
* 报事图片
*/
private List<String> eventImgs;
}

17
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventToProjectResultDTO.java

@ -0,0 +1,17 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/5 15:36
*/
@Data
public class EventToProjectResultDTO implements Serializable {
private static final long serialVersionUID = -7544325891712303124L;
private String projectId;
}

65
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportedResultDTO.java

@ -0,0 +1,65 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 报事列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 14:11
*/
@Data
public class MyReportedResultDTO implements Serializable {
private static final long serialVersionUID = -7372245830000262134L;
/**
* 事件id
*/
private String resiEventId;
/**
* 事件内容
*/
private String eventContent;
/**
* 图片列表可为空
*/
private List<String> imgList;
/**
* true展示false不展示
*/
private Boolean redDot;
/**
* 处理中processing已办结closed_case
*/
private String status;
/**
* true:已转项目false未立项
*/
private Boolean shiftProject;
/**
* 列表显示时间用此列yyyy-MM-dd HH:mm:ss处理中上报事件时间处理中最新一次处理事件已办结办结时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date showTime;
/**
* true:显示回复false不显示回复按钮
*/
private String replyButtonFlag;
/**
* 事件是否被阅读过;1已读针对报事人待处理列表
*/
private Boolean readFlag;
}

34
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/8/5 9:51 上午
* @DESC
*/
@Data
public class NewEventsResultDTO implements Serializable {
private static final long serialVersionUID = 2151884734349908080L;
/**
* 事件内容
*/
private String eventContent;
/**
* 事件时间
*/
private String eventTime;
/**
* 事件图片
*/
private List<String> eventImgs;
private String eventId;
}

22
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/4 5:48 下午
* @DESC
*/
@Data
public class OrgNameByTypeResultDTO implements Serializable {
private static final long serialVersionUID = -6544341694748437312L;
private String orgId;
private String orgType;
private String orgName;
}

38
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ReplyListResultDTO.java

@ -0,0 +1,38 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author zxc
* @DateTime 2021/8/3 11:07 上午
* @DESC
*/
@Data
public class ReplyListResultDTO implements Serializable {
private static final long serialVersionUID = 4875335642497226847L;
/**
* 回复人的昵称比如南宁路社区,人大代表-李四,山东路-尹女士
* */
private String replyName;
/**
* 回复时间
* */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone="GMT+8")
private Date replyTime;
/**
* 回复的内容
* */
private String replyContent;
@JsonIgnore
private String replyUserId;
}

24
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventIdDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.result;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 事件id
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 10:48
*/
@Data
public class ResiEventIdDTO implements Serializable {
private static final long serialVersionUID = 1553798655658549134L;
public interface ResiEventIdGroup {
}
/**
* 居民端报的事件id
*/
@NotBlank(message = "事件id不能为空",groups = ResiEventIdGroup.class)
private String resiEventId;
}

30
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventManageRedDotRes.java

@ -0,0 +1,30 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/6 13:54
*/
@Data
public class ResiEventManageRedDotRes implements Serializable {
/**
* 待处理未读的事件数
* */
private Integer unReadCount;
/**
* 已经度过但是又有新的回复立项结案
* */
private Integer redDotCount;
/**
* 总数
* */
private Integer totalCount;
}

61
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UserMentionResultDTO.java

@ -0,0 +1,61 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 我要报事-人大代表未读/已读列表返参
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/4 9:44
*/
@Data
public class UserMentionResultDTO implements Serializable {
private static final long serialVersionUID = 8171079006237395425L;
/**
* 事件id
*/
private String resiEventId;
/**
* 事件内容
*/
private String eventContent;
/**
* 图片列表可为空
*/
private List<String> imgList;
/**
* true展示false不展示
*/
private Boolean redDot;
/**
* 处理中processing已办结closed_case
*/
private String status;
/**
* true:已转项目false未立项
*/
private Boolean shiftProject;
/**
* 列表显示时间用此列yyyy-MM-dd HH:mm:ss处理中上报事件时间处理中最新一次处理事件已办结办结时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date showTime;
/**
* true:显示回复false不显示回复按钮
*/
private String replyButtonFlag;
}

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

@ -6,7 +6,6 @@ import com.epmet.dto.ProjectCategoryDTO;
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;
@ -124,4 +123,15 @@ public interface GovProjectOpenFeignClient {
*/
@PostMapping("gov/project/project/unresolvedlist")
Result<List<UnResolvedResultDTO>> getUnResolvedList(@RequestBody ShiftProjectListFromDTO formDTO);
/**
* 群众直报当前工作人员所属的组织存在待处理未读的有新的回复的相当于处理中有红点的)记录就显示红点
*
* @param agencyId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.ResiEventManageRedDotRes>
* @author yinzuomei
* @date 2021/8/6 14:07
*/
@PostMapping("gov/project/resievent/queryResiEventManageRedDot/{agencyId}")
Result<ResiEventManageRedDotRes> queryResiEventManageRedDot(@PathVariable("agencyId") String agencyId);
}

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

@ -119,4 +119,17 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result<List<UnResolvedResultDTO>> getUnResolvedList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getUnResolvedList", formDTO);
}
/**
* 群众直报当前工作人员所属的组织存在待处理未读的有新的回复的相当于处理中有红点的)记录就显示红点
*
* @param agencyId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.ResiEventManageRedDotRes>
* @author yinzuomei
* @date 2021/8/6 14:08
*/
@Override
public Result<ResiEventManageRedDotRes> queryResiEventManageRedDot(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryResiEventManageRedDot", agencyId);
}
}

52
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/EventConstant.java

@ -0,0 +1,52 @@
package com.epmet.constant;
/**
* @Author zxc
* @DateTime 2021/8/3 2:45 下午
* @DESC
*/
public interface EventConstant {
/**
* 处理中processed 待处理undisposed 已办结transferred
*/
String EVENT_PROCESSED = "processed";
String EVENT_UN_DISPOSED = "undisposed";
String EVENT_TRANSFERRED = "transferred";
/**
* 事件状态resi_event.status:处理中processing已办结closed_case
*/
String EVENT_STATUS_PROCESSING="processing";
String EVENT_STATUS_CLOSED_CASE="closed_case";
String READ="read";
String UN_READ="un_read";
/**
* 事件@人员表用户身份
* resi_event_mention.user_type
*/
String NPC_USER="npc_user";
/**
* 操作日志表用户来源resi_event_operation_log.userIdentity
* 居民端用户:resi_user工作人员:staff报事人:report_user
*/
String RESI_USER="resi_user";
String STAFF="staff";
String REPORT_USER="report_user";
/**
* 事件是否解决已解决 resolved未解决 un_solved
*/
String RESOLVED="resolved";
String UN_SOLVED="un_solved";
/**
* 小程序类型
*/
String TYPE_GOV = "gov";
String TYPE_RESI = "resi";
}

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java

@ -14,6 +14,8 @@ public interface ProjectConstant {
* 项目来源-组织(项目立项)
*/
String AGENCY = "agency";
String RESI_EVENT="resi_event";
/**
* 状态-待处理
*/

61
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ResiEventAction.java

@ -0,0 +1,61 @@
package com.epmet.constant;
import com.epmet.commons.tools.constant.StrConstant;
/**
* resi_event_operation_log事件操作日志枚举类
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 16:38
*/
public enum ResiEventAction {
// 1、发布事件:publish;
// 2、撤回事件:recall;
// 3、复:reply;
// 4、立项:shift_project;
// 5、办结:close_case;
// 6、选择是否已解决:choose_resolve;
// 7、查看阅读事件:read:人大代表未读=>已读;工作人员待处理=>处理中;
PUBLISH ( "publish","发布事件"),
RECALL( "recall","撤回事件"),
REPLY ("reply","回复"),
SHIFIT_PROJECT ( "shift_project","立项"),
CLOSE_CASE ( "close_case","办结"),
CHOOSE_RESOLVE ( "choose_resolve","选择是否解决"),
READ_FIRST( "read_first","首次查看事件");
private String code;
private String desc;
ResiEventAction(String code, String desc) {
this.code = code;
this.desc = desc;
}
public static String getDesc(String code) {
ResiEventAction[] businessModeEnums = values();
for (ResiEventAction resiEventAction : businessModeEnums) {
if (resiEventAction.getCode()==code) {
return resiEventAction.getDesc();
}
}
return StrConstant.EPMETY_STR;
}
public String getCode(){
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getDesc(){
return this.desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}

30
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/EventController.java

@ -0,0 +1,30 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.EventListFormDTO;
import com.epmet.dto.form.UpdateViewTimeFormDTO;
import com.epmet.dto.result.EventListResultDTO;
import com.epmet.service.ResiEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 居民报事表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@RestController
@RequestMapping("event")
public class EventController {
@Autowired
private ResiEventService resiEventService;
}

18
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java

@ -362,5 +362,23 @@ public class ProjectTraceController {
return new Result();
}
/**
* 事件-立项
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.EventToProjectResultDTO>
* @author yinzuomei
* @date 2021/8/5 15:37
*/
@PostMapping("eventToProject")
public Result<EventToProjectResultDTO> eventToProject(@LoginUser TokenDto tokenDto,@RequestBody EventToProjectFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
formDTO.setApp(tokenDto.getApp());
formDTO.setClient(tokenDto.getClient());
ValidatorUtils.validateEntity(formDTO,EventToProjectFormDTO.ApprovalCategory.class,EventToProjectFormDTO.AddUserInternalGroup.class);
return new Result<EventToProjectResultDTO>().ok(projectTraceService.eventToProject(formDTO));
}
}

216
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java

@ -0,0 +1,216 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.EventConstant;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.service.ResiEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 居民报事表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@RestController
@RequestMapping("resievent")
public class ResiEventController {
@Autowired
private ResiEventService resiEventService;
/**
* @Description 报事详情-两端通用
* @Param formDTO
* @author zxc
* @date 2021/8/3 1:47 下午
*/
@PostMapping("eventdetail")
public Result<EventDetailResultDTO> eventDetail(@LoginUser TokenDto tokenDto, @RequestBody EventDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<EventDetailResultDTO>().ok(resiEventService.eventDetail(formDTO, tokenDto));
}
/**
* 我要报事-提交
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/3 10:46
*/
@PostMapping("report")
public Result<ResiEventIdDTO> report(@LoginUser TokenDto tokenDto, @RequestBody ResiEventFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, ResiEventFormDTO.AddUserShowGroup.class, ResiEventFormDTO.AddUserInternalGroup.class);
return new Result<ResiEventIdDTO>().ok(resiEventService.report(formDTO));
}
/**
* 我要报事-撤回
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/3 10:54
*/
@PostMapping("recall")
public Result recall(@LoginUser TokenDto tokenDto, @RequestBody ReCallEventFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, ResiEventIdDTO.ResiEventIdGroup.class, ReCallEventFormDTO.AddUserInternalGroup.class);
resiEventService.reCall(formDTO);
return new Result();
}
/**
* 选择已解决未解决
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/3 13:57
*/
@PostMapping("chooseresolve")
public Result chooseResolve(@LoginUser TokenDto tokenDto, @RequestBody ChooseResolveFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, ResiEventIdDTO.ResiEventIdGroup.class, ChooseResolveFormDTO.AddUserInternalGroup.class);
resiEventService.chooseResolve(formDTO);
return new Result();
}
/**
* 我的报事列表查询
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.MyReportedResultDTO>>
* @author yinzuomei
* @date 2021/8/3 14:27
*/
@PostMapping("myreported")
public Result<List<MyReportedResultDTO>> queryMyReported(@LoginUser TokenDto tokenDto, @RequestBody MyReportedFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, MyReportedFormDTO.AddUserInternalGroup.class);
return new Result<List<MyReportedResultDTO>>().ok(resiEventService.queryMyReported(formDTO));
}
/**
* @Description 群众直报待处理处理中已办结列表
* @Param formDTO
* @author zxc
* @date 2021/8/3 10:53 上午
*/
@PostMapping("eventlist")
public Result<List<EventListResultDTO>> eventList(@RequestBody EventListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, EventListFormDTO.EventListForm.class);
return new Result<List<EventListResultDTO>>().ok(resiEventService.eventList(formDTO));
}
/**
* @Description 报事-首次查看事件-两端通用
* @Param formDTO
* @author zxc
* @date 2021/8/3 11:01 上午
*/
@PostMapping("updateviewtime")
public Result updateViewTime(@LoginUser TokenDto tokenDto, @RequestBody UpdateViewTimeFormDTO formDTO) {
formDTO.setUserId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO, UpdateViewTimeFormDTO.AddUserInternalGroup.class);
if (EventConstant.STAFF.equals(formDTO.getViewType())) {
ValidatorUtils.validateEntity(formDTO, UpdateViewTimeFormDTO.GovInternalGroup.class);
}
resiEventService.updateViewTime(formDTO);
return new Result();
}
/**
* 我要报事-人大代表未读/已读列表
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.MyReportedResultDTO>>
* @author yinzuomei
* @date 2021/8/4 9:40
*/
@PostMapping("mentionlist")
public Result<List<UserMentionResultDTO>> mentionList(@LoginUser TokenDto tokenDto, @RequestBody UserMentionFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, UserMentionFormDTO.AddUserInternalGroup.class);
return new Result<List<UserMentionResultDTO>>().ok(resiEventService.mentionList(formDTO));
}
/**
* @Description 最新直报
* @Param userId
* @author zxc
* @date 2021/8/5 9:55 上午
*/
@PostMapping("newevents")
public Result<List<NewEventsResultDTO>> newEvents(@LoginUser TokenDto tokenDto) {
return new Result<List<NewEventsResultDTO>>().ok(resiEventService.newEvents(tokenDto.getUserId()));
}
/**
* 报事办结
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/5 10:47
*/
@PostMapping("close")
public Result closeResiEvent(@LoginUser TokenDto tokenDto, @RequestBody CloseResiEventFormDTO formDTO) {
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, CloseResiEventFormDTO.AddUserInternalGroup.class);
resiEventService.closeResiEvent(formDTO);
return new Result();
}
/**
* 工作台最新直报是否显示红点
*
* @param agencyId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.ResiEventManageRedDotRes>
* @author yinzuomei
* @date 2021/8/6 13:57
*/
@PostMapping("queryResiEventManageRedDot/{agencyId}")
Result<ResiEventManageRedDotRes> queryResiEventManageRedDot(@PathVariable("agencyId") String agencyId) {
return new Result<ResiEventManageRedDotRes>().ok(resiEventService.queryResiEventManageRedDot(agencyId));
}
}

113
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventReplyController.java

@ -0,0 +1,113 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.ReplyFormDTO;
import com.epmet.dto.form.ReplyListFormDTO;
import com.epmet.dto.result.ReplyListResultDTO;
import com.epmet.service.ResiEventReplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 事件回复表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@RestController
@RequestMapping("resieventreply")
public class ResiEventReplyController {
@Autowired
private ResiEventReplyService resiEventReplyService;
/**
* @Description 报事详情-回复列表-两端通用
* @Param formDTO
* @author zxc
* @date 2021/8/3 11:11 上午
*/
@PostMapping("list")
public Result<List<ReplyListResultDTO>> replyList(@LoginUser TokenDto tokenDto, @RequestBody ReplyListFormDTO formDTO){
formDTO.setCurrentUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, ReplyListFormDTO.ReplyListForm.class);
return new Result<List<ReplyListResultDTO>>().ok(resiEventReplyService.replyList(formDTO));
}
/**
* 报事-工作人员回复
*
* @param tokenDto
* @param replyFormDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/4 14:19
*/
@PostMapping("govReply")
public Result govReply(@LoginUser TokenDto tokenDto,@RequestBody ReplyFormDTO replyFormDTO){
replyFormDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(replyFormDTO,ReplyFormDTO.AddUserShowGroup.class,ReplyFormDTO.AddUserInternalGroup.class);
resiEventReplyService.govReply(replyFormDTO);
return new Result();
}
/**
* 报事当事人回复
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/4 14:37
*/
@PostMapping("selfReply")
public Result selfReply(@LoginUser TokenDto tokenDto,@RequestBody ReplyFormDTO formDTO){
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,ReplyFormDTO.AddUserShowGroup.class,ReplyFormDTO.AddUserInternalGroup.class);
resiEventReplyService.selfReply(formDTO);
return new Result();
}
/**
* 艾特的人回复
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/4 15:06
*/
@PostMapping("atReply")
public Result atReply(@LoginUser TokenDto tokenDto,@RequestBody ReplyFormDTO formDTO){
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,ReplyFormDTO.AddUserShowGroup.class,ReplyFormDTO.AddUserInternalGroup.class);
resiEventReplyService.atReply(formDTO);
return new Result();
}
}

11
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java

@ -18,6 +18,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.EventProjectInfoDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.ProjectStaffDTO;
import com.epmet.dto.form.LatestListFormDTO;
@ -206,4 +207,14 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> selectUnResolvedListByGrid(@Param("gridId")String gridId);
/**
* @Description 查询报事转项目详情
* @Param projectId
* @author zxc
* @date 2021/8/4 2:43 下午
*/
EventProjectInfoDTO selectEventProjectInfo(@Param("projectId")String projectId);
List<ProjectEntity> selectByOriginId(String originId);
}

12
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/dao/AdvVedioDao.java → epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventAttachmentDao.java

@ -15,19 +15,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.adv.dao;
package com.epmet.dao;
import com.epmet.adv.entity.AdvVedioEntity;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.ResiEventAttachmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 宣传视频
* 事件附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-30
* @since v1.0.0 2021-08-03
*/
@Mapper
public interface AdvVedioDao extends BaseDao<AdvVedioEntity> {
AdvVedioEntity getEnableAdvVedioEntity();
public interface ResiEventAttachmentDao extends BaseDao<ResiEventAttachmentEntity> {
}

91
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventDao.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.EventDetailResultDTO;
import com.epmet.dto.result.EventListResultDTO;
import com.epmet.dto.result.MyReportedResultDTO;
import com.epmet.dto.result.NewEventsResultDTO;
import com.epmet.entity.ResiEventEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 居民报事表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@Mapper
public interface ResiEventDao extends BaseDao<ResiEventEntity> {
/**
* @Description 查询报事列表
* @Param orgId
* @Param eventType
* @author zxc
* @date 2021/8/3 4:21 下午
*/
List<EventListResultDTO> eventUnDisposedList(@Param("orgId")String orgId,@Param("eventType")String eventType);
/**
* 居民端我的报事列表查询
*
* @param userId 报事人
* @param statusCondition 未处理:un_read处理中processing已办结closed_case
* @return java.util.List<com.epmet.dto.result.MyReportedResultDTO>
* @author yinzuomei
* @date 2021/8/3 23:21
*/
List<MyReportedResultDTO> queryMyReported(@Param("userId") String userId, @Param("statusCondition")String statusCondition);
/**
* @Description 查询报事详情
* @Param eventId
* @author zxc
* @date 2021/8/4 2:16 下午
*/
EventDetailResultDTO selectEventDetail(@Param("eventId")String eventId);
/**
* @Description 更新报事人红点状态
* @Param userId
* @author zxc
* @date 2021/8/4 5:30 下午
*/
void updateResiEvent(@Param("userId") String userId,@Param("eventId")String eventId);
/**
* @Description 更新人大代表红点状态
* @Param userId
* @author zxc
* @date 2021/8/4 5:32 下午
*/
void updateEventMention(@Param("userId") String userId,@Param("eventId")String eventId);
/**
* @Description 最新直报
* @Param orgIds
* @author zxc
* @date 2021/8/5 10:42 上午
*/
List<NewEventsResultDTO> newEvents(@Param("orgIds")List<String> orgIds);
}

70
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventMentionDao.java

@ -0,0 +1,70 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.UserMentionResultDTO;
import com.epmet.entity.ResiEventMentionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 事件被@人表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@Mapper
public interface ResiEventMentionDao extends BaseDao<ResiEventMentionEntity> {
/**
* 人大代表未读已读列表
*
* @param userId
* @param readFlag
* @return java.util.List<com.epmet.dto.result.UserMentionResultDTO>
* @author yinzuomei
* @date 2021/8/4 9:54
*/
List<UserMentionResultDTO> selectMentionList(@Param("userId")String userId, @Param("readFlag")String readFlag);
/**
* 人大代表从未读-已读首次查看事件
*
* @param eventId
* @param userId
* @return int
* @author yinzuomei
* @date 2021/8/4 16:37
*/
int updateReadFlag(@Param("eventId") String eventId, @Param("userId")String userId);
/**
* 展示红点
*
* @param resiEventId
* @return int
* @author yinzuomei
* @date 2021/8/4 17:41
*/
int updateRedDotShow(@Param("resiEventId") String resiEventId,@Param("excludeUserId")String excludeUserId);
ResiEventMentionEntity selectUser(@Param("eventId") String eventId, @Param("userId")String userId);
}

47
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventOperationLogDao.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.ResiEventOperationLogEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 事件操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@Mapper
public interface ResiEventOperationLogDao extends BaseDao<ResiEventOperationLogEntity> {
/**
* 查询事件操作日志
*
* @param eventId
* @param userId
* @param actionCode
* @return com.epmet.entity.ResiEventOperationLogEntity
* @author yinzuomei
* @date 2021/8/4 16:44
*/
List<ResiEventOperationLogEntity> selectByUserAction(@Param("eventId") String eventId, @Param("userId")String userId, @Param("actionCode")String actionCode);
}

45
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReplyDao.java

@ -0,0 +1,45 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.ReplyListResultDTO;
import com.epmet.entity.ResiEventReplyEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 事件回复表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@Mapper
public interface ResiEventReplyDao extends BaseDao<ResiEventReplyEntity> {
/**
* 查询事件的回复列表
*
* @param resiEventId
* @return java.util.List<com.epmet.dto.result.ReplyListResultDTO>
* @author yinzuomei
* @date 2021/8/4 13:22
*/
List<ReplyListResultDTO> selectReplyList(String resiEventId);
}

67
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReportOrgDao.java

@ -0,0 +1,67 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.ResiEventReportOrgEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 事件相关组织表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@Mapper
public interface ResiEventReportOrgDao extends BaseDao<ResiEventReportOrgEntity> {
/**
* 工作人员从待处理=处理中
*
* @param eventId
* @param orgId
* @return int
* @author yinzuomei
* @date 2021/8/4 16:40
*/
int updateReadFlag(@Param("eventId") String eventId, @Param("orgId") String orgId,@Param("userId") String userId);
/**
* @Description 更新组织的红点显示状态
* @Param eventId
* @Param orgId
* @author zxc
* @date 2021/8/4 5:42 下午
*/
void updateEventOrg(@Param("eventId") String eventId, @Param("orgId") String orgId);
/**
* 展示红点
*
* @param resiEventId
* @return int
* @author yinzuomei
* @date 2021/8/4 17:41
*/
int updateRedDotShow(String resiEventId);
Integer selectUnReadCount(String agencyId);
Integer selectRedCount(String agencyId);
}

76
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventAttachmentEntity.java

@ -0,0 +1,76 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
/**
* 事件附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("resi_event_attachment")
public class ResiEventAttachmentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 事件Id关联resi_event的id
*/
private String resiEventId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 排序字段
*/
private Integer sort;
}

146
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventEntity.java

@ -0,0 +1,146 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
/**
* 居民报事表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-03
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("resi_event")
public class ResiEventEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 居民端用户所在网格id
*/
private String gridId;
/**
* 居民端用户所在网格的所属组织
*/
private String agencyId;
/**
* 居民端用户所在网格的所有上级组织包含AGENCY_ID
*/
private String pids;
/**
* 报事的人
*/
private String reportUserId;
/**
* 1党员0不是党员默认0
*/
private Boolean isParty;
/**
* 事件内容
*/
private String eventContent;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
/**
* 地址
*/
private String address;
/**
* 处理中processing已办结closed_case
*/
private String status;
/**
* 办结时间
*/
private Date closeCaseTime;
/**
* 1已转项目0未转项目默认0
*/
private Boolean shiftProject;
/**
* 项目id;shift_project=1时此列有值
*/
private String projectId;
/**
* 1:已撤回0未撤回正常展示默认0
*/
private Boolean recallFlag;
/**
* 撤回时间
*/
private Date recallTime;
/**
* 事件是否被阅读过;1已读针对报事人待处理列表
*/
private Boolean readFlag;
/**
* 报事人的红点:展示1不展示0人大代表回复工作人员回复/立项/办结更新为1;
*/
private Boolean redDot;
/**
* 最近一次操作时间回复立项办结更新此列
*/
private Date latestOperatedTime;
/**
* 是否解决已解决 resolved未解决 un_solved
*/
private String resolveStatus;
/**
* 结案说明可放这
*/
private String closeRemark;
}

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

Loading…
Cancel
Save