Browse Source

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

master
jianjun 3 years ago
parent
commit
a0ecb4ae7f
  1. 20
      epmet-commons/epmet-commons-tools/pom.xml
  2. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java
  3. 57
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ChannelEnum.java
  4. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  5. 10
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  6. 87
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/user/LoginUserUtil.java
  7. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
  8. 41
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/FileUtils.java
  9. 6
      epmet-module/data-report/data-report-server/pom.xml
  10. 11
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java
  11. 9
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AreaCodeFormDTO.java
  12. 4
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ImportTaskCommonFormDTO.java
  13. 11
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AreaCodeResultDTO.java
  14. 12
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java
  15. 12
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java
  16. 11
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/redis/AreaCodeRedis.java
  17. 4
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java
  18. 46
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
  19. 2
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ImportTaskServiceImpl.java
  20. 20
      epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.14__add_areacode_flag.sql
  21. 81
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml
  22. 4
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java
  23. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java
  24. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java
  25. 19
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  26. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java
  27. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java
  28. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java
  29. 25
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  30. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java
  31. 29
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java
  32. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  33. 13
      epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/UserAccessServiceImpl.java
  34. 8
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/InitInfoResultDTO.java
  35. 6
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java
  36. 7
      epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java
  37. 131
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java
  38. 142
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java
  39. 134
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java
  40. 82
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatRelationDTO.java
  41. 109
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNoticeDTO.java
  42. 109
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiVaccineDTO.java
  43. 218
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java
  44. 105
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java
  45. 35
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java
  46. 82
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
  47. 22
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcNoticeFormDTO.java
  48. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectFormDTO.java
  49. 10
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java
  50. 180
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java
  51. 22
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LatestSubmitCollectFormDTO.java
  52. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LoginUserDetailsFormDTO.java
  53. 66
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyNatListFormDTO.java
  54. 13
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyReportedTripFormDTO.java
  55. 52
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/NatListFormDTO.java
  56. 28
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageFollowUpFormDTO.java
  57. 51
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java
  58. 114
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java
  59. 63
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java
  60. 30
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationAddFormDTO.java
  61. 66
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java
  62. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java
  63. 21
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionInfoDTO.java
  64. 48
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
  65. 91
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestCollectResDTO.java
  66. 70
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyNatListResultDTO.java
  67. 27
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListCommonExcelResultDTO.java
  68. 20
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListDTO.java
  69. 95
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java
  70. 21
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/TripListDTO.java
  71. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserInfoOnEnterGridResultDTO.java
  72. 67
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
  73. 20
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccineListDTO.java
  74. 46
      epmet-user/epmet-user-client/src/main/java/com/epmet/enums/AttentionTypeEnum.java
  75. 44
      epmet-user/epmet-user-client/src/main/java/com/epmet/enums/ChannelEnum.java
  76. 1
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  77. 1
      epmet-user/epmet-user-server/deploy/docker-compose-prod.yml
  78. 1
      epmet-user/epmet-user-server/deploy/docker-compose-test.yml
  79. 19
      epmet-user/epmet-user-server/pom.xml
  80. 95
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java
  81. 201
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java
  82. 149
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java
  83. 318
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java
  84. 24
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatRelationController.java
  85. 82
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNoticeController.java
  86. 34
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java
  87. 73
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiVaccineController.java
  88. 277
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java
  89. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/PatrolRoutineWorkController.java
  90. 63
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcEpidemicSpecialAttentionDao.java
  91. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcFollowUpRecordDao.java
  92. 69
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java
  93. 22
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatRelationDao.java
  94. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNoticeDao.java
  95. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectDao.java
  96. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiMemberDao.java
  97. 48
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  98. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiVaccineDao.java
  99. 45
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java
  100. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java

20
epmet-commons/epmet-commons-tools/pom.xml

@ -24,6 +24,7 @@
<gson.version>2.8.6</gson.version>
<jsoup.version>1.11.3</jsoup.version>
<lombok.version>1.18.4</lombok.version>
<easyexcel.version>3.0.3</easyexcel.version>
</properties>
<dependencies>
@ -177,6 +178,25 @@
<artifactId>javase</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>${easyexcel.version}</version>
<exclusions>
<exclusion>
<artifactId>poi</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml-schemas</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java

