Browse Source

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

dev
wangxianzhang 4 years ago
parent
commit
891aae733a
  1. 4
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java
  2. 6
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java
  3. 5
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java
  4. 3
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java
  5. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java
  6. 5
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java
  7. 6
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql
  8. 9
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql
  9. 1
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql
  10. 11
      epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml
  11. 5
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java
  12. 5
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java
  13. 38
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/IcHouseFormDTO.java
  14. 45
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqBaseFormDTO.java
  15. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
  16. 37
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyOrgTypeEnum.java
  17. 61
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyPostEnum.java
  18. 64
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java
  19. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  20. 11
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonGovOrgFeignClient.java
  21. 15
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java
  22. 7
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java
  23. 34
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerIcHouseRedis.java
  24. 92
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/HouseInfoCache.java
  25. 2
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java
  26. 10
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java
  27. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java
  28. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  29. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  30. 10
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java
  31. 10
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java
  32. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java
  33. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java
  34. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java
  35. 28
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java
  36. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
  37. 11
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql
  38. 10
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
  39. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
  40. 1
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java
  41. 8
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java
  42. 9
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java
  43. 19
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java
  44. 33
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java
  45. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java
  46. 6
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java
  47. 24
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyTypepercentFormDTO.java
  48. 27
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java
  49. 73
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListbriefFormDTO.java
  50. 20
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java
  51. 24
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java
  52. 30
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java
  53. 7
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java
  54. 14
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java
  55. 33
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyTypepercentResultDTO.java
  56. 32
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java
  57. 56
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListbrieResultDTO.java
  58. 21
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java
  59. 9
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java
  60. 50
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
  61. 50
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
  62. 43
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java
  63. 101
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  64. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
  65. 28
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java
  66. 27
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java
  67. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java
  68. 58
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  69. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java
  70. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java
  71. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java
  72. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java
  73. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java
  74. 29
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java
  75. 62
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  76. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  77. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java
  78. 106
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java
  79. 143
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  80. 115
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  81. 63
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
  82. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql
  83. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql
  84. 66
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml
  85. 103
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml
  86. 27
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml
  87. BIN
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx
  88. 31
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java
  89. 45
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/ic/IcVolunteerDataExtractionTask.java
  90. 5
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java
  91. 5
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java
  92. 4
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/SystemMsgFormDTO.java
  93. 30
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/send/SendMqMsgUtil.java
  94. 4
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java
  95. 5
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java
  96. 12
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java
  97. 10
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  98. 12
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  99. 17
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java
  100. 8
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java

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

@ -6,6 +6,7 @@ import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.dto.result.CorsConfigResultDTO;
import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
@ -101,4 +102,7 @@ public interface EpmetAdminOpenFeignClient {
@PostMapping("/sys/dict/data/dictlist")
Result<List<DictListResultDTO>> dictList(@RequestBody DictListFormDTO formDTO);
@PostMapping("/sys/dict/data/dictDataList/{dictType}")
Result<List<SysDictDataDTO>> dictDataList(@PathVariable("dictType") String dictType);
}

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

@ -7,6 +7,7 @@ import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.dto.result.CorsConfigResultDTO;
import com.epmet.feign.EpmetAdminOpenFeignClient;
@ -59,4 +60,9 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli
public Result<List<DictListResultDTO>> dictList(DictListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictList", formDTO);
}
@Override
public Result<List<SysDictDataDTO>> dictDataList(String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictDataList", dictType);
}
}

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

@ -172,4 +172,9 @@ public class SysDictDataController {
return new Result<Map<String, String>>().ok(sysDictDataService.dictMap(dictType));
}
@PostMapping("dictDataList/{dictType}")
public Result<List<SysDictDataDTO>> dictDataList(@PathVariable("dictType") String dictType){
List<SysDictDataDTO> list=sysDictDataService.getDictDataList(dictType);
return new Result<List<SysDictDataDTO>>().ok(list);
}
}

3
epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java

@ -11,6 +11,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.DictTreeResultDTO;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.entity.DictData;
import com.epmet.entity.SysDictDataEntity;
import org.apache.ibatis.annotations.Mapper;
@ -33,4 +34,6 @@ public interface SysDictDataDao extends BaseDao<SysDictDataEntity> {
List<DictListResultDTO> selectDictList(String dictType);
List<DictTreeResultDTO> selectDictData(String dictType);
List<SysDictDataDTO> selectDictDataList(String dictType);
}

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

@ -90,4 +90,6 @@ public interface SysDictDataService extends BaseService<SysDictDataEntity> {
Map<String, String> dictMap(String dictType);
List<DictTreeResultDTO> dictListTree(String dictType);
List<SysDictDataDTO> getDictDataList(String dictType);
}

5
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java

@ -225,4 +225,9 @@ public class SysDictDataServiceImpl extends BaseServiceImpl<SysDictDataDao, SysD
return TreeUtils.buildTree(resultDTOList);
}
@Override
public List<SysDictDataDTO> getDictDataList(String dictType) {
return baseDao.selectDictDataList(dictType);
}
}

6
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql

@ -0,0 +1,6 @@
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526493468551626753', 'self_org_category', '社区自组织类别', '社区自组织类别:文化队伍、楼委会、老友俱乐部、治安巡逻队、其他', 1, 0, 0, '1', '2022-05-17 17:22:58', '1', '2022-05-17 17:22:58');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526495882432299010', 1526493468551626753, '楼委会', 'lwh', '0', '楼委会', 2, 0, 0, '1', '2022-05-17 17:32:34', '1', '2022-05-17 17:32:34');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526495969778679810', 1526493468551626753, '老友俱乐部', 'lyjlb', '0', '老友俱乐部', 3, 0, 0, '1', '2022-05-17 17:32:55', '1', '2022-05-17 17:32:55');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526496168622243842', 1526493468551626753, '其他', 'other', '0', '其他', 5, 0, 0, '1', '2022-05-17 17:33:42', '1', '2022-05-17 17:33:51');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526495766724034562', 1526493468551626753, '文化队伍', 'whdw', '0', '文化队伍', 1, 0, 0, '1', '2022-05-17 17:32:06', '1', '2022-05-17 17:32:40');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526496054369402882', 1526493468551626753, '治安巡逻队', 'zaxld', '0', '治安巡逻队', 4, 0, 0, '1', '2022-05-17 17:33:15', '1', '2022-05-17 17:33:24');

9
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql

@ -0,0 +1,9 @@
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000013', 'ic_event', '事件管理', '', '13', '0', '0', '', '2022-05-17 18:23:27', '', '2022-05-17 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000004', '1000000000000000013', '网格员手持终端', '4', '0', '', '4', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000003', '1000000000000000013', '12345', '3', '0', '', '3', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000002', '1000000000000000013', '社区电话', '2', '0', '', '2', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000001', '1000000000000000013', '多媒体反映', '1', '0', '', '1', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000000', '1000000000000000013', '随手拍/随时讲', '0', '0', '', '0', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18');

1
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql

@ -0,0 +1 @@
UPDATE `epmet_admin`.`sys_dict_type` SET `id`='1000000000000000013', `dict_type`='ic_event_source_type', `dict_name`='事件管理', `remark`='', `sort`='13', `DEL_FLAG`='0', `REVISION`='0', `CREATED_BY`='', `CREATED_TIME`='2022-05-17 18:23:27', `UPDATED_BY`='', `UPDATED_TIME`='2022-05-17 18:23:27' WHERE (`id`='1000000000000000013');

11
epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml

@ -33,4 +33,15 @@
a.sort asc
</select>
<select id="selectDictDataList" resultType="com.epmet.dto.SysDictDataDTO">
select sd.*
from sys_dict_data sd
where sd.DEL_FLAG='0'
and sd.dict_type_id=(
select st.id
from sys_dict_type st
where st.DEL_FLAG='0'
and st.dict_type=#{dictType}
)order by sort asc
</select>
</mapper>

5
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java

@ -88,4 +88,9 @@ public interface ConsomerGroupConstants {
* 需求完成如果服务方是区域化党建单位重新计算这个单位的满意度
*/
String USER_DEMAND_FINISH_GROUP = "user_demand_finish_group";
/**
* 志愿者变更
*/
String VOLUNTEER_CHANGE_EVENT_LISTENER_GROUP = "volunteer_change_event_listener_group";
}

5
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java

@ -74,4 +74,9 @@ public interface TopicConstants {
* 社区服务原居民需求
*/
String COMMUNITY_SERVICE="community_service";
/**
* 志愿者
*/
String VOLUNTEER ="volunteer";
}

38
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/IcHouseFormDTO.java

@ -0,0 +1,38 @@
/**
* 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.commons.tools.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* epmet-user端调用gov-org端的入参
* @author sun
*/
@Data
public class IcHouseFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String customerId;
private String houseId;
}

45
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqBaseFormDTO.java

@ -0,0 +1,45 @@
package com.epmet.commons.tools.dto.form.mq;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* desc:rocketmq 基础参数
*
* @author zhaoqifeng
* @dscription
* @date 2021/6/7 16:23
*/
@NoArgsConstructor
@Data
public class MqBaseFormDTO implements Serializable {
private static final long serialVersionUID = -6616119263736477518L;
/**
* 客户Id
*/
private String customerId;
/**
* 对象id 没有则查询全部
*/
private String objectId;
/**
* 对象id 没有则查询全部
*/
private List<String> objectIdList;
public MqBaseFormDTO(String customerId, String objectId) {
this.customerId = customerId;
this.objectId = objectId;
}
public MqBaseFormDTO(String customerId, List<String> objectIdList) {
this.customerId = customerId;
this.objectIdList = objectIdList;
}
}

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java

@ -23,6 +23,8 @@ public enum DictTypeEnum {
PATROL_WORK_TYPE("patrol_work_type", "例行工作分类", 13),
GRID_TYPE("grid_type", "网格类型", 12),
ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14),
SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15),
IC_EVENT_SOURCE_TYPE("ic_event_source_type","事件管理",19),
;
private final String code;

37
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyOrgTypeEnum.java

