Commit 69a5c39c by zhangxingmin

校验

parent 45a2385d
...@@ -24,4 +24,14 @@ public class CustomerTypeIndividualCheckCommonDto { ...@@ -24,4 +24,14 @@ public class CustomerTypeIndividualCheckCommonDto {
* 性别(字典) * 性别(字典)
*/ */
private String gender; private String gender;
/**
* 证件类型(字典)
*/
private String documentType;
/**
* 证件号码
*/
private String idNumber;
} }
...@@ -282,9 +282,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -282,9 +282,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
if (Objects.isNull(dto.getEachIssuePremium())) { if (Objects.isNull(dto.getEachIssuePremium())) {
throw new BusinessException(tipStr+"每期保费不能为空"); throw new BusinessException(tipStr+"每期保费不能为空");
} }
if (Objects.isNull(dto.getSumInsured())) { // if (Objects.isNull(dto.getSumInsured())) {
throw new BusinessException(tipStr+"保额不能为空"); // throw new BusinessException(tipStr+"保额不能为空");
} // }
if (Objects.isNull(dto.getIsPrepay())) { if (Objects.isNull(dto.getIsPrepay())) {
throw new BusinessException(tipStr+"是否预缴保费不能为空"); throw new BusinessException(tipStr+"是否预缴保费不能为空");
} }
...@@ -326,9 +326,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -326,9 +326,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
if (Objects.isNull(dto.getPremium())) { if (Objects.isNull(dto.getPremium())) {
throw new BusinessException(tipStr+"第"+i+"项的保费不能为空"); throw new BusinessException(tipStr+"第"+i+"项的保费不能为空");
} }
if (Objects.isNull(dto.getSumInsured())) { // if (Objects.isNull(dto.getSumInsured())) {
throw new BusinessException(tipStr+"第"+i+"项的保额不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的保额不能为空");
} // }
i++; i++;
} }
return Result.success(); return Result.success();
...@@ -362,9 +362,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -362,9 +362,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
if (Objects.isNull(dto.getPremium())) { if (Objects.isNull(dto.getPremium())) {
throw new BusinessException(tipStr+"保费不能为空"); throw new BusinessException(tipStr+"保费不能为空");
} }
if (Objects.isNull(dto.getSumInsured())) { // if (Objects.isNull(dto.getSumInsured())) {
throw new BusinessException(tipStr+"保额不能为空"); // throw new BusinessException(tipStr+"保额不能为空");
} // }
return Result.success(); return Result.success();
} }
...@@ -578,9 +578,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -578,9 +578,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) { if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) {
//客户类型为个人的字段校验 //客户类型为个人的字段校验
//校验客户类型为个人类型的公共参数字段 //校验客户类型为个人类型的公共参数字段
if (StringUtils.isBlank(dto.getName())) { // if (StringUtils.isBlank(dto.getName())) {
throw new BusinessException(tipStr+"第"+i+"项的名字不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的名字不能为空");
} // }
if (StringUtils.isBlank(dto.getNameEn())) { if (StringUtils.isBlank(dto.getNameEn())) {
throw new BusinessException(tipStr+"第"+i+"项的名字-英文不能为空"); throw new BusinessException(tipStr+"第"+i+"项的名字-英文不能为空");
} }
...@@ -825,15 +825,21 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -825,15 +825,21 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
* @return * @return
*/ */
public Result checkCustomerTypeIndividualCheckCommonDto(CustomerTypeIndividualCheckCommonDto dto,String tipStr){ public Result checkCustomerTypeIndividualCheckCommonDto(CustomerTypeIndividualCheckCommonDto dto,String tipStr){
if (StringUtils.isBlank(dto.getName())) { // if (StringUtils.isBlank(dto.getName())) {
throw new BusinessException(tipStr+"名字不能为空"); // throw new BusinessException(tipStr+"名字不能为空");
} // }
if (StringUtils.isBlank(dto.getNameEn())) { if (StringUtils.isBlank(dto.getNameEn())) {
throw new BusinessException(tipStr+"名字-英文不能为空"); throw new BusinessException(tipStr+"名字-英文不能为空");
} }
if (StringUtils.isBlank(dto.getGender())) { if (StringUtils.isBlank(dto.getGender())) {
throw new BusinessException(tipStr+"性别不能为空"); throw new BusinessException(tipStr+"性别不能为空");
} }
if (StringUtils.isBlank(dto.getDocumentType())) {
throw new BusinessException(tipStr+"证件类型不能为空");
}
if (StringUtils.isBlank(dto.getIdNumber())) {
throw new BusinessException(tipStr+"证件号码不能为空");
}
return Result.success(); return Result.success();
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment