|
|
@ -206,19 +206,9 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public String save(IcTripReportFormDTO formDTO) { |
|
|
|
//按客户校验参数
|
|
|
|
if ("5".equals(formDTO.getTrafficType()) && StringUtils.isBlank(formDTO.getTrafficTypeExplain())) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "返回方式为其他时,“其他返回方式”为必填", "返回方式为其他时,“其他返回方式”为必填"); |
|
|
|
} |
|
|
|
//磐石
|
|
|
|
//if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){
|
|
|
|
if("45687aa479955f9d06204d415238f7cc".equals(formDTO.getCustomerId())){ |
|
|
|
if(StringUtils.isEmpty(formDTO.getRegisteredResidence())){ |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "户籍地为必填", "户籍地为必填"); |
|
|
|
} |
|
|
|
if(StringUtils.isEmpty(formDTO.getNatOutcome())){ |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "48小时核算记录为必填", "48小时核算记录为必填"); |
|
|
|
} |
|
|
|
//判断是磐石客户的7天内旅居史情况没值的按逻辑赋值
|
|
|
|
if (StringUtils.isEmpty(formDTO.getSojournHistory())) { |
|
|
|
//风险地区数据
|
|
|
@ -242,10 +232,6 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR |
|
|
|
formDTO.setSojournHistory("3");//无风险
|
|
|
|
} |
|
|
|
} |
|
|
|
}else {//其他客户
|
|
|
|
if(StringUtils.isEmpty(formDTO.getVaccineNum())||StringUtils.isEmpty(formDTO.getIsNatRecord())){ |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "疫苗接种针次和48小时核算记录为必填", "疫苗接种针次和48小时核算记录为必填"); |
|
|
|
} |
|
|
|
} |
|
|
|
//如果是单个录入的,默认数据属于当前用户所属组织id
|
|
|
|
if(IcResiUserConstant.USER_TYPE_INPUT.equals(formDTO.getUserType())){ |
|
|
@ -368,19 +354,9 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public String resiSave(IcTripReportFormDTO formDTO) { |
|
|
|
//按客户校验参数
|
|
|
|
if ("5".equals(formDTO.getTrafficType()) && StringUtils.isBlank(formDTO.getTrafficTypeExplain())) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "返回方式为其他时,“其他返回方式”为必填", "返回方式为其他时,“其他返回方式”为必填"); |
|
|
|
} |
|
|
|
//磐石
|
|
|
|
//if(StrConstant.PS_CUSTOMER_ID.equals(formDTO.getCustomerId())){
|
|
|
|
if("45687aa479955f9d06204d415238f7cc".equals(formDTO.getCustomerId())){ |
|
|
|
if(StringUtils.isEmpty(formDTO.getRegisteredResidence())){ |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "户籍地为必填", "户籍地为必填"); |
|
|
|
} |
|
|
|
if(StringUtils.isEmpty(formDTO.getNatOutcome())){ |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "48小时核算记录为必填", "48小时核算记录为必填"); |
|
|
|
} |
|
|
|
//判断是磐石客户的7天内旅居史情况没值的按逻辑赋值
|
|
|
|
if (StringUtils.isEmpty(formDTO.getSojournHistory())) { |
|
|
|
//风险地区数据
|
|
|
@ -404,10 +380,6 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR |
|
|
|
formDTO.setSojournHistory("3");//无风险
|
|
|
|
} |
|
|
|
} |
|
|
|
}else {//其他客户
|
|
|
|
if(StringUtils.isEmpty(formDTO.getVaccineNum())||StringUtils.isEmpty(formDTO.getIsNatRecord())){ |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "疫苗接种针次和48小时核算记录为必填", "疫苗接种针次和48小时核算记录为必填"); |
|
|
|
} |
|
|
|
} |
|
|
|
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(formDTO.getGridId()); |
|
|
|
if (null == gridInfoCache) { |
|
|
|