@ -33,7 +33,7 @@ public class PageFormDTO implements Serializable {
*/
private Integer offset;
private boolean isPage = true;
private Boolean isPage = true;
public Integer getOffset() {
return (pageNo-1)*pageSize;

57
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ChannelEnum.java

@ -0,0 +1,57 @@
package com.epmet.commons.tools.enums;
import java.util.Objects;
/**
* @author Administrator
*/
public enum ChannelEnum {
//通知渠道 0小程序通知,1短信通知
APP("0", "小程序通知"),
MESSAGE("1", "短信通知"),
ALL("2", "小程序通知,短信通知");
private String code;
private String name;
ChannelEnum(String code, String name) {
this.code = code;
this.name = name;
}
public static String getName(String code) {
ChannelEnum[] houseTypeEnums = values();
for (ChannelEnum houseTypeEnum : houseTypeEnums) {
if (Objects.equals(houseTypeEnum.getCode(), code)) {
return houseTypeEnum.getName();
}
}
return null;
}
public static String getCode(String name) {
ChannelEnum[] houseTypeEnums = values();
for (ChannelEnum houseTypeEnum : houseTypeEnums) {
if (houseTypeEnum.getName().equals(name)) {
return houseTypeEnum.getCode();
}
}
return null;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

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

@ -251,6 +251,8 @@ public enum EpmetErrorCode {
ORG_EDIT_FAILED(8920,"编辑失败"),
ORG_DEL_FAILED(8921,"删除失败"),
NEIGHBORHOOD_DEL_FAILED(8922,""),
IC_NAT_IDCARD_NATTIME(8923,"已存在相同记录"),
IC_NAT(8924,"平台已存在记录,请去修改原有记录"),
//通用错误码 start

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

@ -753,4 +753,14 @@ public class RedisKeys {
public static String getCustomerMenuListPrefix() {
return rootPrefix.concat("oper:access:nav:customerId:");
}
/**
* 如果是省列表epmet:areacode:parentCode:0
* 山东省的下一级epmet:areacode:parentCode:37
* @param areaCode
* @return
*/
public static String getNextAreaCodeKey(String areaCode) {
return rootPrefix.concat("areaCode:parentCode:").concat(areaCode);
}
}

87
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/user/LoginUserUtil.java

@ -1,11 +1,9 @@
package com.epmet.commons.tools.security.user;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.utils.HttpContextUtils;
import org.apache.commons.lang3.StringUtils;
import com.epmet.commons.tools.utils.EpmetRequestHolder;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
@ -14,24 +12,21 @@ import java.util.List;
@Component
public class LoginUserUtil {
//@Autowired
//private
/**
* 查询登录用户的id
* @return
*/
public String getLoginUserId() {
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
if (request == null) {
return null;
}
String userId = request.getHeader(AppClientConstant.USER_ID);
if (StringUtils.isBlank(userId)) {
return null;
}
return userId;
//HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
//if (request == null) {
// return null;
//}
//
//String userId = request.getHeader(AppClientConstant.USER_ID);
//if (StringUtils.isBlank(userId)) {
// return null;
//}
return EpmetRequestHolder.getHeader(AppClientConstant.USER_ID);
}
/**
@ -39,16 +34,16 @@ public class LoginUserUtil {
* @return
*/
public String getLoginUserApp() {
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
if (request == null) {
return null;
}
String app = request.getHeader(AppClientConstant.APP);
if (StringUtils.isBlank(app)) {
return null;
}
return app;
//HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
//if (request == null) {
// return null;
//}
//
//String app = request.getHeader(AppClientConstant.APP);
//if (StringUtils.isBlank(app)) {
// return null;
//}
return EpmetRequestHolder.getHeader(AppClientConstant.APP);
}
/**
@ -56,16 +51,16 @@ public class LoginUserUtil {
* @return
*/
public String getLoginUserClient() {
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
if (request == null) {
return null;
}
String client = request.getHeader(AppClientConstant.CLIENT);
if (StringUtils.isBlank(client)) {
return null;
}
return client;
//HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
//if (request == null) {
// return null;
//}
//
//String client = request.getHeader(AppClientConstant.CLIENT);
//if (StringUtils.isBlank(client)) {
// return null;
//}
return EpmetRequestHolder.getHeader(AppClientConstant.CLIENT);
}
/**
@ -73,16 +68,16 @@ public class LoginUserUtil {
* @return
*/
public String getLoginUserCustomerId() {
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
if (request == null) {
return null;
}
String client = request.getHeader(AppClientConstant.CUSTOMER_ID);
if (StringUtils.isBlank(client)) {
return null;
}
return client;
//HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
//if (request == null) {
// return null;
//}
//
//String client = request.getHeader(AppClientConstant.CUSTOMER_ID);
//if (StringUtils.isBlank(client)) {
// return null;
//}
return EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID);
}
/**

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java

@ -60,7 +60,7 @@ public class DateUtils {
public static final String DATE_PATTERN_YYYY_MM = "yyyy-MM";
public static final String WEEK_TYPE_ENGLISH = "english";
public static final String WEEK_TYPE_CHINESE = "chinese";
public static final String DATE_PATTERN_MMDD = "MMdd";
/**
* 日期格式化 日期格式为yyyy-MM-dd
* @param date 日期

41
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/FileUtils.java

@ -15,6 +15,47 @@ import java.nio.file.Paths;
@Slf4j
public class FileUtils {
/**
* epmet文件根路径
*/
private static Path epmetFilePath;
static {
// linux || mac
epmetFilePath = Paths.get("/opt/epmet_files");
// windows
}
/**
* 获取在epmetfiles下的文件路径,输入相对路径即可获取完整绝对路径
* @param pathParts 目录片段可以是文件夹或者文件名
* @return
*/
public static Path getPathUnderEpmetFilesDir(String... pathParts) {
Path path;
if (pathParts == null || pathParts.length == 0) {
path = epmetFilePath.resolve("temp");
} else {
path = Paths.get(epmetFilePath.toString(), pathParts);
}
return path;
}
/**
* 创建并且返回epmet_files下的文件夹
* @param dirParts 文件夹列表
* @return
* @throws IOException
*/
public static Path getAndCreateDirUnderEpmetFilesDir(String... dirParts) throws IOException {
Path pathUnderEpmetFilesDir = getPathUnderEpmetFilesDir(dirParts);
if (Files.notExists(pathUnderEpmetFilesDir)) {
Files.createDirectories(pathUnderEpmetFilesDir);
}
return pathUnderEpmetFilesDir;
}
/**
* 创建临时文件
*

6
epmet-module/data-report/data-report-server/pom.xml

@ -100,12 +100,6 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.0.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

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

@ -15,6 +15,17 @@ public interface ImportTaskConstants {
String BIZ_TYPE_COMMUNITY_SELF_ORG = "community_self_org";
String BIZ_TYPE_PARTY_UNIT = "party_unit";
String BIZ_TYPE_PARTY_ACTIVITY = "party_activity";
String BIZ_TYPE_ATTENTION_NAT = "attention_nat";
String BIZ_TYPE_ATTENTION_VACCINATION = "attention_vaccination";
String BIZ_TYPE_ATTENTION_TRIP_REPORT = "attention_vaccination";
/**
* 核酸检测
*/
String BIZ_TYPE_IC_NAT = "ic_nat";
/**
* 行程上报
*/
String BIZ_TYPE_IC_TRIP_REPORT = "ic_trip_report";
/**
* 处理状态处理中

9
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AreaCodeFormDTO.java

@ -0,0 +1,9 @@
package com.epmet.dto.form;
import lombok.Data;
@Data
public class AreaCodeFormDTO {
private String parentAreaCode;
private String parentLevel;
}

4
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ImportTaskCommonFormDTO.java

@ -2,10 +2,14 @@ package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.validator.group.QueryGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ImportTaskCommonFormDTO extends PageFormDTO {

11
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/AreaCodeResultDTO.java

@ -0,0 +1,11 @@
package com.epmet.dto.result;
import lombok.Data;
@Data
public class AreaCodeResultDTO {
private String areaCode;
private String parentCode;
private String areaName;
private String level;
}

12
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/AreaCodeController.java

@ -28,7 +28,9 @@ import com.epmet.dto.AreaCodeDTO;
import com.epmet.dto.form.AddAreaCodeDictFormDTO;
import com.epmet.dto.form.AddAreaCodeFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
import com.epmet.dto.form.AreaCodeFormDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.AreaCodeResultDTO;
import com.epmet.service.AreaCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -121,4 +123,14 @@ public class AreaCodeController {
ValidatorUtils.validateEntity(formDTO);
return new Result<String>().ok(areaCodeService.addAreaCode(formDTO));
}
/**
* 行政地区编码逐级查询
* @param formDTO
* @return
*/
@PostMapping(value = "nextarea")
public Result<List<AreaCodeResultDTO>> nextArea(@RequestBody AreaCodeFormDTO formDTO){
return new Result<List<AreaCodeResultDTO>>().ok(areaCodeService.nextArea(formDTO));
}
}

12
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeDao.java

@ -19,8 +19,10 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.AreaCodeDTO;
import com.epmet.dto.result.AreaCodeResultDTO;
import com.epmet.entity.AreaCodeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -40,4 +42,14 @@ public interface AreaCodeDao extends BaseDao<AreaCodeEntity> {
AreaCodeDTO selectByCityCode(String cityCode);
AreaCodeDTO selectMaxCounty(String cityCode);
List<AreaCodeResultDTO> selectProvince();
List<AreaCodeResultDTO> selectCity(@Param("pCode")String pCode);
List<AreaCodeResultDTO> selectDistrict(@Param("pCode")String pCode);
List<AreaCodeResultDTO> selectStreet(@Param("pCode")String pCode);
List<AreaCodeResultDTO> selectCommunity(@Param("pCode")String pCode);
}

11
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/redis/AreaCodeRedis.java

@ -19,9 +19,12 @@ package com.epmet.redis;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.dto.result.AreaCodeResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 大陆省市区地区码
*
@ -49,4 +52,12 @@ public class AreaCodeRedis {
return null;
}
public List<AreaCodeResultDTO> getNextAreaCodeKey(String key) {
List<AreaCodeResultDTO> list = (List<AreaCodeResultDTO>) redisUtils.get(key);
return list;
}
public void setNextAreaCodeKey(String key, List<AreaCodeResultDTO> list) {
redisUtils.set(key, list);
}
}

4
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/AreaCodeService.java

@ -23,7 +23,9 @@ import com.epmet.dto.AreaCodeDTO;
import com.epmet.dto.form.AddAreaCodeDictFormDTO;
import com.epmet.dto.form.AddAreaCodeFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
import com.epmet.dto.form.AreaCodeFormDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.AreaCodeResultDTO;
import com.epmet.entity.AreaCodeEntity;
import java.util.List;
@ -123,4 +125,6 @@ public interface AreaCodeService extends BaseService<AreaCodeEntity> {
* @Date 2021/4/13 14:40
**/
String addAreaCode(AddAreaCodeFormDTO formDTO);
List<AreaCodeResultDTO> nextArea(AreaCodeFormDTO formDTO);
}

46
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java

@ -29,6 +29,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.AreaCodeConstant;
import com.epmet.dao.AreaCodeChildDao;
@ -38,7 +39,9 @@ import com.epmet.dto.AreaCodeDTO;
import com.epmet.dto.form.AddAreaCodeDictFormDTO;
import com.epmet.dto.form.AddAreaCodeFormDTO;
import com.epmet.dto.form.AreaCodeDictFormDTO;
import com.epmet.dto.form.AreaCodeFormDTO;
import com.epmet.dto.result.AreaCodeDictResultDTO;
import com.epmet.dto.result.AreaCodeResultDTO;
import com.epmet.entity.AreaCodeEntity;
import com.epmet.redis.AreaCodeRedis;
import com.epmet.service.AreaCodeChildService;
@ -688,6 +691,49 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
return areaCode;
}
@Override
public List<AreaCodeResultDTO> nextArea(AreaCodeFormDTO formDTO) {
if(StringUtils.isBlank(formDTO.getParentAreaCode())&&StringUtils.isBlank(formDTO.getParentLevel())){
String pKey=RedisKeys.getNextAreaCodeKey(NumConstant.ZERO_STR);
List<AreaCodeResultDTO> list=areaCodeRedis.getNextAreaCodeKey(pKey);
if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(list)){
return list;
}
List<AreaCodeResultDTO> pList=baseDao.selectProvince();
areaCodeRedis.setNextAreaCodeKey(pKey,pList);
return pList;
}
String key=RedisKeys.getNextAreaCodeKey(formDTO.getParentAreaCode());
List<AreaCodeResultDTO> list=areaCodeRedis.getNextAreaCodeKey(key);
if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(list)){
return list;
}
switch (formDTO.getParentLevel()) {
case AreaCodeConstant.PROVINCE:
list = baseDao.selectCity(formDTO.getParentAreaCode());
break;
case AreaCodeConstant.CITY:
list = baseDao.selectDistrict(formDTO.getParentAreaCode());
break;
case AreaCodeConstant.DISTRICT:
list = baseDao.selectStreet(formDTO.getParentAreaCode());
break;
case AreaCodeConstant.STREET:
list = baseDao.selectCommunity(formDTO.getParentAreaCode());
break;
case AreaCodeConstant.COMMUNITY:
log.info("社区无下级");
list=null;
break;
default:
log.warn("parentLevel错误:"+formDTO.getParentLevel());
}
if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(list)){
areaCodeRedis.setNextAreaCodeKey(key,list);
}
return list;
}
private String addDistrictAreaCode(String cityCode, String countyName) {
AreaCodeDTO city = baseDao.selectByCityCode(cityCode);

2
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ImportTaskServiceImpl.java

@ -98,7 +98,7 @@ public class ImportTaskServiceImpl implements ImportTaskService {
LambdaQueryWrapper<ImportTaskEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ImportTaskEntity::getOperatorId,param.getOperatorId())
.orderByDesc(ImportTaskEntity::getStartTime);
Page<ImportTaskEntity> page = PageHelper.startPage(param.getPageNo(), param.getPageSize(), param.isPage()).doSelectPage(() -> {
Page<ImportTaskEntity> page = PageHelper.startPage(param.getPageNo(), param.getPageSize(), param.getIsPage()).doSelectPage(() -> {
importRecordDao.selectList(queryWrapper);
});
List<ImportTaskCommonResultDTO> list = new ArrayList<>();

20
epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.14__add_areacode_flag.sql

@ -0,0 +1,20 @@
#添加 是否自定义字段
ALTER TABLE `epmet_common_service`.`area_code_child`
ADD COLUMN `USER_DEFINED` tinyint(1) NULL DEFAULT 0 COMMENT '是否自定义 1:是0否' AFTER `CATAGORY`;
#更新 字段值
UPDATE area_code_child SET USER_DEFINED = 1 WHERE code like '%_UD%';
#清空数据
DELETE FROM area_code_child WHERE USER_DEFINED = 0;
#插入数据
INSERT INTO `epmet_common_service`.`area_code_child` (`ID`, `CODE`, `NAME`, `P_CODE`, `LEVEL`, `CATAGORY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`)
SELECT ID, `CODE`, `NAME`, `P_CODE`, `LEVEL`, `CATAGORY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME` FROM area_code_child_new;
SELECT * FROM area_code_new WHERE county_code = '441900';
#清空数据
DELETE FROM area_code where 1=1;
#插入数据
INSERT INTO `epmet_common_service`.`area_code`
SELECT * FROM area_code_new;
SELECT COUNT(1) FROM area_code;

81
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeDao.xml

@ -27,4 +27,85 @@
order by ac.COUNTY_CODE desc
limit 1
</select>
<select id="selectProvince" resultType="com.epmet.dto.result.AreaCodeResultDTO">
SELECT DISTINCT
ac.province_code AS areaCode,
ac.province_name AS areaName,
'' AS parentCode,
'province' AS LEVEL
FROM
area_code ac
WHERE
ac.DEL_FLAG = '0'
ORDER BY
ac.province_code ASC
</select>
<select id="selectCity" resultType="com.epmet.dto.result.AreaCodeResultDTO">
SELECT DISTINCT
ac.city_code AS areaCode,
ac.city_name AS areaName,
ac.province_code AS parentCode,
'city' AS LEVEL
FROM
area_code ac
WHERE
ac.DEL_FLAG = '0'
<if test='null != pCode and "" != pCode'>
and ac.province_code=#{pCode}
</if>
ORDER BY
ac.city_code ASC
</select>
<select id="selectDistrict" resultType="com.epmet.dto.result.AreaCodeResultDTO">
SELECT DISTINCT
ac.county_code AS areaCode,
ac.county_name AS areaName,
ac.city_code AS parentCode,
'district' AS LEVEL
FROM
area_code ac
WHERE
ac.DEL_FLAG = '0'
<if test='null != pCode and "" != pCode'>
and ac.city_code=#{pCode}
</if>
ORDER BY
ac.county_code ASC
</select>
<select id="selectStreet" resultType="com.epmet.dto.result.AreaCodeResultDTO">
SELECT
ac.`code` AS areaCode,
ac.`name` AS areaName,
ac.p_code AS parentCode,
'street' AS LEVEL
FROM
area_code_child ac
WHERE
ac.DEL_FLAG = '0'
AND ac.USER_DEFINED = '0'
<if test='null != pCode and "" != pCode'>
AND ac.p_code=#{pCode}
</if>
ORDER BY
ac.`code` ASC
</select>
<select id="selectCommunity" resultType="com.epmet.dto.result.AreaCodeResultDTO">
SELECT
ac.`code` AS areaCode,
ac.`name` AS areaName,
ac.p_code AS parentCode,
'community' AS LEVEL
FROM
area_code_child ac
WHERE
ac.DEL_FLAG = '0'
AND ac.USER_DEFINED = '0'
<if test='null != pCode and "" != pCode'>
AND ac.p_code=#{pCode}
</if>
ORDER BY
ac.`code` ASC
</select>
</mapper>

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

@ -164,6 +164,10 @@ public interface UserMessageTypeConstant {
*/
String PROJECT_REMIND="project_remind";
/**
* 防疫通知
*/
String ANTIEPIDEMIC="antiepidemic";
/**

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddPlacePatrolRecordFormDTO.java

@ -122,6 +122,9 @@ public class AddPlacePatrolRecordFormDTO implements Serializable {
//token中userId
private String staffId;
public interface Add {}
@NotBlank(message = "placePatrolRecordId不能为空", groups = {Update.class})
private String placePatrolRecordId;
public interface Add {}
public interface Update {}
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java

@ -78,4 +78,17 @@ public class HouseInfoDTO implements Serializable {
private String allName;
private String customerId;
/**
* 小区所在的组织id
*/
private String agencyId;
/**
* eg市北区-阜新路街道-南宁社区
*/
private String agencyPathName;
/**
* 组织的area_code
*/
private String areaCode;
}

19
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java

@ -170,8 +170,13 @@ public class HouseController implements ResultDataResolver {
return new Result();
}
/**
* lzh
* @param formDTO
* @return 单独删除房屋内部调用/gov/org/house/delete
*/
@PostMapping("housedel")
public Result houseDel(@LoginUser TokenDto tokenDTO, @RequestBody IcHouseFormDTO formDTO){
public Result houseDel(@RequestBody IcHouseFormDTO formDTO){
//效验数据
ValidatorUtils.validateEntity(formDTO, IcNeighborHoodFormDTO.DeleteGroup.class);
houseService.delHouse(formDTO.getHouseId());
@ -291,4 +296,16 @@ public class HouseController implements ResultDataResolver {
return new Result();
}
/**
* 获取房屋信息
* @param houseId
* @return
*/
@PostMapping("gethouseinfo/{houseId}")
public Result<HouseInfoDTO> getHouseInfo(@LoginUser TokenDto tokenDto,@PathVariable("houseId") String houseId){
if(StringUtils.isBlank(houseId)){
return new Result<>();
}
return new Result<HouseInfoDTO>().ok(houseService.getHouseInfoDTO(tokenDto.getCustomerId(),houseId));
}
}

13
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlacePatrolRecordController.java

@ -60,6 +60,19 @@ public class IcPlacePatrolRecordController {
return new Result();
}
/**
* @Author sun
* @Description 新增场所巡查记录
**/
@PostMapping("update")
public Result update(@LoginUser TokenDto tokenDto, @RequestBody AddPlacePatrolRecordFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddPlacePatrolRecordFormDTO.Add.class,AddPlacePatrolRecordFormDTO.Update.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
placePatrolRecordService.update(formDTO);
return new Result();
}
/**
* @Author sun
* @Description 删除场所巡查记录

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

@ -26,7 +26,6 @@ import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.dto.result.IcNeighborHoodResultDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.excel.IcHouseExcel;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
@ -78,4 +77,6 @@ public interface HouseService {
* @date 2022/3/1 4:57 下午
*/
void allDelete(NeighborHoodManageDelFormDTO formDTO);
HouseInfoDTO getHouseInfoDTO(String customerId,String houseId);
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlacePatrolRecordService.java

@ -38,6 +38,8 @@ public interface IcPlacePatrolRecordService extends BaseService<IcPlacePatrolRec
**/
void add(AddPlacePatrolRecordFormDTO formDTO);
void update(AddPlacePatrolRecordFormDTO formDTO);
/**
* @Author sun
* @Description 删除场所巡查记录

25
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -13,7 +13,9 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
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.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerGridConstant;
@ -150,8 +152,13 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
@Override
@Transactional(rollbackFor = Exception.class)
public void delHouse(String houseId) {
//删除小区
icHouseService.deleteById(houseId);
//单个删除房屋,房屋内有居民不允许删除
NeighborHoodManageDelFormDTO formDTO=new NeighborHoodManageDelFormDTO();
formDTO.setType(CustomerGridConstant.HOUSE);
List<String> ids=new ArrayList<>();
ids.add(houseId);
formDTO.setIds(ids);
allDelete(formDTO);
}
@Override
@ -455,4 +462,18 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
}
}
}
@Override
public HouseInfoDTO getHouseInfoDTO(String customerId, String houseId) {
HouseInfoDTO houseInfo = icHouseRedis.getHouseInfo(houseId, customerId);
if (null != houseInfo && StringUtils.isNotBlank(houseInfo.getAgencyId())) {
AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(houseInfo.getAgencyId());
houseInfo.setAgencyPathName(StringUtils.isNotBlank(agencyInfoCache.getAllParentName())?agencyInfoCache.getAllParentName().concat(StrConstant.HYPHEN).concat(agencyInfoCache.getOrganizationName()):agencyInfoCache.getOrganizationName());
houseInfo.setAreaCode(StringUtils.isNotBlank(agencyInfoCache.getAreaCode())?agencyInfoCache.getAreaCode():StrConstant.EPMETY_STR);
} else {
houseInfo.setAgencyPathName(StrConstant.EPMETY_STR);
houseInfo.setAreaCode(StrConstant.EPMETY_STR);
}
return houseInfo;
}
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java

@ -692,7 +692,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao
wrapper.eq(IcNeighborHoodEntity::getAgencyId,params.getAgencyId());
PageData<IcNeighborHoodDTO> result = null;
List<IcNeighborHoodDTO> list = null;
if (params.isPage()){
if (params.getIsPage()){
Page<IcNeighborHoodEntity> objects = PageHelper.startPage(params.getPageNo(), params.getPageSize()).doSelectPage(() -> {
baseDao.selectList(wrapper);
});

29
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolRecordServiceImpl.java

@ -17,7 +17,6 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
@ -28,24 +27,17 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcPlacePatrolRecordDao;
import com.epmet.dao.IcPlacePatrolTeamStaffDao;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.IcPlacePatrolTeamStaffDTO;
import com.epmet.dto.form.AddPlacePatrolRecordFormDTO;
import com.epmet.dto.form.GetListPlacePatrolRecordFormDTO;
import com.epmet.dto.form.GetListPlacePatrolTeamFormDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.IcHouseEntity;
import com.epmet.dto.result.GetListPlacePatrolRecordResultDTO;
import com.epmet.dto.result.PlacePatrolRecordDetailResultDTO;
import com.epmet.entity.IcPlacePatrolRecordEntity;
import com.epmet.entity.IcPlacePatrolTeamEntity;
import com.epmet.entity.IcPlacePatrolTeamStaffEntity;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.service.IcPlacePatrolRecordService;
import com.epmet.service.IcPlacePatrolReviewRecordService;
import com.epmet.service.IcPlacePatrolTeamService;
import com.epmet.service.IcPlacePatrolTeamStaffService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -90,6 +82,23 @@ public class IcPlacePatrolRecordServiceImpl extends BaseServiceImpl<IcPlacePatro
insert(entity);
}
/**
* @Author sun
* @Description 修改场所巡查记录
**/
@Override
@Transactional(rollbackFor = Exception.class)
public void update(AddPlacePatrolRecordFormDTO formDTO) {
IcPlacePatrolRecordEntity entity = ConvertUtils.sourceToTarget(formDTO, IcPlacePatrolRecordEntity.class);
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
entity.setAgencyId(staffInfoCache.getAgencyId());
entity.setPids(staffInfoCache.getAgencyPIds());
entity.setFinalResult(entity.getFirstResult());
entity.setFinalTime(entity.getFirstTime());
entity.setId(formDTO.getPlacePatrolRecordId());
updateById(entity);
}
/**
* @Author sun
* @Description 删除场所巡查记录

3
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -368,7 +368,8 @@
IFNULL(ib.LONGITUDE,'') as buildingLongitude,
IFNULL(ib.LATITUDE,'') as buildingLatitude,
ih.CUSTOMER_ID AS customerId,
concat(IFNULL(n.NEIGHBOR_HOOD_NAME,''),IFNULL(ib.BUILDING_NAME,''),IFNULL(u.UNIT_NAME,''),IFNULL(ih.HOUSE_NAME,'')) AS allName
concat(IFNULL(n.NEIGHBOR_HOOD_NAME,''),IFNULL(ib.BUILDING_NAME,''),IFNULL(u.UNIT_NAME,''),IFNULL(ih.DOOR_NAME,'')) AS allName,
n.AGENCY_ID as agencyId
FROM ic_house ih
left JOIN ic_neighbor_hood n ON ( ih.NEIGHBOR_HOOD_ID = n.id AND n.DEL_FLAG = '0')
left JOIN ic_building ib ON ( ih.BUILDING_ID = ib.id AND ib.DEL_FLAG = '0')

13
epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/UserAccessServiceImpl.java

@ -1,6 +1,9 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.EnterGridFormDTO;
@ -37,6 +40,16 @@ public class UserAccessServiceImpl implements UserAccessService {
userInfoParams.setGridId(formDTO.getGridId());
Result<UserInfoOnEnterGridResultDTO> userInfoResult =
epmetUserFeignClient.getUserInfoAndRoles(userInfoParams);
//获取网格缓存信息
if(userInfoResult.success()){
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(userInfoResult.getData().getCurrentGridId());
if (null == gridInfo) {
log.error(String.format("居民端进网格接口获取网格缓存信息失败,网格Id->%s",userInfoResult.getData().getCurrentGridId()));
return userInfoResult;
}
userInfoResult.getData().setAgencyId(gridInfo.getPid());
userInfoResult.getData().setAgencyName(gridInfo.getAgencyName());
}
return userInfoResult;
}
}

8
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/InitInfoResultDTO.java

@ -45,4 +45,12 @@ public class InitInfoResultDTO implements Serializable {
* 身份证号
*/
private String idNum;
/**
* 姓名
*/
private String realName;
/**
* 手机号
*/
private String mobile;
}

6
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java

@ -28,8 +28,8 @@ public class PersonalCenterServiceImpl implements PersonalCenterService {
@Override
public InitInfoResultDTO initInfo(TokenDto tokenDto) {
Result<ResiUserBaseInfoResultDTO> baseInfoResult = epmetUserOpenFeignClient.selectUserBaseInfo(tokenDto);
if (!baseInfoResult.success()) {
Result<ResiUserBaseInfoResultDTO> baseInfoResult = epmetUserOpenFeignClient.selectUserBaseInfo(tokenDto);
if (!baseInfoResult.success() || null == baseInfoResult.getData()) {
throw new RenException(baseInfoResult.getCode(), baseInfoResult.getMsg());
}
InitInfoResultDTO resultDTO = new InitInfoResultDTO();
@ -41,6 +41,8 @@ public class PersonalCenterServiceImpl implements PersonalCenterService {
resultDTO.setBuildingAddress(baseInfoResult.getData().getBuildingAddress());
resultDTO.setNickname(baseInfoResult.getData().getNickname());
resultDTO.setIdNum(baseInfoResult.getData().getIdNum());
resultDTO.setMobile(baseInfoResult.getData().getMobile());
resultDTO.setRealName(baseInfoResult.getData().getRealName());
return resultDTO;
}

7
epmet-user/epmet-user-client/src/main/java/com/epmet/constant/IcResiUserConstant.java

@ -8,4 +8,11 @@ package com.epmet.constant;
public interface IcResiUserConstant {
String IC_RESI_USER = "ic_resi_user";
/**
* 居民端小程序的人resi;数字社区的居民icresi;单独录入input; 导入import
*/
String USER_TYPE_RESI="resi";
String USER_TYPE_IC_RESI="icresi";
String USER_TYPE_INPUT="input";
String USER_TYPE_IMPORT="import";
}

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

@ -0,0 +1,131 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* 疫情特别关注
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@Data
public class IcEpidemicSpecialAttentionDTO implements Serializable {
private static final long serialVersionUID = 1L;
public interface IcEpidemicSpecialAttentionUpdate{}
public interface IcEpidemicSpecialAttentionAdd{}
/**
* ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 当前工作人员所属组织ID
*/
private String orgId;
/**
* 组织ID上级
*/
private String pid;
/**
* 组织ID所有上级
*/
private String pids;
/**
* 是否关注 1关注0取消关注
*/
private Integer isAttention;
/**
* 关注类型核酸检测2疫苗接种1行程上报0
*/
@NotNull(message = "attentionType不能为空",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class})
private Integer attentionType;
/**
* 姓名
*/
@NotBlank(message = "name不能为空",groups = IcEpidemicSpecialAttentionAdd.class)
private String name;
/**
* 手机号
*/
@NotBlank(message = "mobile不能为空",groups = IcEpidemicSpecialAttentionAdd.class)
private String mobile;
/**
* 身份证号
*/
@NotBlank(message = "idCard不能为空",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class})
private String idCard;
/**
* 原因
*/
private String reason;
/**
* 备注
*/
private String remark;
/**
*
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 通知渠道 0小程序通知1短信通知
*/
private List<String> channel;
/**
* 通知内容
*/
private String content;
}

142
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcFollowUpRecordDTO.java

@ -0,0 +1,142 @@
package com.epmet.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
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.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 随访记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-25
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class IcFollowUpRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
public interface AddInternalGroup {
}
public interface AddUserRequired extends CustomerClientShowGroup {
}
/**
* 主键ID
*/
@ExcelIgnore
private String id;
/**
* 客户Id
*/
@ExcelIgnore
private String customerId;
/**
* 姓名
*/
@ColumnWidth(20)
@ExcelProperty("姓名")
@NotBlank(message = "姓名不能为空", groups = {AddUserRequired.class})
private String name;
/**
* 手机号
*/
@ColumnWidth(20)
@ExcelProperty("手机号")
@NotBlank(message = "手机号不能为空", groups = {AddUserRequired.class})
private String mobile;
/**
* 身份证号
*/
@ColumnWidth(25)
@ExcelProperty("身份证号")
@NotBlank(message = "身份证号不能为空", groups = {AddUserRequired.class})
private String idCard;
/**
* 0行程上报1疫苗接种2核酸检测
*/
@ColumnWidth(25)
@ExcelProperty("来源")
@NotBlank(message = "origin不能为空:0行程上报,1疫苗接种,2核酸检测", groups = {AddInternalGroup.class})
private String origin;
/**
* 随访时间
*/
@ColumnWidth(25)
@ExcelProperty("随访时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "随访时间不能为空", groups = {AddUserRequired.class})
private Date visitTime;
/**
* 随访内容
*/
@ColumnWidth(200)
@ExcelProperty("随访内容")
@NotBlank(message = "随访内容不能为空", groups = {AddUserRequired.class})
@Length(message = "随访内容最多输入1000字", groups = {AddUserRequired.class})
private String content;
/**
* 工作人员所属组织id
*/
@ExcelIgnore
private String agencyId;
/**
* 删除标识 1删除0未删除
*/
@ExcelIgnore
private String delFlag;
/**
* 乐观锁
*/
@ExcelIgnore
private Integer revision;
/**
* 创建人
*/
@ExcelIgnore
private String createdBy;
/**
* 创建时间
*/
@ExcelIgnore
private Date createdTime;
/**
* 更新人
*/
@ExcelIgnore
private String updatedBy;
/**
* 更新时间
*/
@ExcelIgnore
private Date updatedTime;
}

134
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java

@ -0,0 +1,134 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 核酸上报记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-25
*/
@Data
public class IcNatDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 客户Id CUSTOMER.id
*/
private String customerId;
/**
* 是否客户下居民(0: 1:)
*/
private String isResiUser;
/**
* 居民端小程序的用户id数字社区的icResiUserId其他情况无值
*/
private String userId;
/**
* 居民端小程序的人resi;数字社区的居民icresi;导入的import;同步的synchro
*/
private String userType;
/**
* 人员姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号
*/
private String idCard;
/**
* 检测时间精确到分钟
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date natTime;
/**
* 检测结果(0:阴性 1:阳性)
*/
private String natResult;
/**
* 检测地点
*/
private String natAddress;
/**
* 文件名
*/
private String fileName;
/**
* 文件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* url地址
*/
private String attachmentUrl;
/**
* 删除标识
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 通知渠道 0小程序通知1短信通知多选是数组
*/
private List<String> channel = new ArrayList<>();
/**
* 通知内容
*/
private String content = "";
}

82
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatRelationDTO.java

@ -0,0 +1,82 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 核酸记录关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-31
*/
@Data
public class IcNatRelationDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 居民端上报时存储用户所在网格的组织id.居民信息的人存储居民所在组织id.单个新增或者导入的存储登录用户所属的组织id
*/
private String agencyId;
/**
* 组织pids,包含当前agencyId值
*/
private String pids;
/**
* 核酸记录表Id(ic_nat.id)
*/
private String icNatId;
/**
* 关系数据的绑定途径居民端录入resi;
数字社区录入icresi;
导入的import;
同步的synchro
*/
private String userType;
/**
* 删除标识
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

109
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNoticeDTO.java

@ -0,0 +1,109 @@
package com.epmet.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 防疫通知
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@Data
public class IcNoticeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
@JsonIgnore
private String id;
/**
* 客户Id customer.id
*/
@JsonIgnore
private String customerId;
/**
* 通知渠道 0小程序通知1短信通知
*/
private String channel;
private List<String> channelList;
/**
* 通知来源 0行程上报1疫苗接种2核酸检测
*/
@JsonIgnore
private String origin;
/**
* 用户ID
*/
@JsonIgnore
private String userId;
/**
* 手机号
*/
@JsonIgnore
private String mobile;
/**
* 被通知人身份证号
*/
@JsonIgnore
private String idCard;
/**
* 通知内容
*/
private String content;
/**
* 发送通知的社区
*/
private String orgName;
/**
* 删除标识0.未删除 1.已删除
*/
@JsonIgnore
private Integer delFlag;
/**
* 乐观锁
*/
@JsonIgnore
private Integer revision;
/**
* 创建人
*/
@JsonIgnore
private String createdBy;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date createdTime;
/**
* 更新人
*/
@JsonIgnore
private String updatedBy;
/**
* 更新时间
*/
@JsonIgnore
private Date updatedTime;
}

109
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiVaccineDTO.java

@ -0,0 +1,109 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 居民疫苗情况
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@Data
public class IcResiVaccineDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号
*/
private String idCard;
/**
* 接种时间
*/
private Date inoculateTime;
/**
* 接种地点
*/
private String inoculateAddress;
/**
* 疫苗厂家
*/
private String manufacturer;
/**
* 预留字段1
*/
private String field1;
/**
* 预留字段2
*/
private String field2;
/**
* 预留字段3
*/
private String field3;
/**
* 备注
*/
private String remaek;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

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

@ -0,0 +1,218 @@
package com.epmet.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
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;
/**
* 行程上报信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-25
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class IcTripReportRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@ExcelIgnore
private String id;
/**
* 居民端用户所在网格id,数字社区居民所属网格id
*/
@ExcelIgnore
private String gridId;
/**
* 居民端上报的存储用户所在网格的组织id;
*/
@ExcelIgnore
private String agencyId;
/**
* agency_id的所有上级
*/
@ExcelIgnore
private String pids;
/**
* 客户Id
*/
@ExcelIgnore
private String customerId;
/**
* 姓名
*/
@ColumnWidth(15)
@ExcelProperty("姓名")
private String name;
/**
* 手机号
*/
@ColumnWidth(15)
@ExcelProperty("手机号")
private String mobile;
/**
* 身份证号
*/
@ColumnWidth(22)
@ExcelProperty("身份证号")
private String idCard;
/**
* 用户id
*/
@ExcelIgnore
private String userId;
/**
* 居民端小程序的人resi;数字社区的居民icresi;单独录入input; 导入import
*/
@ExcelIgnore
private String userType;
/**
* 现居地编码
*/
@ExcelIgnore
private String presentAddressCode;
/**
* 现居地编码路径"presentAddressPathCode":"37,3702,370203,370203026,370203026002"
*/
@ExcelIgnore
private String presentAddressPathCode;
/**
* 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区
*/
@ColumnWidth(50)
@ExcelProperty("现居地")
private String presentAddress;
/**
* 详细地址
*/
@ColumnWidth(35)
@ExcelProperty("详细地址")
private String detailAddress;
/**
* 来源地区编码
*/
@ExcelIgnore
private String sourceAddressCode;
/**
* 来源地编码路径 "sourceAddressPathCode": "37,3702,370203,370203026,370203026002"
*/
@ExcelIgnore
private String sourceAddressPathCode;
/**
* 来源地区地址
*/
@ColumnWidth(50)
@ExcelProperty("来自地区")
private String sourceAddress;
/**
* 到达日期
*/
@ColumnWidth(25)
@ExcelProperty("来到本地时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date arriveDate;
/**
* 离开日期
*/
@ColumnWidth(25)
@ExcelProperty("离开本地时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date leaveDate;
/**
* pc行程上报-列表返参最近一次通知时间
*/
@ColumnWidth(25)
@ExcelProperty("最近一次通知时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date latestNoticeTime;
/**
* 备注信息
*/
@ColumnWidth(100)
@ExcelProperty("备注")
private String remark;
/**
* 删除标识 1删除0未删除
*/
@ExcelIgnore
private String delFlag;
/**
* 乐观锁
*/
@ExcelIgnore
private Integer revision;
/**
* 创建人
*/
@ExcelIgnore
private String createdBy;
/**
* 创建时间
*/
@ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 更新人
*/
@ExcelIgnore
private String updatedBy;
/**
* 更新时间
*/
@ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedTime;
@ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date reportTime;
/**
* pc行程上报-列表返参是否加入核酸检测关注名单true已加入false未加入
*/
@ExcelIgnore
private Boolean heSuanCheck;
@ColumnWidth(20)
@ExcelProperty("核算检测关注名单")
private String heSuanCheckDesc;
}

105
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java

@ -0,0 +1,105 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @Description 核酸检测-上报核酸记录
* @Author sun
*/
@Data
public class AddIcNatFormDTO implements Serializable {
private static final long serialVersionUID = 9156247659994638103L;
public interface Nat extends CustomerClientShowGroup {
}
public interface Edit extends CustomerClientShowGroup {
}
/**
* 核酸记录Id,修改时使用
*/
@NotBlank(message = "组织Id不能为空", groups = Edit.class)
private String icNatId;
/**
* 当前网格所属组织Id
*/
@NotBlank(message = "组织Id不能为空", groups = Nat.class)
private String agencyId;
/**
* 居民端小程序的用户id数字社区的icResiUserId其他情况无值
*/
private String userId;
/**
* 居民端小程序的人resi;数字社区的居民icresi;未关联上的other
*/
@NotBlank(message = "居民来源不能为空", groups = Nat.class)
private String userType;
/**
* 姓名
*/
@NotBlank(message = "姓名不能为空", groups = Nat.class)
private String name;
/**
* 手机号
*/
@NotBlank(message = "手机号不能为空", groups = Nat.class)
private String mobile;
/**
* 身份证号
*/
@NotBlank(message = "身份证号不能为空", groups = Nat.class)
private String idCard;
/**
* 检测时间
*/
@NotNull(message = "检测时间不能为空", groups = Nat.class)
@JsonFormat(pattern="yyyy-MM-dd HH:mm")
private Date natTime;
/**
* 检测结果
*/
private String natResult;
/**
* 检测地点
*/
private String natAddress;
/**
* 文件名
*/
private String fileName;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 是否客户下居民(0: 1:)
*/
private String isResiUser = "0";
/**
* 通知渠道 0小程序通知1短信通知多选是数组
*/
private List<String> channel = new ArrayList<>();
/**
* 通知内容
*/
private String content = "";
//token中信息
private String customerId;
private String staffId;
}

35
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CancelAttentionPackageFormDTO.java

@ -0,0 +1,35 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/3/28 16:48
* @DESC
*/
@Data
public class CancelAttentionPackageFormDTO implements Serializable {
private static final long serialVersionUID = 2198470055930997870L;
public interface CancelAttentionPackageForm{}
/**
* 身份证
*/
@NotNull(message = "idCard不能为空",groups = CancelAttentionPackageForm.class)
private List<String> idCards;
/**
* 关注类型核酸检测2疫苗接种1行程上报0
*/
@NotNull(message = "attentionType不能为空",groups = CancelAttentionPackageForm.class)
private Integer attentionType ;
}

82
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java

@ -0,0 +1,82 @@
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/3/29 14:17
*/
@NoArgsConstructor
@Data
public class EpidemicPreventionFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 3610567618492110219L;
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 组织ID
*/
private String agencyId;
/**
* 网格ID
*/
private String gridId;
/**
* 小区ID
*/
private String neighborId;
/**
* 楼栋ID
*/
private String buildingId;
/**
* 单元ID
*/
private String unitId;
/**
* 房屋ID
*/
private String houseId;
/**
* 姓名
*/
private String name;
/**
* 手机
*/
private String mobile;
/**
* 身份证
*/
private String idCard;
/**
* 开始日期
*/
private String startDate;
/**
* 结束日期
*/
private String endDate;
/**
* 疫苗接种次数
*/
private Integer vaccineCount;
/**
* 核酸检测次数
*/
private Integer natCount;
/**
* 关注类型核酸检测2疫苗接种1
*/
private Integer attentionType;
}

22
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcNoticeFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/3/28 16:13
*/
@Data
public class IcNoticeFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = 7392894573654015338L;
private String customerId;
private String noticeId;
@NotBlank(message = "身份证号不能为空", groups = DefaultGroup.class)
private String idCard;
}

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

@ -82,9 +82,9 @@ public class IcResiCollectFormDTO implements Serializable {
private String address;
/**
* 1自0租住
* 1自0租住
*/
@NotBlank(message = "房子属于自由还是组织?", groups = {InternalShowGroup.class, ExternalShowGroup.class})
@NotBlank(message = "房子属于自有还是租住?", groups = {InternalShowGroup.class, ExternalShowGroup.class})
private String houseType;
/**

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

@ -2,6 +2,7 @@ package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@ -17,13 +18,13 @@ public class IcResiCollectMemFormDTO implements Serializable {
/**
* 居住成员1姓名
*/
// @NotBlank(message = "姓名不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
@NotBlank(message = "姓名不能为空", groups = {ResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
private String name;
/**
* 居住成员1身份证号
*/
// @NotBlank(message = "身份证号不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
@NotBlank(message = "身份证号不能为空", groups = {ResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
private String idNum;
/**
@ -43,4 +44,9 @@ public class IcResiCollectMemFormDTO implements Serializable {
*/
// @NotNull(message = "疫苗接种情况不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
private Integer ymjz;
/**
* 社区居民信息登记-查询返参用
*/
private String id;
}

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

@ -0,0 +1,180 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 行程上报居民端入参
*/
@Data
public class IcTripReportFormDTO implements Serializable {
public interface ResiUserInternalGroup {
}
public interface ResiUserRequired extends CustomerClientShowGroup {
}
public interface PcAddOrUpdateInternalGroup {
}
public interface PcAddRequired extends CustomerClientShowGroup {
}
public interface IcResiInternalGroup {
}
public interface PcUpdateRequired extends CustomerClientShowGroup {
}
@NotBlank(message = "主键不能为空", groups = {PcUpdateRequired.class})
private String id;
/**
* 客户Id
*/
private String customerId;
/**
* 姓名
*/
@NotBlank(message = "姓名不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class})
private String name;
/**
* 手机号
*/
@NotBlank(message = "手机号不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class})
private String mobile;
/**
* 身份证号
*/
@NotBlank(message = "身份证号不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class})
private String idCard;
/**
* 是否添加到核算检测关注名单,true加入默认false不加入
*/
@NotNull(message = "是否添加到核算检测关注名单", groups = {PcAddRequired.class,PcUpdateRequired.class})
private Boolean heSuanCheck;
/**
* 现居地编码
*/
@NotBlank(message = "现居地编码不能为空", groups = {ResiUserRequired.class})
private String presentAddressCode;
/**
* 现居地编码路径"presentAddressPathCode":"37,3702,370203,370203026,370203026002"
*/
@NotBlank(message = "现居地编码路径不能为空", groups = {ResiUserRequired.class})
private String presentAddressPathCode;
/**
* 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区
*/
@NotBlank(message = "现居地名称不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class})
private String presentAddress;
/**
* 详细地址
*/
@NotBlank(message = "详细地址不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class})
private String detailAddress;
/**
* 来源地区编码
*/
@NotBlank(message = "来自地区编码不能为空", groups = {ResiUserRequired.class})
private String sourceAddressCode;
/**
* 来源地编码路径 "sourceAddressPathCode": "37,3702,370203,370203026,370203026002"
*/
@NotBlank(message = "来自地编码路径不能为空", groups = {ResiUserRequired.class})
private String sourceAddressPathCode;
/**
* 来源地区地址
*/
@NotBlank(message = "来自地区名称不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class})
private String sourceAddress;
/**
* 到达日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@NotNull(message = "来到本地时间不能为空", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class})
private Date arriveDate;
/**
* 离开日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date leaveDate;
/**
* 备注信息
*/
@Length(max = 500, message = "备注最多可输入500字", groups = {ResiUserRequired.class,PcAddRequired.class,PcUpdateRequired.class})
private String remark;
/**
* userType=icresi时必填,取值居民所属的网格ID
* 居民端小程序上报前端赋值当前用户所在的网格id
*/
@NotBlank(message = "网格不能为空", groups = {ResiUserInternalGroup.class,IcResiInternalGroup.class})
private String gridId;
/**
* 用户id
* 居民端上报时后端自己赋值
* pc录入如果是从居民信息选择此列有值
*/
@NotBlank(message = "userId不能为空", groups = {IcResiInternalGroup.class})
private String userId;
/**
* 居民端小程序的人resi;数字社区的居民icresi;单独录入input; 导入import
* 居民端上报是后端赋值导入后端赋值
* pc录入是前端赋值
*/
@NotBlank(message = "数字社区的居民:icresi;其他:other", groups = {PcAddOrUpdateInternalGroup.class})
private String userType;
/**
* userType=icresi时必填
* 居民所属的组织id
*/
@NotBlank(message = "agencyId不能为空", groups = {IcResiInternalGroup.class})
private String agencyId;
/**
* pc录入时用
*/
private String currentStaffId;
/**
* pc录入时用
* 通知渠道 0小程序通知1短信通知
*/
private List<String> channel = new ArrayList<>();
/**
* pc录入时用
* 通知内容
*/
private String content = "";
}

22
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LatestSubmitCollectFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 社区居民信息登记-查询
*/
@Data
public class LatestSubmitCollectFormDTO implements Serializable {
public interface AddUserInternalGroup {
}
@NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
private String userId;
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
@NotBlank(message = "gridId不能为空", groups = AddUserInternalGroup.class)
private String gridId;
}

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

@ -1,8 +1,12 @@
package com.epmet.dto.form;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginUserDetailsFormDTO {
private String app;
private String client;

66
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyNatListFormDTO.java

@ -0,0 +1,66 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Description 核酸检测-我的上报记录
* @Author sun
*/
@Data
public class MyNatListFormDTO extends PageFormDTO {
private static final long serialVersionUID = 9156247659994638103L;
public interface Detail extends CustomerClientShowGroup {
}
public interface Del extends CustomerClientShowGroup {
}
public interface Synchro extends CustomerClientShowGroup {
}
/**
* 身份证号
*/
private String idCard;
/**
* 当前组织:current 根组织all
*/
private String orgType;
private String agencyId;
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 是否客户下居民(0: 1:)
*/
private String isResiUser;
/**
* 检测开始时间yyyy-MM-dd HH:mm
*/
private String startTime;
/**
* 检测结束时间yyyy-MM-dd HH:mm间yy-mm-dd
*/
private String endTime;
/**
* 核酸记录Id
*/
@NotBlank(message = "核酸记录Id不能为空", groups = { Detail.class, Del.class, Synchro.class})
private String icNatId;
/**
* token里设置
*/
private String customerId;
private String userId;
}

13
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MyReportedTripFormDTO.java

@ -0,0 +1,13 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
/**
* 居民端小程序我的上报
*/
@Data
public class MyReportedTripFormDTO extends PageFormDTO {
private String userId;
private String customerId;
}

52
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/NatListFormDTO.java

@ -0,0 +1,52 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/3/28 10:30
* @DESC
*/
@Data
public class NatListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -498378123902522370L;
/**
* 手机号
*/
private String mobile;
/**
* 名字
*/
private String name;
/**
* 身份证
*/
private String idCard;
/**
* 关注原因
*/
private String reason;
/**
* 备注
*/
private String remark;
private String userId;
private String customerId;
/**
* user所属组织ID
*/
private String orgId;
}

28
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageFollowUpFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class PageFollowUpFormDTO extends PageFormDTO {
/**
* 身份证号
*/
@NotBlank(message = "身份证号不能为空", groups = {AddUserShowGroup.class})
private String idCard;
@NotBlank(message = "身份证号不能为空", groups = {AddUserShowGroup.class})
private String name;
/**
* 0行程上报1疫苗接种2核酸检测
*/
@NotBlank(message = "origin不能为空:0行程上报,1疫苗接种,2核酸检测", groups = {AddUserInternalGroup.class})
private String origin;
private String customerId;
}

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

@ -0,0 +1,51 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class PageTripReportFormDTO extends PageFormDTO implements Serializable {
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号
*/
private String idCard;
/**
* 来源地区编码
*/
private String sourceAddressCode;
/**
* 来源地区名称
*/
private String sourceAddress;
/**
* 来到本地时间
*/
private Date startDate;
private Date endDate;
/**
* token里设置
*/
private String customerId;
private String userId;
/**
* 工作人员所属组织id
*/
private String agencyId;
}

114
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiCollectFormDTO.java

@ -0,0 +1,114 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* 社区居民信息登记-提交 入参
*/
@Data
public class ResiCollectFormDTO implements Serializable {
private static final long serialVersionUID = -4026681095438180447L;
public interface AddUserInternalGroup {
}
public interface InternalShowGroup extends CustomerClientShowGroup {
}
/**
* 客户Id customer.id
*/
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
/**
* 网格ID_后端接口赋值
*/
@NotBlank(message = "gridId不能为空", groups = AddUserInternalGroup.class)
private String gridId;
/**
* 组织Id_后端接口赋值
*/
@NotBlank(message = "agencyId不能为空", groups = AddUserInternalGroup.class)
private String agencyId;
/**
* 组织的pid_后端接口赋值
*/
private String pids;
/**
* 所属小区ID
*/
@NotBlank(message = "小区不能为空", groups = InternalShowGroup.class)
private String villageId;
@NotBlank(message = "小区名不能为空", groups = InternalShowGroup.class)
private String villageName;
/**
* 所属楼宇Id
*/
@NotBlank(message = "楼栋不能为空", groups = InternalShowGroup.class)
private String buildId;
@NotBlank(message = "楼栋名不能为空",groups = InternalShowGroup.class)
private String buildName;
/**
* 单元id
*/
@NotBlank(message = "单元不能为空", groups = InternalShowGroup.class)
private String unitId;
@NotBlank(message = "单元名不能为空",groups = InternalShowGroup.class)
private String unitName;
/**
* 所属家庭Id
*/
@NotBlank(message = "家庭不能为空", groups = InternalShowGroup.class)
private String homeId;
@NotBlank(message = "家庭名不能为空",groups = InternalShowGroup.class)
private String homeName;
/**
* 详细地址
*/
@NotBlank(message = "家庭地址不能为空", groups = {InternalShowGroup.class})
private String address;
/**
* 1自有0租住
*/
@NotBlank(message = "房子属于自有还是租住?", groups = {InternalShowGroup.class})
private String houseType;
/**
* 户主姓名
*/
@NotBlank(message = "户主姓名不能为空", groups = {InternalShowGroup.class})
private String houseHolderName;
/**
* 居住成员人数
*/
@NotNull(message = "居住成员人数不能为空", groups = {InternalShowGroup.class})
private Integer totalResi;
@Valid
@NotEmpty(message = "成员信息不能为空", groups = {InternalShowGroup.class})
private List<IcResiCollectMemFormDTO> memberList;
@NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
private String userId;
}

63
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/SendNoticeFormDTO.java

@ -0,0 +1,63 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/3/28 14:14
*/
@NoArgsConstructor
@Data
public class SendNoticeFormDTO implements Serializable {
private static final long serialVersionUID = 4800907725063604885L;
private String customerId;
private String staffId;
/**
* 用户列表
*/
@NotNull(message = "用户列表不能为空", groups = DefaultGroup.class)
private List<UserListBean> userList;
/**
* 通知渠道通知渠道 0小程序通知1短信通知
*/
@NotNull(message = "通知渠道不能为空", groups = DefaultGroup.class)
private List<String> channel;
/**
* 通知来源 0 行程上报1 疫苗接种2 核酸检测
*/
@NotNull(message = "通知来源不能为空", groups = DefaultGroup.class)
private String origin;
/**
* 通知内容
*/
@NotNull(message = "通知内容不能为空", groups = DefaultGroup.class)
private String content;
/**
* 组织名
*/
private String orgName;
@NoArgsConstructor
@Data
public static class UserListBean {
/**
* 用户ID
*/
private String userId;
/**
* 手机号
*/
private String mobile;
/**
* 身份证
*/
private String idCard;
}
}

30
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationAddFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.form;
import com.epmet.dto.IcEpidemicSpecialAttentionDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.Valid;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/3/28 10:46
* @DESC
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class VaccinationAddFormDTO implements Serializable {
private static final long serialVersionUID = -4786942219804246138L;
@Valid
private List<IcEpidemicSpecialAttentionDTO> list;
private String userId;
private String customerId;
}

66
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java

@ -0,0 +1,66 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/3/28 10:30
* @DESC
*/
@Data
public class VaccinationListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -498378993902522370L;
public interface VaccinationListForm{}
/**
* 关注类型核酸检测2疫苗接种1行程上报0
*/
@NotNull(message = "attentionType不能为空",groups = VaccinationListForm.class)
private Integer attentionType;
/**
* 手机号
*/
private String mobile;
/**
* 名字
*/
private String name;
/**
* 身份证
*/
private String idCard;
/**
* 疫苗接种次数疫苗接种关注名单此字段可填可不填
*/
private Integer vaccinationCount;
/**
* 原因核酸检测关注名单此字段可填可不填
*/
private String reason;
/**
* 备注核酸检测关注名单此字段可填可不填
*/
private String remark;
private String userId;
private String customerId;
/**
* user所属组织ID
*/
private String orgId;
}

2
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/DemandUserResDTO.java

@ -12,4 +12,6 @@ public class DemandUserResDTO implements Serializable {
private String label;
private String gridId;
private String idCard;
private String agencyId;
private String houseId;
}

21
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionInfoDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/3/29 16:19
*/
@NoArgsConstructor
@Data
public class EpidemicPreventionInfoDTO implements Serializable {
private static final long serialVersionUID = -1845197091484928L;
private List<NatListDTO> natList;
private List<VaccineListDTO> vaccineList;
private List<TripListDTO> tripList;
}

48
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java

@ -0,0 +1,48 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/3/29 14:22
*/
@NoArgsConstructor
@Data
public class EpidemicPreventionResultDTO implements Serializable {
private static final long serialVersionUID = -1901847880985531089L;
private String id;
/**
* 姓名
*/
private String name;
/**
* 所属网格
*/
private String gridId;
private String gridName;
/**
* 所属家庭
*/
private String homeId;
private String houseName;
/**
* 手机号
*/
private String mobile;
/**
* 身份证
*/
private String idCard;
/**
* 疫苗接种次数
*/
private Integer vaccineCount;
/**
* 核酸检测次数
*/
private Integer natCount;
}

91
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestCollectResDTO.java

@ -0,0 +1,91 @@
package com.epmet.dto.result;
import com.epmet.dto.form.IcResiCollectMemFormDTO;
import lombok.Data;
import javax.validation.Valid;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 社区居民信息登记-返参
*/
@Data
public class LatestCollectResDTO implements Serializable {
private String resiCollectId;
private String agencyId;
private String agencyName;
private String pids;
private String gridId;
private String customerId;
/**
* 所属小区ID
*/
private String villageId;
/**
* 所属楼宇Id
*/
private String buildId;
/**
* 单元id
*/
private String unitId;
/**
* 所属家庭Id
*/
private String homeId;
/**
* 详细地址
*/
private String address;
/**
* 1自有0租住
*/
private String houseType;
/**
* 户主姓名
*/
private String houseHolderName;
/**
* 居住成员人数
*/
private Integer totalResi;
private String villageName;
private String buildName;
private String unitName;
private String homeName;
@Valid
private List<IcResiCollectMemFormDTO> memberList;
public LatestCollectResDTO() {
this.resiCollectId = "";
this.agencyId = "";
this.agencyName = "";
this.pids = "";
this.gridId = "";
this.customerId = "";
this.villageId = "";
this.buildId = "";
this.unitId="";
this.homeId="";
this.address="";
this.houseType="";
this.houseHolderName="";
this.totalResi=0;
this.memberList=new ArrayList<>();
this.villageName="";
this.buildName="";
this.unitName="";
this.homeName="";
}
}

70
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyNatListResultDTO.java

@ -0,0 +1,70 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Description 核酸检测-我的上报记录
* @Author sun
*/
@Data
public class MyNatListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 核酸记录Id
*/
private String icNatId;
/**
* 居民端小程序的用户id数字社区的icResiUserId其他情况无值
*/
private String userId;
/**
* 居民端小程序的人resi;数字社区的居民icresi;未关联上的other
*/
private String userType;
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号
*/
private String idCard;
/**
* 检测时间,yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
private Date natTime;
/**
* 检测结果
*/
private String natResult;
/**
* 检测地点
*/
private String natAddress;
/**
* 附件名
*/
private String fileName;
/**
* 附件地址
*/
private String attachmentUrl;
}

27
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListCommonExcelResultDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.result;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import lombok.Data;
/**
* @Description 核酸检测-我的上报记录
* @Author sun
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class NatListCommonExcelResultDTO extends NatListResultDTO{
private static final long serialVersionUID = 1L;
/**
* 是否客户下居民(0: 1:)
*/
@ColumnWidth(20)
@ExcelProperty(value = "本辖区居民",order = 6)
private String isResiUser;
}

20
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/3/29 16:19
*/
@NoArgsConstructor
@Data
public class NatListDTO implements Serializable {
private static final long serialVersionUID = 6294272007213038642L;
private String testTime;
private String address;
private String result;
}

95
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatListResultDTO.java

@ -0,0 +1,95 @@
package com.epmet.dto.result;
import com.alibaba.excel.annotation.ExcelIgnore;
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;
/**
* @Description 核酸检测-我的上报记录
* @Author sun
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class NatListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 核酸记录Id
*/
@ExcelIgnore
private String icNatId;
/**
* 组织Id
*/
@ExcelIgnore
private String agencyId;
/**
* 居民端小程序的用户id数字社区的icResiUserId其他情况无值
*/
@ExcelIgnore
private String userId;
/**
* 居民端小程序的人resi;数字社区的居民icresi;未关联上的other
*/
@ExcelIgnore
private String userType;
/**
* 姓名
*/
@ColumnWidth(20)
@ExcelProperty(value = "姓名",order = 1)
private String name;
/**
* 手机号
*/
@ColumnWidth(20)
@ExcelProperty(value = "手机号",order = 2)
private String mobile;
/**
* 身份证号
*/
@ColumnWidth(25)
@ExcelProperty(value = "身份证号",order = 3)
private String idCard;
/**
* 检测时间,yyyy-MM-dd HH:mm
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
@ColumnWidth(25)
@ExcelProperty(value = "检测时间",order = 4)
private Date natTime;
/**
* 检测结果
*/
@ColumnWidth(20)
@ExcelProperty(value = "检测结果",order = 5)
private String natResult;
/**
* 是否客户下居民(0: 1:)
*/
@ExcelIgnore
private String isResiUser;
/**
* 检测地点
*/
@ColumnWidth(30)
@ExcelProperty(value = "检测地点",order = 7)
private String natAddress;
}

21
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/TripListDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/3/29 16:22
*/
@NoArgsConstructor
@Data
public class TripListDTO implements Serializable {
private String fromRegion;
private String arrivalTime;
private String leaveTime;
private String noticeTime;
private String remark;
}

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

@ -77,4 +77,8 @@ public class UserInfoOnEnterGridResultDTO implements Serializable{
private String orgName = "";
//工作人员添加入口类型(组织:agency;部门:dept;网格:gridId)
private String orgType = "";
//进入的网格所属组织
private String agencyId;
private String agencyName;
}

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

@ -0,0 +1,67 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/3/28 14:14
* @DESC
*/
@Data
public class VaccinationListResultDTO implements Serializable {
private static final long serialVersionUID = -4368151917259903449L;
/**
* 排序
*/
private Integer sort;
/**
* 接种针次
*/
private Integer vaccinationCount;
/**
* 姓名
*/
private String name;
/**
* 电话
*/
private String mobile;
/**
* 身份证
*/
private String idCard;
/**
* 备注
*/
private String remark;
/**
* 原因
*/
private String reason;
/**
* 最后一次通知时间
*/
private String lastInformTime;
public VaccinationListResultDTO() {
this.vaccinationCount = NumConstant.ZERO;
this.name = "";
this.mobile = "";
this.idCard = "";
this.remark = "";
this.lastInformTime = "";
this.reason = "";
}
}

20
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccineListDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/3/29 16:20
*/
@NoArgsConstructor
@Data
public class VaccineListDTO implements Serializable {
private static final long serialVersionUID = 182173953023413061L;
private String vaccinateTime;
private String manufactor;
private String address;
}

46
epmet-user/epmet-user-client/src/main/java/com/epmet/enums/AttentionTypeEnum.java

@ -0,0 +1,46 @@
package com.epmet.enums;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
/**
* @Author zxc
* @DateTime 2022/3/29 16:17
* @DESC
*/
public enum AttentionTypeEnum {
XCSB(0,"行程上报"),
YMJZ(1,"疫苗接种"),
NAT(2,"核酸检测")
;
private Integer key;
private String value;
AttentionTypeEnum(Integer key, String value) {
this.key = key;
this.value = value;
}
public static Integer getKeyByValue(String value){
if (StringUtils.isBlank(value)){
return NumConstant.ZERO;
}
for (AttentionTypeEnum a : AttentionTypeEnum.values()) {
if (a.getValue().equals(value)){
return a.getKey();
}
}
return NumConstant.ZERO;
}
public Integer getKey() {
return key;
}
public String getValue() {
return value;
}
}

44
epmet-user/epmet-user-client/src/main/java/com/epmet/enums/ChannelEnum.java

@ -0,0 +1,44 @@
package com.epmet.enums;
import com.epmet.commons.tools.constant.NumConstant;
import org.apache.commons.lang3.StringUtils;
/**
* @Author zxc
* @DateTime 2022/3/29 16:35
* @DESC
*/
public enum ChannelEnum {
MINI("0","小程序"),
MSG("1","短信")
;
private String key;
private String value;
ChannelEnum(String key, String value) {
this.key = key;
this.value = value;
}
public static String getKeyByValue(String value){
if (StringUtils.isBlank(value)){
return NumConstant.ONE_STR;
}
for (ChannelEnum a : ChannelEnum.values()) {
if (a.getValue().equals(value)){
return a.getKey();
}
}
return NumConstant.ONE_STR;
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
}

1
epmet-user/epmet-user-server/deploy/docker-compose-dev.yml

@ -8,6 +8,7 @@ services:
network_mode: host # 不会创建新的网络
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
- "/opt/epmet_files/:/opt/epmet_files"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./epmet-user.jar"
restart: "unless-stopped"

1
epmet-user/epmet-user-server/deploy/docker-compose-prod.yml

@ -8,6 +8,7 @@ services:
network_mode: host # 不会创建新的网络
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
- "/opt/epmet_files/:/opt/epmet_files"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx1024m -jar ./epmet-user.jar"
restart: "unless-stopped"

1
epmet-user/epmet-user-server/deploy/docker-compose-test.yml

@ -8,6 +8,7 @@ services:
network_mode: host # 不会创建新的网络
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
- "/opt/epmet_files/:/opt/epmet_files"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./epmet-user.jar"
restart: "unless-stopped"

19
epmet-user/epmet-user-server/pom.xml

@ -18,25 +18,6 @@
<artifactId>epmet-admin-client</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.0.3</version>
<exclusions>
<exclusion>
<artifactId>poi</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml-schemas</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-user-client</artifactId>

95
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
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.form.EpidemicPreventionFormDTO;
import com.epmet.dto.result.EpidemicPreventionInfoDTO;
import com.epmet.dto.result.EpidemicPreventionResultDTO;
import com.epmet.service.IcResiUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 用户基础信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-10-26
*/
@Slf4j
@RestController
@RequestMapping("epidemicPrevention")
public class IcEpidemicPreventionController{
@Resource
private IcResiUserService icResiUserService;
/**
* 居民防疫信息查询
* @Param tokenDto
* @Param formDTO
* @Return {@link Result< PageData<EpidemicPreventionResultDTO>>}
* @Author zhaoqifeng
* @Date 2022/3/29 14:25
*/
@PostMapping("page")
public Result<PageData<EpidemicPreventionResultDTO>> search(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
PageData<EpidemicPreventionResultDTO> result = icResiUserService.epidemicPreventionList(formDTO);
return new Result<PageData<EpidemicPreventionResultDTO>>().ok(result);
}
@PostMapping("user-list")
public Result<PageData<EpidemicPreventionResultDTO>> userList(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
PageData<EpidemicPreventionResultDTO> result = icResiUserService.userList(formDTO);
return new Result<PageData<EpidemicPreventionResultDTO>>().ok(result);
}
/**
* 居民防疫信息详情
* @Param formDTO
* @Return {@link Result< EpidemicPreventionResultDTO>}
* @Author zhaoqifeng
* @Date 2022/3/29 16:13
*/
@PostMapping("detail")
public Result<EpidemicPreventionResultDTO> detail(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
EpidemicPreventionResultDTO result = icResiUserService.getEpidemicPreventionDetail(formDTO);
return new Result<EpidemicPreventionResultDTO>().ok(result);
}
@PostMapping("info")
public Result<EpidemicPreventionInfoDTO> info(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
EpidemicPreventionInfoDTO result = icResiUserService.getEpidemicPreventionInfo(formDTO);
return new Result<EpidemicPreventionInfoDTO>().ok(result);
}
}

201
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java

@ -0,0 +1,201 @@
package com.epmet.controller;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelPoiUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcEpidemicSpecialAttentionDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.excel.NatExportExcel;
import com.epmet.excel.NatImportExcel;
import com.epmet.excel.VaccinationExportExcel;
import com.epmet.excel.VaccinationImportExcel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.service.IcEpidemicSpecialAttentionService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FilenameUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/**
* 疫情特别关注
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@RestController
@RequestMapping("icEpidemicSpecialAttention")
@Slf4j
public class IcEpidemicSpecialAttentionController {
@Autowired
private IcEpidemicSpecialAttentionService icEpidemicSpecialAttentionService;
@Autowired
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
/**
* Desc: 疫苗接种关注名单疫苗接种关注名单列表
* @param formDTO
* @author zxc
* @date 2022/3/28 10:29
*/
@PostMapping("list")
public Result<PageData> vaccinationList(@RequestBody VaccinationListFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class, VaccinationListFormDTO.VaccinationListForm.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData>().ok(icEpidemicSpecialAttentionService.vaccinationList(formDTO));
}
/**
* Desc:疫苗接种关注名单核酸检测关注名单新增
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2022/3/28 13:35
*/
@PostMapping("vaccination-add")
@NoRepeatSubmit
public Result vaccinationAdd(@RequestBody VaccinationAddFormDTO formDTO,@LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, IcEpidemicSpecialAttentionDTO.IcEpidemicSpecialAttentionAdd.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
icEpidemicSpecialAttentionService.vaccinationAdd(formDTO);
return new Result();
}
/**
* Desc:疫苗接种关注名单核酸检测关注名单修改
* @param formDTO
* @author zxc
* @date 2022/3/28 13:45
*/
@PostMapping("vaccination-update")
@NoRepeatSubmit
public Result vaccinationUpdate(@RequestBody IcEpidemicSpecialAttentionDTO formDTO,@LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, IcEpidemicSpecialAttentionDTO.IcEpidemicSpecialAttentionUpdate.class);
icEpidemicSpecialAttentionService.vaccinationUpdate(formDTO,tokenDto);
return new Result();
}
/**
* Desc: 取消关注
* @param formDTO
* @author zxc
* @date 2022/3/28 13:51
*/
@PostMapping("cancel-attention")
@NoRepeatSubmit
public Result cancelAttention(@RequestBody CancelAttentionPackageFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, CancelAttentionPackageFormDTO.CancelAttentionPackageForm.class);
icEpidemicSpecialAttentionService.cancelAttention(formDTO);
return new Result();
}
/**
* Desc: 疫苗接种关注名单核酸检测关注名单导入
* @param
* @author zxc
* @date 2022/3/28 13:40
*/
@PostMapping("vaccination-import")
public Result vaccinationImport(@LoginUser TokenDto tokenDto, @RequestParam("file") MultipartFile file,@RequestParam("attentionType")Integer attentionType){
if (file.isEmpty()) {
throw new EpmetException("请上传文件");
}
// 校验文件类型
String extension = FilenameUtils.getExtension(file.getOriginalFilename());
if (!"xls".equals(extension) && !"xlsx".equals(extension)) {
throw new EpmetException("文件类型不匹配");
}
// 关注类型,核酸检测:2,疫苗接种:1,行程上报:0
ImportTaskCommonFormDTO importTaskForm = new ImportTaskCommonFormDTO();
importTaskForm.setOriginFileName(file.getOriginalFilename());
importTaskForm.setOperatorId(tokenDto.getUserId());
if (attentionType.equals(NumConstant.ONE)){
importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_ATTENTION_VACCINATION);
}else if (attentionType.equals(NumConstant.TWO)){
importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_ATTENTION_NAT);
}else if (attentionType.equals(NumConstant.ZERO)){
importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_ATTENTION_TRIP_REPORT);
}
Result<ImportTaskCommonResultDTO> result = commonServiceOpenFeignClient.createImportTask(importTaskForm);
if (!result.success()) {
throw new EpmetException(9999,"存在进行中的导入");
}
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("读取文件失败");
}
icEpidemicSpecialAttentionService.importFile(tokenDto,inputStream,attentionType,result.getData().getTaskId());
return new Result();
}
/**
* Desc: 疫苗接种关注名单核酸检测关注名单导出
* @param response
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2022/3/28 13:57
*/
@PostMapping("vaccination-export")
public void vaccinationExport(HttpServletResponse response,@RequestBody VaccinationListFormDTO formDTO, @LoginUser TokenDto tokenDto) throws Exception {
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
formDTO.setIsPage(false);
PageData pageData = icEpidemicSpecialAttentionService.vaccinationList(formDTO);
// 关注类型,核酸检测:2,疫苗接种:1,行程上报:0
if (formDTO.getAttentionType().equals(NumConstant.ONE)){
ExcelUtils.exportExcelToTarget(response, null, pageData.getList(), VaccinationExportExcel.class);
}else {
ExcelUtils.exportExcelToTarget(response, null, pageData.getList(), NatExportExcel.class);
}
}
@PostMapping("export-template")
public void exportTemplate(HttpServletResponse response, @RequestBody VaccinationListFormDTO formDTO) throws Exception {
TemplateExportParams templatePath = new TemplateExportParams();
String fileName = "";
Map<String,Object> map = new HashMap<>();
// 关注类型,核酸检测:2,疫苗接种:1,行程上报:0
if (formDTO.getAttentionType().equals(NumConstant.ONE)){
templatePath.setTemplateUrl("excel/attention_vaccination_template.xlsx");
fileName = "疫苗接种关注名单导入模板";
map.put("maplist",new ArrayList<VaccinationImportExcel>());
}else if (formDTO.getAttentionType().equals(NumConstant.TWO)){
templatePath.setTemplateUrl("excel/attention_nat_template.xlsx");
fileName = "核酸检测关注名单导入模板";
map.put("maplist",new ArrayList<NatImportExcel>());
}
ExcelPoiUtils.exportExcel(templatePath ,map,fileName,response);
}
}

149
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java

@ -0,0 +1,149 @@
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.NumConstant;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcFollowUpRecordDTO;
import com.epmet.dto.form.PageFollowUpFormDTO;
import com.epmet.service.IcFollowUpRecordService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
/**
* 随访记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-25
*/
@Slf4j
@RestController
@RequestMapping("followup")
public class IcFollowUpRecordController {
@Autowired
private IcFollowUpRecordService icFollowUpRecordService;
/**
* 随访记录-列表
* @param formDTO
* @return
*/
@PostMapping("page")
public Result<PageData<IcFollowUpRecordDTO>> page(@LoginUser TokenDto tokenDto, @RequestBody PageFollowUpFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserShowGroup.class,PageFormDTO.AddUserInternalGroup.class);
PageData<IcFollowUpRecordDTO> page = icFollowUpRecordService.page(formDTO);
return new Result<PageData<IcFollowUpRecordDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcFollowUpRecordDTO> get(@PathVariable("id") String id){
IcFollowUpRecordDTO data = icFollowUpRecordService.get(id);
return new Result<IcFollowUpRecordDTO>().ok(data);
}
/**
* 随访记录-新增
* @param dto
* @return
*/
@NoRepeatSubmit
@PostMapping("save")
public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcFollowUpRecordDTO dto){
dto.setCustomerId(tokenDto.getCustomerId());
dto.setCreatedBy(tokenDto.getUserId());
ValidatorUtils.validateEntity(dto, IcFollowUpRecordDTO.AddUserRequired.class,IcFollowUpRecordDTO.AddInternalGroup.class);
icFollowUpRecordService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcFollowUpRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icFollowUpRecordService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icFollowUpRecordService.delete(ids);
return new Result();
}
/**
* 随访记录-导出
* 目前是导出个人
* @param tokenDto
* @param formDTO
* @param response
*/
@NoRepeatSubmit
@PostMapping("export")
public void export(@LoginUser TokenDto tokenDto, @RequestBody PageFollowUpFormDTO formDTO, HttpServletResponse response) {
formDTO.setCustomerId(tokenDto.getCustomerId());
//formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc");
formDTO.setIsPage(false);
ExcelWriter excelWriter = null;
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
int pageNo = formDTO.getPageNo();
try {
//导出文件名:张三随访记录0330
String today= DateUtils.format(new Date(),DateUtils.DATE_PATTERN_MMDD);
String fileName = formDTO.getName().concat("随访记录").concat(today).concat(".xlsx");
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcFollowUpRecordDTO.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").build();
PageData<IcFollowUpRecordDTO> data = null;
do {
data = icFollowUpRecordService.page(formDTO);
data.getList().forEach(o->{
//0行程上报,1疫苗接种,2核酸检测
switch(o.getOrigin()){
case NumConstant.ZERO_STR:
o.setOrigin("行程上报");
break;
case NumConstant.ONE_STR:
o.setOrigin("疫苗接种");
break;
case NumConstant.TWO_STR:
o.setOrigin("核酸检测");
break;
}
});
formDTO.setPageNo(++pageNo);
excelWriter.write(data.getList(), writeSheet);
} while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size()==formDTO.getPageSize());
}catch (Exception e){
log.error("export exception", e);
}finally {
// 千万别忘记finish 会帮忙关闭流
if (excelWriter != null) {
excelWriter.finish();
}
}
}
}

