Browse Source

Merge remote-tracking branch 'remotes/origin/dev_project_statis' into pingyin_master

# Conflicts:
#	epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
#	epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
#	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
master
jianjun 3 years ago
parent
commit
0c610581fa
  1. 34
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.21__policy_dict.sql
  2. 16
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java
  3. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
  4. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/page/PageData.java
  5. 26
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  6. 11
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java
  7. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/HouseInfoCache.java
  8. 3
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java
  9. 77
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ResisByPolicyRulesFormDTO.java
  10. 46
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/ResiByPolicyInfoResultDTO.java
  11. 25
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/OrgStatisticsFormDTO.java
  12. 24
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/MemberProjectInfoResultDTO.java
  13. 17
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/OrgCountDTO.java
  14. 25
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/OrgProjectDetailResultDTO.java
  15. 12
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/feign/DataAggregatorOpenFeignClient.java
  16. 8
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/feign/impl/DataAggregatorOpenFeignClientFallback.java
  17. 5
      epmet-module/data-aggregator/data-aggregator-server/pom.xml
  18. 128
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
  19. 89
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/IcUserController.java
  20. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
  21. 39
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/IcResiUserDao.java
  22. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffRoleDao.java
  23. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java
  24. 24
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcHouseDao.java
  25. 13
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcNeighborhoodDao.java
  26. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java
  27. 40
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/MemberProjectInfoExcel.java
  28. 47
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/OrgProjectDetailExcel.java
  29. 21
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/ResisByPolicyExcel.java
  30. 50
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/ResiService.java
  31. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
  32. 157
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  33. 31
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
  34. 55
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  35. 31
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  36. 242
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  37. 36
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/GovProjectService.java
  38. 56
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
  39. 288
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java
  40. 51
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  41. 82
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml
  42. 42
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffRoleDao.xml
  43. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerAgencyDao.xml
  44. 35
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcHouseDao.xml
  45. 15
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcNeighborhoodDao.xml
  46. 82
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
  47. 116
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/HeartAttachmentDTO.java
  48. 74
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyCategoryDTO.java
  49. 77
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyDTO.java
  50. 82
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyRuleDTO.java
  51. 119
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyRuleDetailDTO.java
  52. 103
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceFeedbackV2DTO.java
  53. 115
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceRecordV2DTO.java
  54. 84
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceScopeV2DTO.java
  55. 96
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceFeedbackV2AddFormDTO.java
  56. 95
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceRecordV2AddEditFormDTO.java
  57. 24
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2DetailFormDTO.java
  58. 61
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2ListFormDTO.java
  59. 101
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java
  60. 38
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java
  61. 94
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyRuleDetailDTO.java
  62. 45
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyRuleFormDTO.java
  63. 73
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResisByPolicyRulesFormDTO.java
  64. 71
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceRecordV2DetailResultDTO.java
  65. 66
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceRecordV2ListResultDTO.java
  66. 79
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/policy/IcPolicyItemResultDTO.java
  67. 27
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiByPolicyInfoResultDTO.java
  68. 8
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
  69. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
  70. 5
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  71. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java
  72. 70
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/HeartAttachmentController.java
  73. 183
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPolicyController.java
  74. 74
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceFeedbackV2Controller.java
  75. 112
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceRecordV2Controller.java
  76. 70
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceScopeV2Controller.java
  77. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/HeartAttachmentDao.java
  78. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java
  79. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyCategoryDao.java
  80. 34
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyDao.java
  81. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyRuleDao.java
  82. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyRuleDetailDao.java
  83. 20
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackV2Dao.java
  84. 28
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordV2Dao.java
  85. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java
  86. 16
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeV2Dao.java
  87. 82
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/HeartAttachmentEntity.java
  88. 44
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPolicyCategoryEntity.java
  89. 64
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPolicyEntity.java
  90. 110
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPolicyRuleDetailEntity.java
  91. 44
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPolicyRuleEntity.java
  92. 66
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackV2Entity.java
  93. 84
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordV2Entity.java
  94. 54
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeV2Entity.java
  95. 33
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java
  96. 78
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/HeartAttachmentService.java
  97. 78
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyCategoryService.java
  98. 78
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyRuleDetailService.java
  99. 78
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyRuleService.java
  100. 67
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyService.java

34
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.21__policy_dict.sql

