From 35a3c587e6f2fe9ffc2588d549a6f26d8b6ad3b6 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 3 Nov 2022 10:25:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=98=AF=E7=A3=90=E7=9F=B37?= =?UTF-8?q?=E5=A4=A9=E6=97=85=E5=B1=85=E5=8F=B2=E8=B5=8B=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcTripReportRecordServiceImpl.java | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java index bd627a273c..b663a0ea1f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java @@ -215,6 +215,29 @@ 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");//无风险 + } + } }else {//其他客户 if(StringUtils.isEmpty(formDTO.getVaccineNum())||StringUtils.isEmpty(formDTO.getIsNatRecord())){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "疫苗接种针次和48小时核算记录为必填", "疫苗接种针次和48小时核算记录为必填"); @@ -350,6 +373,29 @@ 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");//无风险 + } + } }else {//其他客户 if(StringUtils.isEmpty(formDTO.getVaccineNum())||StringUtils.isEmpty(formDTO.getIsNatRecord())){ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "疫苗接种针次和48小时核算记录为必填", "疫苗接种针次和48小时核算记录为必填");