@ -0,0 +1,37 @@
package com.epmet.commons.tools.enums;
public enum PartyOrgTypeEnum {
PROVINCIAL("0", "省委"),
MUNICIPAL("1", "市委"),
DISTRICT("2", "区委"),
WORKING("3", "党工委"),
PARTY("4", "党委"),
BRANCH("5", "支部");
private String code;
private String name;
PartyOrgTypeEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

61
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/PartyPostEnum.java

@ -0,0 +1,61 @@
package com.epmet.commons.tools.enums;
import java.util.Objects;
/**
* @author Administrator
*/
public enum PartyPostEnum {
//党员职务
PTDY("0", "普通党员"),
ZBSJ("1", "支部书记"),
ZBWY("2", "支部委员"),
DWWY("3", "党委委员"),
UN_KNOWN("8", "未知");
private String code;
private String name;
PartyPostEnum(String code, String name) {
this.code = code;
this.name = name;
}
public static String getName(String code) {
PartyPostEnum[] partyPostEnums = values();
for (PartyPostEnum partyPostEnum : partyPostEnums) {
if (Objects.equals(partyPostEnum.getCode(), code)) {
return partyPostEnum.getName();
}
}
return null;
}
public static String getCode(String name) {
PartyPostEnum[] partyPostEnums = values();
for (PartyPostEnum partyPostEnum : partyPostEnums) {
if (partyPostEnum.getName().equals(name)) {
return partyPostEnum.getCode();
}
}
return null;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

64
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java

@ -0,0 +1,64 @@
package com.epmet.commons.tools.enums;
/**
* 社区自组织增加分类文化队伍楼委会老友俱乐部治安巡逻队其他
*/
public enum SelfOrgCategoryEnum {
// 文化队伍: #e70014
// 楼委会: #f59701
// 老友俱乐部: #8fc41e
// 治安巡逻队: #00a1be
// 其他: #0067b6
/**
* 环境变量枚举
*/
WHDW("whdw", "文化队伍", "#e70014", 1),
LWH("lwh", "楼委会", "#f59701", 2),
LYJLB("lyjlb", "老友俱乐部", "#8fc41e", 3),
ZAXLD("zaxld", "治安巡逻队", "#00a1be", 4),
OTHER("other", "其他", "#0067b6", 5),
;
private final String code;
private final String name;
private final String color;
private final Integer sort;
SelfOrgCategoryEnum(String code, String name, String color, Integer sort) {
this.code = code;
this.name = name;
this.color = color;
this.sort = sort;
}
public static SelfOrgCategoryEnum getEnum(String code) {
SelfOrgCategoryEnum[] values = SelfOrgCategoryEnum.values();
for (SelfOrgCategoryEnum value : values) {
if (value.getCode().equals(code)) {
return value;
}
}
return SelfOrgCategoryEnum.OTHER;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public String getColor() {
return color;
}
public Integer getSort() {
return sort;
}
}

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

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

11
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonGovOrgFeignClient.java

@ -2,8 +2,10 @@ package com.epmet.commons.tools.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.CustomerGridFormDTO;
import com.epmet.commons.tools.dto.form.IcHouseFormDTO;
import com.epmet.commons.tools.feign.fallback.CommonGovOrgFeignClientFallBackFactory;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache;
import com.epmet.commons.tools.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
@ -26,4 +28,13 @@ public interface CommonGovOrgFeignClient {
@PostMapping("/gov/org/grid/getbaseinfo")
Result<GridInfoCache> getGridInfo(@RequestBody CustomerGridFormDTO customerGridFormDTO);
/**
* @Description 查询房屋信息
* @Param houseInfo
* @Return {@link Result<HouseInfoCache>}
* @Author zhaoqifeng
* @Date 2022/5/18 14:29
*/
@PostMapping("/gov/org/house/getHouseInfoCache")
Result<HouseInfoCache> getHouseInfoCache(@RequestBody IcHouseFormDTO houseInfo);
}

15
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java

@ -2,8 +2,10 @@ package com.epmet.commons.tools.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.CustomerGridFormDTO;
import com.epmet.commons.tools.dto.form.IcHouseFormDTO;
import com.epmet.commons.tools.feign.CommonGovOrgFeignClient;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import org.springframework.stereotype.Component;
@ -22,5 +24,18 @@ public class CommonGovOrgFeignClientFallback implements CommonGovOrgFeignClient
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo", customerGridFormDTO);
}
/**
* @param houseInfo
* @Description 查询房屋信息
* @Param houseInfo
* @Return {@link Result< HouseInfoCache >}
* @Author zhaoqifeng
* @Date 2022/5/18 14:29
*/
@Override
public Result<HouseInfoCache> getHouseInfoCache(IcHouseFormDTO houseInfo) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getHouseInfoCache", houseInfo);
}
}

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

@ -141,15 +141,16 @@ public class MaskProcessor {
* @return
*/
private String maskIdCard(String originString) {
int clearTextLength = 12;
// 仅将6位之后的全都打码
int length = originString.length();
if (length <= 6) {
if (length <= clearTextLength) {
return originString;
}
String maskStr = StrUtil.repeatByLength("*", length - 6);
String maskStr = StrUtil.repeatByLength("*", length - clearTextLength);
return originString.replaceAll("^(\\d{6})[a-zA-Z0-9]*$", new StringBuilder("$1").append(maskStr).toString());
return originString.replaceAll("^(\\d{10})\\d+([a-zA-Z0-9]{2})$", new StringBuilder("$1").append(maskStr).append("$2").toString());
}
/**

34
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerIcHouseRedis.java

@ -1,11 +1,14 @@
package com.epmet.commons.tools.redis.common;
import cn.hutool.core.bean.BeanUtil;
import com.epmet.commons.tools.dto.form.IcHouseFormDTO;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.CommonAggFeignClient;
import com.epmet.commons.tools.feign.CommonGovOrgFeignClient;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.redis.common.bean.BuildingInfoCache;
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import lombok.extern.slf4j.Slf4j;
@ -28,6 +31,8 @@ public class CustomerIcHouseRedis {
private RedisUtils redisUtils;
@Autowired
private CommonAggFeignClient commonAggFeignClient;
@Autowired
private CommonGovOrgFeignClient govOrgFeignClient;
private static CustomerIcHouseRedis customerIcHouseRedis;
@PostConstruct
@ -62,6 +67,35 @@ public class CustomerIcHouseRedis {
return buildInfoResult.getData();
}
/**
* @Description 获取房屋信息
* @Param customerId
* @Param houseId
* @Return {@link HouseInfoCache}
* @Author zhaoqifeng
* @Date 2022/5/18 14:37
*/
public static HouseInfoCache getHouseInfo(String customerId, String houseId){
String key = RedisKeys.getHouseInfoCacheKey(houseId,customerId);
Map<String, Object> house = customerIcHouseRedis.redisUtils.hGetAll(key);
if (!MapUtils.isEmpty(house)) {
return ConvertUtils.mapToEntity(house, HouseInfoCache.class);
}
IcHouseFormDTO formDTO = new IcHouseFormDTO();
formDTO.setCustomerId(customerId);
formDTO.setHouseId(houseId);
Result<HouseInfoCache> houseInfoResult = customerIcHouseRedis.govOrgFeignClient.getHouseInfoCache(formDTO);
if (!houseInfoResult.success()){
throw new RenException("查询房屋信息失败...");
}
if (null == houseInfoResult.getData()){
return null;
}
Map<String, Object> map = BeanUtil.beanToMap(houseInfoResult.getData(), false, true);
customerIcHouseRedis.redisUtils.hMSet(key, map);
return houseInfoResult.getData();
}
public static void delBuildingInfo(String buildingId){
String key = RedisKeys.getBuildingInfoKey(buildingId);
customerIcHouseRedis.redisUtils.delete(key);

92
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/HouseInfoCache.java

@ -0,0 +1,92 @@
package com.epmet.commons.tools.redis.common.bean;
import lombok.Data;
import java.io.Serializable;
/**
* 房屋信息缓存
* @author Administrator
*/
@Data
public class HouseInfoCache implements Serializable {
/**
* 所属家庭Id
*/
private String homeId;
/**
* 小区详细地址
*/
private String neighborAddress;
/**
* 小区id
*/
private String neighborHoodId;
/**
* 小区名称
*/
private String neighborHoodName;
/**
* 所属楼栋id
*/
private String buildingId;
/**
* 楼栋名称
*/
private String buildingName;
/**
* 所属单元id
*/
private String buildingUnitId;
/**
* 单元名
*/
private String unitName;
/**
* 门牌号
*/
private String doorName;
/**
* 房屋类型1楼房2平房3别墅
*/
private String houseType;
private String houseName;
/**
* 楼的经度
*/
private String buildingLongitude;
/**
* 楼的纬度
*/
private String buildingLatitude;
/**
* 小区名+楼栋名+单元名+房屋名
*/
private String allName;
private String customerId;
/**
* 小区所在的组织id
*/
private String agencyId;
/**
* eg市北区-阜新路街道-南宁社区
*/
private String agencyPathName;
/**
* 组织的area_code
*/
private String areaCode;
}

2
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java

@ -50,6 +50,8 @@ public class ProjectDTO implements Serializable {
*/
private String agencyId;
private String gridId;
/**
* 来源议题issue
*/

10
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java

@ -109,6 +109,16 @@ public class ProjectProcessDTO implements Serializable {
*/
private String costWorkdays;
/**
* 协办单位ID
*/
private String assistanceUnitId;
/**
* 协办单位类型1社区自组织2联建单位
*/
private String assistanceUnitType;
/**
* 删除标识0.未删除 1.已删除
*/

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java

@ -187,5 +187,13 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity {
* 18当前组织内来源于工作人员上报事件的项目结案无需解决数
*/
private Integer workEventUnResolvedCount;
/**
* 19当前组织内来源于事件管理的项目结案已解决数
*/
private Integer icEventResolvedCount;
/**
* 20当前组织内来源于事件管理的项目结案无需解决数
*/
private Integer icEventUnResolvedCount;
}

5
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java

@ -1201,9 +1201,12 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
Integer eventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getEventUnResolvedCount).sum();
Integer workEventResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getWorkEventResolvedCount).sum();
Integer workEventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getWorkEventUnResolvedCount).sum();
Integer icEventResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getIcEventResolvedCount).sum();
Integer icEventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getIcEventUnResolvedCount).sum();
Integer closedProjectTotal = issueResolvedCount + issueUnResolvedCount+projectResolvedCount
+ projectUnResolvedCount + eventResolvedCount + eventUnResolvedCount
+ workEventResolvedCount + workEventUnResolvedCount;
+ workEventResolvedCount + workEventUnResolvedCount
+icEventResolvedCount + icEventUnResolvedCount;
resultDTO.setProblemResolvedCount(closedProjectTotal);
resultDTO.setGroupSelfGovernRatio(getPercentage(inGroupTopicResolvedCount + inGroupTopicUnResolvedCount, problemResolvedCount));
resultDTO.setGridSelfGovernRatio(getPercentage(gridSelfGovernProjectTotal, closedProjectTotal));

10
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml

@ -631,7 +631,8 @@
ISSUE_PROJECT_RESOLVED_COUNT+ISSUE_PROJECT_UN_RESOLVED_COUNT
+APPROVAL_PROJECT_RESOLVED_COUNT+APPROVAL_PROJECT_UN_RESOLVED_COUNT
+EVENT_RESOLVED_COUNT+EVENT_UN_RESOLVED_COUNT
+WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount,
+WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT
+IC_EVENT_RESOLVED_COUNT+IC_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount,
concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio,
concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio,
concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio,
@ -654,7 +655,8 @@
ISSUE_PROJECT_RESOLVED_COUNT+ISSUE_PROJECT_UN_RESOLVED_COUNT
+APPROVAL_PROJECT_RESOLVED_COUNT+APPROVAL_PROJECT_UN_RESOLVED_COUNT
+EVENT_RESOLVED_COUNT+EVENT_UN_RESOLVED_COUNT
+WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount,
+WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT
+IC_EVENT_RESOLVED_COUNT+IC_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount,
concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio,
concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio,
concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio,
@ -693,7 +695,9 @@
EVENT_RESOLVED_COUNT,
EVENT_UN_RESOLVED_COUNT,
WORK_EVENT_RESOLVED_COUNT,
WORK_EVENT_UN_RESOLVED_COUNT
WORK_EVENT_UN_RESOLVED_COUNT,
IC_EVENT_RESOLVED_COUNT,
IC_EVENT_UN_RESOLVED_COUNT
FROM
fact_agency_govern_daily
WHERE

10
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java

@ -147,6 +147,16 @@ public class FactAgencyGovernDailyDTO implements Serializable {
*/
private Integer workEventUnResolvedCount;
/**
* 19当前组织内来源于事件管理的项目结案已解决数
*/
private Integer icEventResolvedCount;
/**
* 20当前组织内来源于事件管理的项目结案无需解决数
*/
private Integer icEventUnResolvedCount;
/**
* 未出当前网格的结案项目数
*/

10
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java

@ -158,6 +158,16 @@ public class FactGridGovernDailyDTO implements Serializable {
*/
private Integer workEventUnResolvedCount;
/**
* 19当前组织内来源于事件管理的项目结案已解决数
*/
private Integer icEventResolvedCount;
/**
* 20当前组织内来源于事件管理的项目结案无需解决数
*/
private Integer icEventUnResolvedCount;
/**
* 15未出当前网格的结案项目数=11+12+13+14
*/

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

@ -85,6 +85,8 @@ public interface ProjectConstant {
String PROJECT_ORIGIN_EVENT="resi_event";
String PROJECT_ORIGIN_WORK_EVENT="work_event";
String IC_EVENT="ic_event";
/**
* 自办
*/

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java

@ -186,4 +186,14 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity {
*/
private Integer districtDeptClosedCount;
/**
* 19当前组织内来源于事件管理的项目结案已解决数
*/
private Integer icEventResolvedCount;
/**
* 20当前组织内来源于事件管理的项目结案无需解决数
*/
private Integer icEventUnResolvedCount;
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java

@ -186,6 +186,16 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity {
*/
private Integer workEventUnResolvedCount;
/**
* 19当前组织内来源于事件管理的项目结案已解决数
*/
private Integer icEventResolvedCount;
/**
* 20当前组织内来源于事件管理的项目结案无需解决数
*/
private Integer icEventUnResolvedCount;
/**
* 当前网格内出来的项目由社区结案(已解决+未解决)的项目总数

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

@ -285,6 +285,32 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
});
}
//2022-5-23 当前组织内:来源于事件管理的项目:结案已解决数
Map<String, OrgStatisticsResultDTO> icEventProjectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.RESOLVED,
ProjectConstant.IC_EVENT);
if (!icEventProjectResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = icEventProjectResolvedTotal.get(item.getAgencyId());
if (null != dto) {
item.setIcEventResolvedCount(dto.getSum());
}
});
}
//2022-5-23 当前组织内:来源于事件管理的项目:结案无需解决数
Map<String, OrgStatisticsResultDTO> icEventProjectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.UNRESOLVED,
ProjectConstant.IC_EVENT);
if (!icEventProjectUnResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = icEventProjectUnResolvedTotal.get(item.getAgencyId());
if (null != dto) {
item.setIcEventUnResolvedCount(dto.getSum());
}
});
}
// 2.党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
agencyGovernDailyList.forEach(item -> {
int count = item.getInGroupTopicResolvedCount() + item.getInGroupTopicUnResolvedCount();
@ -423,6 +449,8 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
entity.setEventUnResolvedCount(NumConstant.ZERO);
entity.setWorkEventResolvedCount(NumConstant.ZERO);
entity.setWorkEventUnResolvedCount(NumConstant.ZERO);
entity.setIcEventResolvedCount(NumConstant.ZERO);
entity.setIcEventUnResolvedCount(NumConstant.ZERO);
entity.setInGroupTopicResolvedCount(NumConstant.ZERO);
entity.setInGroupTopicUnResolvedCount(NumConstant.ZERO);
entity.setGridSelfGovernProjectTotal(NumConstant.ZERO);

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

@ -115,6 +115,8 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
Map<String,Integer> eventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_EVENT,DimObjectStatusConstant.UNRESOLVED);
Map<String,Integer> workEventProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_WORK_EVENT,DimObjectStatusConstant.RESOLVED);
Map<String,Integer> workEventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_WORK_EVENT,DimObjectStatusConstant.UNRESOLVED);
Map<String,Integer> icEventProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.IC_EVENT,DimObjectStatusConstant.RESOLVED);
Map<String,Integer> icEventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.IC_EVENT,DimObjectStatusConstant.UNRESOLVED);
Map<String, Integer> inGroupTopicResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.RESOLVED,NumConstant.ZERO_STR);
Map<String, Integer> inGroupTopicUnResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.UNRESOLVED,NumConstant.ZERO_STR);
Map<String, GovernGridClosedTotalCommonDTO> dtoMap=getGovernGridClosedTotalCommonDTOMap(customerId,gridIds);
@ -182,6 +184,16 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
insertEntity.setWorkEventUnResolvedCount(workEventProjectUnResolvedMap.get(insertEntity.getGridId()));
}
// 2022-5-23 当前组织内:来源于事件管理的项目:结案已解决数
if(icEventProjectResolvedMap.containsKey(insertEntity.getGridId())){
insertEntity.setIcEventResolvedCount(icEventProjectResolvedMap.get(insertEntity.getGridId()));
}
// 2022-5-23 当前组织内:来源于事件管理的项目:结案无需解决数
if(icEventProjectUnResolvedMap.containsKey(insertEntity.getGridId())){
insertEntity.setIcEventUnResolvedCount(icEventProjectUnResolvedMap.get(insertEntity.getGridId()));
}
// 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
// 9、当前网格内,未出小组即未转议题的:话题关闭已解决数
if(inGroupTopicResolvedMap.containsKey(insertEntity.getGridId())){
@ -226,7 +238,9 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
+ insertEntity.getEventResolvedCount()
+ insertEntity.getEventUnResolvedCount()
+ insertEntity.getWorkEventResolvedCount()
+ insertEntity.getWorkEventUnResolvedCount();
+ insertEntity.getWorkEventUnResolvedCount()
+ insertEntity.getIcEventResolvedCount()
+ insertEntity.getIcEventUnResolvedCount();
// 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
//界面展示:2、党群自治占比=(9+10)/PROBLEM_RESOLVED_COUNT; 此列存储的是小数
int groupSelfGovernRatioFz=insertEntity.getInGroupTopicResolvedCount()+insertEntity.getInGroupTopicUnResolvedCount();

11
epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql

@ -0,0 +1,11 @@
ALTER TABLE `fact_agency_govern_daily`
ADD COLUMN `IC_EVENT_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '19、当前组织内:来源于事件管理的项目:结案已解决数' AFTER `WORK_EVENT_UN_RESOLVED_COUNT`,
ADD COLUMN `IC_EVENT_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '20、当前组织内:来源于事件管理的项目:结案无需解决数' AFTER `IC_EVENT_RESOLVED_COUNT`;
ALTER TABLE `epmet_data_statistical`.`fact_grid_govern_daily`
ADD COLUMN `IC_EVENT_RESOLVED_COUNT` int(11) NULL DEFAULT 0 COMMENT '19、当前组织内:来源于事件管理的项目:结案已解决数' AFTER `WORK_EVENT_UN_RESOLVED_COUNT`,
ADD COLUMN `IC_EVENT_UN_RESOLVED_COUNT` int(11) NULL DEFAULT 0 COMMENT '20、当前组织内:来源于事件管理的项目:结案无需解决数' AFTER `IC_EVENT_RESOLVED_COUNT`;

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

@ -141,7 +141,7 @@
WHERE
1 = 1
AND f.ORIGIN = 'issue'
AND f.ORIGIN IN('issue', 'ic_event')
AND f.PROJECT_STATUS = 'closed'
AND f.CUSTOMER_ID = #{customerId}
) a
@ -468,7 +468,7 @@
AND fm.MONTH_ID = #{monthId}
AND fm.PROJECT_STATUS = 'closed'
AND fm.GRID_ID != ''
AND fm.ORIGIN = 'issue'
AND fm.ORIGIN IN('issue', 'ic_event')
) a
GROUP BY
GRID_ID
@ -490,7 +490,7 @@
WHERE fm.CUSTOMER_ID = #{customerId}
AND fm.MONTH_ID = #{monthId}
AND fm.PROJECT_STATUS = 'closed'
AND fm.ORIGIN = 'issue'
AND fm.ORIGIN IN('issue', 'ic_event')
) a
GROUP BY
AGENCY_ID
@ -680,7 +680,7 @@
fm.CUSTOMER_ID = #{customerId}
AND fm.PROJECT_STATUS = 'closed'
AND fm.GRID_ID != ''
AND fm.ORIGIN = 'issue'
AND fm.ORIGIN IN('issue', 'ic_event')
) a
GROUP BY
GRID_ID
@ -701,7 +701,7 @@
INNER JOIN fact_origin_project_main_daily fm ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
WHERE fm.CUSTOMER_ID = #{customerId}
AND fm.PROJECT_STATUS = 'closed'
AND fm.ORIGIN = 'issue'
AND fm.ORIGIN IN('issue', 'ic_event')
) a
GROUP BY
AGENCY_ID

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

@ -58,7 +58,7 @@
FROM project
WHERE
DEL_FLAG = '0'
AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event')
AND ORIGIN IN('issue', 'resi_event', 'ic_event')
AND STATUS = 'closed'
AND CUSTOMER_ID = #{customerId}
AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') <![CDATA[ <= ]]> #{date}
@ -72,7 +72,7 @@
FROM project
WHERE
DEL_FLAG = '0'
AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event')
AND ORIGIN IN('issue', 'resi_event', 'ic_event')
AND STATUS = 'closed'
AND CUSTOMER_ID = #{customerId}
AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') = #{date}

1
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java

@ -18,6 +18,7 @@ public interface ImportTaskConstants {
String BIZ_TYPE_ATTENTION_NAT = "attention_nat";
String BIZ_TYPE_ATTENTION_VACCINATION = "attention_vaccination";
String BIZ_TYPE_ATTENTION_TRIP_REPORT = "attention_vaccination";
String BIZ_TYPE_IC_PARTY_MEMBER = "ic_party_member";
/**
* 核酸检测
*/

8
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java

@ -17,6 +17,7 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
@ -42,6 +43,7 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable {
/**
* 客户ID
*/
@JsonIgnore
private String customerId;
/**
@ -62,31 +64,37 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable {
/**
*
*/
@JsonIgnore
private Integer delFlag;
/**
* 乐观锁
*/
@JsonIgnore
private String revision;
/**
* 创建人
*/
@JsonIgnore
private String createdBy;
/**
* 创建时间
*/
@JsonIgnore
private Date createdTime;
/**
* 更新人
*/
@JsonIgnore
private String updatedBy;
/**
* 更新时间
*/
@JsonIgnore
private Date updatedTime;
}

9
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java

@ -150,6 +150,15 @@ public class IcUserDemandRecDTO implements Serializable {
*/
private Integer awardPoint;
/**
* 来源[需求录入:demand 事件管理:ic_event]
*/
private String origin;
/**
* 来源Id[目前只有来源事件管理的有值]
*/
private String originId;
/**
* 删除标识0.未删除 1.已删除
*/

19
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java

@ -1,7 +1,9 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@ -18,36 +20,40 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable {
private static final long serialVersionUID = -4996925380900678065L;
public interface AddCommunitySelfOrganizationForm{}
public interface AddCommunitySelfOrganizationForm extends CustomerClientShowGroup {}
/**
* 组织名称
*/
@NotBlank(message = "organizationName不能为空",groups = AddCommunitySelfOrganizationForm.class)
@NotBlank(message = "组织名称不能为空",groups = AddCommunitySelfOrganizationForm.class)
@Length(max = 50,message = "组织名称最多输入50字",groups = AddCommunitySelfOrganizationForm.class)
private String organizationName;
@NotBlank(message = "分类不能为空", groups = AddCommunitySelfOrganizationForm.class)
private String categoryCode;
/**
* 组织人数
*/
@NotNull(message = "organizationPersonCount不能为空",groups = AddCommunitySelfOrganizationForm.class)
@NotNull(message = "组织人数不能为空",groups = AddCommunitySelfOrganizationForm.class)
private Integer organizationPersonCount;
/**
* 负责人姓名
*/
@NotBlank(message = "principalName不能为空",groups = AddCommunitySelfOrganizationForm.class)
@NotBlank(message = "负责人不能为空",groups = AddCommunitySelfOrganizationForm.class)
private String principalName;
/**
* 负责人电话
*/
@NotBlank(message = "principalPhone不能为空",groups = AddCommunitySelfOrganizationForm.class)
@NotBlank(message = "联系电话",groups = AddCommunitySelfOrganizationForm.class)
private String principalPhone;
/**
* 服务事项
*/
@NotBlank(message = "serviceItem不能为空",groups = AddCommunitySelfOrganizationForm.class)
@NotBlank(message = "服务事项不能为空",groups = AddCommunitySelfOrganizationForm.class)
private String serviceItem;
/**
@ -63,6 +69,7 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable {
/**
* 经度
*/
@NotBlank(message = "位置坐标不能为空",groups = AddCommunitySelfOrganizationForm.class)
private String longitude;
/**

33
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
public class CategorySelfOrgFormDTO extends PageFormDTO implements Serializable {
/**
* 默认展示全部此列可空
*/
private String categoryCode;
/**
* token中获取
*/
@NotBlank(message = "customerId不能为空",groups = PageFormDTO.AddUserInternalGroup.class)
private String customerId;
/**
* token中获取
*/
@NotBlank(message = "staffId不能为空",groups = PageFormDTO.AddUserInternalGroup.class)
private String staffId;
/**
* 当前登录用户所属组织id
*/
private String agencyId;
}

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java

@ -48,4 +48,6 @@ public class CommunitySelfOrganizationListFormDTO implements Serializable {
private Integer ranking;
private String remark;
private String categoryCode;
}

6
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java

@ -26,6 +26,12 @@ public class EditCommunitySelfOrganizationFormDTO implements Serializable {
@NotBlank(message = "organizationName不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String organizationName;
/**
* 分类编码
*/
@NotBlank(message = "categoryCode不能为空",groups = EditCommunitySelfOrganizationForm.class)
private String categoryCode;
/**
* 组织人数
*/

24
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyTypepercentFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PartyTypepercentFormDTO {
private static final long serialVersionUID = -3833404131164761022L;
/**
* 组织id
*/
@NotBlank(message = "组织id不能为空")
private String agencyId;
private String customerId;
}

27
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/5/17 18:45
* @DESC
*/
@Data
public class PartyUnitListFormDTO implements Serializable {
private static final long serialVersionUID = 8059924463686783668L;
/**
* 联建单位IDs
*/
private List<String> partyUnitIds;
/**
* 社区自组织IDs
*/
private List<String> communitySelfIds;
}

73
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListbriefFormDTO.java

@ -0,0 +1,73 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PartyUnitListbriefFormDTO implements Serializable {
private static final long serialVersionUID = -2776705671944626707L;
/**
* 页码
*/
@NotNull
@Min(1)
private Integer pageNo;
/**
* 每页记录数
*/
@NotNull
private Integer pageSize;
/**
* 网格id
*/
// private String gridId;
/**
* 组织id
*/
@NotBlank(message = "组织id不能为空")
private String agencyId;
/**
* 单位名称
*/
private String unitName;
/**
* 服务事项
*/
private String serviceMatter;
/**
* 分类
*/
private String type;
/**
* 联系人
*/
private String contact;
/**
* 联系人电话
*/
private String contactMobile;
private String customerId;
}

20
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.form.demand;
import lombok.Data;
import java.io.Serializable;
@Data
public class IcEventCommentToDemandFromDTO implements Serializable {
private static final long serialVersionUID = 591380873862126679L;
//客户Id
private String customerId;
//需求Id
private String demandRecId;
//评价满意度【 不满意:bad、基本满意:good、非常满意:perfect 】
private String satisfaction;
//当前操作工作人员Id
private String staffId;
}

24
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java

@ -109,4 +109,28 @@ public class ReportDemandFormDTO implements Serializable {
*/
private String latitude;
/**
* 来源[需求录入:demand 事件管理:ic_event]
*/
private String origin;
/**
* 来源Id[目前只有来源事件管理的有值]
*/
private String originId;
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
private String serviceType;
/**
* 志愿者居民端爱心互助的志愿者userId
*/
private String serverId;
/**
* 服务方姓名
*/
private String serverName;
}

30
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.form.demand;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
@Data
public class ServiceListFormDTO extends PageFormDTO implements Serializable {
@NotBlank(message = "type不能为空:志愿者:volunteer;社区自组织:community_org", groups = PageFormDTO.AddUserInternalGroup.class)
private String type;
/**
* 服务方id ,
* 可能是来源于多元主题分析里的社区自组织也可能是来源于志愿者
*/
@NotBlank(message = "serverId不能为空", groups = PageFormDTO.AddUserInternalGroup.class)
private String serverId;
private String customerId;
/**
* volunteer时传入此参数
*/
private String idCard;
private List<String> serverIds;
}

7
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java

@ -79,4 +79,11 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable {
* 搜索关键词
*/
private String keyword;
/**
* 需求id
*/
private String demandRecId;
}

14
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java

@ -33,6 +33,20 @@ public class CommunitySelfOrganizationListDTO implements Serializable {
*/
private String organizationName;
/**
* 分类来源于字典表dictType=self_org_category;
*/
private String categoryCode;
/**
* 分类名称
*/
private String categoryName;
/**
* 分类的颜色 用于多元数据分析-地图
*/
private String color;
/**
* 服务事项
*/

33
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyTypepercentResultDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PartyTypepercentResultDTO {
private static final long serialVersionUID = -5256798094892121661L;
/**
* 联建单位类型
*/
private String label;
/**
* 数量
*/
private Integer value;
/**
* 联建单位编码
*/
private String code;
/**
* 联建单位数量占比(%)
*/
private String percent;
}

32
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java

@ -0,0 +1,32 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/5/17 18:45
* @DESC
*/
@Data
public class PartyUnitListResultDTO implements Serializable {
private static final long serialVersionUID = 8059924463686783008L;
/**
* 协办单位ID
*/
private String assistanceUnitId;
/**
* 协办单位名字
*/
private String assistanceUnitName;
/**
* 协办单位类型1社区自组织2联建单位
*/
private String assistanceUnitType;
}

56
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListbrieResultDTO.java

@ -0,0 +1,56 @@
package com.epmet.dto.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PartyUnitListbrieResultDTO implements Serializable {
private static final long serialVersionUID = -300315089751537091L;
/**
* id
*/
private String id;
/**
* 所属网格
*/
// private String gridName;
/**
* 所属网格id
*/
// private String gridId;
/**
* 分类
*/
private String type;
/**
* 服务事项
*/
private String serviceMatter;
/**
* 单位名称
*/
private String unitName;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
}

21
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 多元主体分析-社区自组织饼图
*/
@Data
public class SelfOrgCategoryTotalResDTO implements Serializable {
private String categoryCode;
private String categoryName;
/**
* 当前分类下的社区自组织数量
*/
private Integer total;
private String color;
}

9
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java

@ -139,4 +139,13 @@ public class DemandRecResultDTO implements Serializable {
private String longitude;
// 纬度,需求人是ic的居民时,取所住楼栋的中心点位
private String latitude;
/**
* 来源[需求录入:demand 事件管理:ic_event]
*/
private String origin;
/**
* 来源Id[目前只有来源事件管理的有值]
*/
private String originId;
}

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

@ -4,11 +4,18 @@ import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.ActInfoDTO;
import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.AutoEvaluateDemandFormDTO;
import com.epmet.dto.form.CommonCustomerFormDTO;
import com.epmet.dto.form.IcDemandFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.demand.DemandRecId;
import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO;
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.form.resi.VolunteerCommonFormDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.IcResiDemandDictDTO;
import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO;
import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallbackFactory;
@ -107,4 +114,47 @@ public interface EpmetHeartOpenFeignClient {
@PostMapping("/heart/icresidemanddict/demandoption")
Result<List<OptionResultDTO>> getDemandOptions();
/**
* Desc: 获取联建单位名字
* @param formDTO
* @author zxc
* @date 2022/5/17 17:53
*/
@PostMapping("/heart/icpartyunit/getPartyUnitList")
Result<List<PartyUnitListResultDTO>> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO);
/**
* @description 事件管理-转需求
**/
@PostMapping("/heart/residemand/iceventtodemand")
Result<DemandRecId> icEventToDemand(@RequestBody IcDemandFormDTO formDTO);
/**
* @description 事件评价时同步=评价结果到需求
**/
@PostMapping("/heart/userdemand/iceventcomment")
Result icEventComment(@RequestBody IcEventCommentToDemandFromDTO formDTO);
/**
* 获取客户下志愿者列表
*
* @Param customerId
* @Return {@link Result< List< IcVolunteerPolyDTO>>}
* @Author zhaoqifeng
* @Date 2022/5/19 11:14
*/
@PostMapping("/heart/resi/volunteer/getVolunteerList/{customerId}")
Result<List<IcVolunteerPolyDTO>> getVolunteerList(@PathVariable("customerId") String customerId);
/**
* 添加志愿者
* @Param formDTO
* @Return {@link Result}
* @Author zhaoqifeng
* @Date 2022/5/30 11:10
*/
@PostMapping("/heart/resi/volunteer/addVolunteer")
Result addVolunteer(@RequestBody ResiVolunteerAuthenticateFormDTO formDTO);
}

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

@ -5,11 +5,18 @@ import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.ActInfoDTO;
import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.AutoEvaluateDemandFormDTO;
import com.epmet.dto.form.CommonCustomerFormDTO;
import com.epmet.dto.form.IcDemandFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.demand.DemandRecId;
import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO;
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.form.resi.VolunteerCommonFormDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.IcResiDemandDictDTO;
import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO;
import com.epmet.feign.EpmetHeartOpenFeignClient;
@ -108,4 +115,47 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli
public Result<List<OptionResultDTO>> getDemandOptions() {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getDemandOptions", null);
}
@Override
public Result<List<PartyUnitListResultDTO>> getPartyUnitList(PartyUnitListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getPartyUnitList", formDTO);
}
@Override
public Result<DemandRecId> icEventToDemand(IcDemandFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventToDemand", formDTO);
}
@Override
public Result icEventComment(IcEventCommentToDemandFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventComment", formDTO);
}
/**
* 获取客户下志愿者列表
*
* @param customerId
* @Param customerId
* @Return {@link Result< List< IcVolunteerPolyDTO >>}
* @Author zhaoqifeng
* @Date 2022/5/19 11:14
*/
@Override
public Result<List<IcVolunteerPolyDTO>> getVolunteerList(String customerId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getVolunteerList", customerId);
}
/**
* 添加志愿者
*
* @param formDTO
* @Param formDTO
* @Return {@link Result}
* @Author zhaoqifeng
* @Date 2022/5/30 11:10
*/
@Override
public Result addVolunteer(ResiVolunteerAuthenticateFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "addVolunteer", formDTO);
}
}

43
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java

@ -34,8 +34,10 @@ import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.SelfOrgCategoryTotalResDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.ExportCommunitySelfOrganizationExcel;
import com.epmet.excel.IcCommunitySelfOrganizationExcel;
@ -281,4 +283,45 @@ public class IcCommunitySelfOrganizationController {
ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class);
return new Result<List<OptionDTO>>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO));
}
/**
* 多元主体分析-各分类下的社区自组织数量饼图
*
* @param tokenDto
* @return
*/
@PostMapping("/total-pie")
public Result<List<SelfOrgCategoryTotalResDTO>> totalPie(@LoginUser TokenDto tokenDto) {
return new Result<List<SelfOrgCategoryTotalResDTO>>().ok(icCommunitySelfOrganizationService.querySelfOrgCategoryTotal(tokenDto.getCustomerId(), tokenDto.getUserId()));
}
/**
* 多元主体分析-分类下的社区自组织列表
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("/category-list")
public Result<PageData<CommunitySelfOrganizationListDTO>> queryCategoryList(@LoginUser TokenDto tokenDto, @RequestBody CategorySelfOrgFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
formDTO.setIsPage(true);
return new Result<PageData<CommunitySelfOrganizationListDTO>>().ok(icCommunitySelfOrganizationService.queryCategoryList(formDTO));
}
/**
* 003多元主题分析-地图详情信息已包含
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("/coordinate-list")
public Result<PageData<CommunitySelfOrganizationListDTO>> queryCoordinateList(@LoginUser TokenDto tokenDto, @RequestBody CategorySelfOrgFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
formDTO.setIsPage(false);
return new Result<PageData<CommunitySelfOrganizationListDTO>>().ok(icCommunitySelfOrganizationService.queryCoordinateList(formDTO));
}
}

101
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java

@ -1,20 +1,3 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
@ -36,9 +19,14 @@ import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.PartyTypepercentResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.PartyUnitListbrieResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.IcPartyUnitExcel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
@ -53,10 +41,12 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
@ -85,14 +75,14 @@ public class IcPartyUnitController {
@PostMapping("list")
public Result<PageData<IcPartyUnitDTO>> search(@LoginUser TokenDto tokenDto, @RequestBody PartyUnitFormDTO formDTO){
public Result<PageData<IcPartyUnitDTO>> search(@LoginUser TokenDto tokenDto, @RequestBody PartyUnitFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
PageData<IcPartyUnitDTO> page = icPartyUnitService.search(formDTO);
return new Result<PageData<IcPartyUnitDTO>>().ok(page);
}
@PostMapping("detail")
public Result<IcPartyUnitDTO> get(@RequestBody IcPartyUnitDTO formDTO){
public Result<IcPartyUnitDTO> get(@RequestBody IcPartyUnitDTO formDTO) {
AssertUtils.isBlank(formDTO.getId(), "id");
IcPartyUnitDTO data = icPartyUnitService.get(formDTO.getId());
return new Result<IcPartyUnitDTO>().ok(data);
@ -100,7 +90,7 @@ public class IcPartyUnitController {
@PostMapping("save")
@NoRepeatSubmit
public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyUnitDTO dto){
public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyUnitDTO dto) {
//效验数据
dto.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
@ -109,7 +99,7 @@ public class IcPartyUnitController {
}
@PostMapping("delete")
public Result delete(@RequestBody IcPartyUnitDTO dto){
public Result delete(@RequestBody IcPartyUnitDTO dto) {
//效验数据
AssertUtils.isBlank(dto.getId(), "id");
icPartyUnitService.delete(dto.getId());
@ -149,21 +139,22 @@ public class IcPartyUnitController {
* @return
*/
@PostMapping("servicelist")
public Result<List<OptionDTO>> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO){
public Result<List<OptionDTO>> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceQueryFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class);
ValidatorUtils.validateEntity(formDTO, ServiceQueryFormDTO.AddUserInternalGroup.class);
return new Result<List<OptionDTO>>().ok(icPartyUnitService.queryServiceList(formDTO));
}
@PostMapping("option")
public Result<List<OptionDTO>> option(@RequestBody IcPartyUnitDTO dto){
public Result<List<OptionDTO>> option(@RequestBody IcPartyUnitDTO dto) {
AssertUtils.isBlank(dto.getAgencyId(), "agencyId");
return new Result<List<OptionDTO>>().ok(icPartyUnitService.option(dto));
}
/**
* 数据导入
*
* @Param tokenDto
* @Param response
* @Param file
@ -215,7 +206,7 @@ public class IcPartyUnitController {
* @Date 2021/12/8 14:52
*/
@PostMapping("typestatistics")
public Result<List<OptionDataResultDTO>> typeStatistics(@RequestBody PartyActivityFormDTO formDTO){
public Result<List<OptionDataResultDTO>> typeStatistics(@RequestBody PartyActivityFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<List<OptionDataResultDTO>>().ok(icPartyUnitService.typeStatistics(formDTO));
}
@ -228,11 +219,42 @@ public class IcPartyUnitController {
* @Date 2021/12/9 10:11
*/
@PostMapping("distribution")
public Result<List<PartyUnitDistributionResultDTO>> distribution(@RequestBody PartyActivityFormDTO formDTO){
public Result<List<PartyUnitDistributionResultDTO>> distribution(@RequestBody PartyActivityFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<List<PartyUnitDistributionResultDTO>>().ok(icPartyUnitService.distribution(formDTO));
}
/**
* 联建单位-简要信息列表
*
* @param form
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData>
* @author LZN
* @date 2022/5/18 13:54
*/
@PostMapping("/listbrief")
public Result<PageData> getListbrief(@RequestBody PartyUnitListbriefFormDTO form, @LoginUser TokenDto tokenDto) {
form.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(form);
PageData data = icPartyUnitService.getListbrief(form);
return new Result<PageData>().ok(data);
}
/**
* 联建单位-按分类统计数量及占比
*
* @param form
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.PartyTypepercentResultDTO>>
* @author LZN
* @date 2022/5/18 16:42
*/
@PostMapping("/statistics/typepercent")
public Result<List<PartyTypepercentResultDTO>> getTypepercent(@RequestBody PartyTypepercentFormDTO form,@LoginUser TokenDto tokenDto) {
form.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(form);
List<PartyTypepercentResultDTO> dto = icPartyUnitService.getTypepercent(form);
return new Result<List<PartyTypepercentResultDTO>>().ok(dto);
}
/**
* 计算区域化党建单位的群众满意度
@ -241,8 +263,8 @@ public class IcPartyUnitController {
* @return
*/
@PostMapping("cal-partyunit-satisfation")
public Result calPartyUnitSatisfation(@RequestBody ServerSatisfactionCalFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,ServerSatisfactionCalFormDTO.AddUserInternalGroup.class);
public Result calPartyUnitSatisfation(@RequestBody ServerSatisfactionCalFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ServerSatisfactionCalFormDTO.AddUserInternalGroup.class);
icPartyUnitService.calPartyUnitSatisfation(formDTO);
return new Result();
}
@ -267,4 +289,27 @@ public class IcPartyUnitController {
}
}
}
/**
* Desc: 获取联建单位名字
* @param formDTO
* @author zxc
* @date 2022/5/17 17:53
*/
@PostMapping("/getPartyUnitList")
public Result<List<PartyUnitListResultDTO>> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO){
return new Result<List<PartyUnitListResultDTO>>().ok(icPartyUnitService.getPartyUnitList(formDTO));
}
/**
* Desc: 协办单位列表
* @param tokenDto
* @author zxc
* @date 2022/5/18 13:37
*/
@PostMapping("assistanceUnitList")
public Result<List<PartyUnitListResultDTO>> getAssistanceUnitList(@LoginUser TokenDto tokenDto){
return new Result<List<PartyUnitListResultDTO>>().ok(icPartyUnitService.getAssistanceUnitList(tokenDto));
}
}

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java

@ -380,5 +380,15 @@ public class IcUserDemandRecController implements ResultDataResolver {
return new Result<PointRecordResultDTO>().ok(result);
}
/**
* @Author sun
* @Description 事件评价时同步=评价结果到需求
**/
@PostMapping("iceventcomment")
public Result icEventComment(@RequestBody IcEventCommentToDemandFromDTO formDTO) {
icUserDemandRecService.icEventComment(formDTO);
return new Result();
}
}