@ -0,0 +1,34 @@
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 ('1549241609500921857', 'house_purpose', '房屋用途', '', 31, 0, 0, '1', '2022-07-19 11:55:58', '1', '2022-07-19 11:55:58');
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 ('1549241262669729794', 'house_type', '房屋类型', '楼房、平房、别墅', 30, 0, 0, '1', '2022-07-19 11:54:35', '1', '2022-07-19 11:54:35');
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 ('1548958559042969601', 'policy_level', '政策级别', '政策级别;与服务项目的政策级别一致', 29, 0, 0, '1', '2022-07-18 17:11:13', '1', '2022-07-19 11:10:42');
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 ('1548956290117443586', 'sql_query_type', 'sql查询条件', '目前应用于政策找人规则查询条件', 28, 0, 0, '1', '2022-07-18 17:02:12', '1', '2022-07-19 11:10:36');
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 ('1548956434175008770', 1548956290117443586, '等于', '=', '0', '等于', 1, 0, 0, '1', '2022-07-18 17:02:47', '1', '2022-07-18 17:02:47');
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 ('1548956518434381826', 1548956290117443586, '不等于', '!=', '0', '不等于', 2, 0, 0, '1', '2022-07-18 17:03:07', '1', '2022-07-18 17:03:07');
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 ('1548956603855577089', 1548956290117443586, '大于', '>', '0', '大于', 3, 0, 0, '1', '2022-07-18 17:03:27', '1', '2022-07-18 17:03: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 ('1548956681525698561', 1548956290117443586, '大于等于', '>=', '0', '大于等于', 4, 0, 0, '1', '2022-07-18 17:03:46', '1', '2022-07-18 17:03:46');
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 ('1548956755412557826', 1548956290117443586, '小于', '<', '0', '小于', 5, 0, 0, '1', '2022-07-18 17:04:03', '1', '2022-07-18 17:04:03');
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 ('1548956830482210818', 1548956290117443586, '小于等于', '<=', '0', '<=', 6, 0, 0, '1', '2022-07-18 17:04:21', '1', '2022-07-18 17:04:21');
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 ('1548956956554600450', 1548956290117443586, '包含', 'like', '0', '包含', 7, 0, 0, '1', '2022-07-18 17:04:51', '1', '2022-07-18 17:04: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 ('1548957038305779714', 1548956290117443586, '不包含', 'not like', '0', '不包含', 8, 0, 0, '1', '2022-07-18 17:05:11', '1', '2022-07-18 17:05:11');
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 ('1548958784704913410', 1548958559042969601, '市级', '0', '0', '市级;政策级别ic_policy.POLICY_LEVEL', 1, 0, 0, '1', '2022-07-18 17:12:07', '1', '2022-07-18 17:12:07');
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 ('1548958823573528578', 1548958559042969601, '区级', '1', '0', '区级;政策级别ic_policy.POLICY_LEVEL', 2, 0, 0, '1', '2022-07-18 17:12:16', '1', '2022-07-18 17:12:16');
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 ('1548958887222091777', 1548958559042969601, '街道级', '2', '0', '街道级;政策级别ic_policy.POLICY_LEVEL', 3, 0, 0, '1', '2022-07-18 17:12:32', '1', '2022-07-18 17:12:32');
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 ('1549241348443246594', 1549241262669729794, '楼房', '1', '0', '房屋类型ic_house.houseType', 1, 0, 0, '1', '2022-07-19 11:54:56', '1', '2022-07-19 11:54:56');
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 ('1549241378726121473', 1549241262669729794, '平房', '2', '0', '房屋类型ic_house.houseType', 2, 0, 0, '1', '2022-07-19 11:55:03', '1', '2022-07-19 11:55:03');
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 ('1549241467490177025', 1549241262669729794, '别墅', '3', '0', '房屋类型ic_house.houseType', 3, 0, 0, '1', '2022-07-19 11:55:24', '1', '2022-07-19 11:55:24');
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 ('1549241664320475137', 1549241609500921857, '住宅', '1', '0', '房屋用途ic_house.purpose', 1, 0, 0, '1', '2022-07-19 11:56:11', '1', '2022-07-19 11:56:11');
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 ('1549241693034680321', 1549241609500921857, '商业', '2', '0', '房屋用途ic_house.purpose', 2, 0, 0, '1', '2022-07-19 11:56:18', '1', '2022-07-19 11:56: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 ('1549241720020832257', 1549241609500921857, '办公', '3', '0', '房屋用途ic_house.purpose', 3, 0, 0, '1', '2022-07-19 11:56:24', '1', '2022-07-19 11:56:24');
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 ('1549241750299512833', 1549241609500921857, '工业', '4', '0', '房屋用途ic_house.purpose', 4, 0, 0, '1', '2022-07-19 11:56:31', '1', '2022-07-19 11:56:31');
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 ('1549241808101216257', 1549241609500921857, '仓储', '5', '0', '房屋用途ic_house.purpose', 5, 0, 0, '1', '2022-07-19 11:56:45', '1', '2022-07-19 11:56:45');
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 ('1549241873729490946', 1549241609500921857, '商住混用', '6', '0', '房屋用途ic_house.purpose', 6, 0, 0, '1', '2022-07-19 11:57:01', '1', '2022-07-19 11:57:01');
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 ('1549241913411801089', 1549241609500921857, '其他', '7', '0', '房屋用途ic_house.purpose', 7, 0, 0, '1', '2022-07-19 11:57:10', '1', '2022-07-19 11:57:10');

16
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java

@ -174,4 +174,20 @@ public interface Constant {
String OPITON_SOURCE_REMOTE = "remote";
String OPITON_SOURCE_LOCAL = "local";
/**
* 附件状态审核中auditing
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
现在图片是同步审核的所以图片只有auto_passed一种状态
*/
String AUDITING="auditing";
String AUTO_PASSED="auto_passed";
String REVIEW="review";
String BLOCK="block";
String REJECTED="rejected";
String APPROVED="approved";
}

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

@ -27,6 +27,7 @@ public enum DictTypeEnum {
IC_EVENT_SOURCE_TYPE("ic_event_source_type","事件管理",19),
IC_SERVICE_TYPE("ic_service_type","服务类别",20),
IC_DANGER_TYPE("ic_danger_type","危化品种类",24),
POLICY_LEVEL("policy_level","政策级别",25),
;
private final String code;

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/page/PageData.java

@ -9,6 +9,7 @@
package com.epmet.commons.tools.page;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@ -20,6 +21,7 @@ import java.util.List;
* @since 1.0.0
*/
@Data
@NoArgsConstructor
public class PageData<T> implements Serializable {
private static final long serialVersionUID = 1L;

26
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java

@ -644,8 +644,18 @@ public class RedisKeys {
* @param agencyId
* @return
*/
public static String getOrgTreeCacheKey(String agencyId) {
return rootPrefix.concat("org:temp:orgtree").concat(agencyId);
public static String getOrgTreeCacheKey(String agencyId,String customerId) {
return rootPrefix.concat("org:temp:orgtree:").concat(customerId).concat(StrConstant.COLON).concat(agencyId);
}
/**
* 与getOrgTreeCacheKey一致用于模糊删除
* @param customerId
* @return
*/
public static String getOrgTreeCachePrexKey(String customerId) {
// return "epmet:org:temp:orgtree".concat(StrConstant.STAR);
return rootPrefix.concat("org:temp:orgtree:").concat(customerId).concat(StrConstant.STAR);
}
public static String getHouseInfoCacheKey(String houseId,String customerId){
@ -817,4 +827,16 @@ public class RedisKeys {
}
return rootPrefix.concat("datasync:").concat(bizType);
}
/**
* Desc: 服务组织名称
* @param customerId
* @param serviceOrgType
* @param serviceOrgId
* @author zxc
* @date 2022/7/19 14:08
*/
public static String getServiceOrgNameKey(String customerId,String serviceOrgType,String serviceOrgId){
return rootPrefix.concat("serviceOrgName:").concat(serviceOrgType).concat(":").concat(customerId).concat(":").concat(serviceOrgId);
}
}

11
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java

@ -462,4 +462,15 @@ public class RedisUtils {
public Long getTTL(String treeCacheKey) {
return redisTemplate.getExpire(treeCacheKey);
}
/**
* 根据前缀模糊删除
* @param prex
*/
public void deleteByPrex(String prex) {
Set<String> keys = redisTemplate.keys(prex);
if (!CollectionUtils.isEmpty(keys)) {
redisTemplate.delete(keys);
}
}
}

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

@ -102,6 +102,7 @@ public class HouseInfoCache implements Serializable {
* 房屋编码
*/
private String houseCode;
private String coding;
/**
* 二维码地址
*/

3
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/OrgConstant.java

@ -10,7 +10,8 @@ public interface OrgConstant {
String PROVINCE = "province";
String CITY = "city";
String DISTRICT = "district";
String STREET = "street";
String COMMUNITY = "community";
String GRID_ID="GRID_ID";
String GENDER="GENDER";
String HOUSE_TYPE_KEY="HOUSE_TYPE";

77
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ResisByPolicyRulesFormDTO.java

@ -0,0 +1,77 @@
package com.epmet.dataaggre.dto.epmetuser.form;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResisByPolicyRulesFormDTO {
private String ruleId;
private String orgId;
private String orgType;
private String neighborHoodId;
private String buildingId;
private String unitId;
private String houseId;
private String name;
private String mobile;
private String idCard;
private RuleList ruleList = new RuleList();
private Integer pageNo = 1;
private Integer pageSize = 20;
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class RuleList {
private String ruleName;
private List<ResiRule> resiRuleList;
private List<HouseRule> houseRuleList;
private List<StatRule> statRuleList;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class ResiRule {
private String ruleDesc;
private String nextLogicalRel;
private String itemGroupId;
private String itemId;
private String queryType;
private String colTable;
private String colKey;
private String colVal;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class HouseRule {
private String colTable;
private String colKey;
private String colVal;
private String ruleDesc;
private String nextLogicalRel;
private String queryType;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class StatRule {
private String colKey;
private String colVal;
private String nextLogicalRel;
private String ruleDesc;
private String queryType;
private String colTable;
}
}

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

@ -0,0 +1,46 @@
package com.epmet.dataaggre.dto.epmetuser.result;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResiByPolicyInfoResultDTO {
@ExcelIgnore
private String icResiUserId;
@ExcelProperty(value = "姓名")
@ColumnWidth(10)
private String name;
@ExcelProperty("手机号")
@ColumnWidth(20)
private String mobile;
@ExcelProperty("身份证号")
@ColumnWidth(30)
private String idCard;
/**
* 小区全名包含小区前面的属性比如网格等
*/
@ExcelIgnore
private String gridId;
@ExcelIgnore
private String neighborhoodId;
@ExcelProperty("小区名称")
@ColumnWidth(30)
private String neighborHoodName;
@ExcelProperty("年龄")
@ColumnWidth(10)
private Integer age;
@ExcelIgnore
private String birthday;
}

25
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/OrgStatisticsFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dataaggre.dto.govorg.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/7/27 9:27
*/
@Data
public class OrgStatisticsFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -1043502365053945317L;
private String customerId;
private String agencyId;
private String orgId;
private String orgType;
private String type;
private String startDate;
private String endDate;
private List<String> agencyList;
}

24
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/MemberProjectInfoResultDTO.java

@ -0,0 +1,24 @@
package com.epmet.dataaggre.dto.govorg.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/7/27 9:33
*/
@NoArgsConstructor
@Data
public class MemberProjectInfoResultDTO implements Serializable {
private static final long serialVersionUID = -4880909768378661921L;
private String staffId;
private String staffName;
private String orgId;
private String orgName;
private Integer projectCount = 0;
private Integer closedCount = 0;
}

17
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/OrgCountDTO.java

@ -0,0 +1,17 @@
package com.epmet.dataaggre.dto.govorg.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/7/27 14:56
*/
@Data
public class OrgCountDTO implements Serializable {
private static final long serialVersionUID = -1875812403619088015L;
private String orgId;
private Integer count;
}

25
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/OrgProjectDetailResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.dataaggre.dto.govorg.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/7/27 9:32
*/
@NoArgsConstructor
@Data
public class OrgProjectDetailResultDTO implements Serializable {
private static final long serialVersionUID = 6333117500929136144L;
private String orgId;
private String orgType;
private String orgName;
private Integer memberCount = 0;
private Integer projectCount = 0;
private Integer closedCount = 0;
private Integer projectAve = 0;
private Integer closedAve = 0;
}

12
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/feign/DataAggregatorOpenFeignClient.java

@ -2,13 +2,18 @@ package com.epmet.dataaggre.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.feign.impl.DataAggregatorOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallbackFactory = DataAggregatorOpenFeignClientFallbackFactory.class)
// @FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallbackFactory= DataAggregatorOpenFeignClientFallbackFactory.class,url = "localhost:8114")
public interface DataAggregatorOpenFeignClient {
@ -21,4 +26,11 @@ public interface DataAggregatorOpenFeignClient {
@PostMapping(value = "data/aggregator/org/export-send-msg")
Result exportGridLiveRes(@RequestBody GridLivelyFormDTO form);
/**
* 政策人员预览
* @param input
* @return
*/
@PostMapping("data/aggregator/icuser/listByPolicyRules")
Result<PageData<ResiByPolicyInfoResultDTO>> listByPolicyRules(@RequestBody ResisByPolicyRulesFormDTO input);
}

8
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/feign/impl/DataAggregatorOpenFeignClientFallback.java

@ -1,8 +1,11 @@
package com.epmet.dataaggre.feign.impl;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.feign.DataAggregatorOpenFeignClient;
@ -16,4 +19,9 @@ public class DataAggregatorOpenFeignClientFallback implements DataAggregatorOpen
public Result exportGridLiveRes(GridLivelyFormDTO form) {
return ModuleUtils.feignConError(ServiceConstant.DATA_AGGREGATOR_SERVER, "pcworkRecordListExportSendMsg",form);
}
@Override
public Result<PageData<ResiByPolicyInfoResultDTO>> listByPolicyRules(ResisByPolicyRulesFormDTO input) {
return ModuleUtils.feignConError(ServiceConstant.DATA_AGGREGATOR_SERVER, "listByPolicyRules", input);
}
}

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

@ -13,6 +13,11 @@
<artifactId>data-aggregator-server</artifactId>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart-client</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-tools</artifactId>

128
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java

@ -3,6 +3,7 @@ package com.epmet.dataaggre.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
@ -18,7 +19,9 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.beans.GridMemberDataAnalysisExcelExportBean;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
@ -27,6 +30,8 @@ import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.form.*;
import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.enums.GridMemberDataAnalysisEnums;
import com.epmet.dataaggre.excel.MemberProjectInfoExcel;
import com.epmet.dataaggre.excel.OrgProjectDetailExcel;
import com.epmet.dataaggre.service.AggreGridService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import lombok.extern.slf4j.Slf4j;
@ -39,11 +44,13 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
/**
@ -439,4 +446,125 @@ public class GovOrgController {
}
return new Result<BuildingInfoCache>().ok(govOrgService.queryBuildingInfo(buildingId));
}
/**
* 组织项目统计
* @Param tokenDto
* @Param formDTO
* @Return {@link Result< PageData< OrgProjectDetailResultDTO>>}
* @Author zhaoqifeng
* @Date 2022/7/28 10:34
*/
@PostMapping("orgProjectDetailList")
public Result<PageData<OrgProjectDetailResultDTO>> orgProjectDetailList(@LoginUser TokenDto tokenDto, @RequestBody OrgStatisticsFormDTO formDTO) {
return new Result<PageData<OrgProjectDetailResultDTO>>().ok(govOrgService.orgProjectDetailList(tokenDto, formDTO));
}
/**
* 网格员项目统计
* @Param tokenDto
* @Param formDTO
* @Return {@link Result< PageData< MemberProjectInfoResultDTO>>}
* @Author zhaoqifeng
* @Date 2022/7/28 10:34
*/
@PostMapping("memberProjectInfoList")
public Result<PageData<MemberProjectInfoResultDTO>> memberProjectInfoList(@LoginUser TokenDto tokenDto, @RequestBody OrgStatisticsFormDTO formDTO) {
return new Result<PageData<MemberProjectInfoResultDTO>>().ok(govOrgService.memberProjectInfoList(tokenDto, formDTO));
}
@NoRepeatSubmit
@PostMapping("orgProjectDetailList/export")
public void orgProjectExport(@LoginUser TokenDto tokenDto, @RequestBody OrgStatisticsFormDTO formDTO, HttpServletResponse response) throws Exception {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setIsPage(false);
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
ExcelWriter excelWriter = null;
AtomicInteger i = new AtomicInteger(1);
try {
String fileName = "组织事件统计.xlsx";
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), OrgProjectDetailExcel.class).build();
PageData<OrgProjectDetailResultDTO> page = null;
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
OrgProjectDetailExcel sum = new OrgProjectDetailExcel();
do {
page = govOrgService.orgProjectDetailList(tokenDto, formDTO);
List<OrgProjectDetailExcel> list = ConvertUtils.sourceToTarget(page.getList(), OrgProjectDetailExcel.class);
list.forEach(item -> {
item.setIndex(i.getAndIncrement());
});
sum.setMemberCount(sum.getMemberCount() + list.stream().mapToInt(OrgProjectDetailExcel::getMemberCount).sum());
sum.setProjectCount(sum.getProjectCount() + list.stream().mapToInt(OrgProjectDetailExcel::getProjectCount).sum());
sum.setClosedCount(sum.getClosedCount() + list.stream().mapToInt(OrgProjectDetailExcel::getClosedCount).sum());
excelWriter.write(list, writeSheet);
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE);
} while (org.apache.commons.collections4.CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == formDTO.getPageSize());
sum.setIndex(i.getAndIncrement());
sum.setOrgName("合计");
if (NumConstant.ZERO != sum.getMemberCount()) {
sum.setProjectAve(sum.getProjectCount()/sum.getMemberCount());
sum.setClosedAve(sum.getClosedCount()/sum.getMemberCount());
}
List<OrgProjectDetailExcel> list = new ArrayList<>();
list.add(sum);
excelWriter.write(list, writeSheet);
} catch (EpmetException e) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setHeader("content-type", "application/json; charset=UTF-8");
PrintWriter printWriter = response.getWriter();
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg());
printWriter.write(JSON.toJSONString(result));
printWriter.close();
} catch (Exception e) {
log.error("export exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
@NoRepeatSubmit
@PostMapping("memberProjectInfoList/export")
public void memberProjectExport(@LoginUser TokenDto tokenDto, @RequestBody OrgStatisticsFormDTO formDTO, HttpServletResponse response) throws Exception {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setIsPage(false);
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
ExcelWriter excelWriter = null;
AtomicInteger i = new AtomicInteger(1);
try {
String fileName = "网格员事件统计.xlsx";
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), MemberProjectInfoExcel.class).build();
PageData<MemberProjectInfoResultDTO> page = null;
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
do {
page = govOrgService.memberProjectInfoList(tokenDto, formDTO);
List<MemberProjectInfoExcel> list = ConvertUtils.sourceToTarget(page.getList(), MemberProjectInfoExcel.class);
list.forEach(item -> {
item.setIndex(i.getAndIncrement());
});
excelWriter.write(list, writeSheet);
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE);
} while (org.apache.commons.collections4.CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == formDTO.getPageSize());
} catch (EpmetException e) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setHeader("content-type", "application/json; charset=UTF-8");
PrintWriter printWriter = response.getWriter();
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg());
printWriter.write(JSON.toJSONString(result));
printWriter.close();
} catch (Exception e) {
log.error("export exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
}

89
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/IcUserController.java

@ -2,27 +2,49 @@ package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.feign.ResultDataResolver;
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.dataaggre.dto.epmetuser.form.IcUserCategoryFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.IcUserCategoryResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO;
import com.epmet.dataaggre.service.ResiService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.feign.EpmetHeartOpenFeignClient;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
@RestController
@RequestMapping("icuser")
public class IcUserController {
public class IcUserController implements ResultDataResolver {
@Autowired
private EpmetUserService epmetUserService;
@Autowired
private ResiService icResiService;
@Autowired
private EpmetHeartOpenFeignClient heartOpenFeignClient;
/**
* 人员类别分析-各类别人数
@ -38,5 +60,70 @@ public class IcUserController {
return new Result<List<IcUserCategoryResultDTO>>().ok(epmetUserService.queryIcUserCategoryData(formDTO));
}
/**
* 政策人员预览
* @param input
* @return
*/
@PostMapping("listByPolicyRules")
public Result<PageData<ResiByPolicyInfoResultDTO>> listByPolicyRules(@RequestBody ResisByPolicyRulesFormDTO input) {
List<ResisByPolicyRulesFormDTO.ResiRule> resiRule = input.getRuleList().getResiRuleList();
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule = input.getRuleList().getHouseRuleList();
List<ResisByPolicyRulesFormDTO.StatRule> statRule = input.getRuleList().getStatRuleList();
Integer pageNo = input.getPageNo();
Integer pageSize = input.getPageSize();
String orgId = input.getOrgId();
String orgType = input.getOrgType();
String neighborHoodId = input.getNeighborHoodId();
String buildingId = input.getBuildingId();
String unitId = input.getUnitId();
String houseId = input.getHouseId();
String idCard = input.getIdCard();
String name = input.getName();
String ruleId = input.getRuleId();
if (StringUtils.isNotBlank(ruleId)) {
// 从heart取,覆盖形参
com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO.RuleList ruleList = getResultDataOrThrowsException(
heartOpenFeignClient.listPolicyRules4QueryAndExport(ruleId),
ServiceConstant.EPMET_HEART_SERVER,
EpmetErrorCode.SERVER_ERROR.getCode(),
null, null);
resiRule = ConvertUtils.sourceToTarget(ruleList.getResiRuleList(), ResisByPolicyRulesFormDTO.ResiRule.class);
houseRule = ConvertUtils.sourceToTarget(ruleList.getHouseRuleList(), ResisByPolicyRulesFormDTO.HouseRule.class);
statRule = ConvertUtils.sourceToTarget(ruleList.getStatRuleList(), ResisByPolicyRulesFormDTO.StatRule.class);
}
// 全都为空,则返回空ç
if (CollectionUtils.isEmpty(resiRule)
&& CollectionUtils.isEmpty(houseRule)
&& CollectionUtils.isEmpty(statRule)) {
return new Result().ok(new PageData<>(new ArrayList<>(), 0));
}
PageData<ResiByPolicyInfoResultDTO> page = icResiService.listByPolicyRules(orgId, orgType, neighborHoodId, buildingId, unitId,
houseId, idCard, name, pageNo, pageSize, resiRule, houseRule, statRule);
return new Result<PageData<ResiByPolicyInfoResultDTO>>().ok(page);
}
/**
* 导出政策查找到的居民
* @param input
*/
@PostMapping("exportByPolicyRules")
public void exportResisByPolicy(@RequestBody ResisByPolicyRulesFormDTO input, HttpServletResponse response) {
try {
icResiService.exportResisByPolicy(
input.getOrgId(), input.getOrgType(), input.getNeighborHoodId(), input.getBuildingId(), input.getUnitId(),
input.getHouseId(), input.getIdCard(), input.getName(), input.getRuleId(), input.getRuleList().getResiRuleList(),
input.getRuleList().getHouseRuleList(), input.getRuleList().getStatRuleList(), response);
} catch (IOException e) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "导出Excel文件失败", "导出Excel文件失败");
}
}
}

9
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java

@ -26,7 +26,10 @@ import com.epmet.dataaggre.dto.epmetuser.FactIcuserCategoryAnalysisDailyDTO;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberPatrolListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStatisticsFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govorg.result.MemberProjectInfoResultDTO;
import com.epmet.dataaggre.dto.govorg.result.OrgCountDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
@ -373,4 +376,10 @@ public interface DataStatsDao {
*/
List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO);
List<SubAgencyProjectResultDTO> getAgencyProjectTotal(OrgStatisticsFormDTO formDTO);
List<OrgCountDTO> getMemberCount(@Param("agencyId")String agencyId, @Param("dateId") String dateId);
List<MemberProjectInfoResultDTO> getMemberList(@Param("gridId") String gridId, @Param("dateId") String dateId);
}

39
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/IcResiUserDao.java

@ -18,7 +18,9 @@
package com.epmet.dataaggre.dao.epmetuser;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.IcResiInfoResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectAnalysisResultDTO;
import com.epmet.dataaggre.entity.epmetuser.IcResiUserEntity;
import com.epmet.dto.IcResiUserDTO;
@ -26,6 +28,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 用户基础信息
@ -59,4 +62,40 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
@Param("queryPids") String queryPids,
@Param("categoryKey") String categoryKey,
@Param("search") String search);
/**
* 政策查找居民
* @param houseIds
* @return
*/
List<ResiByPolicyInfoResultDTO> listByPolicyRules(@Param("customerId") String customerId,
@Param("orgIdPath") String orgIdPath,
@Param("orgId") String orgId,
@Param("orgType") String orgType,
@Param("neighborHoodId") String neighborHoodId,
@Param("buildingId") String buildingId,
@Param("unitId") String unitId,
@Param("houseId") String houseId,
@Param("idCard") String idCard,
@Param("name") String name,
@Param("resiRules") List<ResisByPolicyRulesFormDTO.ResiRule> resiRule,
@Param("houseIds") List<String> houseIds);
/**
* 政策查找居民
* @param houseIds
* @return
*/
Integer getTotalByPolicyRules(@Param("customerId") String customerId,
@Param("orgIdPath") String orgIdPath,
@Param("orgId") String orgId,
@Param("orgType") String orgType,
@Param("neighborHoodId") String neighborHoodId,
@Param("buildingId") String buildingId,
@Param("unitId") String unitId,
@Param("houseId") String houseId,
@Param("idCard") String idCard,
@Param("name") String name,
@Param("resiRules") List<ResisByPolicyRulesFormDTO.ResiRule> resiRule,
@Param("houseIds") List<String> houseIds);
}

4
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/StaffRoleDao.java

@ -21,6 +21,8 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.epmetuser.result.RoleListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffRoleListResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
import com.epmet.dataaggre.dto.govorg.result.MemberProjectInfoResultDTO;
import com.epmet.dataaggre.dto.govorg.result.OrgCountDTO;
import com.epmet.dataaggre.entity.epmetuser.StaffRoleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -74,4 +76,6 @@ public interface StaffRoleDao extends BaseDao<StaffRoleEntity> {
*/
List<StaffRoleEntity> selectStaffByRole(@Param("customerId") String customerId, @Param("roleId") String roleId, @Param("userId") String userId);
List<OrgCountDTO> getMemberCount(@Param("customerId") String customerId);
List<MemberProjectInfoResultDTO> getMemberList(@Param("customerId") String customerId, @Param("orgIds") List<String> orgIds);
}

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java

@ -106,4 +106,6 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
*/
LinkedList<GridLivelyResultDTO> subAgencyListAndGridSumNum(@Param("agencyId") String agencyId);
List<String> getSubAgencyList(@Param("agencyId") String agencyId);
}

24
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcHouseDao.java

@ -1,8 +1,12 @@
package com.epmet.dataaggre.dao.govorg;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.entity.govorg.IcHouseEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 房屋信息
@ -12,4 +16,24 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcHouseDao extends BaseDao<IcHouseEntity> {
/**
* 为政策-预览居民提供房屋id列表查询
* @param orgIdPath
* @param customerId
* @param neighborHoodId
* @param buildingId
* @param unitId
* @param houseId
* @param houseRule
* @param statRule
* @return
*/
List<String> listHouseIds4PolicyResis(@Param("orgIdPath") String orgIdPath,
@Param("customerId") String customerId,
@Param("neighborHoodId") String neighborHoodId,
@Param("buildingId") String buildingId,
@Param("unitId") String unitId,
@Param("houseId") String houseId,
@Param("houseRule") List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
@Param("statRule") List<ResisByPolicyRulesFormDTO.StatRule> statRule);
}

13
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcNeighborhoodDao.java

@ -0,0 +1,13 @@
package com.epmet.dataaggre.dao.govorg;
import com.epmet.commons.tools.redis.common.bean.BuildingInfoCache;
import com.epmet.dto.IcNeighborHoodDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface IcNeighborhoodDao {
List<IcNeighborHoodDTO> neighborhoodsByIds(@Param("neighborhoodIds") List<String> neighborhoodIds);
}

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

@ -19,6 +19,8 @@ package com.epmet.dataaggre.dao.govproject;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStatisticsFormDTO;
import com.epmet.dataaggre.dto.govorg.result.OrgCountDTO;
import com.epmet.dataaggre.dto.govproject.ProjectDTO;
import com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO;
import com.epmet.dataaggre.dto.govproject.ResiEventDTO;
@ -123,4 +125,9 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
*/
List<ResiEventReportOrgDTO> getEventOrgList(@Param("eventIds") List<String> eventIds);
List<ProjectCategoryTotalResultDTO> getCategoryCount(ProjectCategoryTotalFormDTO formDTO);
List<OrgCountDTO> getGridProjectCount(OrgStatisticsFormDTO formDTO);
List<OrgCountDTO> getGridClosedProjectCount(OrgStatisticsFormDTO formDTO);
List<OrgCountDTO> getMemberProjectCount(OrgStatisticsFormDTO formDTO);
List<OrgCountDTO> getMemberClosedProjectCount(OrgStatisticsFormDTO formDTO);
}

40
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/MemberProjectInfoExcel.java

