Browse Source

Merge remote-tracking branch 'origin/dev_issue_project' into dev_issue_project

# Conflicts:
#	epmet-gateway/pom.xml
dev_shibei_match
wangchao 5 years ago
parent
commit
60d4b76bf4
  1. 15
      epmet-gateway/pom.xml
  2. 3
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java
  3. 2
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java
  4. 3
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java
  5. 49
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java
  6. 20
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java
  7. 43
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java
  8. 32
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TickStaffFormDTO.java
  9. 24
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/checkVoteFormDTO.java
  10. 24
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CheckVoteResultDTO.java
  11. 21
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridIdResultDTO.java
  12. 2
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridVotingIssueCountResultDTO.java
  13. 40
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProcessResultDTO.java
  14. 31
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java
  15. 41
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java
  16. 5
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java
  17. 2
      epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml
  18. 2
      epmet-module/gov-issue/gov-issue-server/pom.xml
  19. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java
  20. 5
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java
  21. 28
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  22. 16
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java
  23. 12
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProcessController.java
  24. 15
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProcessDao.java
  25. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java
  26. 11
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
  27. 21
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java
  28. 7
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java
  29. 14
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java
  30. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/GovIssueRedis.java
  31. 10
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProcessService.java
  32. 87
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
  33. 75
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java
  34. 208
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  35. 5
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  36. 34
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProcessDao.xml
  37. 4
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml
  38. 2
      epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml
  39. 2
      epmet-module/gov-mine/gov-mine-server/pom.xml
  40. 3
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java
  41. 2
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java
  42. 3
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java
  43. 16
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java
  44. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml
  45. 2
      epmet-module/gov-org/gov-org-server/pom.xml
  46. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  47. 20
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java
  48. 57
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectProcessListResultDTO.java
  49. 2
      epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml
  50. 8
      epmet-module/gov-project/gov-project-server/pom.xml
  51. 13
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
  52. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java
  53. 9
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java
  54. 12
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
  55. 6
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java
  56. 14
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java
  57. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
  58. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  59. 116
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  60. 32
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
  61. 16
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml
  62. 2
      epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml
  63. 2
      epmet-module/oper-customize/oper-customize-server/pom.xml
  64. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupProcessingCountResultDTO.java
  65. 24
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GridIdFormDTO.java
  66. 20
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CheckJoinTeamResultDTO.java
  67. 2
      epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml
  68. 12
      epmet-module/resi-group/resi-group-server/pom.xml
  69. 10
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java
  70. 7
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java
  71. 6
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupRedis.java
  72. 8
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java
  73. 25
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java
  74. 12
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml
  75. 24
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/CheckVoteFormDTO.java
  76. 24
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/GridIdFormDTO.java
  77. 20
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/CheckJoinTeamResultDTO.java
  78. 24
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/CheckVoteResultDTO.java
  79. 21
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/GridIdResultDTO.java
  80. 41
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java
  81. 31
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteInitResultDTO.java
  82. 10
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java
  83. 2
      epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml
  84. 2
      epmet-module/resi-hall/resi-hall-server/pom.xml
  85. 30
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java
  86. 16
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java
  87. 11
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java
  88. 10
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java
  89. 7
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java
  90. 9
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java
  91. 33
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  92. 2
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/PartyAuthProcessingCountResultDTO.java
  93. 2
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/result/ResiProcessingCountResultDTO.java
  94. 2
      epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml
  95. 2
      epmet-module/resi-partymember/resi-partymember-server/pom.xml
  96. 8
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java
  97. 8
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java
  98. 12
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/redis/ResiPartyMemberRedis.java

15
epmet-gateway/pom.xml

@ -108,6 +108,7 @@
<nacos.ip></nacos.ip>
<!-- gateway routes -->
<!-- 1、认证服务 -->
<!-- <gateway.routes.epmet-auth-server.uri>http://localhost:8081</gateway.routes.epmet-auth-server.uri>-->
<gateway.routes.epmet-auth-server.uri>lb://epmet-auth-server</gateway.routes.epmet-auth-server.uri>
<!-- 2、Admin服务 -->
<gateway.routes.epmet-admin-server.uri>lb://epmet-admin-server</gateway.routes.epmet-admin-server.uri>
@ -120,6 +121,7 @@
<!-- 7、定时任务服务 -->
<gateway.routes.epmet-job-server.uri>lb://epmet-job-server</gateway.routes.epmet-job-server.uri>
<!-- 8、用户模块 -->
<!-- <gateway.routes.epmet-user-server.uri>http://localhost:8087</gateway.routes.epmet-user-server.uri>-->
<gateway.routes.epmet-user-server.uri>lb://epmet-user-server</gateway.routes.epmet-user-server.uri>
<!-- 9、新模块结构demo -->
<gateway.routes.epmet-demo-server.uri>lb://epmet-demo-server</gateway.routes.epmet-demo-server.uri>
@ -130,23 +132,28 @@
<!-- 12、居民端陌生人导览 -->
<gateway.routes.resi-guide-server.uri>lb://resi-guide-server</gateway.routes.resi-guide-server.uri>
<!-- 13、政府组织管理 -->
<!-- <gateway.routes.gov-org-server.uri>http://localhost:8092</gateway.routes.gov-org-server.uri>-->
<gateway.routes.gov-org-server.uri>lb://gov-org-server</gateway.routes.gov-org-server.uri>
<!-- 14、#运营端访问权限控制 -->
<gateway.routes.oper-access-server.uri>lb://oper-access-server</gateway.routes.oper-access-server.uri>
<!-- 15、居民端个人信息 -->
<!-- <gateway.routes.resi-mine-server.uri>http://localhost:8094</gateway.routes.resi-mine-server.uri>-->
<gateway.routes.resi-mine-server.uri>lb://resi-mine-server</gateway.routes.resi-mine-server.uri>
<!-- 16、居民端楼院校组 -->
<!--<gateway.routes.resi-group-server.uri>http://localhost:8095</gateway.routes.resi-group-server.uri>-->
<gateway.routes.resi-group-server.uri>lb://resi-group-server</gateway.routes.resi-group-server.uri>
<!-- 17、党员认证、热心居民申请 -->
<!-- <gateway.routes.resi-partymember-server.uri>http://localhost:8096</gateway.routes.resi-partymember-server.uri>-->
<gateway.routes.resi-partymember-server.uri>lb://resi-partymember-server</gateway.routes.resi-partymember-server.uri>
<!-- 18、政府端网格管理 -->
<!-- <gateway.routes.gov-grid-server.uri>http://localhost:8097</gateway.routes.gov-grid-server.uri>-->
<gateway.routes.gov-grid-server.uri>lb://gov-grid-server</gateway.routes.gov-grid-server.uri>
<!--19.政府端-权限-服务-->
<gateway.routes.gov-access-server.uri>lb://gov-access-server</gateway.routes.gov-access-server.uri>
<!--20.政府端-我的-服务-->
<!-- <gateway.routes.gov-mine-server.uri>http://localhost:8098</gateway.routes.gov-mine-server.uri>-->
<gateway.routes.gov-mine-server.uri>lb://gov-mine-server</gateway.routes.gov-mine-server.uri>
<!-- 21、居民端党群e事 -->
<gateway.routes.resi-hall-server.uri>lb://resi-hall-server</gateway.routes.resi-hall-server.uri>
@ -173,7 +180,7 @@
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.10.150:8848</nacos.server-addr>
<nacos.discovery.namespace>67e3c350-533e-4d7c-9f8f-faf1b4aa82ae</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
@ -210,8 +217,7 @@
<!-- 15、居民端个人信息 -->
<gateway.routes.resi-mine-server.uri>lb://resi-mine-server</gateway.routes.resi-mine-server.uri>
<!-- 16、居民端楼院校组 -->
<gateway.routes.resi-group-server.uri>http://localhost:8095</gateway.routes.resi-group-server.uri>
<!-- <gateway.routes.resi-group-server.uri>lb://resi-group-server</gateway.routes.resi-group-server.uri>-->
<gateway.routes.resi-group-server.uri>lb://resi-group-server</gateway.routes.resi-group-server.uri>
<!-- 17、党员认证、热心居民申请 -->
<gateway.routes.resi-partymember-server.uri>lb://resi-partymember-server</gateway.routes.resi-partymember-server.uri>
<!--18.政府端-权限-服务-->
@ -223,8 +229,7 @@
<!-- 21、居民端党群e事 -->
<gateway.routes.resi-hall-server.uri>lb://resi-hall-server</gateway.routes.resi-hall-server.uri>
<!-- 22、政府工作端议题管理 -->
<gateway.routes.gov-issue-server.uri>http://localhost:8101</gateway.routes.gov-issue-server.uri>
<!-- <gateway.routes.gov-issue-server.uri>lb://gov-issue-server</gateway.routes.gov-issue-server.uri>-->
<gateway.routes.gov-issue-server.uri>lb://gov-issue-server</gateway.routes.gov-issue-server.uri>
<!-- 23、政府工作端项目管理 -->
<gateway.routes.gov-project-server.uri>lb://gov-project-server</gateway.routes.gov-project-server.uri>
<!-- 24、公共服务 -->

3
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java

@ -2,6 +2,7 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.GridProcessingCountResultDTO;
import com.epmet.feign.fallback.GovIssueFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
@ -25,5 +26,5 @@ public interface GovIssueFeignClient {
* @Date 2020/5/13 15:47
**/
@PostMapping(value = "/gov/issue/issue/queryvotingissuecount",consumes = MediaType.APPLICATION_JSON_VALUE)
Result queryVotingIssueCount(@RequestBody List<String> gridIdList);
Result<List<GridProcessingCountResultDTO>> queryVotingIssueCount(@RequestBody List<String> gridIdList);
}

2
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java