318
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java

@ -0,0 +1,318 @@
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.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcNatDTO;
import com.epmet.dto.form.AddIcNatFormDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.form.MyNatListFormDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.MyNatListResultDTO;
import com.epmet.dto.result.NatListCommonExcelResultDTO;
import com.epmet.dto.result.NatListResultDTO;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.service.IcNatService;
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.UUID;
/**
* 核酸上报记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-25
*/
@Slf4j
@RestController
@RequestMapping("icNat")
public class IcNatController implements ResultDataResolver {
@Autowired
private IcNatService icNucleinService;
@Autowired
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
/**
* 记录一下核酸记录模块的业务程序逻辑防止后续理不清 ic_nat:基础信息表 ic_nat_relation:关系表
* 1.数字平台导入时按身份证检测时间查询数据查到数据不是导入的状态则记录下并跳过是导入数据更新结果未查到直接新增
* 是否居民以及userId值查询数据平台居民能查到就相应的赋值
* 2.居民端录入可以录自己的或别人的但是数据属于当前录入的组织
* 3.数据平台录入可以为已有居民录入也可以录新数据新数据则是否居民和userId无值
* 4.导入数据不允许修改删除录入数据可以修改删除删除时相应的删除基础表和可能存在的所有关心表数据
* 数据同步可多次重复只是修改对应的关系表数据基础信息表数据公用
* 5.同一条数据被A街道和A社区都同步了街道在看本辖区数据时会看到两条但是只有A街道的那一条才能看到取消同步按钮
* 6.数据库一个人一个检测时间只存在一条记录以导入数据结果为准已导入的各项值都不能修改即使错误也只能通过导入修改
* 7.新增删除居民时会相应的修改基础信息表是否居民以及userId的值
* 1.导入数据不允许修改是觉得导入数据是官方提供的且没有问题的数据不需要在平台有维护操作只要看就可以了
* 2.是否居民的查询条件以及是否居民的列标题在看整个客户列表数据时这两个都隐藏
*
*/
/**
* @Author sun
* @Description 核酸检测-上报核酸记录
**/
//@NoRepeatSubmit
@PostMapping("add")
public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddIcNatFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddIcNatFormDTO.Nat.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
icNucleinService.add(formDTO);
return new Result();
}
/**
* @Author sun
* @Description 核酸检测-居民端我的上报
**/
@NoRepeatSubmit
@PostMapping("mynatlist")
public Result<List<MyNatListResultDTO>> myNatList(@LoginUser TokenDto tokenDto, @RequestBody MyNatListFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<List<MyNatListResultDTO>>().ok(icNucleinService.myNatList(formDTO));
}
/**
* @Author sun
* @Description 核酸核酸检测信息列表
**/
@NoRepeatSubmit
@PostMapping("natlist")
public Result<PageData<NatListResultDTO>> natList(@LoginUser TokenDto tokenDto, @RequestBody MyNatListFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData<NatListResultDTO>>().ok(icNucleinService.natList(formDTO));
}
/**
* @Author sun
* @Description 核酸核酸检测信息详情
**/
@NoRepeatSubmit
@PostMapping("detail")
public Result<IcNatDTO> detail(@RequestBody MyNatListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MyNatListFormDTO.Detail.class);
return new Result<IcNatDTO>().ok(icNucleinService.detail(formDTO));
}
/**
* @Author sun
* @Description 核酸核酸检测信息修改
**/
@NoRepeatSubmit
@PostMapping("edit")
public Result edit(@LoginUser TokenDto tokenDto, @RequestBody AddIcNatFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddIcNatFormDTO.Edit.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
icNucleinService.edit(formDTO);
return new Result();
}
/**
* @Author sun
* @Description 核酸核酸检测信息删除/取消同步
**/
@NoRepeatSubmit
@PostMapping("del")
public Result del(@RequestBody MyNatListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MyNatListFormDTO.Del.class);
icNucleinService.del(formDTO);
return new Result<>();
}
/**
* @Author sun
* @Description 核酸核酸检测信息同步
**/
@NoRepeatSubmit
@PostMapping("synchro")
public Result synchro(@LoginUser TokenDto tokenDto, @RequestBody MyNatListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MyNatListFormDTO.Synchro.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
icNucleinService.synchro(formDTO);
return new Result();
}
/**
* @Author sun
* @Description 核酸核酸检测信息取消同步
**/
@NoRepeatSubmit
@PostMapping("cancelsynchro")
public Result cancelSynchro(@LoginUser TokenDto tokenDto, @RequestBody MyNatListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MyNatListFormDTO.Synchro.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
icNucleinService.cancelSynchro(formDTO);
return new Result<>();
}
/**
* 导入excel
* @return
*/
@PostMapping("import")
public Result importExcel(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_nat", "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) {
e.printStackTrace();
} 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_NAT);
importTaskForm.setOriginFileName(originalFilename);
ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException(commonServiceOpenFeignClient.createImportTask(importTaskForm),
ServiceConstant.EPMET_COMMON_SERVICE,
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
"excel导入核酸检测信息错误",
"导入居民核酸检测信息失败");
// 3.执行导入
icNucleinService.execAsyncExcelImport(fileSavePath, rstData.getTaskId());
return new Result();
}
/**
* @Author sun
* @Description 核酸核酸检测信息下载模板
**/
@RequestMapping(value = "import-template-download", method = {RequestMethod.GET, RequestMethod.POST})
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.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/ic_nat.xlsx");
try {
ServletOutputStream os = response.getOutputStream();
IOUtils.copy(is, os);
} finally {
if (is != null) {
is.close();
}
}
}
/**
* @Author sun
* @Description 核酸核酸检测信息列表
**/
@NoRepeatSubmit
@PostMapping("export")
public void export(@LoginUser TokenDto tokenDto, @RequestBody MyNatListFormDTO formDTO, HttpServletResponse response) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
//formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc");
//formDTO.setUserId("73ae6280e46a6653a5605d51d5462725");
formDTO.setIsPage(false);
ExcelWriter excelWriter = null;
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
int pageNo = formDTO.getPageNo();
try {
// 这里 需要指定写用哪个class去写
String fileName = "核酸检测信息.xlsx";
if ("all".equals(formDTO.getOrgType())) {
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), NatListResultDTO.class).build();
}else {
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), NatListCommonExcelResultDTO.class).build();
}
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").build();
PageData<NatListResultDTO> data = null;
do {
data = icNucleinService.natList(formDTO);
data.getList().forEach(o-> {
o.setNatResult(NumConstant.ONE_STR.equals(o.getNatResult()) ? "阳性" : "阴性");
o.setIsResiUser(NumConstant.ONE_STR.equals(o.getIsResiUser()) ? "是" : "否");
});
formDTO.setPageNo(++pageNo);
if ("current".equals(formDTO.getOrgType())) {
List<NatListResultDTO> list = ConvertUtils.sourceToTarget(data.getList(), NatListResultDTO.class);
excelWriter.write(list, writeSheet);
}else{
excelWriter.write(data.getList(), writeSheet);
}
} while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize());
}catch (Exception e){
log.error("export exception", e);
}finally {
// 千万别忘记finish 会帮忙关闭流
if (excelWriter != null) {
excelWriter.finish();
}
}
}
}