@ -0,0 +1,40 @@
package com.epmet.dataaggre.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import lombok.Data;
/**
* 数字平台党员信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-17
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class MemberProjectInfoExcel {
@ColumnWidth(10)
@ExcelProperty(value = "序号",order = 1)
private Integer index;
@ColumnWidth(30)
@ExcelProperty(value = "网格员",order = 2)
private String staffName;
@ColumnWidth(40)
@ExcelProperty(value = "所属组织",order = 3)
private String orgName;
@ColumnWidth(20)
@ExcelProperty(value = "上报数量",order = 4)
private Integer projectCount = 0;
@ColumnWidth(20)
@ExcelProperty(value = "办结数",order = 5)
private Integer closedCount = 0;
}

47
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/OrgProjectDetailExcel.java

@ -0,0 +1,47 @@
package com.epmet.dataaggre.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import lombok.Data;
/**
* 数字平台党员信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-17
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class OrgProjectDetailExcel {
@ColumnWidth(10)
@ExcelProperty(value = "序号",order = 1)
private Integer index;
@ColumnWidth(40)
@ExcelProperty(value = "所属组织",order = 2)
private String orgName;
@ColumnWidth(20)
@ExcelProperty(value = "网格员数",order = 3)
private Integer memberCount = 0;
@ColumnWidth(20)
@ExcelProperty(value = "上报数量",order = 4)
private Integer projectCount = 0;
@ColumnWidth(20)
@ExcelProperty(value = "办结数",order = 5)
private Integer closedCount = 0;
@ColumnWidth(20)
@ExcelProperty(value = "人均上报",order = 6)
private Integer projectAve = 0;
@ColumnWidth(20)
@ExcelProperty(value = "人均办结",order = 7)
private Integer closedAve = 0;
}

21
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/excel/ResisByPolicyExcel.java

@ -0,0 +1,21 @@
package com.epmet.dataaggre.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
@Data
public class ResisByPolicyExcel {
@ExcelProperty("姓名")
private String name;
@ExcelProperty("手机号")
private String mobile;
@ExcelProperty("身份证号")
private String idCard;
/**
* 小区全名包含小区前面的属性比如网格等
*/
@ExcelProperty("小区名")
private String neighborHoodName;
@ExcelProperty("年龄")
private Integer age;
}

50
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/ResiService.java

@ -0,0 +1,50 @@
package com.epmet.dataaggre.service;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO;
import com.github.pagehelper.PageInfo;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Set;
/**
* 居民的service
*/
public interface ResiService {
/**
* 政策人员预览
* @param pageNo
* @param pageSize
* @param resiRule
* @param houseRule
*/
PageData<ResiByPolicyInfoResultDTO> listByPolicyRules(
String orgId, String orgType, String neighborHoodId, String buildingId, String unitId,
String houseId, String idCard, String name, Integer pageNo, Integer pageSize,
List<ResisByPolicyRulesFormDTO.ResiRule> resiRule,
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
List<ResisByPolicyRulesFormDTO.StatRule> statRule);
/**
* 政策找居民导出
* @param orgId
* @param orgType
* @param neighborHoodId
* @param buildingId
* @param unitId
* @param houseId
* @param idCard
* @param name
* @param ruleId
*/
void exportResisByPolicy(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId,
String houseId, String idCard, String name,
String ruleId, List<ResisByPolicyRulesFormDTO.ResiRule> resiRule,
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
List<ResisByPolicyRulesFormDTO.StatRule> statRule,
HttpServletResponse response) throws IOException;
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java

@ -1,5 +1,6 @@
package com.epmet.dataaggre.service.datastats;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
@ -7,8 +8,10 @@ import com.epmet.dataaggre.dto.epmetuser.FactIcuserCategoryAnalysisDailyDTO;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberPatrolListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStatisticsFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.govorg.result.MemberProjectInfoResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
@ -16,6 +19,7 @@ import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* @Author sun
@ -296,4 +300,10 @@ public interface DataStatsService {
* @author sun
*/
List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO);
Map<String, SubAgencyProjectResultDTO> getAgencyProjectTotal(OrgStatisticsFormDTO formDTO);
Map<String, Integer> getMemberMap(String agencyId);
PageData<MemberProjectInfoResultDTO> getMemberList(OrgStatisticsFormDTO formDTO);
}

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

@ -1,63 +1,69 @@
package com.epmet.dataaggre.service.datastats.impl;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.enums.OrgLevelEnum;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.poi.excel.ExportMultiView;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.datastats.DataStatsDao;
import com.epmet.dataaggre.dao.datastats.FactGridMemberStatisticsDailyDao;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.dto.epmetuser.FactIcuserCategoryAnalysisDailyDTO;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberPatrolListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDailySumResult;
import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import com.epmet.dataaggre.excel.CustomerDataManageExcel;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.StatsStaffPatrolRecordDailyService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.enums.OrgLevelEnum;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.poi.excel.ExportMultiView;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.datastats.DataStatsDao;
import com.epmet.dataaggre.dao.datastats.FactGridMemberStatisticsDailyDao;
import com.epmet.dataaggre.dto.datastats.FactGroupActDailyDTO;
import com.epmet.dataaggre.dto.datastats.form.*;
import com.epmet.dataaggre.dto.datastats.result.*;
import com.epmet.dataaggre.dto.epmetuser.FactIcuserCategoryAnalysisDailyDTO;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberPatrolListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.PatrolDailySumResult;
import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStatisticsFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO;
import com.epmet.dataaggre.dto.govorg.result.MemberProjectInfoResultDTO;
import com.epmet.dataaggre.dto.govorg.result.OrgCountDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO;
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO;
import com.epmet.dataaggre.dto.resigroup.result.GroupActRankDetailDTO;
import com.epmet.dataaggre.entity.datastats.DimAgencyEntity;
import com.epmet.dataaggre.entity.datastats.FactAgencyGovernDailyEntity;
import com.epmet.dataaggre.excel.CustomerDataManageExcel;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.StatsStaffPatrolRecordDailyService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
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.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* @Author sun
@ -2267,4 +2273,41 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
public List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO) {
return dataStatsDao.getGridProejctToProjectMain(formDTO);
}
@Override
public Map<String, SubAgencyProjectResultDTO> getAgencyProjectTotal(OrgStatisticsFormDTO formDTO) {
List<SubAgencyProjectResultDTO> list = dataStatsDao.getAgencyProjectTotal(formDTO);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return list.stream().collect(Collectors.toMap(SubAgencyProjectResultDTO::getAgencyId, Function.identity()));
}
/**
* 组织下网格的网格员数量统计
* @Param agencyId
* @Return {@link Map< String, Integer>}
* @Author zhaoqifeng
* @Date 2022/7/27 16:11
*/
@Override
public Map<String, Integer> getMemberMap(String agencyId) {
//当前日期前一天
String dateId = DateUtils.format(DateUtils.addDateDays(new Date(), NumConstant.ONE_NEG), DateUtils.DATE_PATTERN_YYYYMMDD);
List<OrgCountDTO> list = dataStatsDao.getMemberCount(agencyId, dateId);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return list.stream().collect(Collectors.toMap(OrgCountDTO::getOrgId, OrgCountDTO::getCount, (o1, o2) -> o1));
}
@Override
public PageData<MemberProjectInfoResultDTO> getMemberList(OrgStatisticsFormDTO formDTO) {
//当前日期前一天
String dateId = DateUtils.format(DateUtils.addDateDays(new Date(), NumConstant.ONE_NEG), DateUtils.DATE_PATTERN_YYYYMMDD);
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<MemberProjectInfoResultDTO> list = dataStatsDao.getMemberList(formDTO.getOrgId(), dateId);
PageInfo<MemberProjectInfoResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
}

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

@ -1,18 +1,22 @@
package com.epmet.dataaggre.service.epmetuser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dataaggre.dto.epmetuser.form.*;
import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStatisticsFormDTO;
import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
import com.epmet.dataaggre.dto.govorg.result.MemberProjectInfoResultDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectAnalysisResultDTO;
import com.epmet.dataaggre.entity.epmetuser.CustomerStaffEntity;
import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.UserBaseInfoDTO;
import java.util.List;
import java.util.Map;
/**
* @Author zxc
@ -199,4 +203,31 @@ public interface EpmetUserService {
* @return
*/
List<StaffSelectResDTO> staffSelectList(List<String> staffIds);
List<ResiByPolicyInfoResultDTO> listByPolicyRules(String customerId, String orgIdPath, String orgId, String orgType, String neighborHoodId, String buildingId, String unitId,
String houseId, String idCard, String name, Integer pageNo, Integer pageSize,
List<ResisByPolicyRulesFormDTO.ResiRule> resiRule, List<String> houseIds);
Integer getTotalByPolicyRules(String customerId, String orgIdPath, String orgId, String orgType, String neighborHoodId, String buildingId, String unitId,
String houseId, String idCard, String name,
List<ResisByPolicyRulesFormDTO.ResiRule> resiRule, List<String> houseIds);
/**
* 统计各组织下网格员数量
*
* @Param customerId
* @Return {@link Map< String, Integer>}
* @Author zhaoqifeng
* @Date 2022/7/27 14:58
*/
Map<String, Integer> getMemberCount(String customerId);
/**
* 获取组织下网格员列表
*
* @Param agencyId
* @Return {@link PageData< MemberProjectInfoResultDTO>}
* @Author zhaoqifeng
* @Date 2022/7/27 17:32
*/
PageData<MemberProjectInfoResultDTO> getMemberList(OrgStatisticsFormDTO formDTO);
}

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

@ -7,6 +7,7 @@ import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.IdAndNameDTO;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
@ -25,11 +26,9 @@ import com.epmet.dataaggre.dto.govorg.CustomerDepartmentDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStatisticsFormDTO;
import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO;
import com.epmet.dataaggre.dto.govorg.result.StaffOrgNameResultDTO;
import com.epmet.dataaggre.dto.govorg.result.StaffOrgRelationResultDTO;
import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.dto.govproject.result.ProjectAnalysisResultDTO;
import com.epmet.dataaggre.entity.epmetuser.CustomerStaffEntity;
import com.epmet.dataaggre.entity.epmetuser.GovStaffRoleEntity;
@ -45,6 +44,8 @@ import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService;
import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.UserBaseInfoDTO;
import com.epmet.dto.result.StaffRoleResultDTO;
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;
@ -844,5 +845,51 @@ public class EpmetUserServiceImpl implements EpmetUserService {
return customerStaffDao.staffSelectList(staffIds);
}
@Override
public List<ResiByPolicyInfoResultDTO> listByPolicyRules(String customerId, String orgIdPath, String orgId, String orgType, String neighborHoodId, String buildingId, String unitId,
String houseId, String idCard, String name, Integer pageNo, Integer pageSize,
List<ResisByPolicyRulesFormDTO.ResiRule> resiRule, List<String> houseIds) {
PageHelper.startPage(pageNo, pageSize);
return icResiUserDao.listByPolicyRules(customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, houseId, idCard, name, resiRule, houseIds);
}
@Override
public Integer getTotalByPolicyRules(String customerId, String orgIdPath, String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, String houseId, String idCard, String name, List<ResisByPolicyRulesFormDTO.ResiRule> resiRule, List<String> houseIds) {
return icResiUserDao.getTotalByPolicyRules(customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId, houseId, idCard, name, resiRule, houseIds);
}
/**
* 统计各组织下网格员数量
*
* @param customerId
* @Param customerId
* @Return {@link Map< String, Integer>}
* @Author zhaoqifeng
* @Date 2022/7/27 14:58
*/
@Override
public Map<String, Integer> getMemberCount(String customerId) {
List<OrgCountDTO> list = staffRoleDao.getMemberCount(customerId);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return list.stream().collect(Collectors.toMap(OrgCountDTO::getOrgId, OrgCountDTO::getCount, (o1, o2) -> o1));
}
/**
* 获取组织下网格员列表
*
* @param formDTO
* @Param agencyId
* @Return {@link PageData < MemberProjectInfoResultDTO>}
* @Author zhaoqifeng
* @Date 2022/7/27 17:32
*/
@Override
public PageData<MemberProjectInfoResultDTO> getMemberList(OrgStatisticsFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<MemberProjectInfoResultDTO> list = staffRoleDao.getMemberList(formDTO.getCustomerId(), formDTO.getAgencyList());
PageInfo<MemberProjectInfoResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
}

31
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java

@ -1,7 +1,9 @@
package com.epmet.dataaggre.service.govorg;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.bean.BuildingInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerDepartmentDTO;
@ -10,6 +12,7 @@ import com.epmet.dataaggre.dto.govorg.form.*;
import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO;
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity;
import com.epmet.dto.IcNeighborHoodDTO;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@ -212,4 +215,32 @@ public interface GovOrgService {
* @return
*/
CustomerAgencyEntity getRootAgencyByCustomerId(String customerId);
List<String> listHouseIdsByRules(String customerId, String orgIdPath, String orgId, String orgType, String neighborHoodId, String buildingId,
String unitId, String houseId, List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
List<ResisByPolicyRulesFormDTO.StatRule> statRule, Integer pageNo, Integer pageSize);
List<IcNeighborHoodDTO> neighborhoodsByIds(List<String> neighborhoodIds);
/**
* 组织项目统计
*
* @Param tokenDto
* @Param formDTO
* @Return {@link PageData< MemberProjectInfoResultDTO>}
* @Author zhaoqifeng
* @Date 2022/7/27 9:43
*/
PageData<OrgProjectDetailResultDTO> orgProjectDetailList(TokenDto tokenDto, OrgStatisticsFormDTO formDTO);
/**
* 网格员项目相关统计
*
* @Param tokenDto
* @Param formDTO
* @Return {@link PageData< MemberProjectInfoResultDTO>}
* @Author zhaoqifeng
* @Date 2022/7/27 9:44
*/
PageData<MemberProjectInfoResultDTO> memberProjectInfoList(TokenDto tokenDto, OrgStatisticsFormDTO formDTO);
}