@ -166,7 +166,7 @@ public interface ResiPartymemberFeignClient {
* @Description 查询网格下待审核的党员数
* @Date 2020/5/13 15:41
**/
@PostMapping(value = "/resi/partymember/partymemberbaseinfo/getworkgrassrootspartyauth",consumes = MediaType.APPLICATION_JSON_VALUE)
@PostMapping(value = "/resi/partymember/partymemberinfo/getworkgrassrootspartyauth",consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<GridProcessingCountResultDTO>> queryPartyMemberProcessingCount(@RequestBody List<String> gridIdList);
}

3
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java

@ -3,6 +3,7 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.GridProcessingCountResultDTO;
import com.epmet.feign.GovIssueFeignClient;
import org.springframework.stereotype.Component;
@ -16,7 +17,7 @@ import java.util.List;
@Component
public class GovIssueFeignClientFallBack implements GovIssueFeignClient {
@Override
public Result queryVotingIssueCount(List<String> gridIdList) {
public Result<List<GridProcessingCountResultDTO>> queryVotingIssueCount(List<String> gridIdList) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryVotingIssueCount", gridIdList);
}
}

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

@ -52,18 +52,19 @@ public class RemindServiceImpl implements RemindService {
Result<List<CustomerGridByUserIdResultDTO>> govOrgResult = govOrgFeignClient.getMyGrids(formDTO.getStaffId());
if (!govOrgResult.success()) {
logger.error(String.format("调用gov-org-server服务查询工作人员网格列表失败返回结果", govOrgResult.toString()));
}
List<CustomerGridByUserIdResultDTO> gridList = govOrgResult.getData();
for (CustomerGridByUserIdResultDTO gridInfo : gridList) {
if(formDTO.getGridId().equals(gridInfo)){
//查询非当前网格的
break;
}
//其他网格,只要存在有待办事项的网格,就需要在工作首页网格名称后面显示红点
List<String> functionList = this.getRedDotFunctionList(gridInfo.getGridId());
if (null != functionList && functionList.size() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
break;
}else{
List<CustomerGridByUserIdResultDTO> gridList = govOrgResult.getData();
for (CustomerGridByUserIdResultDTO gridInfo : gridList) {
if(formDTO.getGridId().equals(gridInfo)){
//查询非当前网格的
break;
}
//其他网格,只要存在有待办事项的网格,就需要在工作首页网格名称后面显示红点
List<String> functionList = this.getRedDotFunctionList(gridInfo.getGridId());
if (null != functionList && functionList.size() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
break;
}
}
}
return redDotResultDTO;
@ -80,10 +81,10 @@ public class RemindServiceImpl implements RemindService {
if (this.getWorkGrassRootsResi(gridIdList)) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_RESI);
}
if (getWorkGrassRootsPartyAuth(gridIdList)) {
if (this.getWorkGrassRootsPartyAuth(gridIdList)) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_PARTYAUTH);
}
if (getWorkGrassRootsIssue(gridIdList)) {
if (this.getWorkGrassRootsIssue(gridIdList)) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE);
}
return functionList;
@ -101,9 +102,10 @@ public class RemindServiceImpl implements RemindService {
}
}
}
}else{
logger.error(String.format("调用%s服务,查询网格%s待审核小组数失败code%s,msg:", ServiceConstant.RESI_GROUP_SERVER, gridIdList.get(0), groupProcessingCountResult.getCode(),
groupProcessingCountResult.getMsg()));
}
logger.error(String.format("调用%s服务,查询网格%s待审核小组数失败code%s,msg:", ServiceConstant.RESI_GROUP_SERVER, gridIdList.get(0), groupProcessingCountResult.getCode(),
groupProcessingCountResult.getMsg()));
return false;
}
@ -119,9 +121,10 @@ public class RemindServiceImpl implements RemindService {
}
}
}
} else {
logger.error(String.format("调用%s服务,查询网格%s待审核热心居民数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), resiGroupProcessingCountResult.getCode(),
resiGroupProcessingCountResult.getMsg()));
}
logger.error(String.format("调用%s服务,查询网格%s待审核热心居民数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), resiGroupProcessingCountResult.getCode(),
resiGroupProcessingCountResult.getMsg()));
return false;
}
@ -137,9 +140,10 @@ public class RemindServiceImpl implements RemindService {
}
}
}
}else{
logger.error(String.format("调用%s服务,查询网格%s待审核党员数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), partyMemberProcessingCountResult.getCode(),
partyMemberProcessingCountResult.getMsg()));
}
logger.error(String.format("调用%s服务,查询网格%s待审核党员数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), partyMemberProcessingCountResult.getCode(),
partyMemberProcessingCountResult.getMsg()));
return false;
}
@ -155,9 +159,10 @@ public class RemindServiceImpl implements RemindService {
}
}
}
}else{
logger.error(String.format("调用%s服务,查询网格%s表决中议题总数失败code%s,msg:", ServiceConstant.GOV_ISSUE_SERVER, gridIdList.get(0), issueResult.getCode(),
issueResult.getMsg()));
}
logger.error(String.format("调用%s服务,查询网格%s表决中议题总数失败code%s,msg:", ServiceConstant.GOV_ISSUE_SERVER, gridIdList.get(0), issueResult.getCode(),
issueResult.getMsg()));
return false;
}

20
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 处理进展已转项目
*/
@Data
public class ProcessProjectIdFormDTO implements Serializable {
private static final long serialVersionUID = 2185544562374036005L;
/**
* 项目Id
*/
private String projectId;
}

43
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java

@ -0,0 +1,43 @@
package com.epmet.dto.form;
import com.epmet.dto.IssueDTO;
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;
/**
* @Description 议题管理-议题转项目-接口入参
* @Author sun
*/
@Data
public class ShiftProjectFormDTO implements Serializable {
private static final long serialVersionUID = 4859779755214502427L;
@NotBlank(message = "项目Id不能为空")
private String issueId;
@Length(max=1000,message = "公开答复内容不能超过1000位")
private String publicReply;
@NotBlank(message = "内部备注不能为空")
@Length(max=1000,message = "内部备注不能超过1000位")
private String internalRemark;
@Valid
private List<TickStaffFormDTO> staffList;
/**
* 议题详细数据
*/
private IssueDTO issueDTO;
/**
* token中工作人员Id
*/
private String staffId;
}

32
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TickStaffFormDTO.java

@ -0,0 +1,32 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 议题管理-议题转项目-勾选的人员信息-接口入参
* @Author sun
*/
@Data
public class TickStaffFormDTO implements Serializable {
private static final long serialVersionUID = 4859779755214502427L;
@NotBlank(message = "机关Id不能为空")
private String agencyId;
/**
* 部门Id(为空表示勾选的人不是部门下的可能是组织下的也可能是网格下的)
*/
private String departmentId;
/**
* 网格Id(为空表示勾选的人不是网格下的可能是组织下的也可能是部门下的)
*/
private String gridId;
@NotBlank(message = "内部备注不能为空")
private String staffId;
}

24
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/checkVoteFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 校验是否投票表决中
*/
@Data
public class checkVoteFormDTO implements Serializable {
private static final long serialVersionUID = -2170063271034172650L;
/**
* 用户id
*/
private String userId;
/**
* 议题id
*/
private String issueId;
}

24
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CheckVoteResultDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 校验是否投票表决中
*/
@Data
public class CheckVoteResultDTO implements Serializable {
private static final long serialVersionUID = 1908314603146050709L;
/**
* 是否投票 已投票true未投票false
*/
private Boolean voteStatus;
/**
* 支持support反对opposition
*/
private String voteType;
}

21
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridIdResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 表决中议题详情支持反对数
*/
@Data
public class GridIdResultDTO implements Serializable {
private static final long serialVersionUID = 1968505337707779785L;
/**
* 网格ID
*/
private String gridId;
}

2
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GridVotingIssueCountResultDTO.java

@ -19,6 +19,6 @@ public class GridVotingIssueCountResultDTO implements Serializable {
/**
* 表决中的议题总数
*/
private Long count;
private Integer count;
}

40
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProcessResultDTO.java

@ -0,0 +1,40 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 议题处理进展
*/
@Data
public class IssueProcessResultDTO implements Serializable {
private static final long serialVersionUID = 8437703271418235334L;
/**
* 处理进展名称(表决中转项目流转中已结案已关闭)
*/
private String processName;
/**
* 已转项目进展记录时间
*/
private Long processTime;
/**
* 进展说明
*/
private String progressDesc;
/**
* 进展id操作记录表id
*/
private String processId;
/**
* 网格Id
*/
private String gridId;
}

31
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 议题转项目调用gov-project服务--接口返参
* @Author sun
*/
@Data
public class IssueProjectResultDTO implements Serializable {
private static final long serialVersionUID = -1L;
/**
* 项目Id
*/
private String projectId;
/**
* 议题转项目当前操作人对应的处理部门名称(组织-网格)
*/
private String orgName;
/**
* 议题转项目时间(项目表创建时间)
*/
private Date shiftedTime;
}

41
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java

@ -0,0 +1,41 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 议题处理进展
*/
@Data
public class ProcessListResultDTO implements Serializable {
private static final long serialVersionUID = -702803628652751983L;
/**
* 处理进展名称(表决中转项目流转中已结案已关闭)
*/
private String processName;
/**
* 已转项目进展记录时间
*/
private Long processTime;
/**
* 处理部门处理人所属的机关单位名称
*/
private String departmentName;
/**
* 进展说明
*/
private String progressDesc;
/**
* 进展id操作记录表id
*/
private String processId;
}

5
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java

@ -28,5 +28,10 @@ public class VoteResultDTO implements Serializable {
*/
private Integer oppositionCount;
/**
* 支持support 反对oppose
*/
private String voteType = "";
}

2
epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-issue-server:
container_name: gov-issue-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.2
image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.3
ports:
- "8101:8101"
network_mode: host # 使用现有网络

2
epmet-module/gov-issue/gov-issue-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.2</version>
<version>0.3.3</version>
<parent>
<artifactId>gov-issue</artifactId>
<groupId>com.epmet</groupId>

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java

@ -44,7 +44,7 @@ public interface IssueConstant {
String ISSUE_RESI_TOPIC = "resi_topic";
String SELECT_TOPIC_EXCEPTION = "获取话题数据失败";
String SAVE_MSG_EXCEPTION = "关闭议题时给用户发送消息失败";
String SAVE_MSG_EXCEPTION = "发送消息失败";
/**
* 议题管理-操作人所属机构类型机构agency | 部门dept | 网格grid

5
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java

@ -21,5 +21,10 @@ public interface UserMessageConstant {
*/
String ISSUE_UNRESLOVED_MSG = "您好,您发表的话题\"%s\"问题无需解决,原因:%s";
/**
* 议题转项目消息模板
*/
String ISSUE_SHIFT_PROJECT_MSG = "您好,您发表的话题\"%s\"的问题,已由%s部门处理,请查看。";
}

28
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java

@ -1,24 +1,34 @@
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.CommonIssueListFormDTO;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.form.IssueDetailFormDTO;
import com.epmet.dto.result.ClosedIssueListResultDTO;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.result.GridIdResultDTO;
import com.epmet.dto.form.ShiftProjectListFromDTO;
import com.epmet.dto.result.GridVotingIssueCountResultDTO;
import com.epmet.dto.form.IssueShiftedFromTopicFormDTO;
import com.epmet.dto.result.IssueResultDTO;
import com.epmet.dto.result.VotingIssueListResultDTO;
import com.epmet.excel.IssueExcel;
import com.epmet.dto.result.ShiftProjectListResultDTO;
import com.epmet.service.IssueService;
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 javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* @Description 居民端党群议事
@ -104,5 +114,15 @@ public class IssueController {
ValidatorUtils.validateEntity(issueListFormDTO);
return new Result<List<ClosedIssueListResultDTO>>().ok(issueService.closedList(issueListFormDTO));
}
/**
* @Description 根据issueId查询gridId
* @param issueId
* @author zxc
*/
@PostMapping("selectgrididbyissueid")
public Result<GridIdResultDTO> selectGridIdByIssueId(@RequestBody IssueIdFormDTO issueId){
return new Result<GridIdResultDTO>().ok(issueService.selectGridIdByIssueId(issueId));
}
}

16
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java

@ -148,5 +148,21 @@ public class IssueManageController {
ValidatorUtils.validateEntity(issueDetail);
return new Result<GovIssueDetailResultDTO>().ok(issueService.issueDetailGov(issueDetail));
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题管理-议题转项目
**/
@PostMapping("shiftproject")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_SHIFT_PROJECT)
public Result shiftProject(@LoginUser TokenDto tokenDTO, @RequestBody ShiftProjectFormDTO formDTO) {
formDTO.setStaffId(tokenDTO.getUserId());
ValidatorUtils.validateEntity(formDTO);
issueService.shiftProject(formDTO);
return new Result();
}
}

12
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProcessController.java

@ -26,6 +26,8 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.IssueProcessDTO;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.excel.IssueProcessExcel;
import com.epmet.service.IssueProcessService;
import org.springframework.beans.factory.annotation.Autowired;
@ -91,4 +93,14 @@ public class IssueProcessController {
ExcelUtils.exportExcelToTarget(response, null, list, IssueProcessExcel.class);
}
/**
* @Description 议题处理进展
* @param issueId
* @author zxc
*/
@PostMapping("processlist")
public Result<List<ProcessListResultDTO>> processList(@RequestBody IssueIdFormDTO issueId){
return new Result<List<ProcessListResultDTO>>().ok(issueProcessService.processList(issueId));
}
}

15
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProcessDao.java

@ -18,9 +18,14 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.result.IssueProcessResultDTO;
import com.epmet.dto.IssueProcessDTO;
import com.epmet.entity.IssueProcessEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 议题进展记录表
@ -39,4 +44,14 @@ public interface IssueProcessDao extends BaseDao<IssueProcessEntity> {
**/
int insertOne(IssueProcessDTO issueProcessDTO);
/**
* @Description 议题处理进展已关闭
* @param issueId
* @author zxc
*/
List<IssueProcessResultDTO> issueProcess(IssueIdFormDTO issueId);
IssueProcessResultDTO issueBeginInfo(IssueIdFormDTO formDTO);
}

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java

