Browse Source

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

 Conflicts:
	epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xls
dev
wangxianzhang 3 years ago
parent
commit
bdfe019920
  1. 30
      epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.26__alter_dict.sql
  2. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java
  3. 5
      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/exception/EpmetErrorCode.java
  5. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java
  6. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerAgencyDao.xml
  7. 5
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java
  8. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java
  9. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java
  10. 20
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  11. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java
  12. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  13. 36
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  14. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java
  15. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml
  16. 19
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml
  17. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml
  18. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
  19. 2
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java
  20. 15
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java
  21. 4
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java
  22. 12
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java
  23. 15
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyMemberEntity.java
  24. 9
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartyMemberImportExcel.java
  25. 7
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java
  26. 10
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/db/migration/V0.0.12__edit_partymember.sql
  27. 1
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/db/migration/V0.0.13__partyorgnamelength.sql
  28. BIN
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/excel/ic_party_member.xlsx
  29. 3
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml
  30. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeDeathDTO.java
  31. 10
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java
  32. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcBirthRecordDTO.java
  33. 96
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcDangerAreaDTO.java
  34. 62
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java
  35. 146
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java
  36. 78
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BirthRecordListFormDTO.java
  37. 19
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DangerAreaListFormDTO.java
  38. 20
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripDetailFormDTO.java
  39. 29
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripListFormDTO.java
  40. 26
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripPieDetailFormDTO.java
  41. 74
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java
  42. 25
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OnlyIdFormDTO.java
  43. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java
  44. 71
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripListResultDTO.java
  45. 19
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripPieDetailResultDTO.java
  46. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcMoveInListResultDTO.java
  47. 94
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
  48. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeDeathController.java
  49. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java
  50. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcBirthRecordController.java
  51. 222
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcDangerAreaController.java
  52. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java
  53. 211
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java
  54. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcBirthRecordDao.java
  55. 19
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcDangerAreaDao.java
  56. 21
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java
  57. 56
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcDangerAreaEntity.java
  58. 72
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java
  59. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPartyMemberEntity.java
  60. 61
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java
  61. 55
      epmet-user/epmet-user-server/src/main/java/com/epmet/enums/DangerLevelEnum.java
  62. 38
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaImportExcel.java
  63. 22
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaResultExcel.java
  64. 102
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExcel.java
  65. 150
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExportExcel.java
  66. 123
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcTripReportRecordExportExcel.java
  67. 71
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java
  68. 71
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java
  69. 71
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatHistoryExportExcel.java
  70. 32
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java
  71. 35
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/error/IcPsTripReportRecordErrorExcel.java
  72. 137
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcDangerAreaExcelImportListener.java
  73. 178
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcPsTripReportExcelImportListener.java
  74. 31
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java
  75. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeDeathService.java
  76. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java
  77. 84
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcDangerAreaService.java
  78. 35
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java
  79. 47
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeDeathServiceImpl.java
  80. 40
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java
  81. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java
  82. 263
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcDangerAreaServiceImpl.java
  83. 44
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java
  84. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcFollowUpRecordServiceImpl.java
  85. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java
  86. 44
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  87. 366
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java
  88. 13
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.81__edit_partymember.sql
  89. 20
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.82__ic_epidemic_special_attention_panshi.sql
  90. 22
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.83__alter_ic_trip_report.sql
  91. 20
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.84__ic_danger_area.sql
  92. 3
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.85__ic_volunteer_poly.sql
  93. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/attention_nat_template.xlsx
  94. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/ic_danger_area_template.xlsx
  95. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xls
  96. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template_old_20221108.xls
  97. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx
  98. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/ps_trip_report_import_template.xlsx
  99. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/trip_report_import_template.xlsx
  100. 1
      epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml

30
epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.26__alter_dict.sql

@ -0,0 +1,30 @@
-- 相成的
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 ('1587017193115787265', 'dangerAreaLevel', '风险地区级别', '', 0, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:42:39', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:42:39');
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 ('1587017335055228929', 1587017193115787265, '低风险', '0', '0', '', 0, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:13', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:13');
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 ('1587017381859467265', 1587017193115787265, '中风险', '1', '0', '', 1, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:24', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43: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 ('1587017428642734082', 1587017193115787265, '高风险', '2', '0', '', 2, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:35', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43: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 ('2100000000000000001', 'traffic_type', '交通方式', '交通方式【行程上报】', '36', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
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 ('2100000000000000002', 'sojourn_history', '7天内旅居史情况', '7天内旅居史情况【行程上报】', '37', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
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 ('2100000000000000004', 'trip_data_type', '行程记录类型', '行程记录类型【行程上报】', '39', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000001', '2100000000000000001', '飞机', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000002', '2100000000000000001', '动车', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000003', '2100000000000000001', '火车', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000004', '2100000000000000001', '自驾', '4', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000005', '2100000000000000001', '其他', '5', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000001', '2100000000000000002', '高风险', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000002', '2100000000000000002', '中风险', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000003', '2100000000000000002', '低风险', '0', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000004', '2100000000000000002', '无风险', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000001', '2100000000000000004', '省内', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000002', '2100000000000000004', '省外', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000003', '2100000000000000004', '市内', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000004', '2100000000000000004', '县内', '4', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27');

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java

@ -99,6 +99,8 @@ public interface StrConstant {
String PY_CUSTOMER = "6f203e30de1a65aab7e69c058826cd80";
//平音客户跟组织Id
String PY_ROOT_AGENCY = "53613e1c5de6ed473467f0159a10b135";
//磐石街道客户Id
String PS_CUSTOMER_ID = "1580460084738760705";
/**
* 单位积分,积分上限积分说明积分事件

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

@ -29,6 +29,11 @@ public enum DictTypeEnum {
IC_DANGER_TYPE("ic_danger_type","危化品种类",24),
POLICY_LEVEL("policy_level","政策级别",25),
LOG_TYPE("log_type", "日志类型", 33),
DANGER_AREA_LEVEL_TYPE("dangerAreaLevel", "风险地区等级", 34),
TRAFFIC_TYPE("traffic_type", "交通方式", 36),
SOJOURN_HISTORY("sojourn_history", "7天内旅居史情况", 37),
TRIP_DATA_TYPE("trip_data_type", "行程记录类型", 39),
;
private final String code;

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

@ -271,6 +271,8 @@ public enum EpmetErrorCode {
SAMPLE_TIME_AND_RESULT_IS_NULL_ERROR(8934,"检测时间或结果不能为空"),
ID_CARD_ERROR(8935,"请输入正确的身份证号或护照号"),
DANGER_AREA_ERROR(8937,"风险地区已存在"),
MISMATCH(10086,"人员与房屋信息不匹配,请与工作人员联系。"),
//通用错误码 start

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

@ -213,7 +213,9 @@ public class MaskProcessor {
}
String maskStr = StrUtil.repeatByLength("*", length - 7);
if (length != 11) {
return StringUtils.leftPad(StringUtils.right(originString, 4), length, "*");
}
return originString.replaceAll("^(1\\d{2})\\d*(\\d{4})$", new StringBuilder("$1").append(maskStr).append("$2").toString());
}

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

@ -328,7 +328,7 @@
<!-- 查询员工的证件号和手机号 -->
<select id="getEmployeeRegisterMobileAndIdCard" resultType="java.util.Map">
select MOBILE,ID_CARD from ic_employee_register where id = #{registerId}
select MOBILE,ID_CARD,NAME from ic_employee_register where id = #{registerId}
</select>
</mapper>

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

@ -21,6 +21,7 @@ public interface ImportTaskConstants {
String BIZ_TYPE_IC_PARTY_MEMBER = "ic_party_member";
String BIZ_TYPE_IC_DANGEROUS_CHEMICALS = "ic_dangerous_chemicals";
String BIZ_TYPE_IC_ENTERPRISE="ic_enterprise";
String BIZ_TYPE_IC_DANGER_AREA="ic_danger_area";
String IC_POINT_NUCLEIC_MONITORING = "ic_point_nucleic_monitoring";
String IC_POINT_VACCINES_INOCULATION = "ic_point_vaccines_inoculation";
// 新冠病毒疫苗接种人员信息台账
@ -41,6 +42,10 @@ public interface ImportTaskConstants {
* 行程上报
*/
String BIZ_TYPE_IC_TRIP_REPORT = "ic_trip_report";
/**
* 磐石-行程上报
*/
String PS_BIZ_TYPE_IC_TRIP_REPORT = "ps_ic_trip_report";
/**
* 处理状态处理中

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

@ -124,4 +124,6 @@ public interface IcPartyUnitDao extends BaseDao<IcPartyUnitEntity> {
* @return
*/
List<IcPartyUnitEntity> pageList(PartyUnitFormDTO formDTO);
List<String> getUnitNames(@Param("unitIds") List<String> unitIds);
}

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

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.demand.ServiceItemResultDTO;
import com.epmet.entity.IcServiceItemDictEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -36,4 +37,6 @@ public interface IcServiceItemDictDao extends BaseDao<IcServiceItemDictEntity> {
List<ServiceItemResultDTO> pageList(String customerId);
IcServiceItemDictEntity selectMax(String customerId);
String selectName(@Param("customerId") String customerId, @Param("categoryCode") String categoryCode);
}

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

@ -6,13 +6,12 @@ import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.PartyActivityFormDTO;
import com.epmet.dto.form.PartyTypepercentFormDTO;
import com.epmet.dto.form.PartyUnitFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.PartyUnitListbriefFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.*;
import com.epmet.dto.result.CheckStaffInfoResultDTO;
import com.epmet.dto.result.PartyTypepercentResultDTO;
import com.epmet.dto.result.PartyUnitDistributionResultDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcPartyUnitEntity;
import org.springframework.web.multipart.MultipartFile;
@ -20,7 +19,6 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* 联建单位
@ -181,4 +179,12 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
List<PartyTypepercentResultDTO> getTypepercent(PartyTypepercentFormDTO form);
void editPartyOrCommunity(CheckStaffInfoResultDTO formDTO);
/**
* 查询联建单位名称
* 不限制del_flag='0'
* @param unitIds
* @return
*/
List<String> getUnitNames(List<String> unitIds);
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java

@ -79,4 +79,6 @@ public interface IcServiceItemDictService extends BaseService<IcServiceItemDictE
* @Date 2022/4/14 14:31
*/
void customerInit(String customerId);
String getCategoryName(String customerId, String id);
}

23
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java

@ -119,12 +119,17 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
//获取组织下联建单位
IcPartyUnitDTO unitDTO = new IcPartyUnitDTO();
unitDTO.setAgencyId(formDTO.getAgencyId());
Map<String, String> option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
// Map<String, String> option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
dtoList.forEach(dto -> {
//联建单位ID与单位名匹配
List<String> unitIds = Arrays.asList(dto.getUnitId().split(StrConstant.COMMA));
List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
// List<String> unitNames = unitIds.stream().map(option::get).collect(Collectors.toList());
// if(CollectionUtils.isEmpty(unitNames)){
List<String> unitNames=icPartyUnitService.getUnitNames(unitIds);
// }
dto.setUnitIdList(unitIds);
dto.setUnitName(StringUtils.join(unitNames, StrConstant.COMMA));
dto.setUnitNameList(unitNames);
if (StringUtils.isNotEmpty(dto.getGridId())) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfo) {
@ -132,6 +137,20 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
dto.setAgencyName(gridInfo.getAgencyName());
}
}
//服务事项
if(StringUtils.isNotBlank(dto.getServiceMatter())){
List<String> serviceMatterid = Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA));
List<String> serviceMatterNameList=new ArrayList<>();
for(String id:serviceMatterid){
String categoryName=icServiceItemDictService.getCategoryName(dto.getCustomerId(),id);
if(StringUtils.isNotBlank(categoryName)){
serviceMatterNameList.add(categoryName);
}
}
dto.setServiceMatterList(serviceMatterid);
dto.setServiceMatterNameList(serviceMatterNameList);
dto.setServiceMatterName(StringUtils.join(serviceMatterNameList, StrConstant.COMMA));
}
});
}

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

@ -43,6 +43,7 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
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.ExcelPoiUtils;
import com.epmet.commons.tools.utils.Result;
@ -75,6 +76,7 @@ import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.entity.ContentType;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
@ -114,7 +116,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService;
@Resource
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
@Override
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
@ -329,11 +332,18 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
*/
@Override
public List<OptionDTO> option(IcPartyUnitDTO dto) {
LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId());
wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime);
wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter());
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
// LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId());
// wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime);
// wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter());
// List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
// 改成查询当前组织及下级的数据
String customerId = loginUserUtil.getLoginUserCustomerId();
PartyUnitFormDTO partyUnitFormDTO = new PartyUnitFormDTO();
partyUnitFormDTO.setCustomerId(customerId);
partyUnitFormDTO.setAgencyId(dto.getAgencyId());
partyUnitFormDTO.setServiceMatter(dto.getServiceMatter());
List<IcPartyUnitEntity> list = baseDao.pageList(partyUnitFormDTO);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
}
@ -768,4 +778,18 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
}
}
/**
* 查询联建单位名称
* 不限制del_flag='0'
*
* @param unitIds
* @return
*/
@Override
public List<String> getUnitNames(List<String> unitIds) {
if(CollectionUtils.isEmpty(unitIds)){
return new ArrayList<>();
}
return baseDao.getUnitNames(unitIds);
}
}

5
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java

@ -201,5 +201,8 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl<IcServiceItemD
}
}
@Override
public String getCategoryName(String customerId, String categoryCode) {
return baseDao.selectName(customerId,categoryCode);
}
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml

@ -62,7 +62,8 @@
LONGITUDE,
LATITUDE,
RESULT,
a.AGENCY_ID
a.AGENCY_ID,
a.CUSTOMER_ID
FROM
ic_party_activity a
INNER JOIN (

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

@ -224,4 +224,23 @@
</if>
order by u.CREATED_TIME desc
</select>
<select id="getUnitNames" parameterType="map" resultType="java.lang.String">
SELECT
u.UNIT_NAME
FROM
ic_party_unit u
where 1=1
<trim prefix="AND ( " suffix=" )">
<foreach collection="unitIds" separator="or" item="id" index="index" >
u.ID = #{id}
</foreach>
</trim>
ORDER BY field(
u.ID,
<foreach item="unitId" collection="unitIds" separator=",">
#{unitId}
</foreach>
)
</select>
</mapper>

10
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml

@ -31,4 +31,14 @@
order by CATEGORY_CODE desc
limit 1
</select>
<select id="selectName" parameterType="map" resultType="java.lang.String">
SELECT
d.CATEGORY_NAME
FROM
ic_service_item_dict d
WHERE
d.CUSTOMER_ID = #{customerId}
AND d.CATEGORY_CODE = #{categoryCode}
</select>
</mapper>

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java

@ -414,7 +414,7 @@ public class AgencyController {
//获取AccessToken
String accessToken = ThirdUtils.getAccessToken(tokenDto.getCustomerId()).getResiToken();
if (org.apache.commons.lang3.StringUtils.isBlank(accessToken)) {
log.warn("获取accessToken失败,customerId:{}", tokenDto.getCustomerId());
log.error("获取accessToken失败,customerId:{}", tokenDto.getCustomerId());
throw new RenException("获取accessToken失败,customerId:{}", tokenDto.getCustomerId());
}
CustomerAgencyDTO customerAgencyDTO = customerAgencyService.get(id);
@ -446,6 +446,7 @@ public class AgencyController {
qrCodeMultipartFile.setOriginalFilename(originalFilename);
Result<UploadImgResultDTO> uploadResult = ossFeignClient.uploadQrCode(qrCodeMultipartFile);
if (!uploadResult.success()) {
log.error("调用oss服务上传活动居民信息录入码失败");
throw new RenException("调用oss服务上传活动居民信息录入码失败");
}

2
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java

@ -124,7 +124,7 @@ public class IcExportTemplateServiceImpl extends BaseServiceImpl<IcExportTemplat
//增加校验 同组织内模板名不能重复
templist.forEach(t -> {
if (formDTO.getName().equals(t.getName())) {
throw new EpmetException(9999, "当前组织下已存在相同名称的模板!", "当前组织下已存在相同名称的模板!");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前组织下已存在相同名称的模板!", "当前组织下已存在相同名称的模板!");
}
});
sort = templist.get(NumConstant.ZERO).getSort() + NumConstant.ONE;

15
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java

@ -111,6 +111,21 @@ public class IcPartyMemberDTO implements Serializable {
*/
private String isDyzxh;
/**
* 入党时所在党支部
*/
private String rdsszzb;
/**
* 组织关系转入社区时间
*/
private String zzgxzrsqsj;
/**
* 是否请长假
*/
private String isQcj;
/**
* 是否免学习0否,1是
*/

4
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java

@ -82,4 +82,8 @@ public class IcPartyMemberFromDTO extends PageFormDTO implements Serializable {
private String payEndDate;
private String year;
private String month;
/**
* 是否请长假
*/
private String isQcj;
}

12
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java

@ -101,24 +101,24 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart
//同一个客户下,名称和编码不可重复
IcPartyOrgEntity repeatName = baseDao.selectByCuIdAndNameOrCode(dto.getPartyOrgName(), null, dto.getCustomerId());
if (null != repeatName) {
throw new EpmetException("行政组织名称不可重复!");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"partyOrgName重复","行政组织名称不可重复!");
}
if (StringUtils.isNotBlank(dto.getPartyOrgCode())) {
IcPartyOrgEntity repeatCode = baseDao.selectByCuIdAndNameOrCode(null, dto.getPartyOrgCode(), dto.getCustomerId());
if (null != repeatCode) {
throw new EpmetException("行政组织编码不可重复!");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"partyOrgCode重复","行政组织编码不可重复!");
}
}
IcPartyOrgEntity parentOrg = baseDao.selectById(dto.getOrgPid());
//判断当前党组织的类型是否是所选上级党组织类型的直接下级
if ("0".equals(dto.getOrgPid())) {
if (PartyOrgTypeEnum.BRANCH.getCode().equals(dto.getPartyOrgType())) {
throw new EpmetException("支部不可设为一级组织!");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"支部不可设为一级组织!","支部不可设为一级组织!");
}
//一个客户下只能有一个一级组织
IcPartyOrgEntity levelOneOrg = baseDao.selectLevelOneOrgByCustomerId(dto.getCustomerId());
if (null != levelOneOrg) {
throw new EpmetException("当前客户下已存在一级组织,不可重复添加!");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"当前客户下已存在一级组织,不可重复添加!","当前客户下已存在一级组织,不可重复添加!");
}
} else {
checkOrgType(parentOrg.getPartyOrgType(), dto.getPartyOrgType());
@ -127,7 +127,7 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart
if (!PartyOrgTypeEnum.BRANCH.getCode().equals(dto.getPartyOrgType())) {
IcPartyOrgEntity isAgency = baseDao.selectByAgencyId(dto.getAgencyId(), PartyOrgTypeEnum.BRANCH.getCode());
if (null != isAgency) {
throw new EpmetException("该行政组织已被关联!");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"该行政组织已被关联!","该行政组织已被关联!");
}
AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId());
//判断该所选的行政组织类型是否与当前党组织的类型一致
@ -140,7 +140,7 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart
}
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId());
if (null == agencyInfo) {
throw new EpmetException("组织信息获取失败");
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"组织信息获取失败","组织信息获取失败");
}
IcPartyOrgEntity entity = ConvertUtils.sourceToTarget(dto, IcPartyOrgEntity.class);
insert(entity);

15
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyMemberEntity.java