242
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -17,6 +17,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
@ -26,10 +27,14 @@ import com.epmet.commons.tools.redis.common.bean.BuildingInfoCache;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.constant.OrgConstant;
import com.epmet.dataaggre.dao.govorg.*;
import com.epmet.dataaggre.dto.datastats.result.SubAgencyProjectResultDTO;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ListStaffResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffRoleListResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.StaffSelectResDTO;
@ -38,6 +43,7 @@ import com.epmet.dataaggre.dto.govorg.form.*;
import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO;
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity;
import com.epmet.dataaggre.entity.govorg.CustomerGridEntity;
import com.epmet.dataaggre.excel.GridLivelyDetailExcel;
import com.epmet.dataaggre.excel.GridLivelyExcel;
import com.epmet.dataaggre.service.commonservice.AreaCodeService;
@ -45,9 +51,13 @@ import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.govproject.GovProjectService;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import com.epmet.dto.IcNeighborHoodDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.feign.OssFeignClient;
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.fileupload.FileItem;
@ -60,6 +70,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@ -107,6 +118,12 @@ public class GovOrgServiceImpl implements GovOrgService {
private RedisUtils redisUtils;
@Autowired
private ExecutorService executorService;
@Autowired
private IcHouseDao houseDao;
@Autowired
private IcNeighborhoodDao neighborhoodDao;
@Resource
private GovProjectService govProjectService;
/**
* @param staffId
@ -566,7 +583,7 @@ public class GovOrgServiceImpl implements GovOrgService {
String agencyId = staffInfo.getAgencyId();
String client = formDTO.getClient();
//组织缓存key
String treeCacheKey = RedisKeys.getOrgTreeCacheKey(agencyId).concat(StrConstant.COLON).concat(client);
String treeCacheKey = RedisKeys.getOrgTreeCacheKey(agencyId,tokenDto.getCustomerId()).concat(StrConstant.COLON).concat(client);
Long expiryTime = redisUtils.getTTL(treeCacheKey);
List<OrgTreeResultDTO> orgTreeResultDTOS = (List<OrgTreeResultDTO>) redisUtils.get(treeCacheKey);
//如果接近过期或已经过期且缓存数据不为空 则异步查询
@ -1079,4 +1096,227 @@ public class GovOrgServiceImpl implements GovOrgService {
query.eq(CustomerAgencyEntity::getPid, "0"); // 跟组织的pid为"0"
return customerAgencyDao.selectOne(query);
}
public String getOrgIdPath(String orgId, String orgType) {
if ("agency".equals(orgType)) {
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(orgId);
if (agencyInfo != null) {
String pids = agencyInfo.getPids();
String id = agencyInfo.getId();
if (StringUtils.isBlank(pids)) {
return id;
} else {
return pids.concat(":").concat(id);
}
}
} else {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(orgId);
return gridInfo.getPids().concat(":").concat(gridInfo.getId());
}
return null;
}
@Override
public List<String> listHouseIdsByRules(String customerId, String orgIdPath, String orgId, String orgType, String neighborHoodId, String buildingId,
String unitId, String houseId, List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
List<ResisByPolicyRulesFormDTO.StatRule> statRule, Integer pageNo, Integer pageSize) {
if (CollectionUtils.isEmpty(houseRule) && CollectionUtils.isEmpty(statRule)) {
return new ArrayList<>();
}
if (StringUtils.isNotBlank(orgId) && StringUtils.isNotBlank(orgType)) {
orgIdPath = getOrgIdPath(orgId, orgType);
}
PageHelper.startPage(pageNo, pageSize);
return houseDao.listHouseIds4PolicyResis(orgIdPath, customerId, neighborHoodId, buildingId, unitId, houseId, houseRule, statRule);
}
@Override
public List<IcNeighborHoodDTO> neighborhoodsByIds(List<String> neighborhoodIds) {
return neighborhoodDao.neighborhoodsByIds(neighborhoodIds);
}
/**
* 组织项目统计
*
* @param tokenDto
* @param formDTO
* @Param tokenDto
* @Param formDTO
* @Return {@link PageData < MemberProjectInfoResultDTO>}
* @Author zhaoqifeng
* @Date 2022/7/27 9:43
*/
@Override
public PageData<OrgProjectDetailResultDTO> orgProjectDetailList(TokenDto tokenDto, OrgStatisticsFormDTO formDTO) {
List<OrgProjectDetailResultDTO> resultList = new ArrayList<>();
if (StringUtils.isBlank(formDTO.getAgencyId())) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败");
}
formDTO.setAgencyId(staffInfo.getAgencyId());
}
if (StringUtils.isEmpty(formDTO.getStartDate()) && StringUtils.isEmpty(formDTO.getEndDate())) {
//当前日期前一天
String dateId = DateUtils.format(DateUtils.addDateDays(new Date(), NumConstant.ONE_NEG), DateUtils.DATE_PATTERN_YYYYMMDD);
formDTO.setEndDate(dateId);
}
CustomerAgencyEntity agencyEntity = customerAgencyDao.selectById(formDTO.getAgencyId());
if (null == agencyEntity) {
return new PageData<>(Collections.emptyList(), NumConstant.ZERO);
}
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
long total = 0;
if (OrgConstant.COMMUNITY.equals(agencyEntity.getLevel()) && NumConstant.ONE_STR.equals(formDTO.getType())) {
//获取网格列表
LambdaQueryWrapper<CustomerGridEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CustomerGridEntity::getCustomerId, tokenDto.getCustomerId());
wrapper.eq(CustomerGridEntity::getPid, formDTO.getAgencyId());
wrapper.last("ORDER BY CONVERT ( GRID_NAME USING gbk ) ASC");
List<CustomerGridEntity> gridList = customerGridDao.selectList(wrapper);
//拼装数据
if (CollectionUtils.isNotEmpty(gridList)) {
//统计网格项目数
Map<String, Integer> projectMap = govProjectService.getGridProjectMap(formDTO);
//统计网格关闭项目数
Map<String, Integer> closedMap = govProjectService.getGridClosedProjectMap(formDTO);
//网格员统计
Map<String, Integer> memberMap = dataStatsService.getMemberMap(formDTO.getAgencyId());
resultList = gridList.stream().map(grid -> {
OrgProjectDetailResultDTO dto = new OrgProjectDetailResultDTO();
dto.setOrgId(grid.getId());
dto.setOrgType(OrgConstant.GRID);
dto.setOrgName(grid.getGridName());
if (projectMap.containsKey(grid.getId())) {
dto.setProjectCount(projectMap.get(grid.getId()));
}
if (closedMap.containsKey(grid.getId())) {
dto.setClosedCount(closedMap.get(grid.getId()));
}
if (memberMap.containsKey(grid.getId())) {
dto.setMemberCount(memberMap.get(grid.getId()));
dto.setProjectAve(dto.getProjectCount()/memberMap.get(grid.getId()));
dto.setClosedAve(dto.getClosedCount()/memberMap.get(grid.getId()));
}
return dto;
}).collect(Collectors.toList());
}
//获取统计数据
PageInfo<CustomerGridEntity> pageInfo = new PageInfo<>(gridList);
total = pageInfo.getTotal();
} else {
//获取组织列表
LambdaQueryWrapper<CustomerAgencyEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CustomerAgencyEntity::getCustomerId, tokenDto.getCustomerId());
if (NumConstant.ZERO_STR.equals(formDTO.getType())) {
wrapper.eq(CustomerAgencyEntity::getId, formDTO.getAgencyId());
} else {
wrapper.eq(CustomerAgencyEntity::getPid, formDTO.getAgencyId());
}
wrapper.last("ORDER BY CONVERT ( ORGANIZATION_NAME USING gbk ) ASC");
List<CustomerAgencyEntity> agencyList = customerAgencyDao.selectList(wrapper);
//拼装数据
if (CollectionUtils.isNotEmpty(agencyList)) {
//项目相关统计
Map<String, SubAgencyProjectResultDTO> projectMap = dataStatsService.getAgencyProjectTotal(formDTO);
//网格员统计
Map<String, Integer> memberMap = epmetUserService.getMemberCount(tokenDto.getCustomerId());
resultList = agencyList.stream().map(agency -> {
OrgProjectDetailResultDTO dto = new OrgProjectDetailResultDTO();
dto.setOrgId(agency.getId());
dto.setOrgType(OrgConstant.AGENCY);
dto.setOrgName(agency.getOrganizationName());
if (projectMap.containsKey(agency.getId())) {
dto.setProjectCount(projectMap.get(agency.getId()).getProjectTotal());
dto.setClosedCount(projectMap.get(agency.getId()).getClosedProjectTotal());
}
//获取当前组织的所有下级组织ID(包含本级)
List<String> agencyIds = customerAgencyDao.getSubAgencyList(agency.getId());
//将下级组织网格员数加起来
int memberCount = agencyIds.stream().filter(memberMap::containsKey).mapToInt(memberMap::get).sum();
dto.setMemberCount(memberCount);
if (memberCount != NumConstant.ZERO) {
dto.setProjectAve(dto.getProjectCount()/memberCount);
dto.setClosedAve(dto.getClosedCount()/memberCount);
}
return dto;
}).collect(Collectors.toList());
}
//获取统计数据
PageInfo<CustomerAgencyEntity> pageInfo = new PageInfo<>(agencyList);
total = pageInfo.getTotal();
}
return new PageData<>(resultList, total);
}
/**
* 网格员项目相关统计
*
* @param tokenDto
* @param formDTO
* @Param tokenDto
* @Param formDTO
* @Return {@link PageData< MemberProjectInfoResultDTO>}
* @Author zhaoqifeng
* @Date 2022/7/27 9:44
*/
@Override
public PageData<MemberProjectInfoResultDTO> memberProjectInfoList(TokenDto tokenDto, OrgStatisticsFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
PageData<MemberProjectInfoResultDTO> result;
if (StringUtils.isBlank(formDTO.getOrgId())) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败");
}
formDTO.setOrgId(staffInfo.getAgencyId());
formDTO.setOrgType(OrgConstant.AGENCY);
}
if (StringUtils.isEmpty(formDTO.getStartDate()) && StringUtils.isEmpty(formDTO.getEndDate())) {
//当前日期前一天
String dateId = DateUtils.format(DateUtils.addDateDays(new Date(), NumConstant.ONE_NEG), DateUtils.DATE_PATTERN_YYYYMMDD);
formDTO.setEndDate(dateId);
}
if (OrgConstant.AGENCY.contains(formDTO.getOrgType())) {
//获取当前组织的所有下级组织ID(包含本级)
List<String> agencyIds = customerAgencyDao.getSubAgencyList(formDTO.getOrgId());
formDTO.setAgencyList(agencyIds);
//获取组织下的网格员
result = epmetUserService.getMemberList(formDTO);
} else {
//获取网格下的网格员
result = dataStatsService.getMemberList(formDTO);
}
if (CollectionUtils.isNotEmpty(result.getList())) {
//统计项目数
Map<String, Integer> projectMap = govProjectService.getMemberProjectMap(formDTO);
//统计关闭项目数
Map<String, Integer> closedMap = govProjectService.getMemberClosedProjectMap(formDTO);
result.getList().forEach(item -> {
if (projectMap.containsKey(item.getStaffId())) {
item.setProjectCount(projectMap.get(item.getStaffId()));
}
if (projectMap.containsKey(item.getStaffId())) {
item.setClosedCount(closedMap.get(item.getStaffId()));
}
if (OrgConstant.AGENCY.contains(formDTO.getOrgType())) {
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(item.getOrgId());
if (null != agencyInfo) {
item.setOrgName(agencyInfo.getOrganizationName());
}
} else {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(item.getOrgId());
if (null != gridInfo) {
item.setOrgName(gridInfo.getGridName());
}
}
});
}
return result;
}
}

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

@ -2,13 +2,14 @@ package com.epmet.dataaggre.service.govproject;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStatisticsFormDTO;
import com.epmet.dataaggre.dto.govproject.form.*;
import com.epmet.dataaggre.dto.govproject.result.*;
import com.epmet.dataaggre.entity.govproject.IcEventEntity;
import com.sun.org.apache.xpath.internal.operations.Bool;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/**
* @Author zxc
@ -120,5 +121,36 @@ public interface GovProjectService {
*/
List<IcEventEntity> searchIcEventEntities(String customerId, String staffOrgIds, String search, Boolean isDifficultPoint,
Boolean isPage, Integer pageNo, Integer pageSize);
/**
* 网格上报项目数
* @Param formDTO
* @Return {@link Map< String, Integer>}
* @Author zhaoqifeng
* @Date 2022/7/28 9:29
*/
Map<String, Integer> getGridProjectMap(OrgStatisticsFormDTO formDTO);
/**
* 网格关闭项目数
* @Param formDTO
* @Return {@link Map< String, Integer>}
* @Author zhaoqifeng
* @Date 2022/7/28 9:29
*/
Map<String, Integer> getGridClosedProjectMap(OrgStatisticsFormDTO formDTO);
/**
* 工作人员上报项目数
* @Param formDTO
* @Return {@link Map< String, Integer>}
* @Author zhaoqifeng
* @Date 2022/7/28 9:28
*/
Map<String, Integer> getMemberProjectMap(OrgStatisticsFormDTO formDTO);
/**
* 工作人员关闭项目数
* @Param formDTO
* @Return {@link Map< String, Integer>}
* @Author zhaoqifeng
* @Date 2022/7/28 9:29
*/
Map<String, Integer> getMemberClosedProjectMap(OrgStatisticsFormDTO formDTO);
}

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

@ -26,6 +26,8 @@ import com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectResultDTO;
import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO;
import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO;
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStatisticsFormDTO;
import com.epmet.dataaggre.dto.govorg.result.OrgCountDTO;
import com.epmet.dataaggre.dto.govproject.ProjectDTO;
import com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO;
import com.epmet.dataaggre.dto.govproject.ResiEventDTO;
@ -665,6 +667,60 @@ public class GovProjectServiceImpl implements GovProjectService {
return icEventDao.selectList(query);
}
@Override
public Map<String, Integer> getGridProjectMap(OrgStatisticsFormDTO formDTO) {
List<OrgCountDTO> list = projectDao.getGridProjectCount(formDTO);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return list.stream().collect(Collectors.toMap(OrgCountDTO::getOrgId, OrgCountDTO::getCount, (o1, o2) -> o1));
}
@Override
public Map<String, Integer> getGridClosedProjectMap(OrgStatisticsFormDTO formDTO) {
List<OrgCountDTO> list = projectDao.getGridClosedProjectCount(formDTO);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return list.stream().collect(Collectors.toMap(OrgCountDTO::getOrgId, OrgCountDTO::getCount, (o1, o2) -> o1));
}
/**
* 工作人员上报项目数
*
* @param formDTO
* @Param formDTO
* @Return {@link Map< String, Integer>}
* @Author zhaoqifeng
* @Date 2022/7/28 9:28
*/
@Override
public Map<String, Integer> getMemberProjectMap(OrgStatisticsFormDTO formDTO) {
List<OrgCountDTO> list = projectDao.getMemberProjectCount(formDTO);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return list.stream().collect(Collectors.toMap(OrgCountDTO::getOrgId, OrgCountDTO::getCount, (o1, o2) -> o1));
}
/**
* 工作人员关闭项目数
*
* @param formDTO
* @Param formDTO
* @Return {@link Map< String, Integer>}
* @Author zhaoqifeng
* @Date 2022/7/28 9:29
*/
@Override
public Map<String, Integer> getMemberClosedProjectMap(OrgStatisticsFormDTO formDTO) {
List<OrgCountDTO> list = projectDao.getMemberProjectCount(formDTO);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return list.stream().collect(Collectors.toMap(OrgCountDTO::getOrgId, OrgCountDTO::getCount, (o1, o2) -> o1));
}
/**
* 构造事件查询
* @param customerId

288
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java

@ -0,0 +1,288 @@
package com.epmet.dataaggre.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.support.ExcelTypeEnum;
import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.feign.ResultDataResolver;
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.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO;
import com.epmet.dataaggre.dto.govorg.result.GridsInfoListResultDTO;
import com.epmet.dataaggre.entity.govorg.IcHouseEntity;
import com.epmet.dataaggre.excel.ResisByPolicyExcel;
import com.epmet.dataaggre.service.ResiService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dto.IcNeighborHoodDTO;
import com.epmet.dto.form.LoginUserDetailsFormDTO;
import com.epmet.dto.result.LoginUserDetailsResultDTO;
import com.epmet.feign.EpmetHeartOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.resource.ResourceUrlEncodingFilter;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalUnit;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@Service
public class ResiServiceImpl implements ResiService, ResultDataResolver {
@Autowired
private EpmetUserService epmetUserService;
@Autowired
private GovOrgService govOrgService;
@Autowired
private EpmetHeartOpenFeignClient heartOpenFeignClient;
@Autowired
private EpmetUserOpenFeignClient userOpenFeignClient;
public static final Pattern REG_DATE = Pattern.compile("^(\\d{4})-(\\d{2})-(\\d{2})");
@Override
public PageData<ResiByPolicyInfoResultDTO> listByPolicyRules(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId,
String houseId, String idCard, String name, Integer pageNo, Integer pageSize,
List<ResisByPolicyRulesFormDTO.ResiRule> resiRule,
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
List<ResisByPolicyRulesFormDTO.StatRule> statRule) {
String userId = EpmetRequestHolder.getLoginUserId();
String app = EpmetRequestHolder.getLoginUserApp();
String client = EpmetRequestHolder.getLoginUserClient();
String customerId = EpmetRequestHolder.getLoginUserCustomerId();
// 对特殊规则进行转换。
specificRuleConvert(resiRule);
// 查询当前组织及下级id路径
LoginUserDetailsResultDTO userDetail = getResultDataOrThrowsException(userOpenFeignClient.getLoginUserDetails(new LoginUserDetailsFormDTO(app, client, userId)),
ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
String orgIdPath = userDetail.getOrgIdPath();
// 结果集
List<ResiByPolicyInfoResultDTO> resultResis = new ArrayList<>();
// 1.用户没配置house和stat规则,直接按照居民规则查询
if (CollectionUtils.isEmpty(houseRule) && CollectionUtils.isEmpty(statRule)) {
List<ResiByPolicyInfoResultDTO> resis = epmetUserService.listByPolicyRules(customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId,
houseId, idCard, name, pageNo, pageSize, resiRule, null);
fillResisExtraInfoForPolicy(resis);
return new PageData<>(resis, new PageInfo(resis).getTotal());
}
// 2.用户至少配置了house和stat规则的一个,那么就先查询房屋出来,然后根据房屋去找居民
int housePageNo = 1;
int total = 0;
// 只能手动分页了
int start = (pageNo - 1) * pageSize;
int end = pageNo * pageSize; // 不包含
do {
// 拿到房屋id列表,去查询居民列表
List<String> houseIds = govOrgService.listHouseIdsByRules(customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId,
houseId, houseRule, statRule, housePageNo, 50);
if (houseIds.size() == 0) {
// 用户使用了房屋和统计相关的条件,但是没查到房屋,我看就没有走下去了的必要了吧..
break;
}
// 查询居民数量
Integer count = epmetUserService.getTotalByPolicyRules(
customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId,
houseId, idCard, name, resiRule, houseIds);
total += count;
// 查询居民,满了20个,不再查询数据,只查询数量
if (resultResis.size() < end) {
List<ResiByPolicyInfoResultDTO> resis = epmetUserService.listByPolicyRules(
customerId, orgIdPath, orgId, orgType, neighborHoodId, buildingId, unitId,
houseId, idCard, name, 1, end, resiRule, houseIds);
resultResis.addAll(resis);
}
housePageNo ++;
} while (true);
// 查出来所有的数据都没够到这一页的起始条数,返回空
if (resultResis.size() < start) {
return new PageData<>(new ArrayList<>(), total);
}
resultResis = resultResis.subList(start, Math.min(end, resultResis.size()));
// 补充额外信息
fillResisExtraInfoForPolicy(resultResis);
return new PageData<>(resultResis, total);
}
/**
* 为特定的规则进行转换
* @param resiRule
*/
private void specificRuleConvert(List<ResisByPolicyRulesFormDTO.ResiRule> resiRule) {
// 使用年龄计算出生日期
if (resiRule != null) {
resiRule.stream().forEach((r) -> {
if ("BIRTHDAY".equals(r.getColKey())) {
LocalDate birthday = LocalDate.now().minus(Long.valueOf(r.getColVal()), ChronoUnit.YEARS);
r.setQueryType(revertQueryType(r.getQueryType()));
r.setColVal(birthday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
}
});
}
}
/**
* 翻转逻辑操作符
* @param oldRel
* @return
*/
private String revertQueryType(String oldRel) {
if (">".equals(oldRel)) {
return "<";
}
if (">=".equals(oldRel)) {
return "<=";
}
if ("<".equals(oldRel)) {
return ">";
}
if ("<=".equals(oldRel)) {
return ">=";
}
return "";
}
/**
* 补充额外信息
* @param resultResis
*/
private void fillResisExtraInfoForPolicy(List<ResiByPolicyInfoResultDTO> resultResis) {
if (CollectionUtils.isEmpty(resultResis)) {
return;
}
List<String> gridIds = new ArrayList<>();
List<String> neighborhoodIds = new ArrayList<>();
resultResis.stream().forEach((r) -> {
gridIds.add(r.getGridId());
neighborhoodIds.add(r.getNeighborhoodId());
});
// 统一收集网格和小区信息
Map<String, String> gridIdAndName = govOrgService.gridListByIds(gridIds)
.stream()
.collect(Collectors.toMap(GridsInfoListResultDTO::getGridId, GridsInfoListResultDTO::getName));
Map<String, String> neighborhoodIdAndName = govOrgService.neighborhoodsByIds(neighborhoodIds)
.stream().collect(Collectors.toMap(IcNeighborHoodDTO::getId, IcNeighborHoodDTO::getNeighborHoodName));
resultResis.stream().forEach((r) -> {
// 小区名称
r.setNeighborHoodName(gridIdAndName.get(r.getGridId()).concat("-").concat(neighborhoodIdAndName.get(r.getNeighborhoodId())));
// 出生日期 & 年龄
if (r.getBirthday() != null) {
Integer age = null;
try {
Matcher matcher = REG_DATE.matcher(r.getBirthday());
if (matcher.matches()) {
String year = matcher.group(1);
String month = matcher.group(2);
String day = matcher.group(3);
LocalDate birthdayLocalDate = LocalDate.of(Integer.parseInt(year), Integer.parseInt(month), Integer.parseInt(day));
age = Period.between(birthdayLocalDate, LocalDate.now()).getYears();
r.setAge(age);
}
} catch (DateTimeException e) {
logger.error(r.getIcResiUserId() + "居民生日计算错误");
}
}
});
}
@Override
public void exportResisByPolicy(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId,
String houseId, String idCard, String name,
String ruleId, List<ResisByPolicyRulesFormDTO.ResiRule> resiRule,
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule,
List<ResisByPolicyRulesFormDTO.StatRule> statRule,
HttpServletResponse response) throws IOException {
if (StringUtils.isNotBlank(ruleId)) {
// 从heart取,覆盖形参
com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO.RuleList ruleList = getResultDataOrThrowsException(
heartOpenFeignClient.listPolicyRules4QueryAndExport(ruleId),
ServiceConstant.EPMET_HEART_SERVER,
EpmetErrorCode.SERVER_ERROR.getCode(),
null, null);
resiRule = ConvertUtils.sourceToTarget(ruleList.getResiRuleList(), ResisByPolicyRulesFormDTO.ResiRule.class);
houseRule = ConvertUtils.sourceToTarget(ruleList.getHouseRuleList(), ResisByPolicyRulesFormDTO.HouseRule.class);
statRule = ConvertUtils.sourceToTarget(ruleList.getStatRuleList(), ResisByPolicyRulesFormDTO.StatRule.class);
}
// 模板导出
ExcelWriter writer = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("政策人员预览信息导出.xlsx", response))
//.withTemplate(inputStream)
.build();
WriteSheet writeSheet = EasyExcel.writerSheet("政策人员列表")
.head(ResiByPolicyInfoResultDTO.class)
.build();
Integer pageSize = 500;
Integer pageNo = 1;
try {
do {
PageData<ResiByPolicyInfoResultDTO> resis = this.listByPolicyRules(orgId, orgType, neighborHoodId, buildingId, unitId,
houseId, idCard, name, pageNo, pageSize, resiRule, houseRule, statRule);
List<ResiByPolicyInfoResultDTO> list = resis.getList();
List<ResisByPolicyExcel> excelDatas = ConvertUtils.sourceToTarget(list, ResisByPolicyExcel.class);
if (CollectionUtils.isEmpty(excelDatas)) {
break;
}
writer.write(resis.getList(), writeSheet);
pageNo++;
} while (true);
} finally {
writer.finish();
}
}
}

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