28
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java

@ -10,12 +10,15 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.SystemMessageType;
import com.epmet.constant.UserDemandConstant;
import com.epmet.dto.form.AutoEvaluateDemandFormDTO;
import com.epmet.dto.form.IcDemandFormDTO;
import com.epmet.dto.form.SystemMsgFormDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.*;
@ -267,4 +270,29 @@ public class ResiDemandController {
demandSatisfactionService.evaluateDemandAuto(formDTO);
return new Result();
}
/**
* 事件管理-转需求
*
* @return
*/
@PostMapping("iceventtodemand")
public Result<DemandRecId> icEventToDemand(@RequestBody IcDemandFormDTO formDTO) {
ReportDemandFormDTO dto = ConvertUtils.sourceToTarget(formDTO, ReportDemandFormDTO.class);
return new Result<DemandRecId>().ok(icUserDemandRecService.saveOrUpdateDemand(dto));
}
/**
* 根据服务方id查询服务过的需求列表
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("service-list")
public Result<PageData<DemandRecResultDTO>> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceListFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<PageData<DemandRecResultDTO>>().ok(icUserDemandRecService.queryServiceList(formDTO));
}
}

27
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java

@ -18,9 +18,14 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.dto.form.mq.MqBaseFormDTO;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.SystemMessageType;
import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.CommonCustomerFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
@ -30,6 +35,8 @@ import com.epmet.dto.form.resi.VolunteerCommonFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO;
import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.send.SendMqMsgUtil;
import com.epmet.service.VolunteerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -49,6 +56,8 @@ public class ResiVolunteerController {
@Autowired
private VolunteerInfoService volunteerInfoService;
@Autowired
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
/**
* 志愿者认证
@ -64,6 +73,19 @@ public class ResiVolunteerController {
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO, ResiVolunteerAuthenticateFormDTO.AddUserShowGroup.class, ResiVolunteerAuthenticateFormDTO.AddUserInternalGroup.class);
volunteerInfoService.authenticate(formDTO);
//发送志愿者人员消息变动
boolean flag = SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendRocketMqMsg(SystemMessageType.VOLUNTEER_CHANGED, new MqBaseFormDTO(tokenDto.getCustomerId(), tokenDto.getUserId()));
if (!flag){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"发送志愿者变动消息失败","发送志愿者变动消息失败");
}
return new Result();
}
@PostMapping("addVolunteer")
public Result addVolunteer(@RequestBody ResiVolunteerAuthenticateFormDTO formDTO) {
volunteerInfoService.addVolunteer(formDTO);
return new Result();
}
@ -170,4 +192,9 @@ public class ResiVolunteerController {
volunteerInfoService.modifyVolunteerGrid(volunteerInfoDTO);
return new Result();
}
@PostMapping("getVolunteerList/{customerId}")
public Result<List<IcVolunteerPolyDTO>> getVolunteerList(@PathVariable("customerId") String customerId) {
return new Result<List<IcVolunteerPolyDTO>>().ok(volunteerInfoService.getVolunteerList(customerId));
}
}

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java

@ -19,8 +19,10 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.CategorySelfOrgFormDTO;
import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.SelfOrgCategoryTotalResDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcCommunitySelfOrganizationEntity;
import org.apache.ibatis.annotations.Mapper;
@ -65,4 +67,10 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao<IcCommunitySelfO
*/
List<String> selectOrgByOrgName(@Param("names")List<String> names, @Param("customerId") String customerId);
List<IcCommunitySelfOrganizationDTO> selectOrgByCustomerId(@Param("customerId") String customerId);
List<SelfOrgCategoryTotalResDTO> selectCountGroupByCategory(@Param("customerId") String customerId,@Param("agencyId") String agencyId);
List<CommunitySelfOrganizationListDTO> queryCategoryList(CategorySelfOrgFormDTO formDTO);
List<CommunitySelfOrganizationListDTO> queryCoordinateList(CategorySelfOrgFormDTO formDTO);
}

