Browse Source

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

# Conflicts:
#	epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
#	epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
#	epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
#	epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java
master
jianjun 3 years ago
parent
commit
37c819b738
  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. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
  12. 64
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java
  13. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  14. 7
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java
  15. 2
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java
  16. 10
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java
  17. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java
  18. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  19. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  20. 10
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java
  21. 10
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java
  22. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java
  23. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java
  24. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java
  25. 28
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java
  26. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
  27. 11
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql
  28. 10
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
  29. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
  30. 8
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java
  31. 9
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java
  32. 19
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java
  33. 33
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java
  34. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java
  35. 6
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java
  36. 27
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java
  37. 20
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java
  38. 24
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java
  39. 30
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java
  40. 7
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java
  41. 14
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java
  42. 32
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java
  43. 21
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java
  44. 9
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java
  45. 27
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
  46. 20
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
  47. 43
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java
  48. 43
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  49. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
  50. 28
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java
  51. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java
  52. 26
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  53. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java
  54. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java
  55. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java
  56. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java
  57. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java
  58. 29
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java
  59. 37
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  60. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  61. 106
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java
  62. 35
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  63. 115
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  64. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql
  65. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql
  66. 66
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml
  67. 51
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml
  68. 27
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml
  69. BIN
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/self_org_import_template.xlsx
  70. 31
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java
  71. 5
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java
  72. 5
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java
  73. 12
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java
  74. 10
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  75. 12
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  76. 17
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java
  77. 8
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java
  78. 37
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java
  79. 1
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  80. 18
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml
  81. 22
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java
  82. 8
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  83. 11
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  84. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  85. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  86. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  87. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  88. 26
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  89. 110
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java
  90. 79
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java
  91. 199
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java
  92. 111
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java
  93. 82
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java
  94. 87
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java
  95. 55
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/AddEventFromResiFormDTO.java
  96. 21
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/AutoEvaluationFormDTO.java
  97. 25
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java
  98. 67
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java
  99. 15
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java
  100. 174
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.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>

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;

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

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());
}
/**

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}

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;
/**
* 组织人数
*/

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;
}

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;
/**
* 服务事项
*/

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;
}

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;
}

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

@ -7,8 +7,13 @@ import com.epmet.dto.ActInfoDTO;
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.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 +112,26 @@ 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);
}

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

@ -8,8 +8,13 @@ import com.epmet.dto.ActInfoDTO;
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.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 +113,19 @@ 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);
}
}

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));
}
}

43
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,11 @@ 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.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.excel.IcPartyUnitExcel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
@ -57,6 +42,7 @@ 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;
@ -267,4 +253,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));
}
}

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);
}

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

@ -20,6 +20,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.apache.ibatis.annotations.Mapper;
@ -27,6 +28,7 @@ import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
* 联建单位
@ -66,4 +68,28 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
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);
}

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);
}

37
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;
@ -25,8 +8,10 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.springframework.web.multipart.MultipartFile;
@ -34,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* 联建单位
@ -158,4 +144,21 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
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);
}

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);
}

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());
}
}

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

@ -51,8 +51,10 @@ 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.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.demand.ServiceStatDTO;
@ -594,6 +596,39 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
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());
}
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);
}
}

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>

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

@ -74,6 +74,57 @@
ID
</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
set SATISFACTION=#{satisfaction},UPDATED_TIME=NOW()

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);
}
}

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";
}

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);
}

37
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java