@ -1206,4 +1206,55 @@
GROUP BY grid_id, date_id
</select>
<select id="getAgencyProjectTotal" resultType="com.epmet.dataaggre.dto.datastats.result.SubAgencyProjectResultDTO">
SELECT
AGENCY_ID,
SUM(PROJECT_INCR) AS "projectTotal",
SUM(CLOSED_INCR) AS "closedProjectTotal"
FROM
fact_agency_project_daily
WHERE DEL_FLAG = '0'
<if test="type == '0'">
AND AGENCY_ID = #{agencyId}
</if>
<if test="type == '1'">
AND PARENT_ID = #{agencyId}
</if>
<if test="null != startDate and '' != startDate">
AND DATE_ID <![CDATA[ >= ]]> #{startDate}
</if>
<if test="null != endDate and '' != endDate">
AND DATE_ID <![CDATA[ <= ]]> #{endDate}
</if>
GROUP BY AGENCY_ID
</select>
<select id="getMemberCount" resultType="com.epmet.dataaggre.dto.govorg.result.OrgCountDTO">
SELECT
GRID_ID AS "orgId",
COUNT( STAFF_ID ) AS "count"
FROM
fact_grid_member_statistics_daily
WHERE
DEL_FLAG = '0'
AND AGENCY_ID = #{agencyId}
AND DATE_ID = #{dateId}
GROUP BY
GRID_ID
</select>
<select id="getMemberList" resultType="com.epmet.dataaggre.dto.govorg.result.MemberProjectInfoResultDTO">
SELECT
STAFF_ID,
STAFF_NAME,
GRID_ID AS "orgId"
FROM
fact_grid_member_statistics_daily
WHERE
DEL_FLAG = '0'
AND GRID_ID = #{gridId}
AND DATE_ID = #{dateId}
ORDER BY
CONVERT ( STAFF_NAME USING gbk )
</select>
</mapper>

82
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/IcResiUserDao.xml

@ -69,4 +69,86 @@
and resi.STATUS='0'
</select>
<sql id="segmentForPolicyRules">
<where>
ic_resi_user.status='0'
and ic_resi_user.CUSTOMER_ID=#{customerId}
and ic_resi_user.PIDS LIKE CONCAT(#{orgIdPath},'%')
and ic_resi_user.del_flag='0'
<!--组织过滤-->
<if test="orgId != null and orgId != '' and orgType != null and orgType != ''">
<choose>
<when test="orgType == 'agency'">
and ic_resi_user.AGENCY_ID=#{orgId}
</when>
<otherwise>
and ic_resi_user.GRID_ID=#{orgId}
</otherwise>
</choose>
</if>
<!-- 小区等条件 -->
<if test="neighborHoodId != null and neighborHoodId!=''">
and ic_resi_user.VILLAGE_ID=#{neighborHoodId}
</if>
<if test="buildingId != null and buildingId!=''">
and ic_resi_user.BUILD_ID=#{buildingId}
</if>
<if test="unitId != null and unitId!=''">
and ic_resi_user.UNIT_ID=#{unitId}
</if>
<if test="houseId != null and houseId!=''">
and ic_resi_user.HOME_ID=#{houseId}
</if>
<if test="idCard != null and idCard!=''">
and ic_resi_user.ID_CARD like CONCAT('%',#{idCard}, '%')
</if>
<if test="name != null and name!=''">
and ic_resi_user.NAME like CONCAT('%',#{name}, '%')
</if>
<!-- 房屋id列表 -->
<if test="houseIds != null and houseIds.size() > 0">
and HOME_ID in
<foreach collection="houseIds" item="houseId" open="(" close=")" separator=",">
#{houseId}
</foreach>
</if>
<!-- resi规则列表 -->
<if test="resiRules != null and resiRules.size() > 0">
and
<foreach collection="resiRules" item="rule" open="(" close=")">
${rule.colTable}.${rule.colKey} ${rule.queryType} #{rule.colVal} ${rule.nextLogicalRel}
</foreach>
</if>
</where>
</sql>
<!--政策查找-->
<select id="listByPolicyRules" resultType="com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO">
select ic_resi_user.`ID` as icResiUserId,
ic_resi_user.`GRID_ID`,
ic_resi_user.`NAME`,
ic_resi_user.`MOBILE`,
ic_resi_user.`ID_CARD`,
ic_resi_user.`VILLAGE_ID` as neighborhoodId,
ic_resi_user.`BIRTHDAY`
from ic_resi_user
<if test="resiRules != null and resiRules.size() > 0">
<foreach collection="resiRules" item="rule">
<if test="rule.colTable != 'ic_resi_user'"> inner join ${rule.colTable}</if>
</foreach>
</if>
<include refid="segmentForPolicyRules"></include>
</select>
<select id="getTotalByPolicyRules" resultType="int">
select count(1)
from ic_resi_user
<if test="resiRules != null and resiRules.size() > 0">
<foreach collection="resiRules" item="rule">
<if test="rule.colTable != 'ic_resi_user'"> inner join ${rule.colTable}</if>
</foreach>
</if>
<include refid="segmentForPolicyRules"></include>
</select>
</mapper>

42
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/StaffRoleDao.xml

@ -93,4 +93,46 @@
AND b.STAFF_ID != #{userId}
</if>
</select>
<select id="getMemberCount" resultType="com.epmet.dataaggre.dto.govorg.result.OrgCountDTO">
SELECT
ORG_ID AS "orgId",
COUNT( a.STAFF_ID ) AS "count"
FROM
staff_role a
INNER JOIN gov_staff_role b ON a.ROLE_ID = b.ID
AND b.DEL_FLAG = '0'
AND b.ROLE_KEY = 'grid_member'
AND b.CUSTOMER_ID = #{customerId}
INNER JOIN customer_staff c ON c.USER_ID = a.STAFF_ID
AND c.DEL_FLAG = '0'
AND c.CUSTOMER_ID = #{customerId}
WHERE
a.DEL_FLAG = '0'
AND a.CUSTOMER_ID = #{customerId}
GROUP BY
ORG_ID
</select>
<select id="getMemberList" resultType="com.epmet.dataaggre.dto.govorg.result.MemberProjectInfoResultDTO">
SELECT
a.STAFF_ID ,
c.REAL_NAME AS "staffName",
a.ORG_ID
FROM
staff_role a
INNER JOIN gov_staff_role b ON a.ROLE_ID = b.ID
AND b.DEL_FLAG = '0'
AND b.ROLE_KEY = 'grid_member'
AND b.CUSTOMER_ID = #{customerId}
INNER JOIN customer_staff c ON c.USER_ID = a.STAFF_ID
AND c.DEL_FLAG = '0'
AND c.CUSTOMER_ID = #{customerId}
WHERE
a.DEL_FLAG = '0'
AND a.CUSTOMER_ID = #{customerId}
<foreach collection="orgIds" item="id" open="AND a.ORG_ID IN (" separator="," close=")">
#{id}
</foreach>
ORDER BY
CONVERT ( c.REAL_NAME USING gbk )
</select>
</mapper>

10
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerAgencyDao.xml

@ -298,5 +298,15 @@
AND pid = #{agencyId}
ORDER BY created_time ASC
</select>
<select id="getSubAgencyList" resultType="java.lang.String">
SELECT
ID
FROM
customer_agency
WHERE
DEL_FLAG = '0'
AND (ID = #{agencyId}
OR PIDS LIKE CONCAT('%', #{agencyId}, '%'))
</select>
</mapper>

35
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcHouseDao.xml

@ -3,4 +3,39 @@
<mapper namespace="com.epmet.dataaggre.dao.govorg.IcHouseDao">
<!--为政策-预览居民,提供房屋id列表查询-->
<select id="listHouseIds4PolicyResis" resultType="java.lang.String">
select ic_house.ID
from ic_house
<where>
DEL_FLAG = '0'
and ic_house.CUSTOMER_ID = #{customerId}
and ic_house.ORG_ID_PATH like CONCAT(#{orgIdPath}, '%')
<if test="neighborHoodId != null and neighborHoodId != ''">
and ic_house.NEIGHBOR_HOOD_ID = #{neighborHoodId}
</if>
<if test="buildingId != null and buildingId != ''">
and ic_house.BUILDING_ID = #{buildingId}
</if>
<if test="unitId != null and unitId != ''">
and ic_house.BUILDING_UNIT_ID = #{unitId}
</if>
<if test="houseId != null and houseId != ''">
and ic_house.ID = #{houseId}
</if>
<if test="houseRule != null and houseRule.size() > 0">
and
<foreach collection="houseRule" item="rule" open="(" close=")">
${rule.colTable}.${rule.colKey} ${rule.queryType} #{rule.colVal} ${rule.nextLogicalRel}
</foreach>
</if>
<if test="statRule != null and statRule.size() > 0">
and
<foreach collection="statRule" item="rule" open="(" close=")">
${rule.colTable}.${rule.colKey} ${rule.queryType} #{rule.colVal} ${rule.nextLogicalRel}
</foreach>
</if>
</where>
</select>
</mapper>

15
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcNeighborhoodDao.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dataaggre.dao.govorg.IcNeighborhoodDao">
<!--id批量查询小区列表-->
<select id="neighborhoodsByIds" resultType="com.epmet.dto.IcNeighborHoodDTO">
select ID, NEIGHBOR_HOOD_NAME
from ic_neighbor_hood
where ID in
<foreach collection="neighborhoodIds" item="id" separator="," open="(" close=")">
#{id}
</foreach>
</select>
</mapper>

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

@ -419,5 +419,87 @@
GROUP BY LEFT(c.CATEGORY_CODE,#{categoryOneLength})
ORDER BY total DESC
</select>
<select id="getGridProjectCount" resultType="com.epmet.dataaggre.dto.govorg.result.OrgCountDTO">
SELECT
GRID_ID AS "orgId",
COUNT( ID ) AS "count"
FROM
project
WHERE
DEL_FLAG = '0'
AND AGENCY_ID = #{agencyId}
<if test="null != startDate and '' != startDate">
AND DATE_FORMAT(CREATED_TIME,"%Y%m%d") <![CDATA[ >= ]]> #{startDate}
</if>
<if test="null != endDate and '' != endDate">
AND DATE_FORMAT(CREATED_TIME,"%Y%m%d") <![CDATA[ <= ]]> #{endDate}
</if>
GROUP BY
GRID_ID
</select>
<select id="getGridClosedProjectCount" resultType="com.epmet.dataaggre.dto.govorg.result.OrgCountDTO">
SELECT
GRID_ID AS "orgId",
COUNT( ID ) AS "count"
FROM
project_process
WHERE
DEL_FLAG = '0'
AND AGENCY_ID = #{agencyId}
AND OPERATION = 'close'
AND GRID_ID IS NOT NULL
AND GRID_ID != ''
<if test="null != startDate and '' != startDate">
AND DATE_FORMAT(CREATED_TIME,"%Y%m%d") <![CDATA[ >= ]]> #{startDate}
</if>
<if test="null != endDate and '' != endDate">
AND DATE_FORMAT(CREATED_TIME,"%Y%m%d") <![CDATA[ <= ]]> #{endDate}
</if>
GROUP BY
GRID_ID
</select>
<select id="getMemberProjectCount" resultType="com.epmet.dataaggre.dto.govorg.result.OrgCountDTO">
SELECT
CREATED_BY AS "orgId",
COUNT( ID ) AS "count"
FROM
project
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
<if test="'grid' == orgType">
AND GRID_ID = #{orgId}
</if>
<if test="null != startDate and '' != startDate">
AND DATE_FORMAT(CREATED_TIME,"%Y%m%d") <![CDATA[ >= ]]> #{startDate}
</if>
<if test="null != endDate and '' != endDate">
AND DATE_FORMAT(CREATED_TIME,"%Y%m%d") <![CDATA[ <= ]]> #{endDate}
</if>
GROUP BY
CREATED_BY
</select>
<select id="getMemberClosedProjectCount" resultType="com.epmet.dataaggre.dto.govorg.result.OrgCountDTO">
SELECT
STAFF_ID AS "orgId",
COUNT( ID ) AS "count"
FROM
project_process
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND OPERATION = 'close'
<if test="'grid' == orgType">
AND GRID_ID = #{orgId}
</if>
<if test="null != startDate and '' != startDate">
AND DATE_FORMAT(CREATED_TIME,"%Y%m%d") <![CDATA[ >= ]]> #{startDate}
</if>
<if test="null != endDate and '' != endDate">
AND DATE_FORMAT(CREATED_TIME,"%Y%m%d") <![CDATA[ <= ]]> #{endDate}
</if>
GROUP BY
STAFF_ID
</select>
</mapper>

116
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/HeartAttachmentDTO.java

@ -0,0 +1,116 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* heart库附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
public class HeartAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 业务id
*/
private String businessId;
/**
* 政策ic_policy;服务ic_service_record_v2
*/
private String attachTo;
/**
* 附件名
*/
private String name;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String format;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String type;
/**
* 附件地址
*/
private String url;
/**
* 排序字段
*/
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;
}

74
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyCategoryDTO.java

@ -0,0 +1,74 @@
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-07-18
*/
@Data
public class IcPolicyCategoryDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 政策id
*/
private String icPolicyId;
/**
* 分类编码
*/
private String categoryCode;
/**
* 分类全路径,包含CATEGORY_CODE,英文逗号隔开
*/
private String codePath;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

77
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyDTO.java

@ -0,0 +1,77 @@
package com.epmet.dto;
import com.epmet.commons.tools.dto.form.FileCommonDTO;
import com.epmet.dto.form.policy.IcPolicyRuleFormDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 政策表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
public class IcPolicyDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String policyId;
/**
* 政策创建人所属组织id
*/
private String orgId;
/**
* AGENCY_ID的全路径含agency_id
*/
private String orgIdPath;
/**
* 政策级别0市级1区级2街道级
*/
private String policyLevel;
/**
* 政策级别0市级1区级2街道级
*/
private String policyLevelName;
/**
* 生效起止日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date startDate;
/**
* 截止日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDate;
/**
* 政策标题
*/
private String title;
/**
* 政策内容
*/
private String content;
/**
* 是否过期1已过期0未过期
*/
private String expiredFlag;
//以下三个详情接口返回
private List<IcPolicyCategoryDTO> categoryList;
private List<FileCommonDTO> attachmentList;
private List<IcPolicyRuleFormDTO> ruleList;
}

82
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyRuleDTO.java

@ -0,0 +1,82 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 政策匹配规则
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
public class IcPolicyRuleDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 政策id
*/
private String icPolicyId;
/**
* 规则名称
*/
private String ruleName;
/**
* 排序字段
*/
private Integer sort;
/**
* 删除标记 0未删除1已删除
*/
@JsonIgnore
private String delFlag;
/**
* 乐观锁
*/
@JsonIgnore
private Integer revision;
/**
* 创建人
*/
@JsonIgnore
private String createdBy;
/**
* 创建时间
*/
@JsonIgnore
private Date createdTime;
/**
* 更新人
*/
@JsonIgnore
private String updatedBy;
/**
* 更新时间
*/
@JsonIgnore
private Date updatedTime;
}

119
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPolicyRuleDetailDTO.java

@ -0,0 +1,119 @@
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-07-18
*/
@Data
public class IcPolicyRuleDetailDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 政策id
*/
private String icPolicyId;
/**
* 规则id
*/
private String ruleId;
/**
* 规则描述文字例如基础信息性别等于女
*/
private String ruleDesc;
/**
* resi:人员信息,house:房屋信息stat:统计信息
*/
private String groupType;
/**
* 与上一条的关系andor
*/
private String nextLogicalRel;
/**
* 分组id人员信息有值
*/
private String itemGroupId;
/**
* 组件id人员信息有值
*/
private String itemId;
/**
* 查询类型等于不等于....;来源于字典表sql_query_type
*/
private String queryType;
/**
* 表名人员信息有值
*/
private String colTable;
/**
* 人员信息存储组件对应的列名房屋信息存储ic_house表的列名统计信息应该是定义到字典表这里存储字典key就行吧
*/
private String colKey;
/**
* 参数值
*/
private String colVal;
/**
* 排序字段;同一group_type升序
*/
private Integer sort;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

103
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceFeedbackV2DTO.java

@ -0,0 +1,103 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 服务记录反馈表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
public class IcServiceFeedbackV2DTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String customerId;
/**
* 服务ID
*/
private String serviceRecordId;
/**
* 服务目标
*/
private String serviceGoal;
/**
* 服务效果
*/
private String serviceEffect;
/**
* 服务人数
*/
private Integer servicePeopleNumber;
/**
* 满意度满意度 - 不满意:bad基本满意:good非常满意:perfect
*/
private String satisfaction;
/**
* 地址经度
*/
private String longitude;
/**
* 地址纬度
*/
private String latitude;
/**
* 地址
*/
private String address;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标识
*/
private Integer delFlag;
private List<HeartAttachmentDTO> fileList;
}

115
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceRecordV2DTO.java

@ -0,0 +1,115 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 服务记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
public class IcServiceRecordV2DTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String customerId;
/**
* 服务组织类型
社区自组织community_org
志愿者ic_user_volunteer
联建单位party_unit
*/
private String serviceOrgType;
/**
* 服务组织ID
*/
private String serviceOrgId;
/**
* 经办人姓名
*/
private String principalName;
/**
* 联系方式
*/
private String principalContact;
/**
* 服务时间
*/
private Date serviceTimeStart;
/**
* 服务截止时间
*/
private Date serviceTimeEnd;
/**
* in_service服务中completed:已完成cancel取消
*/
private String serviceStatus;
/**
* 备注
*/
private String remark;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标识
*/
private String delFlag;
/**
* 服务名称
*/
private String serviceName;
/**
* 政策依据ID
*/
private String policyId;
private String serviceCategoryKey;
}

84
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceScopeV2DTO.java

@ -0,0 +1,84 @@
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-07-18
*/
@Data
public class IcServiceScopeV2DTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String customerId;
/**
* 服务记录的ID
*/
private String serviceRecordId;
/**
* agency单位grid网格neighborhood小区
*/
private String objectType;
/**
* 选中的组织的ID
*/
private String objectId;
/**
* 发布范围的组织ID PATH
*/
private String objectIdPath;
/**
*
*/
private String objectName;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标识
*/
private String delFlag;
}

96
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceFeedbackV2AddFormDTO.java

@ -0,0 +1,96 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* 服务记录反馈表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
public class IcServiceFeedbackV2AddFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 服务ID
*/
@NotBlank(message = "服务Id不能为空", groups = {UpdateGroup.class})
private String serviceRecordId;
/**
* 服务目标
*/
private String serviceGoal;
/**
* 服务效果
*/
private String serviceEffect;
/**
* 服务人数
*/
private Integer servicePeopleNumber;
/**
* 满意度满意度 - 不满意:bad基本满意:good非常满意:perfect
*/
private String satisfaction;
/**
* 服务状态[in_service服务中completed:已完成cancel取消]
*/
private String serviceStatus;
/**
* 地址
*/
private String address;
/**
* 地址经度
*/
private String longitude;
/**
* 地址纬度
*/
private String latitude;
/**
* 地址纬度
*/
private List<FileDTO> fileList;
private String customerId;
private String userId;
@Data
public static class FileDTO {
/**
* 文件名
*/
private String name;
/**
* url地址
*/
private String url;
/**
* 文件类型(图片 - image 视频 - video 语音 - voice 文档 - doc)
*/
private String type;
/**
* 后缀名
*/
private String format;
/**
* 文件大小 kb
*/
private Integer size;
/**
* 语音或视频文件时长单位秒
*/
private Integer duration;
}
}