58
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java

@ -19,7 +19,12 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.dto.form.PartyTypepercentFormDTO;
import com.epmet.dto.form.PartyUnitListbriefFormDTO;
import com.epmet.dto.result.PartyTypepercentResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.PartyUnitListbrieResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.apache.ibatis.annotations.Mapper;
@ -27,6 +32,7 @@ import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
* 联建单位
@ -39,22 +45,24 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
/**
* 需求指派选择区域化党建单位调用此接口
*
* @param agencyIds
* @param unitName
* @return
*/
List<OptionDTO> selectListByAgencyId(@Param("agencyIds") List<String> agencyIds,
@Param("unitName") String unitName,
@Param("customerId")String customerId);
@Param("customerId") String customerId);
/**
* 单位分类统计
*
* @Param agencyId
* @Return {@link java.util.List<com.epmet.commons.tools.dto.result.OptionDataResultDTO>}
* @Author zhaoqifeng
* @Date 2021/12/8 15:25
*/
List<OptionDataResultDTO> getTypeStatistics(@Param("agencyId")String agencyId);
List<OptionDataResultDTO> getTypeStatistics(@Param("agencyId") String agencyId);
/**
* @Description 联建单位分布
@ -63,7 +71,49 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
* @Author zhaoqifeng
* @Date 2021/12/9 14:24
*/
List<PartyUnitDistributionResultDTO> getDistribution(@Param("agencyId")String agencyId);
List<PartyUnitDistributionResultDTO> getDistribution(@Param("agencyId") String agencyId);
int updateSatisfaction(@Param("partyUnitId") String serverId, @Param("satisfaction") BigDecimal satisfaction);
}
/**
* Desc: 获取联建单位名字
* @param ids
* @author zxc
* @date 2022/5/17 17:53
*/
List<PartyUnitListResultDTO> getPartyUnitList(@Param("ids") List<String> ids);
/**
* Desc: 获取社区自组织名字
* @param ids
* @author zxc
* @date 2022/5/17 18:51
*/
List<PartyUnitListResultDTO> getCommunitySelfList(@Param("ids") List<String> ids);
/**
* Desc: 协办单位列表
* @param agencyId
* @author zxc
* @date 2022/5/18 13:48
*/
List<PartyUnitListResultDTO> getAssistanceUnitList(@Param("agencyId")String agencyId);
/**
* 联建单位-简要信息列表
*
* @param form
* @return java.util.List<com.epmet.dto.result.PartyUnitListbrieResultDTO>
* @author LZN
* @date 2022/5/18 13:54
*/
List<PartyUnitListbrieResultDTO> getListbrief(@Param("form") PartyUnitListbriefFormDTO form, @Param("customerId") String customerId);
/**
* 联建单位-按分类统计数量及占比
*
* @param agencyId
*/
List<PartyTypepercentResultDTO> getTypepercent(@Param("agencyId") String agencyId,
@Param("customerId") String customerId);
}

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java