@ -17,9 +17,11 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
@ -27,6 +29,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.EpmetRequestHolder;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IssueCategoryDao;
import com.epmet.dao.IssueProjectCategoryDictDao;
@ -540,4 +543,38 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl<IssuePr
}
return r.toString().substring(NumConstant.ZERO,r.length()-NumConstant.ONE);
}
@Override
public IssueProjectCategoryDictDTO getByCategoryCode(String categoryCode) {
String customerId = EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID);
LambdaQueryWrapper<IssueProjectCategoryDictEntity> query = new LambdaQueryWrapper<>();
query.eq(IssueProjectCategoryDictEntity::getCategoryCode, categoryCode);
query.eq(IssueProjectCategoryDictEntity::getCustomerId, customerId);
IssueProjectCategoryDictEntity entity = baseDao.selectOne(query);
if (entity == null) {
return null;
}
IssueProjectCategoryDictDTO r = ConvertUtils.sourceToTarget(entity, IssueProjectCategoryDictDTO.class);
LambdaQueryWrapper<IssueProjectCategoryDictEntity> pquery = new LambdaQueryWrapper<>();
pquery.eq(IssueProjectCategoryDictEntity::getId, r.getPid());
pquery.eq(IssueProjectCategoryDictEntity::getCustomerId, customerId);
IssueProjectCategoryDictEntity pgEntity = baseDao.selectOne(pquery);
if (pgEntity != null) {
r.setParentCategoryName(pgEntity.getCategoryName());
}
return r;
}
@Override
public List<IssueProjectCategoryDictDTO> queryFirstCategory(String customerId) {
List<CategoryListResultDTO> list=baseDao.selectCategoryOneLevelListByCustomerId(customerId);
if(CollectionUtils.isEmpty(list)){
return new ArrayList<>();
}
return ConvertUtils.sourceToTarget(list,IssueProjectCategoryDictDTO.class);
}
}

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

@ -1014,6 +1014,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
//3:调用gov-project服务,新增项目各业务表初始数据
formDTO.setCategoryList(categoryList);
formDTO.setGridId(entity.getGridId());
List<IssueTagsDTO> tagList = issueTagsService.getTagsByIssue(formDTO.getIssueId());
formDTO.setTagList(tagList);
Result<IssueProjectResultDTO> resultDTO = govProjectFeignClient.issueShiftProject(formDTO);

18
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml

@ -215,19 +215,25 @@
<select id="getCategoryList" resultType="com.epmet.dto.IssueProjectCategoryDictDTO">
SELECT
*
c.*,
(
case when p.CATEGORY_NAME is not null and p.CATEGORY_NAME !='' then p.CATEGORY_NAME
else ''
end
)as parentCategoryName
FROM
issue_project_category_dict
issue_project_category_dict c
left join issue_project_category_dict p on (c.PID=p.id and p.customer_id = #{customerId})
WHERE
del_flag = '0'
AND customer_id = #{customerId}
c.del_flag = '0'
AND c.customer_id = #{customerId}
<if test="categoryIdList != null and categoryIdList.size() > 0">
<foreach collection="categoryIdList" item="id" open="AND( " separator=" OR " index="index" close=")">
id = #{id}
c.id = #{id}
</foreach>
</if>
ORDER BY
sort ASC
c.sort ASC
</select>
<!-- 查询项目分类标签 -->

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

@ -0,0 +1,22 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 当前组织的直属下级下级组织+直属网格
*/
@Data
public class SubOrgResDTO implements Serializable {
private String orgId;
/**
* agency
* grid
*/
private String orgType;
private String orgName;
private String pid;
private String pids;
}

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

@ -624,4 +624,12 @@ public interface GovOrgOpenFeignClient {
*/
@PostMapping("/gov/org/house/houseupdate")
Result houseUpdate(@RequestBody IcHouseAddFormDTO formDTO);
/**
* 直属网格+下一级组织
* @param agencyId
* @return
*/
@GetMapping("/gov/org/customeragency/subOrgList/{agencyId}")
Result<List<SubOrgResDTO>> subOrgList(@PathVariable("agencyId")String agencyId);
}

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

@ -403,4 +403,15 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
public Result houseUpdate( IcHouseAddFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "houseUpdate",formDTO);
}
/**
* 直属网格+下一级组织
*
* @param agencyId
* @return
*/
@Override
public Result<List<SubOrgResDTO>> subOrgList(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "subOrgList",agencyId);
}
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -415,4 +415,16 @@ public class CustomerAgencyController {
return new Result<AgencyTreeResultDTO>().ok(customerAgencyService.rootAgencyGridTree(formDTO.getAgencyId()));
}
/**
* 当前agencyId的下一级组织+直属网格
* @param agencyId
* @return
*/
@GetMapping("subOrgList/{agencyId}")
public Result<List<SubOrgResDTO>> subOrgList(@PathVariable("agencyId") String agencyId) {
List<SubOrgResDTO> list = customerAgencyService.subOrgList(agencyId);
return new Result<List<SubOrgResDTO>>().ok(list);
}
}

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -316,5 +316,6 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
*/
List<CommunityListResultDTO> getCommunityList(@Param("customerId")String customerId, @Param("agencyId")String agencyId);
List<SubOrgResDTO> selectSubOrg(String agencyId);
}