95
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceRecordV2AddEditFormDTO.java

@ -0,0 +1,95 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 服务记录反馈表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
public class IcServiceRecordV2AddEditFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 服务Id
*/
@NotBlank(message = "服务Id不能为空", groups = {UpdateGroup.class})
private String serviceRecordId;
/**
* 服务名称
*/
@NotBlank(message = "服务名称不能为空", groups = {AddGroup.class})
private String serviceName;
/**
* 服务组织类型 社区自组织community_org 志愿者ic_user_volunteer 联建单位party_unit
*/
@NotBlank(message = "服务名称不能为空", groups = {AddGroup.class})
private String serviceOrgType;
@NotBlank(message = "serviceCategoryKey不能为空", groups = {AddGroup.class})
private String serviceCategoryKey;
/**
* 服务组织Id
*/
@NotBlank(message = "服务名称不能为空", groups = {AddGroup.class})
private String serviceOrgId;
/**
* 服务范围集合
*/
private List<ObjList> objList;
/**
* 政策依据Id
*/
private String policyId;
/**
* 经办人姓名
*/
private String principalName;
/**
* 联系方式
*/
private String principalContact;
/**
* 起始服务时间
*/
@NotNull(message = "起始服务时间不能为空", groups = {AddGroup.class})
@JsonFormat(pattern = "yyyy-MM-dd")
private Date serviceTimeStart;
/**
* 终止服务时间
*/
@NotNull(message = "终止服务时间不能为空", groups = {AddGroup.class})
@JsonFormat(pattern = "yyyy-MM-dd")
private Date serviceTimeEnd;
/**
* 备注信息
*/
private String remark;
/**
* 反馈记录数据
*/
private IcServiceFeedbackV2AddFormDTO feedback;
private String customerId;
private String userId;
@Data
public static class ObjList {
private String objectType;
private String objectId;
private String objectName;
}
}

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

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/7/19 16:34
* @DESC
*/
@Data
public class ServiceRecordV2DetailFormDTO implements Serializable {
private static final long serialVersionUID = 476430342315532314L;
public interface ServiceRecordV2DetailForm{}
@NotBlank(message = "serviceRecordId不能为空",groups = ServiceRecordV2DetailForm.class)
private String serviceRecordId;
}

61
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2ListFormDTO.java

@ -0,0 +1,61 @@
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;
/**
* @Author zxc
* @DateTime 2022/7/19 10:10
* @DESC
*/
@Data
public class ServiceRecordV2ListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 88592831607216246L;
public interface ServiceRecordV2ListForm{}
/**
* 服务名称
*/
private String serviceName;
@NotBlank(message = "serviceCategoryKey不能为空",groups = ServiceRecordV2ListForm.class)
private String serviceCategoryKey;
/**
* 服务组织ID
*/
private String serviceOrgId;
/**
* 起始服务时间yyyy-MM-dd
*/
private String serviceTimeStart;
/**
* 终止服务时间yyyy-MM-dd
*/
private String serviceTimeEnd;
/**
* in_service服务中completed:已完成cancel取消
*/
private String serviceStatus;
/**
* 满意度 0不满意1基本满意2非常满意
*/
private String satisfaction;
private String customerId;
private String userId;
/**
* 当前工作人员所属组织ID
*/
private String orgId;
}

101
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyFormDTO.java

@ -0,0 +1,101 @@
package com.epmet.dto.form.policy;
import com.epmet.commons.tools.dto.form.FileCommonDTO;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import com.epmet.dto.IcPolicyCategoryDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Description
* @Author yzm
* @Date 2022/7/19 13:09
*/
@Data
public class IcPolicyFormDTO implements Serializable {
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
public interface UpdateUserInternalGroup {
}
@NotBlank(message = "政策id不能为空",groups = UpdateUserInternalGroup.class)
private String policyId;
/**
* 政策创建人所属组织id
*/
@NotBlank(message = "orgId不能为空",groups = UpdateUserInternalGroup.class)
private String orgId;
// /**
// * AGENCY_ID的全路径,含agency_id
// */
// @NotBlank(message = "orgIdPath不能为空",groups = UpdateUserInternalGroup.class)
// private String orgIdPath;
/**
* 客户id
*/
@NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class)
private String customerId;
private String staffId;
/**
* 政策级别0市级1区级2街道级
*/
@NotBlank(message = "政策级别不能为空", groups = AddUserShowGroup.class)
private String policyLevel;
/**
* 生效起止日期
*/
@JsonFormat(pattern="yyyy-MM-dd")
@NotNull(message = "政策开始日期不能为空", groups = AddUserShowGroup.class)
private Date startDate;
/**
* 截止日期
*/
@JsonFormat(pattern="yyyy-MM-dd")
@NotNull(message = "政策截止日期不能为空", groups = AddUserShowGroup.class)
private Date endDate;
/**
* 政策标题
*/
@NotBlank(message = "政策标题不能为空", groups = AddUserShowGroup.class)
@Length(max = 100, groups = AddUserShowGroup.class, message = "政策标题最多输入100字")
private String title;
/**
* 政策内容
*/
// @NotBlank(message = "政策内容不能为空", groups = AddUserShowGroup.class)
@Length(max = 2000, groups = AddUserShowGroup.class, message = "政策内容最多输入2000字")
private String content;
private List<IcPolicyCategoryDTO> categoryList;
// @Valid
private List<FileCommonDTO> attachmentList;
@Valid
@NotEmpty(message = "政策细则不能为空",groups =AddUserShowGroup.class )
private List<IcPolicyRuleFormDTO> ruleList;
private String agencyId;
}

38
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java

@ -0,0 +1,38 @@
package com.epmet.dto.form.policy;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author yzm
* @Date 2022/7/19 15:36
*/
@Data
public class IcPolicyPageFormDTO extends PageFormDTO implements Serializable {
/**
* 客户id
*/
private String customerId;
private String staffId;
/**
* 政策标题
*/
private String title;
/**
* 政策内容
*/
private String content;
/**
* 是否过期1已过期0未过期
*/
private String expiredFlag;
private String agencyId;
}

94
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyRuleDetailDTO.java

@ -0,0 +1,94 @@
package com.epmet.dto.form.policy;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Description
* @Author yzm
* @Date 2022/7/19 13:32
*/
@Data
public class IcPolicyRuleDetailDTO {
public interface ResiRulerShowGroup extends CustomerClientShowGroup {
}
public interface HouseRulerShowGroup extends CustomerClientShowGroup {
}
public interface StatRulerShowGroup extends CustomerClientShowGroup {
}
/**
* 规则描述文字例如基础信息性别等于女
*/
private String ruleDesc;
/**
* 与下一条的关系andor
* 如果没有条件的话此列为空
*/
private String nextLogicalRel;
/**
* 分组id人员信息有值
*/
@NotBlank(message = "itemGroupId不能为空", groups = ResiRulerShowGroup.class)
private String itemGroupId;
/**
* 表名人员信息有值房屋信息也有值
*/
@NotBlank(message = "itemId不能为空", groups = ResiRulerShowGroup.class)
private String itemId;
/**
* 查询类型等于不等于....;来源于字典表sql_query_type
*/
@NotBlank(message = "查询类型不能为空", groups = {ResiRulerShowGroup.class,HouseRulerShowGroup.class,StatRulerShowGroup.class})
private String queryType;
/**
* 表名人员信息有值
*/
@NotBlank(message = "colTable不能为空", groups = {ResiRulerShowGroup.class,HouseRulerShowGroup.class})
private String colTable;
/**
* 人员信息存储组件对应的列名房屋信息存储ic_house表的列名统计信息应该是定义到字典表这里存储字典key就行吧
*/
@NotBlank(message = "条件不能为空", groups = {ResiRulerShowGroup.class,HouseRulerShowGroup.class,StatRulerShowGroup.class})
private String colKey;
/**
* 参数值
*/
@NotBlank(message = "参数值不能为空", groups = {ResiRulerShowGroup.class,HouseRulerShowGroup.class,StatRulerShowGroup.class})
private String colVal;
/**
* 用于前端展示基础信息教育信息房屋类型.....
*/
private String itemGroupName;
/**
* 用于前端展示姓名手机号......
*/
private String itemLabel;
/**
* 用于前端展示等于不等于大于小于....
*/
private String queryTypeName;
/**
* 用于前端展示参数值显示值eg:男女
*/
private String colValLabel;
/**
* 用于前端展示逻辑并且或者
*/
private String nextLogicalRelName;
}

45
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyRuleFormDTO.java

@ -0,0 +1,45 @@
package com.epmet.dto.form.policy;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author yzm
* @Date 2022/7/19 13:31
*/
@Data
public class IcPolicyRuleFormDTO implements Serializable {
/**
* 细则名称
*/
@NotBlank(message = "细则名称不能为空", groups = IcPolicyFormDTO.AddUserShowGroup.class)
private String ruleName;
/**
* 人员信息
*/
@Valid
// @NotEmpty
private List<IcPolicyRuleDetailDTO> resiRuleList;
/**
* 房屋信息
*/
@Valid
private List<IcPolicyRuleDetailDTO> houseRuleList;
/**
* 统计信息
*/
@Valid
private List<IcPolicyRuleDetailDTO> statRuleList;
/**
* ruleId
*/
private String id;
}

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