24
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatRelationController.java

@ -0,0 +1,24 @@
package com.epmet.controller;
import com.epmet.service.IcNatRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 核酸记录关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-31
*/
@RestController
@RequestMapping("icNatRelation")
public class IcNatRelationController {
@Autowired
private IcNatRelationService icNatRelationService;
}

82
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNoticeController.java

@ -0,0 +1,82 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcNoticeDTO;
import com.epmet.dto.form.IcNoticeFormDTO;
import com.epmet.dto.form.SendNoticeFormDTO;
import com.epmet.service.IcNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* 防疫通知
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@RestController
@RequestMapping("icNotice")
public class IcNoticeController {
@Autowired
private IcNoticeService icNoticeService;
@RequestMapping("page")
public Result<PageData<IcNoticeDTO>> page(@LoginUser TokenDto tokenDto, @RequestBody IcNoticeFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
PageData<IcNoticeDTO> page = icNoticeService.page(formDTO);
return new Result<PageData<IcNoticeDTO>>().ok(page);
}
@RequestMapping(method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcNoticeDTO> get(@RequestBody IcNoticeFormDTO formDTO){
IcNoticeDTO data = icNoticeService.get(formDTO.getNoticeId());
return new Result<IcNoticeDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody IcNoticeDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icNoticeService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcNoticeDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icNoticeService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icNoticeService.delete(ids);
return new Result();
}
@PostMapping("sendNotice")
public Result sendNotice(@LoginUser TokenDto tokenDto, @RequestBody SendNoticeFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, DefaultGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
icNoticeService.sendNotice(formDTO);
return new Result();
}
}

34
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java

@ -11,9 +11,12 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.CollectListFormDTO;
import com.epmet.dto.form.IcResiCollectFormDTO;
import com.epmet.dto.form.LatestSubmitCollectFormDTO;
import com.epmet.dto.form.ResiCollectFormDTO;
import com.epmet.dto.result.CollectListExcelResultDTO;
import com.epmet.dto.result.CollectListMemberExcelResultDTO;
import com.epmet.dto.result.CollectListResultDTO;
import com.epmet.dto.result.LatestCollectResDTO;
import com.epmet.service.IcResiCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -89,7 +92,7 @@ public class IcResiCollectController {
//tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc");
formDTO.setUserId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setPage(false);
formDTO.setIsPage(false);
PageData<CollectListResultDTO> collectList = icResiCollectService.getCollectList(formDTO);
List<CollectListExcelResultDTO> list =new ArrayList<>();
@ -108,4 +111,33 @@ public class IcResiCollectController {
ExcelUtils.exportExcelToTarget(response, null, list, CollectListExcelResultDTO.class);
}
/**
* 居民端小程序社区居民信息登记-提交
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("save-resi")
public Result saveResi(@LoginUser TokenDto tokenDto, @RequestBody ResiCollectFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, ResiCollectFormDTO.InternalShowGroup.class, ResiCollectFormDTO.AddUserInternalGroup.class);
icResiCollectService.saveResi(formDTO);
return new Result();
}
/**
* 居民端小程序社区居民信息登记-查询
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("latest-submit")
public Result<LatestCollectResDTO> latestSubmit(@LoginUser TokenDto tokenDto, @RequestBody LatestSubmitCollectFormDTO formDTO){
formDTO.setUserId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO,LatestSubmitCollectFormDTO.AddUserInternalGroup.class);
return new Result<LatestCollectResDTO>().ok(icResiCollectService.latestSubmit(formDTO));
}
}

73
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiVaccineController.java

@ -0,0 +1,73 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.IcResiVaccineDTO;
import com.epmet.service.IcResiVaccineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 居民疫苗情况
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@RestController
@RequestMapping("icResiVaccine")
public class IcResiVaccineController {
@Autowired
private IcResiVaccineService icResiVaccineService;
@RequestMapping("page")
public Result<PageData<IcResiVaccineDTO>> page(@RequestParam Map<String, Object> params){
PageData<IcResiVaccineDTO> page = icResiVaccineService.page(params);
return new Result<PageData<IcResiVaccineDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcResiVaccineDTO> get(@PathVariable("id") String id){
IcResiVaccineDTO data = icResiVaccineService.get(id);
return new Result<IcResiVaccineDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody IcResiVaccineDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icResiVaccineService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody IcResiVaccineDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icResiVaccineService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
icResiVaccineService.delete(ids);
return new Result();
}
}

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

@ -0,0 +1,277 @@
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.feign.ResultDataResolver;
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.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.result.ImportTaskCommonResultDTO;
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.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
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.Date;
import java.util.List;
import java.util.UUID;
/**
* 行程上报信息
*
* @author generator generator@elink-cn.com
* @since v10.0 2022-03-25
*/
@Slf4j
@RestController
@RequestMapping("tripreport")
public class IcTripReportRecordController implements ResultDataResolver {
@Autowired
private IcTripReportRecordService icTripReportRecordService;
@Autowired
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
/**
* pc: 行程上报-列表
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("page")
public Result<PageData<IcTripReportRecordDTO>> page(@LoginUser TokenDto tokenDto,@RequestBody PageTripReportFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(PageFormDTO.AddUserInternalGroup.class);
PageData<IcTripReportRecordDTO> page = icTripReportRecordService.page(formDTO);
return new Result<PageData<IcTripReportRecordDTO>>().ok(page);
}
/**
* pc: 行程上报-新增
* @param formDTO
* @return
*/
@NoRepeatSubmit
@PostMapping("save")
public Result save(@LoginUser TokenDto tokenDto,@RequestBody IcTripReportFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setCurrentStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PcAddRequired.class,IcTripReportFormDTO.PcAddOrUpdateInternalGroup.class);
if(IcResiUserConstant.USER_TYPE_IC_RESI.equals(formDTO.getUserType())){
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.IcResiInternalGroup.class);
}
String id=icTripReportRecordService.save(formDTO);
return new Result().ok(id);
}
/**
* pc: 行程上报-修改
* @param formDTO
* @return
*/
@NoRepeatSubmit
@PostMapping("update")
public Result update(@LoginUser TokenDto tokenDto,@RequestBody IcTripReportFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setCurrentStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PcUpdateRequired.class,IcTripReportFormDTO.PcAddOrUpdateInternalGroup.class);
if(IcResiUserConstant.USER_TYPE_IC_RESI.equals(formDTO.getUserType())){
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.IcResiInternalGroup.class);
}
return new Result().ok(icTripReportRecordService.update(formDTO));
}
/**
* pc:行程上报-删除
*
* @param ids
* @return
*/
@PostMapping("delete")
public Result delete(@LoginUser TokenDto tokenDto, @RequestBody String[] ids) {
if (ArrayUtils.isEmpty(ids)) {
return new Result();
}
icTripReportRecordService.delete(tokenDto.getCustomerId(),tokenDto.getUserId(),ids);
return new Result();
}
/**
* 居民端小程序上报行程
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("resi-save")
public Result resiSave(@LoginUser TokenDto tokenDto, @RequestBody IcTripReportFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
formDTO.setUserType(IcResiUserConstant.USER_TYPE_RESI);
ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.ResiUserRequired.class,IcTripReportFormDTO.ResiUserInternalGroup.class);
return new Result().ok(icTripReportRecordService.resiSave(formDTO));
}
/**
* 居民端小程序我的上报
* @param tokenDto
* @return
*/
@PostMapping("resi-list")
public Result<List<IcTripReportRecordDTO>> resiList(@LoginUser TokenDto tokenDto,@RequestBody MyReportedTripFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
return new Result<List<IcTripReportRecordDTO>>().ok(icTripReportRecordService.resiList(formDTO));
}
/**
* pc:行程上报-下载模板
* @param response
* @throws IOException
*/
@RequestMapping(value = "template-download", method = {RequestMethod.GET, RequestMethod.POST})
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.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/trip_report_import_template.xlsx");
try {
ServletOutputStream os = response.getOutputStream();
IOUtils.copy(is, os);
} finally {
if (is != null) {
is.close();
}
}
}
/**
* pc:行程上报-导出
* @param tokenDto
* @param formDTO
* @param response
*/
@NoRepeatSubmit
@PostMapping("export")
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);
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), IcTripReportRecordDTO.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").build();
PageData<IcTripReportRecordDTO> data = null;
do {
data = icTripReportRecordService.page(formDTO);
formDTO.setPageNo(++pageNo);
excelWriter.write(data.getList(), writeSheet);
} while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize());
} catch (Exception e) {
log.error("export exception", e);
} finally {
// 千万别忘记finish 会帮忙关闭流
if (excelWriter != null) {
excelWriter.finish();
}
}
}
/**
* 导入excel
* @return
*/
@PostMapping("import")
public Result importExcel(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_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) {
e.printStackTrace();
} 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_TRIP_REPORT);
importTaskForm.setOriginFileName(originalFilename);
ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException(commonServiceOpenFeignClient.createImportTask(importTaskForm),
ServiceConstant.EPMET_COMMON_SERVICE,
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
"excel行程上报导入错误",
"行程上报导入失败");
// 3.执行导入
icTripReportRecordService.execAsyncExcelImport(fileSavePath, rstData.getTaskId());
return new Result();
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/PatrolRoutineWorkController.java