@ -50,7 +50,7 @@ public interface IssueVoteStatisticalDao extends BaseDao<IssueVoteStatisticalEnt
* @param userId
* @author zxc
*/
Integer checkVote(@Param("issueId")String issueId,@Param("userId")String userId);
String checkVote(@Param("issueId")String issueId,@Param("userId")String userId);
/**
* @Description 议题表决折线图

11
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java

@ -3,14 +3,17 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.form.BelongGridNameFormDTO;
import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.result.AgencyGridResultDTO;
import com.epmet.dto.result.BelongGridNameResultDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.ProcessorListResultDTO;
import com.epmet.feign.fallback.GovOrgFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @Description 调用gov-org服务
@ -45,4 +48,12 @@ public interface GovOrgFeignClient {
**/
@PostMapping(value = "/gov/org/customeragency/getprocessorlist/{agencyId}")
Result<ProcessorListResultDTO> getProcessorList(@PathVariable("agencyId") String agencyId);
/**
* @Description 查询网格名
* @param formDTO
* @author zxc
*/
@PostMapping(value = "/gov/org/customergrid/getgridnamebygridid")
Result<BelongGridNameResultDTO> getGridNameByGridId(@RequestBody BelongGridNameFormDTO formDTO);
}

21
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java

@ -2,7 +2,11 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.form.ShiftProjectFormDTO;
import com.epmet.dto.form.ShiftProjectsFromDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.dto.result.IssueProjectResultDTO;
import com.epmet.dto.result.ShiftProjectResultDTO;
import com.epmet.feign.fallback.GovProjectFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
@ -27,4 +31,21 @@ public interface GovProjectFeignClient {
*/
@PostMapping("/gov/project/project/shiftprojectlist")
Result<List<ShiftProjectResultDTO>> getProjectByIssue(@RequestBody ShiftProjectsFromDTO fromDTO);
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题管理-议题转项目
**/
@PostMapping("/gov/project/project/issueshiftproject")
Result<IssueProjectResultDTO> issueShiftProject(@RequestBody ShiftProjectFormDTO formDTO);
/**
* @Description 议题处理进展已转项目
* @param formDTO
* @author zxc
*/
@PostMapping("/gov/project/projectprocess/projectprocesslist")
Result<List<ProcessListResultDTO>> projectProcessList(@RequestBody ProcessProjectIdFormDTO formDTO);
}

7
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java

@ -3,7 +3,9 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.BelongGridNameFormDTO;
import com.epmet.dto.result.AgencyGridResultDTO;
import com.epmet.dto.result.BelongGridNameResultDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.ProcessorListResultDTO;
import com.epmet.feign.GovOrgFeignClient;
@ -30,4 +32,9 @@ public class GovOrgFeignClientFallBack implements GovOrgFeignClient {
public Result<ProcessorListResultDTO> getProcessorList(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getProcessorList", agencyId);
}
@Override
public Result<BelongGridNameResultDTO> getGridNameByGridId(BelongGridNameFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridNameByGridId", formDTO);
}
}

14
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java

@ -3,7 +3,11 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.form.ShiftProjectFormDTO;
import com.epmet.dto.form.ShiftProjectsFromDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.dto.result.IssueProjectResultDTO;
import com.epmet.dto.result.ShiftProjectResultDTO;
import com.epmet.feign.GovProjectFeignClient;
import org.springframework.stereotype.Component;
@ -21,4 +25,14 @@ public class GovProjectFeignClientFallBack implements GovProjectFeignClient {
public Result<List<ShiftProjectResultDTO>> getProjectByIssue(ShiftProjectsFromDTO fromDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getProjectByIssue", fromDTO);
}
@Override
public Result<List<ProcessListResultDTO>> projectProcessList(ProcessProjectIdFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "projectProcessList", formDTO);
}
@Override
public Result<IssueProjectResultDTO> issueShiftProject(ShiftProjectFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "issueShiftProject", formDTO);
}
}

6
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/GovIssueRedis.java