@ -0,0 +1,73 @@
package com.epmet.dto.form.resi;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResisByPolicyRulesFormDTO {
private String ruleId;
private String orgId;
private String orgType;
private String neighborHoodId;
private String buildingId;
private String unitId;
private String houseId;
private String name;
private String mobile;
private String idCard;
private RuleList ruleList = new RuleList();
private Integer pageNo;
private Integer pageSize;
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class RuleList {
private List<ResiRule> resiRuleList;
private List<HouseRule> houseRuleList;
private List<StatRule> statRuleList;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class ResiRule {
private String ruleDesc;
private String nextLogicalRel;
private String itemGroupId;
private String itemId;
private String queryType;
private String colTable;
private String colKey;
private String colVal;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class HouseRule {
private String colTable;
private String colKey;
private String colVal;
private String ruleDesc;
private String nextLogicalRel;
private String queryType;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class StatRule {
private String colKey;
private String colVal;
private String nextLogicalRel;
private String ruleDesc;
private String queryType;
private String colTable;
}
}

71
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceRecordV2DetailResultDTO.java

@ -0,0 +1,71 @@
package com.epmet.dto.result;
import com.epmet.dto.IcServiceFeedbackV2DTO;
import com.epmet.dto.IcServiceScopeV2DTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/7/19 16:34
* @DESC
*/
@Data
public class ServiceRecordV2DetailResultDTO implements Serializable {
private static final long serialVersionUID = 3385425608362604836L;
private String serviceRecordId;
private String serviceName;
private String policyId;
/**
* 服务组织类型
社区自组织community_org
志愿者ic_user_volunteer
联建单位party_unit
*/
private String serviceOrgType;
/**
* 服务组织ID
*/
private String serviceOrgId;
/**
* 经办人姓名
*/
private String principalName;
/**
* 联系方式
*/
private String principalContact;
/**
* 服务时间
*/
private String serviceTimeStart;
/**
* 服务截止时间
*/
private String serviceTimeEnd;
/**
* in_service服务中completed:已完成cancel取消
*/
private String serviceStatus;
/**
* 备注
*/
private String remark;
private List<IcServiceScopeV2DTO> gridIdList;
private IcServiceFeedbackV2DTO feedback;
}

66
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceRecordV2ListResultDTO.java

@ -0,0 +1,66 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/7/19 10:16
* @DESC
*/
@Data
public class ServiceRecordV2ListResultDTO implements Serializable {
private static final long serialVersionUID = -7486208970876756573L;
/**
* 服务ID
*/
private String serviceRecordId;
/**
* 政策ID
*/
private String policyId;
/**
* 服务组织类别
*/
private String serviceOrgType;
/**
* 服务组织ID
*/
private String serviceOrgId;
/**
* 服务组织名字
*/
private String serviceOrgName;
/**
* 服务名字
*/
private String serviceName;
/**
* 起始服务时间yyyy-MM-dd
*/
private String serviceTimeStart;
/**
* 终止服务时间yyyy-MM-dd
*/
private String serviceTimeEnd;
/**
* 服务状态
*/
private String serviceStatus;
/**
* 服务人数
*/
private Integer servicePeopleNumber;
}

79
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/policy/IcPolicyItemResultDTO.java

@ -0,0 +1,79 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
*
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-19
*/
@Data
public class IcPolicyItemResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
*
*/
private String customerId;
/**
* house:房屋信息stat:统计信息
*/
private String groupType;
/**
* 选项名例如房屋类型房屋状态人均收入
*/
private String label;
/**
* 表名
*/
private String tableName;
/**
* 房屋信息存储列名统计信息定义好key放在这里
*/
private String colKey;
/**
*
*/
private String itemType;
/**
* 排序
*/
private Integer sort;
/**
* 备注
*/
private String remark;
/**
* 值来源;需要接口获取remote
*/
private String optionSourceType;
/**
* 动态url
*/
private String optionSourceUrl;
/**
* 动态url的入参存储json串
*/
private String optionSourceParam;
}

27
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiByPolicyInfoResultDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.result.resi;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResiByPolicyInfoResultDTO {
private String icResiUserId;
private String name;
private String mobile;
private String idCard;
/**
* 小区全名包含小区前面的属性比如网格等
*/
private String gridId;
private String neighborhoodId;
private String neighborHoodName;
private Integer age;
private Date birthday;
}

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

@ -14,6 +14,7 @@ import com.epmet.dto.form.demand.DemandRecId;
import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO;
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO;
import com.epmet.dto.form.resi.VolunteerCommonFormDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.IcResiDemandDictDTO;
@ -158,4 +159,11 @@ public interface EpmetHeartOpenFeignClient {
@PostMapping("/heart/resi/volunteer/addVolunteer")
Result addVolunteer(@RequestBody ResiVolunteerAuthenticateFormDTO formDTO);
/**
* 为预览和导出提供规则列表查询
* @return
*/
@PostMapping("/heart/policy/rules4ResiListAndExport/{ruleId}")
Result<ResisByPolicyRulesFormDTO.RuleList> listPolicyRules4QueryAndExport(@PathVariable("ruleId") String ruleId);
}

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

@ -16,6 +16,7 @@ import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO;
import com.epmet.dto.form.demand.ServiceItemSelectFormDTO;
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO;
import com.epmet.dto.form.resi.VolunteerCommonFormDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.IcResiDemandDictDTO;
@ -161,4 +162,8 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "addVolunteer", formDTO);
}
@Override
public Result<ResisByPolicyRulesFormDTO.RuleList> listPolicyRules4QueryAndExport(String ruleId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "listPolicyRules4QueryAndExport", ruleId);
}
}

5
epmet-module/epmet-heart/epmet-heart-server/pom.xml

@ -12,6 +12,11 @@
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>data-aggregator-client</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart-client</artifactId>

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/IcCommunitySelfOrganizationConstant.java

@ -8,4 +8,8 @@ package com.epmet.constant;
public interface IcCommunitySelfOrganizationConstant {
String ORG_TYPE_AGENCY = "agency";
String SERVICE_ORG_TYPE_COMMUNITY_ORG = "community_org";
String SERVICE_ORG_TYPE_IC_USER_VOLUNTEEr = "ic_user_volunteer";
String SERVICE_ORG_TYPE_PARTY_UNIT = "party_unit";
}

70
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/HeartAttachmentController.java

@ -0,0 +1,70 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.HeartAttachmentDTO;
import com.epmet.service.HeartAttachmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* heart库附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@RestController
@RequestMapping("heartAttachment")
public class HeartAttachmentController {
@Autowired
private HeartAttachmentService heartAttachmentService;
@RequestMapping("page")
public Result<PageData<HeartAttachmentDTO>> page(@RequestParam Map<String, Object> params){
PageData<HeartAttachmentDTO> page = heartAttachmentService.page(params);
return new Result<PageData<HeartAttachmentDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<HeartAttachmentDTO> get(@PathVariable("id") String id){
HeartAttachmentDTO data = heartAttachmentService.get(id);
return new Result<HeartAttachmentDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody HeartAttachmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
heartAttachmentService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody HeartAttachmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
heartAttachmentService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
heartAttachmentService.delete(ids);
return new Result();
}
}

183
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPolicyController.java

@ -0,0 +1,183 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.EpmetRequestHolder;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.IcPolicyDTO;
import com.epmet.dto.IcPolicyItemResultDTO;
import com.epmet.dto.IcPolicyRuleDTO;
import com.epmet.dto.form.policy.IcPolicyFormDTO;
import com.epmet.dto.form.policy.IcPolicyPageFormDTO;
import com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO;
import com.epmet.dto.result.resi.ResiByPolicyInfoResultDTO;
import com.epmet.entity.IcPolicyRuleDetailEntity;
import com.epmet.service.IcPolicyService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 政策表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@RestController
@RequestMapping("policy")
public class IcPolicyController {
@Autowired
private IcPolicyService icPolicyService;
/**
* 房屋信息统计信息查询有哪些可选项
* @param customerId
* @param groupType
* @return
*/
@PostMapping("item-list/{groupType}")
public Result<List<IcPolicyItemResultDTO>> itemList(@RequestHeader("customerId") String customerId, @PathVariable("groupType") String groupType) {
List<IcPolicyItemResultDTO> list = icPolicyService.itemList(customerId, groupType);
return new Result<List<IcPolicyItemResultDTO>>().ok(list);
}
/**
* 政策管理-新增/修改
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("add")
public Result add(@LoginUser TokenDto tokenDto, @RequestBody IcPolicyFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, IcPolicyFormDTO.AddUserShowGroup.class, IcPolicyFormDTO.AddUserInternalGroup.class);
icPolicyService.addOrUpdatePolicy(formDTO);
return new Result();
}
/**
* 编辑政策
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("update")
public Result update(@LoginUser TokenDto tokenDto, @RequestBody IcPolicyFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, IcPolicyFormDTO.AddUserShowGroup.class, IcPolicyFormDTO.AddUserInternalGroup.class,IcPolicyFormDTO.UpdateUserInternalGroup.class);
icPolicyService.addOrUpdatePolicy(formDTO);
return new Result();
}
/**
* 政策列表
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("list")
public Result<PageData<IcPolicyDTO>> policyList(@LoginUser TokenDto tokenDto, @RequestBody IcPolicyPageFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class,PageFormDTO.AddUserShowGroup.class);
PageData<IcPolicyDTO> page = icPolicyService.policyList(formDTO);
return new Result<PageData<IcPolicyDTO>>().ok(page);
}
/**
* Desc: 政策列表下拉选
* @param tokenDto
* @author zxc
* @date 2022/7/21 09:48
*/
@PostMapping("policyListSelect")
public Result<List<IcPolicyDTO>> policyListSelect(@LoginUser TokenDto tokenDto){
return new Result<List<IcPolicyDTO>>().ok(icPolicyService.policyListSelect(tokenDto.getUserId(),tokenDto.getCustomerId()));
}
/**
* 细则列表
* @param customerId
* @param policyId
* @return
*/
@PostMapping("rulelist/{policyId}")
public Result<List<IcPolicyRuleDTO>> ruleList(@RequestHeader("customerId") String customerId,@PathVariable("policyId") String policyId) {
return new Result<List<IcPolicyRuleDTO>>().ok(icPolicyService.ruleList(customerId,policyId));
}
/**
* 删除政策
* @param policyId
* @return
*/
@PostMapping("delete/{policyId}")
public Result deletePolicy(@PathVariable("policyId") String policyId) {
icPolicyService.deleteById(policyId);
return new Result<>();
}
@PostMapping("detail/{policyId}")
public Result<IcPolicyDTO> policyDetail(@LoginUser TokenDto tokenDto,@PathVariable("policyId") String policyId) {
return new Result<IcPolicyDTO>().ok(icPolicyService.policyDetail(tokenDto.getCustomerId(),policyId));
}
/**
* 为预览和导出提供规则列表查询
* @return
*/
@PostMapping("rules4ResiListAndExport/{ruleId}")
public Result<ResisByPolicyRulesFormDTO.RuleList> listPolicyRules4QueryAndExport(@PathVariable("ruleId") String ruleId) {
Map<String, List<IcPolicyRuleDetailEntity>> ruleMap = icPolicyService.listPolicyRules4QueryAndExport(EpmetRequestHolder.getLoginUserCustomerId(), ruleId);
ResisByPolicyRulesFormDTO.RuleList data = new ResisByPolicyRulesFormDTO.RuleList();
// resi规则
List<IcPolicyRuleDetailEntity> originResiRules = ruleMap.get("resi");
if (CollectionUtils.isNotEmpty(originResiRules)) {
List<ResisByPolicyRulesFormDTO.ResiRule> resiRules = originResiRules
.stream()
.map((r) -> new ResisByPolicyRulesFormDTO.ResiRule(r.getRuleDesc(), r.getNextLogicalRel(), r.getItemGroupId(),
r.getItemId(), r.getQueryType(), r.getColTable(), r.getColKey(), r.getColVal()))
.collect(Collectors.toList());
data.setResiRuleList(resiRules);
}
// house规则
List<IcPolicyRuleDetailEntity> originHouseRules = ruleMap.get("house");
if (CollectionUtils.isNotEmpty(originHouseRules)) {
List<ResisByPolicyRulesFormDTO.HouseRule> houseRules = originHouseRules
.stream()
.map((r) -> new ResisByPolicyRulesFormDTO.HouseRule(r.getColTable(), r.getColKey(), r.getColVal(),
r.getRuleDesc(), r.getNextLogicalRel(), r.getQueryType()))
.collect(Collectors.toList());
data.setHouseRuleList(houseRules);
}
// stat规则
List<IcPolicyRuleDetailEntity> originStatRules = ruleMap.get("stat");
if (CollectionUtils.isNotEmpty(originStatRules)) {
List<ResisByPolicyRulesFormDTO.StatRule> statRules = originStatRules
.stream()
.map((r) -> new ResisByPolicyRulesFormDTO.StatRule(r.getColKey(), r.getColVal(), r.getNextLogicalRel(),
r.getRuleDesc(), r.getQueryType(), r.getColTable()))
.collect(Collectors.toList());
data.setStatRuleList(statRules);
}
return new Result<ResisByPolicyRulesFormDTO.RuleList>().ok(data);
}
}

74
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceFeedbackV2Controller.java

@ -0,0 +1,74 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcServiceFeedbackV2DTO;
import com.epmet.dto.form.IcServiceFeedbackV2AddFormDTO;
import com.epmet.service.IcServiceFeedbackV2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 服务记录反馈表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@RestController
@RequestMapping("icServiceFeedbackV2")
public class IcServiceFeedbackV2Controller {
@Autowired
private IcServiceFeedbackV2Service icServiceFeedbackV2Service;
@RequestMapping("page")
public Result<PageData<IcServiceFeedbackV2DTO>> page(@RequestParam Map<String, Object> params){
PageData<IcServiceFeedbackV2DTO> page = icServiceFeedbackV2Service.page(params);
return new Result<PageData<IcServiceFeedbackV2DTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcServiceFeedbackV2DTO> get(@PathVariable("id") String id){
IcServiceFeedbackV2DTO data = icServiceFeedbackV2Service.get(id);
return new Result<IcServiceFeedbackV2DTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("add")
public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcServiceFeedbackV2AddFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
icServiceFeedbackV2Service.save(formDTO);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcServiceFeedbackV2DTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icServiceFeedbackV2Service.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icServiceFeedbackV2Service.delete(ids);
return new Result();
}
}

112
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceRecordV2Controller.java

@ -0,0 +1,112 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcServiceRecordV2DTO;
import com.epmet.dto.form.ServiceRecordV2DetailFormDTO;
import com.epmet.dto.form.IcServiceRecordV2AddEditFormDTO;
import com.epmet.dto.form.ServiceRecordV2ListFormDTO;
import com.epmet.dto.result.ServiceRecordV2DetailResultDTO;
import com.epmet.service.IcServiceRecordV2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 服务记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@RestController
@RequestMapping("icServiceRecordV2")
public class IcServiceRecordV2Controller {
@Autowired
private IcServiceRecordV2Service icServiceRecordV2Service;
@RequestMapping("page")
public Result<PageData<IcServiceRecordV2DTO>> page(@RequestParam Map<String, Object> params){
PageData<IcServiceRecordV2DTO> page = icServiceRecordV2Service.page(params);
return new Result<PageData<IcServiceRecordV2DTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcServiceRecordV2DTO> get(@PathVariable("id") String id){
IcServiceRecordV2DTO data = icServiceRecordV2Service.get(id);
return new Result<IcServiceRecordV2DTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("add")
public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcServiceRecordV2AddEditFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
icServiceRecordV2Service.save(formDTO);
return new Result();
}
@NoRepeatSubmit
@PostMapping("edit")
public Result update(@RequestBody IcServiceRecordV2AddEditFormDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icServiceRecordV2Service.update(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("cancel")
public Result cancel(@RequestBody IcServiceRecordV2AddEditFormDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icServiceRecordV2Service.cancel(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icServiceRecordV2Service.delete(ids);
return new Result();
}
/**
* Desc:服务管理列表
* @param tokenDto
* @param formDTO
* @author zxc
* @date 2022/7/19 10:24
*/
@PostMapping("list")
public Result<PageData> serviceRecordV2List(@LoginUser TokenDto tokenDto, @RequestBody ServiceRecordV2ListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, ServiceRecordV2ListFormDTO.ServiceRecordV2ListForm.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData>().ok(icServiceRecordV2Service.serviceRecordV2List(formDTO));
}
/**
* Desc: 详情
* @param formDTO
* @author zxc
* @date 2022/7/19 16:37
*/
@PostMapping("detail")
public Result<ServiceRecordV2DetailResultDTO> serviceRecordV2Detail(@RequestBody ServiceRecordV2DetailFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,ServiceRecordV2DetailFormDTO.ServiceRecordV2DetailForm.class);
return new Result<ServiceRecordV2DetailResultDTO>().ok(icServiceRecordV2Service.serviceRecordV2Detail(formDTO));
}
}

70
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceScopeV2Controller.java

@ -0,0 +1,70 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcServiceScopeV2DTO;
import com.epmet.service.IcServiceScopeV2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 服务范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@RestController
@RequestMapping("icServiceScopeV2")
public class IcServiceScopeV2Controller {
@Autowired
private IcServiceScopeV2Service icServiceScopeV2Service;
@RequestMapping("page")
public Result<PageData<IcServiceScopeV2DTO>> page(@RequestParam Map<String, Object> params){
PageData<IcServiceScopeV2DTO> page = icServiceScopeV2Service.page(params);
return new Result<PageData<IcServiceScopeV2DTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcServiceScopeV2DTO> get(@PathVariable("id") String id){
IcServiceScopeV2DTO data = icServiceScopeV2Service.get(id);
return new Result<IcServiceScopeV2DTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody IcServiceScopeV2DTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icServiceScopeV2Service.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcServiceScopeV2DTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icServiceScopeV2Service.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icServiceScopeV2Service.delete(ids);
return new Result();
}
}

17
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/HeartAttachmentDao.java

@ -0,0 +1,17 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.HeartAttachmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* heart库附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Mapper
public interface HeartAttachmentDao extends BaseDao<HeartAttachmentEntity> {
int deleteByBusinessId(String businessId);
}

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

@ -75,4 +75,7 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao<IcCommunitySelfO
List<CommunitySelfOrganizationListDTO> queryCoordinateList(CategorySelfOrgFormDTO formDTO);
List<IcCommunitySelfOrganizationEntity> selectByIds(@Param("communityOrgIds") List<String> communityOrgIds);
String getCommunityOrgName(@Param("id") String id);
String getPartyUnitName(@Param("id") String id);
}

17
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyCategoryDao.java

@ -0,0 +1,17 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcPolicyCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 政策匹配资源类型
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Mapper
public interface IcPolicyCategoryDao extends BaseDao<IcPolicyCategoryEntity> {
int deleteByIcPolicyId(String icPolicyId);
}

34
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyDao.java

@ -0,0 +1,34 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcPolicyDTO;
import com.epmet.dto.IcPolicyItemResultDTO;
import com.epmet.entity.IcPolicyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 政策表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Mapper
public interface IcPolicyDao extends BaseDao<IcPolicyEntity> {
/**
* 房屋信息统计信息查询有哪些可选项
* @param customerId
* @param groupType
* @return
*/
List<IcPolicyItemResultDTO> selectItemList(@Param("customerId") String customerId, @Param("groupType") String groupType);
List<IcPolicyDTO> policyList(@Param("customerId")String customerId,
@Param("agencyId")String agencyId,
@Param("title")String title,
@Param("content")String content,
@Param("expiredFlag")String expiredFlag);
}

17
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyRuleDao.java

@ -0,0 +1,17 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcPolicyRuleEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 政策匹配规则
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Mapper
public interface IcPolicyRuleDao extends BaseDao<IcPolicyRuleEntity> {
int deleteByIcPolicyId(String policyId);
}

17
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyRuleDetailDao.java

@ -0,0 +1,17 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcPolicyRuleDetailEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 政策匹配规则明细
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Mapper
public interface IcPolicyRuleDetailDao extends BaseDao<IcPolicyRuleDetailEntity> {
int deleteByRuleId(String ruleId);
}

20
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackV2Dao.java

@ -0,0 +1,20 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcServiceFeedbackV2DTO;
import com.epmet.entity.IcServiceFeedbackV2Entity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 服务记录反馈表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Mapper
public interface IcServiceFeedbackV2Dao extends BaseDao<IcServiceFeedbackV2Entity> {
IcServiceFeedbackV2DTO getFeedbackV2(@Param("serviceRecordId") String serviceRecordId);
}

28
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordV2Dao.java

@ -0,0 +1,28 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.ServiceRecordV2ListFormDTO;
import com.epmet.dto.result.ServiceRecordV2ListResultDTO;
import com.epmet.entity.IcServiceRecordV2Entity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 服务记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Mapper
public interface IcServiceRecordV2Dao extends BaseDao<IcServiceRecordV2Entity> {
/**
* Desc:服务管理列表
* @param formDTO
* @author zxc
* @date 2022/7/19 10:24
*/
List<ServiceRecordV2ListResultDTO> serviceRecordV2List(ServiceRecordV2ListFormDTO formDTO);
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java

@ -1,6 +1,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcServiceScopeV2DTO;
import com.epmet.dto.result.IcServiceScopeDTO;
import com.epmet.entity.IcServiceScopeEntity;
import org.apache.ibatis.annotations.Mapper;
@ -20,4 +21,6 @@ public interface IcServiceScopeDao extends BaseDao<IcServiceScopeEntity> {
int update(@Param("serviceId") String serviceId, @Param("userId") String userId);
List<IcServiceScopeDTO> selectList(String serviceRecordId);
List<IcServiceScopeV2DTO> selectListV2(@Param("serviceRecordId") String serviceRecordId);
}

16
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeV2Dao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcServiceScopeV2Entity;
import org.apache.ibatis.annotations.Mapper;
/**
* 服务范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Mapper
public interface IcServiceScopeV2Dao extends BaseDao<IcServiceScopeV2Entity> {
}

82
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/HeartAttachmentEntity.java

@ -0,0 +1,82 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* heart库附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("heart_attachment")
public class HeartAttachmentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 业务id
*/
private String businessId;
/**
* 政策ic_policy;服务ic_service_record_v2
*/
private String attachTo;
/**
* 附件名
*/
private String name;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String format;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String type;
/**
* 附件地址
*/
private String url;
/**
* 排序字段
*/
private Integer sort;
/**
* 附件状态审核中auditing
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
现在图片是同步审核的所以图片只有auto_passed一种状态
*/
private String status;
/**
* 失败原因
*/
private String reason;
/**
* 语音或视频时长,
*/
private Integer duration;
}

44
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPolicyCategoryEntity.java

@ -0,0 +1,44 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 政策匹配资源类型
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_policy_category")
public class IcPolicyCategoryEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 政策id
*/
private String icPolicyId;
/**
* 分类编码
*/
private String categoryCode;
/**
* 分类全路径,包含CATEGORY_CODE,英文逗号隔开
*/
private String codePath;
}

64
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPolicyEntity.java

@ -0,0 +1,64 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 政策表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_policy")
public class IcPolicyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 政策创建人所属组织id
*/
private String orgId;
/**
* AGENCY_ID的全路径含agency_id
*/
private String orgIdPath;
/**
* 政策级别0市级1区级2街道级
*/
private String policyLevel;
/**
* 生效起止日期
*/
private Date startDate;
/**
* 截止日期
*/
private Date endDate;
/**
* 政策标题
*/
private String title;
/**
* 政策内容
*/
private String content;
}

110
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPolicyRuleDetailEntity.java

@ -0,0 +1,110 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 政策匹配规则明细
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_policy_rule_detail")
public class IcPolicyRuleDetailEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 政策id
*/
private String icPolicyId;
/**
* 规则id
*/
private String ruleId;
/**
* 规则描述文字例如基础信息性别等于女
*/
private String ruleDesc;
/**
* resi:人员信息,house:房屋信息stat:统计信息
*/
private String groupType;
/**
* 与下一条的关系andor
* 如果没有条件的话此列为空
*/
private String nextLogicalRel;
/**
* 分组id人员信息有值
*/
private String itemGroupId;
/**
* 组件id人员信息有值
*/
private String itemId;
/**
* 查询类型等于不等于....;来源于字典表sql_query_type
*/
private String queryType;
/**
* 表名人员信息有值房屋信息也有值
*/
private String colTable;
/**
* 人员信息存储组件对应的列名房屋信息存储ic_house表的列名统计信息应该是定义到字典表这里存储字典key就行吧
*/
private String colKey;
/**
* 参数值
*/
private String colVal;
/**
* 排序字段;同一group_type升序
*/
private Integer sort;
/**
* 用于前端展示基础信息教育信息房屋类型.....
*/
private String itemGroupName;
/**
* 用于前端展示姓名手机号......
*/
private String itemLabel;
/**
* 用于前端展示等于不等于大于小于....
*/
private String queryTypeName;
/**
* 用于前端展示参数值显示值eg:男女
*/
private String colValLabel;
/**
* 用于前端展示逻辑并且或者
*/
private String nextLogicalRelName;
}

44
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPolicyRuleEntity.java

@ -0,0 +1,44 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 政策匹配规则
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_policy_rule")
public class IcPolicyRuleEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 政策id
*/
private String icPolicyId;
/**
* 规则名称
*/
private String ruleName;
/**
* 排序字段
*/
private Integer sort;
}

66
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackV2Entity.java

@ -0,0 +1,66 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 服务记录反馈表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_service_feedback_v2")
public class IcServiceFeedbackV2Entity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String customerId;
/**
* 服务ID
*/
private String serviceRecordId;
/**
* 服务目标
*/
private String serviceGoal;
/**
* 服务效果
*/
private String serviceEffect;
/**
* 服务人数
*/
private Integer servicePeopleNumber;
/**
* 满意度满意度 - 不满意:bad基本满意:good非常满意:perfect
*/
private String satisfaction;
/**
* 地址经度
*/
private String longitude;
/**
* 地址纬度
*/
private String latitude;
/**
* 地址
*/
private String address;
}