@ -20,9 +20,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.PointRecordFormDTO;
import com.epmet.dto.form.demand.IcResiUserDemandFromDTO;
import com.epmet.dto.form.demand.PageListAnalysisFormDTO;
import com.epmet.dto.form.demand.UserDemandPageFormDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.PointRecordDTO;
import com.epmet.dto.result.ServicePointDTO;
import com.epmet.dto.result.demand.*;
@ -140,4 +138,6 @@ public interface IcUserDemandRecDao extends BaseDao<IcUserDemandRecEntity> {
* @Date 2022/1/21 15:53
*/
List<ServicePointDTO> getServicePoint(@Param("customerId")String customerId, @Param("serviceType")String serviceType);
List<DemandRecResultDTO> queryServiceList(ServiceListFormDTO formDTO);
}

5
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java

@ -67,6 +67,11 @@ public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity {
*/
private String organizationName;
/**
* 分类来源于字典表dictType=self_org_category;
*/
private String categoryCode;
/**
* 组织人数
*/

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java

@ -149,7 +149,7 @@ public class IcUserDemandRecEntity extends BaseEpmetEntity {
private Integer awardPoint;
/**
* 服务地点工作端指派默认居民居住房屋地址居民端地图选择
* 服务地点工作端指派默认居民居住房屋地址居民端地图选择
*/
private String serviceLocation;
@ -171,4 +171,12 @@ public class IcUserDemandRecEntity extends BaseEpmetEntity {
* 需求人是ic的居民时,记录下住的房屋id
*/
private String demandUserHouseId;
/**
* 来源[需求录入:demand 事件管理:ic_event]
*/
private String origin;
/**
* 来源Id[目前只有来源事件管理的有值]
*/
private String originId;
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java

@ -15,6 +15,9 @@ public class ExportCommunitySelfOrganizationExcel {
@Excel(name = "组织名称", width = 40, needMerge = true)
private String organizationName;
@Excel(name = "分类", width = 40, needMerge = true)
private String categoryName;
@Excel(name = "组织人数", width = 20, needMerge = true)
private Integer organizationPersonCount;

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java

@ -20,6 +20,10 @@ public class ImportCommunitySelfOrganization extends ExcelVerifyInfo {
@NotBlank(message = "不能为空")
private String organizationName;
@Excel(name = "分类", needMerge = true)
@NotBlank(message = "不能为空")
private String categoryCode;
@Excel(name = "组织人数", needMerge = true)
//@NotNull(message = "不能为空")
private Integer organizationPersonCount;

29
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java

@ -21,12 +21,11 @@ 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.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO;
import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO;
import com.epmet.dto.result.SelfOrgCategoryTotalResDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcCommunitySelfOrganizationEntity;
@ -160,4 +159,26 @@ public interface IcCommunitySelfOrganizationService extends BaseService<IcCommun
void importCommunitySelfOrganization(TokenDto tokenDto, HttpServletResponse response, InputStream inputStream, String taskId) throws IOException;
List<IcCommunitySelfOrganizationEntity> queryListById(List<String> communityOrgIds);
/**
* 多元主体分析-各分类下的社区自组织数量饼图
* @param customerId
* @param userId
* @return
*/
List<SelfOrgCategoryTotalResDTO> querySelfOrgCategoryTotal(String customerId, String userId);
/**
* 多元主体分析-分类下的社区自组织列表
* @param formDTO
* @return
*/
PageData<CommunitySelfOrganizationListDTO> queryCategoryList(CategorySelfOrgFormDTO formDTO);
/**
* 多元主体分析-地图坐标及详情
* @param formDTO
* @return
*/
PageData<CommunitySelfOrganizationListDTO> queryCoordinateList(CategorySelfOrgFormDTO formDTO);
}

62
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java

@ -1,20 +1,3 @@
/**
* 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.service;
import com.epmet.commons.mybatis.service.BaseService;
@ -24,9 +7,15 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyTypepercentFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.PartyUnitListbriefFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.PartyTypepercentResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.PartyUnitListbrieResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.springframework.web.multipart.MultipartFile;
@ -34,6 +23,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* 联建单位
@ -81,7 +71,7 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
* @author generator
* @date 2021-11-19
*/
void save(TokenDto tokenDto, IcPartyUnitDTO dto);
void save(TokenDto tokenDto, IcPartyUnitDTO dto);
/**
@ -124,6 +114,7 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
/**
* 导入数据
*
* @Param tokenDto
* @Param response
* @Param file
@ -144,6 +135,7 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
/**
* 联建单位分布
*
* @Param formDTO
* @Return {@link List< PartyUnitDistributionResultDTO>}
* @Author zhaoqifeng
@ -153,9 +145,41 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
/**
* 计算区域化党建单位的群众满意度
*
* @param formDTO
*/
void calPartyUnitSatisfation(ServerSatisfactionCalFormDTO formDTO);
List<IcPartyUnitEntity> queryListById(List<String> partyUnitIds);
}
/**
* Desc: 获取联建单位名字
* @param formDTO
* @author zxc
* @date 2022/5/17 17:53
*/
List<PartyUnitListResultDTO> getPartyUnitList(PartyUnitListFormDTO formDTO);
/**
* Desc: 协办单位列表
* @param tokenDto
* @author zxc
* @date 2022/5/18 13:37
*/
List<PartyUnitListResultDTO> getAssistanceUnitList(TokenDto tokenDto);
/**
* 联建单位-简要信息列表
*
* @param form
*/
PageData getListbrief(PartyUnitListbriefFormDTO form);
/**
* 联建单位-按分类统计数量及占比
*
* @param form
*/
List<PartyTypepercentResultDTO> getTypepercent(PartyTypepercentFormDTO form);
}

13
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java

@ -247,4 +247,17 @@ public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntit
* @Date 2022/1/21 16:02
*/
Map<String, Integer> getServicePoint(String customerId, String serviceType);
/**
* 根据服务方id查询服务过的需求列表
* @param formDTO
* @return
*/
PageData<DemandRecResultDTO> queryServiceList(ServiceListFormDTO formDTO);
/**
* @Author sun
* @Description 事件评价时同步=评价结果到需求
**/
void icEventComment(IcEventCommentToDemandFromDTO formDTO);
}

12
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java

@ -20,6 +20,7 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.CommonCustomerFormDTO;
import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO;
@ -48,7 +49,7 @@ public interface VolunteerInfoService extends BaseService<VolunteerInfoEntity> {
* @Date 10:09 2020-07-23
**/
void authenticate(ResiVolunteerAuthenticateFormDTO formDTO);
void addVolunteer(ResiVolunteerAuthenticateFormDTO formDTO);
/**
* 志愿者认证界面获取用户基础信息+志愿者信息
*
@ -117,4 +118,13 @@ public interface VolunteerInfoService extends BaseService<VolunteerInfoEntity> {
* @param volunteerInfoDTO
*/
void modifyVolunteerGrid(VolunteerInfoDTO volunteerInfoDTO);
/**
* 获取客户下志愿者
* @Param customerId
* @Return {@link List< IcVolunteerPolyDTO>}
* @Author zhaoqifeng
* @Date 2022/5/19 10:58
*/
List<IcVolunteerPolyDTO> getVolunteerList(String customerId);
}

106
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java

@ -12,6 +12,8 @@ import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.enums.SelfOrgCategoryEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
@ -32,17 +34,16 @@ import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.IcCommunitySelfOrganizationDao;
import com.epmet.dao.IcUserDemandRecDao;
import com.epmet.dto.IcCommunitySelfOrganizationDTO;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListDTO;
import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO;
import com.epmet.dto.result.ServicePointDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.dto.result.*;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcCommunitySelfOrganizationEntity;
import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity;
import com.epmet.excel.CommunitySelfOrgImportExcel;
import com.epmet.excel.ImportCommunitySelfOrganization;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.OssFeignClient;
import com.epmet.service.IcCommunitySelfOrganizationPersonnelService;
@ -51,6 +52,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
@ -93,6 +95,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
private OssFeignClient ossFeignClient;
@Autowired
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
@Autowired
private EpmetAdminOpenFeignClient adminOpenFeignClient;
@Override
public PageData<IcCommunitySelfOrganizationDTO> page(Map<String, Object> params) {
@ -313,6 +317,11 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
formDTO.setCustomerId(tokenDto.getCustomerId());
final int[] i = {(formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize() + NumConstant.ONE};
CommunitySelfOrganizationListResultDTO result = new CommunitySelfOrganizationListResultDTO();
//获取分类名称字典
Result<Map<String, String>> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode());
Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
if (formDTO.getIsPage()){
PageInfo<CommunitySelfOrganizationListDTO> objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO));
result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal())));
@ -321,6 +330,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
l.setSort(i[NumConstant.ZERO]);
i[NumConstant.ZERO]++;
l.setScore(null == pointMap.get(l.getOrgId()) ? NumConstant.ZERO : pointMap.get(l.getOrgId()));
//赋值分类名称
l.setCategoryName(dictMap.get(l.getCategoryCode()));
}
result.setList(objectPageInfo.getList());
}
@ -333,6 +344,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
for (CommunitySelfOrganizationListDTO r : resultDTOs) {
r.setSort(sort.getAndSet(sort.get() + NumConstant.ONE));
r.setScore(null == pointMap.get(r.getOrgId()) ? NumConstant.ZERO : pointMap.get(r.getOrgId()));
//赋值分类名称
r.setCategoryName(dictMap.get(r.getCategoryCode()));
}
result.setList(resultDTOs);
}
@ -538,7 +551,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
iterator.remove();
}
}
Result<Map<String, String>> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode());
Map<String, String> categoryMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
list.forEach(l -> {
IcCommunitySelfOrganizationEntity e = ConvertUtils.sourceToTarget(l, IcCommunitySelfOrganizationEntity.class);
e.setCustomerId(tokenDto.getCustomerId());
@ -547,7 +561,13 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
e.setPid(agencyInfo.getPid());
e.setPids(agencyInfo.getPids());
e.setOrganizationCreatedTime(DateUtils.parse(l.getOrganizationCreatedTime(), DATE_PATTERN));
//赋值分类编码,excel输入的是分类名称,需要找到admin字典库中的key
for (String key : categoryMap.keySet()) {
if (StringUtils.isNotBlank(categoryMap.get(key)) && categoryMap.get(key).equals(e.getCategoryCode())) {
e.setCategoryCode(categoryMap.get(key));
break;
}
}
List<IcCommunitySelfOrganizationPersonnelEntity> persons = new ArrayList<>();
AtomicReference<Boolean> bl = new AtomicReference<>(false);
StringBuffer msg = new StringBuffer("");
@ -688,4 +708,78 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl<IcCo
return Collections.EMPTY_LIST;
}
/**
* 多元主体分析-各分类下的社区自组织数量饼图
*
* @param customerId
* @param staffId
* @return
*/
@Override
public List<SelfOrgCategoryTotalResDTO> querySelfOrgCategoryTotal(String customerId, String staffId) {
Result<List<SysDictDataDTO>> dictDataListRes = adminOpenFeignClient.dictDataList(DictTypeEnum.SELF_ORG_CATEGORY.getCode());
if (!dictDataListRes.success() || CollectionUtils.isEmpty(dictDataListRes.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区自组织分类查询异常");
}
CustomerStaffInfoCacheResult staffInfo = getStaffInfo(customerId, staffId);
List<SelfOrgCategoryTotalResDTO> list = baseDao.selectCountGroupByCategory(customerId, staffInfo.getAgencyId());
Map<String, Integer> map = list.stream().collect(Collectors.toMap(SelfOrgCategoryTotalResDTO::getCategoryCode, SelfOrgCategoryTotalResDTO::getTotal, (key1, key2) -> key2));
List<SelfOrgCategoryTotalResDTO> resultList = new ArrayList<>();
for (SysDictDataDTO dict : dictDataListRes.getData()) {
SelfOrgCategoryTotalResDTO resDTO = new SelfOrgCategoryTotalResDTO();
resDTO.setCategoryCode(dict.getDictValue());
resDTO.setCategoryName(dict.getDictLabel());
resDTO.setTotal(map.containsKey(dict.getDictValue()) ? map.get(dict.getDictValue()) : NumConstant.ZERO);
resDTO.setColor(SelfOrgCategoryEnum.getEnum(dict.getDictValue()).getColor());
resultList.add(resDTO);
}
return resultList;
}
private CustomerStaffInfoCacheResult getStaffInfo(String customerId, String staffId) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, staffId);
if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前工作人员信息异常");
}
return staffInfo;
}
/**
* 多元主体分析-分类下的社区自组织列表
*
* @param formDTO
* @return
*/
@Override
public PageData<CommunitySelfOrganizationListDTO> queryCategoryList(CategorySelfOrgFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId());
formDTO.setAgencyId(staffInfo.getAgencyId());
PageInfo<CommunitySelfOrganizationListDTO> pageInfo= PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCategoryList(formDTO));
return new PageData<>(pageInfo.getList(), pageInfo.getTotal());
}
/**
* 多元主体分析-地图坐标及详情
*
* @param formDTO
* @return
*/
@Override
public PageData<CommunitySelfOrganizationListDTO> queryCoordinateList(CategorySelfOrgFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId());
formDTO.setAgencyId(staffInfo.getAgencyId());
PageInfo<CommunitySelfOrganizationListDTO> pageInfo= PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO));
List<CommunitySelfOrganizationListDTO> list=pageInfo.getList();
for (CommunitySelfOrganizationListDTO dto : list) {
dto.setColor(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getColor());
if (StringUtils.isNotBlank(dto.getCategoryCode())) {
dto.setCategoryName(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getName());
}
}
return new PageData<>(list, pageInfo.getTotal());
}
}