@ -98,6 +98,21 @@ public class IcPartyMemberEntity extends BaseEpmetEntity {
*/
private String isDyzxh;
/**
* 入党时所在党支部
*/
private String rdsszzb;
/**
* 组织关系转入社区时间
*/
private String zzgxzrsqsj;
/**
* 是否请长假
*/
private String isQcj;
/**
* 是否免学习0否,1是
*/

9
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartyMemberImportExcel.java

@ -56,6 +56,15 @@ public class IcPartyMemberImportExcel {
@ExcelProperty("文化程度")
private String culture;
@ExcelProperty("入党时所在党支部")
private String rdsszzb;
@ExcelProperty("组织关系转入社区时间")
private String zzgxzrsqsj;
@ExcelProperty("是否请长假")
private String isQcj;
@ExcelProperty("备注")
private String remark;

7
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java

@ -13,7 +13,6 @@ import com.epmet.commons.tools.dto.form.DictListFormDTO;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.dto.result.DictListResultDTO;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.enums.IcFormCodeEnum;
import com.epmet.commons.tools.enums.PartyPostEnum;
@ -399,6 +398,9 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
if (StringUtils.isBlank(entity.getIsTx())) {
entity.setIsTx(NumConstant.ZERO_STR);
}
if (StringUtils.isBlank(entity.getIsQcj())) {
entity.setIsQcj(NumConstant.ZERO_STR);
}
//判断党员是否已存在,有则更新,没有则添加
if (null != partyMember) {
@ -674,6 +676,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
e.setIsLd(("是").equals(e.getIsLd())?NumConstant.ONE_STR:NumConstant.ZERO_STR);
e.setIsDyzxh(("是").equals(e.getIsDyzxh())?NumConstant.ONE_STR:NumConstant.ZERO_STR);
e.setIsMxx(("是").equals(e.getIsMxx())?NumConstant.ONE_STR:NumConstant.ZERO_STR);
e.setIsQcj(("是").equals(e.getIsQcj())?NumConstant.ONE_STR:NumConstant.ZERO_STR);
//职务
e.setPartyZw(PartyPostEnum.getCode(e.getPartyZw()));
//文化程度
@ -691,7 +694,7 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl<IcPartyMemberDao,
if (result.success() && null != result.getData()) {
e.setIcResiUser(result.getData().getIcResiUser());
e.setVolunteerCategory(result.getData().getVolunteerCategory());
e.setAddress(result.getData().getAddress());
e.setAddress(StringUtils.isNotBlank(result.getData().getAddress())?result.getData().getAddress():e.getAddress());
}
e.setCreatedBy(currentUserId);
e.setUpdatedBy(currentUserId);

10
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/db/migration/V0.0.12__edit_partymember.sql

@ -0,0 +1,10 @@
ALTER TABLE `ic_party_member`
ADD COLUMN `RDSSZZB` varchar(255) NULL COMMENT '入党时所在党支部' AFTER `IS_DYZXH`,
ADD COLUMN `ZZGXZRSQSJ` varchar(64) NULL COMMENT '组织关系转入社区时间' AFTER `RDSSZZB`,
ADD COLUMN `IS_QCJ` char(2) NULL COMMENT '是否请长假' AFTER `ZZGXZRSQSJ`;
UPDATE ic_party_member
SET IS_QCJ = '0'
WHERE
IS_QCJ IS NULL;

1
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/db/migration/V0.0.13__partyorgnamelength.sql

@ -0,0 +1 @@
alter table ic_party_org MODIFY COLUMN `PARTY_ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称';

BIN
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/excel/ic_party_member.xlsx

Binary file not shown.

3
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/IcPartyMemberDao.xml

@ -106,6 +106,9 @@
<if test='null != isMxx and "" != isMxx.trim()'>
AND a.IS_MXX = #{isMxx}
</if>
<if test='null != isQcj and "" != isQcj.trim()'>
AND a.IS_QCJ = #{isQcj}
</if>
<if test='null != culture and "" != culture.trim()'>
AND a.CULTURE = #{culture}
</if>

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeDeathDTO.java

@ -26,6 +26,11 @@ public class ChangeDeathDTO implements Serializable {
*/
private String id;
/**
* ic_resi_user主键
*/
private String icResiUserId;
/**
* epmet用户主键
*/

10
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java

@ -24,6 +24,16 @@ public class ChangeRelocationDTO implements Serializable {
*/
private String id;
/**
* ic_resi_user主键
*/
private String icResiUserId;
/**
* ic_resi_user 用户状态
*/
private String status;
/**
* 姓名
*/

4
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcBirthRecordDTO.java

@ -25,6 +25,8 @@ public class IcBirthRecordDTO implements Serializable {
*/
private String id;
private String icResiUserId;
/**
* 客户Id customer.id
*/
@ -193,4 +195,4 @@ public class IcBirthRecordDTO implements Serializable {
@JsonIgnore
private Date updatedTime;
}
}

96
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcDangerAreaDTO.java

@ -0,0 +1,96 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 疫情风险地区
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-31
*/
@Data
public class IcDangerAreaDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 风险等级
*/
// @NotBlank(message = "dangerLevel不能为空",groups = {AddGroup.class})
private String dangerLevel;
/**
*
*/
// @NotBlank(message = "province不能为空",groups = {AddGroup.class})
private String province;
/**
*
*/
// @NotBlank(message = "city不能为空",groups = {AddGroup.class})
private String city;
/**
*
*/
// @NotBlank(message = "district不能为空",groups = {AddGroup.class})
private String district;
/**
* --
*/
@NotBlank(message = "allName不能为空",groups = {AddGroup.class})
private String allName;
private String allNameCode;
/**
*
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

62
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java

@ -95,7 +95,7 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable {
private String idCard;
/**
* 原因
* 关注原因后磐石改名为隔离原因
*/
@Length(max = 500,message = "原因限制500字以内",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class})
private String reason;
@ -106,6 +106,66 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable {
@Length(max = 500,message = "备注限制500字以内",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class})
private String remark;
/**
* 管控开始时间yyyy-MM-dd,需求来源于磐石
*/
private String gkStartTime;
/**
* 管控结束时间yyyy-MM-dd,需求来源于磐石
*/
private String gkEndTime;
/**
* 干部名称,需求来源于磐石
*/
private String gbName;
/**
* 干部联系方式,需求来源于磐石
*/
private String gbMobile;
/**
* 社区网格管理员,需求来源于磐石
*/
private String gridManager;
/**
* 社区网格管理员联系方式,需求来源于磐石
*/
private String gridManagerMobile;
/**
* 基层医务工作者,需求来源于磐石
*/
private String healthWorker;
/**
* 基层医务工作者联系方式,需求来源于磐石
*/
private String healthWorkerMobile;
/**
* 民警,需求来源于磐石
*/
private String policeName;
/**
* 民警联系方式,需求来源于磐石
*/
private String policeMobile;
/**
* 志愿者,需求来源于磐石
*/
private String volunteerName;
/**
* 志愿者联系方式,需求来源于磐石
*/
private String volunteerMobile;
/**
*
*/

146
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java

@ -66,14 +66,14 @@ public class IcTripReportRecordDTO implements Serializable {
* 姓名
*/
@ColumnWidth(15)
@ExcelProperty("姓名")
@ExcelProperty(value = "姓名")
private String name;
/**
* 手机号
*/
@ColumnWidth(15)
@ExcelProperty("手机号")
@ExcelProperty(value = "手机号")
private String mobile;
/**
@ -90,7 +90,7 @@ public class IcTripReportRecordDTO implements Serializable {
* 身份证号
*/
@ColumnWidth(22)
@ExcelProperty("身份证号")
@ExcelProperty(value = "证号")
private String idCard;
/**
@ -131,14 +131,14 @@ public class IcTripReportRecordDTO implements Serializable {
* 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区
*/
@ColumnWidth(50)
@ExcelProperty("现居地")
@ExcelProperty(value = "现居地")
private String presentAddress;
/**
* 详细地址
*/
@ColumnWidth(35)
@ExcelProperty("详细地址")
@ExcelProperty(value = "现居地详细地址")
private String detailAddress;
/**
@ -157,30 +157,30 @@ public class IcTripReportRecordDTO implements Serializable {
* 来源地区地址
*/
@ColumnWidth(50)
@ExcelProperty("来自地区")
@ExcelProperty(value = "来自地区")
private String sourceAddress;
/**
* 到达日期
*/
@ColumnWidth(25)
@ExcelProperty("来到本地时间")
@ExcelProperty(value = "来到本地时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date arriveDate;
private String arriveDate;
/**
* 离开日期
*/
@ColumnWidth(25)
@ExcelProperty("离开本地时间")
@ExcelProperty(value = "离开本地时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date leaveDate;
private String leaveDate;
/**
* pc行程上报-列表返参最近一次通知时间
*/
@ColumnWidth(25)
@ExcelProperty("最近一次通知时间")
//@ExcelProperty("最近一次通知时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date latestNoticeTime;
@ -188,7 +188,7 @@ public class IcTripReportRecordDTO implements Serializable {
* 备注信息
*/
@ColumnWidth(100)
@ExcelProperty("备注")
@ExcelProperty(value = "备注")
private String remark;
/**
@ -243,4 +243,126 @@ public class IcTripReportRecordDTO implements Serializable {
@ColumnWidth(25)
@ExcelProperty("核算检测关注名单")
private String heSuanCheckDesc;
/**
* 交通方式来源字典表(traffic_type)
*/
@ExcelIgnore
private String trafficType;
/**
* 交通方式-中国字
*/
@ExcelIgnore
private String trafficTypeName;
/**
* 其他返回方式交通方式为其他时此列需要有值
*/
@ExcelIgnore
private String trafficTypeExplain;
/**
* 来自地区详细地址 source_address字段的说明
*/
@ExcelIgnore
private String sourceDetailAddress;
/**
* 疫苗接种针次 (0 1 2 3)小寨子
*/
@ExcelIgnore
private String vaccineNum;
/**
* 疫苗接种针次 -中国字(0针 1针 2针 3针)
*/
@ExcelIgnore
private String vaccineNumName;
/**
* 是否有48小时核算记录 0: 1: 小寨子
*/
@ExcelIgnore
private String isNatRecord;
/**
* 是否有48小时核算记录 0: 1: 小寨子-中国字
*/
@ExcelIgnore
private String isNatRecordName;
/**
* 户籍地 磐石
*/
@ExcelIgnore
private String registeredResidence;
/**
* 来曹事由磐石
*/
@ExcelIgnore
private String describeContent;
/**
* 48小时核算检查结果(0:阴性 1:阳性)磐石
*/
@ExcelIgnore
private String natOutcome;
/**
* 48小时核算检查结果(阴性 阳性)磐石-中国字
*/
@ExcelIgnore
private String natOutcomeName;
/**
* 7天内旅居史情况字典表(sojourn_history)磐石
*/
@ExcelIgnore
private String sojournHistory;
/**
* 7天内旅居史情况字典表(sojourn_history)磐石-中国字
*/
@ExcelIgnore
private String sojournHistoryName;
/**
* 隔离状态字典表(isolate_type)磐石
*/
@ExcelIgnore
private String isolateType;
/**
* 隔离状态字典表(isolate_type)磐石-中国字
*/
@ExcelIgnore
private String isolateTypeName;
/**
* 是否落实"落地检" 0: 1:磐石
*/
@ExcelIgnore
private String isArriveCheck;
/**
* 是否落实"落地检" 0: 1:磐石-中国字
*/
@ExcelIgnore
private String isArriveCheckName;
/**
* 是否达到曹县 0: 1:磐石
*/
@ExcelIgnore
private String isArrive;
/**
* 是否达到曹县 0: 1:磐石-中国字
*/
@ExcelIgnore
private String isArriveName;
/**
* 上报时间磐石
*/
@ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd")
private String reportingTime;
/**
* 管控措施磐石
*/
@ExcelIgnore
private String controlMeasures;
/**
* 行程记录类型字典表(trip_data_type)磐石
*/
@ExcelIgnore
private String tripDataType;
/**
* 行程记录类型字典表(trip_data_type)磐石-中国字
*/
@ExcelIgnore
private String tripDataTypeName;
}

78
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BirthRecordListFormDTO.java

@ -0,0 +1,78 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/5/10 10:02
*/
@NoArgsConstructor
@Data
public class BirthRecordListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 5077167613040462646L;
/**
* 客户ID
*/
private String customerId;
private String staffId;
/**
* 组织Id
*/
private String agencyId;
/**
* 网格ID
*/
private String gridId;
/**
* 小区ID
*/
private String villageId;
/**
* 楼栋ID
*/
private String buildId;
/**
* 单元ID
*/
private String unitId;
/**
* 房屋ID
*/
private String homeId;
/**
* 姓名
*/
private String name;
/**
* 手机
*/
private String mobile;
/**
* 身份证
*/
private String idCard;
/**
* 性别
*/
private String gender;
/**
* 出生日开始
*/
private String startTime;
/**
* 出生日期结束
*/
private String endTime;
/**
* 是否福利
*/
private String isWelfare;
}

19
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DangerAreaListFormDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/10/31 16:59
*/
@Data
public class DangerAreaListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 8868052895161162655L;
private String name;
private String dangerLevel;
private String customerId;
}

20
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripDetailFormDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/11/1 15:58
*/
@Data
public class EmphasisTripDetailFormDTO implements Serializable {
private static final long serialVersionUID = 4725053371888196275L;
public interface EmphasisTripDetailForm{}
@NotBlank(message = "id不能为空",groups = {EmphasisTripDetailForm.class})
private String id;
}

29
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripListFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/11/1 15:39
*/
@Data
public class EmphasisTripListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 5850717233738956442L;
private String code;
private String dangerLevel;
private String staffId;
private String customerId;
private String agencyId;
/**
* ic_trip_report_record.id
*/
private String id;
}

26
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripPieDetailFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/11/1 16:08
*/
@Data
public class EmphasisTripPieDetailFormDTO implements Serializable {
private static final long serialVersionUID = 8822391154779579664L;
public interface EmphasisTripPieDetailForm{}
// @NotBlank(message = "code不能为空",groups = {EmphasisTripPieDetailForm.class})
private String code;
private String customerId;
private String staffId;
private String agencyId;
}

74
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java

@ -33,6 +33,10 @@ public class IcTripReportFormDTO implements Serializable {
public interface PcUpdateRequired extends CustomerClientShowGroup {
}
public interface PsAdd extends CustomerClientShowGroup {
}
public interface XzzAdd extends CustomerClientShowGroup {
}
@NotBlank(message = "主键不能为空", groups = {PcUpdateRequired.class})
private String id;
@ -176,5 +180,75 @@ public class IcTripReportFormDTO implements Serializable {
*/
private String content = "";
/**
* 交通方式来源字典表(traffic_type)
*/
@NotBlank(message = "返回方式不能为空", groups = {PcAddRequired.class, ResiUserRequired.class})
private String trafficType;
/**
* 其他返回方式交通方式为其他时此列需要有值
*/
private String trafficTypeExplain;
/**
* 来源地详细信息 source_address字段的说明
*/
@NotBlank(message = "来自地区不能为空", groups = {PcAddRequired.class, ResiUserRequired.class})
private String sourceDetailAddress;
/**
* 疫苗接种针次 (0针 1针 2针 3针)小寨子
*/
@NotBlank(message = "疫苗接种针次不能为空", groups = {XzzAdd.class})
private String vaccineNum;
/**
* 是否有48小时核算记录 0: 1: 小寨子
*/
@NotBlank(message = "48小时核算记录不能为空", groups = {XzzAdd.class})
private String isNatRecord;
/**
* 户籍地 磐石
*/
@NotBlank(message = "户籍地不能为空", groups = {PsAdd.class})
private String registeredResidence;
/**
* 来曹事由磐石
*/
@NotBlank(message = "来曹事由不能为空", groups = {PsAdd.class})
private String describeContent;
/**
* 48小时核算检查结果(阴性 阳性)磐石
*/
@NotBlank(message = "48小时核算检测不能为空", groups = {PsAdd.class})
private String natOutcome;
/**
* 7天内旅居史情况字典表(sojourn_history)磐石
*/
private String sojournHistory;
/**
* 隔离状态字典表(isolate_type)磐石
*/
private String isolateType;
/**
* 是否落实"落地检" 0: 1:磐石
*/
private String isArriveCheck;
/**
* 是否达到曹县 0: 1:磐石
*/
private String isArrive;
/**
* 上报时间磐石
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date reportingTime;
/**
* 管控措施磐石
*/
private String controlMeasures;
/**
* 行程记录类型字典表(trip_data_type)磐石
*/
private String tripDataType;
}

25
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OnlyIdFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
/**
* @author wgf
* @dscription
*/
@Data
public class OnlyIdFormDTO implements Serializable {
private static final long serialVersionUID = -5220529162950147825L;
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
private String id;
}

6
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java

@ -54,4 +54,10 @@ public class PageTripReportFormDTO extends PageFormDTO implements Serializable {
* 查看详情时此列有值
*/
private String id;
/**
* 7天内旅居史情况字典表(sojourn_history)磐石
*/
private String sojournHistory;
}

71
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripListResultDTO.java

@ -0,0 +1,71 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/11/1 15:38
*/
@Data
public class EmphasisTripListResultDTO implements Serializable {
private static final long serialVersionUID = -1646171374911115465L;
private String id;
private String agencyId;
private String name;
private String mobile;
private String idCard;
/**
* 来源地
*/
private String sourceAddress;
/**
* 来曹事由
*/
private String describeContent;
/**
* 核酸检测结果
*/
private String natOutcome;
private String natOutComeName;
/**
* 7天旅居史
*/
private String sojournHistory;
private String sojournHistoryName;
/**
* 隔离状态
*/
private String isolateType;
private String isolateTypeName;
/**
* 来曹时间
*/
private String arriveDate;
/**
* 离开时间
*/
private String leaveDate;
/**
* 现居地
*/
private String presentAddress;
/**
* 详细地址
*/
private String detailAddress;
private String remark;
}

19
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripPieDetailResultDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/11/1 16:06
*/
@Data
public class EmphasisTripPieDetailResultDTO implements Serializable {
private static final long serialVersionUID = -7654816048391073022L;
private String dangerLevelName;
private String dangerLevel;
private Integer total = NumConstant.ZERO;
}

6
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcMoveInListResultDTO.java

@ -18,6 +18,12 @@ public class IcMoveInListResultDTO implements Serializable {
* 迁入Id
*/
private String moveInId;
/**
* ic_resi_user主键
*/
private String icResiUserId;
/**
* 网格ID
*/

94
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java

@ -134,6 +134,100 @@ public class VaccinationListResultDTO implements Serializable {
@JsonIgnore
private String customerId;
/**
* 管控开始时间yyyy-MM-dd,需求来源于磐石
* gkStartTime-gkEndTime
*/
private String gkTime;
/**
* 管控开始时间yyyy-MM-dd,需求来源于磐石
*/
private String gkStartTime;
/**
* 管控结束时间yyyy-MM-dd,需求来源于磐石
*/
private String gkEndTime;
/**
* 干部名称联系方式,需求来源于磐石
* gbName+gbMobile
*/
private String gb;
/**
* 干部名称,需求来源于磐石
*/
private String gbName;
/**
* 干部联系方式,需求来源于磐石
*/
private String gbMobile;
/**
* 社区网格管理员gridManager,需求来源于磐石
* gridManager+gridManagerMobile
*/
private String gridManagerShow;
/**
* 社区网格管理员,需求来源于磐石
*/
private String gridManager;
/**
* 社区网格管理员联系方式,需求来源于磐石
*/
private String gridManagerMobile;
/**
* 基层医务工作者联系方式,需求来源于磐石
* healthWorker+healthWorkerMobile
*/
private String healthWorkerShow;
/**
* 基层医务工作者,需求来源于磐石
*/
private String healthWorker;
/**
* 基层医务工作者联系方式,需求来源于磐石
*/
private String healthWorkerMobile;
/**
* 民警联系方式,需求来源于磐石
* policeName+policeMobile
*/
private String policeShow;
/**
* 民警,需求来源于磐石
*/
private String policeName;
/**
* 民警联系方式,需求来源于磐石
*/
private String policeMobile;
/**
* 志愿者+联系方式,需求来源于磐石
*/
private String volunteerShow;
/**
* 志愿者,需求来源于磐石
*/
private String volunteerName;
/**
* 志愿者联系方式,需求来源于磐石
*/
private String volunteerMobile;
public VaccinationListResultDTO() {
this.vaccinationCount = NumConstant.ZERO;
this.name = "";

15
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeDeathController.java

@ -13,6 +13,7 @@ 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.ChangeDeathDTO;
import com.epmet.dto.form.OnlyIdFormDTO;
import com.epmet.excel.ChangeDeathExcel;
import com.epmet.service.ChangeDeathService;
import org.apache.commons.collections4.CollectionUtils;
@ -94,6 +95,20 @@ public class ChangeDeathController {
ExcelUtils.exportEpmetExcel(response, null, list, ChangeDeathExcel.class);
}
/**
* 恢复死亡人员
* @param tokenDto
* @param dto
* @return
*/
@PostMapping("recovery")
public Result recovery(@LoginUser TokenDto tokenDto,@RequestBody OnlyIdFormDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
changeDeathService.recovery(tokenDto,dto);
return new Result();
}
}

15
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java

@ -13,6 +13,7 @@ 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.ChangeRelocationDTO;
import com.epmet.dto.form.OnlyIdFormDTO;
import com.epmet.excel.ChangeRelocationExcel;
import com.epmet.service.ChangeRelocationService;
import org.apache.commons.collections4.CollectionUtils;
@ -144,4 +145,18 @@ public class ChangeRelocationController {
return new Result();
}
/**
* 恢复迁出人员
* @param tokenDto
* @param dto
* @return
*/
@PostMapping("recovery")
public Result recovery(@LoginUser TokenDto tokenDto,@RequestBody OnlyIdFormDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
changeRelocationService.recovery(tokenDto,dto);
return new Result();
}
}

9
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcBirthRecordController.java

@ -24,6 +24,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcBirthRecordDTO;
import com.epmet.dto.form.BirthRecordFormDTO;
import com.epmet.dto.form.BirthRecordUpdateDTO;
import com.epmet.dto.form.OnlyIdFormDTO;
import com.epmet.excel.IcBirthRecordExcel;
import com.epmet.service.IcBirthRecordService;
import lombok.extern.slf4j.Slf4j;
@ -92,6 +93,14 @@ public class IcBirthRecordController {
return new Result();
}
@PostMapping("deleteById")
public Result deleteById(@RequestBody OnlyIdFormDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icBirthRecordService.deleteById(dto.getId());
return new Result();
}
@NoRepeatSubmit
@PostMapping("export")
public void export(@LoginUser TokenDto tokenDto, @RequestBody BirthRecordFormDTO formDTO, HttpServletResponse response) throws Exception {

222
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcDangerAreaController.java

@ -0,0 +1,222 @@
package com.epmet.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.PageFormDTO;
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.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
import com.epmet.commons.tools.feign.*;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcDangerAreaDTO;
import com.epmet.dto.form.DangerAreaListFormDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.NatListCommonExcelResultDTO;
import com.epmet.dto.result.NatListResultDTO;
import com.epmet.enums.DangerLevelEnum;
import com.epmet.excel.IcDangerAreaResultExcel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.service.IcDangerAreaService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
* 疫情风险地区
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-31
*/
@RestController
@Slf4j
@RequestMapping("icDangerArea")
public class IcDangerAreaController implements ResultDataResolver{
@Autowired
private IcDangerAreaService icDangerAreaService;
@Autowired
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
@RequestMapping("page")
public Result<PageData<IcDangerAreaDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcDangerAreaDTO> page = icDangerAreaService.page(params);
return new Result<PageData<IcDangerAreaDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcDangerAreaDTO> get(@PathVariable("id") String id){
IcDangerAreaDTO data = icDangerAreaService.get(id);
return new Result<IcDangerAreaDTO>().ok(data);
}
/**
* @Description 新增
* @param dto
* @param tokenDto
* @Author zxc
* @Date 2022/11/1 09:09
*/
@NoRepeatSubmit
@PostMapping("add")
public Result save(@RequestBody IcDangerAreaDTO dto, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
dto.setCustomerId(tokenDto.getCustomerId());
icDangerAreaService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcDangerAreaDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icDangerAreaService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody List<String> ids,@LoginUser TokenDto tokenDto){
icDangerAreaService.delete(ids,tokenDto.getUserId());
return new Result();
}
@RequestMapping("list")
public Result<PageData<IcDangerAreaDTO>> list(@RequestBody DangerAreaListFormDTO formDTO,@LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<PageData<IcDangerAreaDTO>>().ok(icDangerAreaService.list(formDTO));
}
@RequestMapping("export")
public void export(@LoginUser TokenDto tokenDto,@RequestBody DangerAreaListFormDTO formDTO,HttpServletResponse response){
formDTO.setCustomerId(tokenDto.getCustomerId());
ExcelWriter excelWriter = null;
int pageNo = NumConstant.ONE;
formDTO.setPageSize(NumConstant.ONE_THOUSAND);
try {
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("风险地区", response), IcDangerAreaResultExcel.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
Integer size;
do {
PageData<IcDangerAreaDTO> list = icDangerAreaService.list(formDTO);
List<IcDangerAreaDTO> data = list.getList();
if (CollectionUtils.isNotEmpty(data)){
data.forEach(d -> {
d.setDangerLevel(DangerLevelEnum.getNameByCode(d.getDangerLevel()));
});
}
excelWriter.write(ConvertUtils.sourceToTarget(data,IcDangerAreaResultExcel.class), writeSheet);
formDTO.setPageNo(pageNo++);
size = data.size();
} while (size == NumConstant.ONE_THOUSAND);
}catch (Exception e){
log.error("export exception", e);
}finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
/**
* @Description 模板下载
* @param response
* @Author zxc
* @Date 2022/11/1 09:52
*/
@PostMapping("downloadTemplate")
public void downloadTemplate(HttpServletResponse response) throws IOException{
response.setCharacterEncoding("UTF-8");
response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition");
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("风险地区导入模板", "UTF-8") + ".xlsx");
InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_danger_area_template.xlsx");
try {
ServletOutputStream os = response.getOutputStream();
IOUtils.copy(is, os);
} finally {
if (is != null) {
is.close();
}
}
}
@PostMapping("import")
public Result importExcel(@LoginUser TokenDto tokenDto, @RequestPart("file") MultipartFile file) {
String userId = EpmetRequestHolder.getHeader(AppClientConstant.USER_ID);
// 1.暂存文件
String originalFilename = file.getOriginalFilename();
String extName = originalFilename.substring(originalFilename.lastIndexOf("."));
Path fileSavePath;
try {
Path importPath = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_danger_area", "import");
fileSavePath = importPath.resolve(UUID.randomUUID().toString().concat(extName));
} catch (IOException e) {
String errorMsg = ExceptionUtils.getErrorStackTrace(e);
log.error("【风险地区】创建临时存储文件失败:{}", errorMsg);
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "文件上传失败", "文件上传失败");
}
InputStream is = null;
FileOutputStream os = null;
try {
is = file.getInputStream();
os = new FileOutputStream(fileSavePath.toString());
IOUtils.copy(is, os);
} catch (Exception e) {
log.error("method exception", e);
} finally {
org.apache.poi.util.IOUtils.closeQuietly(is);
org.apache.poi.util.IOUtils.closeQuietly(os);
}
// 2.生成导入任务记录
ImportTaskCommonFormDTO importTaskForm = new ImportTaskCommonFormDTO();
importTaskForm.setOperatorId(userId);
importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_IC_DANGER_AREA);
importTaskForm.setOriginFileName(originalFilename);
ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException(commonServiceOpenFeignClient.createImportTask(importTaskForm),
ServiceConstant.EPMET_COMMON_SERVICE,
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
"excel导入风险地区错误",
"风险地区导入失败");
// 3.执行导入
icDangerAreaService.execAsyncExcelImport(fileSavePath, rstData.getTaskId(),tokenDto.getCustomerId(),tokenDto.getUserId());
return new Result();
}
}

9
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java

@ -23,6 +23,7 @@ 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.IcMoveInRecordDTO;
import com.epmet.dto.form.OnlyIdFormDTO;
import com.epmet.dto.form.IcMoveInAddEditFormDTO;
import com.epmet.dto.form.IcMoveInListFormDTO;
import com.epmet.dto.result.IcMoveInListResultDTO;
@ -95,6 +96,14 @@ public class IcMoveInRecordController {
return new Result();
}
@PostMapping("deleteById")
public Result deleteById(@RequestBody OnlyIdFormDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icMoveInRecordService.deleteById(dto.getId());
return new Result();
}
@NoRepeatSubmit
@PostMapping("export")
public void export(@LoginUser TokenDto tokenDto, @RequestBody IcMoveInListFormDTO formDTO, HttpServletResponse response) throws IOException {

211
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java

@ -9,10 +9,12 @@ import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.PageFormDTO;
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.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
@ -22,20 +24,23 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.IcResiUserConstant;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcTripReportRecordDTO;
import com.epmet.dto.form.IcTripReportFormDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.form.MyReportedTripFormDTO;
import com.epmet.dto.form.PageTripReportFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.EmphasisTripListResultDTO;
import com.epmet.dto.result.EmphasisTripPieDetailResultDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.excel.IcPsTripReportRecordExportExcel;
import com.epmet.excel.IcTripReportRecordExportExcel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.service.IcTripReportRecordService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -113,6 +118,16 @@ public class IcTripReportRecordController implements ResultDataResolver {
if(IcResiUserConstant.USER_TYPE_IC_RESI.equals(formDTO.getUserType())){
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.IcResiInternalGroup.class);
}
//磐石客户
if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PsAdd.class);
}else {
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.XzzAdd.class);
}
//校验参数
if ("5".equals(formDTO.getTrafficType()) && StringUtils.isBlank(formDTO.getTrafficTypeExplain())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "返回方式为其他时,“其他返回方式”为必填", "返回方式为其他时,“其他返回方式”为必填");
}
String id=icTripReportRecordService.save(formDTO);
return new Result().ok(id);
}
@ -167,6 +182,16 @@ public class IcTripReportRecordController implements ResultDataResolver {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"请输入正确的证件号","请输入正确的证件号");
}
}
//磐石客户
if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PsAdd.class);
}else {
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.XzzAdd.class);
}
//校验参数
if ("5".equals(formDTO.getTrafficType()) && StringUtils.isBlank(formDTO.getTrafficTypeExplain())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "返回方式为其他时,“其他返回方式”为必填", "返回方式为其他时,“其他返回方式”为必填");
}
return new Result().ok(icTripReportRecordService.resiSave(formDTO));
}
@ -218,8 +243,6 @@ public class IcTripReportRecordController implements ResultDataResolver {
public void export(@LoginUser TokenDto tokenDto, @RequestBody PageTripReportFormDTO formDTO, HttpServletResponse response) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
// formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc");
// formDTO.setUserId("35005df15fb0f7c791344f0b424870b7");
formDTO.setIsPage(false);
ExcelWriter excelWriter = null;
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
@ -228,13 +251,15 @@ public class IcTripReportRecordController implements ResultDataResolver {
// 这里 需要指定写用哪个class去写
String today= DateUtils.format(new Date(),DateUtils.DATE_PATTERN_MMDD);
String fileName = "行程上报信息".concat(today);
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcTripReportRecordDTO.class).build();
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcTripReportRecordExportExcel.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
PageData<IcTripReportRecordDTO> data = null;
List<IcTripReportRecordExportExcel> list = null;
do {
data = icTripReportRecordService.page(formDTO);
list = ConvertUtils.sourceToTarget(data.getList(), IcTripReportRecordExportExcel.class);
formDTO.setPageNo(++pageNo);
excelWriter.write(data.getList(), writeSheet);
excelWriter.write(list, writeSheet);
} while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize());
} catch (Exception e) {
@ -247,7 +272,6 @@ public class IcTripReportRecordController implements ResultDataResolver {
}
}
/**
* 导入excel
* @return
@ -301,4 +325,173 @@ public class IcTripReportRecordController implements ResultDataResolver {
icTripReportRecordService.execAsyncExcelImport(fileSavePath, rstData.getTaskId(),tokenDto.getCustomerId(),tokenDto.getUserId());
return new Result();
}
/**
* pc:磐石-行程上报-下载模板
* @param response
* @throws IOException
*/
@RequestMapping(value = "psdownloadtemplate", method = {RequestMethod.GET, RequestMethod.POST})
public void psDownloadTemplate(HttpServletResponse response) throws IOException {
response.setCharacterEncoding("UTF-8");
response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition");
//response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel");
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("行程上报导入模板", "UTF-8") + ".xlsx");
InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ps_trip_report_import_template.xlsx");
try {
ServletOutputStream os = response.getOutputStream();
IOUtils.copy(is, os);
} finally {
if (is != null) {
is.close();
}
}
}
/**
* 磐石-导入excel
* @return
*/
@PostMapping("psimport")
@Transactional(rollbackFor = Exception.class)
public Result psImportExcel(@LoginUser TokenDto tokenDto, HttpServletResponse response, @RequestPart("file") MultipartFile file) throws Exception {
if (file.isEmpty()) {
throw new RenException("请上传文件");
}
// 1.暂存文件
String originalFilename = file.getOriginalFilename();
String extName = originalFilename.substring(originalFilename.lastIndexOf("."));
Path fileSavePath;
try {
Path importPath = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_trip_preport", "import");
fileSavePath = importPath.resolve(UUID.randomUUID().toString().concat(extName));
} catch (IOException e) {
String errorMsg = ExceptionUtils.getErrorStackTrace(e);
log.error("【行程上报导入】创建临时存储文件失败:{}", errorMsg);
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "文件上传失败", "文件上传失败");
}
InputStream is = null;
FileOutputStream os = null;
try {
is = file.getInputStream();
os = new FileOutputStream(fileSavePath.toString());
IOUtils.copy(is, os);
} catch (Exception e) {
log.error("method exception", e);
} finally {
org.apache.poi.util.IOUtils.closeQuietly(is);
org.apache.poi.util.IOUtils.closeQuietly(os);
}
//校验文件类型
String extension = FilenameUtils.getExtension(file.getOriginalFilename());
if (!"xls".equals(extension) && !"xlsx".equals(extension)) {
throw new RenException("文件类型不匹配");
}
//2.查询当前工作人员是否有再导入的党员先锋数据,有则不允许导入,没有则进行新的导入
ImportTaskCommonFormDTO importTaskForm = new ImportTaskCommonFormDTO();
importTaskForm.setOriginFileName(file.getOriginalFilename());
importTaskForm.setOperatorId(tokenDto.getUserId());
importTaskForm.setBizType(ImportTaskConstants.PS_BIZ_TYPE_IC_TRIP_REPORT);
Result<ImportTaskCommonResultDTO> result = commonServiceOpenFeignClient.createImportTask(importTaskForm);
if (!result.success()) {
throw new RenException(result.getInternalMsg());
}
InputStream inputStream = null;
try {
inputStream = file.getInputStream();
}catch (Exception e){
ImportTaskCommonFormDTO input = new ImportTaskCommonFormDTO();
input.setOperatorId(tokenDto.getUserId());
input.setTaskId(result.getData().getTaskId());
input.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL);
commonServiceOpenFeignClient.finishImportTask(input);
log.error("读取文件失败");
}
//3.执行导入程序
icTripReportRecordService.psExecAsyncExcelImport(fileSavePath, result.getData().getTaskId(),tokenDto);
return new Result();
}
/**
* pc:磐石-行程上报-导出
*/
@NoRepeatSubmit
@PostMapping("psexport")
public void psEexport(@LoginUser TokenDto tokenDto, @RequestBody PageTripReportFormDTO formDTO, HttpServletResponse response) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
formDTO.setIsPage(false);
ExcelWriter excelWriter = null;
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
int pageNo = formDTO.getPageNo();
try {
// 这里 需要指定写用哪个class去写
String today= DateUtils.format(new Date(),DateUtils.DATE_PATTERN_MMDD);
String fileName = "行程上报信息".concat(today);
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcPsTripReportRecordExportExcel.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
PageData<IcTripReportRecordDTO> data = null;
List<IcPsTripReportRecordExportExcel> list = null;
do {
data = icTripReportRecordService.page(formDTO);
list = ConvertUtils.sourceToTarget(data.getList(), IcPsTripReportRecordExportExcel.class);
formDTO.setPageNo(++pageNo);
excelWriter.write(list, writeSheet);
} while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize());
} catch (Exception e) {
log.error("export exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
/**
* @Description 重点行程名单列表
* @param tokenDto
* @param formDTO
* @Author zxc
* @Date 2022/11/1 15:43
*/
@PostMapping("list")
@MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD })
public Result<PageData<EmphasisTripListResultDTO>> emphasisTripList(@LoginUser TokenDto tokenDto, @RequestBody EmphasisTripListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setStaffId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<PageData<EmphasisTripListResultDTO>>().ok(icTripReportRecordService.emphasisTripList(formDTO));
}
/**
* @Description 重点行程详情
* @param formDTO
* @Author zxc
* @Date 2022/11/1 16:05
*/
@MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD })
@PostMapping("emphasisTripDetail")
public Result<EmphasisTripListResultDTO> emphasisTripDetail(@RequestBody EmphasisTripDetailFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, EmphasisTripDetailFormDTO.EmphasisTripDetailForm.class);
return new Result<EmphasisTripListResultDTO>().ok(icTripReportRecordService.emphasisTripDetail(formDTO));
}
/**
* @Description 重点行程名单饼图详情
* @param formDTO
* @Author zxc
* @Date 2022/11/1 16:09
*/
@PostMapping("emphasisTripPieDetail")
public Result<List<EmphasisTripPieDetailResultDTO>> emphasisTripPieDetail(@RequestBody EmphasisTripPieDetailFormDTO formDTO, @LoginUser TokenDto tokenDto){
formDTO.setStaffId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<EmphasisTripPieDetailResultDTO>>().ok(icTripReportRecordService.emphasisTripPieDetail(formDTO));
}
}

10
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcBirthRecordDao.java

@ -1,9 +1,13 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcBirthRecordDTO;
import com.epmet.dto.form.BirthRecordListFormDTO;
import com.epmet.entity.IcBirthRecordEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 出生管理
*
@ -12,5 +16,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcBirthRecordDao extends BaseDao<IcBirthRecordEntity> {
}
List<IcBirthRecordDTO> selectListByEntity(BirthRecordListFormDTO birthRecordListFormDTO);
}

19
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcDangerAreaDao.java

@ -0,0 +1,19 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcDangerAreaEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 疫情风险地区
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-31
*/
@Mapper
public interface IcDangerAreaDao extends BaseDao<IcDangerAreaEntity> {
Integer delAllDangerArea(@Param("customerId")String customerId);
}

21
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java

@ -2,7 +2,11 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcTripReportRecordDTO;
import com.epmet.dto.form.EmphasisTripListFormDTO;
import com.epmet.dto.form.EmphasisTripPieDetailFormDTO;
import com.epmet.dto.form.PageTripReportFormDTO;
import com.epmet.dto.result.EmphasisTripListResultDTO;
import com.epmet.dto.result.EmphasisTripPieDetailResultDTO;
import com.epmet.entity.IcTripReportRecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -42,4 +46,21 @@ public interface IcTripReportRecordDao extends BaseDao<IcTripReportRecordEntity>
* @return
*/
int batchDel(@Param("userId")String userId,@Param("agencyId")String agencyId, @Param("ids")String[] ids);
/**
* @Description 重点行程名单列表
* @param formDTO
* @Author zxc
* @Date 2022/11/1 16:18
*/
List<EmphasisTripListResultDTO> emphasisTripList(EmphasisTripListFormDTO formDTO);
/**
* @Description 重点行程名单饼图详情
* @param formDTO
* @Author zxc
* @Date 2022/11/2 10:07
*/
List<EmphasisTripPieDetailResultDTO> emphasisTripPieDetail(EmphasisTripPieDetailFormDTO formDTO);
}

56
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcDangerAreaEntity.java

@ -0,0 +1,56 @@
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-10-31
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_danger_area")
public class IcDangerAreaEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 风险等级
*/
private String dangerLevel;
/**
*
*/
private String province;
/**
*
*/
private String city;
/**
*
*/
private String district;
/**
* --
*/
private String allName;
private String allNameCode;
}

72
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java

@ -73,14 +73,74 @@ public class IcEpidemicSpecialAttentionEntity extends BaseEpmetEntity {
*/
private String idCard;
/**
* 原因
*/
/**
* 关注原因后磐石改名为隔离原因
*/
private String reason;
/**
* 备注
*/
/**
* 备注
*/
private String remark;
/**
* 管控开始时间yyyy-MM-dd,需求来源于磐石
*/
private String gkStartTime;
/**
* 管控结束时间yyyy-MM-dd,需求来源于磐石
*/
private String gkEndTime;
/**
* 干部名称,需求来源于磐石
*/
private String gbName;
/**
* 干部联系方式,需求来源于磐石
*/
private String gbMobile;
/**
* 社区网格管理员,需求来源于磐石
*/
private String gridManager;
/**
* 社区网格管理员联系方式,需求来源于磐石
*/
private String gridManagerMobile;
/**
* 基层医务工作者,需求来源于磐石
*/
private String healthWorker;
/**
* 基层医务工作者联系方式,需求来源于磐石
*/
private String healthWorkerMobile;
/**
* 民警,需求来源于磐石
*/
private String policeName;
/**
* 民警联系方式,需求来源于磐石
*/
private String policeMobile;
/**
* 志愿者,需求来源于磐石
*/
private String volunteerName;
/**
* 志愿者联系方式,需求来源于磐石
*/
private String volunteerMobile;
}

15
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPartyMemberEntity.java

@ -85,6 +85,21 @@ public class IcPartyMemberEntity extends BaseEpmetEntity {
*/
private String isDyzxh;
/**
* 入党时所在党支部
*/
private String rdsszzb;
/**
* 组织关系转入社区时间
*/
private String zzgxzrsqsj;
/**
* 是否请长假
*/
private String isQcj;
/**
* 预留字段1
*/

61
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java

@ -115,4 +115,65 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity {
*/
private String remark;
/**
* 交通方式来源字典表(traffic_type)
*/
private String trafficType;
/**
* 其他返回方式交通方式为其他时此列需要有值
*/
private String trafficTypeExplain;
/**
* 来源地详细信息 source_address字段的说明
*/
private String sourceDetailAddress;
/**
* 疫苗接种针次 (0针 1针 2针 3针)小寨子
*/
private String vaccineNum;
/**
* 是否有48小时核算记录 0: 1: 小寨子
*/
private String isNatRecord;
/**
* 户籍地 磐石
*/
private String registeredResidence;
/**
* 来曹事由磐石
*/
private String describeContent;
/**
* 48小时核算检查结果(0:阴性 1:阳性)磐石
*/
private String natOutcome;
/**
* 7天内旅居史情况字典表(sojourn_history)磐石
*/
private String sojournHistory;
/**
* 隔离状态字典表(isolate_type)磐石
*/
private String isolateType;
/**
* 是否落实"落地检" 0: 1:磐石
*/
private String isArriveCheck;
/**
* 是否达到曹县 0: 1:磐石
*/
private String isArrive;
/**
* 上报时间磐石
*/
private Date reportingTime;
/**
* 管控措施磐石
*/
private String controlMeasures;
/**
* 行程记录类型字典表(trip_data_type)磐石
*/
private String tripDataType;
}

55
epmet-user/epmet-user-server/src/main/java/com/epmet/enums/DangerLevelEnum.java

@ -0,0 +1,55 @@
package com.epmet.enums;
/**
* desc:数据同步配置枚举 对应data_sync_config中的DATA_CODE
* @author Administrator
*/
public enum DangerLevelEnum {
LOW("0", "低风险"),
MIDDLE("1", "中风险"),
HIGH("2", "高风险"),
OTHER("3", "无风险"),
;
private final String code;
private final String name;
DangerLevelEnum(String code, String name) {
this.code = code;
this.name = name;
}
public static DangerLevelEnum getEnum(String code) {
DangerLevelEnum[] values = DangerLevelEnum.values();
for (DangerLevelEnum value : values) {
if (value.getCode().equals(code)) {
return value;
}
}
return DangerLevelEnum.OTHER;
}
public static String getNameByCode(String code) {
DangerLevelEnum[] values = DangerLevelEnum.values();
for (DangerLevelEnum value : values) {
if (value.getCode().equals(code)) {
return value.getName();
}
}
return DangerLevelEnum.OTHER.getName();
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
}

38
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaImportExcel.java

@ -0,0 +1,38 @@
package com.epmet.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Author zxc
* @DateTime 2022/11/1 11:18
*/
@Data
public class IcDangerAreaImportExcel {
@NotBlank(message = "风险地区为必填项")
@ExcelProperty("风险地区")
private String allName;
@NotBlank(message = "风险等级为必填项")
@ExcelProperty("风险等级")
private String dangerLevel;
@Data
public static class IcDangerAreaError{
@ColumnWidth(30)
@ExcelProperty(value = "风险地区")
private String name;
@ColumnWidth(20)
@ExcelProperty(value = "风险等级")
private String dangerLevel;
@ColumnWidth(40)
@ExcelProperty(value = "错误信息")
private String errorInfo;
}
}

22
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaResultExcel.java

@ -0,0 +1,22 @@
package com.epmet.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
/**
* @Author zxc
* @DateTime 2022/11/1 10:26
*/
@Data
public class IcDangerAreaResultExcel {
@ColumnWidth(40)
@ExcelProperty(value = "风险地区")
private String allName;
@ColumnWidth(20)
@ExcelProperty(value = "风险等级")
private String dangerLevel;
}

102
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExcel.java

@ -0,0 +1,102 @@
package com.epmet.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* 磐石-行程上报信息
*
*/
@Data
public class IcPsTripReportRecordExcel {
@ExcelProperty("姓名")
@NotBlank(message = "姓名不能为空")
private String name;
@ExcelProperty("证件号")
@NotBlank(message = "证件号不能为空")
private String idCard;
@ExcelProperty("户籍地(省市县区)")
@NotBlank(message = "户籍地不能为空")
private String registeredResidence;
@ExcelProperty("手机号")
@NotBlank(message = "手机号不能为空")
private String mobile;
@ExcelProperty("来自地区(格式:省-市-区-街道-社区)")
@NotBlank(message = "来自地区不能为空")
private String sourceAddress;
@ExcelProperty("来自地区详细地址")
@NotBlank(message = "来自地区详细地址不能为空")
private String sourceDetailAddress;
@ExcelProperty("来曹事由(100字以内)")
@NotBlank(message = "来曹事由不能为空")
@Length(max = 500,message = "来曹事由不能超过100字")
private String describeContent;
@ExcelProperty("48小时核酸检测")
@NotBlank(message = "48小时核酸检测不能为空")
private String natOutcome;
@ExcelProperty("来到本地时间\n" +
"(2022-01-01)")
//@NotBlank(message = "来到本地时间不能为空")
@JsonFormat(pattern = "yyyy-MM-dd")
@NotNull(message = "来到本地时间为必填项")
private Date arriveDate;
@ExcelProperty("现居地")
@NotBlank(message = "现居地不能为空")
private String presentAddress;
@ExcelProperty("现居地详细地址")
@NotBlank(message = "现居地详细地址不能为空")
private String detailAddress;
@ExcelProperty("返回方式")
@NotBlank(message = "返回方式不能为空")
private String trafficType;
@ExcelProperty("其他返回方式")
private String trafficTypeExplain;
@ExcelProperty("7天内旅居史情况")
private String sojournHistory;
@ExcelProperty("隔离状态")
private String isolateType;
@ExcelProperty("备注(500字以内)")
@Length(max = 500,message = "备注不能超过500字")
private String remark;
@ExcelProperty("是否落实“落地检”")
private String isArriveCheck;
@ExcelProperty("是否达到曹县")
private String isArrive;
@ExcelProperty("上报时间\n" +
"(2022-01-01)")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date reportingTime;
@ExcelProperty("管控措施\n" +
"(500字以内)")
@Length(max = 500,message = "管控措施不能超过500字")
private String controlMeasures;
@ExcelProperty("类型\n" +
"(省内、省外、市内、县内)")
private String tripDataType;
}

150
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExportExcel.java

@ -0,0 +1,150 @@
package com.epmet.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 com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
/**
* 磐石-行程上报信息-导出
*
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class IcPsTripReportRecordExportExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
@ColumnWidth(12)
@ExcelProperty(value = "姓名", order = 1)
private String name;
/**
* 证件号
*/
@ColumnWidth(20)
@ExcelProperty(value = "证件号", order = 2)
private String idCard;
/**
* 户籍地 磐石
*/
@ColumnWidth(28)
@ExcelProperty(value = "户籍地(省市县区)", order = 3)
private String registeredResidence;
/**
* 手机号
*/
@ColumnWidth(15)
@ExcelProperty(value = "手机号", order = 4)
private String mobile;
/**
* 来自地区格式---街道-社区
*/
@ColumnWidth(30)
@ExcelProperty(value = "来自地区(格式:省-市-区-街道-社区)",order = 5)
private String sourceAddress;
/**
* 来自地区详细地址 source_address字段的说明
*/
@ColumnWidth(30)
@ExcelProperty(value = "来自地区详细地址",order = 6)
private String sourceDetailAddress;
/**
* 来曹事由100字以内磐石
*/
@ColumnWidth(25)
@ExcelProperty(value = "来曹事由(100字以内)",order = 7)
private String describeContent;
/**
* 48小时核酸检测 0:阴性 1:阳性 -中国字
*/
@ColumnWidth(20)
@ExcelProperty(value = "48小时核酸检测",order = 8)
private String isNatRecordName;
/**
* 来到本地时间2022-01-01
*/
@ColumnWidth(20)
@ExcelProperty(value = "来到本地时间(2022-01-01)",order = 9)
@JsonFormat(pattern = "yyyy-MM-dd")
private String arriveDate;
/**
* 现居地
*/
@ColumnWidth(30)
@ExcelProperty(value = "现居地",order = 10)
private String presentAddress;
/**
* 现居地详细地址
*/
@ColumnWidth(30)
@ExcelProperty(value = "现居地详细地址",order = 11)
private String detailAddress;
/**
* 交通方式-中国字
*/
@ColumnWidth(15)
@ExcelProperty(value = "返回方式",order = 12)
private String trafficTypeName;
/**
* 其他返回方式交通方式为其他时此列需要有值
*/
@ColumnWidth(18)
@ExcelProperty(value = "其他返回方式",order = 13)
private String trafficTypeExplain;
/**
* 7天内旅居史情况字典表(sojourn_history)磐石-中国字
*/
@ColumnWidth(20)
@ExcelProperty(value = "7天内旅居史情况",order = 14)
private String sojournHistoryName;
/**
* 隔离状态字典表(isolate_type)磐石-中国字
*/
@ColumnWidth(15)
@ExcelProperty(value = "隔离状态",order = 17)
private String isolateTypeName;
/**
* 备注500字以内
*/
@ColumnWidth(30)
@ExcelProperty(value = "备注(500字以内)",order = 16)
private String remark;
/**
* 是否落实"落地检" 0: 1:磐石-中国字
*/
@ColumnWidth(20)
@ExcelProperty(value = "是否落实“落地检”",order = 17)
private String isArriveCheckName;
/**
* 是否达到曹县 0: 1:磐石-中国字
*/
@ColumnWidth(20)
@ExcelProperty(value = "是否达到曹县",order = 18)
private String isArriveName;
/**
* 上报时间2022-01-01磐石
*/
@ColumnWidth(20)
@ExcelProperty(value = "上报时间(2022-01-01)",order = 19)
@JsonFormat(pattern = "yyyy-MM-dd")
private String reportingTime;
/**
* 管控措施500字以内磐石
*/
@ColumnWidth(30)
@ExcelProperty(value = "管控措施(500字以内)",order = 20)
private String controlMeasures;
/**
* 类型省内省外市内县内字典表(trip_data_type)磐石-中国字
*/
@ColumnWidth(25)
@ExcelProperty(value = "类型(省内、省外、市内、县内)",order = 21)
private String tripDataTypeName;
}

123
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcTripReportRecordExportExcel.java

@ -0,0 +1,123 @@
package com.epmet.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 com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 行程上报信息
*
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class IcTripReportRecordExportExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
@ColumnWidth(12)
@ExcelProperty(value = "姓名", order = 1)
private String name;
/**
* 证件号
*/
@ColumnWidth(20)
@ExcelProperty(value = "证件号",order = 2)
private String idCard;
/**
* 手机号
*/
@ColumnWidth(15)
@ExcelProperty(value = "手机号",order = 3)
private String mobile;
/**
* 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区
*/
@ColumnWidth(30)
@ExcelProperty(value = "现居地",order = 4)
private String presentAddress;
/**
* 详细地址
*/
@ColumnWidth(30)
@ExcelProperty(value = "现居地详细地址",order = 5)
private String detailAddress;
/**
* 来源地区地址
*/
@ColumnWidth(30)
@ExcelProperty(value = "来自地区",order = 6)
private String sourceAddress;
/**
* 来自地区详细地址 source_address字段的说明
*/
@ColumnWidth(30)
@ExcelProperty(value = "来自地区详细地址",order = 7)
private String sourceDetailAddress;
/**
* 到达日期
*/
@ColumnWidth(20)
@ExcelProperty(value = "来到本地时间",order = 8)
@JsonFormat(pattern = "yyyy-MM-dd")
private String arriveDate;
/**
* 交通方式-中国字
*/
@ColumnWidth(15)
@ExcelProperty(value = "返回方式",order = 9)
private String trafficTypeName;
/**
* 其他返回方式交通方式为其他时此列需要有值
*/
@ColumnWidth(18)
@ExcelProperty(value = "其他返回方式",order = 10)
private String trafficTypeExplain;
/**
* 是否有48小时核算记录 0: 1: 小寨子-中国字
*/
@ColumnWidth(20)
@ExcelProperty(value = "48小时核酸检测",order = 11)
private String isNatRecordName;
/**
* 疫苗接种针次 -中国字(0针 1针 2针 3针)
*/
@ColumnWidth(20)
@ExcelProperty(value = "疫苗接种针次",order = 12)
private String vaccineNumName;
/**
* 离开日期
*/
@ColumnWidth(15)
@ExcelProperty(value = "离开本地时间",order = 13)
@JsonFormat(pattern = "yyyy-MM-dd")
private String leaveDate;
/**
* 备注信息
*/
@ColumnWidth(30)
@ExcelProperty(value = "备注",order = 14)
private String remark;
}

71
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java

@ -66,4 +66,75 @@ public class ImportEpidemicSpecialAttention extends ExcelVerifyInfo {
@ExcelIgnore
private Integer num;
/**
* 管控开始时间yyyy-MM-dd,需求来源于磐石
*/
@Excel(name = "管控开始时间")
private String gkStartTime;
/**
* 管控结束时间yyyy-MM-dd,需求来源于磐石
*/
@Excel(name = "管控结束时间")
private String gkEndTime;
/**
* 干部名称,需求来源于磐石
*/
@Excel(name = "镇(街)干部名称")
private String gbName;
/**
* 干部联系方式,需求来源于磐石
*/
@Excel(name = "镇(街)干部联系方式")
private String gbMobile;
/**
* 社区网格管理员,需求来源于磐石
*/
@Excel(name = "村(社区)网格管理员")
private String gridManager;
/**
* 社区网格管理员联系方式,需求来源于磐石
*/
@Excel(name = "村(社区)网格管理员联系方式")
private String gridManagerMobile;
/**
* 基层医务工作者,需求来源于磐石
*/
@Excel(name = "基层医务工作者")
private String healthWorker;
/**
* 基层医务工作者联系方式,需求来源于磐石
*/
@Excel(name = "基层医务工作者联系方式")
private String healthWorkerMobile;
/**
* 民警,需求来源于磐石
*/
@Excel(name = "民警")
private String policeName;
/**
* 民警联系方式,需求来源于磐石
*/
@Excel(name = "民警联系方式")
private String policeMobile;
/**
* 志愿者,需求来源于磐石
*/
@Excel(name = "志愿者")
private String volunteerName;
/**
* 志愿者联系方式,需求来源于磐石
*/
@Excel(name = "志愿者联系方式")
private String volunteerMobile;
}

71
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java

@ -34,5 +34,76 @@ public class NatExportExcel {
@Excel(name = "隔离状态",width = 20)
private String isolatedState;
/**
* 管控开始时间yyyy-MM-dd,需求来源于磐石
*/
@Excel(name = "管控开始时间",width = 30)
private String gkStartTime;
/**
* 管控结束时间yyyy-MM-dd,需求来源于磐石
*/
@Excel(name = "管控结束时间",width = 30)
private String gkEndTime;
/**
* 干部名称,需求来源于磐石
*/
@Excel(name = "镇(街)干部名称",width = 30)
private String gbName;
/**
* 干部联系方式,需求来源于磐石
*/
@Excel(name = "镇(街)干部联系方式",width = 30)
private String gbMobile;
/**
* 社区网格管理员,需求来源于磐石
*/
@Excel(name = "村(社区)网格管理员",width = 30)
private String gridManager;
/**
* 社区网格管理员联系方式,需求来源于磐石
*/
@Excel(name = "村(社区)网格管理员联系方式",width = 30)
private String gridManagerMobile;
/**
* 基层医务工作者,需求来源于磐石
*/
@Excel(name = "基层医务工作者",width = 30)
private String healthWorker;
/**
* 基层医务工作者联系方式,需求来源于磐石
*/
@Excel(name = "基层医务工作者联系方式",width = 30)
private String healthWorkerMobile;
/**
* 民警,需求来源于磐石
*/
@Excel(name = "民警",width = 30)
private String policeName;
/**
* 民警联系方式,需求来源于磐石
*/
@Excel(name = "民警联系方式",width = 30)
private String policeMobile;
/**
* 志愿者,需求来源于磐石
*/
@Excel(name = "志愿者",width = 30)
private String volunteerName;
/**
* 志愿者联系方式,需求来源于磐石
*/
@Excel(name = "志愿者联系方式",width = 30)
private String volunteerMobile;
}

71
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatHistoryExportExcel.java

@ -36,5 +36,76 @@ public class NatHistoryExportExcel {
@Excel(name = "隔离状态",width = 20)
private String isolatedState;
/**
* 管控开始时间yyyy-MM-dd,需求来源于磐石
*/
@Excel(name = "管控开始时间",width = 30)
private String gkStartTime;
/**
* 管控结束时间yyyy-MM-dd,需求来源于磐石
*/
@Excel(name = "管控结束时间",width = 30)
private String gkEndTime;
/**
* 干部名称,需求来源于磐石
*/
@Excel(name = "镇(街)干部名称",width = 30)
private String gbName;
/**
* 干部联系方式,需求来源于磐石
*/
@Excel(name = "镇(街)干部联系方式",width = 30)
private String gbMobile;
/**
* 社区网格管理员,需求来源于磐石
*/
@Excel(name = "村(社区)网格管理员",width = 30)
private String gridManager;
/**
* 社区网格管理员联系方式,需求来源于磐石
*/
@Excel(name = "村(社区)网格管理员联系方式",width = 30)
private String gridManagerMobile;
/**
* 基层医务工作者,需求来源于磐石
*/
@Excel(name = "基层医务工作者",width = 30)
private String healthWorker;
/**
* 基层医务工作者联系方式,需求来源于磐石
*/
@Excel(name = "基层医务工作者联系方式",width = 30)
private String healthWorkerMobile;
/**
* 民警,需求来源于磐石
*/
@Excel(name = "民警",width = 30)
private String policeName;
/**
* 民警联系方式,需求来源于磐石
*/
@Excel(name = "民警联系方式",width = 30)
private String policeMobile;
/**
* 志愿者,需求来源于磐石
*/
@Excel(name = "志愿者",width = 30)
private String volunteerName;
/**
* 志愿者联系方式,需求来源于磐石
*/
@Excel(name = "志愿者联系方式",width = 30)
private String volunteerMobile;
}

32
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java

@ -2,6 +2,7 @@ package com.epmet.excel.data;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
@ -19,8 +20,8 @@ public class IcTripReportExcelData {
@ExcelProperty("姓名")
private String name;
@NotBlank(message = "身份证号为必填项")
@ExcelProperty("身份证号")
@NotBlank(message = "证号为必填项")
@ExcelProperty("证号")
private String idCard;
@NotBlank(message = "手机号为必填项")
@ -31,19 +32,40 @@ public class IcTripReportExcelData {
@ExcelProperty("现居地(格式:省-市-区-街道-社区)")
private String presentAddress;
@NotBlank(message = "详细地址为必填项")
@ExcelProperty("详细地址")
@NotBlank(message = "现居地详细地址为必填项")
@ExcelProperty("现居地详细地址")
private String detailAddress;
@NotBlank(message = "来自地区为必填项")
@ExcelProperty("来自地区(格式:省-市-区-街道-社区)")
private String sourceAddress;
@NotBlank(message = "来自地区详细地址为必填项")
@ExcelProperty("来自地区详细地址")
private String sourceDetailAddress;
@NotNull(message = "来到本地时间为必填项")
@ExcelProperty("来到本地时间(格式:2022-01-01)")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date arriveDate;
@ExcelProperty("返回方式")
@NotBlank(message = "返回方式不能为空")
private String trafficType;
@ExcelProperty("其他返回方式")
private String trafficTypeExplain;
@NotBlank(message = "48小时核酸检测为必填项")
@ExcelProperty("48小时核酸检测")
private String isNatRecord;
@NotBlank(message = "疫苗接种针次为必填项")
@ExcelProperty("疫苗接种针次")
private String vaccineNum;
@ExcelProperty("离开本地时间(格式:2022-01-01)")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date leaveDate;
/**
@ -61,7 +83,7 @@ public class IcTripReportExcelData {
private String name;
@ColumnWidth(20)
@ExcelProperty("身份证号")
@ExcelProperty("证号")
private String idCard;
@ExcelProperty("手机号")

35
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/error/IcPsTripReportRecordErrorExcel.java

@ -0,0 +1,35 @@
package com.epmet.excel.error;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Date;
/**
* 磐石-行程上报信息
*
*/
@Data
public class IcPsTripReportRecordErrorExcel {
@ExcelProperty("姓名")
@ColumnWidth(20)
private String name;
@ColumnWidth(20)
@ExcelProperty("证件号")
private String idCard;
@ExcelProperty("手机号")
@ColumnWidth(20)
private String mobile;
@ColumnWidth(60)
@ExcelProperty("错误信息")
private String errorInfo;
}

137
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcDangerAreaExcelImportListener.java

@ -0,0 +1,137 @@
package com.epmet.excel.handler;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.tools.constant.NumConstant;
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.ValidateException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dao.IcDangerAreaDao;
import com.epmet.entity.IcDangerAreaEntity;
import com.epmet.excel.IcDangerAreaImportExcel;
import com.epmet.service.IcDangerAreaService;
import lombok.Data;
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 java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 核酸检测excel导入监听器
*/
@Data
@Slf4j
public class IcDangerAreaExcelImportListener implements ReadListener<IcDangerAreaImportExcel> {
public static final int MAX_THRESHOLD = 200;
private String customerId = "";
private Map<String,String> dangerLevelMap = null;
private List<IcDangerAreaEntity> datas = new ArrayList<>();
private List<IcDangerAreaImportExcel.IcDangerAreaError> errorRows = new ArrayList<>();
@Autowired
private IcDangerAreaService icDangerAreaService;
@Autowired
private IcDangerAreaDao icDangerAreaDao;
public IcDangerAreaExcelImportListener(Map<String,String> dangerLevelMap, String customerId, IcDangerAreaService icDangerAreaService, IcDangerAreaDao icDangerAreaDao) {
this.dangerLevelMap = dangerLevelMap;
this.customerId = customerId;
this.icDangerAreaService = icDangerAreaService;
this.icDangerAreaDao = icDangerAreaDao;
}
@Override
public void invoke(IcDangerAreaImportExcel data, AnalysisContext context) {
try {
/*LambdaQueryWrapper<IcDangerAreaEntity> qw = new LambdaQueryWrapper<>();
qw.eq(IcDangerAreaEntity::getAllName,data.getAllName());
IcDangerAreaEntity icDangerAreaEntity = icDangerAreaDao.selectOne(qw);
if (null != icDangerAreaEntity){
throw new EpmetException(EpmetErrorCode.DANGER_AREA_ERROR.getCode());
}*/
ValidatorUtils.validateEntity(data);
IcDangerAreaEntity entity = ConvertUtils.sourceToTarget(data, IcDangerAreaEntity.class);
String[] split = data.getAllName().split("-");
for (int i = NumConstant.ZERO; i < split.length; i++) {
switch (i){
case NumConstant.ZERO:
entity.setProvince(split[i]);
break;
case NumConstant.ONE:
entity.setCity(split[i]);
break;
case NumConstant.TWO:
entity.setDistrict(split[i]);
break;
default:
break;
}
}
if (StringUtils.isBlank(entity.getProvince())){
throw new EpmetException("省未填写");
}
if (StringUtils.isBlank(entity.getCity())){
throw new EpmetException("市未填写");
}
if (StringUtils.isBlank(entity.getDistrict())){
throw new EpmetException("区未填写");
}
entity.setDangerLevel(dangerLevelMap.get(entity.getDangerLevel()));
entity.setCustomerId(customerId);
datas.add(entity);
if (datas.size() == MAX_THRESHOLD) {
execPersist();
}
} catch (Exception e) {
String errorMsg = null;
if (e instanceof ValidateException) {
errorMsg = ((ValidateException) e).getMsg();
} else {
log.warn("【风险地区信息导入】出错:{}", e.getStackTrace());
errorMsg = ((EpmetException)e).getInternalMsg();
log.warn("【风险地区信息导入】出错:{}", ExceptionUtils.getErrorStackTrace(e));
}
IcDangerAreaImportExcel.IcDangerAreaError errorRow = new IcDangerAreaImportExcel.IcDangerAreaError();
errorRow.setName(data.getAllName());
errorRow.setDangerLevel(data.getDangerLevel());
errorRow.setErrorInfo(errorMsg);
errorRows.add(errorRow);
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
// 最后几条达不到阈值,这里必须再调用一次
execPersist();
}
/**
* 执行持久化
*/
private void execPersist() {
try {
if (CollectionUtils.isNotEmpty(datas)){
icDangerAreaService.insertBatch(datas);
}
} finally {
datas.clear();
}
}
/**
* 获取错误行
* @return
*/
public List<IcDangerAreaImportExcel.IcDangerAreaError> getErrorRows() {
return errorRows;
}
}

178
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcPsTripReportExcelImportListener.java

@ -0,0 +1,178 @@
package com.epmet.excel.handler;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.ValidateException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.IcResiUserConstant;
import com.epmet.entity.IcTripReportRecordEntity;
import com.epmet.excel.IcPsTripReportRecordExcel;
import com.epmet.excel.data.IcTripReportExcelData;
import com.epmet.excel.error.IcPsTripReportRecordErrorExcel;
import com.epmet.service.impl.IcTripReportRecordServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* 磐石-行程上报excel导入监听器
*/
@Slf4j
public class IcPsTripReportExcelImportListener implements ReadListener<IcPsTripReportRecordExcel> {
/**
* 最大条数阈值
*/
public static final int MAX_THRESHOLD = 200;
/**
* 当前操作用户
*/
private CustomerStaffInfoCacheResult staffInfo;
private String customerId;
//字典表数据
private Map<String, String> trafficTypeMap;
private Map<String, String> sojournHistoryMap;
private Map<String, String> isolateTypeMap;
private Map<String, String> tripDataTypeMap;
private Map<String, String> areaMap;
/**
* 数据
*/
private List<IcTripReportRecordEntity> datas = new ArrayList<>();
/**
* 错误项列表
*/
private List<IcPsTripReportRecordErrorExcel> errorRows = new ArrayList<>();
private IcTripReportRecordServiceImpl tripReportRecordService;
public IcPsTripReportExcelImportListener(String customerId, CustomerStaffInfoCacheResult staffInfo, IcTripReportRecordServiceImpl tripReportRecordService,
Map<String, String> trafficTypeMap, Map<String, String> sojournHistoryMap, Map<String, String> isolateTypeMap, Map<String, String> tripDataTypeMap, Map<String, String> areaMap) {
this.customerId=customerId;
this.staffInfo = staffInfo;
this.tripReportRecordService = tripReportRecordService;
this.trafficTypeMap = trafficTypeMap;
this.sojournHistoryMap = sojournHistoryMap;
this.isolateTypeMap = isolateTypeMap;
this.tripDataTypeMap = tripDataTypeMap;
this.areaMap = areaMap;
}
@Override
public void invoke(IcPsTripReportRecordExcel data, AnalysisContext context) {
try {
// 先校验数据
ValidatorUtils.validateEntity(data);
AtomicBoolean bl = new AtomicBoolean(false);
StringBuffer errMsg = new StringBuffer("");
IcTripReportRecordEntity e = ConvertUtils.sourceToTarget(data, IcTripReportRecordEntity.class);
e.setCustomerId(customerId);
e.setAgencyId(staffInfo.getAgencyId());
e.setPids(staffInfo.getAgencyPIds());
e.setUserType(IcResiUserConstant.USER_TYPE_IMPORT);
e.setNatOutcome("阳性".equals(e.getNatOutcome()) ? "1" : "0");
if (trafficTypeMap.containsKey(data.getTrafficType())) {
e.setTrafficType(trafficTypeMap.get(data.getTrafficType()));
}
if ("其他".equals(data.getTrafficType()) && StringUtils.isBlank(data.getTrafficTypeExplain())) {
errMsg.append("返回方式为其他时,请补充“其他返回方式”;");
bl.set(true);
}
if (StringUtils.isNotBlank(data.getSojournHistory())) {
e.setSojournHistory(sojournHistoryMap.get(data.getSojournHistory()));
} else {
String[] str = e.getSourceAddress().split("-");
if (str.length < 3) {
errMsg.append("数据不完整,‘来源地’信息填写格式错误;");
bl.set(true);
}
e.setSojournHistory("3");//无风险
if (areaMap.containsKey(str[2])) {
e.setSojournHistory(areaMap.get(str[2]));
}
}
if (StringUtils.isNotBlank(data.getIsolateType())) {
e.setIsolateType(isolateTypeMap.get(data.getIsolateType()));
}
if (StringUtils.isNotBlank(data.getTripDataType())) {
e.setTripDataType(tripDataTypeMap.get(data.getTripDataType()));
}
e.setIsArriveCheck("是".equals(data.getIsArriveCheck()) ? "1" : "0");
e.setIsArrive("是".equals(data.getIsArrive()) ? "1" : "0");
//必要字段没值的
if (StringUtils.isEmpty(e.getSourceAddress()) || StringUtils.isEmpty(e.getPresentAddress())
|| StringUtils.isEmpty(e.getTrafficType())) {
errMsg.append("数据不完整,请检查‘来源地’、‘在曹居住地点’、‘返回方式’信息是否填写完整;");
bl.set(true);
}
if (bl.get()) {
IcPsTripReportRecordErrorExcel errorRow = new IcPsTripReportRecordErrorExcel();
errorRow.setName(data.getName());
errorRow.setMobile(data.getMobile());
errorRow.setIdCard(data.getIdCard());
errorRow.setErrorInfo(errMsg.toString());
errorRows.add(errorRow);
return;
}
datas.add(e);
if (datas.size() == MAX_THRESHOLD) {
execPersist();
}
} catch (Exception e) {
String errorMsg = null;
if (e instanceof ValidateException) {
errorMsg = ((ValidateException) e).getMsg();
} else {
errorMsg = "未知错误";
log.error("【行程上报导入】出错:{}", ExceptionUtils.getErrorStackTrace(e));
}
IcPsTripReportRecordErrorExcel errorRow = new IcPsTripReportRecordErrorExcel();
errorRow.setName(data.getName());
errorRow.setMobile(data.getMobile());
errorRow.setIdCard(data.getIdCard());
errorRow.setErrorInfo(errorMsg);
errorRows.add(errorRow);
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
// 最后几条达不到阈值,这里必须再调用一次
execPersist();
}
/**
* 执行持久化
*/
private void execPersist() {
try {
if (datas != null && datas.size() > 0) {
tripReportRecordService.batchPersist(datas);
}
} finally {
datas.clear();
}
}
/**
* 获取错误行
* @return
*/
public List<IcPsTripReportRecordErrorExcel> getErrorRows() {
return errorRows;
}
}

31
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java

@ -10,11 +10,15 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.IcResiUserConstant;
import com.epmet.entity.IcTripReportRecordEntity;
import com.epmet.excel.data.IcTripReportExcelData;
import com.epmet.excel.error.IcPsTripReportRecordErrorExcel;
import com.epmet.service.impl.IcTripReportRecordServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
/**
@ -33,6 +37,8 @@ public class IcTripReportExcelImportListener implements ReadListener<IcTripRepor
*/
private CustomerStaffInfoCacheResult staffInfo;
private String customerId;
//字典表数据
private Map<String, String> trafficTypeMap;
/**
* 数据
@ -46,10 +52,11 @@ public class IcTripReportExcelImportListener implements ReadListener<IcTripRepor
private IcTripReportRecordServiceImpl tripReportRecordService;
public IcTripReportExcelImportListener(String customerId,CustomerStaffInfoCacheResult staffInfo, IcTripReportRecordServiceImpl tripReportRecordService) {
public IcTripReportExcelImportListener(String customerId,CustomerStaffInfoCacheResult staffInfo, IcTripReportRecordServiceImpl tripReportRecordService, Map<String, String> trafficTypeMap) {
this.customerId=customerId;
this.staffInfo = staffInfo;
this.tripReportRecordService = tripReportRecordService;
this.trafficTypeMap = trafficTypeMap;
}
@Override
@ -59,11 +66,33 @@ public class IcTripReportExcelImportListener implements ReadListener<IcTripRepor
// 先校验数据
ValidatorUtils.validateEntity(data);
AtomicBoolean bl = new AtomicBoolean(false);
StringBuffer errMsg = new StringBuffer("");
IcTripReportRecordEntity tripReportRecordEntity = ConvertUtils.sourceToTarget(data, IcTripReportRecordEntity.class);
tripReportRecordEntity.setCustomerId(customerId);
tripReportRecordEntity.setAgencyId(staffInfo.getAgencyId());
tripReportRecordEntity.setPids(staffInfo.getAgencyPIds());
tripReportRecordEntity.setUserType(IcResiUserConstant.USER_TYPE_IMPORT);
tripReportRecordEntity.setIsNatRecord("是".equals(data.getIsNatRecord()) ? "1" : "0");
tripReportRecordEntity.setVaccineNum(tripReportRecordEntity.getVaccineNum().replace("次",""));
if (trafficTypeMap.containsKey(data.getTrafficType())) {
tripReportRecordEntity.setTrafficType(trafficTypeMap.get(data.getTrafficType()));
}
if ("其他".equals(data.getTrafficType()) && StringUtils.isBlank(data.getTrafficTypeExplain())) {
errMsg.append("返回方式为其他时,请补充“其他返回方式”;");
bl.set(true);
}
if (bl.get()) {
IcTripReportExcelData.ErrorRow errorRow = new IcTripReportExcelData.ErrorRow();
errorRow.setName(data.getName());
errorRow.setMobile(data.getMobile());
errorRow.setIdCard(data.getIdCard());
errorRow.setErrorInfo(errMsg.toString());
errorRows.add(errorRow);
return;
}
datas.add(tripReportRecordEntity);
if (datas.size() == MAX_THRESHOLD) {

10
epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeDeathService.java

@ -2,8 +2,10 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.ChangeDeathDTO;
import com.epmet.dto.form.OnlyIdFormDTO;
import com.epmet.entity.ChangeDeathEntity;
import java.util.List;
@ -76,4 +78,12 @@ public interface ChangeDeathService extends BaseService<ChangeDeathEntity> {
* @date 2022-05-05
*/
void delete(String[] ids);
/**
* 恢复迁出人员
* @return
*/
void recovery(TokenDto tokenDto, OnlyIdFormDTO dto);
}

10
epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java

@ -2,8 +2,10 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.ChangeRelocationDTO;
import com.epmet.dto.form.OnlyIdFormDTO;
import com.epmet.entity.ChangeRelocationEntity;
import java.util.List;
@ -105,4 +107,12 @@ public interface ChangeRelocationService extends BaseService<ChangeRelocationEnt
* @Date 2022/6/27 10:52
*/
void moveOutHomeConfirm(ChangeRelocationDTO dto);
/**
* 恢复迁出人员
* @return
*/
void recovery(TokenDto tokenDto,OnlyIdFormDTO dto);
}

84
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcDangerAreaService.java

@ -0,0 +1,84 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcDangerAreaDTO;
import com.epmet.dto.form.DangerAreaListFormDTO;
import com.epmet.entity.IcDangerAreaEntity;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
/**
* 疫情风险地区
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-31
*/
public interface IcDangerAreaService extends BaseService<IcDangerAreaEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcDangerAreaDTO>
* @author generator
* @date 2022-10-31
*/
PageData<IcDangerAreaDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcDangerAreaDTO>
* @author generator
* @date 2022-10-31
*/
List<IcDangerAreaDTO> list(Map<String, Object> params);
PageData<IcDangerAreaDTO> list(DangerAreaListFormDTO formDTO);
/**
* 单条查询
*
* @param id
* @return IcDangerAreaDTO
* @author generator
* @date 2022-10-31
*/
IcDangerAreaDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-10-31
*/
void save(IcDangerAreaDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-10-31
*/
void update(IcDangerAreaDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-10-31
*/
void delete(List<String> ids,String staffId);
void execAsyncExcelImport(Path fileSavePath, String taskId, String customerId, String userId);
}

35
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java

@ -2,13 +2,16 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.IcTripReportRecordDTO;
import com.epmet.dto.form.IcTripReportFormDTO;
import com.epmet.dto.form.MyReportedTripFormDTO;
import com.epmet.dto.form.PageTripReportFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.EmphasisTripListResultDTO;
import com.epmet.dto.result.EmphasisTripPieDetailResultDTO;
import com.epmet.dto.result.TripListDTO;
import com.epmet.entity.IcTripReportRecordEntity;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
@ -102,4 +105,30 @@ public interface IcTripReportRecordService extends BaseService<IcTripReportRecor
* @param filePath
*/
void execAsyncExcelImport(Path filePath, String importTaskId,String customerId,String userId);
void psExecAsyncExcelImport(Path filePath, String taskId, TokenDto tokenDto);
/**
* @Description 重点行程名单列表
* @param formDTO
* @Author zxc
* @Date 2022/11/1 15:44
*/
PageData<EmphasisTripListResultDTO> emphasisTripList(EmphasisTripListFormDTO formDTO);
/**
* @Description 重点行程详情
* @param formDTO
* @Author zxc
* @Date 2022/11/1 16:05
*/
EmphasisTripListResultDTO emphasisTripDetail(EmphasisTripDetailFormDTO formDTO);
/**
* @Description 重点行程名单饼图详情
* @param formDTO
* @Author zxc
* @Date 2022/11/1 16:09
*/
List<EmphasisTripPieDetailResultDTO> emphasisTripPieDetail(EmphasisTripPieDetailFormDTO formDTO);
}

47
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeDeathServiceImpl.java

@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.IcResiUserSubStatusEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
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;
@ -17,18 +20,19 @@ import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.constant.IcResiUserConstant;
import com.epmet.dao.ChangeDeathDao;
import com.epmet.dao.IcResiUserDao;
import com.epmet.dto.ChangeDeathDTO;
import com.epmet.dto.ChangeWelfareDTO;
import com.epmet.dto.form.IcResiUserTransferFormDTO;
import com.epmet.dto.form.OnlyIdFormDTO;
import com.epmet.dto.form.RentTenantDataFormDTO;
import com.epmet.dto.result.RentTenantDataResultDTO;
import com.epmet.entity.ChangeDeathEntity;
import com.epmet.entity.ChangeRelocationEntity;
import com.epmet.entity.IcResiUserEntity;
import com.epmet.entity.IcUserChangeRecordEntity;
import com.epmet.redis.ChangeDeathRedis;
import com.epmet.service.ChangeDeathService;
import com.epmet.service.ChangeWelfareService;
import com.epmet.service.IcResiUserService;
import com.epmet.service.IcUserTransferRecordService;
import com.epmet.service.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -65,6 +69,11 @@ public class ChangeDeathServiceImpl extends BaseServiceImpl<ChangeDeathDao, Chan
@Autowired
private ChangeRelocationServiceImpl changeRelocationServiceImpl;
@Autowired
private IcResiUserDao icResiUserDao;
@Autowired
private IcUserChangeRecordService icUserChangeRecordService;
@Override
public PageData<ChangeDeathDTO> page(Map<String, Object> params) {
params.put("customerId", loginUserUtil.getLoginUserCustomerId());
@ -201,4 +210,34 @@ public class ChangeDeathServiceImpl extends BaseServiceImpl<ChangeDeathDao, Chan
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public void recovery(TokenDto tokenDto, OnlyIdFormDTO dto) {
// 更新用户基础信息用户状态信息
ChangeDeathEntity changeDeathEntity = baseDao.selectById(dto.getId());
IcResiUserEntity icResiUserEntity = icResiUserDao.selectById(changeDeathEntity.getUserId());
icResiUserEntity.setStatus("0");
icResiUserEntity.setSubStatus("52");
icResiUserDao.updateById(icResiUserEntity);
// 添加迁出恢复记录
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity();
changeRecordEntity.setCustomerId(tokenDto.getCustomerId());
changeRecordEntity.setOperatorId(tokenDto.getUserId());
changeRecordEntity.setIcUserId(icResiUserEntity.getId());
changeRecordEntity.setOperatorName(staffInfoCache.getRealName());
changeRecordEntity.setIcUserName(icResiUserEntity.getName());
changeRecordEntity.setType("recovery_death");
changeRecordEntity.setTypeName("恢复死亡");
changeRecordEntity.setBeforeChangeName("-");
changeRecordEntity.setAfterChangeName("-");
changeRecordEntity.setChangeTime(new java.util.Date());
icUserChangeRecordService.insert(changeRecordEntity);
// 清除迁出表数据
baseDao.deleteById(dto.getId());
}
}

40
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java

@ -6,12 +6,15 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.rocketmq.messages.IcResiUserAddMQMsg;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.IcResiUserSubStatusEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache;
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.Result;
@ -23,15 +26,18 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.constant.IcResiUserConstant;
import com.epmet.constant.SystemMessageType;
import com.epmet.dao.ChangeRelocationDao;
import com.epmet.dao.IcResiUserDao;
import com.epmet.dto.ChangeRelocationDTO;
import com.epmet.dto.ChangeWelfareDTO;
import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.form.IcResiUserTransferFormDTO;
import com.epmet.dto.form.OnlyIdFormDTO;
import com.epmet.dto.form.RentTenantDataFormDTO;
import com.epmet.dto.form.SystemMsgFormDTO;
import com.epmet.dto.result.RentTenantDataResultDTO;
import com.epmet.entity.ChangeRelocationEntity;
import com.epmet.entity.IcResiUserEntity;
import com.epmet.entity.IcUserChangeRecordEntity;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.redis.ChangeRelocationRedis;
import com.epmet.service.*;
@ -78,6 +84,10 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl<ChangeRelocatio
private IcUserTransferRecordService icUserTransferRecordService;
@Resource
private IcResiUserConfirmService icResiUserConfirmService;
@Autowired
private IcResiUserDao icResiUserDao;
@Autowired
private IcUserChangeRecordService icUserChangeRecordService;
@Override
public PageData<ChangeRelocationDTO> page(Map<String, Object> params) {
@ -342,6 +352,36 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl<ChangeRelocatio
}
}
@Override
public void recovery(TokenDto tokenDto, OnlyIdFormDTO dto) {
// 更新用户基础信息用户状态信息
ChangeRelocationEntity changeRelocationEntity = baseDao.selectById(dto.getId());
IcResiUserEntity icResiUserEntity = icResiUserDao.selectById(changeRelocationEntity.getIcUserId());
icResiUserEntity.setStatus("0");
icResiUserEntity.setSubStatus("51");
icResiUserDao.updateById(icResiUserEntity);
// 添加迁出恢复记录
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity();
changeRecordEntity.setCustomerId(tokenDto.getCustomerId());
changeRecordEntity.setOperatorId(tokenDto.getUserId());
changeRecordEntity.setIcUserId(icResiUserEntity.getId());
changeRecordEntity.setOperatorName(staffInfoCache.getRealName());
changeRecordEntity.setIcUserName(icResiUserEntity.getName());
changeRecordEntity.setType("recovery_moveout");
changeRecordEntity.setTypeName("恢复迁出");
changeRecordEntity.setBeforeChangeName("-");
changeRecordEntity.setAfterChangeName("-");
changeRecordEntity.setChangeTime(new java.util.Date());
icUserChangeRecordService.insert(changeRecordEntity);
// 清除迁出表数据
baseDao.deleteById(dto.getId());
}
public void editResiMq(String customerId, String userId) {
//推送MQ事件
IcResiUserAddMQMsg mqMsg = new IcResiUserAddMQMsg();

15
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java

@ -23,6 +23,7 @@ import com.epmet.dao.IcResiUserDao;
import com.epmet.dto.ChangeWelfareDTO;
import com.epmet.dto.IcBirthRecordDTO;
import com.epmet.dto.form.BirthRecordFormDTO;
import com.epmet.dto.form.BirthRecordListFormDTO;
import com.epmet.dto.form.BirthRecordUpdateDTO;
import com.epmet.dto.form.IcResiUserTransferFormDTO;
import com.epmet.dto.result.AllGridsByUserIdResultDTO;
@ -79,10 +80,16 @@ public class IcBirthRecordServiceImpl extends BaseServiceImpl<IcBirthRecordDao,
}
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
LambdaQueryWrapper<IcBirthRecordEntity> wrapper = getWrapper(formDTO, staffInfo);
List<IcBirthRecordEntity> entityList = baseDao.selectList(wrapper);
PageInfo<IcBirthRecordEntity> pageInfo = new PageInfo<>(entityList);
List<IcBirthRecordDTO> list = ConvertUtils.sourceToTarget(entityList, IcBirthRecordDTO.class);
// LambdaQueryWrapper<IcBirthRecordEntity> wrapper = getWrapper(formDTO, staffInfo);
// List<IcBirthRecordEntity> entityList = baseDao.selectList(wrapper);
BirthRecordListFormDTO birthRecordListFormDTO = ConvertUtils.sourceToTarget(formDTO, BirthRecordListFormDTO.class);
birthRecordListFormDTO.setAgencyId(staffInfo.getAgencyId());
List<IcBirthRecordDTO> list = baseDao.selectListByEntity(birthRecordListFormDTO);
PageInfo<IcBirthRecordDTO> pageInfo = new PageInfo<>(list);
// List<IcBirthRecordDTO> list = ConvertUtils.sourceToTarget(entityList, IcBirthRecordDTO.class);
if (CollectionUtils.isNotEmpty(list)) {
//查询网格名称

263
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcDangerAreaServiceImpl.java

@ -0,0 +1,263 @@
package com.epmet.service.impl;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum;
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.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.FileUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.IcDangerAreaDao;
import com.epmet.dto.IcDangerAreaDTO;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.dto.form.DangerAreaListFormDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.entity.IcDangerAreaEntity;
import com.epmet.excel.IcDangerAreaImportExcel;
import com.epmet.excel.handler.IcDangerAreaExcelImportListener;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.OssFeignClient;
import com.epmet.service.IcDangerAreaService;
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;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.entity.ContentType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.stream.Collectors;
/**
* 疫情风险地区
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-10-31
*/
@Service
@Slf4j
public class IcDangerAreaServiceImpl extends BaseServiceImpl<IcDangerAreaDao, IcDangerAreaEntity> implements IcDangerAreaService {
@Autowired
private EpmetAdminOpenFeignClient adminOpenFeignClient;
@Autowired
private OssFeignClient ossFeignClient;
@Autowired
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
@Override
public PageData<IcDangerAreaDTO> page(Map<String, Object> params) {
IPage<IcDangerAreaEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcDangerAreaDTO.class);
}
@Override
public List<IcDangerAreaDTO> list(Map<String, Object> params) {
List<IcDangerAreaEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcDangerAreaDTO.class);
}
@Override
public PageData<IcDangerAreaDTO> list(DangerAreaListFormDTO formDTO) {
PageData<IcDangerAreaDTO> result = new PageData<>();
LambdaQueryWrapper<IcDangerAreaEntity> qr = new LambdaQueryWrapper<>();
qr.like(StringUtils.isNotBlank(formDTO.getName()),IcDangerAreaEntity::getAllName,formDTO.getName())
.eq(StringUtils.isNotBlank(formDTO.getDangerLevel()),IcDangerAreaEntity::getDangerLevel,formDTO.getDangerLevel())
.orderByDesc(BaseEpmetEntity::getCreatedTime);
if (formDTO.getIsPage()){
PageInfo<IcDangerAreaEntity> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectList(qr));
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));
result.setList(ConvertUtils.sourceToTarget(pageInfo.getList(),IcDangerAreaDTO.class));
}else {
List<IcDangerAreaEntity> entities = baseDao.selectList(qr);
result.setTotal(entities.size());
result.setList(ConvertUtils.sourceToTarget(entities,IcDangerAreaDTO.class));
}
return result;
}
private QueryWrapper<IcDangerAreaEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcDangerAreaEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcDangerAreaDTO get(String id) {
IcDangerAreaEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcDangerAreaDTO.class);
}
/**
* @Description 新增
* @param dto
* @Author zxc
* @Date 2022/11/1 09:09
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcDangerAreaDTO dto) {
LambdaQueryWrapper<IcDangerAreaEntity> qw = new LambdaQueryWrapper<>();
qw.eq(IcDangerAreaEntity::getAllName,dto.getAllName());
IcDangerAreaEntity icDangerAreaEntity = baseDao.selectOne(qw);
if (null != icDangerAreaEntity){
throw new EpmetException(EpmetErrorCode.DANGER_AREA_ERROR.getCode());
}
IcDangerAreaEntity entity = ConvertUtils.sourceToTarget(dto, IcDangerAreaEntity.class);
String[] split = dto.getAllName().split("-");
for (int i = NumConstant.ZERO; i < split.length; i++) {
switch (i){
case NumConstant.ZERO:
entity.setProvince(split[i]);
break;
case NumConstant.ONE:
entity.setCity(split[i]);
break;
case NumConstant.TWO:
entity.setDistrict(split[i]);
break;
default:
break;
}
}
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcDangerAreaDTO dto) {
IcDangerAreaEntity entity = ConvertUtils.sourceToTarget(dto, IcDangerAreaEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(List<String> ids,String staffId) {
LambdaUpdateWrapper<IcDangerAreaEntity> updateWrapper=new LambdaUpdateWrapper<>();
updateWrapper.in(IcDangerAreaEntity::getId,ids)
.set(IcDangerAreaEntity::getUpdatedBy,staffId)
.set(IcDangerAreaEntity::getUpdatedTime,new Date())
.set(IcDangerAreaEntity::getDelFlag, NumConstant.ONE_STR);
baseDao.update(null,updateWrapper);
}
@Override
@Async
public void execAsyncExcelImport(Path fileSavePath, String taskId, String customerId, String userId) {
Integer size;
do {
size = baseDao.delAllDangerArea(customerId);
}while (size == NumConstant.ONE_THOUSAND);
try {
//获取当前登录用户所属组织id
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId);
if (null == staffInfo){
throw new EpmetException("未查询到工作人员信息:"+userId);
}
// 字典表
Result<List<SysDictDataDTO>> dictMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.DANGER_AREA_LEVEL_TYPE.getCode());
Map<String, String> dangerLevelMap = dictMapRes.success() && CollectionUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictLabel, SysDictDataDTO::getDictValue)) : new HashMap<>();
IcDangerAreaExcelImportListener dangerAreaExcelImportListener = new IcDangerAreaExcelImportListener(dangerLevelMap, customerId,this ,baseDao);
EasyExcel.read(fileSavePath.toFile(), IcDangerAreaImportExcel.class, dangerAreaExcelImportListener).headRowNumber(1).sheet(0).doRead();
Path errorDescFile = null;
String errorDesFileUrl = null;
List<IcDangerAreaImportExcel.IcDangerAreaError> errorRows = dangerAreaExcelImportListener.getErrorRows();
boolean failed = CollectionUtils.isNotEmpty(errorRows);
if (failed) {
// 生成并上传错误文件
try {
// 文件生成
Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_danger_area", "import", "error_des");
String fileName = UUID.randomUUID().toString().concat(".xlsx");
errorDescFile = errorDescDir.resolve(fileName);
FileItemFactory factory = new DiskFileItemFactory(16, errorDescDir.toFile());
FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, fileName);
OutputStream os = fileItem.getOutputStream();
EasyExcel.write(os, IcDangerAreaImportExcel.IcDangerAreaError.class).sheet("导入失败列表").doWrite(errorRows);
// 文件上传oss
Result<UploadImgResultDTO> errorDesFileUploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem));
if (errorDesFileUploadResult.success()) {
errorDesFileUrl = errorDesFileUploadResult.getData().getUrl();
}
} finally {
if (Files.exists(errorDescFile)) {
Files.delete(errorDescFile);
}
}
}
ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO();
importFinishTaskForm.setTaskId(taskId);
importFinishTaskForm.setProcessStatus(failed ? ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL : ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS);
importFinishTaskForm.setOperatorId(userId);
importFinishTaskForm.setResultDesc("");
importFinishTaskForm.setResultDescFilePath(errorDesFileUrl);
Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm);
if (!result.success()) {
log.error("【风险地区导入】finishImportTask失败");
}
} catch (Exception e) {
String errorMsg = ExceptionUtils.getErrorStackTrace(e);
log.error("【风险地区导入】出错:{}", errorMsg);
ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO();
importFinishTaskForm.setTaskId(taskId);
importFinishTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL);
importFinishTaskForm.setOperatorId(userId);
importFinishTaskForm.setResultDesc("导入失败");
Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm);
if (!result.success()) {
log.error("【风险地区导入】导入记录状态修改为'完成'失败");
}
} finally {
// 删除临时文件
if (Files.exists(fileSavePath)) {
try {
Files.delete(fileSavePath);
} catch (IOException e) {
log.error("method exception", e);
}
}
}
}
}

44
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java

@ -2,12 +2,14 @@ package com.epmet.service.impl;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
@ -289,6 +291,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
List<String> idCards = entities.stream().map(m -> m.getIdCard()).collect(Collectors.toList());
Integer attentionType = entities.get(NumConstant.ZERO).getAttentionType();
List<String> existList = baseDao.getExistList(attentionType, idCards);
log.info("ic_epidemic_special_attention是否存在记录?attentionType="+attentionType+";idCards="+JSON.toJSONString(idCards)+";existList="+ JSON.toJSONString(existList));
List<IcEpidemicSpecialAttentionEntity> existsEntities = new ArrayList<>();
if (CollectionUtils.isNotEmpty(existList)){
for (String s : existList) {
@ -302,19 +305,21 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
}
baseDao.addExistAttention(existsEntities,attentionType);
}
entities.forEach(e -> {
e.setIsAttention(NumConstant.ONE);
e.setOrgId(agencyInfo.getId());
e.setPid(agencyInfo.getPid());
e.setPids(agencyInfo.getPids());
e.setCustomerId(formDTO.getCustomerId());
e.setIsHistory(NumConstant.ZERO_STR);
if(StringUtils.isBlank(e.getIsolatedState())){
//从行程上报界面,点击加入重点人群关注,默认隔离状态是居家隔离
e.setIsolatedState(NumConstant.ONE_STR);
}
});
insertBatch(entities);
if(CollectionUtils.isNotEmpty(entities)){
entities.forEach(e -> {
e.setIsAttention(NumConstant.ONE);
e.setOrgId(agencyInfo.getId());
e.setPid(agencyInfo.getPid());
e.setPids(agencyInfo.getPids());
e.setCustomerId(formDTO.getCustomerId());
e.setIsHistory(NumConstant.ZERO_STR);
if(StringUtils.isBlank(e.getIsolatedState())){
//从行程上报界面,点击加入重点人群关注,默认隔离状态是居家隔离
e.setIsolatedState(NumConstant.ONE_STR);
}
});
insertBatch(entities);
}
//新增通知表信息
List<IcEpidemicSpecialAttentionDTO> needSedNotice = formDTO.getList().stream().filter(l -> CollectionUtils.isNotEmpty(l.getChannel())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(needSedNotice)) {
@ -349,6 +354,19 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
e.setReason(formDTO.getReason());
e.setRemark(formDTO.getRemark());
e.setIsolatedState(formDTO.getIsolatedState());
//需求来源于磐石: http://zentao.elinkservice.cn/story-view-713.html
e.setGkStartTime(StringUtils.isNotBlank(formDTO.getGkStartTime()) ? formDTO.getGkStartTime() : StrConstant.EPMETY_STR);
e.setGkEndTime(StringUtils.isNotBlank(formDTO.getGkEndTime()) ? formDTO.getGkEndTime() : StrConstant.EPMETY_STR);
e.setGbName(StringUtils.isNotBlank(formDTO.getGbName()) ? formDTO.getGbName() : StrConstant.EPMETY_STR);
e.setGbMobile(StringUtils.isNotBlank(formDTO.getGbMobile()) ? formDTO.getGbMobile() : StrConstant.EPMETY_STR);
e.setGridManager(StringUtils.isNotBlank(formDTO.getGridManager()) ? formDTO.getGridManager() : StrConstant.EPMETY_STR);
e.setGridManagerMobile(StringUtils.isNotBlank(formDTO.getGridManagerMobile()) ? formDTO.getGridManagerMobile() : StrConstant.EPMETY_STR);
e.setHealthWorker(StringUtils.isNotBlank(formDTO.getHealthWorker()) ? formDTO.getHealthWorker() : StrConstant.EPMETY_STR);
e.setHealthWorkerMobile(StringUtils.isNotBlank(formDTO.getHealthWorkerMobile()) ? formDTO.getHealthWorkerMobile() : StrConstant.EPMETY_STR);
e.setPoliceName(StringUtils.isNotBlank(formDTO.getPoliceName()) ? formDTO.getPoliceName() : StrConstant.EPMETY_STR);
e.setPoliceMobile(StringUtils.isNotBlank(formDTO.getPoliceMobile()) ? formDTO.getPoliceMobile() : StrConstant.EPMETY_STR);
e.setVolunteerName(StringUtils.isNotBlank(formDTO.getVolunteerName()) ? formDTO.getVolunteerName() : StrConstant.EPMETY_STR);
e.setVolunteerMobile(StringUtils.isNotBlank(formDTO.getVolunteerMobile()) ? formDTO.getVolunteerMobile() : StrConstant.EPMETY_STR);
update(e,w);
if (CollectionUtils.isNotEmpty(formDTO.getChannel())){
SendNoticeFormDTO dto = new SendNoticeFormDTO();

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcFollowUpRecordServiceImpl.java

@ -83,7 +83,9 @@ public class IcFollowUpRecordServiceImpl extends BaseServiceImpl<IcFollowUpRecor
if (null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询工作人员缓存信息异常", EpmetErrorCode.SERVER_ERROR.getMsg());
}
if(dto.getIdCard().contains("**")||dto.getMobile().contains("**")){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "身份证号或者手机号格式错误idCard:" + dto.getIdCard() + ";mobile:" + dto.getMobile(), "身份证号或者手机号格式错误");
}
IcFollowUpRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcFollowUpRecordEntity.class);
entity.setAgencyId(staffInfo.getAgencyId());
insert(entity);

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java

@ -178,7 +178,7 @@ public class IcNoticeServiceImpl extends BaseServiceImpl<IcNoticeDao, IcNoticeEn
UserBaseInfoDTO userBaseInfoDTO=userList.get(NumConstant.ZERO);
UserMessageFormDTO messageFormDTO = new UserMessageFormDTO();
messageFormDTO.setCustomerId(item.getCustomerId());
messageFormDTO.setApp(AppClientConstant.APP_GOV);
messageFormDTO.setApp(AppClientConstant.APP_RESI);
messageFormDTO.setGridId(StrConstant.STAR);
messageFormDTO.setUserId(userBaseInfoDTO.getUserId());
messageFormDTO.setTitle("您有一条通知消息!");
@ -409,7 +409,7 @@ public class IcNoticeServiceImpl extends BaseServiceImpl<IcNoticeDao, IcNoticeEn
UserBaseInfoDTO userBaseInfoDTO = userList.get(NumConstant.ZERO);
UserMessageFormDTO messageFormDTO = new UserMessageFormDTO();
messageFormDTO.setCustomerId(item.getCustomerId());
messageFormDTO.setApp(AppClientConstant.APP_GOV);
messageFormDTO.setApp(AppClientConstant.APP_RESI);
messageFormDTO.setGridId(StrConstant.STAR);
messageFormDTO.setUserId(userBaseInfoDTO.getUserId());
messageFormDTO.setTitle("您有一条通知消息!");

44
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -64,7 +64,6 @@ import com.epmet.dto.result.demand.IcResiDemandDictDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.resi.IcResiNonDynamicResultDTO;
import com.epmet.entity.*;
import com.epmet.excel.DataSyncRecordDisabilityExcel;
import com.epmet.excel.EpidemicPreventionExportExcel;
import com.epmet.excel.support.ExportResiUserItemDTO;
import com.epmet.feign.*;
@ -348,6 +347,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
partyMemberDTO.setName(map.get("NAME"));
partyMemberDTO.setIdCard(map.get("ID_CARD"));
partyMemberDTO.setMobile(map.get("MOBILE"));
partyMemberDTO.setCulture(map.get("CULTURE"));
String houseAddress = getHouseAddress4PartymemberInfo(tokenDto.getCustomerId(), map.get("GRID_ID"), map.get("HOME_ID"));
partyMemberDTO.setAddress(houseAddress);
@ -378,6 +378,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
partyMemberDTO.setPartyZw(hash.get("PARTY_ZW"));
partyMemberDTO.setIsTx(hash.get("IS_TX"));
partyMemberDTO.setIsDyzxh(hash.get("IS_DYZXH"));
partyMemberDTO.setRdsszzb(hash.get("RDSSZZB"));
partyMemberDTO.setZzgxzrsqsj(hash.get("ZZGXZRSQSJ"));
partyMemberDTO.setIsQcj(hash.get("IS_QCJ"));
}
}
if ("ic_volunteer".equals(d.getTableName())) {
@ -609,6 +612,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
} else {
partyMemberDTO.setMobile(icResiUser.getMobile());
}
if (map.containsKey("CULTURE")) {
partyMemberDTO.setCulture(map.get("CULTURE"));
} else {
partyMemberDTO.setCulture(icResiUser.getCulture());
}
//查询网格信息
String gridId = null;
if (map.containsKey("GRID_ID")) {
@ -708,6 +717,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
partyMemberDTO.setPartyZw(hash.get("PARTY_ZW"));
partyMemberDTO.setIsTx(hash.get("IS_TX"));
partyMemberDTO.setIsDyzxh(hash.get("IS_DYZXH"));
partyMemberDTO.setRdsszzb(hash.get("RDSSZZB"));
partyMemberDTO.setZzgxzrsqsj(hash.get("ZZGXZRSQSJ"));
partyMemberDTO.setIsQcj(hash.get("IS_QCJ"));
}
}
if ("ic_volunteer".equals(d.getTableName())) {
@ -1698,9 +1710,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
*/
@Override
public PageData<EpidemicPreventionResultDTO> epidemicPreventionList(EpidemicPreventionFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null != staffInfo) {
formDTO.setAgencyId(staffInfo.getAgencyId());
if(StringUtils.isBlank(formDTO.getAgencyId())){
//没有指定查询某个组织时,默认查询当前用户所属组织及下级
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null != staffInfo) {
formDTO.setAgencyId(staffInfo.getAgencyId());
}
}
List<EpidemicPreventionResultDTO> list = new ArrayList<>();
if (formDTO.getIsPage()){
@ -2406,6 +2421,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
user.setName(formDTO.getName());
user.setMobile(formDTO.getMobile());
user.setIsParty(NumConstant.ONE_STR);
user.setCulture(formDTO.getCulture());
//如果是党员中心户,则居民是志愿者
if (NumConstant.ONE_STR.equals(formDTO.getIsDyzxh())) {
user.setIsVolunteer(NumConstant.ONE_STR);
@ -2450,6 +2466,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
user.setName(formDTO.getName());
user.setMobile(formDTO.getMobile());
user.setIsParty(NumConstant.ONE_STR);
user.setCulture(formDTO.getCulture());
//如果是党员中心户,则居民是志愿者
if (NumConstant.ONE_STR.equals(formDTO.getIsDyzxh())) {
user.setIsVolunteer(NumConstant.ONE_STR);
@ -2461,13 +2478,13 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
//判断是否有党员信息,没有则新增一条,有的话就更新
String branch = formDTO.getOrgPids();
if (StringUtils.isNotBlank(branch)) {
branch = branch.replace(StrConstant.COLON, StrConstant.COMMA);
} else {
branch = "";
}
formDTO.setSszb(branch.concat(formDTO.getSszb()));
//String branch = formDTO.getOrgPids();
//if (StringUtils.isNotBlank(branch)) {
// branch = branch.replace(StrConstant.COLON, StrConstant.COMMA);
//} else {
// branch = "";
//}
//formDTO.setSszb(branch.concat(formDTO.getSszb()));
LambdaQueryWrapper<IcPartyMemberEntity> partyWrapper = new LambdaQueryWrapper<>();
partyWrapper.eq(IcPartyMemberEntity::getIcResiUser, formDTO.getIcResiUser());
IcPartyMemberEntity partyMember = icPartyMemberDao.selectOne(partyWrapper);
@ -2487,7 +2504,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
if (null != volunteer) {
dto.setVolunteerCategory(volunteer.getVolunteerCategory());
}
CustomerResiUserRedis.delIcResiUserInfo(dto.getIcResiUser());
return dto;
}
@ -2993,6 +3010,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
memberMap.put("LDZH", dto.getLdzh());
memberMap.put("PARTY_ZW", dto.getPartyZw());
memberMap.put("IS_DYZXH", dto.getIsDyzxh());
memberMap.put("RDSSZZB", dto.getRdsszzb());
memberMap.put("ZZGXZRSQSJ", dto.getZzgxzrsqsj());
memberMap.put("IS_QCJ", dto.getIsQcj());
list.add(memberMap);
detail.put("ic_party_member", list);
}

366
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java

@ -4,10 +4,13 @@ import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.epmet.commons.mybatis.enums.DelFlagEnum;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
@ -17,22 +20,32 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
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.FileUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.IcResiUserConstant;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.IcDangerAreaDao;
import com.epmet.dao.IcTripReportRecordDao;
import com.epmet.dao.UserBaseInfoDao;
import com.epmet.dto.IcEpidemicSpecialAttentionDTO;
import com.epmet.dto.IcTripReportRecordDTO;
import com.epmet.dto.SysDictDataDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.EmphasisTripListResultDTO;
import com.epmet.dto.result.EmphasisTripPieDetailResultDTO;
import com.epmet.dto.result.TripListDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.entity.IcDangerAreaEntity;
import com.epmet.entity.IcTripReportRecordEntity;
import com.epmet.excel.IcPsTripReportRecordExcel;
import com.epmet.excel.data.IcTripReportExcelData;
import com.epmet.excel.error.IcPsTripReportRecordErrorExcel;
import com.epmet.excel.handler.IcPsTripReportExcelImportListener;
import com.epmet.excel.handler.IcTripReportExcelImportListener;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.OssFeignClient;
import com.epmet.service.IcEpidemicSpecialAttentionService;
@ -83,6 +96,10 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
@Autowired
private OssFeignClient ossFeignClient;
@Autowired
private EpmetAdminOpenFeignClient adminOpenFeignClient;
@Autowired
private IcDangerAreaDao icDangerAreaDao;
/**
* pc: 行程上报-列表
@ -98,6 +115,22 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
PageInfo<IcTripReportRecordDTO> data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage())
.doSelectPageInfo(() -> baseDao.pageList(formDTO));
List<IcTripReportRecordDTO> list = data.getList();
if(CollectionUtils.isEmpty(list)){
return new PageData(list, data.getTotal());
}
//获取需要的字典表数据
//交通方式
Result<Map<String, String>> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode());
//Map<String, String> tMap = trafficTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//7天内旅居史情况
Result<Map<String, String>> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode());
//Map<String, String> sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//隔离状态【磐石的跟之前字典表值不一样】
Map<String, String> isolateTypeMap = new HashMap<>();
isolateTypeMap.put("0", "集中隔离");isolateTypeMap.put("1", "居家隔离");isolateTypeMap.put("2", "居家健康监测");isolateTypeMap.put("3", "已出隔离期");isolateTypeMap.put("4", "不需要隔离");
//行程记录类型
Result<Map<String, String>> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode());
//Map<String, String> tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//3.查询最近一次通知时间、核算检测关注名单
if (CollectionUtils.isNotEmpty(list)) {
Map<String, Date> latestNotice = new HashMap<>();
@ -122,6 +155,16 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
if (MapUtils.isNotEmpty(latestNotice) && latestNotice.containsKey(dto.getIdCard())) {
dto.setLatestNoticeTime(latestNotice.get(dto.getIdCard()));
}
//字典表字段、是否字段赋值对应中国字
dto.setTrafficTypeName(trafficTypeMap.getData().containsKey(dto.getTrafficType()) ? trafficTypeMap.getData().get(dto.getTrafficType()) : "无");
dto.setVaccineNumName(StringUtils.isNotBlank(dto.getVaccineNum()) ? dto.getVaccineNum().concat("针") : "");
dto.setIsNatRecordName("1".equals(dto.getIsNatRecord()) ? "是" : "否");
dto.setNatOutcomeName("1".equals(dto.getNatOutcome()) ? "阳性" : "阴性");
dto.setSojournHistoryName(sojournHistoryMap.getData().containsKey(dto.getSojournHistory()) ? sojournHistoryMap.getData().get(dto.getSojournHistory()) : "无");
dto.setIsolateTypeName(isolateTypeMap.containsKey(dto.getIsolateType()) ? isolateTypeMap.get(dto.getIsolateType()) : "无");
dto.setIsArriveCheckName("1".equals(dto.getIsArriveCheck()) ? "是" : "否");
dto.setIsArriveName("1".equals(dto.getIsArrive()) ? "是" : "否");
dto.setTripDataTypeName(tripDataTypeMap.getData().containsKey(dto.getTripDataType()) ? tripDataTypeMap.getData().get(dto.getTripDataType()) : "无");
}
}
return new PageData(list, data.getTotal());
@ -158,6 +201,32 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
@Override
@Transactional(rollbackFor = Exception.class)
public String save(IcTripReportFormDTO formDTO) {
//磐石
if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){
//判断是磐石客户的7天内旅居史情况没值的按逻辑赋值
if (StringUtils.isEmpty(formDTO.getSojournHistory())) {
//风险地区数据
LambdaQueryWrapper<IcDangerAreaEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcDangerAreaEntity::getCustomerId, formDTO.getCustomerId());
wrapper.eq(IcDangerAreaEntity::getDelFlag, DelFlagEnum.NORMAL.value());
List<IcDangerAreaEntity> areaList = icDangerAreaDao.selectList(wrapper);
Map<String, String> areaMap = new HashMap<>();
areaList.forEach(a -> {
if (StringUtils.isNotBlank(a.getDistrict())) {
areaMap.put(a.getDistrict(), a.getDangerLevel());
}
});
String[] str = formDTO.getSourceAddress().split("-");
if (str.length < 3) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "‘来源地’信息填写格式错误", "‘来源地’信息填写格式错误");
}
if (areaMap.containsKey(str[2])) {
formDTO.setSojournHistory(areaMap.get(str[2]));
} else {
formDTO.setSojournHistory("3");//无风险
}
}
}
//如果是单个录入的,默认数据属于当前用户所属组织id
if(IcResiUserConstant.USER_TYPE_INPUT.equals(formDTO.getUserType())){
//获取当前登录用户所属组织id
@ -218,10 +287,12 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
dto.setMobile(formDTO.getMobile());
//避免再发通知,赋值个空集合吧
dto.setChannel(Collections.emptyList());
//关注类型,核酸检测:2,疫苗接种:1;行程上报:0
//关注类型,核酸检测:2,
// 疫苗接种:1;
// 行程上报:0
dto.setAttentionType(NumConstant.TWO);
dto.setReason("有重点区域行程");
dto.setIsolatedState(NumConstant.ONE_STR);
dto.setIsolatedState(StringUtils.isEmpty(formDTO.getIsolateType()) ? NumConstant.ONE_STR : formDTO.getIsolateType());
list.add(dto);
vaccinationAddFormDTO.setList(list);
epidemicSpecialAttentionService.vaccinationAdd( vaccinationAddFormDTO);
@ -279,6 +350,32 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
@Override
@Transactional(rollbackFor = Exception.class)
public String resiSave(IcTripReportFormDTO formDTO) {
//磐石
if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){
//判断是磐石客户的7天内旅居史情况没值的按逻辑赋值
if (StringUtils.isEmpty(formDTO.getSojournHistory())) {
//风险地区数据
LambdaQueryWrapper<IcDangerAreaEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcDangerAreaEntity::getCustomerId, formDTO.getCustomerId());
wrapper.eq(IcDangerAreaEntity::getDelFlag, DelFlagEnum.NORMAL.value());
List<IcDangerAreaEntity> areaList = icDangerAreaDao.selectList(wrapper);
Map<String, String> areaMap = new HashMap<>();
areaList.forEach(a -> {
if (StringUtils.isNotBlank(a.getDistrict())) {
areaMap.put(a.getDistrict(), a.getDangerLevel());
}
});
String[] str = formDTO.getSourceAddress().split("-");
if (str.length < 3) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "‘来源地’信息填写格式错误", "‘来源地’信息填写格式错误");
}
if (areaMap.containsKey(str[2])) {
formDTO.setSojournHistory(areaMap.get(str[2]));
} else {
formDTO.setSojournHistory("3");//无风险
}
}
}
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(formDTO.getGridId());
if (null == gridInfoCache) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询网格信息异常", EpmetErrorCode.SERVER_ERROR.getMsg());
@ -307,6 +404,36 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
PageInfo<IcTripReportRecordDTO> result = PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectMyReported(formDTO.getUserId(),
formDTO.getCustomerId(),idCard));
if(CollectionUtils.isEmpty(result.getList())){
return new ArrayList<>();
}
//获取需要的字典表数据
//交通方式
Result<Map<String, String>> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode());
//Map<String, String> tMap = trafficTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//7天内旅居史情况
Result<Map<String, String>> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode());
//Map<String, String> sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//隔离状态【磐石的跟之前字典表值不一样】
Map<String, String> isolateTypeMap = new HashMap<>();
isolateTypeMap.put("0", "集中隔离");isolateTypeMap.put("1", "居家隔离");isolateTypeMap.put("2", "居家健康监测");isolateTypeMap.put("3", "已出隔离期");isolateTypeMap.put("4", "不需要隔离");
//行程记录类型
Result<Map<String, String>> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode());
//Map<String, String> tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
for (IcTripReportRecordDTO dto : result.getList()) {
//字典表字段、是否字段赋值对应中国字
dto.setTrafficTypeName(trafficTypeMap.getData().containsKey(dto.getTrafficType()) ? trafficTypeMap.getData().get(dto.getTrafficType()) : "无");
dto.setVaccineNumName(StringUtils.isNotBlank(dto.getVaccineNum()) ? dto.getVaccineNum().concat("针") : "");
dto.setIsNatRecordName("1".equals(dto.getIsNatRecord()) ? "是" : "否");
dto.setNatOutcomeName("1".equals(dto.getNatOutcome()) ? "阳性" : "阴性");
dto.setSojournHistoryName(sojournHistoryMap.getData().containsKey(dto.getSojournHistory()) ? sojournHistoryMap.getData().get(dto.getSojournHistory()) : "无");
dto.setIsolateTypeName(isolateTypeMap.containsKey(dto.getIsolateType()) ? isolateTypeMap.get(dto.getIsolateType()) : "无");
dto.setIsArriveCheckName("1".equals(dto.getIsArriveCheck()) ? "是" : "否");
dto.setIsArriveName("1".equals(dto.getIsArrive()) ? "是" : "否");
dto.setTripDataTypeName(tripDataTypeMap.getData().containsKey(dto.getTripDataType()) ? tripDataTypeMap.getData().get(dto.getTripDataType()) : "无");
}
return result.getList();
}
@ -345,8 +472,11 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
try {
//获取当前登录用户所属组织id
CustomerStaffInfoCacheResult staffInfo= queryCurrentStaff(customerId,userId);
//交通方式
Result<Map<String, String>> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode());
Map<String, String> tMap = trafficTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
IcTripReportExcelImportListener listener = new IcTripReportExcelImportListener(customerId,staffInfo, this);
IcTripReportExcelImportListener listener = new IcTripReportExcelImportListener(customerId,staffInfo, this, tMap);
EasyExcel.read(filePath.toFile(), IcTripReportExcelData.class, listener).headRowNumber(2).sheet(0).doRead();
@ -452,6 +582,17 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
latestNotice.putAll(map);
gzIdCardList.addAll(gzIdCards);
});
//获取需要的字典表数据
//交通方式
Result<Map<String, String>> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode());
//7天内旅居史情况
Result<Map<String, String>> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode());
//隔离状态【磐石的跟之前字典表值不一样】
Map<String, String> isolateTypeMap = new HashMap<>();
isolateTypeMap.put("0", "集中隔离");isolateTypeMap.put("1", "居家隔离");isolateTypeMap.put("2", "居家健康监测");isolateTypeMap.put("3", "已出隔离期");isolateTypeMap.put("4", "不需要隔离");
//行程记录类型
Result<Map<String, String>> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode());
for (IcTripReportRecordDTO dto : list) {
//默认未加入
dto.setHeSuanCheck(false);
@ -463,6 +604,16 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
if (MapUtils.isNotEmpty(latestNotice) && latestNotice.containsKey(dto.getIdCard())) {
dto.setLatestNoticeTime(latestNotice.get(dto.getIdCard()));
}
//字典表字段、是否字段赋值对应中国字
dto.setTrafficTypeName(trafficTypeMap.getData().containsKey(dto.getTrafficType()) ? trafficTypeMap.getData().get(dto.getTrafficType()) : "无");
dto.setVaccineNumName(StringUtils.isNotBlank(dto.getVaccineNum()) ? dto.getVaccineNum().concat("针") : "");
dto.setIsNatRecordName("1".equals(dto.getIsNatRecord()) ? "是" : "否");
dto.setNatOutcomeName("1".equals(dto.getNatOutcome()) ? "阳性" : "阴性");
dto.setSojournHistoryName(sojournHistoryMap.getData().containsKey(dto.getSojournHistory()) ? sojournHistoryMap.getData().get(dto.getSojournHistory()) : "无");
dto.setIsolateTypeName(isolateTypeMap.containsKey(dto.getIsolateType()) ? isolateTypeMap.get(dto.getIsolateType()) : "无");
dto.setIsArriveCheckName("1".equals(dto.getIsArriveCheck()) ? "是" : "否");
dto.setIsArriveName("1".equals(dto.getIsArrive()) ? "是" : "否");
dto.setTripDataTypeName(tripDataTypeMap.getData().containsKey(dto.getTripDataType()) ? tripDataTypeMap.getData().get(dto.getTripDataType()) : "无");
}
IcTripReportRecordDTO resultDto=list.get(NumConstant.ZERO);
if(null!=resultDto){
@ -471,4 +622,213 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
}
return resultDto;
}
/**
* 磐石-行程上报-导入excel
* @return
*/
@Async
@Override
public void psExecAsyncExcelImport(Path filePath, String importTaskId, TokenDto tokenDto) {
try {
//获取当前登录用户所属组织id
CustomerStaffInfoCacheResult staffInfo= queryCurrentStaff(tokenDto.getCustomerId(), tokenDto.getUserId());
//获取需要的字典表数据
//交通方式
Result<Map<String, String>> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode());
Map<String, String> tMap = trafficTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//7天内旅居史情况
Result<Map<String, String>> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode());
Map<String, String> sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//隔离状态【磐石的跟之前字典表值不一样】
Map<String, String> iMap = new HashMap<>();
iMap.put("集中隔离", "0");iMap.put("居家隔离", "1");iMap.put("居家健康监测", "2");iMap.put("已出隔离期", "3");iMap.put("不需要隔离", "4");
//行程记录类型
Result<Map<String, String>> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode());
Map<String, String> tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//风险地区数据
LambdaQueryWrapper<IcDangerAreaEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcDangerAreaEntity::getCustomerId, tokenDto.getCustomerId());
wrapper.eq(IcDangerAreaEntity::getDelFlag, DelFlagEnum.NORMAL.value());
List<IcDangerAreaEntity> areaList = icDangerAreaDao.selectList(wrapper);
Map<String, String> areaMap = new HashMap<>();
areaList.forEach(a->{
if(StringUtils.isNotBlank(a.getDistrict())){
areaMap.put(a.getDistrict(), a.getDangerLevel());
}
});
IcPsTripReportExcelImportListener listener = new IcPsTripReportExcelImportListener(tokenDto.getCustomerId(), staffInfo, this,
tMap, sMap, iMap, tdMap, areaMap);
EasyExcel.read(filePath.toFile(), IcPsTripReportRecordExcel.class, listener).headRowNumber(2).sheet(0).doRead();
Path errorDescFile = null;
String errorDesFileUrl = null;
List<IcPsTripReportRecordErrorExcel> errorRows = listener.getErrorRows();
boolean failed = errorRows.size() > 0;
if (failed) {
// 生成并上传错误文件
try {
// 文件生成
Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_trip_preport", "import", "error_des");
String fileName = UUID.randomUUID().toString().concat(".xlsx");
errorDescFile = errorDescDir.resolve(fileName);
FileItemFactory factory = new DiskFileItemFactory(16, errorDescDir.toFile());
FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, fileName);
OutputStream os = fileItem.getOutputStream();
EasyExcel.write(os, IcPsTripReportRecordErrorExcel.class).sheet("导入失败列表").doWrite(errorRows);
// 文件上传oss
Result<UploadImgResultDTO> errorDesFileUploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem));
if (errorDesFileUploadResult.success()) {
errorDesFileUrl = errorDesFileUploadResult.getData().getUrl();
}
} finally {
if (Files.exists(errorDescFile)) {
Files.delete(errorDescFile);
}
}
}
ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO();
importFinishTaskForm.setTaskId(importTaskId);
importFinishTaskForm.setProcessStatus(failed ? ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL : ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS);
importFinishTaskForm.setOperatorId(tokenDto.getCustomerId());
importFinishTaskForm.setResultDesc("");
importFinishTaskForm.setResultDescFilePath(errorDesFileUrl);
Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm);
if (!result.success()) {
log.error("【行程上报导入】finishImportTask失败");
}
} catch (Exception e) {
String errorMsg = ExceptionUtils.getErrorStackTrace(e);
log.error("【行程上报导入】出错:{}", errorMsg);
ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO();
importFinishTaskForm.setTaskId(importTaskId);
importFinishTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL);
importFinishTaskForm.setOperatorId(tokenDto.getCustomerId());
importFinishTaskForm.setResultDesc("导入失败");
Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm);
if (!result.success()) {
log.error("【行程上报导入】导入记录状态修改为'完成'失败");
}
} finally {
// 删除临时文件
if (Files.exists(filePath)) {
try {
Files.delete(filePath);
} catch (IOException e) {
log.error("method exception", e);
}
}
}
}
/**
* @Description 重点行程名单列表
* @param formDTO
* @Author zxc
* @Date 2022/11/1 15:44
*/
@Override
public PageData<EmphasisTripListResultDTO> emphasisTripList(EmphasisTripListFormDTO formDTO) {
if (StringUtils.isBlank(formDTO.getId())){
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo){
throw new EpmetException("未查询到工作人员信息:"+formDTO.getStaffId());
}
formDTO.setAgencyId(staffInfo.getAgencyId());
}
PageData<EmphasisTripListResultDTO> result = new PageData<>();
if (formDTO.getIsPage()){
PageInfo<EmphasisTripListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.emphasisTripList(formDTO));
result.setList(CollectionUtils.isEmpty(pageInfo.getList()) ? new ArrayList<>() : pageInfo.getList());
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));
}else {
List<EmphasisTripListResultDTO> list = baseDao.emphasisTripList(formDTO);
result.setList(list);
result.setTotal(list.size());
}
// 7天旅居史字典
Result<List<SysDictDataDTO>> sojournMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.SOJOURN_HISTORY.getCode());
Map<String, String> sojournMap = sojournMapRes.success() && CollectionUtils.isNotEmpty(sojournMapRes.getData()) ? sojournMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictValue, SysDictDataDTO::getDictLabel)) : new HashMap<>();
// 隔离状态字典
Map<String, String> isolateMap = new HashMap<>();
isolateMap.put("0", "集中隔离");isolateMap.put("1", "居家隔离");isolateMap.put("2", "居家健康监测");isolateMap.put("3", "已出隔离期");isolateMap.put("4", "不需要隔离");
if (CollectionUtils.isNotEmpty(result.getList())){
result.getList().forEach(l -> {
l.setIsolateTypeName(isolateMap.get(l.getIsolateType()));
l.setSojournHistoryName(sojournMap.get(l.getSojournHistory()));
});
}
return result;
}
/**
* @Description 重点行程详情
* @param formDTO
* @Author zxc
* @Date 2022/11/1 16:05
*/
@Override
public EmphasisTripListResultDTO emphasisTripDetail(EmphasisTripDetailFormDTO formDTO) {
EmphasisTripListFormDTO emphasisTripListFormDTO = new EmphasisTripListFormDTO();
emphasisTripListFormDTO.setId(formDTO.getId());
PageData<EmphasisTripListResultDTO> pageData = emphasisTripList(emphasisTripListFormDTO);
if (CollectionUtils.isEmpty(pageData.getList())){
throw new EpmetException("未查询到行程信息:"+formDTO.getId());
}
return pageData.getList().get(NumConstant.ZERO);
}
/**
* @Description 重点行程名单饼图详情
* @param formDTO
* @Author zxc
* @Date 2022/11/1 16:09
*/
@Override
public List<EmphasisTripPieDetailResultDTO> emphasisTripPieDetail(EmphasisTripPieDetailFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo){
throw new EpmetException("未查询到工作人员信息:"+formDTO.getStaffId());
}
formDTO.setAgencyId(staffInfo.getAgencyId());
List<EmphasisTripPieDetailResultDTO> pieDetailResult = baseDao.emphasisTripPieDetail(formDTO);
// 7天旅居史字典
Result<List<SysDictDataDTO>> sojournMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.SOJOURN_HISTORY.getCode());
Map<String, String> sojournMap = sojournMapRes.success() && CollectionUtils.isNotEmpty(sojournMapRes.getData()) ? sojournMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictValue, SysDictDataDTO::getDictLabel)) : new HashMap<>();
List<EmphasisTripPieDetailResultDTO> result = constituteResult(sojournMap);
if (CollectionUtils.isNotEmpty(pieDetailResult)){
result.forEach(r -> pieDetailResult.stream().filter(p -> p.getDangerLevel().equals(r.getDangerLevel())).forEach(p -> r.setTotal(p.getTotal())));
}
return result.stream().sorted(Comparator.comparing(EmphasisTripPieDetailResultDTO::getTotal).reversed()).collect(Collectors.toList());
}
private List<EmphasisTripPieDetailResultDTO> constituteResult(Map<String, String> sojournMap){
if (sojournMap.isEmpty()){
return new ArrayList<>();
}
List<EmphasisTripPieDetailResultDTO> result = new ArrayList<>();
sojournMap.forEach((k,v) -> {
EmphasisTripPieDetailResultDTO dto = new EmphasisTripPieDetailResultDTO();
dto.setDangerLevel(k);
dto.setDangerLevelName(v);
if (!k.equals(NumConstant.THREE_STR)){
result.add(dto);
}
});
return result;
}
}

13
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.81__edit_partymember.sql

@ -0,0 +1,13 @@
ALTER TABLE `ic_party_member`
ADD COLUMN `RDSSZZB` varchar(255) NULL COMMENT '入党时所在党支部' AFTER `IS_DYZXH`,
ADD COLUMN `ZZGXZRSQSJ` varchar(64) NULL COMMENT '组织关系转入社区时间' AFTER `RDSSZZB`,
ADD COLUMN `IS_QCJ` char(2) NULL COMMENT '是否请长假' AFTER `ZZGXZRSQSJ`;
alter table ic_user_change_record modify column TYPE varchar(64) NOT NULL COMMENT '操作类型【add:新增 category:类别 transfer:调动;logout注销;recovery_moveout恢复迁出;recovery_death恢复死亡】';
alter table ic_user_change_record modify column TYPE_NAME varchar(64) NOT NULL COMMENT '操作类型名称【add:新增 category:类别 transfer:调动;logout注销;recovery_moveout恢复迁出;recovery_death恢复死亡】';
alter table ic_resi_user modify column SUB_STATUS varchar(10) DEFAULT '01' COMMENT '用户详细状态:01:新增、02:导入、03:迁入、04:新生、11:迁出、21死亡;51迁出恢复;52死亡恢复';
UPDATE ic_party_member
SET IS_QCJ = '0'
WHERE
IS_QCJ IS NULL;

20
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.82__ic_epidemic_special_attention_panshi.sql

@ -0,0 +1,20 @@
-- 禅道需求713
alter table ic_epidemic_special_attention MODIFY COLUMN `reason` varchar(500) DEFAULT NULL comment '关注原因;后磐石改名为隔离原因';
alter table ic_epidemic_special_attention MODIFY COLUMN `remark` varchar(500) DEFAULT NULL comment '备注';
alter table ic_epidemic_special_attention ADD column GK_START_TIME varchar(32) DEFAULT '' COMMENT '管控开始时间yyyy-MM-dd,需求来源于磐石' AFTER remark;
alter table ic_epidemic_special_attention ADD column GK_END_TIME varchar(32) DEFAULT '' COMMENT '管控结束时间yyyy-MM-dd,需求来源于磐石' AFTER GK_START_TIME;
alter table ic_epidemic_special_attention ADD column GB_NAME VARCHAR(32) DEFAULT '' COMMENT '镇(街)干部名称,需求来源于磐石' AFTER GK_END_TIME;
alter table ic_epidemic_special_attention ADD column GB_MOBILE VARCHAR(32) DEFAULT '' COMMENT '镇(街)干部联系方式,需求来源于磐石' AFTER GB_NAME;
alter table ic_epidemic_special_attention ADD column GRID_MANAGER VARCHAR(32) DEFAULT '' COMMENT '村(社区)网格管理员,需求来源于磐石' AFTER GB_MOBILE;
alter table ic_epidemic_special_attention ADD column GRID_MANAGER_MOBILE VARCHAR(32) DEFAULT '' COMMENT '村(社区)网格管理员联系方式,需求来源于磐石' AFTER GRID_MANAGER;
alter table ic_epidemic_special_attention ADD column HEALTH_WORKER VARCHAR(32) DEFAULT '' COMMENT '基层医务工作者,需求来源于磐石' AFTER GRID_MANAGER_MOBILE;
alter table ic_epidemic_special_attention ADD column HEALTH_WORKER_MOBILE VARCHAR(32) DEFAULT '' COMMENT '基层医务工作者联系方式,需求来源于磐石' AFTER HEALTH_WORKER;
alter table ic_epidemic_special_attention ADD column POLICE_NAME VARCHAR(32) DEFAULT '' COMMENT '民警,需求来源于磐石' AFTER HEALTH_WORKER_MOBILE;
alter table ic_epidemic_special_attention ADD column POLICE_MOBILE VARCHAR(32) DEFAULT '' COMMENT '民警联系方式,需求来源于磐石' AFTER POLICE_NAME;
alter table ic_epidemic_special_attention ADD column VOLUNTEER_NAME VARCHAR(32) DEFAULT '' COMMENT '志愿者,需求来源于磐石' AFTER POLICE_MOBILE;
alter table ic_epidemic_special_attention ADD column VOLUNTEER_MOBILE VARCHAR(32) DEFAULT '' COMMENT '志愿者联系方式,需求来源于磐石' AFTER VOLUNTEER_NAME;

22
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.83__alter_ic_trip_report.sql

@ -0,0 +1,22 @@
ALTER TABLE `ic_trip_report_record`
ADD COLUMN `traffic_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交通方式,来源字典表(traffic_type)' AFTER `UPDATED_TIME`,
ADD COLUMN `traffic_type_explain` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他返回方式,交通方式为其他时此列需要有值' AFTER `traffic_type`,
ADD COLUMN `source_detail_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源地详细信息(source_address字段的说明)' AFTER `traffic_type_explain`,
ADD COLUMN `vaccine_num` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '疫苗接种针次 (0针 1针 2针 3针)【小寨子】' AFTER `source_detail_address`,
ADD COLUMN `is_nat_record` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否有48小时核算记录 0:否 1:是 【小寨子】' AFTER `vaccine_num`,
ADD COLUMN `registered_residence` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '户籍地 【磐石】' AFTER `is_nat_record`,
ADD COLUMN `age` int(11) NULL DEFAULT NULL COMMENT '年龄【磐石】' AFTER `registered_residence`,
ADD COLUMN `describe_content` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来曹事由【磐石】' AFTER `age`,
ADD COLUMN `nat_outcome` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '48小时核算检查结果(0:阴性 1:阳性)【磐石】' AFTER `describe_content`,
ADD COLUMN `sojourn_history` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '7天内旅居史情况,字典表(sojourn_history)【磐石】' AFTER `nat_outcome`,
ADD COLUMN `isolate_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '隔离状态,字典表(isolate_type)【磐石】' AFTER `sojourn_history`,
ADD COLUMN `is_arrive_check` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否落实\"落地检\" 0:否 1:是【磐石】' AFTER `isolate_type`,
ADD COLUMN `is_arrive` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否达到曹县 0:否 1:是 【磐石】' AFTER `is_arrive_check`,
ADD COLUMN `reporting_time` date NULL DEFAULT NULL COMMENT '上报时间【磐石】' AFTER `is_arrive`,
ADD COLUMN `control_measures` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管控措施【磐石】' AFTER `reporting_time`,
ADD COLUMN `trip_data_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '行程记录类型,字典表(trip_data_type)【磐石】' AFTER `control_measures`;
ALTER TABLE `ic_trip_report_record`
DROP COLUMN `age`;

20
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.84__ic_danger_area.sql

@ -0,0 +1,20 @@
CREATE TABLE `ic_danger_area`
(
`ID` varchar(64) NOT NULL COMMENT 'ID',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`DANGER_LEVEL` varchar(10) NOT NULL COMMENT '风险等级;字典表key【dangerAreaLevel】\n0:低风险;\n1:中风险;\n2:高风险;',
`PROVINCE` varchar(255) NOT NULL COMMENT '',
`CITY` varchar(255) DEFAULT NULL COMMENT '',
`DISTRICT` varchar(255) DEFAULT NULL COMMENT '',
`ALL_NAME` varchar(255) NOT NULL COMMENT '省-市-区',
`ALL_NAME_CODE` varchar(255) DEFAULT NULL,
`DEL_FLAG` int(11) NOT NULL,
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='疫情风险地区';
alter table ic_vaccine_prarmeter MODIFY COLUMN `ID_CARD` varchar(32) NOT NULL COMMENT '身份证号';

3
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.85__ic_volunteer_poly.sql

@ -0,0 +1,3 @@
alter table ic_volunteer_poly MODIFY COLUMN `ID_CARD` varchar(32) NOT NULL COMMENT '身份证号';
alter table ic_volunteer_poly_category MODIFY COLUMN `ID_CARD` varchar(32) NOT NULL COMMENT '身份证号';

BIN
epmet-user/epmet-user-server/src/main/resources/excel/attention_nat_template.xlsx

Binary file not shown.

BIN
epmet-user/epmet-user-server/src/main/resources/excel/ic_danger_area_template.xlsx

Binary file not shown.

BIN
epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xls

Binary file not shown.

BIN
epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template_old_20221108.xls

Binary file not shown.

BIN
epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx

Binary file not shown.

BIN
epmet-user/epmet-user-server/src/main/resources/excel/ps_trip_report_import_template.xlsx

Binary file not shown.

BIN
epmet-user/epmet-user-server/src/main/resources/excel/trip_report_import_template.xlsx

Binary file not shown.

1
epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml

@ -28,6 +28,7 @@
SELECT
d.id,
u.id AS userId,
u.id as icResiUserId,
d.GRID_ID,
u.`NAME`,
d.ID_CARD,

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

Loading…
Cancel
Save