@ -43,7 +43,7 @@ public class PatrolRoutineWorkController {
@NoRepeatSubmit
@PostMapping("selectList")
public Result<List<PatrolRoutineWorkResult>> gridUserWork(@RequestBody PatrolQueryFormDTO formDTO){
formDTO.setPage(false);
formDTO.setIsPage(false);
Page<PatrolRoutineWorkResult> data = gridUserWorkService.listPage(formDTO);
return new Result().ok(data.getResult());
}

63
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcEpidemicSpecialAttentionDao.java

@ -0,0 +1,63 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.VaccinationListFormDTO;
import com.epmet.dto.result.VaccinationListResultDTO;
import com.epmet.entity.IcEpidemicSpecialAttentionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 疫情特别关注
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@Mapper
public interface IcEpidemicSpecialAttentionDao extends BaseDao<IcEpidemicSpecialAttentionEntity> {
/**
* Desc: 疫苗接种关注名单
* @param formDTO
* @author zxc
* @date 2022/3/28 14:19
*/
List<VaccinationListResultDTO> vaccinationList(VaccinationListFormDTO formDTO);
/**
* Desc: 核酸检测关注名单
* @param formDTO
* @author zxc
* @date 2022/3/28 15:23
*/
List<VaccinationListResultDTO> natList(VaccinationListFormDTO formDTO);
/**
* Desc: 取消关注
* @param list
* @param attentionType
* @author zxc
* @date 2022/3/28 16:59
*/
void cancelAttention(@Param("list")List<String> list,@Param("attentionType")Integer attentionType);
/**
* Desc: 查询已经存在的关注
* @param attentionType
* @param list
* @author zxc
* @date 2022/3/28 17:29
*/
List<String> getExistList(@Param("attentionType")Integer attentionType,@Param("list")List<String> list);
/**
* 返回idCardSet中已经关注的身份证号
*
* @param idCardSet
* @param attentionType
* @return
*/
List<String> getIdCardList(@Param("customerId") String customerId,@Param("idCardSet") List<String> idCardSet, @Param("attentionType") Integer attentionType);
}

16
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcFollowUpRecordDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcFollowUpRecordEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 随访记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-25
*/
@Mapper
public interface IcFollowUpRecordDao extends BaseDao<IcFollowUpRecordEntity> {
}

69
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatDao.java

@ -0,0 +1,69 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcNatDTO;
import com.epmet.dto.form.MyNatListFormDTO;
import com.epmet.dto.result.MyNatListResultDTO;
import com.epmet.dto.result.NatListResultDTO;
import com.epmet.entity.IcNatEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 核酸上报记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-25
*/
@Mapper
public interface IcNatDao extends BaseDao<IcNatEntity> {
/**
* @Author sun
* @Description 核酸检测-按条件查询核酸记录
**/
List<MyNatListResultDTO> getMyNatList(MyNatListFormDTO formDTO);
/**
* @Author sun
* @Description 核酸本辖区核酸检测信息列表
**/
List<NatListResultDTO> getNatList(MyNatListFormDTO formDTO);
/**
* @Author sun
* @Description 核酸客户下核酸检测信息列表
**/
List<NatListResultDTO> getCustomerNatList(MyNatListFormDTO formDTO);
/**
* @Author sun
* @Description 删除操作--物理删除业务数据
**/
int delById(@Param("icNatId") String icNatId);
/**
* 插入或者更新
*
* @param e
*/
void insertOrUpdate(IcNatEntity e);
/**
* @Author sun
* @Description 按条件查询业务数据
**/
IcNatDTO getNatDTO(@Param("customerId") String customerId, @Param("icNatId") String icNatId, @Param("idCard") String idCard, @Param("natTime") String natTime, @Param("natResult") String natResult);
/**
* desc:根据客户id 更新是否居民状态
*
* @param customerId
* @param icResiUserId 如果为空则更新全部
* @return
*/
int updateIsResiFlag(@Param("customerId") String customerId, @Param("icResiUserId") String icResiUserId);
}

22
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNatRelationDao.java

@ -0,0 +1,22 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcNatRelationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 核酸记录关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-31
*/
@Mapper
public interface IcNatRelationDao extends BaseDao<IcNatRelationEntity> {
/**
* @Author sun
* @Description 关系数据删除--物理删除
**/
int delRelation(@Param("icNatId") String icNatId, @Param("agencyId") String agencyId);
}

16
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcNoticeDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcNoticeEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 防疫通知
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@Mapper
public interface IcNoticeDao extends BaseDao<IcNoticeEntity> {
}

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

@ -23,7 +23,8 @@ public interface IcResiCollectDao extends BaseDao<IcResiCollectEntity> {
int updateRec(@Param("id") String id,
@Param("houseType") String houseType,
@Param("houseHolderName") String houseHolderName,
@Param("totalResi") Integer totalResi);
@Param("totalResi") Integer totalResi,
@Param("updatedBy") String updatedBy);
/**
* Desc: 查询采集居民信息
@ -33,4 +34,11 @@ public interface IcResiCollectDao extends BaseDao<IcResiCollectEntity> {
*/
List<CollectListResultDTO> getCollectList(CollectListFormDTO formDTO);
/**
* 我上次提交的主表记录
* @param customerId
* @param userId
* @return
*/
String selectLastSubmitId(@Param("customerId") String customerId, @Param("userId") String userId);
}