143
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -39,7 +39,9 @@ import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.ExcelPoiUtils;
@ -51,8 +53,13 @@ import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.PartyTypepercentResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.PartyUnitListbrieResultDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.demand.ServiceStatDTO;
@ -126,10 +133,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list);
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class);
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
//服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId());
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId());
Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
//获取单位积分
Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT);
dtoList.forEach(item -> {
@ -140,12 +147,12 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
} else {
item.setServiceMatterList(new ArrayList<>());
}
if(StringUtils.isBlank(item.getSatisfaction())){
if (StringUtils.isBlank(item.getSatisfaction())) {
item.setSatisfaction(StrConstant.HYPHEN);
}else{
item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2,BigDecimal.ROUND_HALF_UP).toString());
} else {
item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2, BigDecimal.ROUND_HALF_UP).toString());
}
item.setScore(null == pointMap.get(item.getId())?NumConstant.ZERO:pointMap.get(item.getId()));
item.setScore(null == pointMap.get(item.getId()) ? NumConstant.ZERO : pointMap.get(item.getId()));
});
return new PageData<>(dtoList, pageInfo.getTotal());
}
@ -162,10 +169,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime);
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class);
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
//服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId());
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(formDTO.getCustomerId());
Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
//获取单位积分
Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT);
dtoList.forEach(item -> {
@ -176,13 +183,13 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
} else {
item.setServiceMatterList(new ArrayList<>());
}
item.setScore(null == pointMap.get(item.getId())?NumConstant.ZERO:pointMap.get(item.getId()));
item.setScore(null == pointMap.get(item.getId()) ? NumConstant.ZERO : pointMap.get(item.getId()));
});
return dtoList;
}
private QueryWrapper<IcPartyUnitEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<IcPartyUnitEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcPartyUnitEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -198,14 +205,14 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
//获取单位积分
Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(entity.getCustomerId(), UserDemandConstant.PARTY_UNIT);
dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA)));
dto.setScore(null == pointMap.get(id)?NumConstant.ZERO:pointMap.get(id));
dto.setScore(null == pointMap.get(id) ? NumConstant.ZERO : pointMap.get(id));
}
return dto;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(TokenDto tokenDto, IcPartyUnitDTO dto) {
public void save(TokenDto tokenDto, IcPartyUnitDTO dto) {
IcPartyUnitEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyUnitEntity.class);
CustomerStaffInfoCacheResult staff = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
entity.setAgencyId(staff.getAgencyId());
@ -217,7 +224,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
wrapper.eq(IcPartyUnitEntity::getAgencyId, entity.getAgencyId());
wrapper.eq(IcPartyUnitEntity::getUnitName, entity.getUnitName());
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
if(StringUtils.isBlank(entity.getId())) {
if (StringUtils.isBlank(entity.getId())) {
if (CollectionUtils.isNotEmpty(list)) {
throw new EpmetException(EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getCode(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg());
}
@ -256,19 +263,19 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) {
if (staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)) {
agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON)));
}else{
} else {
//当前用户属于第二级组织的人,不会有:
agencyIds.add(staffInfoCacheResult.getAgencyPIds());
}
}
agencyIds.add(staffInfoCacheResult.getAgencyId());
resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId());
resultList = baseDao.selectListByAgencyId(agencyIds, formDTO.getServiceName(), formDTO.getCustomerId());
return resultList;
}
/**
* @Description 获取组织下单位列表
* @param dto
* @Description 获取组织下单位列表
* @Return {@link List< OptionDTO>}
* @Author zhaoqifeng
* @Date 2021/11/22 14:35
@ -345,8 +352,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
if (null == staffInfoCache) {
throw new EpmetException(8000, "获取用户缓存失败");
}
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId());
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
List<OptionDTO> serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId());
Map<String, String> categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
//1.数据校验
Iterator<IcPartyUnitImportExcel> iterator = result.iterator();
while (iterator.hasNext()) {
@ -517,6 +524,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
throw new RenException(result.getInternalMsg());
}
}
/**
* @param formDTO
* @Description 按类型统计单位数量
@ -541,7 +549,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
OptionDataResultDTO dto = new OptionDataResultDTO();
dto.setLabel(item.getLabel());
dto.setCode(item.getValue());
dto.setValue(null == map.get(item.getValue())?NumConstant.ZERO_STR:map.get(item.getValue()));
dto.setValue(null == map.get(item.getValue()) ? NumConstant.ZERO_STR : map.get(item.getValue()));
return dto;
}).collect(Collectors.toList());
}
@ -557,7 +565,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
*/
@Override
public List<PartyUnitDistributionResultDTO> distribution(PartyActivityFormDTO formDTO) {
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
List<PartyUnitDistributionResultDTO> list = baseDao.getDistribution(formDTO.getAgencyId());
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
@ -571,29 +579,112 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
/**
* 计算区域化党建单位的群众满意度
* 总分需求个数
*
* @param formDTO
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void calPartyUnitSatisfation(ServerSatisfactionCalFormDTO formDTO) {
log.info("收到消息内容啦...." + JSON.toJSONString(formDTO));
List<ServiceStatDTO> list = icUserDemandRecService.groupByServer(formDTO.getCustomerId(), formDTO.getServerId(),formDTO.getServiceType());
List<ServiceStatDTO> list = icUserDemandRecService.groupByServer(formDTO.getCustomerId(), formDTO.getServerId(), formDTO.getServiceType());
for (ServiceStatDTO serviceStatDTO : list) {
if (0 != serviceStatDTO.getDemandCount()) {
BigDecimal result = serviceStatDTO.getTotalScore().divide(new BigDecimal(serviceStatDTO.getDemandCount()), 4, BigDecimal.ROUND_HALF_UP);
baseDao.updateSatisfaction(serviceStatDTO.getServerId(),result);
baseDao.updateSatisfaction(serviceStatDTO.getServerId(), result);
}
}
}
@Override
public List<IcPartyUnitEntity> queryListById(List<String> partyUnitIds) {
if(CollectionUtils.isNotEmpty(partyUnitIds)){
if (CollectionUtils.isNotEmpty(partyUnitIds)) {
return baseDao.selectBatchIds(partyUnitIds);
}
return Collections.EMPTY_LIST;
}
/**
* Desc: 获取联建单位名字
* @param formDTO
* @author zxc
* @date 2022/5/17 17:53
*/
@Override
public List<PartyUnitListResultDTO>getPartyUnitList(PartyUnitListFormDTO formDTO) {
List<PartyUnitListResultDTO> result = new ArrayList<>();
if (CollectionUtils.isNotEmpty(formDTO.getPartyUnitIds())){
result.addAll(baseDao.getPartyUnitList(formDTO.getPartyUnitIds()));
}
if (CollectionUtils.isNotEmpty(formDTO.getCommunitySelfIds())){
result.addAll(baseDao.getCommunitySelfList(formDTO.getCommunitySelfIds()));
}
return result;
}
/**
* Desc: 协办单位列表
* @param tokenDto
* @author zxc
* @date 2022/5/18 13:37
*/
@Override
public List<PartyUnitListResultDTO> getAssistanceUnitList(TokenDto tokenDto) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo){
throw new EpmetException("未查询到此工作人员信息"+tokenDto.getUserId());
}
return baseDao.getAssistanceUnitList(staffInfo.getAgencyId());
}
@Override
public PageData getListbrief(PartyUnitListbriefFormDTO form) {
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
PageHelper.startPage(form.getPageNo(), form.getPageSize());
List<PartyUnitListbrieResultDTO> dto = baseDao.getListbrief(form, form.getCustomerId());
dto.forEach(item -> {
item.setType(unitTypeMap.getData().get(item.getType()));
});
// 获取gridName
/*for (PartyUnitListbrieResultDTO item : dto) {
if (StringUtils.isNotEmpty(item.getGridId())) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getGridId());
if (null != gridInfo) {
item.setGridName(gridInfo.getGridName());
}
}
}*/
PageInfo<PartyUnitListbrieResultDTO> info = new PageInfo<>(dto);
return new PageData<>(dto, info.getTotal());
}
@Override
public List<PartyTypepercentResultDTO> getTypepercent(PartyTypepercentFormDTO form) {
DictListFormDTO dictFromDTO = new DictListFormDTO();
dictFromDTO.setDictType(DictTypeEnum.PARTY_UNIT_TYPE.getCode());
Result<List<DictListResultDTO>> dictResult = epmetAdminOpenFeignClient.dictList(dictFromDTO);
if (!dictResult.success()) {
throw new EpmetException(dictResult.getCode());
}
List<PartyTypepercentResultDTO> result = baseDao.getTypepercent(form.getAgencyId(),form.getCustomerId());
Map<String, Integer> map = result.stream().collect(Collectors.toMap(PartyTypepercentResultDTO::getCode, PartyTypepercentResultDTO::getValue));
int sum = result.stream().mapToInt(PartyTypepercentResultDTO::getValue).sum();
return dictResult.getData().stream().map(item -> {
PartyTypepercentResultDTO dto = new PartyTypepercentResultDTO();
dto.setLabel(item.getLabel());
dto.setCode(item.getValue());
dto.setValue(null == map.get(item.getValue()) ? NumConstant.ZERO : map.get(item.getValue()));
dto.setPercent((Integer.parseInt(item.getValue()) * 100) / sum + "%");
return dto;
}).collect(Collectors.toList());
}
private String getServiceMatter(Map<String, String> map, String matter) {
List<String> matters = Arrays.asList(matter.split(StrConstant.COLON));
List<String> list = matters.stream().map(map::get).collect(Collectors.toList());

115
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -36,6 +36,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.constant.ReadFlagConstant;
@ -51,10 +52,7 @@ import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.*;
import com.epmet.dto.result.demand.*;
import com.epmet.entity.*;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.feign.*;
import com.epmet.service.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@ -67,6 +65,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -108,6 +107,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
private String scanApiUrl;
@Value("${openapi.scan.method.textSyncScan}")
private String textSyncScanMethod;
@Autowired
private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Override
@ -516,6 +517,27 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
// 5、如果是居民端用户提出的需求,发消息:您提出的需求已完成,请进行服务评价。
sendDemandUserFinished(entity);
//2022-5-19 sun 需求完成时 来源事件管理的需求需要去修改事件数据 start
if ("ic_event".equals(entity.getOrigin())) {
Result<Map<String, String>> serviceTypeRes=adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_SERVICE_TYPE.getCode());
Map<String,String> serviceTypeMap=serviceTypeRes.success()&& MapUtils.isNotEmpty(serviceTypeRes.getData())?serviceTypeRes.getData():new HashMap<>();
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
String str = serviceTypeMap.containsKey(serviceEntity.getServiceType())?serviceEntity.getServerName().concat("(").concat(serviceTypeMap.get(serviceEntity.getServiceType())).concat(")"):StrConstant.EPMETY_STR;
ColseProjectOrDemandFormDTO dto = new ColseProjectOrDemandFormDTO();
dto.setCustomerId(formDTO.getCustomerId());
dto.setUserId(formDTO.getUserId());
dto.setIcEventId(entity.getOriginId());
dto.setType("demand");
dto.setServiceParty(str);
dto.setActualServiceTime(DateUtils.format(formDTO.getServiceStartTime(), DateUtils.DATE_TIME_PATTERN)+"至"+DateUtils.format(formDTO.getServiceEndTime(), DateUtils.DATE_TIME_PATTERN));
Result result = govProjectOpenFeignClient.closeProjectOrDemand(dto);
if (!result.success()) {
throw new RenException("需求完成,修改事件管理数据失败...");
}
}
//2022-5-19 sun end
return finishResultDTO;
}
@ -1375,6 +1397,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
Date now = new Date();
DemandRecId resultDto = new DemandRecId();
resultDto.setDemandRecId(formDTO.getDemandRecId());
String demandRecId = "";
if (StringUtils.isNotBlank(formDTO.getDemandRecId())) {
//修改需求
IcUserDemandRecEntity origin = baseDao.selectById(formDTO.getDemandRecId());
@ -1406,6 +1429,9 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
insertEntity.setGridPids(gridInfoRes.getData().getPids());
insertEntity.setDemandUserType(UserDemandConstant.MINI_RESI);
insertEntity.setStatus(UserDemandConstant.PENDING);
if("ic_event".equals(formDTO.getOrigin())){
insertEntity.setStatus(UserDemandConstant.ASSIGNED);
}
insertEntity.setEvaluateFlag(false);
//设置上报人消息
insertEntity.setReportType(UserDemandConstant.SELF_HELP_REPORT);
@ -1420,6 +1446,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
}
baseDao.insert(insertEntity);
resultDto.setDemandRecId(insertEntity.getId());
demandRecId = insertEntity.getId();
}
//插入操作日志
IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity();
@ -1431,6 +1458,17 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
logEntity.setOperateTime(now);
operateLogDao.insert(logEntity);
//来源事件管理的需求增加指派记录
if("ic_event".equals(formDTO.getOrigin())){
IcUserDemandServiceEntity serviceEntity = ConvertUtils.sourceToTarget(formDTO, IcUserDemandServiceEntity.class);
serviceEntity.setDemandRecId(demandRecId);
String serviceName = queryServiceName(serviceEntity.getServerId(), serviceEntity.getServiceType());
if (StringUtils.isBlank(serviceName)) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "服务方名称获取异常", "服务方名称异常");
}
serviceEntity.setServerName(serviceName);
demandServiceDao.insert(serviceEntity);
}
return resultDto;
}
@ -1704,5 +1742,74 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
}
return list.stream().collect(Collectors.toMap(ServicePointDTO::getServerId, ServicePointDTO::getPoint));
}
/**
* 根据服务方id查询服务过的需求列表
*
* @param formDTO
* @return
*/
@Override
public PageData<DemandRecResultDTO> queryServiceList(ServiceListFormDTO formDTO) {
List<String> serverIds = new ArrayList<>();
if ("community_org".equals(formDTO.getType())) {
serverIds.add(formDTO.getServerId());
} else if ("volunteer".equals(formDTO.getType())) {
// 根据身份证号查询ic_resi_user.id+epmetUserId
Result<List<String>> userIdRes = epmetUserOpenFeignClient.getAllUserIds(formDTO.getIdCard(), formDTO.getCustomerId());
if (!userIdRes.success()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "根据身份证号查询用户id异常", EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg());
}
if (CollectionUtils.isNotEmpty(userIdRes.getData())) {
serverIds.addAll(userIdRes.getData());
}
}
formDTO.setServerIds(serverIds);
PageInfo<DemandRecResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.queryServiceList(formDTO));
return new PageData<>(pageInfo.getList(), pageInfo.getTotal());
}
/**
* @Author sun
* @Description 事件评价时同步=评价结果到需求
**/
@Override
public void icEventComment(IcEventCommentToDemandFromDTO formDTO) {
//1.校验需求是否存在且是否已评价
IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId());
if (null == entity || NumConstant.ONE_STR.equals(entity.getEvaluateFlag())) {
log.warn(String.format("需求不存在或已完成评价,需求Id->%s", formDTO.getDemandRecId()));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "需求不存在或评价");
}
//2.新增评价记录
IcUserDemandSatisfactionEntity satisfactionEntity = new IcUserDemandSatisfactionEntity();
satisfactionEntity.setCustomerId(formDTO.getCustomerId());
satisfactionEntity.setDemandRecId(formDTO.getDemandRecId());
satisfactionEntity.setUserType("staff");
satisfactionEntity.setUserId(formDTO.getStaffId());
satisfactionEntity.setEvaluateTime(new Date());
satisfactionEntity.setScore(("perfect".equals(formDTO.getSatisfaction()) ? new BigDecimal(5) : ("good".equals(formDTO.getSatisfaction()) ? new BigDecimal(3) : ("bad".equals(formDTO.getSatisfaction()) ? BigDecimal.ONE : BigDecimal.ZERO))));
demandSatisfactionDao.insert(satisfactionEntity);
//3.新增操作日志记录
IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity();
logEntity.setCustomerId(formDTO.getCustomerId());
logEntity.setDemandRecId(formDTO.getDemandRecId());
logEntity.setUserType("staff");
logEntity.setUserId(formDTO.getStaffId());
logEntity.setActionCode("");
logEntity.setOperateTime(new Date());
operateLogDao.insert(logEntity);
//4.更新需求主表数据状态
entity.setStatus("finished");
entity.setFinishResult("resolved");
entity.setEvaluateFlag(true);
baseDao.updateById(entity);
}
}

