diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.26__alter_dict.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.26__alter_dict.sql new file mode 100644 index 0000000000..10b2bf3ea5 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.26__alter_dict.sql @@ -0,0 +1,30 @@ + +-- 相成的 +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1587017193115787265', 'dangerAreaLevel', '风险地区级别', '', 0, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:42:39', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:42:39'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1587017335055228929', 1587017193115787265, '低风险', '0', '0', '', 0, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:13', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:13'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1587017381859467265', 1587017193115787265, '中风险', '1', '0', '', 1, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:24', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:24'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1587017428642734082', 1587017193115787265, '高风险', '2', '0', '', 2, 0, 0, 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:35', 'ae867bb9d5c2760b3f090f3e3bcdf4c7', '2022-10-31 17:43:35'); + + + + + +-- 字典表新增数据【自己的】 +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000001', 'traffic_type', '交通方式', '交通方式【行程上报】', '36', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000002', 'sojourn_history', '7天内旅居史情况', '7天内旅居史情况【行程上报】', '37', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2100000000000000004', 'trip_data_type', '行程记录类型', '行程记录类型【行程上报】', '39', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); + + +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000001', '2100000000000000001', '飞机', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000002', '2100000000000000001', '动车', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000003', '2100000000000000001', '火车', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000004', '2100000000000000001', '自驾', '4', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5100000000000000005', '2100000000000000001', '其他', '5', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000001', '2100000000000000002', '高风险', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000002', '2100000000000000002', '中风险', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000003', '2100000000000000002', '低风险', '0', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5200000000000000004', '2100000000000000002', '无风险', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000001', '2100000000000000004', '省内', '1', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000002', '2100000000000000004', '省外', '2', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000003', '2100000000000000004', '市内', '3', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5400000000000000004', '2100000000000000004', '县内', '4', '0', '', '0', '0', '0', 'APP_USER', '2022-10-31 18:23:27', 'APP_USER', '2022-10-31 18:23:27'); diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java index 1dd825b18e..fb294721f8 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java @@ -99,6 +99,8 @@ public interface StrConstant { String PY_CUSTOMER = "6f203e30de1a65aab7e69c058826cd80"; //平音客户跟组织Id String PY_ROOT_AGENCY = "53613e1c5de6ed473467f0159a10b135"; + //磐石街道客户Id + String PS_CUSTOMER_ID = "1580460084738760705"; /** * 单位积分,积分上限,积分说明,积分事件 diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index 07d47ba7b0..a07838684d 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -29,6 +29,11 @@ public enum DictTypeEnum { IC_DANGER_TYPE("ic_danger_type","危化品种类",24), POLICY_LEVEL("policy_level","政策级别",25), LOG_TYPE("log_type", "日志类型", 33), + + DANGER_AREA_LEVEL_TYPE("dangerAreaLevel", "风险地区等级", 34), + TRAFFIC_TYPE("traffic_type", "交通方式", 36), + SOJOURN_HISTORY("sojourn_history", "7天内旅居史情况", 37), + TRIP_DATA_TYPE("trip_data_type", "行程记录类型", 39), ; private final String code; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 46e02f1d12..0463d290a2 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -271,6 +271,8 @@ public enum EpmetErrorCode { SAMPLE_TIME_AND_RESULT_IS_NULL_ERROR(8934,"检测时间或结果不能为空"), ID_CARD_ERROR(8935,"请输入正确的身份证号或护照号"), + + DANGER_AREA_ERROR(8937,"风险地区已存在"), MISMATCH(10086,"人员与房屋信息不匹配,请与工作人员联系。"), //通用错误码 start diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java index a3169a2ec6..1f1b9848b3 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java @@ -15,7 +15,6 @@ import java.lang.reflect.Field; import java.util.Arrays; import java.util.List; import java.util.Map; -import java.util.regex.Pattern; /** * desc:脱敏处理器 @@ -83,6 +82,9 @@ public class MaskProcessor { String maskResult = maskString((String) value, fieldsMaskType.get(index)); entry.setValue(maskResult); } + } else if (value instanceof List) { + // 列表 + ((List)value).forEach(e -> mask(e)); } } } @@ -155,10 +157,12 @@ public class MaskProcessor { // 2个字以上的,首位字母明文,中间* // 中文不能用\\w,要用[\u4e00-\u9fa5] if (length == 2) { - return originString.replaceAll("^([\\u4e00-\\u9fa5]).*$", "$1*"); +// return originString.replaceAll("^([\\u4e00-\\u9fa5]).*$", "$1*"); + return originString.substring(0).concat("*"); } else { String maskStr = StrUtil.repeat("*", length - 2); - return originString.replaceAll("^([\\u4e00-\\u9fa5]).*([\\u4e00-\\u9fa5])$", "$1" + maskStr + "$2"); +// return originString.replaceAll("^([\\u4e00-\\u9fa5]).*([\\u4e00-\\u9fa5])$", "$1" + maskStr + "$2"); + return originString.charAt(0) + maskStr + originString.charAt(originString.length() - 1); } } @@ -168,7 +172,7 @@ public class MaskProcessor { * @param originString * @return */ - private String maskIdCard(String originString) { + public static String maskIdCard(String originString) { IdCardRegexUtils regexUtil = IdCardRegexUtils.parse(originString); if (regexUtil == null) { @@ -209,14 +213,18 @@ public class MaskProcessor { } String maskStr = StrUtil.repeatByLength("*", length - 7); - + if (length != 11) { + return StringUtils.leftPad(StringUtils.right(originString, 4), length, "*"); + } return originString.replaceAll("^(1\\d{2})\\d*(\\d{4})$", new StringBuilder("$1").append(maskStr).append("$2").toString()); } public static void main(String[] args) { String[] idc = {"idCard"}; String[] idct = {MaskResponse.MASK_TYPE_ID_CARD}; - String r = new MaskProcessor(idc, idct).maskString("333333333333333333", MaskResponse.MASK_TYPE_ID_CARD); + String r = new MaskProcessor(idc, idct).maskString("王五(372284152412022222)", MaskResponse.MASK_TYPE_ID_CARD); System.out.println(r); + String s = MaskProcessor.maskIdCard("372284152412022222"); + System.out.println(s); } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java index 7a451a9f94..7815998386 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java @@ -1,6 +1,7 @@ package com.epmet.dataaggre.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.annotation.MaskResponse; import com.epmet.commons.tools.dto.result.ZhzlCategorySelectDTO; import com.epmet.commons.tools.enums.ZhzlResiCategoryEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; @@ -74,6 +75,7 @@ public class CoverageController { * @author zxc * @date 2022/7/26 16:29 */ + @MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE,MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("search") public Result coverageHomeSearch(@RequestBody CoverageHomeSearchFormDTO formDTO, @LoginUser TokenDto tokenDto){ formDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java index ff931888c3..f4553cd9b8 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java @@ -9,6 +9,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.processor.MaskProcessor; import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; @@ -670,7 +671,7 @@ public class CoverageServiceImpl implements CoverageService { return new CoverageAnalisisDataListResultDTO( re.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType, - re.getName().concat(StrConstant.BRACKET_LEFT).concat(re.getIdCard()).concat(StrConstant.BRACKET_RIGNT), + re.getName().concat(StrConstant.BRACKET_LEFT).concat(MaskProcessor.maskIdCard(re.getIdCard())).concat(StrConstant.BRACKET_RIGNT), coordinates[1], coordinates[0]); }).collect(Collectors.toList()); @@ -684,7 +685,7 @@ public class CoverageServiceImpl implements CoverageService { return new CoverageAnalisisDataListResultDTO( re.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType, - re.getName().concat(StrConstant.BRACKET_LEFT).concat(re.getIdNum()).concat(StrConstant.BRACKET_RIGNT), + re.getName().concat(StrConstant.BRACKET_LEFT).concat(MaskProcessor.maskIdCard(re.getIdNum())).concat(StrConstant.BRACKET_RIGNT), coordinates[1], coordinates[0]); }).collect(Collectors.toList()); @@ -1276,4 +1277,4 @@ public class CoverageServiceImpl implements CoverageService { } return resultList; } -} \ No newline at end of file +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerAgencyDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerAgencyDao.xml index 90f40009c2..262b5435d9 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerAgencyDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerAgencyDao.xml @@ -328,7 +328,7 @@ diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java index a8621ce09d..204845c1fb 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java @@ -21,6 +21,7 @@ public interface ImportTaskConstants { String BIZ_TYPE_IC_PARTY_MEMBER = "ic_party_member"; String BIZ_TYPE_IC_DANGEROUS_CHEMICALS = "ic_dangerous_chemicals"; String BIZ_TYPE_IC_ENTERPRISE="ic_enterprise"; + String BIZ_TYPE_IC_DANGER_AREA="ic_danger_area"; String IC_POINT_NUCLEIC_MONITORING = "ic_point_nucleic_monitoring"; String IC_POINT_VACCINES_INOCULATION = "ic_point_vaccines_inoculation"; // 新冠病毒疫苗接种人员信息台账 @@ -41,6 +42,10 @@ public interface ImportTaskConstants { * 行程上报 */ String BIZ_TYPE_IC_TRIP_REPORT = "ic_trip_report"; + /** + * 磐石-行程上报 + */ + String PS_BIZ_TYPE_IC_TRIP_REPORT = "ps_ic_trip_report"; /** * 处理状态:处理中 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java index 67b3c5da5a..38b63b836d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java @@ -89,6 +89,12 @@ public class IcPartyActivityController { return new Result().ok(data); } + /** + * 联建活动-新增 + * @param tokenDto + * @param dto + * @return + */ @PostMapping("save") @NoRepeatSubmit public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyActivityDTO dto){ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 8a0ba036ff..4545cb226b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -90,6 +90,12 @@ public class IcPartyUnitController { return new Result().ok(data); } + /** + * 联建单位新增 + * @param tokenDto + * @param dto + * @return + */ @PostMapping("save") @NoRepeatSubmit public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartyUnitDTO dto) { diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index e0cb649327..30fcd451c8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -124,4 +124,6 @@ public interface IcPartyUnitDao extends BaseDao { * @return */ List pageList(PartyUnitFormDTO formDTO); + + List getUnitNames(@Param("unitIds") List unitIds); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java index 1e1fd873c9..c01c80b4d4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.result.demand.ServiceItemResultDTO; import com.epmet.entity.IcServiceItemDictEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -36,4 +37,6 @@ public interface IcServiceItemDictDao extends BaseDao { List pageList(String customerId); IcServiceItemDictEntity selectMax(String customerId); + + String selectName(@Param("customerId") String customerId, @Param("categoryCode") String categoryCode); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index 8cc2d342a7..3ea2e48394 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -6,13 +6,12 @@ import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyUnitDTO; -import com.epmet.dto.form.PartyActivityFormDTO; -import com.epmet.dto.form.PartyTypepercentFormDTO; -import com.epmet.dto.form.PartyUnitFormDTO; -import com.epmet.dto.form.PartyUnitListFormDTO; -import com.epmet.dto.form.PartyUnitListbriefFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; -import com.epmet.dto.result.*; +import com.epmet.dto.result.CheckStaffInfoResultDTO; +import com.epmet.dto.result.PartyTypepercentResultDTO; +import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import org.springframework.web.multipart.MultipartFile; @@ -20,7 +19,6 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; -import java.util.Map; /** * 联建单位 @@ -181,4 +179,12 @@ public interface IcPartyUnitService extends BaseService { List getTypepercent(PartyTypepercentFormDTO form); void editPartyOrCommunity(CheckStaffInfoResultDTO formDTO); + + /** + * 查询联建单位名称, + * 不限制del_flag='0' + * @param unitIds + * @return + */ + List getUnitNames(List unitIds); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java index af01c8a4c3..6ed62cbdf2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java @@ -79,4 +79,6 @@ public interface IcServiceItemDictService extends BaseService option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + // Map option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); dtoList.forEach(dto -> { //联建单位ID与单位名匹配 List unitIds = Arrays.asList(dto.getUnitId().split(StrConstant.COMMA)); - List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); + // List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); + // if(CollectionUtils.isEmpty(unitNames)){ + List unitNames=icPartyUnitService.getUnitNames(unitIds); + // } + dto.setUnitIdList(unitIds); dto.setUnitName(StringUtils.join(unitNames, StrConstant.COMMA)); + dto.setUnitNameList(unitNames); if (StringUtils.isNotEmpty(dto.getGridId())) { GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(dto.getGridId()); if (null != gridInfo) { @@ -132,6 +137,20 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl serviceMatterid = Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA)); + List serviceMatterNameList=new ArrayList<>(); + for(String id:serviceMatterid){ + String categoryName=icServiceItemDictService.getCategoryName(dto.getCustomerId(),id); + if(StringUtils.isNotBlank(categoryName)){ + serviceMatterNameList.add(categoryName); + } + } + dto.setServiceMatterList(serviceMatterid); + dto.setServiceMatterNameList(serviceMatterNameList); + dto.setServiceMatterName(StringUtils.join(serviceMatterNameList, StrConstant.COMMA)); + } }); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 7a07763ea1..0f31a1287d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -43,6 +43,7 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ExcelPoiUtils; import com.epmet.commons.tools.utils.Result; @@ -75,6 +76,7 @@ import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.lang3.StringUtils; import org.apache.http.entity.ContentType; import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; @@ -114,7 +116,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl search(PartyUnitFormDTO formDTO) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); @@ -329,11 +332,18 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl option(IcPartyUnitDTO dto) { - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()); - wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); - wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter()); - List list = baseDao.selectList(wrapper); + // LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + // wrapper.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()); + // wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); + // wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter()); + // List list = baseDao.selectList(wrapper); + // 改成查询当前组织及下级的数据 + String customerId = loginUserUtil.getLoginUserCustomerId(); + PartyUnitFormDTO partyUnitFormDTO = new PartyUnitFormDTO(); + partyUnitFormDTO.setCustomerId(customerId); + partyUnitFormDTO.setAgencyId(dto.getAgencyId()); + partyUnitFormDTO.setServiceMatter(dto.getServiceMatter()); + List list = baseDao.pageList(partyUnitFormDTO); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } @@ -768,4 +778,18 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl getUnitNames(List unitIds) { + if(CollectionUtils.isEmpty(unitIds)){ + return new ArrayList<>(); + } + return baseDao.getUnitNames(unitIds); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java index 3fbda7cd37..a34bb83907 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java @@ -201,5 +201,8 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl order by u.CREATED_TIME desc + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml index 787ccb9d66..4582741dbb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml @@ -31,4 +31,14 @@ order by CATEGORY_CODE desc limit 1 + + \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java index cc94cd91f0..69de505fed 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java @@ -59,6 +59,22 @@ public class GovMenuController { return new Result(); } + /** + * 疯狂家按钮,我要写个接口批量赠.... + * @param formList + * @param tokenDto + * @return + */ + @PostMapping("batch-save") + public Result save(@RequestBody List formList, @LoginUser TokenDto tokenDto){ + //效验数据 + ValidatorUtils.validateEntity(formList, AddGroup.class, DefaultGroup.class); + for(GovMenuDTO dto:formList){ + govMenuService.save(dto,tokenDto); + } + return new Result(); + } + @PutMapping public Result update(@RequestBody GovMenuDTO dto, @LoginUser TokenDto tokenDto){ //效验数据 @@ -106,6 +122,7 @@ public class GovMenuController { /** * 导航 + * +数字社区-系统管理-角色管理配置角色权限,也会调用此接口 * @param tokenDto token * @return List */ diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java index a413c9dfdc..3f7dfdcbc4 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java @@ -234,13 +234,22 @@ public class GovMenuServiceImpl extends BaseServiceImpl navDigitalCommunity(TokenDto tokenDto, String tableName) { tableName = getTableName(tableName); - List menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(), HttpContextUtils.getLanguage(),tableName); + List menuList=new ArrayList<>(); + if("gov_menu".equals(tableName)){ + // 管理平台菜单返回所有的 + menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(),null, HttpContextUtils.getLanguage(),tableName); + }else{ + //数据分析还是沿用原来的 + menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(), HttpContextUtils.getLanguage(),tableName); + } Result isRootManager = epmetUserOpenFeignClient.getIsRootManager(tokenDto.getUserId()); if (!isRootManager.success()){ throw new EpmetException("getIsRootManager method is failure"); @@ -249,6 +258,11 @@ public class GovMenuServiceImpl extends BaseServiceImpl govMenuDTOS = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); return TreeUtils.buildTree(govMenuDTOS); } + /*for(GovMenuEntity m:menuList){ + if("ic_resi_add".equals(m.getPermissions())){ + logger.info("1、菜单返回了新增居民"); + } + }*/ disposeGovMenu(menuList,tokenDto.getUserId()); Map> groupByStatus = menuList.stream().collect(Collectors.groupingBy(GovMenuEntity::getRoleStatus)); List dtoList = ConvertUtils.sourceToTarget(CollectionUtils.isEmpty(groupByStatus.get(true)) ? new ArrayList<>() : groupByStatus.get(true), GovMenuDTO.class); @@ -284,11 +298,17 @@ public class GovMenuServiceImpl extends BaseServiceImpl(); return; } + // logger.info("==roleIdList="+ JSON.toJSONString(roleIdList)); List menuIdsList = govRoleMenuDao.getMenuIdsList(roleIdList); if (CollectionUtils.isEmpty(menuIdsList)){ menuList = new ArrayList<>(); return; } + /*for(String mid:menuIdsList){ + if("1581827798717898754".equals(mid)){ + logger.info("2、角色也有此菜单"); + } + }*/ for (String id : menuIdsList) { for (GovMenuEntity m : menuList) { if (m.getId().equals(id)){ diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java index 3f7bae6b47..5b3be75aa5 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java @@ -18,7 +18,6 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; @@ -34,6 +33,8 @@ import com.epmet.redis.GovRoleRedis; import com.epmet.service.GovRoleMenuService; import com.epmet.service.GovRoleService; import com.epmet.service.GovRoleUserService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -64,11 +65,20 @@ public class GovRoleServiceImpl extends BaseServiceImpl page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, GovRoleDTO.class); + Integer pageNo = Integer.valueOf((String) params.get("pageNo")); + Integer pageSize = Integer.valueOf((String) params.get("pageSize")); + String id = (String) params.get(FieldConstant.ID_HUMP); + String name = (String) params.get(FieldConstant.NAME_HUMP); + String customerId = (String) params.get(FieldConstant.CUSTOMER_ID_HUMP); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id) + .like(StringUtils.isNotBlank(name), FieldConstant.NAME, name) + .eq(StringUtils.isNotBlank(customerId), FieldConstant.CUSTOMER_ID, customerId); + PageHelper.startPage(pageNo, pageSize); + List list = baseDao.selectList(wrapper); + List resList = ConvertUtils.sourceToTarget(list, GovRoleDTO.class); + PageInfo pageInfo = new PageInfo<>(resList); + return new PageData<>(resList, pageInfo.getTotal()); } @Override @@ -79,10 +89,10 @@ public class GovRoleServiceImpl extends BaseServiceImpl getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - String name = (String)params.get(FieldConstant.NAME_HUMP); - String customerId = (String)params.get(FieldConstant.CUSTOMER_ID_HUMP); + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String name = (String) params.get(FieldConstant.NAME_HUMP); + String customerId = (String) params.get(FieldConstant.CUSTOMER_ID_HUMP); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id).like(StringUtils.isNotBlank(name), FieldConstant.NAME, name) .eq(StringUtils.isNotBlank(customerId), FieldConstant.CUSTOMER_ID, customerId); @@ -101,7 +111,7 @@ public class GovRoleServiceImpl extends BaseServiceImpl and t1.type = #{type} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java index 3d86d05fb6..7b3933ad70 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java @@ -414,7 +414,7 @@ public class AgencyController { //获取AccessToken String accessToken = ThirdUtils.getAccessToken(tokenDto.getCustomerId()).getResiToken(); if (org.apache.commons.lang3.StringUtils.isBlank(accessToken)) { - log.warn("获取accessToken失败,customerId:{}", tokenDto.getCustomerId()); + log.error("获取accessToken失败,customerId:{}", tokenDto.getCustomerId()); throw new RenException("获取accessToken失败,customerId:{}", tokenDto.getCustomerId()); } CustomerAgencyDTO customerAgencyDTO = customerAgencyService.get(id); @@ -446,6 +446,7 @@ public class AgencyController { qrCodeMultipartFile.setOriginalFilename(originalFilename); Result uploadResult = ossFeignClient.uploadQrCode(qrCodeMultipartFile); if (!uploadResult.success()) { + log.error("调用oss服务上传活动居民信息录入码失败"); throw new RenException("调用oss服务上传活动居民信息录入码失败"); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index 10499f4b52..3cf98078f5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -766,6 +766,9 @@ public class AgencyServiceImpl implements AgencyService { } if (formDTO.getLevel().equals(OrgInfoConstant.AGENCY)) { CustomerAgencyEntity entity = customerAgencyDao.selectById(formDTO.getOrgId()); + if (null == entity) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "customer_agency is null orgId:" + formDTO.getOrgId(), "组织信息查询为空orgId:" + formDTO.getOrgId()); + } result = ConvertUtils.sourceToTarget(entity, MapOrgResultDTO.class); result.setName(entity.getOrganizationName()); result.setLevel(formDTO.getLevel()); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index c7bd63814f..5761c7bb7e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -5,6 +5,7 @@ import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.annotation.MaskResponse; import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; @@ -304,6 +305,7 @@ public class IcEventController { * @Author sun * @Description 事件管理-详情 **/ + @MaskResponse(fieldNames = { "idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_ID_CARD }) @PostMapping("detail") public Result detail(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/controller/OperMenuController.java b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/controller/OperMenuController.java index c04455b92e..b9146e88ad 100644 --- a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/controller/OperMenuController.java +++ b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/controller/OperMenuController.java @@ -1,11 +1,9 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.exception.ErrorCode; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java index 8151e9c0b2..4c30471bc4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java @@ -124,7 +124,7 @@ public class IcExportTemplateServiceImpl extends BaseServiceImpl { if (formDTO.getName().equals(t.getName())) { - throw new EpmetException(9999, "当前组织下已存在相同名称的模板!", "当前组织下已存在相同名称的模板!"); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前组织下已存在相同名称的模板!", "当前组织下已存在相同名称的模板!"); } }); sort = templist.get(NumConstant.ZERO).getSort() + NumConstant.ONE; diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java index 9832a35e5e..d242b1b526 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java @@ -63,7 +63,8 @@ public class IcPartyMemberDTO implements Serializable { */ @NotBlank(message = "当前网格id不能为空",groups ={AddGroup.class, UpdateGroup.class}) private String mobile; - + private String showMobile; + private String showIdCard; /** * 身份证号 */ @@ -110,6 +111,21 @@ public class IcPartyMemberDTO implements Serializable { */ private String isDyzxh; + /** + * 入党时所在党支部 + */ + private String rdsszzb; + + /** + * 组织关系转入社区时间 + */ + private String zzgxzrsqsj; + + /** + * 是否请长假 + */ + private String isQcj; + /** * 是否免学习0否,1是 */ diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java index 5ded6b154c..c31343d3c1 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/form/IcPartyMemberFromDTO.java @@ -82,4 +82,8 @@ public class IcPartyMemberFromDTO extends PageFormDTO implements Serializable { private String payEndDate; private String year; private String month; + /** + * 是否请长假 + */ + private String isQcj; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java index 8862404285..0b18281ce5 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java @@ -101,24 +101,24 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl>().ok(page); } + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) public Result get(@LoginUser TokenDto tokenDto, @PathVariable("id") String id){ IcPartyMemberDTO data = icPartyMemberService.get(tokenDto, id); + if(null!=data){ + data.setShowMobile(data.getMobile()); + data.setShowIdCard(data.getIdCard()); + } return new Result().ok(data); } @NoRepeatSubmit diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java index 786f22d542..9f23510fa6 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartymemberStyleController.java @@ -89,6 +89,12 @@ public class IcPartymemberStyleController { return new Result().ok(data); } + /** + * 党员风采-新增 + * @param tokenDto + * @param dto + * @return + */ @PostMapping("save") @NoRepeatSubmit public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcPartymemberStyleDTO dto) { @@ -98,6 +104,11 @@ public class IcPartymemberStyleController { return new Result(); } + /** + * 党员风采-删除 + * @param dto + * @return + */ @PostMapping("delete") public Result delete(@RequestBody IcPartymemberStyleDTO dto) { //效验数据 diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyMemberEntity.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyMemberEntity.java index 1f6a367d80..1133a77bc1 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyMemberEntity.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyMemberEntity.java @@ -98,6 +98,21 @@ public class IcPartyMemberEntity extends BaseEpmetEntity { */ private String isDyzxh; + /** + * 入党时所在党支部 + */ + private String rdsszzb; + + /** + * 组织关系转入社区时间 + */ + private String zzgxzrsqsj; + + /** + * 是否请长假 + */ + private String isQcj; + /** * 是否免学习0否,1是 */ diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartyMemberImportExcel.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartyMemberImportExcel.java index ac937ae045..eca3bdef44 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartyMemberImportExcel.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/excel/IcPartyMemberImportExcel.java @@ -56,6 +56,15 @@ public class IcPartyMemberImportExcel { @ExcelProperty("文化程度") private String culture; + @ExcelProperty("入党时所在党支部") + private String rdsszzb; + + @ExcelProperty("组织关系转入社区时间") + private String zzgxzrsqsj; + + @ExcelProperty("是否请长假") + private String isQcj; + @ExcelProperty("备注") private String remark; diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java index 9685adfdd6..d9d43ea387 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyMemberServiceImpl.java @@ -13,7 +13,6 @@ import com.epmet.commons.tools.dto.form.DictListFormDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; -import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.enums.IcFormCodeEnum; import com.epmet.commons.tools.enums.PartyPostEnum; @@ -399,6 +398,9 @@ public class IcPartyMemberServiceImpl extends BaseServiceImpl AND a.IS_MXX = #{isMxx} + + AND a.IS_QCJ = #{isQcj} + AND a.CULTURE = #{culture} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeDeathDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeDeathDTO.java index 879732a1b4..f771404184 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeDeathDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeDeathDTO.java @@ -26,6 +26,11 @@ public class ChangeDeathDTO implements Serializable { */ private String id; + /** + * ic_resi_user主键 + */ + private String icResiUserId; + /** * epmet用户主键 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java index 088f8431d5..7db30e392b 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ChangeRelocationDTO.java @@ -24,6 +24,16 @@ public class ChangeRelocationDTO implements Serializable { */ private String id; + /** + * ic_resi_user主键 + */ + private String icResiUserId; + + /** + * ic_resi_user 用户状态 + */ + private String status; + /** * 姓名 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcBirthRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcBirthRecordDTO.java index 46bee9f321..6516b5161c 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcBirthRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcBirthRecordDTO.java @@ -25,6 +25,8 @@ public class IcBirthRecordDTO implements Serializable { */ private String id; + private String icResiUserId; + /** * 客户Id customer.id */ @@ -193,4 +195,4 @@ public class IcBirthRecordDTO implements Serializable { @JsonIgnore private Date updatedTime; -} \ No newline at end of file +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcDangerAreaDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcDangerAreaDTO.java new file mode 100644 index 0000000000..3d41095172 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcDangerAreaDTO.java @@ -0,0 +1,96 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; + +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + + +/** + * 疫情风险地区 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-10-31 + */ +@Data +public class IcDangerAreaDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 风险等级 + */ +// @NotBlank(message = "dangerLevel不能为空",groups = {AddGroup.class}) + private String dangerLevel; + + /** + * 省 + */ +// @NotBlank(message = "province不能为空",groups = {AddGroup.class}) + private String province; + + /** + * 市 + */ +// @NotBlank(message = "city不能为空",groups = {AddGroup.class}) + private String city; + + /** + * 区 + */ +// @NotBlank(message = "district不能为空",groups = {AddGroup.class}) + private String district; + + /** + * 省-市-区 + */ + @NotBlank(message = "allName不能为空",groups = {AddGroup.class}) + private String allName; + + private String allNameCode; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java index 5d880153a6..b2b8a7b95d 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java @@ -95,7 +95,7 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable { private String idCard; /** - * 原因 + * 关注原因;后磐石改名为隔离原因 */ @Length(max = 500,message = "原因限制500字以内",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class}) private String reason; @@ -106,6 +106,66 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable { @Length(max = 500,message = "备注限制500字以内",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class}) private String remark; + /** + * 管控开始时间yyyy-MM-dd,需求来源于磐石 + */ + private String gkStartTime; + + /** + * 管控结束时间yyyy-MM-dd,需求来源于磐石 + */ + private String gkEndTime; + + /** + * 镇(街)干部名称,需求来源于磐石 + */ + private String gbName; + + /** + * 镇(街)干部联系方式,需求来源于磐石 + */ + private String gbMobile; + + /** + * 村(社区)网格管理员,需求来源于磐石 + */ + private String gridManager; + + /** + * 村(社区)网格管理员联系方式,需求来源于磐石 + */ + private String gridManagerMobile; + + /** + * 基层医务工作者,需求来源于磐石 + */ + private String healthWorker; + + /** + * 基层医务工作者联系方式,需求来源于磐石 + */ + private String healthWorkerMobile; + + /** + * 民警,需求来源于磐石 + */ + private String policeName; + + /** + * 民警联系方式,需求来源于磐石 + */ + private String policeMobile; + + /** + * 志愿者,需求来源于磐石 + */ + private String volunteerName; + + /** + * 志愿者联系方式,需求来源于磐石 + */ + private String volunteerMobile; + /** * */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatCompareRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatCompareRecordDTO.java index be20e5fa68..4a8c8f2be6 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatCompareRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatCompareRecordDTO.java @@ -129,4 +129,9 @@ public class IcNatCompareRecordDTO implements Serializable { @ColumnWidth(30) @ExcelProperty("导入组织") private String agencyName; + + /** + * + */ + private String internalRemark; } \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java index 66c9828dfd..1e8da051b1 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java @@ -61,6 +61,15 @@ public class IcNatDTO implements Serializable { */ private String idCard; + /** + * 脱敏详情用 + */ + private String showMobile; + /** + * 脱敏详情用 + */ + private String showIdCard; + /** * 检测时间,精确到分钟 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java index 9d2ab97099..60491f0b17 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java @@ -66,14 +66,14 @@ public class IcTripReportRecordDTO implements Serializable { * 姓名 */ @ColumnWidth(15) - @ExcelProperty("姓名") + @ExcelProperty(value = "姓名") private String name; /** * 手机号 */ @ColumnWidth(15) - @ExcelProperty("手机号") + @ExcelProperty(value = "手机号") private String mobile; /** @@ -81,11 +81,16 @@ public class IcTripReportRecordDTO implements Serializable { */ private String realMobile; + /** + * 脱敏 + */ + private String showMobile; + /** * 身份证号 */ @ColumnWidth(22) - @ExcelProperty("身份证号") + @ExcelProperty(value = "证件号") private String idCard; /** @@ -93,6 +98,11 @@ public class IcTripReportRecordDTO implements Serializable { */ private String realIdCard; + /** + * 脱敏 + */ + private String showIdCard; + /** * 用户id */ @@ -121,14 +131,14 @@ public class IcTripReportRecordDTO implements Serializable { * 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 */ @ColumnWidth(50) - @ExcelProperty("现居地") + @ExcelProperty(value = "现居地") private String presentAddress; /** * 详细地址 */ @ColumnWidth(35) - @ExcelProperty("详细地址") + @ExcelProperty(value = "现居地详细地址") private String detailAddress; /** @@ -147,30 +157,30 @@ public class IcTripReportRecordDTO implements Serializable { * 来源地区地址 */ @ColumnWidth(50) - @ExcelProperty("来自地区") + @ExcelProperty(value = "来自地区") private String sourceAddress; /** * 到达日期 */ @ColumnWidth(25) - @ExcelProperty("来到本地时间") + @ExcelProperty(value = "来到本地时间") @JsonFormat(pattern = "yyyy-MM-dd") - private Date arriveDate; + private String arriveDate; /** * 离开日期 */ @ColumnWidth(25) - @ExcelProperty("离开本地时间") + @ExcelProperty(value = "离开本地时间") @JsonFormat(pattern = "yyyy-MM-dd") - private Date leaveDate; + private String leaveDate; /** * pc行程上报-列表返参:最近一次通知时间 */ @ColumnWidth(25) - @ExcelProperty("最近一次通知时间") + //@ExcelProperty("最近一次通知时间") @JsonFormat(pattern = "yyyy-MM-dd") private Date latestNoticeTime; @@ -178,7 +188,7 @@ public class IcTripReportRecordDTO implements Serializable { * 备注信息 */ @ColumnWidth(100) - @ExcelProperty("备注") + @ExcelProperty(value = "备注") private String remark; /** @@ -233,4 +243,136 @@ public class IcTripReportRecordDTO implements Serializable { @ColumnWidth(25) @ExcelProperty("核算检测关注名单") private String heSuanCheckDesc; + + /** + * 交通方式,来源字典表(traffic_type) + */ + @ExcelIgnore + private String trafficType; + /** + * 交通方式-中国字 + */ + @ExcelIgnore + private String trafficTypeName; + /** + * 其他返回方式,交通方式为其他时此列需要有值 + */ + @ExcelIgnore + private String trafficTypeExplain; + /** + * 来自地区详细地址 source_address字段的说明 + */ + @ExcelIgnore + private String sourceDetailAddress; + /** + * 疫苗接种针次 (0 1 2 3)【小寨子】 + */ + @ExcelIgnore + private String vaccineNum; + /** + * 疫苗接种针次 -中国字(0针 1针 2针 3针) + */ + @ExcelIgnore + private String vaccineNumName; + /** + * 是否有48小时核算记录 0:否 1:是 【小寨子】 + */ + @ExcelIgnore + private String isNatRecord; + /** + * 是否有48小时核算记录 0:否 1:是 【小寨子】-中国字 + */ + @ExcelIgnore + private String isNatRecordName; + /** + * 户籍地 【磐石】 + */ + @ExcelIgnore + private String registeredResidence; + /** + * 7天内到达或途径【磐石】 + */ + @ExcelIgnore + private String passBy; + /** + * 来曹事由【磐石】 + */ + @ExcelIgnore + private String describeContent; + /** + * 48小时核算检查结果(0:阴性 1:阳性)【磐石】 + */ + @ExcelIgnore + private String natOutcome; + /** + * 48小时核算检查结果(阴性 阳性)【磐石】-中国字 + */ + @ExcelIgnore + private String natOutcomeName; + /** + * 7天内旅居史情况,字典表(sojourn_history)【磐石】 + */ + @ExcelIgnore + private String sojournHistory; + /** + * 7天内旅居史情况,字典表(sojourn_history)【磐石】-中国字 + */ + @ExcelIgnore + private String sojournHistoryName; + /** + * 隔离状态,字典表(isolate_type)【磐石】 + */ + @ExcelIgnore + private String isolateType; + /** + * 隔离状态,字典表(isolate_type)【磐石】-中国字 + */ + @ExcelIgnore + private String isolateTypeName; + /** + * 是否落实"落地检" 0:否 1:是【磐石】 + */ + @ExcelIgnore + private String isArriveCheck; + /** + * 是否落实"落地检" 0:否 1:是【磐石】-中国字 + */ + @ExcelIgnore + private String isArriveCheckName; + /** + * 是否达到曹县 0:否 1:是【磐石】 + */ + @ExcelIgnore + private String isArrive; + /** + * 是否达到曹县 0:否 1:是【磐石】-中国字 + */ + @ExcelIgnore + private String isArriveName; + /** + * 上报时间【磐石】 + */ + @ExcelIgnore + @JsonFormat(pattern = "yyyy-MM-dd") + private String reportingTime; + /** + * 管控措施【磐石】 + */ + @ExcelIgnore + private String controlMeasures; + /** + * 行程记录类型,字典表(trip_data_type)【磐石】 + */ + @ExcelIgnore + private String tripDataType; + /** + * 行程记录类型,字典表(trip_data_type)【磐石】-中国字 + */ + @ExcelIgnore + private String tripDataTypeName; + /** + * 上报人姓名(createdBy对应人名) + */ + @ExcelIgnore + private String createdByName; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java index 115eeb2154..b9dca879b0 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java @@ -36,12 +36,12 @@ public class IcVaccineDTO implements Serializable { * 手机号 */ private String mobile; - + private String showMobile; /** * 身份证号 */ private String idCard; - + private String showIdCard; /** * 是否客户下居民(0:否 1:是) */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineRelationDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineRelationDTO.java index 7939293b5b..5fcb403a1e 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineRelationDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineRelationDTO.java @@ -50,6 +50,11 @@ public class IcVaccineRelationDTO implements Serializable { */ private String userType; + /** + * 是否本辖区居民,1:是;0:否 + */ + private String isLocalResiUser; + /** * 删除标识 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/YTVaccineListDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/YTVaccineListDTO.java new file mode 100644 index 0000000000..94b2b30418 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/YTVaccineListDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/11/11 15:05 + */ +@Data +public class YTVaccineListDTO implements Serializable { + private static final long serialVersionUID = -5583350277850076659L; + + private String idCard; + + /** + * 接种时间 + */ + private String inoculateDate; + + /** + * 接种地点 + */ + private String lastStationName; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BirthRecordListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BirthRecordListFormDTO.java new file mode 100644 index 0000000000..0fd1d33d65 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BirthRecordListFormDTO.java @@ -0,0 +1,78 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/5/10 10:02 + */ +@NoArgsConstructor +@Data +public class BirthRecordListFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = 5077167613040462646L; + /** + * 客户ID + */ + private String customerId; + private String staffId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 网格ID + */ + private String gridId; + /** + * 小区ID + */ + private String villageId; + /** + * 楼栋ID + */ + private String buildId; + /** + * 单元ID + */ + private String unitId; + /** + * 房屋ID + */ + private String homeId; + /** + * 姓名 + */ + private String name; + /** + * 手机 + */ + private String mobile; + /** + * 身份证 + */ + private String idCard; + /** + * 性别 + */ + private String gender; + /** + * 出生日开始 + */ + private String startTime; + /** + * 出生日期结束 + */ + private String endTime; + /** + * 是否福利 + */ + private String isWelfare; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DangerAreaListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DangerAreaListFormDTO.java new file mode 100644 index 0000000000..9071a4a1c7 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DangerAreaListFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/10/31 16:59 + */ +@Data +public class DangerAreaListFormDTO extends PageFormDTO implements Serializable { + private static final long serialVersionUID = 8868052895161162655L; + + private String name; + private String dangerLevel; + private String customerId; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DataSyncTaskParam.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DataSyncTaskParam.java index 215ffabf28..13a230c644 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DataSyncTaskParam.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DataSyncTaskParam.java @@ -49,4 +49,10 @@ public class DataSyncTaskParam implements Serializable { private String dataCode; private String staffId; + + /** + * nat:核酸检测; + * vaccine:疫苗接种 + */ + private String jobType; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripDetailFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripDetailFormDTO.java new file mode 100644 index 0000000000..b36ab7db3c --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripDetailFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/11/1 15:58 + */ +@Data +public class EmphasisTripDetailFormDTO implements Serializable { + private static final long serialVersionUID = 4725053371888196275L; + + public interface EmphasisTripDetailForm{} + + @NotBlank(message = "id不能为空",groups = {EmphasisTripDetailForm.class}) + private String id; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripListFormDTO.java new file mode 100644 index 0000000000..5f338be962 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripListFormDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/11/1 15:39 + */ +@Data +public class EmphasisTripListFormDTO extends PageFormDTO implements Serializable { + private static final long serialVersionUID = 5850717233738956442L; + + private String code; + private String name; + + private String dangerLevel; + + private String staffId; + private String customerId; + + private String agencyId; + + /** + * ic_trip_report_record.id + */ + private String id; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripPieDetailFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripPieDetailFormDTO.java new file mode 100644 index 0000000000..a6bc94b2ed --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EmphasisTripPieDetailFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/11/1 16:08 + */ +@Data +public class EmphasisTripPieDetailFormDTO implements Serializable { + private static final long serialVersionUID = 8822391154779579664L; + + public interface EmphasisTripPieDetailForm{} + +// @NotBlank(message = "code不能为空",groups = {EmphasisTripPieDetailForm.class}) + private String code; + private String name; + + private String customerId; + + private String staffId; + + private String agencyId; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java index 5c7a53e335..65f289cd46 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcTripReportFormDTO.java @@ -33,6 +33,10 @@ public class IcTripReportFormDTO implements Serializable { public interface PcUpdateRequired extends CustomerClientShowGroup { } + public interface PsAdd extends CustomerClientShowGroup { + } + public interface XzzAdd extends CustomerClientShowGroup { + } @NotBlank(message = "主键不能为空", groups = {PcUpdateRequired.class}) private String id; @@ -176,5 +180,79 @@ public class IcTripReportFormDTO implements Serializable { */ private String content = ""; + /** + * 交通方式,来源字典表(traffic_type) + */ + @NotBlank(message = "返回方式不能为空", groups = {PcAddRequired.class, ResiUserRequired.class}) + private String trafficType; + /** + * 其他返回方式,交通方式为其他时此列需要有值 + */ + private String trafficTypeExplain; + /** + * 来源地详细信息 source_address字段的说明 + */ + @NotBlank(message = "来自地区不能为空", groups = {PcAddRequired.class, ResiUserRequired.class}) + private String sourceDetailAddress; + /** + * 疫苗接种针次 (0针 1针 2针 3针)【小寨子】 + */ + @NotBlank(message = "疫苗接种针次不能为空", groups = {XzzAdd.class}) + private String vaccineNum; + /** + * 是否有48小时核算记录 0:否 1:是 【小寨子】 + */ + @NotBlank(message = "48小时核算记录不能为空", groups = {XzzAdd.class}) + private String isNatRecord; + /** + * 户籍地 【磐石】 + */ + @NotBlank(message = "户籍地不能为空", groups = {PsAdd.class}) + private String registeredResidence; + /** + * 7天内到达或途径【磐石】 + */ + private String passBy; + /** + * 来曹事由【磐石】 + */ + @NotBlank(message = "来曹事由不能为空", groups = {PsAdd.class}) + private String describeContent; + /** + * 48小时核算检查结果(阴性 阳性)【磐石】 + */ + @NotBlank(message = "48小时核算检测不能为空", groups = {PsAdd.class}) + private String natOutcome; + /** + * 7天内旅居史情况,字典表(sojourn_history)【磐石】 + */ + private String sojournHistory; + /** + * 隔离状态,字典表(isolate_type)【磐石】 + */ + private String isolateType; + /** + * 是否落实"落地检" 0:否 1:是【磐石】 + */ + private String isArriveCheck; + /** + * 是否达到曹县 0:否 1:是【磐石】 + */ + private String isArrive; + /** + * 上报时间【磐石】 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date reportingTime; + /** + * 管控措施【磐石】 + */ + private String controlMeasures; + /** + * 行程记录类型,字典表(trip_data_type)【磐石】 + */ + private String tripDataType; + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OnlyIdFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OnlyIdFormDTO.java new file mode 100644 index 0000000000..3e2501850d --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OnlyIdFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import java.io.Serializable; +import java.util.List; + +/** + * @author wgf + * @dscription + */ +@Data +public class OnlyIdFormDTO implements Serializable { + + private static final long serialVersionUID = -5220529162950147825L; + /** + * 主键 + */ + @NotBlank(message = "主键不能为空") + private String id; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java index 45f9152909..b28e494577 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java @@ -54,4 +54,15 @@ public class PageTripReportFormDTO extends PageFormDTO implements Serializable { * 查看详情时此列有值 */ private String id; + + /** + * 7天内旅居史情况,字典表(sojourn_history)【磐石】 + */ + private String sojournHistory; + + /** + * 隔离状态,字典表(isolate_type)【磐石】 + */ + private String isolateType; + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripListResultDTO.java new file mode 100644 index 0000000000..40ce0f9b38 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripListResultDTO.java @@ -0,0 +1,92 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/11/1 15:38 + */ +@Data +public class EmphasisTripListResultDTO implements Serializable { + private static final long serialVersionUID = -1646171374911115465L; + + private String id; + private String agencyId; + private String name; + private String mobile; + private String idCard; + + /** + * 来源地 + */ + private String sourceAddress; + private String sourceDetailAddress; + + /** + * 来曹事由 + */ + private String describeContent; + + /** + * 核酸检测结果 + */ + private String natOutcome; + private String natOutComeName; + + /** + * 7天旅居史 + */ + private String sojournHistory; + private String sojournHistoryName; + + /** + * 隔离状态 + */ + private String isolateType; + private String isolateTypeName; + + /** + * 来曹时间 + */ + private String arriveDate; + + /** + * 离开时间 + */ + private String leaveDate; + + /** + * 现居地 + */ + private String presentAddress; + + /** + * 详细地址 + */ + private String detailAddress; + + private String remark; + + /** + * 返回方式 + */ + private String trafficTypeName; + + /** + * 疫苗接种针次 + */ + private Integer vaccineNum; + + /** + * 交通方式 + */ + private String trafficType; + + /** + * 其他返回方式,交通方式为其他时此列需要有值 + */ + private String trafficTypeExplain; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripPieDetailResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripPieDetailResultDTO.java new file mode 100644 index 0000000000..cab03e4b11 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EmphasisTripPieDetailResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/11/1 16:06 + */ +@Data +public class EmphasisTripPieDetailResultDTO implements Serializable { + private static final long serialVersionUID = -7654816048391073022L; + + private String dangerLevelName; + private String dangerLevel; + private Integer total = NumConstant.ZERO; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java index 4946982090..f65d4f32cc 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java @@ -38,6 +38,15 @@ public class EpidemicPreventionResultDTO implements Serializable { */ private String idCard; + /** + * 脱敏详情用 + */ + private String showMobile; + /** + * 脱敏详情用 + */ + private String showIdCard; + private String birthDay; /** diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcMoveInListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcMoveInListResultDTO.java index 9ec9b5956d..d0be989687 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcMoveInListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcMoveInListResultDTO.java @@ -18,6 +18,12 @@ public class IcMoveInListResultDTO implements Serializable { * 迁入Id */ private String moveInId; + + /** + * ic_resi_user主键 + */ + private String icResiUserId; + /** * 网格ID */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java index 87480268cf..1764d1c61c 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcVaccineListResultDTO.java @@ -85,5 +85,12 @@ public class IcVaccineListResultDTO implements Serializable { @ExcelProperty(value = "疫苗厂家",order = 7) private String manufacturer; + /** + * 是否本辖区居民,1:是;0:否 + */ + @ExcelIgnore + private String isLocalResiUser; + + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatUserInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatUserInfoResultDTO.java index 5b0300f764..ef4b4e0eab 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatUserInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/NatUserInfoResultDTO.java @@ -29,6 +29,8 @@ public class NatUserInfoResultDTO implements Serializable { private String name; + private String mobile; + /** * 18大类 中 某一类的 是否值,用于比较 同步数据结果确定是否要插入到表中 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java index 7099e1650b..8fca1a32ce 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java @@ -42,7 +42,10 @@ public class VaccinationListResultDTO implements Serializable { * 真实手机号 */ private String realMobile; - + /** + * 脱敏详情用 + */ + private String showMobile; /** * 身份证 */ @@ -52,6 +55,10 @@ public class VaccinationListResultDTO implements Serializable { * 真实的身份证 */ private String realIdCard; + /** + * 脱敏详情用 + */ + private String showIdCard; private String sex; @@ -127,6 +134,100 @@ public class VaccinationListResultDTO implements Serializable { @JsonIgnore private String customerId; + /** + * 管控开始时间yyyy-MM-dd,需求来源于磐石 + * gkStartTime-gkEndTime + */ + private String gkTime; + + /** + * 管控开始时间yyyy-MM-dd,需求来源于磐石 + */ + private String gkStartTime; + + /** + * 管控结束时间yyyy-MM-dd,需求来源于磐石 + */ + private String gkEndTime; + + /** + * 镇(街)干部名称联系方式,需求来源于磐石 + * gbName+gbMobile + */ + private String gb; + + /** + * 镇(街)干部名称,需求来源于磐石 + */ + private String gbName; + + /** + * 镇(街)干部联系方式,需求来源于磐石 + */ + private String gbMobile; + + + /** + * 村(社区)网格管理员gridManager,需求来源于磐石 + * gridManager+gridManagerMobile + */ + private String gridManagerShow; + + /** + * 村(社区)网格管理员,需求来源于磐石 + */ + private String gridManager; + + /** + * 村(社区)网格管理员联系方式,需求来源于磐石 + */ + private String gridManagerMobile; + + /** + * 基层医务工作者联系方式,需求来源于磐石 + * healthWorker+healthWorkerMobile + */ + private String healthWorkerShow; + + /** + * 基层医务工作者,需求来源于磐石 + */ + private String healthWorker; + + /** + * 基层医务工作者联系方式,需求来源于磐石 + */ + private String healthWorkerMobile; + + /** + * 民警联系方式,需求来源于磐石 + * policeName+policeMobile + */ + private String policeShow; + /** + * 民警,需求来源于磐石 + */ + private String policeName; + + /** + * 民警联系方式,需求来源于磐石 + */ + private String policeMobile; + /** + * 志愿者+联系方式,需求来源于磐石 + */ + private String volunteerShow; + + /** + * 志愿者,需求来源于磐石 + */ + private String volunteerName; + + /** + * 志愿者联系方式,需求来源于磐石 + */ + private String volunteerMobile; + public VaccinationListResultDTO() { this.vaccinationCount = NumConstant.ZERO; this.name = ""; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index b24a4a9651..dab50be493 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -952,4 +952,7 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/dataSyncConfig/disabilityInfoScanTask") Result disabilityInfoScanTask(@RequestBody DataSyncTaskParam formDTO); + + @PostMapping("/epmetuser/dataSyncConfig/vaccineInfoScanTask") + Result vaccineInfoScanTask(@RequestBody DataSyncTaskParam formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index b675a7626b..8ac8382a78 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -741,4 +741,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result disabilityInfoScanTask(DataSyncTaskParam formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "disabilityInfoScanTask", formDTO); } + + @Override + public Result vaccineInfoScanTask(DataSyncTaskParam formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "vaccineInfoScanTask", formDTO); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/EpidemicConstant.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/EpidemicConstant.java index 0ad814d722..e2817f165c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/EpidemicConstant.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/EpidemicConstant.java @@ -7,12 +7,20 @@ public interface EpidemicConstant { * 核酸检测 * 残疾人 * 死亡 + * 疫苗接种 */ String DATA_CODE_NAT = "hesuan"; String DATA_CODE_DISABILITY = "canji"; String DATA_CODE_DEATH = "siwang"; + String DATA_CODE_VACCINE = "yimiaojiezhong"; + /** + * ic_sync_job 任务类型 + * 核酸检测 + * 疫苗接种 + */ String JOB_TYPE_NAT = "nat"; + String JOB_TYPE_VACCINE = "vaccine"; String OPERATION_STATUS_WAITING = "waiting"; String OPERATION_STATUS_PROCESSING = "processing"; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeDeathController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeDeathController.java index 963d2369d0..92cdab0235 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeDeathController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeDeathController.java @@ -13,6 +13,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.ChangeDeathDTO; +import com.epmet.dto.form.OnlyIdFormDTO; import com.epmet.excel.ChangeDeathExcel; import com.epmet.service.ChangeDeathService; import org.apache.commons.collections4.CollectionUtils; @@ -94,6 +95,20 @@ public class ChangeDeathController { ExcelUtils.exportEpmetExcel(response, null, list, ChangeDeathExcel.class); } + /** + * 恢复死亡人员 + * @param tokenDto + * @param dto + * @return + */ + @PostMapping("recovery") + public Result recovery(@LoginUser TokenDto tokenDto,@RequestBody OnlyIdFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + changeDeathService.recovery(tokenDto,dto); + return new Result(); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java index 1b84302742..6ac14fec7c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/ChangeRelocationController.java @@ -13,6 +13,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.ChangeRelocationDTO; +import com.epmet.dto.form.OnlyIdFormDTO; import com.epmet.excel.ChangeRelocationExcel; import com.epmet.service.ChangeRelocationService; import org.apache.commons.collections4.CollectionUtils; @@ -144,4 +145,18 @@ public class ChangeRelocationController { return new Result(); } + /** + * 恢复迁出人员 + * @param tokenDto + * @param dto + * @return + */ + @PostMapping("recovery") + public Result recovery(@LoginUser TokenDto tokenDto,@RequestBody OnlyIdFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + changeRelocationService.recovery(tokenDto,dto); + return new Result(); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/DataSyncConfigController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/DataSyncConfigController.java index cbbc409d6b..948471cbe3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/DataSyncConfigController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/DataSyncConfigController.java @@ -156,4 +156,16 @@ public class DataSyncConfigController { return new Result(); } + /** + * @Description 疫苗接种信息定时拉取 + * @param formDTO + * @Author zxc + * @Date 2022/11/11 16:56 + */ + @PostMapping("vaccineInfoScanTask") + public Result vaccineInfoScanTask(@RequestBody DataSyncTaskParam formDTO){ + dataSyncConfigService.vaccineInfoScanTask(formDTO); + return new Result(); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcBirthRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcBirthRecordController.java index 55e6f4cdc2..b9229eea74 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcBirthRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcBirthRecordController.java @@ -24,6 +24,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcBirthRecordDTO; import com.epmet.dto.form.BirthRecordFormDTO; import com.epmet.dto.form.BirthRecordUpdateDTO; +import com.epmet.dto.form.OnlyIdFormDTO; import com.epmet.excel.IcBirthRecordExcel; import com.epmet.service.IcBirthRecordService; import lombok.extern.slf4j.Slf4j; @@ -92,6 +93,14 @@ public class IcBirthRecordController { return new Result(); } + @PostMapping("deleteById") + public Result deleteById(@RequestBody OnlyIdFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icBirthRecordService.deleteById(dto.getId()); + return new Result(); + } + @NoRepeatSubmit @PostMapping("export") public void export(@LoginUser TokenDto tokenDto, @RequestBody BirthRecordFormDTO formDTO, HttpServletResponse response) throws Exception { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcDangerAreaController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcDangerAreaController.java new file mode 100644 index 0000000000..3d3fbd1cc7 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcDangerAreaController.java @@ -0,0 +1,222 @@ +package com.epmet.controller; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.*; +import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; +import com.epmet.commons.tools.feign.*; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.constants.ImportTaskConstants; +import com.epmet.dto.IcDangerAreaDTO; +import com.epmet.dto.form.DangerAreaListFormDTO; +import com.epmet.dto.form.ImportTaskCommonFormDTO; +import com.epmet.dto.result.ImportTaskCommonResultDTO; +import com.epmet.dto.result.NatListCommonExcelResultDTO; +import com.epmet.dto.result.NatListResultDTO; +import com.epmet.enums.DangerLevelEnum; +import com.epmet.excel.IcDangerAreaResultExcel; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.service.IcDangerAreaService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.io.IOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URLEncoder; +import java.nio.file.Path; +import java.util.List; +import java.util.Map; +import java.util.UUID; + + +/** + * 疫情风险地区 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-10-31 + */ +@RestController +@Slf4j +@RequestMapping("icDangerArea") +public class IcDangerAreaController implements ResultDataResolver{ + + @Autowired + private IcDangerAreaService icDangerAreaService; + @Autowired + private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icDangerAreaService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcDangerAreaDTO data = icDangerAreaService.get(id); + return new Result().ok(data); + } + + /** + * @Description 新增 + * @param dto + * @param tokenDto + * @Author zxc + * @Date 2022/11/1 09:09 + */ + @NoRepeatSubmit + @PostMapping("add") + public Result save(@RequestBody IcDangerAreaDTO dto, @LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setCustomerId(tokenDto.getCustomerId()); + icDangerAreaService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcDangerAreaDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icDangerAreaService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody List ids,@LoginUser TokenDto tokenDto){ + icDangerAreaService.delete(ids,tokenDto.getUserId()); + return new Result(); + } + + @RequestMapping("list") + public Result> list(@RequestBody DangerAreaListFormDTO formDTO,@LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(icDangerAreaService.list(formDTO)); + } + + @RequestMapping("export") + public void export(@LoginUser TokenDto tokenDto,@RequestBody DangerAreaListFormDTO formDTO,HttpServletResponse response){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + ExcelWriter excelWriter = null; + int pageNo = NumConstant.ONE; + formDTO.setPageSize(NumConstant.ONE_THOUSAND); + try { + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("风险地区", response), IcDangerAreaResultExcel.class).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); + Integer size; + do { + PageData list = icDangerAreaService.list(formDTO); + List data = list.getList(); + if (CollectionUtils.isNotEmpty(data)){ + data.forEach(d -> { + d.setDangerLevel(DangerLevelEnum.getNameByCode(d.getDangerLevel())); + }); + } + excelWriter.write(ConvertUtils.sourceToTarget(data,IcDangerAreaResultExcel.class), writeSheet); + formDTO.setPageNo(pageNo++); + size = data.size(); + } while (size == NumConstant.ONE_THOUSAND); + }catch (Exception e){ + log.error("export exception", e); + }finally { + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + + /** + * @Description 模板下载 + * @param response + * @Author zxc + * @Date 2022/11/1 09:52 + */ + @PostMapping("downloadTemplate") + public void downloadTemplate(HttpServletResponse response) throws IOException{ + response.setCharacterEncoding("UTF-8"); + response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); + response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("风险地区导入模板", "UTF-8") + ".xlsx"); + InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_danger_area_template.xlsx"); + try { + ServletOutputStream os = response.getOutputStream(); + IOUtils.copy(is, os); + } finally { + if (is != null) { + is.close(); + } + } + } + + @PostMapping("import") + public Result importExcel(@LoginUser TokenDto tokenDto, @RequestPart("file") MultipartFile file) { + String userId = EpmetRequestHolder.getHeader(AppClientConstant.USER_ID); + // 1.暂存文件 + String originalFilename = file.getOriginalFilename(); + String extName = originalFilename.substring(originalFilename.lastIndexOf(".")); + Path fileSavePath; + try { + Path importPath = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_danger_area", "import"); + fileSavePath = importPath.resolve(UUID.randomUUID().toString().concat(extName)); + } catch (IOException e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + log.error("【风险地区】创建临时存储文件失败:{}", errorMsg); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "文件上传失败", "文件上传失败"); + } + + InputStream is = null; + FileOutputStream os = null; + + try { + is = file.getInputStream(); + os = new FileOutputStream(fileSavePath.toString()); + IOUtils.copy(is, os); + } catch (Exception e) { + log.error("method exception", e); + } finally { + org.apache.poi.util.IOUtils.closeQuietly(is); + org.apache.poi.util.IOUtils.closeQuietly(os); + } + + // 2.生成导入任务记录 + ImportTaskCommonFormDTO importTaskForm = new ImportTaskCommonFormDTO(); + importTaskForm.setOperatorId(userId); + importTaskForm.setBizType(ImportTaskConstants.BIZ_TYPE_IC_DANGER_AREA); + importTaskForm.setOriginFileName(originalFilename); + + ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException(commonServiceOpenFeignClient.createImportTask(importTaskForm), + ServiceConstant.EPMET_COMMON_SERVICE, + EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), + "excel导入风险地区错误", + "风险地区导入失败"); + + // 3.执行导入 + icDangerAreaService.execAsyncExcelImport(fileSavePath, rstData.getTaskId(),tokenDto.getCustomerId(),tokenDto.getUserId()); + return new Result(); + } + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java index 695a739b89..b841e4b6af 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java @@ -91,6 +91,7 @@ public class IcEpidemicPreventionController{ * @Author zhaoqifeng * @Date 2022/3/29 16:13 */ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @PostMapping("detail") public Result detail(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java index 289bcc5505..f04dbe7ada 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java @@ -88,6 +88,7 @@ public class IcEpidemicSpecialAttentionController { * @author zxc * @date 2022/4/27 15:47 */ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @PostMapping("detail") public Result detail(@RequestBody AttentionDetailFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO,VaccinationListFormDTO.VaccinationListForm.class); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java index 7428da58be..b3b5d05816 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcFollowUpRecordController.java @@ -56,6 +56,11 @@ public class IcFollowUpRecordController { return new Result>().ok(page); } + /** + * 随访记录,查看详情 + * @param id + * @return + */ @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) public Result get(@PathVariable("id") String id){ IcFollowUpRecordDTO data = icFollowUpRecordService.get(id); @@ -86,6 +91,11 @@ public class IcFollowUpRecordController { return new Result(); } + /** + * 随访记录删除 + * @param ids + * @return + */ @PostMapping("delete") public Result delete(@RequestBody String[] ids){ //效验数据 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java index 18c40e286e..b11e6e369c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcMoveInRecordDTO; +import com.epmet.dto.form.OnlyIdFormDTO; import com.epmet.dto.form.IcMoveInAddEditFormDTO; import com.epmet.dto.form.IcMoveInListFormDTO; import com.epmet.dto.result.IcMoveInListResultDTO; @@ -95,6 +96,14 @@ public class IcMoveInRecordController { return new Result(); } + @PostMapping("deleteById") + public Result deleteById(@RequestBody OnlyIdFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icMoveInRecordService.deleteById(dto.getId()); + return new Result(); + } + @NoRepeatSubmit @PostMapping("export") public void export(@LoginUser TokenDto tokenDto, @RequestBody IcMoveInListFormDTO formDTO, HttpServletResponse response) throws IOException { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java index 00fa15ae2e..2ea3ea881b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java @@ -125,6 +125,7 @@ public class IcNatController implements ResultDataResolver { * @Author sun * @Description 【核酸】核酸检测信息详情 **/ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @NoRepeatSubmit @PostMapping("detail") public Result detail(@RequestBody MyNatListFormDTO formDTO) { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 701968bcf0..429585d104 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -426,6 +426,7 @@ public class IcResiUserController implements ResultDataResolver { * @author yinzuomei * @date 2021/10/28 10:29 上午 */ + @MaskResponse(fieldNames = {"MOBILE","ID_CARD"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("detail") public Result queryIcResiDetail(@LoginUser TokenDto tokenDto, @RequestBody IcResiDetailFormDTO pageFormDTO) { //pageFormDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); @@ -773,6 +774,7 @@ public class IcResiUserController implements ResultDataResolver { * @author zxc * @date 2021/11/3 9:21 上午 */ + @MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) @PostMapping("persondata") public Result personData(@LoginUser TokenDto tokenDto, @RequestBody PersonDataFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -802,6 +804,7 @@ public class IcResiUserController implements ResultDataResolver { * @param tokenDto * @return 根据分类搜索 */ + @MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("searchbycategory") public Result> search(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) { formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -914,7 +917,7 @@ public class IcResiUserController implements ResultDataResolver { * @Date 2021/12/10 17:54 */ @PostMapping("partymemberagelist") - @MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) + @MaskResponse(fieldNames = {"name","mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_CHINESE_NAME,MaskResponse.MASK_TYPE_MOBILE}) public Result> partyMemberAgelist(@RequestBody PartyMemberListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); return new Result>().ok(icResiUserService.getPartyMemberAgeList(formDTO)); @@ -993,7 +996,7 @@ public class IcResiUserController implements ResultDataResolver { * @Date 2021/12/10 17:58 */ @PostMapping("partymembereducationlist") - @MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) + @MaskResponse(fieldNames = {"name","mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_CHINESE_NAME,MaskResponse.MASK_TYPE_MOBILE}) public Result> partyMemberEducationlist(@RequestBody PartyMemberListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); return new Result>().ok(icResiUserService.getPartyMemberEducationList(formDTO)); @@ -1061,6 +1064,7 @@ public class IcResiUserController implements ResultDataResolver { * @param resiUserId * @return */ + @MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE,MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("resi-brief/{resi-user-id}") public Result getResiBrief(@PathVariable("resi-user-id") String resiUserId, @LoginUser TokenDto loginUser) { String customerId = loginUser.getCustomerId(); @@ -1435,6 +1439,7 @@ public class IcResiUserController implements ResultDataResolver { * @Author sun * @Description 【人房概览】居民统计数点击查询列表 **/ + @MaskResponse(fieldNames = {"mobile", "idCard"},fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("icuserstatislist") public Result> icUserStatisList(@LoginUser TokenDto tokenDto, @RequestBody UserChartFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java index aea630040c..0e149ed9df 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java @@ -9,10 +9,12 @@ import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; @@ -22,20 +24,23 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.IcResiUserConstant; import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcTripReportRecordDTO; -import com.epmet.dto.form.IcTripReportFormDTO; -import com.epmet.dto.form.ImportTaskCommonFormDTO; -import com.epmet.dto.form.MyReportedTripFormDTO; -import com.epmet.dto.form.PageTripReportFormDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.EmphasisTripListResultDTO; +import com.epmet.dto.result.EmphasisTripPieDetailResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; +import com.epmet.excel.IcPsTripReportRecordExportExcel; +import com.epmet.excel.IcTripReportRecordExportExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.IcTripReportRecordService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -88,6 +93,7 @@ public class IcTripReportRecordController implements ResultDataResolver { * @param formDTO * @return */ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @PostMapping("detail") public Result detail(@LoginUser TokenDto tokenDto,@RequestBody IcTripReportRecordDTO formDTO){ ValidatorUtils.validateEntity(formDTO,IcTripReportRecordDTO.DetailViewGroup.class); @@ -112,6 +118,16 @@ public class IcTripReportRecordController implements ResultDataResolver { if(IcResiUserConstant.USER_TYPE_IC_RESI.equals(formDTO.getUserType())){ ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.IcResiInternalGroup.class); } + //磐石客户 + if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){ + ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PsAdd.class); + }else { + ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.XzzAdd.class); + } + //校验参数 + if ("5".equals(formDTO.getTrafficType()) && StringUtils.isBlank(formDTO.getTrafficTypeExplain())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "返回方式为其他时,“其他返回方式”为必填", "返回方式为其他时,“其他返回方式”为必填"); + } String id=icTripReportRecordService.save(formDTO); return new Result().ok(id); } @@ -166,6 +182,16 @@ public class IcTripReportRecordController implements ResultDataResolver { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"请输入正确的证件号","请输入正确的证件号"); } } + //磐石客户 + if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){ + ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.PsAdd.class); + }else { + ValidatorUtils.validateEntity(formDTO,IcTripReportFormDTO.XzzAdd.class); + } + //校验参数 + if ("5".equals(formDTO.getTrafficType()) && StringUtils.isBlank(formDTO.getTrafficTypeExplain())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "返回方式为其他时,“其他返回方式”为必填", "返回方式为其他时,“其他返回方式”为必填"); + } return new Result().ok(icTripReportRecordService.resiSave(formDTO)); } @@ -217,8 +243,6 @@ public class IcTripReportRecordController implements ResultDataResolver { public void export(@LoginUser TokenDto tokenDto, @RequestBody PageTripReportFormDTO formDTO, HttpServletResponse response) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); - // formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); - // formDTO.setUserId("35005df15fb0f7c791344f0b424870b7"); formDTO.setIsPage(false); ExcelWriter excelWriter = null; formDTO.setPageSize(NumConstant.TEN_THOUSAND); @@ -227,13 +251,15 @@ public class IcTripReportRecordController implements ResultDataResolver { // 这里 需要指定写用哪个class去写 String today= DateUtils.format(new Date(),DateUtils.DATE_PATTERN_MMDD); String fileName = "行程上报信息".concat(today); - excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcTripReportRecordDTO.class).build(); + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcTripReportRecordExportExcel.class).build(); WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); PageData data = null; + List list = null; do { data = icTripReportRecordService.page(formDTO); + list = ConvertUtils.sourceToTarget(data.getList(), IcTripReportRecordExportExcel.class); formDTO.setPageNo(++pageNo); - excelWriter.write(data.getList(), writeSheet); + excelWriter.write(list, writeSheet); } while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize()); } catch (Exception e) { @@ -246,7 +272,6 @@ public class IcTripReportRecordController implements ResultDataResolver { } } - /** * 导入excel * @return @@ -300,4 +325,173 @@ public class IcTripReportRecordController implements ResultDataResolver { icTripReportRecordService.execAsyncExcelImport(fileSavePath, rstData.getTaskId(),tokenDto.getCustomerId(),tokenDto.getUserId()); return new Result(); } + + /** + * pc:磐石-行程上报-下载模板 + * @param response + * @throws IOException + */ + @RequestMapping(value = "psdownloadtemplate", method = {RequestMethod.GET, RequestMethod.POST}) + public void psDownloadTemplate(HttpServletResponse response) throws IOException { + response.setCharacterEncoding("UTF-8"); + response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); + //response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel"); + response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("行程上报导入模板", "UTF-8") + ".xlsx"); + + InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ps_trip_report_import_template.xlsx"); + try { + ServletOutputStream os = response.getOutputStream(); + IOUtils.copy(is, os); + } finally { + if (is != null) { + is.close(); + } + } + } + + /** + * 磐石-导入excel + * @return + */ + @PostMapping("psimport") + @Transactional(rollbackFor = Exception.class) + public Result psImportExcel(@LoginUser TokenDto tokenDto, HttpServletResponse response, @RequestPart("file") MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new RenException("请上传文件"); + } + // 1.暂存文件 + String originalFilename = file.getOriginalFilename(); + String extName = originalFilename.substring(originalFilename.lastIndexOf(".")); + Path fileSavePath; + try { + Path importPath = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_trip_preport", "import"); + fileSavePath = importPath.resolve(UUID.randomUUID().toString().concat(extName)); + } catch (IOException e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + log.error("【行程上报导入】创建临时存储文件失败:{}", errorMsg); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "文件上传失败", "文件上传失败"); + } + InputStream is = null; + FileOutputStream os = null; + try { + is = file.getInputStream(); + os = new FileOutputStream(fileSavePath.toString()); + IOUtils.copy(is, os); + } catch (Exception e) { + log.error("method exception", e); + } finally { + org.apache.poi.util.IOUtils.closeQuietly(is); + org.apache.poi.util.IOUtils.closeQuietly(os); + } + + //校验文件类型 + String extension = FilenameUtils.getExtension(file.getOriginalFilename()); + if (!"xls".equals(extension) && !"xlsx".equals(extension)) { + throw new RenException("文件类型不匹配"); + } + //2.查询当前工作人员是否有再导入的党员先锋数据,有则不允许导入,没有则进行新的导入 + ImportTaskCommonFormDTO importTaskForm = new ImportTaskCommonFormDTO(); + importTaskForm.setOriginFileName(file.getOriginalFilename()); + importTaskForm.setOperatorId(tokenDto.getUserId()); + importTaskForm.setBizType(ImportTaskConstants.PS_BIZ_TYPE_IC_TRIP_REPORT); + Result result = commonServiceOpenFeignClient.createImportTask(importTaskForm); + if (!result.success()) { + throw new RenException(result.getInternalMsg()); + } + InputStream inputStream = null; + try { + inputStream = file.getInputStream(); + }catch (Exception e){ + ImportTaskCommonFormDTO input = new ImportTaskCommonFormDTO(); + input.setOperatorId(tokenDto.getUserId()); + input.setTaskId(result.getData().getTaskId()); + input.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); + commonServiceOpenFeignClient.finishImportTask(input); + log.error("读取文件失败"); + } + //3.执行导入程序 + icTripReportRecordService.psExecAsyncExcelImport(fileSavePath, result.getData().getTaskId(),tokenDto); + + return new Result(); + } + + /** + * pc:磐石-行程上报-导出 + */ + @NoRepeatSubmit + @PostMapping("psexport") + public void psEexport(@LoginUser TokenDto tokenDto, @RequestBody PageTripReportFormDTO formDTO, HttpServletResponse response) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setIsPage(false); + ExcelWriter excelWriter = null; + formDTO.setPageSize(NumConstant.TEN_THOUSAND); + int pageNo = formDTO.getPageNo(); + try { + // 这里 需要指定写用哪个class去写 + String today= DateUtils.format(new Date(),DateUtils.DATE_PATTERN_MMDD); + String fileName = "行程上报信息".concat(today); + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcPsTripReportRecordExportExcel.class).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); + PageData data = null; + List list = null; + do { + data = icTripReportRecordService.page(formDTO); + list = ConvertUtils.sourceToTarget(data.getList(), IcPsTripReportRecordExportExcel.class); + formDTO.setPageNo(++pageNo); + excelWriter.write(list, writeSheet); + } while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize()); + + } catch (Exception e) { + log.error("export exception", e); + } finally { + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + + /** + * @Description 【重点行程名单】列表 + * @param tokenDto + * @param formDTO + * @Author zxc + * @Date 2022/11/1 15:43 + */ + @PostMapping("list") + @MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) + public Result> emphasisTripList(@LoginUser TokenDto tokenDto, @RequestBody EmphasisTripListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); + formDTO.setStaffId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(icTripReportRecordService.emphasisTripList(formDTO)); + } + + /** + * @Description 可视化重点行程名单统计-详情 已废弃不用这个接口了,改用管理平台详情 + * @param formDTO + * @Author zxc + * @Date 2022/11/1 16:05 + */ + @MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) + @PostMapping("emphasisTripDetail") + public Result emphasisTripDetail(@RequestBody EmphasisTripDetailFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, EmphasisTripDetailFormDTO.EmphasisTripDetailForm.class); + return new Result().ok(icTripReportRecordService.emphasisTripDetail(formDTO)); + } + + /** + * @Description 【重点行程名单】饼图详情 + * @param formDTO + * @Author zxc + * @Date 2022/11/1 16:09 + */ + @PostMapping("emphasisTripPieDetail") + public Result> emphasisTripPieDetail(@RequestBody EmphasisTripPieDetailFormDTO formDTO, @LoginUser TokenDto tokenDto){ + formDTO.setStaffId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(icTripReportRecordService.emphasisTripPieDetail(formDTO)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java index bb34afd612..cf78a5535a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java @@ -231,6 +231,7 @@ public class IcVaccineController implements ResultDataResolver { * @Author sun * @Description 疫苗接种情况-列表点击查询详情 **/ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @NoRepeatSubmit @PostMapping("detail") public Result detail(@RequestBody IcVaccineFormDTO formDTO) { @@ -276,5 +277,12 @@ public class IcVaccineController implements ResultDataResolver { return new Result<>(); } + @PostMapping("initVaccineLocal") + public Result initVaccineLocal(){ + icVaccineService.initVaccineLocal(); + return new Result(); + } + + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcBirthRecordDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcBirthRecordDao.java index f3cfc215ee..1d35ce2c12 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcBirthRecordDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcBirthRecordDao.java @@ -1,9 +1,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcBirthRecordDTO; +import com.epmet.dto.form.BirthRecordListFormDTO; import com.epmet.entity.IcBirthRecordEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 出生管理 * @@ -12,5 +16,7 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcBirthRecordDao extends BaseDao { - -} \ No newline at end of file + + List selectListByEntity(BirthRecordListFormDTO birthRecordListFormDTO); + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcDangerAreaDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcDangerAreaDao.java new file mode 100644 index 0000000000..e009c7e52e --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcDangerAreaDao.java @@ -0,0 +1,19 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcDangerAreaEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 疫情风险地区 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-10-31 + */ +@Mapper +public interface IcDangerAreaDao extends BaseDao { + + Integer delAllDangerArea(@Param("customerId")String customerId); + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java index 6d98de7a80..fc7a3ce96e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java @@ -2,7 +2,11 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcTripReportRecordDTO; +import com.epmet.dto.form.EmphasisTripListFormDTO; +import com.epmet.dto.form.EmphasisTripPieDetailFormDTO; import com.epmet.dto.form.PageTripReportFormDTO; +import com.epmet.dto.result.EmphasisTripListResultDTO; +import com.epmet.dto.result.EmphasisTripPieDetailResultDTO; import com.epmet.entity.IcTripReportRecordEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -42,4 +46,21 @@ public interface IcTripReportRecordDao extends BaseDao * @return */ int batchDel(@Param("userId")String userId,@Param("agencyId")String agencyId, @Param("ids")String[] ids); + + /** + * @Description 【重点行程名单】列表 + * @param formDTO + * @Author zxc + * @Date 2022/11/1 16:18 + */ + List emphasisTripList(EmphasisTripListFormDTO formDTO); + + /** + * @Description 【重点行程名单】饼图详情 + * @param formDTO + * @Author zxc + * @Date 2022/11/2 10:07 + */ + List emphasisTripPieDetail(EmphasisTripPieDetailFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java index 55b4591be3..54da37af06 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java @@ -3,10 +3,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcNatDTO; import com.epmet.dto.IcVaccineDTO; +import com.epmet.dto.YTVaccineListDTO; import com.epmet.dto.form.MyNatListFormDTO; import com.epmet.dto.form.VaccineListFormDTO; import com.epmet.dto.result.IcVaccineListResultDTO; import com.epmet.dto.result.MyNatListResultDTO; +import com.epmet.dto.result.RelationAndNatResultDTO; import com.epmet.entity.IcVaccineEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -72,4 +74,17 @@ public interface IcVaccineDao extends BaseDao { */ List getVaccineListByIdCard(@Param("idCard") String idCard,@Param("time") String time); + List initVaccineLocal(); + + void updateRelation(List list); + + void updateRelationOther(@Param("isLocalResiUser") String isLocalResiUser); + /** + * @Description 根据 身份证 + 疫苗接种时间 查询库里存在的 + * @param list + * @Author zxc + * @Date 2022/11/11 15:11 + */ + List getExistVaccine(@Param("list")List list); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcDangerAreaEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcDangerAreaEntity.java new file mode 100644 index 0000000000..e7a4968bea --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcDangerAreaEntity.java @@ -0,0 +1,56 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 疫情风险地区 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-10-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_danger_area") +public class IcDangerAreaEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 风险等级 + */ + private String dangerLevel; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区 + */ + private String district; + + /** + * 省-市-区 + */ + private String allName; + + private String allNameCode; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java index a22f3f3537..aa4e6052fd 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcEpidemicSpecialAttentionEntity.java @@ -73,14 +73,74 @@ public class IcEpidemicSpecialAttentionEntity extends BaseEpmetEntity { */ private String idCard; - /** - * 原因 - */ + /** + * 关注原因;后磐石改名为隔离原因 + */ private String reason; - /** - * 备注 - */ + /** + * 备注 + */ private String remark; + /** + * 管控开始时间yyyy-MM-dd,需求来源于磐石 + */ + private String gkStartTime; + + /** + * 管控结束时间yyyy-MM-dd,需求来源于磐石 + */ + private String gkEndTime; + + /** + * 镇(街)干部名称,需求来源于磐石 + */ + private String gbName; + + /** + * 镇(街)干部联系方式,需求来源于磐石 + */ + private String gbMobile; + + /** + * 村(社区)网格管理员,需求来源于磐石 + */ + private String gridManager; + + /** + * 村(社区)网格管理员联系方式,需求来源于磐石 + */ + private String gridManagerMobile; + + /** + * 基层医务工作者,需求来源于磐石 + */ + private String healthWorker; + + /** + * 基层医务工作者联系方式,需求来源于磐石 + */ + private String healthWorkerMobile; + + /** + * 民警,需求来源于磐石 + */ + private String policeName; + + /** + * 民警联系方式,需求来源于磐石 + */ + private String policeMobile; + + /** + * 志愿者,需求来源于磐石 + */ + private String volunteerName; + + /** + * 志愿者联系方式,需求来源于磐石 + */ + private String volunteerMobile; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPartyMemberEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPartyMemberEntity.java index 10add799d0..07ca2844b1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPartyMemberEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPartyMemberEntity.java @@ -85,6 +85,21 @@ public class IcPartyMemberEntity extends BaseEpmetEntity { */ private String isDyzxh; + /** + * 入党时所在党支部 + */ + private String rdsszzb; + + /** + * 组织关系转入社区时间 + */ + private String zzgxzrsqsj; + + /** + * 是否请长假 + */ + private String isQcj; + /** * 预留字段1 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java index 7182332216..3ab91a19b5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java @@ -115,4 +115,69 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { */ private String remark; + /** + * 交通方式,来源字典表(traffic_type) + */ + private String trafficType; + /** + * 其他返回方式,交通方式为其他时此列需要有值 + */ + private String trafficTypeExplain; + /** + * 来源地详细信息 source_address字段的说明 + */ + private String sourceDetailAddress; + /** + * 疫苗接种针次 (0针 1针 2针 3针)【小寨子】 + */ + private String vaccineNum; + /** + * 是否有48小时核算记录 0:否 1:是 【小寨子】 + */ + private String isNatRecord; + /** + * 户籍地 【磐石】 + */ + private String registeredResidence; + /** + * 7天内到达或途径【磐石】 + */ + private String passBy; + /** + * 来曹事由【磐石】 + */ + private String describeContent; + /** + * 48小时核算检查结果(0:阴性 1:阳性)【磐石】 + */ + private String natOutcome; + /** + * 7天内旅居史情况,字典表(sojourn_history)【磐石】 + */ + private String sojournHistory; + /** + * 隔离状态,字典表(isolate_type)【磐石】 + */ + private String isolateType; + /** + * 是否落实"落地检" 0:否 1:是【磐石】 + */ + private String isArriveCheck; + /** + * 是否达到曹县 0:否 1:是【磐石】 + */ + private String isArrive; + /** + * 上报时间【磐石】 + */ + private Date reportingTime; + /** + * 管控措施【磐石】 + */ + private String controlMeasures; + /** + * 行程记录类型,字典表(trip_data_type)【磐石】 + */ + private String tripDataType; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineEntity.java index b17256f3a0..2a1121de34 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineEntity.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import lombok.EqualsAndHashCode; @@ -61,6 +62,7 @@ public class IcVaccineEntity extends BaseEpmetEntity { /** * 接种时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") private Date inoculateTime; /** @@ -93,4 +95,10 @@ public class IcVaccineEntity extends BaseEpmetEntity { */ private String remark; + @TableField(exist = false) + private String agencyId; + + @TableField(exist = false) + private String pids; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineRelationEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineRelationEntity.java index d4cfb6ad48..cbacf0b140 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineRelationEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineRelationEntity.java @@ -49,4 +49,9 @@ public class IcVaccineRelationEntity extends BaseEpmetEntity { */ private String userType; + /** + * 是否本辖区居民,1:是;0:否 + */ + private String isLocalResiUser; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/DangerLevelEnum.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/DangerLevelEnum.java new file mode 100644 index 0000000000..9c3441043c --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/DangerLevelEnum.java @@ -0,0 +1,55 @@ +package com.epmet.enums; + +/** + * desc:数据同步配置枚举 对应data_sync_config中的DATA_CODE + * @author Administrator + */ + +public enum DangerLevelEnum { + + LOW("0", "低风险"), + MIDDLE("1", "中风险"), + HIGH("2", "高风险"), + OTHER("3", "无风险"), + + ; + + private final String code; + private final String name; + + + + DangerLevelEnum(String code, String name) { + this.code = code; + this.name = name; + } + + public static DangerLevelEnum getEnum(String code) { + DangerLevelEnum[] values = DangerLevelEnum.values(); + for (DangerLevelEnum value : values) { + if (value.getCode().equals(code)) { + return value; + } + } + return DangerLevelEnum.OTHER; + } + + public static String getNameByCode(String code) { + DangerLevelEnum[] values = DangerLevelEnum.values(); + for (DangerLevelEnum value : values) { + if (value.getCode().equals(code)) { + return value.getName(); + } + } + return DangerLevelEnum.OTHER.getName(); + } + + + public String getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/DataSyncEnum.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/DataSyncEnum.java index a3a66c4efc..438453f134 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/DataSyncEnum.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/enums/DataSyncEnum.java @@ -12,6 +12,7 @@ public enum DataSyncEnum { HE_SUAN("hesuan", "核酸检测数据"), CAN_JI("canji", "残疾数据"), SI_WANG("siwang", "死亡数据"), + VACCINE("yimiaojiezhong", "疫苗接种"), OTHER("qita","其他"), ; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaImportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaImportExcel.java new file mode 100644 index 0000000000..afee6099db --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaImportExcel.java @@ -0,0 +1,38 @@ +package com.epmet.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author zxc + * @DateTime 2022/11/1 11:18 + */ +@Data +public class IcDangerAreaImportExcel { + + @NotBlank(message = "风险地区为必填项") + @ExcelProperty("风险地区") + private String allName; + + @NotBlank(message = "风险等级为必填项") + @ExcelProperty("风险等级") + private String dangerLevel; + + @Data + public static class IcDangerAreaError{ + @ColumnWidth(30) + @ExcelProperty(value = "风险地区") + private String name; + + @ColumnWidth(20) + @ExcelProperty(value = "风险等级") + private String dangerLevel; + + @ColumnWidth(40) + @ExcelProperty(value = "错误信息") + private String errorInfo; + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaResultExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaResultExcel.java new file mode 100644 index 0000000000..6aa4f89e5b --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcDangerAreaResultExcel.java @@ -0,0 +1,22 @@ +package com.epmet.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import lombok.Data; + +/** + * @Author zxc + * @DateTime 2022/11/1 10:26 + */ +@Data +public class IcDangerAreaResultExcel { + + @ColumnWidth(40) + @ExcelProperty(value = "风险地区") + private String allName; + + @ColumnWidth(20) + @ExcelProperty(value = "风险等级") + private String dangerLevel; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExcel.java new file mode 100644 index 0000000000..1c442cac62 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExcel.java @@ -0,0 +1,105 @@ +package com.epmet.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; + +/** + * 磐石-行程上报信息 + * + */ +@Data +public class IcPsTripReportRecordExcel { + + @ExcelProperty("姓名") + @NotBlank(message = "姓名不能为空") + private String name; + + @ExcelProperty("证件号") + @NotBlank(message = "证件号不能为空") + private String idCard; + + @ExcelProperty("户籍地(省市县区)") + @NotBlank(message = "户籍地不能为空") + private String registeredResidence; + + @ExcelProperty("手机号") + @NotBlank(message = "手机号不能为空") + private String mobile; + + @ExcelProperty("来自地区(格式:省-市-区-街道-社区)") + @NotBlank(message = "来自地区不能为空") + private String sourceAddress; + @ExcelProperty("来自地区详细地址") + @NotBlank(message = "来自地区详细地址不能为空") + private String sourceDetailAddress; + + @ExcelProperty("7天内到达或途径") + private String passBy; + + @ExcelProperty("来曹事由(100字以内)") + @NotBlank(message = "来曹事由不能为空") + @Length(max = 500,message = "来曹事由不能超过100字") + private String describeContent; + + @ExcelProperty("48小时核酸检测") + @NotBlank(message = "48小时核酸检测不能为空") + private String natOutcome; + + @ExcelProperty("来到本地时间\n" + + "(2022-01-01)") + //@NotBlank(message = "来到本地时间不能为空") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "来到本地时间为必填项") + private Date arriveDate; + + @ExcelProperty("现居地") + @NotBlank(message = "现居地不能为空") + private String presentAddress; + @ExcelProperty("现居地详细地址") + @NotBlank(message = "现居地详细地址不能为空") + private String detailAddress; + + @ExcelProperty("返回方式") + @NotBlank(message = "返回方式不能为空") + private String trafficType; + @ExcelProperty("其他返回方式") + private String trafficTypeExplain; + + @ExcelProperty("7天内旅居史情况") + private String sojournHistory; + + @ExcelProperty("隔离状态") + private String isolateType; + + @ExcelProperty("备注(500字以内)") + @Length(max = 500,message = "备注不能超过500字") + private String remark; + + @ExcelProperty("是否落实“落地检”") + private String isArriveCheck; + + @ExcelProperty("是否达到曹县") + private String isArrive; + + /*@ExcelProperty("上报时间\n" + + "(2022-01-01)") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date reportingTime;*/ + + @ExcelProperty("管控措施\n" + + "(500字以内)") + @Length(max = 500,message = "管控措施不能超过500字") + private String controlMeasures; + + @ExcelProperty("类型\n" + + "(省内、省外、市内、县内)") + private String tripDataType; + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExportExcel.java new file mode 100644 index 0000000000..f036e4a185 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPsTripReportRecordExportExcel.java @@ -0,0 +1,156 @@ +package com.epmet.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.HeadStyle; +import com.alibaba.excel.enums.poi.FillPatternTypeEnum; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; + + +/** + * 磐石-行程上报信息-导出 + * + */ +@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) +@Data +public class IcPsTripReportRecordExportExcel implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 姓名 + */ + @ColumnWidth(12) + @ExcelProperty(value = "姓名", order = 1) + private String name; + /** + * 证件号 + */ + @ColumnWidth(20) + @ExcelProperty(value = "证件号", order = 2) + private String idCard; + /** + * 户籍地 【磐石】 + */ + @ColumnWidth(28) + @ExcelProperty(value = "户籍地(省市县区)", order = 3) + private String registeredResidence; + /** + * 手机号 + */ + @ColumnWidth(15) + @ExcelProperty(value = "手机号", order = 4) + private String mobile; + /** + * 来自地区(格式:省-市-区-街道-社区) + */ + @ColumnWidth(30) + @ExcelProperty(value = "来自地区(格式:省-市-区-街道-社区)",order = 5) + private String sourceAddress; + /** + * 来自地区详细地址 source_address字段的说明 + */ + @ColumnWidth(30) + @ExcelProperty(value = "来自地区详细地址",order = 6) + private String sourceDetailAddress; + /** + * 7天内到达或途径【磐石】 + */ + @ColumnWidth(25) + @ExcelProperty(value = "7天内到达或途径") + private String passBy; + /** + * 来曹事由(100字以内)【磐石】 + */ + @ColumnWidth(25) + @ExcelProperty(value = "来曹事由(100字以内)") + private String describeContent; + /** + * 48小时核酸检测 0:阴性 1:阳性 -中国字 + */ + @ColumnWidth(20) + @ExcelProperty(value = "48小时核酸检测",order = 8) + private String isNatRecordName; + /** + * 来到本地时间(2022-01-01) + */ + @ColumnWidth(20) + @ExcelProperty(value = "来到本地时间(2022-01-01)",order = 9) + @JsonFormat(pattern = "yyyy-MM-dd") + private String arriveDate; + /** + * 现居地 + */ + @ColumnWidth(30) + @ExcelProperty(value = "现居地",order = 10) + private String presentAddress; + /** + * 现居地详细地址 + */ + @ColumnWidth(30) + @ExcelProperty(value = "现居地详细地址",order = 11) + private String detailAddress; + /** + * 交通方式-中国字 + */ + @ColumnWidth(15) + @ExcelProperty(value = "返回方式",order = 12) + private String trafficTypeName; + /** + * 其他返回方式,交通方式为其他时此列需要有值 + */ + @ColumnWidth(18) + @ExcelProperty(value = "其他返回方式",order = 13) + private String trafficTypeExplain; + /** + * 7天内旅居史情况,字典表(sojourn_history)【磐石】-中国字 + */ + @ColumnWidth(20) + @ExcelProperty(value = "7天内旅居史情况",order = 14) + private String sojournHistoryName; + /** + * 隔离状态,字典表(isolate_type)【磐石】-中国字 + */ + @ColumnWidth(15) + @ExcelProperty(value = "隔离状态",order = 17) + private String isolateTypeName; + /** + * 备注(500字以内) + */ + @ColumnWidth(30) + @ExcelProperty(value = "备注(500字以内)",order = 16) + private String remark; + /** + * 是否落实"落地检" 0:否 1:是【磐石】-中国字 + */ + @ColumnWidth(20) + @ExcelProperty(value = "是否落实“落地检”",order = 17) + private String isArriveCheckName; + /** + * 是否达到曹县 0:否 1:是【磐石】-中国字 + */ + @ColumnWidth(20) + @ExcelProperty(value = "是否达到曹县",order = 18) + private String isArriveName; + /** + * 上报时间(2022-01-01)【磐石】 + */ + @ColumnWidth(20) + @ExcelProperty(value = "上报时间(2022-01-01)",order = 19) + @JsonFormat(pattern = "yyyy-MM-dd") + private String reportingTime; + /** + * 管控措施(500字以内)【磐石】 + */ + @ColumnWidth(30) + @ExcelProperty(value = "管控措施(500字以内)",order = 20) + private String controlMeasures; + /** + * 类型(省内、省外、市内、县内),字典表(trip_data_type)【磐石】-中国字 + */ + @ColumnWidth(25) + @ExcelProperty(value = "类型(省内、省外、市内、县内)",order = 21) + private String tripDataTypeName; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcTripReportRecordExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcTripReportRecordExportExcel.java new file mode 100644 index 0000000000..77754cdefd --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcTripReportRecordExportExcel.java @@ -0,0 +1,123 @@ +package com.epmet.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.HeadStyle; +import com.alibaba.excel.enums.poi.FillPatternTypeEnum; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 行程上报信息 + * + */ +@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) +@Data +public class IcTripReportRecordExportExcel implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * 姓名 + */ + @ColumnWidth(12) + @ExcelProperty(value = "姓名", order = 1) + private String name; + + /** + * 证件号 + */ + @ColumnWidth(20) + @ExcelProperty(value = "证件号",order = 2) + private String idCard; + + /** + * 手机号 + */ + @ColumnWidth(15) + @ExcelProperty(value = "手机号",order = 3) + private String mobile; + + /** + * 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 + */ + @ColumnWidth(30) + @ExcelProperty(value = "现居地",order = 4) + private String presentAddress; + + /** + * 详细地址 + */ + @ColumnWidth(30) + @ExcelProperty(value = "现居地详细地址",order = 5) + private String detailAddress; + + /** + * 来源地区地址 + */ + @ColumnWidth(30) + @ExcelProperty(value = "来自地区",order = 6) + private String sourceAddress; + + /** + * 来自地区详细地址 source_address字段的说明 + */ + @ColumnWidth(30) + @ExcelProperty(value = "来自地区详细地址",order = 7) + private String sourceDetailAddress; + + /** + * 到达日期 + */ + @ColumnWidth(20) + @ExcelProperty(value = "来到本地时间",order = 8) + @JsonFormat(pattern = "yyyy-MM-dd") + private String arriveDate; + + /** + * 交通方式-中国字 + */ + @ColumnWidth(15) + @ExcelProperty(value = "返回方式",order = 9) + private String trafficTypeName; + /** + * 其他返回方式,交通方式为其他时此列需要有值 + */ + @ColumnWidth(18) + @ExcelProperty(value = "其他返回方式",order = 10) + private String trafficTypeExplain; + + /** + * 是否有48小时核算记录 0:否 1:是 【小寨子】-中国字 + */ + @ColumnWidth(20) + @ExcelProperty(value = "48小时核酸检测",order = 11) + private String isNatRecordName; + + /** + * 疫苗接种针次 -中国字(0针 1针 2针 3针) + */ + @ColumnWidth(20) + @ExcelProperty(value = "疫苗接种针次",order = 12) + private String vaccineNumName; + + /** + * 离开日期 + */ + @ColumnWidth(15) + @ExcelProperty(value = "离开本地时间",order = 13) + @JsonFormat(pattern = "yyyy-MM-dd") + private String leaveDate; + + /** + * 备注信息 + */ + @ColumnWidth(30) + @ExcelProperty(value = "备注",order = 14) + private String remark; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java index c31e0f0cd0..b2ce2de153 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/ImportEpidemicSpecialAttention.java @@ -66,4 +66,75 @@ public class ImportEpidemicSpecialAttention extends ExcelVerifyInfo { @ExcelIgnore private Integer num; + /** + * 管控开始时间yyyy-MM-dd,需求来源于磐石 + */ + @Excel(name = "管控开始时间") + private String gkStartTime; + + /** + * 管控结束时间yyyy-MM-dd,需求来源于磐石 + */ + @Excel(name = "管控结束时间") + private String gkEndTime; + + /** + * 镇(街)干部名称,需求来源于磐石 + */ + @Excel(name = "镇(街)干部名称") + private String gbName; + + /** + * 镇(街)干部联系方式,需求来源于磐石 + */ + @Excel(name = "镇(街)干部联系方式") + private String gbMobile; + + /** + * 村(社区)网格管理员,需求来源于磐石 + */ + @Excel(name = "村(社区)网格管理员") + private String gridManager; + + /** + * 村(社区)网格管理员联系方式,需求来源于磐石 + */ + @Excel(name = "村(社区)网格管理员联系方式") + private String gridManagerMobile; + + /** + * 基层医务工作者,需求来源于磐石 + */ + @Excel(name = "基层医务工作者") + private String healthWorker; + + /** + * 基层医务工作者联系方式,需求来源于磐石 + */ + @Excel(name = "基层医务工作者联系方式") + private String healthWorkerMobile; + + /** + * 民警,需求来源于磐石 + */ + @Excel(name = "民警") + private String policeName; + + /** + * 民警联系方式,需求来源于磐石 + */ + @Excel(name = "民警联系方式") + private String policeMobile; + + /** + * 志愿者,需求来源于磐石 + */ + @Excel(name = "志愿者") + private String volunteerName; + + /** + * 志愿者联系方式,需求来源于磐石 + */ + @Excel(name = "志愿者联系方式") + private String volunteerMobile; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java index fd404ca278..4ff6036ea9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatExportExcel.java @@ -34,5 +34,76 @@ public class NatExportExcel { @Excel(name = "隔离状态",width = 20) private String isolatedState; + /** + * 管控开始时间yyyy-MM-dd,需求来源于磐石 + */ + @Excel(name = "管控开始时间",width = 30) + private String gkStartTime; + + /** + * 管控结束时间yyyy-MM-dd,需求来源于磐石 + */ + @Excel(name = "管控结束时间",width = 30) + private String gkEndTime; + + /** + * 镇(街)干部名称,需求来源于磐石 + */ + @Excel(name = "镇(街)干部名称",width = 30) + private String gbName; + + /** + * 镇(街)干部联系方式,需求来源于磐石 + */ + @Excel(name = "镇(街)干部联系方式",width = 30) + private String gbMobile; + + /** + * 村(社区)网格管理员,需求来源于磐石 + */ + @Excel(name = "村(社区)网格管理员",width = 30) + private String gridManager; + + /** + * 村(社区)网格管理员联系方式,需求来源于磐石 + */ + @Excel(name = "村(社区)网格管理员联系方式",width = 30) + private String gridManagerMobile; + + /** + * 基层医务工作者,需求来源于磐石 + */ + @Excel(name = "基层医务工作者",width = 30) + private String healthWorker; + + /** + * 基层医务工作者联系方式,需求来源于磐石 + */ + @Excel(name = "基层医务工作者联系方式",width = 30) + private String healthWorkerMobile; + + /** + * 民警,需求来源于磐石 + */ + @Excel(name = "民警",width = 30) + private String policeName; + + /** + * 民警联系方式,需求来源于磐石 + */ + @Excel(name = "民警联系方式",width = 30) + private String policeMobile; + + /** + * 志愿者,需求来源于磐石 + */ + @Excel(name = "志愿者",width = 30) + private String volunteerName; + + /** + * 志愿者联系方式,需求来源于磐石 + */ + @Excel(name = "志愿者联系方式",width = 30) + private String volunteerMobile; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatHistoryExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatHistoryExportExcel.java index 74bbd41676..76e4733310 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatHistoryExportExcel.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/NatHistoryExportExcel.java @@ -36,5 +36,76 @@ public class NatHistoryExportExcel { @Excel(name = "隔离状态",width = 20) private String isolatedState; + /** + * 管控开始时间yyyy-MM-dd,需求来源于磐石 + */ + @Excel(name = "管控开始时间",width = 30) + private String gkStartTime; + + /** + * 管控结束时间yyyy-MM-dd,需求来源于磐石 + */ + @Excel(name = "管控结束时间",width = 30) + private String gkEndTime; + + /** + * 镇(街)干部名称,需求来源于磐石 + */ + @Excel(name = "镇(街)干部名称",width = 30) + private String gbName; + + /** + * 镇(街)干部联系方式,需求来源于磐石 + */ + @Excel(name = "镇(街)干部联系方式",width = 30) + private String gbMobile; + + /** + * 村(社区)网格管理员,需求来源于磐石 + */ + @Excel(name = "村(社区)网格管理员",width = 30) + private String gridManager; + + /** + * 村(社区)网格管理员联系方式,需求来源于磐石 + */ + @Excel(name = "村(社区)网格管理员联系方式",width = 30) + private String gridManagerMobile; + + /** + * 基层医务工作者,需求来源于磐石 + */ + @Excel(name = "基层医务工作者",width = 30) + private String healthWorker; + + /** + * 基层医务工作者联系方式,需求来源于磐石 + */ + @Excel(name = "基层医务工作者联系方式",width = 30) + private String healthWorkerMobile; + + /** + * 民警,需求来源于磐石 + */ + @Excel(name = "民警",width = 30) + private String policeName; + + /** + * 民警联系方式,需求来源于磐石 + */ + @Excel(name = "民警联系方式",width = 30) + private String policeMobile; + + /** + * 志愿者,需求来源于磐石 + */ + @Excel(name = "志愿者",width = 30) + private String volunteerName; + + /** + * 志愿者联系方式,需求来源于磐石 + */ + @Excel(name = "志愿者联系方式",width = 30) + private String volunteerMobile; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java index f6f2a86e42..9981c1d03f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcTripReportExcelData.java @@ -2,6 +2,7 @@ package com.epmet.excel.data; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -19,8 +20,8 @@ public class IcTripReportExcelData { @ExcelProperty("姓名") private String name; - @NotBlank(message = "身份证号为必填项") - @ExcelProperty("身份证号") + @NotBlank(message = "证件号为必填项") + @ExcelProperty("证件号") private String idCard; @NotBlank(message = "手机号为必填项") @@ -31,19 +32,40 @@ public class IcTripReportExcelData { @ExcelProperty("现居地(格式:省-市-区-街道-社区)") private String presentAddress; - @NotBlank(message = "详细地址为必填项") - @ExcelProperty("详细地址") + @NotBlank(message = "现居地详细地址为必填项") + @ExcelProperty("现居地详细地址") private String detailAddress; @NotBlank(message = "来自地区为必填项") @ExcelProperty("来自地区(格式:省-市-区-街道-社区)") private String sourceAddress; + @NotBlank(message = "来自地区详细地址为必填项") + @ExcelProperty("来自地区详细地址") + private String sourceDetailAddress; + @NotNull(message = "来到本地时间为必填项") @ExcelProperty("来到本地时间(格式:2022-01-01)") + @JsonFormat(pattern = "yyyy-MM-dd") private Date arriveDate; + @ExcelProperty("返回方式") + @NotBlank(message = "返回方式不能为空") + private String trafficType; + + @ExcelProperty("其他返回方式") + private String trafficTypeExplain; + + @NotBlank(message = "48小时核酸检测为必填项") + @ExcelProperty("48小时核酸检测") + private String isNatRecord; + + @NotBlank(message = "疫苗接种针次为必填项") + @ExcelProperty("疫苗接种针次") + private String vaccineNum; + @ExcelProperty("离开本地时间(格式:2022-01-01)") + @JsonFormat(pattern = "yyyy-MM-dd") private Date leaveDate; /** @@ -61,7 +83,7 @@ public class IcTripReportExcelData { private String name; @ColumnWidth(20) - @ExcelProperty("身份证号") + @ExcelProperty("证件号") private String idCard; @ExcelProperty("手机号") diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/error/IcPsTripReportRecordErrorExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/error/IcPsTripReportRecordErrorExcel.java new file mode 100644 index 0000000000..4f569fd9c0 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/error/IcPsTripReportRecordErrorExcel.java @@ -0,0 +1,35 @@ +package com.epmet.excel.error; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.util.Date; + +/** + * 磐石-行程上报信息 + * + */ +@Data +public class IcPsTripReportRecordErrorExcel { + + @ExcelProperty("姓名") + @ColumnWidth(20) + private String name; + + @ColumnWidth(20) + @ExcelProperty("证件号") + private String idCard; + + @ExcelProperty("手机号") + @ColumnWidth(20) + private String mobile; + + @ColumnWidth(60) + @ExcelProperty("错误信息") + private String errorInfo; + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcDangerAreaExcelImportListener.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcDangerAreaExcelImportListener.java new file mode 100644 index 0000000000..03dcc4e1ae --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcDangerAreaExcelImportListener.java @@ -0,0 +1,137 @@ +package com.epmet.excel.handler; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.read.listener.ReadListener; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.exception.ValidateException; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dao.IcDangerAreaDao; +import com.epmet.entity.IcDangerAreaEntity; +import com.epmet.excel.IcDangerAreaImportExcel; +import com.epmet.service.IcDangerAreaService; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 核酸检测excel导入监听器 + */ +@Data +@Slf4j +public class IcDangerAreaExcelImportListener implements ReadListener { + + public static final int MAX_THRESHOLD = 200; + private String customerId = ""; + private Map dangerLevelMap = null; + private List datas = new ArrayList<>(); + private List errorRows = new ArrayList<>(); + + @Autowired + private IcDangerAreaService icDangerAreaService; + @Autowired + private IcDangerAreaDao icDangerAreaDao; + + public IcDangerAreaExcelImportListener(Map dangerLevelMap, String customerId, IcDangerAreaService icDangerAreaService, IcDangerAreaDao icDangerAreaDao) { + this.dangerLevelMap = dangerLevelMap; + this.customerId = customerId; + this.icDangerAreaService = icDangerAreaService; + this.icDangerAreaDao = icDangerAreaDao; + } + + @Override + public void invoke(IcDangerAreaImportExcel data, AnalysisContext context) { + try { + /*LambdaQueryWrapper qw = new LambdaQueryWrapper<>(); + qw.eq(IcDangerAreaEntity::getAllName,data.getAllName()); + IcDangerAreaEntity icDangerAreaEntity = icDangerAreaDao.selectOne(qw); + if (null != icDangerAreaEntity){ + throw new EpmetException(EpmetErrorCode.DANGER_AREA_ERROR.getCode()); + }*/ + ValidatorUtils.validateEntity(data); + IcDangerAreaEntity entity = ConvertUtils.sourceToTarget(data, IcDangerAreaEntity.class); + String[] split = data.getAllName().split("-"); + for (int i = NumConstant.ZERO; i < split.length; i++) { + switch (i){ + case NumConstant.ZERO: + entity.setProvince(split[i]); + break; + case NumConstant.ONE: + entity.setCity(split[i]); + break; + case NumConstant.TWO: + entity.setDistrict(split[i]); + break; + default: + break; + } + } + if (StringUtils.isBlank(entity.getProvince())){ + throw new EpmetException("省未填写"); + } + if (StringUtils.isBlank(entity.getCity())){ + throw new EpmetException("市未填写"); + } + if (StringUtils.isBlank(entity.getDistrict())){ + throw new EpmetException("区未填写"); + } + entity.setDangerLevel(dangerLevelMap.get(entity.getDangerLevel())); + entity.setCustomerId(customerId); + datas.add(entity); + if (datas.size() == MAX_THRESHOLD) { + execPersist(); + } + } catch (Exception e) { + String errorMsg = null; + if (e instanceof ValidateException) { + errorMsg = ((ValidateException) e).getMsg(); + } else { + log.warn("【风险地区信息导入】出错:{}", e.getStackTrace()); + errorMsg = ((EpmetException)e).getInternalMsg(); + log.warn("【风险地区信息导入】出错:{}", ExceptionUtils.getErrorStackTrace(e)); + } + IcDangerAreaImportExcel.IcDangerAreaError errorRow = new IcDangerAreaImportExcel.IcDangerAreaError(); + errorRow.setName(data.getAllName()); + errorRow.setDangerLevel(data.getDangerLevel()); + errorRow.setErrorInfo(errorMsg); + errorRows.add(errorRow); + } + } + + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + // 最后几条达不到阈值,这里必须再调用一次 + execPersist(); + } + + /** + * 执行持久化 + */ + private void execPersist() { + try { + if (CollectionUtils.isNotEmpty(datas)){ + icDangerAreaService.insertBatch(datas); + } + } finally { + datas.clear(); + } + } + + /** + * 获取错误行 + * @return + */ + public List getErrorRows() { + return errorRows; + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatCompareRecordExcelImportListener.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatCompareRecordExcelImportListener.java index 531e977ea7..3ebe113874 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatCompareRecordExcelImportListener.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcNatCompareRecordExcelImportListener.java @@ -228,9 +228,14 @@ public class IcNatCompareRecordExcelImportListener implements ReadListener { + + /** + * 最大条数阈值 + */ + public static final int MAX_THRESHOLD = 200; + /** + * 当前操作用户 + */ + private CustomerStaffInfoCacheResult staffInfo; + private String customerId; + //字典表数据 + private Map trafficTypeMap; + private Map sojournHistoryMap; + private Map isolateTypeMap; + private Map tripDataTypeMap; + private Map areaMap; + + /** + * 数据 + */ + private List datas = new ArrayList<>(); + + /** + * 错误项列表 + */ + private List errorRows = new ArrayList<>(); + + private IcTripReportRecordServiceImpl tripReportRecordService; + + public IcPsTripReportExcelImportListener(String customerId, CustomerStaffInfoCacheResult staffInfo, IcTripReportRecordServiceImpl tripReportRecordService, + Map trafficTypeMap, Map sojournHistoryMap, Map isolateTypeMap, Map tripDataTypeMap, Map areaMap) { + this.customerId=customerId; + this.staffInfo = staffInfo; + this.tripReportRecordService = tripReportRecordService; + this.trafficTypeMap = trafficTypeMap; + this.sojournHistoryMap = sojournHistoryMap; + this.isolateTypeMap = isolateTypeMap; + this.tripDataTypeMap = tripDataTypeMap; + this.areaMap = areaMap; + } + + @Override + public void invoke(IcPsTripReportRecordExcel data, AnalysisContext context) { + + try { + // 先校验数据 + ValidatorUtils.validateEntity(data); + + AtomicBoolean bl = new AtomicBoolean(false); + StringBuffer errMsg = new StringBuffer(""); + IcTripReportRecordEntity e = ConvertUtils.sourceToTarget(data, IcTripReportRecordEntity.class); + //先对一下字段值填写是否正确做判断 + if (!"阳性".equals(e.getNatOutcome()) && !"阴性".equals(e.getNatOutcome())) { + errMsg.append("‘48小时核酸检测’值填写错误;"); + bl.set(true); + } + if (!trafficTypeMap.containsKey(e.getTrafficType())) { + errMsg.append("‘返回方式’值填写错误;"); + bl.set(true); + } + if ("其他".equals(e.getTrafficType()) && StringUtils.isBlank(e.getTrafficTypeExplain())) { + errMsg.append("返回方式为其他时,请补充‘其他返回方式’;"); + bl.set(true); + } + if (StringUtils.isNotBlank(e.getSojournHistory()) && !sojournHistoryMap.containsKey(e.getSojournHistory())) { + errMsg.append("‘7天内旅居史情况’值填写错误;"); + bl.set(true); + } + if (StringUtils.isNotBlank(e.getIsolateType()) && !isolateTypeMap.containsKey(e.getIsolateType())) { + errMsg.append("‘隔离状态’值填写错误;"); + bl.set(true); + } + if (StringUtils.isNotBlank(e.getIsArriveCheck()) && !"是".equals(e.getIsArriveCheck()) && !"否".equals(e.getIsArriveCheck())) { + errMsg.append("‘是否落实“落地检”’值填写错误;"); + bl.set(true); + } + if (StringUtils.isNotBlank(e.getIsArrive()) && !"是".equals(e.getIsArrive()) && !"否".equals(e.getIsArrive())) { + errMsg.append("‘是否达到曹县’值填写错误;"); + bl.set(true); + } + if (StringUtils.isNotBlank(e.getTripDataType()) && !tripDataTypeMap.containsKey(e.getTripDataType())) { + errMsg.append("‘类型(省内、省外、市内、县内)’值填写错误;"); + bl.set(true); + } + /*//必要字段没值的 + if (StringUtils.isEmpty(e.getSourceAddress()) || StringUtils.isEmpty(e.getPresentAddress()) + || StringUtils.isEmpty(e.getTrafficType())) { + errMsg.append("数据不完整,请检查‘来源地’、‘在曹居住地点’、‘返回方式’信息是否填写完整;"); + bl.set(true); + }*/ + if (StringUtils.isNotBlank(data.getSojournHistory())) { + e.setSojournHistory(sojournHistoryMap.get(data.getSojournHistory())); + } else { + String[] str = e.getSourceAddress().split("-"); + if (str.length < 3) { + errMsg.append("数据不完整,‘来源地’信息填写格式错误;"); + bl.set(true); + } + e.setSojournHistory("3");//无风险 + if (areaMap.containsKey(str[2])) { + e.setSojournHistory(areaMap.get(str[2])); + } + } + //错误数据记录到错误文件 + if (bl.get()) { + IcPsTripReportRecordErrorExcel errorRow = new IcPsTripReportRecordErrorExcel(); + errorRow.setName(data.getName()); + errorRow.setMobile(data.getMobile()); + errorRow.setIdCard(data.getIdCard()); + errorRow.setErrorInfo(errMsg.toString()); + errorRows.add(errorRow); + return; + } + + e.setCustomerId(customerId); + e.setAgencyId(staffInfo.getAgencyId()); + e.setPids(staffInfo.getAgencyPIds()); + e.setUserType(IcResiUserConstant.USER_TYPE_IMPORT); + e.setNatOutcome("阳性".equals(e.getNatOutcome()) ? "1" : "0"); + if (trafficTypeMap.containsKey(data.getTrafficType())) { + e.setTrafficType(trafficTypeMap.get(data.getTrafficType())); + } + if (StringUtils.isNotBlank(data.getIsolateType())) { + e.setIsolateType(isolateTypeMap.get(data.getIsolateType())); + } + if (StringUtils.isNotBlank(data.getTripDataType())) { + e.setTripDataType(tripDataTypeMap.get(data.getTripDataType())); + } + e.setIsArriveCheck("是".equals(data.getIsArriveCheck()) ? "1" : "0"); + e.setIsArrive("是".equals(data.getIsArrive()) ? "1" : "0"); + e.setReportingTime(DateUtils.integrate(new Date(), "yyyy-MM-dd")); + datas.add(e); + + if (datas.size() == MAX_THRESHOLD) { + execPersist(); + } + } catch (Exception e) { + String errorMsg = null; + if (e instanceof ValidateException) { + errorMsg = ((ValidateException) e).getMsg(); + } else { + errorMsg = "未知错误"; + log.error("【行程上报导入】出错:{}", ExceptionUtils.getErrorStackTrace(e)); + } + + IcPsTripReportRecordErrorExcel errorRow = new IcPsTripReportRecordErrorExcel(); + errorRow.setName(data.getName()); + errorRow.setMobile(data.getMobile()); + errorRow.setIdCard(data.getIdCard()); + errorRow.setErrorInfo(errorMsg); + errorRows.add(errorRow); + } + } + + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + // 最后几条达不到阈值,这里必须再调用一次 + execPersist(); + } + + /** + * 执行持久化 + */ + private void execPersist() { + try { + if (datas != null && datas.size() > 0) { + tripReportRecordService.batchPersist(datas); + } + } finally { + datas.clear(); + } + } + + /** + * 获取错误行 + * @return + */ + public List getErrorRows() { + return errorRows; + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java index 2831eb532c..8f12de7564 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/handler/IcTripReportExcelImportListener.java @@ -12,9 +12,12 @@ import com.epmet.entity.IcTripReportRecordEntity; import com.epmet.excel.data.IcTripReportExcelData; import com.epmet.service.impl.IcTripReportRecordServiceImpl; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicBoolean; /** @@ -33,6 +36,8 @@ public class IcTripReportExcelImportListener implements ReadListener trafficTypeMap; /** * 数据 @@ -46,10 +51,11 @@ public class IcTripReportExcelImportListener implements ReadListener trafficTypeMap) { this.customerId=customerId; this.staffInfo = staffInfo; this.tripReportRecordService = tripReportRecordService; + this.trafficTypeMap = trafficTypeMap; } @Override @@ -58,13 +64,48 @@ public class IcTripReportExcelImportListener implements ReadListener executingListQuery = new LambdaQueryWrapper<>(); + executingListQuery.eq(IcSyncJobEntity::getOperationStatus, EpidemicConstant.OPERATION_STATUS_PROCESSING); + List executingJobList = icSyncJobDao.selectList(executingListQuery); + if (!CollectionUtils.isEmpty(executingJobList) && executingJobList.size() >= MAX_EXECUTING_COUNT) { + // 最多只允许同时3条线程运行 + return; + } + int executingCount = executingJobList.size(); + // 还可以运行几条线程 + int leftCount = MAX_EXECUTING_COUNT - executingCount; + RLock lock = null; + try { + lock = distributedLock.getLock("data:sync:" + JOB_TYPE_VACCINE, 60L, 60L, TimeUnit.SECONDS); + // 查询可执行的任务列表,并且异步执行 + List icSyncJobToExec = icSyncJobDao.selectExecutableJobList( + EpidemicConstant.JOB_TYPE_VACCINE, + leftCount); + if (!CollectionUtils.isEmpty(icSyncJobToExec)) { + // 异步提交任务 + for (IcSyncJobEntity jobEntity : icSyncJobToExec) { + updateJobStatus(jobEntity.getId(), EpidemicConstant.OPERATION_STATUS_PROCESSING); + executorService.submit(() -> { + // 将此任务状态修改为执行中 + try { + dataSyncConfigService.execSyncByJobProcessor(jobEntity); + } finally { + // 更新任务状态为结束 + updateJobStatus(jobEntity.getId(), EpidemicConstant.OPERATION_STATUS_FINISH); + } + }); + } + } + } catch (Exception e) { + log.error("【异步数据更新】出错:{}", ExceptionUtils.getErrorStackTrace(e)); + } finally { + if (lock != null) { + lock.unlock(); + } + } + } + + /** + * 更新任务状态 + * @author wxz + * @date 2022/11/8 下午8:25 + * @param id + * @param status + + */ + private void updateJobStatus(String id, String status) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(IcSyncJobEntity::getId, id); + + IcSyncJobEntity updateEntity = new IcSyncJobEntity(); + updateEntity.setOperationStatus(status); + icSyncJobDao.update(updateEntity, query); + } + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeDeathService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeDeathService.java index 7be06b1436..09af4e2bdc 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeDeathService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeDeathService.java @@ -2,8 +2,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ChangeDeathDTO; +import com.epmet.dto.form.OnlyIdFormDTO; import com.epmet.entity.ChangeDeathEntity; import java.util.List; @@ -76,4 +78,12 @@ public interface ChangeDeathService extends BaseService { * @date 2022-05-05 */ void delete(String[] ids); + + /** + * 恢复迁出人员 + * @return + */ + void recovery(TokenDto tokenDto, OnlyIdFormDTO dto); + + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java index 150fc05fa0..fb87579a59 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/ChangeRelocationService.java @@ -2,8 +2,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ChangeRelocationDTO; +import com.epmet.dto.form.OnlyIdFormDTO; import com.epmet.entity.ChangeRelocationEntity; import java.util.List; @@ -105,4 +107,12 @@ public interface ChangeRelocationService extends BaseService * @param resiInfos * @param customerId * @param isSync + * @param jobType */ - void yantaiHsjcByDbView(List resiInfos, String customerId, String isSync); + void yanTaiDbViewByType(List resiInfos, String customerId, String isSync, String jobType); /** * 更新居民核酸检测信息(通过任务处理器) @@ -133,4 +134,12 @@ public interface DataSyncConfigService extends BaseService */ void execSyncByJobProcessor(IcSyncJobEntity jobEntity); + /** + * @Description 疫苗接种信息定时拉取 + * @param formDTO + * @Author zxc + * @Date 2022/11/11 16:56 + */ + void vaccineInfoScanTask(DataSyncTaskParam formDTO); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcDangerAreaService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcDangerAreaService.java new file mode 100644 index 0000000000..18a98985fb --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcDangerAreaService.java @@ -0,0 +1,84 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcDangerAreaDTO; +import com.epmet.dto.form.DangerAreaListFormDTO; +import com.epmet.entity.IcDangerAreaEntity; + +import java.nio.file.Path; +import java.util.List; +import java.util.Map; + +/** + * 疫情风险地区 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-10-31 + */ +public interface IcDangerAreaService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-10-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-10-31 + */ + List list(Map params); + + PageData list(DangerAreaListFormDTO formDTO); + + /** + * 单条查询 + * + * @param id + * @return IcDangerAreaDTO + * @author generator + * @date 2022-10-31 + */ + IcDangerAreaDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-10-31 + */ + void save(IcDangerAreaDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-10-31 + */ + void update(IcDangerAreaDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-10-31 + */ + void delete(List ids,String staffId); + + void execAsyncExcelImport(Path fileSavePath, String taskId, String customerId, String userId); +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java index 32447f2d74..d90f8907f7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java @@ -2,13 +2,16 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcTripReportRecordDTO; -import com.epmet.dto.form.IcTripReportFormDTO; -import com.epmet.dto.form.MyReportedTripFormDTO; -import com.epmet.dto.form.PageTripReportFormDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.EmphasisTripListResultDTO; +import com.epmet.dto.result.EmphasisTripPieDetailResultDTO; import com.epmet.dto.result.TripListDTO; import com.epmet.entity.IcTripReportRecordEntity; +import javax.servlet.http.HttpServletResponse; +import java.io.InputStream; import java.nio.file.Path; import java.util.List; import java.util.Map; @@ -102,4 +105,30 @@ public interface IcTripReportRecordService extends BaseService emphasisTripList(EmphasisTripListFormDTO formDTO); + + /** + * @Description 重点行程详情 + * @param formDTO + * @Author zxc + * @Date 2022/11/1 16:05 + */ + EmphasisTripListResultDTO emphasisTripDetail(EmphasisTripDetailFormDTO formDTO); + + /** + * @Description 【重点行程名单】饼图详情 + * @param formDTO + * @Author zxc + * @Date 2022/11/1 16:09 + */ + List emphasisTripPieDetail(EmphasisTripPieDetailFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java index c89b5f2db4..609297b255 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java @@ -68,4 +68,6 @@ public interface IcVaccineService extends BaseService { void edit(AddIcVaccineFormDTO formDTO); void del(IcVaccineFormDTO formDTO); + + void initVaccineLocal(); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeDeathServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeDeathServiceImpl.java index 04690ad68a..452fd90f53 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeDeathServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeDeathServiceImpl.java @@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.IcResiUserSubStatusEnum; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; @@ -17,18 +20,19 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.constant.IcResiUserConstant; import com.epmet.dao.ChangeDeathDao; +import com.epmet.dao.IcResiUserDao; import com.epmet.dto.ChangeDeathDTO; import com.epmet.dto.ChangeWelfareDTO; import com.epmet.dto.form.IcResiUserTransferFormDTO; +import com.epmet.dto.form.OnlyIdFormDTO; import com.epmet.dto.form.RentTenantDataFormDTO; import com.epmet.dto.result.RentTenantDataResultDTO; import com.epmet.entity.ChangeDeathEntity; +import com.epmet.entity.ChangeRelocationEntity; import com.epmet.entity.IcResiUserEntity; +import com.epmet.entity.IcUserChangeRecordEntity; import com.epmet.redis.ChangeDeathRedis; -import com.epmet.service.ChangeDeathService; -import com.epmet.service.ChangeWelfareService; -import com.epmet.service.IcResiUserService; -import com.epmet.service.IcUserTransferRecordService; +import com.epmet.service.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -65,6 +69,11 @@ public class ChangeDeathServiceImpl extends BaseServiceImpl page(Map params) { params.put("customerId", loginUserUtil.getLoginUserCustomerId()); @@ -201,4 +210,34 @@ public class ChangeDeathServiceImpl extends BaseServiceImpl page(Map params) { @@ -342,6 +352,36 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl qw = new LambdaQueryWrapper<>(); qw.eq(IcSyncJobEntity::getOrgId,formDTO.getAgencyId()) + .eq(IcSyncJobEntity::getJobType,formDTO.getJobType()) .in(IcSyncJobEntity::getOperationStatus,OPERATION_STATUS_WAITING,OPERATION_STATUS_PROCESSING); List icSyncJobEntities = icSyncJobDao.selectList(qw); // 当前组织下存在同步任务 @@ -433,43 +434,10 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl waitList; - //do { - // LambdaQueryWrapper qw3 = new LambdaQueryWrapper<>(); - // qw3.eq(IcSyncJobEntity::getCustomerId,formDTO.getCustomerId()) - // .eq(IcSyncJobEntity::getOperationStatus,OPERATION_STATUS_WAITING) - // .eq(IcSyncJobEntity::getJobType,JOB_TYPE_NAT) - // .orderByAsc(BaseEpmetEntity::getCreatedTime); - // waitList = icSyncJobDao.selectList(qw3); - // if (CollectionUtils.isNotEmpty(waitList)){ - // for (IcSyncJobEntity entity : waitList) { - // RLock lock = null; - // try { - // lock = distributedLock.getLock(entity.getOrgId() + JOB_TYPE_NAT, 60L, 60L, TimeUnit.SECONDS); - // updateSync(entity.getId(),OPERATION_STATUS_PROCESSING); - // }catch (Exception ex){ - // log.error(ex.getMessage()); - // throw new EpmetException(ex.getMessage()); - // }finally { - // lock.unlock(); - // } - // formDTO.setAgencyId(entity.getOrgId()); - // try { - // natInfoScanTask(formDTO); - // }catch (Exception ee){ - // log.error(ee.getMessage()); - // throw new EpmetException(ee.getMessage()); - // }finally { - // updateSync(entity.getId(),OPERATION_STATUS_FINISH); - // } - // } - // } - //}while (CollectionUtils.isNotEmpty(waitList)); } @Transactional(rollbackFor = Exception.class) @@ -532,7 +500,7 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl resiInfos, String customerId, String isSync) { - List> resiInfobatchs = ListUtils.partition(resiInfos, 50); - for (List resibatch : resiInfobatchs) { + public void yanTaiDbViewByType(List resiInfos, String customerId, String isSync, String jobType) { + List> resiInfoBatchs = ListUtils.partition(resiInfos, 50); + for (List resiBatch : resiInfoBatchs) { // n个一批,来处理他们的核酸信息,太多怕给数据库查崩了。 try { - yantaiHsjcByDbViewPartition(resibatch, customerId, isSync); + switch (jobType){ + // 核酸检测 + case JOB_TYPE_NAT: + yantaiHsjcByDbViewPartition(resiBatch, customerId, isSync); + // 疫苗接种 + case JOB_TYPE_VACCINE: + yanTaiVaccineByDbViewPartition(resiBatch, customerId, isSync); + default: + break; + } } catch (Exception e) { String errorMsg = ExceptionUtils.getErrorStackTrace(e); - log.error("【更新核酸检测信息(from 兰图)】失败,信息:{}", errorMsg); + log.error("【更新{}信息(from 兰图)】失败,信息:{}", jobType, errorMsg); + } + } + } + + /** + * @Description 疫苗接种信息处理 + * @param resiInfos + * @param customerId + * @param isSync + * @Author zxc + * @Date 2022/11/11 11:07 + */ + public void yanTaiVaccineByDbViewPartition(List resiInfos, String customerId, String isSync){ + // 将居民信息转化为的map + Map idCardAndResiInfoMap = resiInfos.stream().collect(Collectors.toMap(resi -> resi.getIdCard(), Function.identity())); + List idCards = new ArrayList<>(idCardAndResiInfoMap.keySet()); + // 1.获取核酸采样信息 + Map args = new HashMap<>(); + args.put("idcards", idCards); + // todo 疫苗接种视图 + String json = "[\n" + + "{\n" + + "\t\"idCard\":\"370785195001012558\",\n" + + "\t\"inoculateDate\":\"2023-01-01 10:01\",\n" + + "\t\"lastStationName\":\"北京\"\n" + + "},\n" + + "{\n" + + "\t\"idCard\":\"370785195001012558\",\n" + + "\t\"inoculateDate\":\"2022-01-01 10:01\",\n" + + "\t\"lastStationName\":\"南京\"\n" + + "}\n" + + "]"; + List> vaccineList = new ArrayList<>();/*yantaiNamedParamLantuJdbcTemplate.queryForList( + "select id, name,card_no, create_time from hscyxxb where card_no in (:idcards)", args);*/ + Map m = new HashMap<>(); + vaccineList.add(m); + if (CollectionUtils.isNotEmpty(vaccineList)) { + List entities = new ArrayList<>(); +// List ytVaccineListDTOS = ConvertUtils.sourceToTarget(vaccineList, YTVaccineListDTO.class); + List ytVaccineListDTOS = JSON.parseArray(json,YTVaccineListDTO.class); + List existVaccine = icVaccineDao.getExistVaccine(ytVaccineListDTOS); + if (CollectionUtils.isNotEmpty(existVaccine)){ + for (YTVaccineListDTO e : existVaccine) { + for (int i = 0; i < ytVaccineListDTOS.size(); i++) { + if (ytVaccineListDTOS.get(i).getIdCard().equals(e.getIdCard()) && ytVaccineListDTOS.get(i).getInoculateDate().equals(e.getInoculateDate())){ + ytVaccineListDTOS.remove(i); + } + } + } + } + if (CollectionUtils.isNotEmpty(ytVaccineListDTOS)){ + ytVaccineListDTOS.forEach(v -> { + resiInfos.forEach(u -> { + if (v.getIdCard().equals(u.getIdCard())){ + IcVaccineEntity e = new IcVaccineEntity(); + e.setCustomerId(customerId); + e.setName(u.getName()); + e.setMobile(u.getMobile()); + e.setIdCard(u.getIdCard()); + e.setIsResiUser(StringUtils.isBlank(u.getUserId()) ? NumConstant.ZERO_STR : NumConstant.ONE_STR); + e.setUserId(StringUtils.isBlank(u.getUserId()) ? "" : u.getUserId()); + e.setUserType("ytPull"); + e.setInoculateTime(DateUtils.parseDate(v.getInoculateDate(),DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)); + e.setInoculateAddress(v.getLastStationName()); + e.setAgencyId(u.getAgencyId()); + e.setPids(u.getPids()); + entities.add(e); + } + }); + }); + icVaccineService.insertBatch(entities,NumConstant.ONE_HUNDRED); + List relationEntities = new ArrayList<>(); + entities.forEach(e -> { + IcVaccineRelationEntity re = new IcVaccineRelationEntity(); + re.setIcVaccineId(e.getAgencyId()); + re.setPids(e.getPids()); + re.setCustomerId(customerId); + re.setUserType("ytPull"); + re.setAgencyId(e.getAgencyId()); + // 拉取居民的疫苗接种信;因为查询的就是组织下的居民,所以都是本地居民。 + re.setIsLocalResiUser(NumConstant.ONE_STR); + relationEntities.add(re); + }); + icVaccineRelationService.insertBatch(relationEntities,NumConstant.ONE_HUNDRED); } } } @@ -1198,14 +1259,62 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl configData = getConfigData(null, EpidemicConstant.DATA_CODE_VACCINE); + if (CollectionUtils.isEmpty(configData)){ + log.warn("vaccineInfoScanTask not exists config data "); + return; + } + long count = configData.stream().filter(o -> CollectionUtils.isNotEmpty(o.getScopeList())).count(); + if (count < 1) { + log.warn("vaccineInfoScanTask scopeList is null"); + return; + } + int pageNo = NumConstant.ONE; + int pageSize = NumConstant.ONE_THOUSAND; + List dbResiList = null; + do { + for (DataSyncConfigDTO config : configData) { + // 设置查询数据范围 + formDTO.setOrgList(config.getScopeList()); + DataSyncEnum anEnum = DataSyncEnum.getEnum(config.getDataCode()); + dbResiList = getNatUserInfoFromDb(formDTO, pageNo, pageSize); + if (CollectionUtils.isEmpty(dbResiList)) { + continue; + } + switch (anEnum) { + case VACCINE: + try { + //查询正常状态的居民 + yanTaiVaccineByDbViewPartition(dbResiList,config.getCustomerId(),NumConstant.ZERO_STR); + log.info("======vaccine信息拉取结束======"); + } catch (Exception e) { + log.error("vaccine thread execute exception", e); + } + break; + default: + log.warn("没有要处理的数据"); + } + } + pageNo++; + } while (dbResiList != null && dbResiList.size() == pageSize); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java index dc737eed05..bceb6c7fd5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java @@ -23,6 +23,7 @@ import com.epmet.dao.IcResiUserDao; import com.epmet.dto.ChangeWelfareDTO; import com.epmet.dto.IcBirthRecordDTO; import com.epmet.dto.form.BirthRecordFormDTO; +import com.epmet.dto.form.BirthRecordListFormDTO; import com.epmet.dto.form.BirthRecordUpdateDTO; import com.epmet.dto.form.IcResiUserTransferFormDTO; import com.epmet.dto.result.AllGridsByUserIdResultDTO; @@ -79,10 +80,16 @@ public class IcBirthRecordServiceImpl extends BaseServiceImpl wrapper = getWrapper(formDTO, staffInfo); - List entityList = baseDao.selectList(wrapper); - PageInfo pageInfo = new PageInfo<>(entityList); - List list = ConvertUtils.sourceToTarget(entityList, IcBirthRecordDTO.class); +// LambdaQueryWrapper wrapper = getWrapper(formDTO, staffInfo); +// List entityList = baseDao.selectList(wrapper); + + BirthRecordListFormDTO birthRecordListFormDTO = ConvertUtils.sourceToTarget(formDTO, BirthRecordListFormDTO.class); + birthRecordListFormDTO.setAgencyId(staffInfo.getAgencyId()); + List list = baseDao.selectListByEntity(birthRecordListFormDTO); + + + PageInfo pageInfo = new PageInfo<>(list); +// List list = ConvertUtils.sourceToTarget(entityList, IcBirthRecordDTO.class); if (CollectionUtils.isNotEmpty(list)) { //查询网格名称 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcDangerAreaServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcDangerAreaServiceImpl.java new file mode 100644 index 0000000000..b330196a1b --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcDangerAreaServiceImpl.java @@ -0,0 +1,263 @@ +package com.epmet.service.impl; + +import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.enums.DictTypeEnum; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.FileUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.constants.ImportTaskConstants; +import com.epmet.dao.IcDangerAreaDao; +import com.epmet.dto.IcDangerAreaDTO; +import com.epmet.dto.SysDictDataDTO; +import com.epmet.dto.form.DangerAreaListFormDTO; +import com.epmet.dto.form.ImportTaskCommonFormDTO; +import com.epmet.dto.result.UploadImgResultDTO; +import com.epmet.entity.IcDangerAreaEntity; +import com.epmet.excel.IcDangerAreaImportExcel; +import com.epmet.excel.handler.IcDangerAreaExcelImportListener; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.feign.OssFeignClient; +import com.epmet.service.IcDangerAreaService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileItemFactory; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.entity.ContentType; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.commons.CommonsMultipartFile; + +import java.io.IOException; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 疫情风险地区 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-10-31 + */ +@Service +@Slf4j +public class IcDangerAreaServiceImpl extends BaseServiceImpl implements IcDangerAreaService { + + @Autowired + private EpmetAdminOpenFeignClient adminOpenFeignClient; + @Autowired + private OssFeignClient ossFeignClient; + @Autowired + private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcDangerAreaDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcDangerAreaDTO.class); + } + + @Override + public PageData list(DangerAreaListFormDTO formDTO) { + PageData result = new PageData<>(); + LambdaQueryWrapper qr = new LambdaQueryWrapper<>(); + qr.like(StringUtils.isNotBlank(formDTO.getName()),IcDangerAreaEntity::getAllName,formDTO.getName()) + .eq(StringUtils.isNotBlank(formDTO.getDangerLevel()),IcDangerAreaEntity::getDangerLevel,formDTO.getDangerLevel()) + .orderByDesc(BaseEpmetEntity::getCreatedTime); + if (formDTO.getIsPage()){ + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectList(qr)); + result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); + result.setList(ConvertUtils.sourceToTarget(pageInfo.getList(),IcDangerAreaDTO.class)); + }else { + List entities = baseDao.selectList(qr); + result.setTotal(entities.size()); + result.setList(ConvertUtils.sourceToTarget(entities,IcDangerAreaDTO.class)); + } + return result; + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcDangerAreaDTO get(String id) { + IcDangerAreaEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcDangerAreaDTO.class); + } + + /** + * @Description 新增 + * @param dto + * @Author zxc + * @Date 2022/11/1 09:09 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcDangerAreaDTO dto) { + LambdaQueryWrapper qw = new LambdaQueryWrapper<>(); + qw.eq(IcDangerAreaEntity::getAllName,dto.getAllName()); + IcDangerAreaEntity icDangerAreaEntity = baseDao.selectOne(qw); + if (null != icDangerAreaEntity){ + throw new EpmetException(EpmetErrorCode.DANGER_AREA_ERROR.getCode()); + } + IcDangerAreaEntity entity = ConvertUtils.sourceToTarget(dto, IcDangerAreaEntity.class); + String[] split = dto.getAllName().split("-"); + for (int i = NumConstant.ZERO; i < split.length; i++) { + switch (i){ + case NumConstant.ZERO: + entity.setProvince(split[i]); + break; + case NumConstant.ONE: + entity.setCity(split[i]); + break; + case NumConstant.TWO: + entity.setDistrict(split[i]); + break; + default: + break; + } + } + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcDangerAreaDTO dto) { + IcDangerAreaEntity entity = ConvertUtils.sourceToTarget(dto, IcDangerAreaEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(List ids,String staffId) { + LambdaUpdateWrapper updateWrapper=new LambdaUpdateWrapper<>(); + updateWrapper.in(IcDangerAreaEntity::getId,ids) + .set(IcDangerAreaEntity::getUpdatedBy,staffId) + .set(IcDangerAreaEntity::getUpdatedTime,new Date()) + .set(IcDangerAreaEntity::getDelFlag, NumConstant.ONE_STR); + baseDao.update(null,updateWrapper); + } + + @Override + @Async + public void execAsyncExcelImport(Path fileSavePath, String taskId, String customerId, String userId) { + Integer size; + do { + size = baseDao.delAllDangerArea(customerId); + }while (size == NumConstant.ONE_THOUSAND); + try { + //获取当前登录用户所属组织id + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); + if (null == staffInfo){ + throw new EpmetException("未查询到工作人员信息:"+userId); + } + // 字典表 + Result> dictMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.DANGER_AREA_LEVEL_TYPE.getCode()); + Map dangerLevelMap = dictMapRes.success() && CollectionUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictLabel, SysDictDataDTO::getDictValue)) : new HashMap<>(); + + IcDangerAreaExcelImportListener dangerAreaExcelImportListener = new IcDangerAreaExcelImportListener(dangerLevelMap, customerId,this ,baseDao); + EasyExcel.read(fileSavePath.toFile(), IcDangerAreaImportExcel.class, dangerAreaExcelImportListener).headRowNumber(1).sheet(0).doRead(); + + Path errorDescFile = null; + String errorDesFileUrl = null; + List errorRows = dangerAreaExcelImportListener.getErrorRows(); + boolean failed = CollectionUtils.isNotEmpty(errorRows); + if (failed) { + // 生成并上传错误文件 + try { + // 文件生成 + Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_danger_area", "import", "error_des"); + String fileName = UUID.randomUUID().toString().concat(".xlsx"); + errorDescFile = errorDescDir.resolve(fileName); + + FileItemFactory factory = new DiskFileItemFactory(16, errorDescDir.toFile()); + FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, fileName); + OutputStream os = fileItem.getOutputStream(); + EasyExcel.write(os, IcDangerAreaImportExcel.IcDangerAreaError.class).sheet("导入失败列表").doWrite(errorRows); + // 文件上传oss + Result errorDesFileUploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem)); + if (errorDesFileUploadResult.success()) { + errorDesFileUrl = errorDesFileUploadResult.getData().getUrl(); + } + } finally { + if (Files.exists(errorDescFile)) { + Files.delete(errorDescFile); + } + } + } + + ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); + importFinishTaskForm.setTaskId(taskId); + importFinishTaskForm.setProcessStatus(failed ? ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL : ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS); + importFinishTaskForm.setOperatorId(userId); + importFinishTaskForm.setResultDesc(""); + importFinishTaskForm.setResultDescFilePath(errorDesFileUrl); + + Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); + if (!result.success()) { + log.error("【风险地区导入】finishImportTask失败"); + } + } catch (Exception e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + log.error("【风险地区导入】出错:{}", errorMsg); + + ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); + importFinishTaskForm.setTaskId(taskId); + importFinishTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); + importFinishTaskForm.setOperatorId(userId); + importFinishTaskForm.setResultDesc("导入失败"); + + Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); + if (!result.success()) { + log.error("【风险地区导入】导入记录状态修改为'完成'失败"); + } + } finally { + // 删除临时文件 + if (Files.exists(fileSavePath)) { + try { + Files.delete(fileSavePath); + } catch (IOException e) { + log.error("method exception", e); + } + } + } + } + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java index ab52942896..317a04fe33 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java @@ -2,12 +2,14 @@ package com.epmet.service.impl; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; @@ -289,6 +291,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl idCards = entities.stream().map(m -> m.getIdCard()).collect(Collectors.toList()); Integer attentionType = entities.get(NumConstant.ZERO).getAttentionType(); List existList = baseDao.getExistList(attentionType, idCards); + log.info("ic_epidemic_special_attention是否存在记录?attentionType="+attentionType+";idCards="+JSON.toJSONString(idCards)+";existList="+ JSON.toJSONString(existList)); List existsEntities = new ArrayList<>(); if (CollectionUtils.isNotEmpty(existList)){ for (String s : existList) { @@ -302,19 +305,21 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl { - e.setIsAttention(NumConstant.ONE); - e.setOrgId(agencyInfo.getId()); - e.setPid(agencyInfo.getPid()); - e.setPids(agencyInfo.getPids()); - e.setCustomerId(formDTO.getCustomerId()); - e.setIsHistory(NumConstant.ZERO_STR); - if(StringUtils.isBlank(e.getIsolatedState())){ - //从行程上报界面,点击加入重点人群关注,默认隔离状态是居家隔离 - e.setIsolatedState(NumConstant.ONE_STR); - } - }); - insertBatch(entities); + if(CollectionUtils.isNotEmpty(entities)){ + entities.forEach(e -> { + e.setIsAttention(NumConstant.ONE); + e.setOrgId(agencyInfo.getId()); + e.setPid(agencyInfo.getPid()); + e.setPids(agencyInfo.getPids()); + e.setCustomerId(formDTO.getCustomerId()); + e.setIsHistory(NumConstant.ZERO_STR); + if(StringUtils.isBlank(e.getIsolatedState())){ + //从行程上报界面,点击加入重点人群关注,默认隔离状态是居家隔离 + e.setIsolatedState(NumConstant.ONE_STR); + } + }); + insertBatch(entities); + } //新增通知表信息 List needSedNotice = formDTO.getList().stream().filter(l -> CollectionUtils.isNotEmpty(l.getChannel())).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(needSedNotice)) { @@ -349,6 +354,19 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl imp return resultDTO; } resultDTO = ConvertUtils.sourceToTarget(entity, IcNatDTO.class); - + resultDTO.setShowIdCard(resultDTO.getIdCard()); + resultDTO.setShowMobile(resultDTO.getMobile()); //2.查询对应的通知记录信息 IcNoticeDTO dto = icNoticeService.getNotice(entity.getCustomerId(), entity.getIdCard()); if (null != dto) { @@ -702,28 +703,28 @@ public class IcNatServiceImpl extends BaseServiceImpl imp /** * 创建nat关系 * @param natId - * @param currentUserAgencyId 居民所属组织 + * @param currentResiAgencyId 居民所属组织 * @param staffAgencyId 工作人员所属组织 * @param agencyPids 工作人员所属组织路径 */ - private void createNatRelation(String natId, String currentUserAgencyId, String agencyPids,String staffAgencyId) { + private void createNatRelation(String natId, String currentResiAgencyId, String agencyPids,String staffAgencyId) { // 没有关系创建关系,有关系就跳过 // 2022-10-25 修改:不管是不是本辖区居民,都创建关系,用 is_local_resi_user区分是不是本辖区居民 // 组织ID都改成工作人员所属组织ID LambdaQueryWrapper query = new LambdaQueryWrapper<>(); query.eq(IcNatRelationEntity::getIcNatId, natId); - query.eq(IcNatRelationEntity::getAgencyId, currentUserAgencyId); + query.eq(IcNatRelationEntity::getAgencyId, currentResiAgencyId); if (icNatRelationDao.selectCount(query) > 0) { return; } IcNatRelationEntity relation = new IcNatRelationEntity(); - relation.setAgencyId(currentUserAgencyId); - relation.setPids(String.join(":", Arrays.asList(agencyPids, currentUserAgencyId))); + relation.setAgencyId(currentResiAgencyId); + relation.setPids(String.join(":", Arrays.asList(agencyPids, staffAgencyId))); relation.setIcNatId(natId); relation.setUserType("import"); - relation.setIsLocalResiUser(agencyPids.contains(currentUserAgencyId) ? NumConstant.ONE_STR : NumConstant.ZERO_STR); + relation.setIsLocalResiUser(agencyPids.contains(currentResiAgencyId) ? NumConstant.ONE_STR : NumConstant.ZERO_STR); icNatRelationDao.insert(relation); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java index 1d2af49a28..bacf657789 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNoticeServiceImpl.java @@ -178,7 +178,7 @@ public class IcNoticeServiceImpl extends BaseServiceImpl epidemicPreventionList(EpidemicPreventionFormDTO formDTO) { - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); - if (null != staffInfo) { - formDTO.setAgencyId(staffInfo.getAgencyId()); + if(StringUtils.isBlank(formDTO.getAgencyId())){ + //没有指定查询某个组织时,默认查询当前用户所属组织及下级 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null != staffInfo) { + formDTO.setAgencyId(staffInfo.getAgencyId()); + } } List list = new ArrayList<>(); if (formDTO.getIsPage()){ @@ -1776,8 +1791,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl list = baseDao.getEpidemicPreventionList(formDTO); - if (CollectionUtils.isNotEmpty(list)) { + if (CollectionUtils.isNotEmpty(list) && null != list.get(NumConstant.ZERO)) { result = list.get(NumConstant.ZERO); + result.setShowIdCard(result.getIdCard()); + result.setShowMobile(result.getMobile()); //查询网格名称 GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(result.getGridId()); if (null != gridInfo) { @@ -2389,6 +2406,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl partyWrapper = new LambdaQueryWrapper<>(); partyWrapper.eq(IcPartyMemberEntity::getIcResiUser, formDTO.getIcResiUser()); IcPartyMemberEntity partyMember = icPartyMemberDao.selectOne(partyWrapper); @@ -2470,7 +2489,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) .doSelectPageInfo(() -> baseDao.pageList(formDTO)); List list = data.getList(); + if(CollectionUtils.isEmpty(list)){ + return new PageData(list, data.getTotal()); + } + //获取需要的字典表数据 + //交通方式 + Result> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode()); + //Map tMap = trafficTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //7天内旅居史情况 + Result> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode()); + //Map sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //隔离状态【磐石的跟之前字典表值不一样】 + Map isolateTypeMap = new HashMap<>(); + isolateTypeMap.put("0", "集中隔离");isolateTypeMap.put("1", "居家隔离");isolateTypeMap.put("2", "居家健康监测");isolateTypeMap.put("3", "已出隔离期");isolateTypeMap.put("4", "不需要隔离"); + //行程记录类型 + Result> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode()); + //Map tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); //3.查询最近一次通知时间、核算检测关注名单 if (CollectionUtils.isNotEmpty(list)) { Map latestNotice = new HashMap<>(); @@ -122,6 +155,16 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcDangerAreaEntity::getCustomerId, formDTO.getCustomerId()); + wrapper.eq(IcDangerAreaEntity::getDelFlag, DelFlagEnum.NORMAL.value()); + List areaList = icDangerAreaDao.selectList(wrapper); + Map areaMap = new HashMap<>(); + areaList.forEach(a -> { + if (StringUtils.isNotBlank(a.getDistrict())) { + areaMap.put(a.getDistrict(), a.getDangerLevel()); + } + }); + String[] str = formDTO.getSourceAddress().split("-"); + if (str.length < 3) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "‘来源地’信息填写格式错误", "‘来源地’信息填写格式错误"); + } + if (areaMap.containsKey(str[2])) { + formDTO.setSojournHistory(areaMap.get(str[2])); + } else { + formDTO.setSojournHistory("3");//无风险 + } + } + } //如果是单个录入的,默认数据属于当前用户所属组织id if(IcResiUserConstant.USER_TYPE_INPUT.equals(formDTO.getUserType())){ //获取当前登录用户所属组织id @@ -218,10 +288,12 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcDangerAreaEntity::getCustomerId, formDTO.getCustomerId()); + wrapper.eq(IcDangerAreaEntity::getDelFlag, DelFlagEnum.NORMAL.value()); + List areaList = icDangerAreaDao.selectList(wrapper); + Map areaMap = new HashMap<>(); + areaList.forEach(a -> { + if (StringUtils.isNotBlank(a.getDistrict())) { + areaMap.put(a.getDistrict(), a.getDangerLevel()); + } + }); + String[] str = formDTO.getSourceAddress().split("-"); + if (str.length < 3) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "‘来源地’信息填写格式错误", "‘来源地’信息填写格式错误"); + } + if (areaMap.containsKey(str[2])) { + formDTO.setSojournHistory(areaMap.get(str[2])); + } else { + formDTO.setSojournHistory("3");//无风险 + } + } + } GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(formDTO.getGridId()); if (null == gridInfoCache) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询网格信息异常", EpmetErrorCode.SERVER_ERROR.getMsg()); @@ -307,6 +406,36 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl result = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectMyReported(formDTO.getUserId(), formDTO.getCustomerId(),idCard)); + + if(CollectionUtils.isEmpty(result.getList())){ + return new ArrayList<>(); + } + //获取需要的字典表数据 + //交通方式 + Result> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode()); + //Map tMap = trafficTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //7天内旅居史情况 + Result> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode()); + //Map sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //隔离状态【磐石的跟之前字典表值不一样】 + Map isolateTypeMap = new HashMap<>(); + isolateTypeMap.put("0", "集中隔离");isolateTypeMap.put("1", "居家隔离");isolateTypeMap.put("2", "居家健康监测");isolateTypeMap.put("3", "已出隔离期");isolateTypeMap.put("4", "不需要隔离"); + //行程记录类型 + Result> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode()); + //Map tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + for (IcTripReportRecordDTO dto : result.getList()) { + //字典表字段、是否字段赋值对应中国字 + dto.setTrafficTypeName(trafficTypeMap.getData().containsKey(dto.getTrafficType()) ? trafficTypeMap.getData().get(dto.getTrafficType()) : "无"); + dto.setVaccineNumName(StringUtils.isNotBlank(dto.getVaccineNum()) ? dto.getVaccineNum().concat("针") : ""); + dto.setIsNatRecordName("1".equals(dto.getIsNatRecord()) ? "是" : "否"); + dto.setNatOutcomeName("1".equals(dto.getNatOutcome()) ? "阳性" : "阴性"); + dto.setSojournHistoryName(sojournHistoryMap.getData().containsKey(dto.getSojournHistory()) ? sojournHistoryMap.getData().get(dto.getSojournHistory()) : "无"); + dto.setIsolateTypeName(isolateTypeMap.containsKey(dto.getIsolateType()) ? isolateTypeMap.get(dto.getIsolateType()) : "无"); + dto.setIsArriveCheckName("1".equals(dto.getIsArriveCheck()) ? "是" : "否"); + dto.setIsArriveName("1".equals(dto.getIsArrive()) ? "是" : "否"); + dto.setTripDataTypeName(tripDataTypeMap.getData().containsKey(dto.getTripDataType()) ? tripDataTypeMap.getData().get(dto.getTripDataType()) : "无"); + } + return result.getList(); } @@ -345,8 +474,11 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode()); + Map tMap = trafficTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); - IcTripReportExcelImportListener listener = new IcTripReportExcelImportListener(customerId,staffInfo, this); + IcTripReportExcelImportListener listener = new IcTripReportExcelImportListener(customerId,staffInfo, this, tMap); EasyExcel.read(filePath.toFile(), IcTripReportExcelData.class, listener).headRowNumber(2).sheet(0).doRead(); @@ -452,6 +584,17 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode()); + //7天内旅居史情况 + Result> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode()); + //隔离状态【磐石的跟之前字典表值不一样】 + Map isolateTypeMap = new HashMap<>(); + isolateTypeMap.put("0", "集中隔离");isolateTypeMap.put("1", "居家隔离");isolateTypeMap.put("2", "居家健康监测");isolateTypeMap.put("3", "已出隔离期");isolateTypeMap.put("4", "不需要隔离"); + //行程记录类型 + Result> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode()); + for (IcTripReportRecordDTO dto : list) { //默认未加入 dto.setHeSuanCheck(false); @@ -463,7 +606,234 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode()); + Map tMap = trafficTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //7天内旅居史情况 + Result> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode()); + Map sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //隔离状态【磐石的跟之前字典表值不一样】 + Map iMap = new HashMap<>(); + iMap.put("集中隔离", "0");iMap.put("居家隔离", "1");iMap.put("居家健康监测", "2");iMap.put("已出隔离期", "3");iMap.put("不需要隔离", "4"); + //行程记录类型 + Result> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode()); + Map tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey())); + //风险地区数据 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcDangerAreaEntity::getCustomerId, tokenDto.getCustomerId()); + wrapper.eq(IcDangerAreaEntity::getDelFlag, DelFlagEnum.NORMAL.value()); + List areaList = icDangerAreaDao.selectList(wrapper); + Map areaMap = new HashMap<>(); + areaList.forEach(a->{ + if(StringUtils.isNotBlank(a.getDistrict())){ + areaMap.put(a.getDistrict(), a.getDangerLevel()); + } + }); + + IcPsTripReportExcelImportListener listener = new IcPsTripReportExcelImportListener(tokenDto.getCustomerId(), staffInfo, this, + tMap, sMap, iMap, tdMap, areaMap); + + EasyExcel.read(filePath.toFile(), IcPsTripReportRecordExcel.class, listener).headRowNumber(2).sheet(0).doRead(); + + Path errorDescFile = null; + String errorDesFileUrl = null; + List errorRows = listener.getErrorRows(); + + boolean failed = errorRows.size() > 0; + if (failed) { + // 生成并上传错误文件 + try { + // 文件生成 + Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_trip_preport", "import", "error_des"); + String fileName = UUID.randomUUID().toString().concat(".xlsx"); + errorDescFile = errorDescDir.resolve(fileName); + + FileItemFactory factory = new DiskFileItemFactory(16, errorDescDir.toFile()); + FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, fileName); + OutputStream os = fileItem.getOutputStream(); + + EasyExcel.write(os, IcPsTripReportRecordErrorExcel.class).sheet("导入失败列表").doWrite(errorRows); + + // 文件上传oss + Result errorDesFileUploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem)); + if (errorDesFileUploadResult.success()) { + errorDesFileUrl = errorDesFileUploadResult.getData().getUrl(); + } + } finally { + if (Files.exists(errorDescFile)) { + Files.delete(errorDescFile); + } + } + } + + ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); + importFinishTaskForm.setTaskId(importTaskId); + importFinishTaskForm.setProcessStatus(failed ? ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL : ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS); + importFinishTaskForm.setOperatorId(tokenDto.getCustomerId()); + importFinishTaskForm.setResultDesc(""); + importFinishTaskForm.setResultDescFilePath(errorDesFileUrl); + + Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); + if (!result.success()) { + log.error("【行程上报导入】finishImportTask失败"); + } + } catch (Exception e) { + String errorMsg = ExceptionUtils.getErrorStackTrace(e); + log.error("【行程上报导入】出错:{}", errorMsg); + + ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); + importFinishTaskForm.setTaskId(importTaskId); + importFinishTaskForm.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); + importFinishTaskForm.setOperatorId(tokenDto.getCustomerId()); + importFinishTaskForm.setResultDesc("导入失败"); + + Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); + if (!result.success()) { + log.error("【行程上报导入】导入记录状态修改为'完成'失败"); + } + } finally { + // 删除临时文件 + if (Files.exists(filePath)) { + try { + Files.delete(filePath); + } catch (IOException e) { + log.error("method exception", e); + } + } } - return list.get(NumConstant.ZERO); } + + /** + * @Description 【重点行程名单】列表 + * @param formDTO + * @Author zxc + * @Date 2022/11/1 15:44 + */ + @Override + public PageData emphasisTripList(EmphasisTripListFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getId())){ + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo){ + throw new EpmetException("未查询到工作人员信息:"+formDTO.getStaffId()); + } + formDTO.setAgencyId(staffInfo.getAgencyId()); + } + PageData result = new PageData<>(); + if (formDTO.getIsPage()){ + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.emphasisTripList(formDTO)); + result.setList(CollectionUtils.isEmpty(pageInfo.getList()) ? new ArrayList<>() : pageInfo.getList()); + result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); + }else { + List list = baseDao.emphasisTripList(formDTO); + result.setList(list); + result.setTotal(list.size()); + } + // 7天旅居史字典 + Result> sojournMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.SOJOURN_HISTORY.getCode()); + Map sojournMap = sojournMapRes.success() && CollectionUtils.isNotEmpty(sojournMapRes.getData()) ? sojournMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictValue, SysDictDataDTO::getDictLabel)) : new HashMap<>(); + //交通方式 + Map trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode()).getData(); + + // 隔离状态字典 + Map isolateMap = new HashMap<>(); + isolateMap.put("0", "集中隔离");isolateMap.put("1", "居家隔离");isolateMap.put("2", "居家健康监测");isolateMap.put("3", "已出隔离期");isolateMap.put("4", "不需要隔离"); + + if (CollectionUtils.isNotEmpty(result.getList())){ + result.getList().forEach(l -> { + l.setIsolateTypeName(isolateMap.get(l.getIsolateType())); + l.setSojournHistoryName(sojournMap.get(l.getSojournHistory())); + l.setTrafficTypeName(trafficTypeMap.containsKey(l.getTrafficType()) ? trafficTypeMap.get(l.getTrafficType()) : "无"); + }); + } + return result; + } + + /** + * @Description 重点行程详情 + * @param formDTO + * @Author zxc + * @Date 2022/11/1 16:05 + */ + @Override + public EmphasisTripListResultDTO emphasisTripDetail(EmphasisTripDetailFormDTO formDTO) { + EmphasisTripListFormDTO emphasisTripListFormDTO = new EmphasisTripListFormDTO(); + emphasisTripListFormDTO.setId(formDTO.getId()); + PageData pageData = emphasisTripList(emphasisTripListFormDTO); + if (CollectionUtils.isEmpty(pageData.getList())){ + throw new EpmetException("未查询到行程信息:"+formDTO.getId()); + } + return pageData.getList().get(NumConstant.ZERO); + } + + /** + * @Description 【重点行程名单】饼图详情 + * @param formDTO + * @Author zxc + * @Date 2022/11/1 16:09 + */ + @Override + public List emphasisTripPieDetail(EmphasisTripPieDetailFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo){ + throw new EpmetException("未查询到工作人员信息:"+formDTO.getStaffId()); + } + formDTO.setAgencyId(staffInfo.getAgencyId()); + List pieDetailResult = baseDao.emphasisTripPieDetail(formDTO); + // 7天旅居史字典 + Result> sojournMapRes = adminOpenFeignClient.dictDataList(DictTypeEnum.SOJOURN_HISTORY.getCode()); + Map sojournMap = sojournMapRes.success() && CollectionUtils.isNotEmpty(sojournMapRes.getData()) ? sojournMapRes.getData().stream().collect(Collectors.toMap(SysDictDataDTO::getDictValue, SysDictDataDTO::getDictLabel)) : new HashMap<>(); + List result = constituteResult(sojournMap); + if (CollectionUtils.isNotEmpty(pieDetailResult)){ + result.forEach(r -> pieDetailResult.stream().filter(p -> p.getDangerLevel().equals(r.getDangerLevel())).forEach(p -> r.setTotal(p.getTotal()))); + } + return result.stream().sorted(Comparator.comparing(EmphasisTripPieDetailResultDTO::getTotal).reversed()).collect(Collectors.toList()); + } + + private List constituteResult(Map sojournMap){ + if (sojournMap.isEmpty()){ + return new ArrayList<>(); + } + List result = new ArrayList<>(); + sojournMap.forEach((k,v) -> { + EmphasisTripPieDetailResultDTO dto = new EmphasisTripPieDetailResultDTO(); + dto.setDangerLevel(k); + dto.setDangerLevelName(v); + if (!k.equals(NumConstant.THREE_STR)){ + result.add(dto); + } + }); + return result; + } + + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java index 09da4b8ee2..0d6b3418bd 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java @@ -18,17 +18,13 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.utils.*; import com.epmet.constants.ImportTaskConstants; +import com.epmet.dao.IcNatDao; import com.epmet.dao.IcResiUserDao; import com.epmet.dao.IcVaccineDao; import com.epmet.dao.IcVaccineRelationDao; -import com.epmet.dto.IcNatDTO; import com.epmet.dto.IcVaccineDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.IcVaccineListResultDTO; -import com.epmet.dto.result.LoginUserDetailsResultDTO; -import com.epmet.dto.result.UploadImgResultDTO; -import com.epmet.dto.result.VaccineListDTO; -import com.epmet.entity.IcNatEntity; +import com.epmet.dto.result.*; import com.epmet.entity.IcResiUserEntity; import com.epmet.entity.IcVaccineEntity; import com.epmet.entity.IcVaccineRelationEntity; @@ -84,6 +80,8 @@ public class IcVaccineServiceImpl extends BaseServiceImpl query = new LambdaQueryWrapper<>(); @@ -442,6 +440,7 @@ public class IcVaccineServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(no, NumConstant.ONE_THOUSAND).doSelectPageInfo(() -> baseDao.initVaccineLocal()); + List list = pageInfo.getList(); + size = list.size(); + if (CollectionUtils.isNotEmpty(list)){ + List users = icNatDao.getResiByIdCards(list.stream().map(m -> m.getIdCard()).distinct().collect(Collectors.toList())); + if (CollectionUtils.isNotEmpty(users)){ + for (RelationAndNatResultDTO l : list) { + for (IcResiUserEntity u : users) { + if (l.getStaffAgencyIdPath().contains(u.getAgencyId())){ + l.setIsLocalResiUser(NumConstant.ONE_STR); + break; + } + } + } + updateRelation(list,NumConstant.ONE_STR); + } + } + no++; + }while (size == NumConstant.ONE_THOUSAND); + // 其他类型的userType直接是居民的组织信息,所以直接赋值 is_local_resi_user = '1' + updateRelation(null,NumConstant.TWO_STR); + log.error("/epmetuser/icNat/initNatLocal更新核酸检测记录关系表,是否是本辖区居民标志 end"); + } + + @Transactional(rollbackFor = Exception.class) + public void updateRelation(List list,String type){ + if (NumConstant.ONE_STR.equals(type)){ + if (CollectionUtils.isNotEmpty(list)){ + baseDao.updateRelation(list); + } + }else { + baseDao.updateRelationOther("1"); + baseDao.updateRelationOther("0"); + } + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.81__edit_partymember.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.81__edit_partymember.sql new file mode 100644 index 0000000000..0bf4647c5f --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.81__edit_partymember.sql @@ -0,0 +1,13 @@ +ALTER TABLE `ic_party_member` + ADD COLUMN `RDSSZZB` varchar(255) NULL COMMENT '入党时所在党支部' AFTER `IS_DYZXH`, + ADD COLUMN `ZZGXZRSQSJ` varchar(64) NULL COMMENT '组织关系转入社区时间' AFTER `RDSSZZB`, + ADD COLUMN `IS_QCJ` char(2) NULL COMMENT '是否请长假' AFTER `ZZGXZRSQSJ`; + +alter table ic_user_change_record modify column TYPE varchar(64) NOT NULL COMMENT '操作类型【add:新增 category:类别 transfer:调动;logout注销;recovery_moveout恢复迁出;recovery_death恢复死亡】'; +alter table ic_user_change_record modify column TYPE_NAME varchar(64) NOT NULL COMMENT '操作类型名称【add:新增 category:类别 transfer:调动;logout注销;recovery_moveout恢复迁出;recovery_death恢复死亡】'; +alter table ic_resi_user modify column SUB_STATUS varchar(10) DEFAULT '01' COMMENT '用户详细状态:01:新增、02:导入、03:迁入、04:新生、11:迁出、21死亡;51迁出恢复;52死亡恢复'; + +UPDATE ic_party_member +SET IS_QCJ = '0' +WHERE + IS_QCJ IS NULL; \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.82__ic_epidemic_special_attention_panshi.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.82__ic_epidemic_special_attention_panshi.sql new file mode 100644 index 0000000000..936a358868 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.82__ic_epidemic_special_attention_panshi.sql @@ -0,0 +1,20 @@ +-- 禅道需求713 +alter table ic_epidemic_special_attention MODIFY COLUMN `reason` varchar(500) DEFAULT NULL comment '关注原因;后磐石改名为隔离原因'; +alter table ic_epidemic_special_attention MODIFY COLUMN `remark` varchar(500) DEFAULT NULL comment '备注'; + +alter table ic_epidemic_special_attention ADD column GK_START_TIME varchar(32) DEFAULT '' COMMENT '管控开始时间yyyy-MM-dd,需求来源于磐石' AFTER remark; +alter table ic_epidemic_special_attention ADD column GK_END_TIME varchar(32) DEFAULT '' COMMENT '管控结束时间yyyy-MM-dd,需求来源于磐石' AFTER GK_START_TIME; + +alter table ic_epidemic_special_attention ADD column GB_NAME VARCHAR(32) DEFAULT '' COMMENT '镇(街)干部名称,需求来源于磐石' AFTER GK_END_TIME; +alter table ic_epidemic_special_attention ADD column GB_MOBILE VARCHAR(32) DEFAULT '' COMMENT '镇(街)干部联系方式,需求来源于磐石' AFTER GB_NAME; + +alter table ic_epidemic_special_attention ADD column GRID_MANAGER VARCHAR(32) DEFAULT '' COMMENT '村(社区)网格管理员,需求来源于磐石' AFTER GB_MOBILE; +alter table ic_epidemic_special_attention ADD column GRID_MANAGER_MOBILE VARCHAR(32) DEFAULT '' COMMENT '村(社区)网格管理员联系方式,需求来源于磐石' AFTER GRID_MANAGER; +alter table ic_epidemic_special_attention ADD column HEALTH_WORKER VARCHAR(32) DEFAULT '' COMMENT '基层医务工作者,需求来源于磐石' AFTER GRID_MANAGER_MOBILE; +alter table ic_epidemic_special_attention ADD column HEALTH_WORKER_MOBILE VARCHAR(32) DEFAULT '' COMMENT '基层医务工作者联系方式,需求来源于磐石' AFTER HEALTH_WORKER; + +alter table ic_epidemic_special_attention ADD column POLICE_NAME VARCHAR(32) DEFAULT '' COMMENT '民警,需求来源于磐石' AFTER HEALTH_WORKER_MOBILE; +alter table ic_epidemic_special_attention ADD column POLICE_MOBILE VARCHAR(32) DEFAULT '' COMMENT '民警联系方式,需求来源于磐石' AFTER POLICE_NAME; + +alter table ic_epidemic_special_attention ADD column VOLUNTEER_NAME VARCHAR(32) DEFAULT '' COMMENT '志愿者,需求来源于磐石' AFTER POLICE_MOBILE; +alter table ic_epidemic_special_attention ADD column VOLUNTEER_MOBILE VARCHAR(32) DEFAULT '' COMMENT '志愿者联系方式,需求来源于磐石' AFTER VOLUNTEER_NAME; diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.83__alter_ic_trip_report.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.83__alter_ic_trip_report.sql new file mode 100644 index 0000000000..847f53f326 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.83__alter_ic_trip_report.sql @@ -0,0 +1,22 @@ +ALTER TABLE `ic_trip_report_record` +ADD COLUMN `traffic_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交通方式,来源字典表(traffic_type)' AFTER `UPDATED_TIME`, +ADD COLUMN `traffic_type_explain` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他返回方式,交通方式为其他时此列需要有值' AFTER `traffic_type`, +ADD COLUMN `source_detail_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源地详细信息(source_address字段的说明)' AFTER `traffic_type_explain`, +ADD COLUMN `vaccine_num` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '疫苗接种针次 (0针 1针 2针 3针)【小寨子】' AFTER `source_detail_address`, +ADD COLUMN `is_nat_record` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否有48小时核算记录 0:否 1:是 【小寨子】' AFTER `vaccine_num`, +ADD COLUMN `registered_residence` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '户籍地 【磐石】' AFTER `is_nat_record`, +ADD COLUMN `age` int(11) NULL DEFAULT NULL COMMENT '年龄【磐石】' AFTER `registered_residence`, +ADD COLUMN `describe_content` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来曹事由【磐石】' AFTER `age`, +ADD COLUMN `nat_outcome` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '48小时核算检查结果(0:阴性 1:阳性)【磐石】' AFTER `describe_content`, +ADD COLUMN `sojourn_history` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '7天内旅居史情况,字典表(sojourn_history)【磐石】' AFTER `nat_outcome`, +ADD COLUMN `isolate_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '隔离状态,字典表(isolate_type)【磐石】' AFTER `sojourn_history`, +ADD COLUMN `is_arrive_check` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否落实\"落地检\" 0:否 1:是【磐石】' AFTER `isolate_type`, +ADD COLUMN `is_arrive` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否达到曹县 0:否 1:是 【磐石】' AFTER `is_arrive_check`, +ADD COLUMN `reporting_time` date NULL DEFAULT NULL COMMENT '上报时间【磐石】' AFTER `is_arrive`, +ADD COLUMN `control_measures` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管控措施【磐石】' AFTER `reporting_time`, +ADD COLUMN `trip_data_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '行程记录类型,字典表(trip_data_type)【磐石】' AFTER `control_measures`; + + +ALTER TABLE `ic_trip_report_record` +DROP COLUMN `age`; + diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.84__ic_danger_area.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.84__ic_danger_area.sql new file mode 100644 index 0000000000..5fd0915a68 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.84__ic_danger_area.sql @@ -0,0 +1,20 @@ +CREATE TABLE `ic_danger_area` +( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `DANGER_LEVEL` varchar(10) NOT NULL COMMENT '风险等级;字典表key【dangerAreaLevel】\n0:低风险;\n1:中风险;\n2:高风险;', + `PROVINCE` varchar(255) NOT NULL COMMENT '省', + `CITY` varchar(255) DEFAULT NULL COMMENT '市', + `DISTRICT` varchar(255) DEFAULT NULL COMMENT '区', + `ALL_NAME` varchar(255) NOT NULL COMMENT '省-市-区', + `ALL_NAME_CODE` varchar(255) DEFAULT NULL, + `DEL_FLAG` int(11) NOT NULL, + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='疫情风险地区'; + +alter table ic_vaccine_prarmeter MODIFY COLUMN `ID_CARD` varchar(32) NOT NULL COMMENT '身份证号'; \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.85__ic_volunteer_poly.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.85__ic_volunteer_poly.sql new file mode 100644 index 0000000000..da82f0f859 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.85__ic_volunteer_poly.sql @@ -0,0 +1,3 @@ +alter table ic_volunteer_poly MODIFY COLUMN `ID_CARD` varchar(32) NOT NULL COMMENT '身份证号'; + +alter table ic_volunteer_poly_category MODIFY COLUMN `ID_CARD` varchar(32) NOT NULL COMMENT '身份证号'; \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.86__alter_ic_trip_report.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.86__alter_ic_trip_report.sql new file mode 100644 index 0000000000..6dc48b9a8c --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.86__alter_ic_trip_report.sql @@ -0,0 +1,3 @@ + +ALTER TABLE `ic_trip_report_record` +ADD COLUMN `pass_by` varchar(255) NULL COMMENT '7天内到达或途径【磐石】' AFTER `registered_residence`; diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.87__alter_ic_vaccine_relation.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.87__alter_ic_vaccine_relation.sql new file mode 100644 index 0000000000..68b0546001 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.87__alter_ic_vaccine_relation.sql @@ -0,0 +1,5 @@ + +ALTER TABLE `ic_vaccine_relation` +ADD COLUMN `IS_LOCAL_RESI_USER` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否本辖区居民,1:是;0:否' AFTER `USER_TYPE`; + + diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/attention_nat_template.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/attention_nat_template.xlsx index de79811f24..e0d2c01236 100644 Binary files a/epmet-user/epmet-user-server/src/main/resources/excel/attention_nat_template.xlsx and b/epmet-user/epmet-user-server/src/main/resources/excel/attention_nat_template.xlsx differ diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_danger_area_template.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/ic_danger_area_template.xlsx new file mode 100644 index 0000000000..9de75f77af Binary files /dev/null and b/epmet-user/epmet-user-server/src/main/resources/excel/ic_danger_area_template.xlsx differ diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xls b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xls index f93667a3bd..4d7e3660d7 100644 Binary files a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xls and b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template.xls differ diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template_old_20221108.xls b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template_old_20221108.xls new file mode 100644 index 0000000000..ce86cfdefd Binary files /dev/null and b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_import_template_old_20221108.xls differ diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx index 0dfc8ad7f4..7d0305a997 100644 Binary files a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx and b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx differ diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ps_trip_report_import_template.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/ps_trip_report_import_template.xlsx new file mode 100644 index 0000000000..c4423b8e88 Binary files /dev/null and b/epmet-user/epmet-user-server/src/main/resources/excel/ps_trip_report_import_template.xlsx differ diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/trip_report_import_template.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/trip_report_import_template.xlsx index e360db9aad..ee0801f89c 100644 Binary files a/epmet-user/epmet-user-server/src/main/resources/excel/trip_report_import_template.xlsx and b/epmet-user/epmet-user-server/src/main/resources/excel/trip_report_import_template.xlsx differ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml index 36a6f06002..f0e6b117b8 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml @@ -28,6 +28,7 @@ SELECT d.id, u.id AS userId, + u.id as icResiUserId, d.GRID_ID, u.`NAME`, d.ID_CARD, diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeRelocationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeRelocationDao.xml index 8bdf2847fe..ad3e22e893 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeRelocationDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/ChangeRelocationDao.xml @@ -39,6 +39,7 @@ SELECT r.id, u.`NAME`, + u.STATUS, r.ID_CARD, u.GENDER, r.age, @@ -64,7 +65,8 @@ r.CREATED_TIME, r.UPDATED_TIME, r.OUT_OF_TIME, - r.IC_USER_ID + r.IC_USER_ID, + r.IC_USER_ID as icResiUserId FROM pli_change_relocation r LEFT JOIN ic_resi_user u ON u.ID_CARD = r.ID_CARD diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncConfigDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncConfigDao.xml index 911b5102bd..7b0e96f023 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncConfigDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncConfigDao.xml @@ -70,7 +70,8 @@ ${categoryColumn} AS categoryColumn, - pids + pids, + mobile FROM ic_resi_user WHERE DEL_FLAG = '0' diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcBirthRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcBirthRecordDao.xml index 52a3ce76eb..b4b8b4894b 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcBirthRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcBirthRecordDao.xml @@ -34,6 +34,89 @@ + - \ No newline at end of file + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcDangerAreaDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcDangerAreaDao.xml new file mode 100644 index 0000000000..b65a99872a --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcDangerAreaDao.xml @@ -0,0 +1,13 @@ + + + + + + + update ic_danger_area + set del_flag = 1, + updated_time = now() + where customer_id = #{customerId} + limit 1000 + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml index 5db13945cb..afb67b17d8 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml @@ -8,7 +8,9 @@ UPDATE ic_epidemic_special_attention SET UPDATED_TIME = NOW(), IS_ATTENTION = 0, - IS_HISTORY = '1' + IS_HISTORY = '1', + + ISOLATED_STATE = '3' WHERE del_flag = 0 AND attention_type = #{attentionType} AND id IN ( @@ -54,6 +56,67 @@ when id_card = #{item.idCard} then #{item.isolatedState} + + + + when id_card = #{item.idCard} then #{item.gkStartTime} + + + + + when id_card = #{item.idCard} then #{item.gkEndTime} + + + + + when id_card = #{item.idCard} then #{item.gbName} + + + + + when id_card = #{item.idCard} then #{item.gbMobile} + + + + + when id_card = #{item.idCard} then #{item.gridManager} + + + + + when id_card = #{item.idCard} then #{item.gridManagerMobile} + + + + + when id_card = #{item.idCard} then #{item.healthWorker} + + + + + when id_card = #{item.idCard} then #{item.healthWorkerMobile} + + + + + when id_card = #{item.idCard} then #{item.policeName} + + + + + when id_card = #{item.idCard} then #{item.policeMobile} + + + + + when id_card = #{item.idCard} then #{item.volunteerName} + + + + + when id_card = #{item.idCard} then #{item.volunteerMobile} + + updated_time = now() WHERE del_flag = 0 @@ -81,7 +144,35 @@ b.UNIT_ID, b.HOME_ID, IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime, - IFNULL(v.vaccinationCount,0) AS vaccinationCount + IFNULL(v.vaccinationCount,0) AS vaccinationCount, + ( + case when a.GK_START_TIME is not null + and a.GK_START_TIME !='' + and a.GK_END_TIME is not null + and a.GK_END_TIME !='' + then concat(a.GK_START_TIME,'-',a.GK_END_TIME) + when a.GK_START_TIME is not null and (a.GK_END_TIME is null or a.GK_END_TIME='') then a.GK_START_TIME + when (a.GK_START_TIME is null or a.GK_START_TIME ='' ) and a.GK_END_TIME is not null and a.GK_END_TIME !='' then a.GK_END_TIME + else '' + end + )as gkTime, + concat(a.GB_NAME,a.GB_MOBILE) as gb, + concat(a.GRID_MANAGER,a.GRID_MANAGER_MOBILE) as gridManagerShow, + concat(a.HEALTH_WORKER,a.HEALTH_WORKER_MOBILE) as healthWorkerShow, + concat(a.POLICE_NAME,a.POLICE_MOBILE) as policeShow, + concat(a.VOLUNTEER_NAME,a.VOLUNTEER_MOBILE) as volunteerShow, + a.GK_START_TIME, + a.GK_END_TIME, + a.GB_NAME, + a.GB_MOBILE, + a.GRID_MANAGER, + a.GRID_MANAGER_MOBILE, + a.HEALTH_WORKER, + a.HEALTH_WORKER_MOBILE, + a.POLICE_NAME, + a.POLICE_MOBILE, + a.VOLUNTEER_NAME, + a.VOLUNTEER_MOBILE FROM ic_epidemic_special_attention a LEFT JOIN ic_resi_user b ON a.id_card = b.id_card AND b.del_flag = '0' and b.CUSTOMER_ID=a.CUSTOMER_ID LEFT JOIN (SELECT id_card , CUSTOMER_ID, count(1) AS vaccinationCount, CREATED_TIME FROM ic_vaccine WHERE DEL_FLAG = 0 GROUP BY ID_CARD, CUSTOMER_ID) v ON (v.ID_CARD = a.ID_CARD and v.CUSTOMER_ID=a.CUSTOMER_ID) @@ -125,22 +216,50 @@ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml index 87e2d5f12b..9aa41b001d 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcMoveInRecordDao.xml @@ -5,74 +5,74 @@ - \ No newline at end of file + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatCompareRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatCompareRecordDao.xml index 897493f745..420e585117 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatCompareRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatCompareRecordDao.xml @@ -32,7 +32,8 @@ c.IC_RESI_USER_ID, r.CUSTOMER_ID, r.IMPORT_DATE, - r.IMPORT_TIME as importTime + r.IMPORT_TIME as importTime, + c.INTERNAL_REMARK as internalRemark FROM ic_nat_compare_rec_relation r left join ic_nat_compare_record c on (r.COMPARE_REC_ID=c.ID AND c.del_flag='0') WHERE diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 497d96a25b..9c48f39c2f 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -879,13 +879,13 @@ AND a.CUSTOMER_ID = #{customerId} - AND (AGENCY_ID = #{agencyId} OR PIDS LIKE concat( '%', #{agencyId}, '%' )) + AND (AGENCY_ID = #{agencyId} OR PIDS LIKE concat( '%', #{agencyId}, '%' )) AND ID = #{id} - AND GRID_ID = #{gridId} + AND GRID_ID = #{gridId} AND VILLAGE_ID = #{neighborId} diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml index b3e00357ac..92cb344f9f 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml @@ -7,9 +7,17 @@ + + + + + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml index 4b7203f075..c5717beea3 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml @@ -25,7 +25,7 @@ WHERE del_flag = '0' AND ic_user_id = #{icUserId} - ORDER BY change_time DESC, type ASC + ORDER BY CREATED_TIME DESC, type ASC @@ -81,4 +81,4 @@ where IC_USER_ID = #{icResiUserId} - \ No newline at end of file + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml index b8113074cf..458a917ab6 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml @@ -35,6 +35,7 @@ a.IC_VACCINE_ID AS vaccineId, a.agency_id, a.user_type, + a.is_local_resi_user isLocalResiUser, b.`name`, b.mobile, b.id_card, @@ -63,7 +64,7 @@ AND b.INOCULATE_TIME #{endTime} - AND b.IS_RESI_USER = #{isResiUser} + AND a.is_local_resi_user = #{isResiUser} ORDER BY b.INOCULATE_TIME DESC, b.id ASC @@ -183,4 +184,60 @@ and ID_CARD = #{idCard} and DATE_FORMAT( INOCULATE_TIME, '%Y-%m-%d' ) = #{time} + + + + + UPDATE ic_vaccine_relation + + + + when ID = #{l.relationId} then #{l.isLocalResiUser} + + + updated_time = NOW() + + WHERE ID IN( + + #{l.relationId} + ) + + + UPDATE ic_vaccine_relation a + INNER JOIN ic_vaccine b ON a.ic_vaccine_id = b.id + set a.is_local_resi_user = #{isLocalResiUser}, + a.updated_time = NOW() + where a.user_type != 'import' + + and b.USER_ID is not null + and b.USER_ID != '' + + + and (b.USER_ID is null or b.USER_ID ='') + + + + +