7
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiMemberDao.java

@ -1,8 +1,12 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.IcResiCollectMemFormDTO;
import com.epmet.entity.IcResiMemberEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 居民信息成员表
@ -12,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcResiMemberDao extends BaseDao<IcResiMemberEntity> {
List<IcResiCollectMemFormDTO> selectMySubmit(@Param("latestResiCollectId") String latestResiCollectId, @Param("userId")String userId);
}

48
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java

@ -20,6 +20,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.form.EpidemicPreventionFormDTO;
import com.epmet.dto.form.ResiUserQueryValueDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.IcResiUserEntity;
@ -53,15 +54,16 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
**/
void upTable(@Param("tableName") String tableName, @Param("id") String id, @Param("map") Map<String, ?> map);
List<Map<String,Object>> selectListResiMap(@Param("customerId") String customerId,
@Param("formCode") String formCode,
@Param("conditions") List<ResiUserQueryValueDTO> conditions,
@Param("resultColumns") List<IcFormResColumnDTO> resultColumns,
@Param("subTables") List<String> subTables,
@Param("currentStaffAgencyId")String currentStaffAgencyId,
@Param("staffOrgPath") String staffOrgPath,
@Param("resultTableName")String resultTableName,
@Param("keyword") String keyword);
List<Map<String, Object>> selectListResiMap(@Param("customerId") String customerId,
@Param("formCode") String formCode,
@Param("conditions") List<ResiUserQueryValueDTO> conditions,
@Param("resultColumns") List<IcFormResColumnDTO> resultColumns,
@Param("subTables") List<String> subTables,
@Param("currentStaffAgencyId") String currentStaffAgencyId,
@Param("staffOrgPath") String staffOrgPath,
@Param("resultTableName") String resultTableName,
@Param("keyword") String keyword);
/**
* 查询主表
*
@ -237,15 +239,15 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
List<VolunteerDistributionResultDTO.Distribution> listIcResiInfosByUserIds(@Param("userIds") List<String> userIds);
Map<String, String> getCategoryListMap(@Param("columns")List<String> columns, @Param("icUserId") String icUserId);
Map<String, String> getCategoryListMap(@Param("columns") List<String> columns, @Param("icUserId") String icUserId);
Map<String, String> selectResiInfoMap(@Param("idCard") String idCard, @Param("resiId") String resiId);
List<Map<String,Object>> selectResiUsers(@Param("types")List<String> types,@Param("orgId")String orgId);
List<Map<String, Object>> selectResiUsers(@Param("types") List<String> types, @Param("orgId") String orgId);
List<String> icUserCustomerIds();
List<Map<String, String>> getIcUserList(@Param("customerId") String customerId, @Param("columns")List<String> columns);
List<Map<String, String>> getIcUserList(@Param("customerId") String customerId, @Param("columns") List<String> columns);
/**
* desc: 获取数据分析列中的 各类居民数据
@ -253,9 +255,9 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
* @param customerId
* @param tableName
* @param columnList
* @param id 非必填 leve有值时 必填
* @param level 非必填
* @return java.util.Map<java.lang.String,java.math.BigDecimal> 字段名数量
* @param id 非必填 leve有值时 必填
* @param level 非必填
* @return java.util.Map<java.lang.String, java.math.BigDecimal> 字段名数量
* @author LiuJanJun
* @date 2022/2/12 3:03 下午
*/
@ -264,10 +266,26 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
/**
* Desc: 根据房屋IDs查询房屋下是否有存在居民的
*
* @param ids
* @author zxc
* @date 2022/3/2 10:32 上午
*/
List<String> getExistUserByHouseIds(@Param("ids") List<String> ids);
/**
* 居民防疫信息查询
*
* @Param formDTO
* @Return {@link List< EpidemicPreventionResultDTO>}
* @Author zhaoqifeng
* @Date 2022/3/29 14:52
*/
List<EpidemicPreventionResultDTO> getEpidemicPreventionList(EpidemicPreventionFormDTO formDTO);
List<EpidemicPreventionResultDTO> natList(EpidemicPreventionFormDTO formDTO);
List<EpidemicPreventionResultDTO> vaccineList(EpidemicPreventionFormDTO formDTO);
IcResiUserEntity selectResiNoDelFlag(@Param("icResiUserId") String icResiUserId);
}