7
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -288,4 +288,11 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
* @author sun
**/
AgencyTreeResultDTO rootAgencyGridTree(String agencyId);
/**
* 当前agencyId的下一级组织+直属网格
* @param agencyId
* @return
*/
List<SubOrgResDTO> subOrgList(String agencyId);
}

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

@ -1442,4 +1442,15 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
return result;
}
/**
* 当前agencyId的下一级组织+直属网格
*
* @param agencyId
* @return
*/
@Override
public List<SubOrgResDTO> subOrgList(String agencyId) {
return baseDao.selectSubOrg(agencyId);
}
}

26
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -756,4 +756,30 @@
AND CUSTOMER_ID = #{customerId}
AND pids LIKE concat('%',#{agencyId}, '%' )
</update>
<select id="selectSubOrg" resultType="com.epmet.dto.result.SubOrgResDTO">
SELECT
ca.ID AS orgId,
ca.ORGANIZATION_NAME AS orgName,
'agency' AS orgType,
ca.PID,
ca.PIDS
FROM
customer_agency ca
WHERE
ca.DEL_FLAG = '0'
AND ca.PID = #{agencyId}
union ALL
SELECT
cg.ID AS orgId,
cg.GRID_NAME AS orgName,
'grid' AS orgType,
cg.PID,
cg.PIDS
FROM
customer_grid cg
WHERE
cg.DEL_FLAG = '0'
AND cg.PID = #{agencyId}
</select>
</mapper>

110
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java

@ -0,0 +1,110 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 事件附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-17
*/
@Data
public class IcEventAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 事件Id
*/
private String icEventId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 排序字段
*/
private Integer sort;
/**
* 附件状态审核中auditing
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
现在图片是同步审核的所以图片只有auto_passed一种状态
*/
private String status;
/**
* 失败原因
*/
private String reason;
/**
* 语音或视频时长,
*/
private Integer duration;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

79
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java

@ -0,0 +1,79 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 事件所属分类表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-17
*/
@Data
public class IcEventCategoryDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 事件Id
*/
private String icEventId;
/**
* 分类id
*/
private String categoryId;
/**
* 分类对应的所有上级,英文逗号隔开
*/
private String categoryPids;
/**
* 分类编码分类编码+customer_id唯一
*/
private String categoryCode;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

199
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java

@ -0,0 +1,199 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 事件管理表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-17
*/
@Data
public class IcEventDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键事件id
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 事件所属的网格Id
*/
private String gridId;
/**
* 网格的所属组织
*/
private String agencyId;
/**
* 网格的所有组织Id
*/
private String gridPids;
/**
* 报事的人居民端/pc端居民Id可为空
*/
private String reportUserId;
/**
* 报事人姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号
*/
private String idCard;
/**
* 反映渠道字典表
*/
private String sourceType;
/**
* 发生时间
*/
private Date happenTime;
/**
* 事件内容
*/
private String eventContent;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
/**
* 地址
*/
private String address;
/**
* 处理中processing已办结closed_case
*/
private String status;
/**
* 办结时间
*/
private Date closeCaseTime;
/**
* 0:已回复 1:已转项目 1:已转需求
*/
private String operationType;
/**
* 项目需求ID
*/
private String operationId;
/**
* 事件是否被阅读过;1已读针对报事人待处理列表
*/
private Integer readFlag;
/**
* 报事人的红点:展示1不展示0人大代表回复工作人员回复/立项/转需求/办结更新为1;
*/
private Integer redDot;
/**
* 最近一次操作时间回复立项转需求办结更新此列
*/
private Date latestOperatedTime;
/**
* 是否解决已解决 resolved未解决 un_solved
*/
private String resolveStatus;
/**
* 结案说明
*/
private String closeRemark;
/**
* 评论人
*/
private String commentUserId;
/**
* 评论内容
*/
private String satisfaction;
/**
* 评论时间
*/
private Date commentTime;
/**
* 事件审核状态[涉及附件审核需要加的状态]审核中auditing
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
*/
private String auditStatus;
/**
* 审核理由
*/
private String auditReason;
/**
* 删除标识:0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 展示红点visible隐藏invisible人大回复工作人员回复/立项更新为visible; 插入数据默认不展示
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

111
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java

@ -0,0 +1,111 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 事件操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-17
*/
@Data
public class IcEventOperationLogDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 事件id
*/
private String icEventId;
/**
* 操作用户Id
*/
private String userId;
/**
* 操作用户类型居民端用户:resi_user工作人员:staff
*/
private String userIdentity;
/**
* 1发布事件add
* 2reply
* 3立项shift_project
* 4转需求shift_demand
* 5办结close_case;
* 6需求办结close_demand
*/
private String actionCode;
/**
* 1发布事件publish
* 2撤回事件recall
* 3reply
* 4立项shift_project
* 5转需求: shift_demand
* 6办结close_case;
* 7需求办结close_demand;
* 8选择是否已解决choose_resolve;
* 9首次查看阅读事件read_first人大代表未读=>已读工作人员待处理=>处理中
*/
private String actionDesc;
/**
* 操作时间
*/
private Date operateTime;
/**
* 服务方事件被转需求需求在办结时的服务方名称
*/
private String serviceParty;
/**
* 实际服务时间事件被转需求需求在办结时填写的实际服务时间 xx至xx
*/
private String actualServiceTime;
/**
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

82
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java

@ -0,0 +1,82 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 事件回复表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-17
*/
@Data
public class IcEventReplyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 事件Id
*/
private String icEventId;
/**
* 回复人用户Id[工作人员ID]
*/
private String fromUserId;
/**
* 内容
*/
private String content;
/**
* 报事人组织-人名
*/
private String userShowName;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

87
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java

@ -0,0 +1,87 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 事件附件安全校验任务表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-17
*/
@Data
public class IcEventScanTaskDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 事件Id
*/
private String icEventId;
/**
* 事件附件表主键对应dataId
*/
private String icEventAttachmentId;
/**
* 阿里云审核任务Id
*/
private String taskId;
/**
* 审核状态auditing: 审核中
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
*/
private String status;
/**
* 附件类型视频 - video 语音 - voice 文件 - doc
*/
private String attachmentType;
/**
* 删除标识0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 操作人API审核结果存储为SCAN_USER或者APP_USER
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

55
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/AddEventFromResiFormDTO.java

@ -0,0 +1,55 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.FileCommonDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/5/19 11:14
* @DESC
*/
@Data
public class AddEventFromResiFormDTO implements Serializable {
private static final long serialVersionUID = -2238068041964629750L;
public interface AddEventFromResiForm{}
private String content;
private String address;
@NotBlank(message = "gridId不能为空",groups = AddEventFromResiForm.class)
private String gridId;
/**
* 图片附件列表
*/
private List<FileCommonDTO> attachmentList;
/**
* 语音附件列表
*/
private List<FileCommonDTO> voiceList;
/**
* 纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
private String customerId;
private String userId;
}

21
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/AutoEvaluationFormDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/5/18 16:33
* @DESC
*/
@Data
public class AutoEvaluationFormDTO implements Serializable {
private static final long serialVersionUID = -8871508029242477452L;
private String customerId;
private String dateId;
private String startDate;
private String endDate;
}

25
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* 需求完成/项目结案时 修改事件数据
*/
@Data
public class ColseProjectOrDemandFormDTO implements Serializable {
private static final long serialVersionUID = -590440160577071133L;
//事件管理Id
private String icEventId;
//类型 需求:demand 项目:project
private String type;
//服务方【事件被转需求,需求在办结时的服务方名称】
private String serviceParty;
//实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】
private String actualServiceTime;
private String customerId;
private String userId;
}

67
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java

@ -0,0 +1,67 @@
package com.epmet.dto.form;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* 事件处理分析通用
*/
@Data
public class EventProcessAnalysisCommonFormDTO {
/**
* 处理状态比例查询
*/
public interface ProcessStatusRatioQuery {}
/**
* 月度新增
*/
public interface MonthlyIncrementAnalysis {}
/**
* 同类事件列表
*/
public interface SameCategoryEvents {}
/**
* 要查询的组织ID
*/
@NotBlank(message = "组织ID为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class, SameCategoryEvents.class })
private String orgId;
/**
* 组织类型grid,agency
*/
@NotBlank(message = "组织类型为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class, SameCategoryEvents.class })
private String orgType;
/**
* 查询起始时间 yyyy-MM-dd
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class })
private Date queryStartTime;
/**
* 查询截止时间 yyyy-MM-dd
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class })
private Date queryEndTime;
@NotBlank(message = "分类Id不能为空", groups = { SameCategoryEvents.class })
private String categoryPids;
private Integer pageNo = 1;
private Integer pageSize = 20;
}

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

@ -94,4 +94,19 @@ public class EventToProjectFormDTO implements Serializable {
private String app;
private String client;
/**
* 协办单位ID
*/
private String assistanceUnitId;
/**
* 协办单位类型1社区自组织2联建单位
*/
private String assistanceUnitType;
/**
* 网格ID
*/
private String gridId;
}

174
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java

@ -0,0 +1,174 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 居民端-上报需求或者修改需求
*/
@Data
public class IcDemandFormDTO implements Serializable {
private static final long serialVersionUID = 1589287946950749226L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
public interface UpdateInternalGroup {
}
@NotBlank(message = "事件id不能为空",groups = AddUserInternalGroup.class)
private String icEventId;
@NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class)
private String demandRecId;
private String customerId;
private String currentUserId;
/**
* 网格id
*/
@NotBlank(message = "所属网格不能为空",groups = AddUserShowGroup.class)
private String gridId;
/**
* 组织id
*/
private String agencyId;
/**
* 网格的所有上级id
*/
private String gridPids;
/**
* 二级需求分类编码
*/
@NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class)
private String categoryCode;
/**
* 父级需求分类编码
*/
@NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class)
private String parentCode;
/**
* 需求内容1000字
*/
@NotBlank(message = "需求内容不能为空",groups = AddUserShowGroup.class)
@Length(max = 1000,message = "需求内容至多输入1000字",groups = AddUserShowGroup.class)
private String content;
/**
* 社区帮办community楼长帮办building_caption;党员帮办party;自身上报self_help
*/
@NotBlank(message = "上报类型不能为空",groups = AddUserShowGroup.class)
private String reportType;
/**
* 上报人姓名
*/
@NotBlank(message = "上报人不能为空",groups = AddUserShowGroup.class)
private String reportUserName;
/**
* 上报人联系方式自身上报时存储注册居民的手机号
*/
@NotBlank(message = "上报人联系方式不能为空",groups = AddUserShowGroup.class)
private String reportUserMobile;
/**
* 上报时间
*/
@NotNull(message = "上报时间不能为空",groups = AddUserShowGroup.class)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reportTime;
/**
* 需求人user.id或者ic_resi_user.id
*/
@NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class)
private String demandUserId;
/**
* 需求人姓名
*/
@NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class)
private String demandUserName;
/**
* 需求人联系电话
*/
@NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class)
private String demandUserMobile;
/**
* 希望服务时间
*/
@NotNull(message = "服务时间不能为空",groups = AddUserShowGroup.class)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date wantServiceTime;
/**
* 服务地点工作端指派默认居民居住房屋地址居民端地图选择
*/
private String serviceLocation;
/**
* 门牌号详细地址
*/
private String locationDetail;
/**
* 经度,需求人是ic的居民时取所住楼栋的中心点位
*/
private String longitude;
/**
* 纬度,需求人是ic的居民时取所住楼栋的中心点位
*/
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;
/**
* 二级分类Id
*/
@NotBlank(message = "分类id不能为空",groups = AddUserInternalGroup.class)
private String categoryId;
}

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

Loading…
Cancel
Save