@ -65,11 +65,11 @@ public class GovIssueRedis {
* @Description 获取某网格下表决中的议题总数
* @Date 2020/5/14 9:40
**/
public Long queryVotingIssueCount(String gridId) {
Long auditingGroupCount = 0L;
public Integer queryVotingIssueCount(String gridId) {
Integer auditingGroupCount = 0;
try {
String workGrassrootsGroupRedDotKey = GovIssueRedisKeys.getWorkGrassrootsIssueRedDotKey(gridId);
auditingGroupCount = (Long) redisUtils.get(workGrassrootsGroupRedDotKey);
auditingGroupCount = (Integer) redisUtils.get(workGrassrootsGroupRedDotKey);
} catch (Exception e) {
logger.error(String.format("网格id%s,查询网格下表决中议题总数异常%s", gridId, e.getMessage()));
e.printStackTrace();

10
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProcessService.java

@ -20,7 +20,10 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IssueProcessDTO;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.entity.IssueProcessEntity;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
@ -93,6 +96,13 @@ public interface IssueProcessService extends BaseService<IssueProcessEntity> {
*/
void delete(String[] ids);
/**
* @Description 议题处理进展
* @param issueId
* @author zxc
*/
List<ProcessListResultDTO> processList(IssueIdFormDTO issueId);
/**
* @Description 议题流程新增记录
* @param issueProcessDTO

87
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java

@ -1,6 +1,16 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.form.CloseIssueFormDTO;
import com.epmet.dto.form.DepartmentStaffListFormDTO;
import com.epmet.dto.form.IssueDetailFormDTO;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.GridIdResultDTO;
import com.epmet.dto.result.GridVotingIssueCountResultDTO;
import com.epmet.dto.result.IssueResultDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.dto.form.CloseIssueFormDTO;
@ -10,8 +20,10 @@ import com.epmet.dto.form.IssueDetailFormDTO;
import com.epmet.dto.result.*;
import com.epmet.dto.form.IssueShiftedFromTopicFormDTO;
import com.epmet.entity.IssueEntity;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
/**
* @Author zxc
@ -19,6 +31,66 @@ import java.util.List;
*/
public interface IssueService extends BaseService<IssueEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IssueDTO>
* @author generator
* @date 2020-05-14
*/
PageData<IssueDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IssueDTO>
* @author generator
* @date 2020-05-14
*/
List<IssueDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IssueDTO
* @author generator
* @date 2020-05-14
*/
IssueDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-05-14
*/
void save(IssueDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-05-14
*/
void update(IssueDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-05-14
*/
void delete(String[] ids);
/**
* @Description 议题详情
* @param issueDetail
@ -94,6 +166,13 @@ public interface IssueService extends BaseService<IssueEntity> {
**/
GovIssueDetailResultDTO issueDetailGov(IssueDetailFormDTO issueDetail);
/**
* @Description 根据issueId查询gridId
* @param issueId
* @author zxc
*/
GridIdResultDTO selectGridIdByIssueId(IssueIdFormDTO issueId);
/**
* @param formDTO
* @return
@ -101,4 +180,12 @@ public interface IssueService extends BaseService<IssueEntity> {
* @Description 议题管理-议题人员选择
**/
ProcessorListResultDTO processorList(ProcessorListFormDTO formDTO);
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题管理-议题转项目
**/
void shiftProject(ShiftProjectFormDTO formDTO);
}

75
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java

@ -20,19 +20,34 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.constant.IssueConstant;
import com.epmet.dao.IssueProcessDao;
import com.epmet.dao.IssueProjectRelationDao;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.IssueProcessDTO;
import com.epmet.dto.form.BelongGridNameFormDTO;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.result.BelongGridNameResultDTO;
import com.epmet.dto.result.IssueProcessResultDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.entity.IssueProcessEntity;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.GovProjectFeignClient;
import com.epmet.redis.IssueProcessRedis;
import com.epmet.service.IssueProcessService;
import com.epmet.service.IssueService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -48,6 +63,16 @@ public class IssueProcessServiceImpl extends BaseServiceImpl<IssueProcessDao, Is
@Autowired
private IssueProcessRedis issueProcessRedis;
@Autowired
private IssueService issueService;
@Autowired
private GovOrgFeignClient govOrgFeignClient;
@Autowired
private GovProjectFeignClient govProjectFeignClient;
@Autowired
private IssueProjectRelationDao issueProjectRelationDao;
@Autowired
private IssueProcessDao issueProcessDao;
@Override
public PageData<IssueProcessDTO> page(Map<String, Object> params) {
@ -113,4 +138,54 @@ public class IssueProcessServiceImpl extends BaseServiceImpl<IssueProcessDao, Is
return baseDao.insertOne(issueProcessDTO);
}
/**
* @Description 议题处理进展
* @param issueId
* @author zxc
*/
@Override
public List<ProcessListResultDTO> processList(IssueIdFormDTO issueId) {
List<ProcessListResultDTO> listResult = new ArrayList<ProcessListResultDTO>();
IssueDTO issueDTO = issueService.get(issueId.getIssueId());
String issueStatus = issueDTO.getIssueStatus();
if (issueStatus.equals(IssueConstant.ISSUE_CLOSED)){//已关闭——处理进展
List<IssueProcessResultDTO> issueProcessResultDTOS = baseDao.issueProcess(issueId);
if (issueProcessResultDTOS.size()!=NumConstant.ZERO){
String gridId = issueProcessResultDTOS.get(NumConstant.ZERO).getGridId();
BelongGridNameFormDTO formDTO = new BelongGridNameFormDTO();
formDTO.setGridId(gridId);
//处理部门(处理人所属的机关单位名称) eg:阜新路社区——第一网格
BelongGridNameResultDTO data = govOrgFeignClient.getGridNameByGridId(formDTO).getData();
BeanUtils.copyProperties(issueProcessResultDTOS,listResult);
for (IssueProcessResultDTO issueProcessResultDTO : issueProcessResultDTOS) {
ProcessListResultDTO process = new ProcessListResultDTO();
BeanUtils.copyProperties(issueProcessResultDTO,process);
process.setDepartmentName(data.getBelongsGridName());
listResult.add(process);
}
}
}else if (issueStatus.equals(IssueConstant.ISSUE_SHIFT_PROJECT)){//已转项目——处理进展
String projectId = issueProjectRelationDao.selectProjectIdByIssueId(issueId.getIssueId());
if (!StringUtils.isBlank(projectId)) {
ProcessProjectIdFormDTO formDTO = new ProcessProjectIdFormDTO();
formDTO.setProjectId(projectId);
listResult = govProjectFeignClient.projectProcessList(formDTO).getData();
//转议题时间
IssueProcessResultDTO issueProcessResultDTO = issueProcessDao.issueBeginInfo(issueId);
String gridId = issueProcessResultDTO.getGridId();
BelongGridNameFormDTO gridName = new BelongGridNameFormDTO();
gridName.setGridId(gridId);
//处理部门(处理人所属的机关单位名称) eg:阜新路社区——第一网格
BelongGridNameResultDTO data = govOrgFeignClient.getGridNameByGridId(gridName).getData();
ProcessListResultDTO process = new ProcessListResultDTO();
BeanUtils.copyProperties(issueProcessResultDTO,process);
process.setDepartmentName(data.getBelongsGridName());
listResult.add(process);
}
}else {
return new ArrayList<>();
}
return listResult;
}
}

208
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -1,33 +1,36 @@
package com.epmet.service.impl;
import com.alibaba.nacos.client.utils.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.IssueConstant;
import com.epmet.constant.ReadFlagConstant;
import com.epmet.constant.UserMessageConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IssueDao;
import com.epmet.dao.IssueProjectRelationDao;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.IssueProcessDTO;
import com.epmet.dto.IssueVoteStatisticalDTO;
import com.epmet.dto.form.CommonIssueListFormDTO;
import com.epmet.dao.IssueProcessDao;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.dto.form.CloseIssueFormDTO;
import com.epmet.dto.form.DepartmentStaffListFormDTO;
import com.epmet.dto.form.IssueDetailFormDTO;
import com.epmet.dto.form.IssueShiftedFromTopicFormDTO;
import com.epmet.dto.result.*;
import com.epmet.dto.form.UserMessageFormDTO;
import com.epmet.entity.IssueEntity;
import com.epmet.entity.IssueProcessEntity;
import com.epmet.entity.IssueProjectRelationEntity;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.GovProjectFeignClient;
import com.epmet.feign.MessageFeignClient;
@ -41,20 +44,17 @@ import com.epmet.service.IssueProjectRelationService;
import com.epmet.service.IssueService;
import com.epmet.service.IssueVoteStatisticalService;
import com.epmet.utils.ModuleConstants;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @Author zxc
@ -77,6 +77,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
private GovIssueRedis govIssueRedis;
@Autowired
private GovProjectFeignClient govProjectFeignClient;
@Autowired
private IssueProjectRelationDao issueProjectRelationDao;
protected static final Logger logger = LoggerFactory.getLogger(IssueServiceImpl.class);
@ -87,6 +89,57 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Autowired
private IssueProjectRelationService issueProjectRelationService;
@Override
public PageData<IssueDTO> page(Map<String, Object> params) {
IPage<IssueEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IssueDTO.class);
}
@Override
public List<IssueDTO> list(Map<String, Object> params) {
List<IssueEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IssueDTO.class);
}
private QueryWrapper<IssueEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IssueEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IssueDTO get(String id) {
IssueEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IssueDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IssueDTO dto) {
IssueEntity entity = ConvertUtils.sourceToTarget(dto, IssueEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IssueDTO dto) {
IssueEntity entity = ConvertUtils.sourceToTarget(dto, IssueEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param issueDetail
* @Description 议题详情
@ -106,6 +159,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
* @Author sun
* @Description 议题管理-关闭议题
**/
@Override
@Transactional(rollbackFor = Exception.class)
public void closeIssue(CloseIssueFormDTO formDTO) {
@ -123,12 +177,14 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
if (baseDao.updateById(entity) < NumConstant.ONE) {
throw new RenException(IssueConstant.UPPDATE_EXCEPTION);
}
//2:调用gov-org服务,查询组织网格名称
AgencyGridResultDTO agencyGridResultDTO = new AgencyGridResultDTO();
agencyGridResultDTO.setAgencyId(entity.getOrgId());
agencyGridResultDTO.setGridId(entity.getGridId());
Result<AgencyGridResultDTO> resultDTO = govOrgFeignClient.getAgencyAndGrid(agencyGridResultDTO);
agencyGridResultDTO = resultDTO.getData();
//3:议题进展记录表新增数据
IssueProcessEntity processEntity = new IssueProcessEntity();
processEntity.setIssueId(formDTO.getIssueId());
@ -138,36 +194,48 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
processEntity.setOperationExplain(formDTO.getCloseReason());
processEntity.setOrgName(agencyGridResultDTO.getAgencyName() + "-" + agencyGridResultDTO.getGridName());
issueProcessDao.insert(processEntity);
//4:调用epmet-message服务,给居民端话题创建人和议题发起人发送消息
if (!saveUserMessageList(formDTO, entity).success()) {
//4.1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题)
Result<ResiTopicDTO> resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId());
if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) {
throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION);
}
ResiTopicDTO topicDTO = resultTopicDTO.getData();
//4.2:创建消息模板
String messageContent = "";
if (IssueConstant.ISSUE_RESLOVED.equals(formDTO.getResolveType())) {
messageContent = String.format(UserMessageConstant.ISSUE_RESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason());
} else if (IssueConstant.ISSUE_UNRESLOVED.equals(formDTO.getResolveType())) {
messageContent = String.format(UserMessageConstant.ISSUE_UNRESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason());
}
//4.3:调用服务,发送消息
if (!saveUserMessageList(topicDTO, messageContent, entity).success()) {
throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION);
}
}
@Override
public List<GridVotingIssueCountResultDTO> queryVotingIssueCount(List<String> gridIdList) {
List<GridVotingIssueCountResultDTO> list = new ArrayList<>();
for (String gridId : gridIdList) {
GridVotingIssueCountResultDTO gridVotingIssueCountResultDTO = new GridVotingIssueCountResultDTO();
gridVotingIssueCountResultDTO.setGridId(gridId);
Long auditingCount = govIssueRedis.queryVotingIssueCount(gridId);
gridVotingIssueCountResultDTO.setCount(auditingCount);
list.add(gridVotingIssueCountResultDTO);
}
return list;
//5:缓存中网格下表决中的议题总数减1
govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId());
}
/**
* @Description 根据issueId查询gridId
* @param issueId
* @author zxc
*/
@Override
public GridIdResultDTO selectGridIdByIssueId(IssueIdFormDTO issueId) {
GridIdResultDTO gridIdResult = new GridIdResultDTO();
IssueDTO issueDTO = get(issueId.getIssueId());
gridIdResult.setGridId(issueDTO.getGridId());
return gridIdResult;
}
/**
* @Description 关闭议题给话题创建人和议题发起人发送消息
* @Description 关闭议题议题转项目时给话题创建人和议题发起人发送消息
* @author sun
*/
private Result saveUserMessageList(CloseIssueFormDTO formDTO, IssueEntity entity) {
//1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题)
Result<ResiTopicDTO> resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId());
if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) {
throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION);
}
ResiTopicDTO topicDTO = resultTopicDTO.getData();
private Result saveUserMessageList(ResiTopicDTO topicDTO, String messageContent, IssueEntity entity) {
//2:分别给话题创建人、议题发起人发送消息
List<UserMessageFormDTO> msgList = new ArrayList<>();
UserMessageFormDTO msgDTO = new UserMessageFormDTO();
@ -175,12 +243,6 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
msgDTO.setGridId(entity.getGridId());
msgDTO.setApp(AppClientConstant.APP_RESI);
msgDTO.setTitle(UserMessageConstant.ISSUE_TITLE);
String messageContent = "";
if (IssueConstant.ISSUE_RESLOVED.equals(formDTO.getResolveType())) {
messageContent = String.format(UserMessageConstant.ISSUE_RESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason());
} else if (IssueConstant.ISSUE_UNRESLOVED.equals(formDTO.getResolveType())) {
messageContent = String.format(UserMessageConstant.ISSUE_UNRESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason());
}
msgDTO.setMessageContent(messageContent);
msgDTO.setReadFlag(ReadFlagConstant.UN_READ);
msgDTO.setUserId(topicDTO.getCreatedBy());
@ -190,6 +252,23 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return messageFeignClient.saveUserMessageList(msgList);
}
@Override
public List<GridVotingIssueCountResultDTO> queryVotingIssueCount(List<String> gridIdList) {
List<GridVotingIssueCountResultDTO> list = new ArrayList<>();
for (String gridId : gridIdList) {
GridVotingIssueCountResultDTO gridVotingIssueCountResultDTO = new GridVotingIssueCountResultDTO();
gridVotingIssueCountResultDTO.setGridId(gridId);
Integer auditingCount = govIssueRedis.queryVotingIssueCount(gridId);
if (null == auditingCount) {
gridVotingIssueCountResultDTO.setCount(0);
} else {
gridVotingIssueCountResultDTO.setCount(auditingCount);
}
list.add(gridVotingIssueCountResultDTO);
}
return list;
}
/**
* @param formDTO
* @return
@ -377,4 +456,61 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return null;
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题管理-议题转项目
**/
@Override
@Transactional(rollbackFor = Exception.class)
public void shiftProject(ShiftProjectFormDTO formDTO) {
//因需要保证议题表中的转项目时间与创建项目时间一致 因此先新增项目数据再更新议题数据
//1:查询议题数据
IssueEntity entity = baseDao.selectById(formDTO.getIssueId());
formDTO.setIssueDTO(ConvertUtils.sourceToTarget(entity, IssueDTO.class));
//2:调用gov-project服务,新增项目各业务表初始数据
Result<IssueProjectResultDTO> resultDTO = govProjectFeignClient.issueShiftProject(formDTO);
IssueProjectResultDTO issueProjectResultDTO = resultDTO.getData();
//3:更新议题相关业务表数据
//3.1:更新议题表数据
entity.setIssueStatus(IssueConstant.ISSUE_SHIFT_PROJECT);
entity.setShiftedTime(issueProjectResultDTO.getShiftedTime());
baseDao.updateById(entity);
//3.2:议题处理进展表新增数据
IssueProcessEntity processEntity = new IssueProcessEntity();
processEntity.setIssueId(entity.getId());
processEntity.setIssueStatus(IssueConstant.ISSUE_SHIFT_PROJECT);
processEntity.setOrgType(IssueConstant.ISSUE_GRID);
processEntity.setOrgId(entity.getGridId());
processEntity.setOrgName(issueProjectResultDTO.getOrgName());
issueProcessDao.insert(processEntity);
//3.3:议题项目关系表新增数据
IssueProjectRelationEntity relationEntity = new IssueProjectRelationEntity();
relationEntity.setIssueId(entity.getId());
relationEntity.setProjectId(issueProjectResultDTO.getProjectId());
issueProjectRelationDao.insert(relationEntity);
//4:调用epmet-message服务,给居民端话题创建人和议题发起人发送消息
//4.1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题)
Result<ResiTopicDTO> resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId());
if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) {
throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION);
}
ResiTopicDTO topicDTO = resultTopicDTO.getData();
//4.2:创建消息模板
String messageContent = String.format(UserMessageConstant.ISSUE_SHIFT_PROJECT_MSG, topicDTO.getTopicContent(), issueProjectResultDTO.getOrgName());
//4.3:调用服务,发送消息
if (!saveUserMessageList(topicDTO, messageContent, entity).success()) {
throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION);
}
//5:缓存中网格下表决中的议题总数减1
govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId());
}
}

5
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