63
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java

@ -39,10 +39,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.SmsTemplateConstant;
import com.epmet.constant.SystemMessageType;
import com.epmet.dao.VolunteerInfoDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.HeartUserInfoDTO;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.form.resi.ResiSendSmsCodeFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
@ -189,6 +186,33 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
}
}
@Override
public void addVolunteer(ResiVolunteerAuthenticateFormDTO formDTO) {
// 检查是否是志愿者
VolunteerInfoDTO originVolunteer = baseDao.selectVolunteerInfoByUserId(formDTO.getUserId());
if (null == originVolunteer) {
//不是志愿者:插入志愿者信息表
VolunteerInfoEntity insertVolunteer = ConvertUtils.sourceToTarget(formDTO, VolunteerInfoEntity.class);
// 赋值gridName,pid,pids
CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO();
customerGridFormDTO.setGridId(formDTO.getGridId());
Result<CustomerGridDTO> gridInfoRes = govOrgOpenFeignClient.getGridBaseInfoByGridId(customerGridFormDTO);
if (!gridInfoRes.success() || null == gridInfoRes.getData()) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询网格信息失败");
}
insertVolunteer.setGridName(gridInfoRes.getData().getGridName());
insertVolunteer.setPid(gridInfoRes.getData().getPid());
insertVolunteer.setPids(gridInfoRes.getData().getPids());
baseDao.insert(insertVolunteer);
//更新用户信息表的 是否是志愿者标识
HeartUserInfoDTO userInfoDTO = new HeartUserInfoDTO();
userInfoDTO.setUserId(formDTO.getUserId());
userInfoDTO.setVolunteerFlag(true);
heartUserInfoService.updateHeartUserInfoByUserId(userInfoDTO);
}
}
private void grantActPoints(ResiVolunteerAuthenticateFormDTO formDTO){
//MqBaseMsgDTO mqBaseMsgDTO=new MqBaseMsgDTO();
//mq的事件类型
@ -424,4 +448,35 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
public void modifyVolunteerGrid(VolunteerInfoDTO volunteerInfoDTO) {
baseDao.updateVolunteerGrid(volunteerInfoDTO);
}
/**
* 获取客户下志愿者
*
* @param customerId
* @Param customerId
* @Return {@link List< IcVolunteerPolyDTO >}
* @Author zhaoqifeng
* @Date 2022/5/19 10:58
*/
@Override
public List<IcVolunteerPolyDTO> getVolunteerList(String customerId) {
if (StringUtils.isBlank(customerId)) {
return Collections.emptyList();
}
LambdaQueryWrapper<VolunteerInfoEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(VolunteerInfoEntity::getCustomerId, customerId);
List<VolunteerInfoEntity> list = baseDao.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
}
return list.stream().map(item -> {
IcVolunteerPolyDTO dto = new IcVolunteerPolyDTO();
dto.setCustomerId(item.getCustomerId());
dto.setAgencyId(item.getPid());
dto.setAgencyPids(item.getPids());
dto.setUserId(item.getUserId());
dto.setVolunteerCategory("qita");
return dto;
}).collect(Collectors.toList());
}
}

8
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql

@ -0,0 +1,8 @@
alter table ic_community_self_organization
add COLUMN CATEGORY_CODE VARCHAR(32) DEFAULT NULL COMMENT '分类,来源于字典表dictType=self_org_category;';
ALTER TABLE `ic_user_demand_rec`
ADD COLUMN `ORIGIN` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'demand' COMMENT '来源[需求录入:demand 事件管理:ic_event]' AFTER `DEMAND_USER_HOUSE_ID`,
ADD COLUMN `ORIGIN_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '来源Id[目前只有来源事件管理的有值]' AFTER `ORIGIN`;

4
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql

@ -0,0 +1,4 @@
update ic_community_self_organization set CATEGORY_CODE='other'
where DEL_FLAG='0'
and CATEGORY_CODE is not null
and CATEGORY_CODE !='';

66
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml

@ -16,7 +16,8 @@
ORGANIZATION_CREATED_TIME = #{organizationCreatedTime},
REMARK = #{remark},
UPDATED_TIME = NOW(),
UPDATED_BY = #{updatedBy}
UPDATED_BY = #{updatedBy},
CATEGORY_CODE =#{categoryCode}
WHERE DEL_FLAG = 0
AND ID = #{orgId}
</update>
@ -38,7 +39,10 @@
<select id="selectPerson" resultType="com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO">
select
person_name AS personName,
person_phone as personPhone
person_phone as personPhone,
ID,
CUSTOMER_ID,
ORG_ID
from ic_community_self_organization_personnel
where org_id = #{orgId}
and del_flag = 0
@ -46,6 +50,7 @@
<select id="selectCommunitySelfOrganizationList" resultMap="selectCommunitySelfOrganizationListMap" parameterType="com.epmet.dto.form.CommunitySelfOrganizationListFormDTO">
SELECT
so.ORGANIZATION_NAME AS organizationName,
so.CATEGORY_CODE AS categoryCode,
so.ORGANIZATION_PERSON_COUNT AS organizationPersonCount,
IFNULL(DATE_FORMAT(so.ORGANIZATION_CREATED_TIME,'%Y-%m-%d'),DATE_FORMAT(so.CREATED_TIME,'%Y-%m-%d')) AS organizationCreatedTime,
so.PRINCIPAL_NAME AS principalName,
@ -116,4 +121,61 @@
AND customer_id = #{customerId}
</select>
<select id="selectCountGroupByCategory" parameterType="map" resultType="com.epmet.dto.result.SelfOrgCategoryTotalResDTO">
SELECT
i.CATEGORY_CODE AS categoryCode,
count( i.ID ) AS total
FROM
ic_community_self_organization i
WHERE
i.DEL_FLAG = '0'
AND I.CATEGORY_CODE IS NOT NULL
AND I.CATEGORY_CODE !=''
AND i.CUSTOMER_ID = #{customerId}
AND ( i.ORG_ID = #{agencyId} OR i.PIDS LIKE concat('%',#{agencyId},'%') )
GROUP BY
i.CATEGORY_CODE
</select>
<select id="queryCategoryList" parameterType="com.epmet.dto.form.CategorySelfOrgFormDTO" resultType="com.epmet.dto.result.CommunitySelfOrganizationListDTO">
SELECT
so.ORGANIZATION_NAME AS organizationName,
so.CATEGORY_CODE AS categoryCode,
so.ID as orgId
FROM ic_community_self_organization so
WHERE so.DEL_FLAG = 0
AND so.CATEGORY_CODE IS NOT NULL
AND so.CATEGORY_CODE !=''
AND (so.ORG_ID = #{agencyId} or so.PIDS LIKE concat('%',#{agencyId},'%'))
AND so.CUSTOMER_ID = #{customerId}
<if test="null != categoryCode and categoryCode != '' ">
AND so.CATEGORY_CODE =#{categoryCode}
</if>
ORDER BY so.ORG_ID ASC,so.ORGANIZATION_CREATED_TIME DESC
</select>
<select id="queryCoordinateList" resultMap="selectCommunitySelfOrganizationListMap" parameterType="com.epmet.dto.form.CommunitySelfOrganizationListFormDTO">
SELECT
so.ORGANIZATION_NAME AS organizationName,
so.CATEGORY_CODE AS categoryCode,
so.ORGANIZATION_PERSON_COUNT AS organizationPersonCount,
IFNULL(DATE_FORMAT(so.ORGANIZATION_CREATED_TIME,'%Y-%m-%d'),DATE_FORMAT(so.CREATED_TIME,'%Y-%m-%d')) AS organizationCreatedTime,
so.PRINCIPAL_NAME AS principalName,
so.PRINCIPAL_PHONE AS principalPhone,
so.SERVICE_ITEM AS serviceItem,
so.LONGITUDE AS longitude,
so.LATITUDE AS latitude,
so.ID as orgId,
IFNULL(so.remark,'')AS remark
FROM ic_community_self_organization so
WHERE so.DEL_FLAG = 0
AND so.CATEGORY_CODE IS NOT NULL
AND so.CATEGORY_CODE !=''
AND (so.ORG_ID = #{agencyId} or so.PIDS LIKE concat('%',#{agencyId},'%'))
AND so.CUSTOMER_ID = #{customerId}
<if test="null != categoryCode and categoryCode != '' ">
AND so.CATEGORY_CODE =#{categoryCode}
</if>
ORDER BY so.ORG_ID ASC,so.ORGANIZATION_CREATED_TIME DESC
</select>
</mapper>

103
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml

@ -73,6 +73,109 @@
ORDER BY
ID
</select>
<select id="getListbrief" resultType="com.epmet.dto.result.PartyUnitListbrieResultDTO">
SELECT
a.id,
-- b.GRID_ID,
a.UNIT_NAME,
a.type,
a.SERVICE_MATTER,
a.LONGITUDE,
a.LATITUDE
FROM
ic_party_unit a
-- LEFT JOIN ic_party_activity b ON a.id = b.UNIT_ID
-- AND b.DEL_FLAG = '0'
<where>
a.DEL_FLAG = '0'
AND a.CUSTOMER_ID = #{customerId}
AND (AGENCY_ID = #{form.agencyId} OR PIDS LIKE concat( '%', #{form.agencyId}, '%' ))
<!-- <if test="gridId != null and gridId != ''">-->
<!-- AND b.GRID_ID = #{form.gridId}-->
<!-- </if>-->
<if test="form.unitName != null and form.unitName != ''">
AND a.UNIT_NAME = #{form.unitName}
</if>
<if test="form.serviceMatter != null and form.serviceMatter != ''">
AND a.SERVICE_MATTER = #{form.serviceMatter}
</if>
<if test="form.type != null and form.type != ''">
AND a.type = #{form.type}
</if>
<if test="form.contact != null and form.contact != ''">
AND a.CONTACT = #{form.contact}
</if>
<if test="form.contactMobile != null and form.contactMobile != ''">
AND a.CONTACT_MOBILE = #{form.contactMobile}
</if>
</where>
order by
a.CREATED_TIME
</select>
<select id="getTypepercent" resultType="com.epmet.dto.result.PartyTypepercentResultDTO">
SELECT
count( a.id ) AS value,
a.type AS CODE
FROM
ic_party_unit a
WHERE
a.DEL_FLAG = '0'
AND a.AGENCY_ID = #{agencyId}
AND a.CUSTOMER_ID = #{customerId}
GROUP BY
a.type
</select>
<!-- 获取联建单位名字 -->
<select id="getPartyUnitList" resultType="com.epmet.dto.result.PartyUnitListResultDTO">
SELECT
ID AS assistanceUnitId,
UNIT_NAME AS assistanceUnitName
FROM ic_party_unit
WHERE DEL_FLAG = '0'
AND ID IN (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
</select>
<!-- 获取社区自组织名字 -->
<select id="getCommunitySelfList" resultType="com.epmet.dto.result.PartyUnitListResultDTO">
SELECT
ID AS assistanceUnitId,
ORGANIZATION_NAME AS assistanceUnitName
FROM ic_community_self_organization
WHERE DEL_FLAG = '0'
AND ID IN (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
</select>
<!-- 协办单位列表 -->
<select id="getAssistanceUnitList" resultType="com.epmet.dto.result.PartyUnitListResultDTO">
SELECT t.* FROM (
SELECT
ID AS assistanceUnitId,
UNIT_NAME AS assistanceUnitName,
'2' AS assistanceUnitType,
CREATED_TIME
FROM ic_party_unit
WHERE DEL_FLAG = '0'
AND CONCAT(PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%')
UNION ALL
SELECT
ID AS assistanceUnitId,
ORGANIZATION_NAME AS assistanceUnitName,
'1' AS assistanceUnitType,
CREATED_TIME
FROM ic_community_self_organization
WHERE DEL_FLAG = '0'
AND CONCAT(PIDS,':',ORG_ID) LIKE CONCAT('%',#{agencyId},'%')
) t ORDER BY CREATED_TIME desc
</select>
<update id="updateSatisfaction" parameterType="map">
update ic_party_unit

27
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

@ -85,7 +85,9 @@
CASE WHEN R.DEMAND_USER_TYPE='mini_resi' THEN R.DEMAND_USER_ID
ELSE ''
END
) as epmetUserId
) as epmetUserId,
r.ORIGIN AS origin,
r.ORIGIN_ID AS originId
FROM
ic_user_demand_rec r
left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' )
@ -129,6 +131,9 @@
<if test="null != wantServiceEndTime and wantServiceEndTime != '' ">
AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> #{wantServiceEndTime}
</if>
<if test="null != demandRecId and demandRecId != '' ">
and r.id = #{demandRecId}
</if>
order by r.WANT_SERVICE_TIME desc,r.CREATED_TIME asc
</select>
@ -641,4 +646,22 @@
GROUP BY
b.SERVER_ID
</select>
</mapper>
<select id="queryServiceList" parameterType="com.epmet.dto.form.demand.ServiceListFormDTO" resultType="com.epmet.dto.result.demand.DemandRecResultDTO">
SELECT
r.ID as demandRecId,
r.CONTENT,
r.REPORT_TIME as reportTime
FROM
ic_user_demand_rec r
INNER JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID )
WHERE
r.CUSTOMER_ID = #{customerId}
AND r.STATUS = 'finished'
<foreach item="serverId" collection="serverIds" open="AND (" separator="or" close=")" index="">
s.SERVER_ID = #{serverId}
</foreach>
order by r.REPORT_TIME desc
</select>
</mapper>

BIN
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx

Binary file not shown.

31
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java

@ -0,0 +1,31 @@
package com.epmet.task;
import com.alibaba.fastjson.JSON;
import com.epmet.dto.form.AutoEvaluationFormDTO;
import com.epmet.feign.GovProjectOpenFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @Author zxc
* @DateTime 2022/5/18 17:53
* @DESC
*/
@Slf4j
@Component("autoEvaluationTask")
public class AutoEvaluationTask implements ITask{
@Autowired
private GovProjectOpenFeignClient projectOpenFeignClient;
@Override
public void run(String params) {
AutoEvaluationFormDTO formDTO = new AutoEvaluationFormDTO();
if (StringUtils.isNotBlank(params)) {
formDTO = JSON.parseObject(params, AutoEvaluationFormDTO.class);
}
projectOpenFeignClient.autoEvaluation(formDTO);
}
}

45
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/ic/IcVolunteerDataExtractionTask.java

@ -0,0 +1,45 @@
package com.epmet.task.ic;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.extract.form.ExtractOriginFormDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.task.ITask;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/5/23 10:58
*/
@Slf4j
@Component("icVolunteerDataExtractionTask")
public class IcVolunteerDataExtractionTask implements ITask {
@Resource
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
/**
* 执行定时任务接口
*
* @param params 参数多参数使用JSON数据
*/
@Override
public void run(String params) {
log.info("icVolunteerDataExtractionTask定时任务正在执行,参数为:{}", params);
ExtractOriginFormDTO formDTO = new ExtractOriginFormDTO();
if (StringUtils.isNotBlank(params)) {
formDTO = JSON.parseObject(params, ExtractOriginFormDTO.class);
}
Result result = epmetUserOpenFeignClient.volunteerDataExtraction(formDTO.getCustomerId());
if (result.success()) {
log.info("icVolunteerDataExtractionTask定时任务正在执行定时任务执行成功");
} else {
log.warn("icVolunteerDataExtractionTask定时任务正在执行定时任务执行失败:" + result.getMsg());
}
}
}

5
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java

@ -105,6 +105,11 @@ public interface SystemMessageType {
*/
String IC_RESI_USER_DEL = "ic_resi_user_del";
/**
* 志愿者变动
*/
String VOLUNTEER_CHANGED = "volunteer_changed";
/**
* 需求完成如果服务方是区域化党建单位重新计算这个单位的满意度
*/

5
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java

@ -207,4 +207,9 @@ public interface UserMessageTypeConstant {
* ic_user_demand_rec.id
*/
String DEMAND="demand";
/**
* ic_event新事件
*/
String IC_EVENT="ic_event";
}

4
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/SystemMsgFormDTO.java

@ -1,9 +1,13 @@
package com.epmet.dto.form;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SystemMsgFormDTO {

30
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/send/SendMqMsgUtil.java

@ -3,6 +3,7 @@ package com.epmet.send;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.rocketmq.messages.*;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.mq.MqBaseFormDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.SystemMessageType;
import com.epmet.dto.form.SystemMsgFormDTO;
@ -207,6 +208,35 @@ public class SendMqMsgUtil {
return true;
}
log.error("发送(项目变动)系统消息到message服务失败:{},msg:{}", JSON.toJSONString(sendMsgResult), JSON.toJSONString(systemMsgFormDTO));
} catch (Exception e) {
log.error("sendProjectMqMsg exception", e);
}
return false;
}
/**
* desc: 发送mq消息
*
* @param msgContent
* @return boolean
* @author LiuJanJun
* @date 2021/4/23 3:01 下午
* @remark 失败重试1次,调用端自行判断如果失败是否要继续执行
*/
public boolean sendRocketMqMsg(String msgType, MqBaseFormDTO msgContent) {
try {
SystemMsgFormDTO form = new SystemMsgFormDTO(msgType,msgContent);
Result sendMsgResult;
log.info("sendRocketMqMsg param:{}",msgContent);
int retryTime = 0;
do {
sendMsgResult = epmetMessageOpenFeignClient.sendSystemMsgByMQ(form);
} while ((sendMsgResult == null || !sendMsgResult.success()) && retryTime++ < NumConstant.TWO);
if (sendMsgResult != null && sendMsgResult.success()) {
return true;
}
log.error("发送系统消息到message服务失败:{},msg:{}", JSON.toJSONString(sendMsgResult), JSON.toJSONString(form));
} catch (Exception e) {
log.error("sendMqMsg exception", e);
}

4
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java

@ -230,6 +230,10 @@ public class SystemMessageServiceImpl implements SystemMessageService {
case SystemMessageType.FINISH_USER_DEMAND:
topic=TopicConstants.COMMUNITY_SERVICE;
break;
//志愿者变动
case SystemMessageType.VOLUNTEER_CHANGED:
topic=TopicConstants.VOLUNTEER;
break;
default:
logger.error("getTopicByMsgType msgType:{} is not support for any topic", msgType);
}

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

@ -118,5 +118,8 @@ public class IssueProjectCategoryDictDTO implements Serializable {
* 颜色
*/
private String colour;
/**
* 颜色
*/
private String color;
}

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

@ -57,5 +57,17 @@ public class ShiftProjectFormDTO implements Serializable {
*/
private String customerId;
private String gridId;
/**
* 协办单位ID
*/
private String assistanceUnitId;
/**
* 协办单位类型1社区自组织2联建单位
*/
private String assistanceUnitType;
}

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

@ -385,4 +385,14 @@ public interface GovIssueOpenFeignClient {
*/
@PostMapping("/gov/issue/issue/audit-reset")
Result<Boolean> issueAuditReset(@RequestParam("gridId")String gridId);
/**
* 根据categoryId查询分类信息
* @return
*/
@PostMapping("/gov/issue/issueprojectcategorydict/getByCategoryCode/{category-code}")
Result<IssueProjectCategoryDictDTO> getByCategoryCode(@PathVariable("category-code") String categoryCode);
@PostMapping(value = "/gov/issue/issueprojectcategorydict/first/{customerId}")
Result<List<IssueProjectCategoryDictDTO>> queryFirstCategory(@PathVariable("customerId") String customerId);
}

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

@ -321,4 +321,16 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<Boolean> issueAuditReset(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "issueAuditReset", gridId);
}
@Override
public Result<IssueProjectCategoryDictDTO> getByCategoryCode(String categoryCode) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getByCategoryCode", categoryCode);
}
@Override
public Result<List<IssueProjectCategoryDictDTO>> queryFirstCategory(String customerId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryFirstCategory", customerId);
}
}

17
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java

@ -299,5 +299,22 @@ public class IssueProjectCategoryDictController {
return new Result<Map<String, String>>().ok(issueProjectCategoryDictService.getCategoryMap(customerId));
}
/**
* 根据categoryId查询分类信息
* @return
*/
@PostMapping("getByCategoryCode/{category-code}")
public Result<IssueProjectCategoryDictDTO> getByCategoryCode(@PathVariable("category-code") String categoryCode) {
IssueProjectCategoryDictDTO r = issueProjectCategoryDictService.getByCategoryCode(categoryCode);
return new Result<IssueProjectCategoryDictDTO>().ok(r);
}
@PostMapping("first/{customerId}")
public Result<List<IssueProjectCategoryDictDTO>> queryFirstCategory(@PathVariable("customerId") String customerId) {
List<IssueProjectCategoryDictDTO> list = issueProjectCategoryDictService.queryFirstCategory(customerId);
return new Result<List<IssueProjectCategoryDictDTO>>().ok(list);
}
}

8
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java

@ -231,4 +231,12 @@ public interface IssueProjectCategoryDictService extends BaseService<IssueProjec
Map<String, String> getCategoryMap(String customerId);
/**
* 根据分类code查询分类信息
* @param categoryCode
* @return
*/
IssueProjectCategoryDictDTO getByCategoryCode(String categoryCode);
List<IssueProjectCategoryDictDTO> queryFirstCategory(String customerId);
}

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

Loading…
Cancel
Save