16
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiVaccineDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcResiVaccineEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 居民疫苗情况
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-28
*/
@Mapper
public interface IcResiVaccineDao extends BaseDao<IcResiVaccineEntity> {
}

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

@ -0,0 +1,45 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcTripReportRecordDTO;
import com.epmet.dto.form.PageTripReportFormDTO;
import com.epmet.entity.IcTripReportRecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 行程上报信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-25
*/
@Mapper
public interface IcTripReportRecordDao extends BaseDao<IcTripReportRecordEntity> {
/**
* 居民端小程序我的上报
* @param userId
* @param customerId
* @param idCard
* @return
*/
List<IcTripReportRecordDTO> selectMyReported(@Param("userId") String userId, @Param("customerId") String customerId, @Param("idCard") String idCard);
/**
* pc: 行程上报-列表
* @param formDTO
* @return
*/
List<IcTripReportRecordDTO> pageList(PageTripReportFormDTO formDTO);
/**
* pc:行程上报-删除
* @param userId
* @param agencyId
* @param ids
* @return
*/
int batchDel(@Param("userId")String userId,@Param("agencyId")String agencyId, @Param("ids")String[] ids);
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java

@ -90,4 +90,6 @@ public interface UserBaseInfoDao extends BaseDao<UserBaseInfoEntity> {
Integer selectCountIdNum(@Param("idNum") String idNum,
@Param("customerId")String customerId,
@Param("excludeUserId")String excludeUserId);
String selectIdCard(String userId);
}

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

Loading…
Cancel
Save