@ -132,12 +132,13 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
public VoteResultDTO voteCount(TokenDto tokenDto,IssueIdFormDTO issueId) {
VoteResultDTO voteResultDTO = issueVoteStatisticalDao.voteCount(issueId);
//校验是否已经投票
Integer voteStatus = issueVoteStatisticalDao.checkVote(issueId.getIssueId(), tokenDto.getUserId());
String voteStatus = issueVoteStatisticalDao.checkVote(issueId.getIssueId(), tokenDto.getUserId());
if (voteResultDTO!=null){
if (voteStatus==0){
if (StringUtils.isBlank(voteStatus)){
voteResultDTO.setVoteFlag(false);
}else {
voteResultDTO.setVoteFlag(true);
voteResultDTO.setVoteType(voteStatus);
}
}
return voteResultDTO;

34
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProcessDao.xml

@ -98,5 +98,39 @@
0
</trim>
</insert>
<!-- 议题处理进展——已关闭 -->
<select id="issueProcess" parameterType="com.epmet.dto.form.IssueIdFormDTO" resultType="com.epmet.dto.result.IssueProcessResultDTO">
SELECT
CASE
WHEN issue_status = 'voting' THEN "转议题"
WHEN issue_status = 'closed' THEN "已关闭"
WHEN issue_status = 'shift_project' THEN "已转项目"
END AS processName,
UNIX_TIMESTAMP( created_time ) AS processTime,
operation_explain AS progressDesc,
id AS processId,
org_id AS gridId
FROM
issue_process
WHERE
issue_id = #{issueId}
AND del_flag = 0
ORDER BY created_time DESC
</select>
<select id="issueBeginInfo" parameterType="com.epmet.dto.form.IssueIdFormDTO" resultType="com.epmet.dto.result.IssueProcessResultDTO">
SELECT
'转议题' AS processName,
UNIX_TIMESTAMP( created_time ) AS processTime,
operation_explain AS progressDesc,
id AS processId,
org_id AS gridId
FROM
issue_process
WHERE
issue_id = #{issueId}
AND issue_status = 'voting'
AND del_flag = 0
</select>
</mapper>

4
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml

@ -30,9 +30,9 @@
</select>
<!-- 校验是否投票(表决中详情——支持、反对) -->
<select id="checkVote" resultType="integer">
<select id="checkVote" resultType="java.lang.String">
SELECT
COUNT(*) AS voteStatus
attitude AS voteType
FROM
issue_vote_detail
WHERE

2
epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-mine-server:
container_name: gov-mine-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-mine-server:0.3.11
image: 192.168.1.130:10080/epmet-cloud-dev/gov-mine-server:0.3.13
ports:
- "8098:8098"
network_mode: host # 使用现有网络

2
epmet-module/gov-mine/gov-mine-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.11</version>
<version>0.3.13</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-mine</artifactId>

3
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java

@ -2,6 +2,7 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.GridProcessingCountResultDTO;
import com.epmet.feign.fallback.GovIssueFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
@ -25,5 +26,5 @@ public interface GovIssueFeignClient {
* @Date 2020/5/13 15:47
**/
@PostMapping(value = "/gov/issue/issue/queryvotingissuecount",consumes = MediaType.APPLICATION_JSON_VALUE)
Result queryVotingIssueCount(@RequestBody List<String> gridIdList);
Result<List<GridProcessingCountResultDTO>> queryVotingIssueCount(@RequestBody List<String> gridIdList);
}

2
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java

@ -35,7 +35,7 @@ public interface ResiPartymemberFeignClient {
* @Description 查询网格下待审核的党员数
* @Date 2020/5/13 15:41
**/
@PostMapping(value = "/resi/partymember/partymemberbaseinfo/getworkgrassrootspartyauth",consumes = MediaType.APPLICATION_JSON_VALUE)
@PostMapping(value = "/resi/partymember/partymemberinfo/getworkgrassrootspartyauth",consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<GridProcessingCountResultDTO>> queryPartyMemberProcessingCount(@RequestBody List<String> gridIdList);
}

3
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java

@ -3,6 +3,7 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.GridProcessingCountResultDTO;
import com.epmet.feign.GovIssueFeignClient;
import org.springframework.stereotype.Component;
@ -16,7 +17,7 @@ import java.util.List;
@Component
public class GovIssueFeignClientFallBack implements GovIssueFeignClient {
@Override
public Result queryVotingIssueCount(List<String> gridIdList) {
public Result<List<GridProcessingCountResultDTO>> queryVotingIssueCount(List<String> gridIdList) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryVotingIssueCount", gridIdList);
}
}

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

@ -112,7 +112,9 @@ public class StaffAgencyServiceImpl implements StaffAgencyService {
private boolean checkIssueProcessing(String gridId, List<GridProcessingCountResultDTO> issueProcessingList) {
boolean flag = false;
for (GridProcessingCountResultDTO gridProcessingCountResultDTO : issueProcessingList) {
if (gridId.equals(gridProcessingCountResultDTO.getGridId()) && gridProcessingCountResultDTO.getCount() > 0) {
if (gridId.equals(gridProcessingCountResultDTO.getGridId())
&& null!=gridProcessingCountResultDTO.getCount()
&& gridProcessingCountResultDTO.getCount() > 0) {
flag = true;
break;
}
@ -123,7 +125,9 @@ public class StaffAgencyServiceImpl implements StaffAgencyService {
private boolean checkPartyMemberProcessing(String gridId, List<GridProcessingCountResultDTO> partyMemberProcessingList) {
boolean flag = false;
for (GridProcessingCountResultDTO gridProcessingCountResultDTO : partyMemberProcessingList) {
if (gridId.equals(gridProcessingCountResultDTO.getGridId()) && gridProcessingCountResultDTO.getCount() > 0) {
if (gridId.equals(gridProcessingCountResultDTO.getGridId())
&& null != gridProcessingCountResultDTO.getCount()
&& gridProcessingCountResultDTO.getCount() > 0) {
flag = true;
break;
}
@ -134,7 +138,9 @@ public class StaffAgencyServiceImpl implements StaffAgencyService {
private boolean checkResiProcessing(String gridId, List<GridProcessingCountResultDTO> resiProcessingList) {
boolean flag = false;
for (GridProcessingCountResultDTO gridProcessingCountResultDTO : resiProcessingList) {
if (gridId.equals(gridProcessingCountResultDTO.getGridId()) && gridProcessingCountResultDTO.getCount() > 0) {
if (gridId.equals(gridProcessingCountResultDTO.getGridId())
&& null!=gridProcessingCountResultDTO.getCount()
&& gridProcessingCountResultDTO.getCount() > 0) {
flag = true;
break;
}
@ -145,7 +151,9 @@ public class StaffAgencyServiceImpl implements StaffAgencyService {
private boolean checkGroupProcessing(String gridId, List<GridProcessingCountResultDTO> groupProcessingList) {
boolean flag = false;
for (GridProcessingCountResultDTO gridProcessingCountResultDTO : groupProcessingList) {
if (gridId.equals(gridProcessingCountResultDTO.getGridId()) && gridProcessingCountResultDTO.getCount() > 0) {
if (gridId.equals(gridProcessingCountResultDTO.getGridId())
&& null!=gridProcessingCountResultDTO.getCount()
&& gridProcessingCountResultDTO.getCount() > 0) {
flag = true;
break;
}

2
epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-org-server:
container_name: gov-org-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.34
image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.36
ports:
- "8092:8092"
network_mode: host # 使用现有网络

2
epmet-module/gov-org/gov-org-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.34</version>
<version>0.3.36</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-org</artifactId>

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -369,7 +369,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
/**
* @param subAgencyPids 当前组织的下一级组织的pids字段值(当前组织的pids+":"+当前组织Id)
* @return
* @Author 迭代查询当前组织的所有下级组织树结构数据
* @Author
* @Description 迭代查询当前组织的所有下级组织树结构数据
*/
private List<AgencySubResultDTO> getDepartmentList(String subAgencyPids) {
List<AgencySubResultDTO> subAgencyList = baseDao.selectSubAgencyList(subAgencyPids);

20
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessProjectIdFormDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 处理进展已转项目
*/
@Data
public class ProcessProjectIdFormDTO implements Serializable {
private static final long serialVersionUID = 2185544562374036005L;
/**
* 项目Id
*/
private String projectId;
}

57
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectProcessListResultDTO.java

@ -0,0 +1,57 @@
/**
* 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.result;
import lombok.Data;
import java.io.Serializable;
/**
* 项目跟踪-项目处理进展列表-接口返参
*/
@Data
public class ProjectProcessListResultDTO implements Serializable {
private static final long serialVersionUID = 5342591979112900804L;
/**
* 项目处理进展Id
*/
private String processId = "";
/**
* 处理进展名称
*/
private String processName = "";
/**
* 处理进展时间
*/
private Long processTime;
/**
* 处理部门
*/
private String departmentName = "";
/**
* 进展说明
*/
private String progressDesc = "";
}

2
epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-project-server:
container_name: gov-project-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.2
image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.3
ports:
- "8102:8102"
network_mode: host # 使用现有网络

8
epmet-module/gov-project/gov-project-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.2</version>
<version>0.3.3</version>
<parent>
<artifactId>gov-project</artifactId>
<groupId>com.epmet</groupId>
@ -78,6 +78,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-issue-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

13
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java

@ -26,7 +26,9 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.ShiftProjectFormDTO;
import com.epmet.dto.form.ShiftProjectsFromDTO;
import com.epmet.dto.result.IssueProjectResultDTO;
import com.epmet.dto.result.ShiftProjectResultDTO;
import com.epmet.excel.ProjectExcel;
import com.epmet.service.ProjectService;
@ -106,4 +108,15 @@ public class ProjectController {
return new Result<List<ShiftProjectResultDTO>>().ok(list);
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题转项目-项目各业务表初始化数据
**/
@PostMapping("issueshiftproject")
public Result<IssueProjectResultDTO> issueShiftProject(@RequestBody ShiftProjectFormDTO formDTO) {
return new Result<IssueProjectResultDTO>().ok(projectService.issueShiftProject(formDTO));
}
}

7
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectProcessController.java

@ -26,6 +26,8 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.ProjectProcessDTO;
import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.result.ProjectProcessListResultDTO;
import com.epmet.excel.ProjectProcessExcel;
import com.epmet.service.ProjectProcessService;
import org.springframework.beans.factory.annotation.Autowired;
@ -91,4 +93,9 @@ public class ProjectProcessController {
ExcelUtils.exportExcelToTarget(response, null, list, ProjectProcessExcel.class);
}
@PostMapping("projectprocesslist")
public Result<List<ProjectProcessListResultDTO>> projectProcessList(@RequestBody ProcessProjectIdFormDTO formDTO){
return new Result<List<ProjectProcessListResultDTO>>().ok(projectProcessService.projectProcessList(formDTO));
}
}

9
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java

@ -18,7 +18,9 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.result.ProcesslistResultDTO;
import com.epmet.dto.result.ProjectProcessListResultDTO;
import com.epmet.entity.ProjectProcessEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -43,4 +45,11 @@ public interface ProjectProcessDao extends BaseDao<ProjectProcessEntity> {
List<ProcesslistResultDTO> getProcessListByProjectId(@Param("projectId") String projectId);
List<ProjectProcessEntity> selectReturnableList(@Param("projectId") String projectId);
/**
* @Description 议题处理进展已转项目
* @param formDTO
* @author zxc
*/
List<ProjectProcessListResultDTO> projectProcessList(ProcessProjectIdFormDTO formDTO);
}

12
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java

@ -2,6 +2,7 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.form.StaffsInAgencyFromDTO;
import com.epmet.dto.form.UserResiInfoListFormDTO;
import com.epmet.dto.result.StaffInfoResultDTO;
@ -36,4 +37,15 @@ public interface EpmetUserFeignClient {
*/
@PostMapping("/epmetuser/customerstaff/stafflist")
Result<List<StaffInfoResultDTO>> getStaffList(@RequestBody StaffsInAgencyFromDTO fromDTO);
/**
* 根据用户ID获取工作人员基本信息
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.CustomerStaffDTO>
* @author zhaoqifeng
* @date 2020/4/22 10:05
**/
@PostMapping(value = "epmetuser/customerstaff/getstaffinfobyuserid")
Result<CustomerStaffDTO> getCustomerStaffInfoByUserId(@RequestBody CustomerStaffDTO formDTO);
}

6
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java

@ -3,6 +3,7 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.form.StaffsInAgencyFromDTO;
import com.epmet.dto.form.UserResiInfoListFormDTO;
import com.epmet.dto.result.StaffInfoResultDTO;
@ -28,4 +29,9 @@ public class EpmetUserFeignClientFallBack implements EpmetUserFeignClient {
public Result<List<StaffInfoResultDTO>> getStaffList(StaffsInAgencyFromDTO fromDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffList", fromDTO);
}
@Override
public Result<CustomerStaffDTO> getCustomerStaffInfoByUserId(CustomerStaffDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "CustomerStaffDTO", formDTO);
}
}

14
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java

@ -21,14 +21,13 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.ProjectProcessDTO;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.form.ProjectDetailFromDTO;
import com.epmet.dto.form.ReturnListFromDTO;
import com.epmet.dto.form.TransferFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.DepartmentResultDTO;
import com.epmet.dto.result.ProcesslistResultDTO;
import com.epmet.dto.result.ProjectProcessListResultDTO;
import com.epmet.dto.result.ReturnListResultDTO;
import com.epmet.entity.ProjectProcessEntity;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
@ -126,4 +125,11 @@ public interface ProjectProcessService extends BaseService<ProjectProcessEntity>
**/
void transfer(TransferFormDTO formDTO);
/**
* @Description 议题处理进展已转项目
* @param formDTO
* @author zxc
*/
List<ProjectProcessListResultDTO> projectProcessList(ProcessProjectIdFormDTO formDTO);
}

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

@ -162,4 +162,12 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @return java.util.List<com.epmet.dto.ProjectDTO>
*/
List<ShiftProjectResultDTO> getProjectByIssue(ShiftProjectsFromDTO fromDTO);
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题转项目-项目各业务表初始化数据
**/
IssueProjectResultDTO issueShiftProject(ShiftProjectFormDTO formDTO);
}

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java

@ -32,10 +32,7 @@ import com.epmet.dao.ProjectStaffDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.ProjectProcessDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.AgencyDeptGridResultDTO;
import com.epmet.dto.result.ProcesslistResultDTO;
import com.epmet.dto.result.ReturnListResultDTO;
import com.epmet.dto.result.StaffInfoResultDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.ProjectEntity;
import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectStaffEntity;
@ -181,7 +178,6 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
if (null == staffEntity) {
throw new RenException(ProjectConstant.SELECT_PROJECTSTAFF_EXCEPTION);
}
staffEntity.setId(formDTO.getProjectStaffId());
staffEntity.setIsHandle(ProjectConstant.HANDLE);
if (projectStaffDao.updateById(staffEntity) < NumConstant.ONE) {
throw new RenException(ProjectConstant.UPDATE_PROJECTSTAFF_EXCEPTION);
@ -245,4 +241,14 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
projectStaffService.insertBatch(entityList);
}
/**
* @Description 议题处理进展已转项目
* @param formDTO
* @author zxc
*/
@Override
public List<ProjectProcessListResultDTO> projectProcessList(ProcessProjectIdFormDTO formDTO) {
return baseDao.projectProcessList(formDTO);
}
}

116
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -29,6 +29,8 @@ import com.epmet.constant.ParameterKeyConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dao.ProjectDao;
import com.epmet.dto.CustomerProjectParameterDTO;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.ProjectStaffDTO;
import com.epmet.dto.form.*;
@ -37,6 +39,8 @@ import com.epmet.entity.ProjectEntity;
import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectStaffEntity;
import com.epmet.feign.CommonFeignClient;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.redis.ProjectRedis;
import com.epmet.service.CustomerProjectParameterService;
import com.epmet.service.ProjectProcessService;
@ -49,6 +53,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* 项目表
@ -69,6 +74,10 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
private ProjectStaffService projectStaffService;
@Autowired
private ProjectProcessService projectProcessService;
@Autowired
private EpmetUserFeignClient epmetUserFeignClient;
@Autowired
private GovOrgFeignClient govOrgFeignClient;
private final static String ONE_DAY = "<1";
@ -201,7 +210,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
int pageIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
fromDTO.setPageNo(pageIndex);
List<ProjectDTO> projectList = baseDao.selectCreatedList(fromDTO);
List<ProjectDTO> projectList = baseDao.selectInvolvedList(fromDTO);
//获取客户定制的可滞留天数
Integer finalDays = getDays(fromDTO);
projectList.forEach(p -> {
@ -347,9 +356,12 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
* @date 2020/5/12 16:20
*/
private Integer getDays(ProjectListFromDTO fromDTO) {
CustomerStaffDTO customerStaffDTO = new CustomerStaffDTO();
customerStaffDTO.setUserId(fromDTO.getUserId());
CustomerStaffDTO staffDTO = epmetUserFeignClient.getCustomerStaffInfoByUserId(customerStaffDTO).getData();
//获取客户定制的可滞留天数
CustomerProjectParameterDTO dto = new CustomerProjectParameterDTO();
dto.setCustomerId(fromDTO.getCustomerId());
dto.setCustomerId(staffDTO.getCustomerId());
dto.setParameterKey(ParameterKeyConstant.DETENTION_DAYS);
String value = parameterService.getParameterValueByKey(dto);
Integer days = 5;
@ -375,8 +387,108 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
workDayFormDTO.setId(projectDTO.getId());
workDayFormDTO.setStartDate(format.format(projectDTO.getUpdatedTime()));
workDayFormDTO.setEndDate(format.format(new Date()));
list.add(workDayFormDTO);
Result<List<WorkDayResultDTO>> detentionDays = commonFeignClient.detentionDays(list);
return detentionDays.getData().get(0).getDetentionDays();
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 议题转项目-项目各业务表初始化数据
**/
@Override
@Transactional(rollbackFor = Exception.class)
public IssueProjectResultDTO issueShiftProject(ShiftProjectFormDTO formDTO) {
IssueProjectResultDTO issueProjectResultDTO = new IssueProjectResultDTO();
List<TickStaffFormDTO> staffList = formDTO.getStaffList();
IssueDTO issueDTO = formDTO.getIssueDTO();
//1:调用gov-org服务,获取所有勾选人员以及议题数据对应的组织信息、部门信息、网格信息用于对处理部门和ORG_ID_PATH字段的赋值使用
List<String> agencyIdList = staffList.stream().map(TickStaffFormDTO::getAgencyId).collect(Collectors.toList());
agencyIdList.add(issueDTO.getOrgId());
agencyIdList = new ArrayList<String>(new LinkedHashSet<>(agencyIdList));
List<String> deptIdList = staffList.stream().map(TickStaffFormDTO::getDepartmentId).collect(Collectors.toList());
deptIdList = new ArrayList<String>(new LinkedHashSet<>(deptIdList));
List<String> gridIdList = staffList.stream().map(TickStaffFormDTO::getGridId).collect(Collectors.toList());
gridIdList.add(issueDTO.getGridId());
gridIdList = new ArrayList<String>(new LinkedHashSet<>(gridIdList));
AgencyDeptGridFormDTO agencyDeptGridFormDTO = new AgencyDeptGridFormDTO();
agencyDeptGridFormDTO.setAgencyIdList(agencyIdList);
agencyDeptGridFormDTO.setDeptIdList(deptIdList);
agencyDeptGridFormDTO.setGridIdList(gridIdList);
Result<AgencyDeptGridResultDTO> resultDTO = govOrgFeignClient.getAgencyDeptGridList(agencyDeptGridFormDTO);
AgencyDeptGridResultDTO agencyDeptGrid = resultDTO.getData();
//2:项目表新增数据
ProjectEntity projectEntity = new ProjectEntity();
projectEntity.setAgencyId(issueDTO.getOrgId());
projectEntity.setCustomerId(issueDTO.getCustomerId());
projectEntity.setOrigin(ProjectConstant.ISSUE);
projectEntity.setOriginId(issueDTO.getId());
projectEntity.setTitle(issueDTO.getIssueTitle());
projectEntity.setStatus(ProjectConstant.PENDING);
projectEntity.setOrgIdPath(issueDTO.getOrgIdPath());
baseDao.insert(projectEntity);
//3:项目处理进展表新增数据
ProjectProcessEntity processEntity = new ProjectProcessEntity();
processEntity.setProjectId(projectEntity.getId());
processEntity.setStaffId(formDTO.getStaffId());
processEntity.setOperation(ProjectConstant.OPERATION_CREATED);
processEntity.setOperationName(ProjectConstant.OPERATION_CREATED_NAME);
processEntity.setPublicReply(formDTO.getPublicReply());
processEntity.setInternalRemark(formDTO.getInternalRemark());
agencyDeptGrid.getAgencyList().forEach(agency -> {
if (issueDTO.getOrgId().equals(agency.getId())) {
processEntity.setDepartmentName(agency.getOrganizationName());
}
});
agencyDeptGrid.getGridList().forEach(grid -> {
if (issueDTO.getGridId().equals(grid.getId())) {
processEntity.setDepartmentName(processEntity.getDepartmentName() + "-" + grid.getGridName());
}
});
projectProcessService.insert(processEntity);
//4:项目人员关联表批量新增数据
List<ProjectStaffEntity> entityList = new ArrayList<>();
staffList.forEach(ts -> {
ProjectStaffEntity entity = ConvertUtils.sourceToTarget(ts, ProjectStaffEntity.class);
entity.setOrgId(ts.getAgencyId());
entity.setProjectId(projectEntity.getId());
entity.setProcessId(processEntity.getId());
entity.setIsHandle(ProjectConstant.UNHANDLED);
agencyDeptGrid.getAgencyList().forEach(agency -> {
if (ts.getAgencyId().equals(agency.getId())) {
entity.setCustomerId(agency.getCustomerId());
entity.setOrgIdPath(agency.getPids() + ":" + agency.getId());
entity.setDepartmentName(agency.getOrganizationName());
}
});
if (StringUtils.isNotBlank(ts.getDepartmentId())) {
agencyDeptGrid.getDeptList().forEach(dept -> {
if (ts.getDepartmentId().equals(dept.getId())) {
entity.setDepartmentName(entity.getDepartmentName() + "-" + dept.getDepartmentName());
}
});
}
if (StringUtils.isNotBlank(ts.getGridId())) {
agencyDeptGrid.getGridList().forEach(grid -> {
if (ts.getGridId().equals(grid.getId())) {
entity.setDepartmentName(entity.getDepartmentName() + "-" + grid.getGridName());
}
});
}
entityList.add(entity);
});
projectStaffService.insertBatch(entityList);
//5:返回接口参数
issueProjectResultDTO.setProjectId(projectEntity.getId());
issueProjectResultDTO.setOrgName(processEntity.getDepartmentName());
issueProjectResultDTO.setShiftedTime(projectEntity.getCreatedTime());
return issueProjectResultDTO;
}
}

32
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

@ -68,10 +68,22 @@
FROM
project_staff
WHERE DEL_FLAG = '0'
AND IS_HANDLE = 'unhandled'
AND IS_HANDLE = 'handle'
GROUP BY PROJECT_ID) ps ON p.ID = ps.PROJECT_ID
LEFT JOIN project_process pp ON p.ID = pp.PROJECT_ID AND pp.OPERATION = 'close'
WHERE p.DEL_FLAG = '0'
WHERE
NOT EXISTS (
SELECT
PROJECT_ID
FROM
project_staff
WHERE
DEL_FLAG = '0'
AND PROJECT_ID = p.ID
AND STAFF_ID = #{userId}
AND IS_HANDLE = 'unhandled'
)
AND p.DEL_FLAG = '0'
ORDER BY p.CREATED_TIME ASC
LIMIT #{pageNo}, #{pageSize}
</select>
@ -102,10 +114,22 @@
FROM
project_staff
WHERE DEL_FLAG = '0'
AND IS_HANDLE = 'unhandled'
AND IS_HANDLE = 'handle'
GROUP BY PROJECT_ID) ps ON p.ID = ps.PROJECT_ID
LEFT JOIN project_process pp ON p.ID = pp.PROJECT_ID AND pp.OPERATION = 'close'
WHERE p.DEL_FLAG = '0'
WHERE
NOT EXISTS (
SELECT
PROJECT_ID
FROM
project_staff
WHERE
DEL_FLAG = '0'
AND PROJECT_ID = p.ID
AND STAFF_ID = #{userId}
AND IS_HANDLE = 'unhandled'
)
AND p.DEL_FLAG = '0'
ORDER BY p.CREATED_TIME ASC
LIMIT #{pageNo}, #{pageSize}
</select>

16
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml

@ -30,4 +30,20 @@
ORDER BY CREATED_TIME DESC
</select>
<!-- 议题处理进展——已转项目 -->
<select id="projectProcessList" parameterType="com.epmet.dto.form.ProcessProjectIdFormDTO" resultType="com.epmet.dto.result.ProjectProcessListResultDTO">
SELECT
operation_name AS processName,
UNIX_TIMESTAMP( created_time ) AS processTime,
department_name AS departmentName,
public_reply AS progressDesc,
id AS processId
FROM
project_process
WHERE
project_id = #{projectId}
AND del_flag = 0
ORDER BY created_time DESC
</select>
</mapper>

2
epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
oper-customize-server:
container_name: oper-customize-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.8
image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.9
ports:
- "8089:8089"
network_mode: host # 使用现有网络

2
epmet-module/oper-customize/oper-customize-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.8</version>
<version>0.3.9</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>oper-customize</artifactId>

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/GroupProcessingCountResultDTO.java

@ -20,6 +20,6 @@ public class GroupProcessingCountResultDTO implements Serializable {
/**
* 待审核的小组总数
*/
private Long count;
private Integer count;
}

24
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GridIdFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.resi.group.dto.group.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 查询某用户是否加入过小组
*/
@Data
public class GridIdFormDTO implements Serializable {
private static final long serialVersionUID = -8535773441961516653L;
/**
* 用户id
*/
private String userId;
/**
* 网格Id
*/
private String gridId;
}

20
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CheckJoinTeamResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.resi.group.dto.group.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 校验用户是否加入小组
*/
@Data
public class CheckJoinTeamResultDTO implements Serializable {
private static final long serialVersionUID = -1590972041272087570L;
/**
* 是否加入小组 eg:已加入true未加入false
*/
private Boolean voteAuthorization;
}

2
epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-group-server:
container_name: resi-group-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.18
image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.19
ports:
- "8095:8095"
network_mode: host # 使用现有网络

12
epmet-module/resi-group/resi-group-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.18</version>
<version>0.3.19</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-group</artifactId>
@ -82,6 +82,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-issue-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
@ -124,7 +130,7 @@
<spring.datasource.druid.username>epmet_resi_group_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.index>1</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
@ -154,7 +160,7 @@
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.index>1</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>

10
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java

@ -311,4 +311,14 @@ public class ResiGroupController {
resultDTO2.setResultName("group返参");
return new Result<TestResultDTO2>().ok(resultDTO2);
}
/**
* @Description 校验用户是否加入小组
* @param gridId
* @author zxc
*/
@PostMapping("checkjointeam")
public Result<CheckJoinTeamResultDTO> checkjointeam(@RequestBody GridIdFormDTO gridId){
return new Result<CheckJoinTeamResultDTO>().ok(resiGroupService.checkjointeam(gridId));
}
}

7
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java

@ -148,4 +148,11 @@ public interface ResiGroupDao extends BaseDao<ResiGroupEntity> {
* @date 2020.05.14 10:54
**/
List<String> getGroupIdByGridId(@Param("gridId") String gridId);
/**
* @Description 校验用户是否加入小组
* @param gridId
* @author zxc
*/
Integer checkjointeam(GridIdFormDTO gridId);
}

6
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/redis/ResiGroupRedis.java

@ -195,11 +195,11 @@ public class ResiGroupRedis {
* @Description 获取某网格下待审核小组总数
* @Date 2020/5/13 21:40
**/
public Long getWorkGrassrootsGroupRedDotValue(String gridId) {
Long auditingGroupCount = 0L;
public Integer getWorkGrassrootsGroupRedDotValue(String gridId) {
Integer auditingGroupCount = 0;
try {
String workGrassrootsGroupRedDotKey = ResiGroupRedisKeys.getWorkGrassrootsGroupRedDotKey(gridId);
auditingGroupCount = (Long) redisUtils.get(workGrassrootsGroupRedDotKey);
auditingGroupCount = (Integer) redisUtils.get(workGrassrootsGroupRedDotKey);
} catch (Exception e) {
logger.error(String.format("网格id%s,查询网格下待审核小组总数异常%s", gridId, e.getMessage()));
e.printStackTrace();

8
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java

@ -27,6 +27,7 @@ import com.epmet.resi.group.dto.group.GroupProcessingCountResultDTO;
import com.epmet.resi.group.dto.group.ResiGroupDTO;
import com.epmet.resi.group.dto.group.form.*;
import com.epmet.resi.group.dto.group.result.*;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
@ -260,4 +261,11 @@ public interface ResiGroupService extends BaseService<ResiGroupEntity> {
* @date 2020.05.14 10:54
**/
List<String> getGroupIdByGridId(String gridId);
/**
* @Description 校验用户是否加入小组
* @param gridId
* @author zxc
*/
CheckJoinTeamResultDTO checkjointeam(GridIdFormDTO gridId);
}

25
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

@ -790,8 +790,12 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
for(String gridId:gridIdList){
GroupProcessingCountResultDTO resultDTO=new GroupProcessingCountResultDTO();
resultDTO.setGridId(gridId);
Long auditingCount=resiGroupRedis.getWorkGrassrootsGroupRedDotValue(gridId);
resultDTO.setCount(auditingCount);
Integer auditingCount=resiGroupRedis.getWorkGrassrootsGroupRedDotValue(gridId);
if (null == auditingCount) {
resultDTO.setCount(0);
} else {
resultDTO.setCount(auditingCount);
}
list.add(resultDTO);
}
return list;
@ -811,6 +815,23 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
return baseDao.getGroupIdByGridId(gridId);
}
/**
* @Description 校验用户是否加入小组
* @param gridId
* @author zxc
*/
@Override
public CheckJoinTeamResultDTO checkjointeam(GridIdFormDTO gridId) {
CheckJoinTeamResultDTO checkJoinTeamResultDTO = new CheckJoinTeamResultDTO();
Integer joinTeamCounts = baseDao.checkjointeam(gridId);
if (joinTeamCounts==NumConstant.ZERO){//未加入任何小组(当前网格下)
checkJoinTeamResultDTO.setVoteAuthorization(false);
}else {
checkJoinTeamResultDTO.setVoteAuthorization(true);
}
return checkJoinTeamResultDTO;
}
/**
* @Description 给加入此网格的网格长发送消息
* @param msg

12
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

@ -278,6 +278,18 @@
AND oper.STATE IN ('under_auditting','approved','rejected')
</select>
<!-- 校验用户是否加入小组 -->
<select id="checkjointeam" parameterType="com.epmet.resi.group.dto.group.form.GridIdFormDTO" resultType="integer">
SELECT
COUNT(*) AS joinTeamCounts
FROM
resi_group_member joinTeamCounts
WHERE
del_flag = 0
AND resi_group_id = ALL ( SELECT id FROM resi_group WHERE del_flag = 0 AND grid_id = #{gridId} )
AND customer_user_id = #{userId}
</select>
<!-- 查询一个网格下面所有组Id -->
<select id="getGroupIdByGridId" resultType="java.lang.String">
SELECT

24
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/CheckVoteFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 查询某用户是否加入过小组
*/
@Data
public class CheckVoteFormDTO implements Serializable {
private static final long serialVersionUID = 3459720938248756634L;
/**
* 用户id
*/
private String userId;
/**
* 议题id
*/
private String issueId;
}

24
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/GridIdFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 查询某用户是否加入过小组
*/
@Data
public class GridIdFormDTO implements Serializable {
private static final long serialVersionUID = -8535773441961516653L;
/**
* 用户id
*/
private String userId;
/**
* 网格Id
*/
private String gridId;
}

20
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/CheckJoinTeamResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 校验用户是否加入小组
*/
@Data
public class CheckJoinTeamResultDTO implements Serializable {
private static final long serialVersionUID = -1590972041272087570L;
/**
* 是否加入小组 eg:已加入true未加入false
*/
private Boolean voteAuthorization;
}

24
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/CheckVoteResultDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 校验是否投票表决中
*/
@Data
public class CheckVoteResultDTO implements Serializable {
private static final long serialVersionUID = 1908314603146050709L;
/**
* 是否投票 已投票true未投票false
*/
private Boolean voteStatus;
/**
* 支持support反对opposition
*/
private String voteType;
}

21
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/GridIdResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 表决中议题详情支持反对数
*/
@Data
public class GridIdResultDTO implements Serializable {
private static final long serialVersionUID = 1968505337707779785L;
/**
* 网格ID
*/
private String gridId;
}

41
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java

@ -0,0 +1,41 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 议题处理进展
*/
@Data
public class ProcessListResultDTO implements Serializable {
private static final long serialVersionUID = -702803628652751983L;
/**
* 处理进展名称(表决中转项目流转中已结案已关闭)
*/
private String processName;
/**
* 已转项目进展记录时间
*/
private Long processTime;
/**
* 处理部门处理人所属的机关单位名称
*/
private String departmentName;
/**
* 进展说明
*/
private String progressDesc;
/**
* 进展id操作记录表id
*/
private String processId;
}

31
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteInitResultDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* 表决中投票初始化
*/
@Data
public class VoteInitResultDTO implements Serializable {
private static final long serialVersionUID = -1564601349406249302L;
/**
* 是否加入小组 已加入true未加入false
*/
private Boolean voteAuthorization;
/**
* 是否投票 已投票true未投票false
*/
private Boolean voteStatus;
/**
* 支持support反对opposition
*/
private String voteType;
}

10
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java

@ -28,5 +28,15 @@ public class VoteResultDTO implements Serializable {
*/
private Integer oppositionCount;
/**
* 是否加入小组 已加入true未加入false
*/
private Boolean voteAuthorization;
/**
* 支持support 反对oppose
*/
private String voteType = "";
}

2
epmet-module/resi-hall/resi-hall-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-hall-server:
container_name: resi-hall-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-hall-server:0.3.2
image: 192.168.1.130:10080/epmet-cloud-dev/resi-hall-server:0.3.3
ports:
- "8100:8100"
network_mode: host # 使用现有网络

2
epmet-module/resi-hall/resi-hall-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.2</version>
<version>0.3.3</version>
<parent>
<artifactId>resi-hall</artifactId>
<groupId>com.epmet</groupId>

30
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java

@ -42,6 +42,7 @@ public class IssueController {
@PostMapping(value = "/detail")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<IssueDetailResultDTO> detail(@RequestBody IssueDetailFormDTO issueDetail){
ValidatorUtils.validateEntity(issueDetail);
return new Result<IssueDetailResultDTO>().ok(issueService.detail(issueDetail));
}
@ -53,6 +54,7 @@ public class IssueController {
@PostMapping(value = "votingtrend")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<VotingTrendResultDTO> votingTrend(@RequestBody IssueIdFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<VotingTrendResultDTO>().ok(issueService.votingTrend(formDTO));
}
@ -64,6 +66,7 @@ public class IssueController {
@PostMapping(value = "support")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result support(@LoginUser TokenDto tokenDto, @RequestBody IssueIdFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
issueService.support(tokenDto,formDTO);
return new Result();
}
@ -76,6 +79,7 @@ public class IssueController {
@PostMapping(value = "oppose")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result oppose(@LoginUser TokenDto tokenDto,@RequestBody IssueIdFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
issueService.oppose(tokenDto,formDTO);
return new Result();
}
@ -86,9 +90,10 @@ public class IssueController {
* @author zxc
*/
@PostMapping(value = "vote")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<VoteResultDTO> vote(@RequestBody IssueIdFormDTO formDTO){
return new Result<VoteResultDTO>().ok(issueService.vote(formDTO));
// @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<VoteResultDTO> vote(@LoginUser TokenDto tokenDto,@RequestBody IssueIdFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<VoteResultDTO>().ok(issueService.vote(tokenDto,formDTO));
}
/**
@ -100,6 +105,7 @@ public class IssueController {
@PostMapping("initevaluation")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<InitEvaluationResultDTO> initEvaluation(@LoginUser TokenDto tokenDto, @RequestBody IssueIdFormDTO issueId){
ValidatorUtils.validateEntity(issueId);
return new Result<InitEvaluationResultDTO>().ok(issueService.initEvaluation(tokenDto,issueId));
}
@ -112,6 +118,7 @@ public class IssueController {
@PostMapping("projectinitevaluation")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<ProjectInitEvaluationResultDTO> projectInitEvaluation(@LoginUser TokenDto tokenDto, @RequestBody ProjectIdFormDTO projectId){
ValidatorUtils.validateEntity(projectId);
return new Result<ProjectInitEvaluationResultDTO>().ok(issueService.projectInitEvaluation(tokenDto,projectId));
}
@ -123,6 +130,7 @@ public class IssueController {
@PostMapping("evaluate")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result evaluate(@LoginUser TokenDto tokenDto,@RequestBody EvaluateFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
issueService.evaluate(tokenDto,formDTO);
return new Result();
}
@ -135,6 +143,7 @@ public class IssueController {
@PostMapping("projectevaluate")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result projectEvaluate(@LoginUser TokenDto tokenDto,@RequestBody ProjectEvaluateFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
issueService.projectEvaluate(tokenDto,formDTO);
return new Result();
}
@ -147,6 +156,7 @@ public class IssueController {
@PostMapping("evaluationlist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<List<EvaluationListResultDTO>> evaluationList(@RequestBody EvaluationListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<List<EvaluationListResultDTO>>().ok(issueService.evaluationList(formDTO));
}
@ -158,6 +168,7 @@ public class IssueController {
@PostMapping("projectevaluationlist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<List<EvaluationListResultDTO>> projectEvaluationList(@RequestBody ProjectEvaluationListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<List<EvaluationListResultDTO>>().ok(issueService.projectEvaluationList(formDTO));
}
@ -169,6 +180,7 @@ public class IssueController {
@PostMapping("shiftproject")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_SHIFT_PROJECT)
public Result<List<ShiftProjectListResultDTO>> getShiftProjectList(@RequestBody ShiftProjectListFromDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<List<ShiftProjectListResultDTO>>().ok(issueService.getShiftProjectList(formDTO));
}
@ -198,5 +210,17 @@ public class IssueController {
return govIssueFeignClient.closedList(issueListFormDTO);
}
/**
* @Description 议题处理进展
* @param issueId
* @author zxc
*/
@PostMapping("processlist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<List<ProcessListResultDTO>> processList(@RequestBody IssueIdFormDTO issueId){
ValidatorUtils.validateEntity(issueId);
return new Result<List<ProcessListResultDTO>>().ok(issueService.processList(issueId));
}
}

16
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/GovIssueFeignClient.java

@ -105,4 +105,20 @@ public interface GovIssueFeignClient {
**/
@PostMapping("/gov/issue/issue/closedlist")
Result<List<ClosedIssueListResultDTO>> closedList(@RequestBody CommonIssueListFormDTO issueListFormDTO);
/**
* @Description 根据issueId查询gridId
* @param issueId
* @author zxc
*/
@PostMapping("/gov/issue/issue/selectgrididbyissueid")
Result<GridIdResultDTO> selectGridIdByIssueId(@RequestBody IssueIdFormDTO issueId);
/**
* @Description 议题处理进展
* @param issueId
* @author zxc
*/
@PostMapping("/gov/issue/issueprocess/processlist")
Result<List<ProcessListResultDTO>> processList(@RequestBody IssueIdFormDTO issueId);
}

11
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/ResiGroupFeignClient.java

@ -3,10 +3,13 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.TopicInfoDTO;
import com.epmet.dto.form.GridIdFormDTO;
import com.epmet.dto.form.TopicInfoFormDTO;
import com.epmet.dto.result.CheckJoinTeamResultDTO;
import com.epmet.feign.fallback.ResiGroupFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @author zxc
@ -24,5 +27,13 @@ public interface ResiGroupFeignClient {
@PostMapping("/resi/group/topic/selectdetail")
Result<TopicInfoDTO> selectDetail(TopicInfoFormDTO formDTO);
/**
* @Description 校验用户是否加入小组
* @param gridId
* @author zxc
*/
@PostMapping("/resi/group/group/checkjointeam")
Result<CheckJoinTeamResultDTO> checkjointeam(@RequestBody GridIdFormDTO gridId);
}

10
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/fallback/GovIssueFeignClientFallBack.java

@ -66,4 +66,14 @@ public class GovIssueFeignClientFallBack implements GovIssueFeignClient {
public Result<List<ClosedIssueListResultDTO>> closedList(CommonIssueListFormDTO issueListFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "closedList", issueListFormDTO);
}
@Override
public Result<GridIdResultDTO> selectGridIdByIssueId(IssueIdFormDTO issueId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "selectGridIdByIssueId", issueId);
}
@Override
public Result<List<ProcessListResultDTO>> processList(IssueIdFormDTO issueId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "processList", issueId);
}
}

7
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/feign/fallback/ResiGroupFeignClientFallBack.java

@ -4,7 +4,9 @@ import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.TopicInfoDTO;
import com.epmet.dto.form.GridIdFormDTO;
import com.epmet.dto.form.TopicInfoFormDTO;
import com.epmet.dto.result.CheckJoinTeamResultDTO;
import com.epmet.feign.ResiGroupFeignClient;
import org.springframework.stereotype.Component;
@ -18,4 +20,9 @@ public class ResiGroupFeignClientFallBack implements ResiGroupFeignClient {
public Result<TopicInfoDTO> selectDetail(TopicInfoFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "selectDetail", formDTO);
}
@Override
public Result<CheckJoinTeamResultDTO> checkjointeam(GridIdFormDTO gridId) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "checkjointeam", gridId);
}
}

9
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java

@ -49,7 +49,7 @@ public interface IssueService {
* @param issueId
* @author zxc
*/
VoteResultDTO vote(IssueIdFormDTO issueId);
VoteResultDTO vote(TokenDto tokenDto,IssueIdFormDTO issueId);
/**
* @Description 满意度评价初始化已关闭
@ -95,6 +95,13 @@ public interface IssueService {
*/
List<EvaluationListResultDTO> projectEvaluationList(ProjectEvaluationListFormDTO formDTO);
/**
* @Description 议题处理进展
* @param issueId
* @author zxc
*/
List<ProcessListResultDTO> processList(IssueIdFormDTO issueId);
/**
* 已转项目列表
* @author zhaoqifeng

33
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -136,9 +136,24 @@ public class IssueServiceImpl implements IssueService {
* @author zxc
*/
@Override
public VoteResultDTO vote(IssueIdFormDTO issueId) {
Result<VoteResultDTO> voteResultDTOResult = govIssueFeignClient.voteCount(issueId);
return voteResultDTOResult.getData();
public VoteResultDTO vote(TokenDto tokenDto,IssueIdFormDTO issueId) {
VoteResultDTO voteResultDTOResult = new VoteResultDTO();
GridIdResultDTO gridId = govIssueFeignClient.selectGridIdByIssueId(issueId).getData();
GridIdFormDTO gridIdFormDTO = new GridIdFormDTO();
gridIdFormDTO.setGridId(gridId.getGridId());
gridIdFormDTO.setUserId(tokenDto.getUserId());
CheckJoinTeamResultDTO check = resiGroupFeignClient.checkjointeam(gridIdFormDTO).getData();
//未加入小组
if (check.getVoteAuthorization()==false){
voteResultDTOResult.setVoteFlag(false);
voteResultDTOResult.setVoteAuthorization(check.getVoteAuthorization());
voteResultDTOResult.setOppositionCount(NumConstant.ZERO);
voteResultDTOResult.setSupportCount(NumConstant.ZERO);
}else {
voteResultDTOResult.setVoteAuthorization(check.getVoteAuthorization());
voteResultDTOResult = govIssueFeignClient.voteCount(issueId).getData();
}
return voteResultDTOResult;
}
/**
@ -157,9 +172,9 @@ public class IssueServiceImpl implements IssueService {
}
/**
* @Description 满意度评价初始化已转项目
* @param tokenDto
* @param projectId
* @Description 满意度评价初始化已转项目
* @author zxc
*/
@Override
@ -260,4 +275,14 @@ public class IssueServiceImpl implements IssueService {
}
return resultList;
}
/**
* @Description 议题处理进展
* @param issueId
* @author zxc
*/
@Override
public List<ProcessListResultDTO> processList(IssueIdFormDTO issueId) {
return govIssueFeignClient.processList(issueId).getData();
}
}

2
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/PartyAuthProcessingCountResultDTO.java

@ -20,6 +20,6 @@ public class PartyAuthProcessingCountResultDTO implements Serializable {
/**
* 待审核党员申请总数
*/
private Long count;
private Integer count;
}

2
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/result/ResiProcessingCountResultDTO.java

@ -20,6 +20,6 @@ public class ResiProcessingCountResultDTO implements Serializable {
/**
* 待审核党员申请总数
*/
private Long count;
private Integer count;
}

2
epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-partymember-server:
container_name: resi-partymember-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-partymember-server:0.3.19
image: 192.168.1.130:10080/epmet-cloud-dev/resi-partymember-server:0.3.20
ports:
- "8096:8096"
network_mode: host # 使用现有网络

2
epmet-module/resi-partymember/resi-partymember-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.19</version>
<version>0.3.20</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-partymember</artifactId>

8
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java

@ -208,8 +208,12 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl<PartymemberInfoD
for (String gridId : gridIdList) {
PartyAuthProcessingCountResultDTO partyAuthProcessingCountResultDTO = new PartyAuthProcessingCountResultDTO();
partyAuthProcessingCountResultDTO.setGridId(gridId);
Long auditingPartyMember = resiPartyMemberRedis.queryPartyAuthProcessingCount(gridId);
partyAuthProcessingCountResultDTO.setCount(auditingPartyMember);
Integer auditingPartyMember = resiPartyMemberRedis.queryPartyAuthProcessingCount(gridId);
if (null == auditingPartyMember) {
partyAuthProcessingCountResultDTO.setCount(0);
} else {
partyAuthProcessingCountResultDTO.setCount(auditingPartyMember);
}
list.add(partyAuthProcessingCountResultDTO);
}
return list;

8
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java

@ -505,8 +505,12 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
for (String gridId : gridIdList) {
ResiProcessingCountResultDTO resiProcessingCountResultDTO = new ResiProcessingCountResultDTO();
resiProcessingCountResultDTO.setGridId(gridId);
Long auditingResi = resiPartyMemberRedis.queryResiProcessingCount(gridId);
resiProcessingCountResultDTO.setCount(auditingResi);
Integer auditingResi = resiPartyMemberRedis.queryResiProcessingCount(gridId);
if (null == auditingResi) {
resiProcessingCountResultDTO.setCount(0);
} else {
resiProcessingCountResultDTO.setCount(auditingResi);
}
list.add(resiProcessingCountResultDTO);
}
return list;

12
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/redis/ResiPartyMemberRedis.java

@ -135,11 +135,11 @@ public class ResiPartyMemberRedis {
* @Description 查询网格下待审核热心居民总数
* @Date 2020/5/13 22:44
**/
public Long queryResiProcessingCount(String gridId) {
Long auditingResiWarmHeartedCount = 0L;
public Integer queryResiProcessingCount(String gridId) {
Integer auditingResiWarmHeartedCount = 0;
try {
String workGrassrootsResiRedDotKey = ResiPartyMemberRedisKeys.getWorkGrassrootsResiRedDotKey(gridId);
auditingResiWarmHeartedCount = (Long) redisUtils.get(workGrassrootsResiRedDotKey);
auditingResiWarmHeartedCount = (Integer) redisUtils.get(workGrassrootsResiRedDotKey);
} catch (Exception e) {
logger.error(String.format("网格id%s,查询网格下待审核热心居民总数异常%s", gridId, e.getMessage()));
e.printStackTrace();
@ -154,11 +154,11 @@ public class ResiPartyMemberRedis {
* @Description 查询网格下待审核党员总数
* @Date 2020/5/13 22:44
**/
public Long queryPartyAuthProcessingCount(String gridId) {
Long auditingParyMember = 0L;
public Integer queryPartyAuthProcessingCount(String gridId) {
Integer auditingParyMember = 0;
try {
String workGrassrootsResiRedDotKey = ResiPartyMemberRedisKeys.getWorkGrassrootsPartyAuthRedDotKey(gridId);
auditingParyMember = (Long) redisUtils.get(workGrassrootsResiRedDotKey);
auditingParyMember = (Integer) redisUtils.get(workGrassrootsResiRedDotKey);
} catch (Exception e) {
logger.error(String.format("网格id%s,查询网格下待审核党员总数异常%s", gridId, e.getMessage()));
e.printStackTrace();

Loading…
Cancel
Save