84
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordV2Entity.java

@ -0,0 +1,84 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 服务记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_service_record_v2")
public class IcServiceRecordV2Entity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String customerId;
/**
* 服务组织类型
社区自组织community_org
志愿者ic_user_volunteer
联建单位party_unit
*/
private String serviceOrgType;
/**
* 服务组织ID
*/
private String serviceOrgId;
/**
* 经办人姓名
*/
private String principalName;
/**
* 联系方式
*/
private String principalContact;
/**
* 服务时间
*/
private Date serviceTimeStart;
/**
* 服务截止时间
*/
private Date serviceTimeEnd;
/**
* in_service服务中completed:已完成cancel取消
*/
private String serviceStatus;
/**
* 备注
*/
private String remark;
/**
* 服务名称
*/
private String serviceName;
/**
* 政策依据ID
*/
private String policyId;
private String serviceCategoryKey;
}

54
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeV2Entity.java

@ -0,0 +1,54 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 服务范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_service_scope_v2")
public class IcServiceScopeV2Entity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String customerId;
/**
* 服务记录的ID
*/
private String serviceRecordId;
/**
* agency单位grid网格neighborhood小区
*/
private String objectType;
/**
* 选中的组织的ID
*/
private String objectId;
/**
* 发布范围的组织ID PATH
*/
private String objectIdPath;
/**
*
*/
private String objectName;
}

33
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java

@ -17,7 +17,14 @@
package com.epmet.redis;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.IcCommunitySelfOrganizationConstant;
import com.epmet.dao.IcCommunitySelfOrganizationDao;
import com.epmet.dto.IcResiUserDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@ -31,6 +38,10 @@ import org.springframework.stereotype.Component;
public class IcPartyUnitRedis {
@Autowired
private RedisUtils redisUtils;
@Autowired
private IcCommunitySelfOrganizationDao communitySelfOrganizationDao;
@Autowired
private EpmetUserOpenFeignClient userOpenFeignClient;
public void delete(Object[] ids) {
@ -44,4 +55,26 @@ public class IcPartyUnitRedis {
return null;
}
public String getServiceOrgName(String customerId,String serviceOrgType,String serviceOrgId){
String serviceOrgNameKey = RedisKeys.getServiceOrgNameKey(customerId, serviceOrgType, serviceOrgId);
Object o = redisUtils.get(serviceOrgNameKey);
if (null != o){
return o.toString();
}
String name = "";
if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_COMMUNITY_ORG)){
name = communitySelfOrganizationDao.getCommunityOrgName(serviceOrgId);
}else if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_PARTY_UNIT)){
name = communitySelfOrganizationDao.getPartyUnitName(serviceOrgId);
}else if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_IC_USER_VOLUNTEEr)){
Result<IcResiUserDTO> icResiUserDTO = userOpenFeignClient.getIcResiUserDTO(serviceOrgId);
if (!icResiUserDTO.success()){
throw new EpmetException("getIcResiUserDTO method is failure");
}
name = icResiUserDTO.getData().getName();
}
redisUtils.set(serviceOrgNameKey,name,RedisUtils.DEFAULT_EXPIRE);
return name;
}
}

78
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/HeartAttachmentService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.HeartAttachmentDTO;
import com.epmet.entity.HeartAttachmentEntity;
import java.util.List;
import java.util.Map;
/**
* heart库附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
public interface HeartAttachmentService extends BaseService<HeartAttachmentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<HeartAttachmentDTO>
* @author generator
* @date 2022-07-18
*/
PageData<HeartAttachmentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<HeartAttachmentDTO>
* @author generator
* @date 2022-07-18
*/
List<HeartAttachmentDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return HeartAttachmentDTO
* @author generator
* @date 2022-07-18
*/
HeartAttachmentDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-07-18
*/
void save(HeartAttachmentDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-07-18
*/
void update(HeartAttachmentDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-07-18
*/
void delete(String[] ids);
}

78
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyCategoryService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcPolicyCategoryDTO;
import com.epmet.entity.IcPolicyCategoryEntity;
import java.util.List;
import java.util.Map;
/**
* 政策匹配资源类型
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
public interface IcPolicyCategoryService extends BaseService<IcPolicyCategoryEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcPolicyCategoryDTO>
* @author generator
* @date 2022-07-18
*/
PageData<IcPolicyCategoryDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcPolicyCategoryDTO>
* @author generator
* @date 2022-07-18
*/
List<IcPolicyCategoryDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcPolicyCategoryDTO
* @author generator
* @date 2022-07-18
*/
IcPolicyCategoryDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-07-18
*/
void save(IcPolicyCategoryDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-07-18
*/
void update(IcPolicyCategoryDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-07-18
*/
void delete(String[] ids);
}

78
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyRuleDetailService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcPolicyRuleDetailDTO;
import com.epmet.entity.IcPolicyRuleDetailEntity;
import java.util.List;
import java.util.Map;
/**
* 政策匹配规则明细
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
public interface IcPolicyRuleDetailService extends BaseService<IcPolicyRuleDetailEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcPolicyRuleDetailDTO>
* @author generator
* @date 2022-07-18
*/
PageData<IcPolicyRuleDetailDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcPolicyRuleDetailDTO>
* @author generator
* @date 2022-07-18
*/
List<IcPolicyRuleDetailDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcPolicyRuleDetailDTO
* @author generator
* @date 2022-07-18
*/
IcPolicyRuleDetailDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-07-18
*/
void save(IcPolicyRuleDetailDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-07-18
*/
void update(IcPolicyRuleDetailDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-07-18
*/
void delete(String[] ids);
}

78
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyRuleService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcPolicyRuleDTO;
import com.epmet.entity.IcPolicyRuleEntity;
import java.util.List;
import java.util.Map;
/**
* 政策匹配规则
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
public interface IcPolicyRuleService extends BaseService<IcPolicyRuleEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcPolicyRuleDTO>
* @author generator
* @date 2022-07-18
*/
PageData<IcPolicyRuleDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcPolicyRuleDTO>
* @author generator
* @date 2022-07-18
*/
List<IcPolicyRuleDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcPolicyRuleDTO
* @author generator
* @date 2022-07-18
*/
IcPolicyRuleDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-07-18
*/
void save(IcPolicyRuleDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-07-18
*/
void update(IcPolicyRuleDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-07-18
*/
void delete(String[] ids);
}

67
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyService.java

@ -0,0 +1,67 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcPolicyDTO;
import com.epmet.dto.IcPolicyItemResultDTO;
import com.epmet.dto.IcPolicyRuleDTO;
import com.epmet.dto.form.policy.IcPolicyFormDTO;
import com.epmet.dto.form.policy.IcPolicyPageFormDTO;
import com.epmet.dto.form.resi.ResisByPolicyRulesFormDTO;
import com.epmet.dto.result.resi.ResiByPolicyInfoResultDTO;
import com.epmet.entity.IcPolicyEntity;
import com.epmet.entity.IcPolicyRuleDetailEntity;
import java.util.List;
import java.util.Map;
/**
* 政策表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-07-18
*/
public interface IcPolicyService extends BaseService<IcPolicyEntity> {
/**
* 房屋信息统计信息查询有哪些可选项
*
* @param customerId
* @param groupType
* @return
*/
List<IcPolicyItemResultDTO> itemList(String customerId, String groupType);
/**
* 政策管理-新增/修改
*
* @param formDTO
*/
void addOrUpdatePolicy(IcPolicyFormDTO formDTO);
/**
* 列表查询
* @param formDTO
* @return
*/
PageData<IcPolicyDTO> policyList(IcPolicyPageFormDTO formDTO);
/**
* Desc: 政策列表下拉选
* @param formDTO
* @author zxc
* @date 2022/7/21 09:48
*/
List<IcPolicyDTO> policyListSelect(String userId,String customerId);
List<IcPolicyRuleDTO> ruleList(String customerId,String policyId);
IcPolicyDTO policyDetail(String customerId,String policyId);
/**
* 政策规则查询
* @param customerId
* @param ruleId
* @return
*/
Map<String, List<IcPolicyRuleDetailEntity>> listPolicyRules4QueryAndExport(String customerId, String ruleId);
}

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

Loading…
Cancel
Save