Commit 7b943b2c by zhangxingmin

预约-v1版本

parent 477ad0a9
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="Encoding"> <component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/yd-csf-api/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/yd-csf-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/yd-csf-api/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/yd-csf-api/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/yd-csf-feign/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/yd-csf-feign/src/main/java" charset="UTF-8" />
......
...@@ -97,6 +97,12 @@ ...@@ -97,6 +97,12 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId> <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency> </dependency>
<!-- 如果使用pinyin4j进行拼音转换 -->
<dependency>
<groupId>com.belerweb</groupId>
<artifactId>pinyin4j</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
package com.yd.csf.api.controller; package com.yd.csf.api.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yd.common.exception.BusinessException;
import com.yd.common.result.Result; import com.yd.common.result.Result;
import com.yd.csf.api.service.ApiAppointmentService; import com.yd.csf.api.service.ApiAppointmentService;
import com.yd.csf.feign.client.appointment.ApiAppointmentFeignClient; import com.yd.csf.feign.client.appointment.ApiAppointmentFeignClient;
import com.yd.csf.feign.dto.appointment.ApiAppointmentInfoDto; import com.yd.csf.feign.dto.appointment.ApiAppointmentInfoDto;
import com.yd.csf.feign.dto.appointment.ApiInsurantInfoDto;
import com.yd.csf.feign.request.appointment.*; import com.yd.csf.feign.request.appointment.*;
import com.yd.csf.feign.response.appointment.ApiAppointmentAddResponse; import com.yd.csf.feign.response.appointment.*;
import com.yd.csf.feign.response.appointment.ApiAppointmentDetailResponse; import com.yd.csf.feign.valid.GroupValid;
import com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.util.Objects;
import java.util.Set;
/** /**
* 预约信息 * 预约信息
...@@ -30,6 +35,11 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient { ...@@ -30,6 +35,11 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient {
@Autowired @Autowired
private ApiAppointmentService apiAppointmentService; private ApiAppointmentService apiAppointmentService;
private final Validator validator;
public ApiAppointmentController(Validator validator) {
this.validator = validator;
}
/** /**
* 预约分页查询 * 预约分页查询
* @param request * @param request
...@@ -67,6 +77,10 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient { ...@@ -67,6 +77,10 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient {
*/ */
@Override @Override
public Result<ApiAppointmentAddResponse> add(ApiAppointmentAddRequest request) { public Result<ApiAppointmentAddResponse> add(ApiAppointmentAddRequest request) {
//手动校验受保人信息(因为它没有 @Valid 注解)
ApiInsurantInfoDto insurantInfo = request.getApiInsurantInfoDto();
validateInsurantInfo(insurantInfo);
return apiAppointmentService.add(request); return apiAppointmentService.add(request);
} }
...@@ -87,10 +101,24 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient { ...@@ -87,10 +101,24 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient {
*/ */
@Override @Override
public Result edit(ApiAppointmentEditRequest request) { public Result edit(ApiAppointmentEditRequest request) {
//手动校验受保人信息(因为它没有 @Valid 注解)
ApiInsurantInfoDto insurantInfo = request.getApiInsurantInfoDto();
validateInsurantInfo(insurantInfo);
return apiAppointmentService.edit(request); return apiAppointmentService.edit(request);
} }
/** /**
* 编辑预约暂存 (聚合信息编辑预约暂存)
* @param request
* @return
*/
@Override
public Result editStorage(ApiAppointmentEditStorageRequest request) {
return apiAppointmentService.editStorage(request);
}
/**
* 确定预约时间提交 (流程流转到新单跟进) * 确定预约时间提交 (流程流转到新单跟进)
* @param request * @param request
* @return * @return
...@@ -161,6 +189,16 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient { ...@@ -161,6 +189,16 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient {
} }
/** /**
* 编辑预约状态
* @param request
* @return
*/
@Override
public Result editStatus(ApiAppointmentEditStatusRequest request) {
return apiAppointmentService.editStatus(request);
}
/**
* 删除预约信息 * 删除预约信息
* @param appointmentBizId * @param appointmentBizId
* @return * @return
...@@ -170,5 +208,54 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient { ...@@ -170,5 +208,54 @@ public class ApiAppointmentController implements ApiAppointmentFeignClient {
return apiAppointmentService.del(appointmentBizId); return apiAppointmentService.del(appointmentBizId);
} }
/**
* 历史记录 - 签约信息
* @param request
* @return
*/
@Override
public Result<IPage<ApiAppointmentLogPageResponse>> logPage(ApiAppointmentLogPageRequest request) {
return apiAppointmentService.logPage(request);
}
/**
* 历史记录 - 签约信息 - 详情
* @param appointmentLogBizId
* @return
*/
@Override
public Result<ApiAppointmentLogDetailResponse> logDetail(String appointmentLogBizId) {
return apiAppointmentService.logDetail(appointmentLogBizId);
}
/**
* 手动校验受保人信息
* @param insurantInfo
*/
private void validateInsurantInfo(ApiInsurantInfoDto insurantInfo) {
if (Objects.isNull(insurantInfo)) {
throw new BusinessException("受保人信息不能为空");
}
// 根据与投保人关系选择校验组
Class<?>[] groups;
if (insurantInfo.isSelf()) {
// 本人关系:只校验 Always 组
groups = new Class<?>[]{GroupValid.Always.class};
} else {
// 非本人关系:校验 Always 和 NotSelf 组
groups = new Class<?>[]{GroupValid.Always.class, GroupValid.NotSelf.class};
}
// 执行手动校验
Set<ConstraintViolation<ApiInsurantInfoDto>> violations =
validator.validate(insurantInfo, groups);
// 如果校验失败,抛出业务异常
if (!violations.isEmpty()) {
String errorMessage = violations.iterator().next().getMessage();
throw new BusinessException(errorMessage);
}
}
} }
package com.yd.csf.api.controller;
import com.yd.common.result.Result;
import com.yd.csf.api.service.ApiCsfCommonService;
import com.yd.csf.feign.client.common.ApiCsfCommonFeignClient;
import com.yd.csf.feign.request.common.ApiCsfCalculateRequest;
import com.yd.csf.feign.response.common.ApiCsfCalculateResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 公共接口信息
*
* @author zxm
* @since 2025-12-18
*/
@RestController
@RequestMapping("/common")
@Validated
public class ApiCsfCommonController implements ApiCsfCommonFeignClient {
@Autowired
private ApiCsfCommonService apiCsfCommonService;
/**
* 计算-字段值
* @param request
* @return
*/
@Override
public Result<List<ApiCsfCalculateResponse>> calculate(ApiCsfCalculateRequest request) {
return apiCsfCommonService.calculate(request);
}
}
package com.yd.csf.api.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 预约信息日志表(快照表) 前端控制器
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@RestController
@RequestMapping("/appointmentLog")
public class AppointmentLogController {
}
package com.yd.csf.api.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 预约-转介人信息表 前端控制器
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@RestController
@RequestMapping("/appointmentReferrer")
public class AppointmentReferrerController {
}
package com.yd.csf.api.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 预约-转介人信息日志表(快照表) 前端控制器
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@RestController
@RequestMapping("/appointmentReferrerLog")
public class AppointmentReferrerLogController {
}
package com.yd.csf.api.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 预约-签单员信息表 前端控制器
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@RestController
@RequestMapping("/appointmentUserSign")
public class AppointmentUserSignController {
}
package com.yd.csf.api.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 预约-签单员信息日志表(快照表) 前端控制器
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@RestController
@RequestMapping("/appointmentUserSignLog")
public class AppointmentUserSignLogController {
}
package com.yd.csf.api.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 税务信息表 前端控制器
* </p>
*
* @author zxm
* @since 2025-12-17
*/
@RestController
@RequestMapping("/taxation")
public class TaxationController {
}
package com.yd.csf.api.service;
import com.yd.common.result.Result;
import com.yd.csf.service.model.Appointment;
public interface ApiAppointmentLogService {
Result<String> saveAppointmentLog(Appointment appointment);
}
package com.yd.csf.api.service;
import com.yd.common.result.Result;
import com.yd.csf.feign.dto.appointment.ApiAppointmentReferrerDto;
import java.util.List;
public interface ApiAppointmentReferrerLogService {
Result saveAppointmentReferrerLogList(List<ApiAppointmentReferrerDto> referrerDtoList,
String appointmentLogBizId);
}
package com.yd.csf.api.service;
import com.yd.common.result.Result;
import com.yd.csf.feign.dto.appointment.ApiAppointmentReferrerDto;
import java.util.List;
public interface ApiAppointmentReferrerService {
Result saveAppointmentReferrerList(List<ApiAppointmentReferrerDto> referrerDtoList,
String appointmentBizId);
}
...@@ -4,9 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,9 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yd.common.result.Result; import com.yd.common.result.Result;
import com.yd.csf.feign.dto.appointment.ApiAppointmentInfoDto; import com.yd.csf.feign.dto.appointment.ApiAppointmentInfoDto;
import com.yd.csf.feign.request.appointment.*; import com.yd.csf.feign.request.appointment.*;
import com.yd.csf.feign.response.appointment.ApiAppointmentAddResponse; import com.yd.csf.feign.response.appointment.*;
import com.yd.csf.feign.response.appointment.ApiAppointmentDetailResponse;
import com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse;
import com.yd.csf.service.model.Appointment; import com.yd.csf.service.model.Appointment;
public interface ApiAppointmentService { public interface ApiAppointmentService {
...@@ -22,6 +20,8 @@ public interface ApiAppointmentService { ...@@ -22,6 +20,8 @@ public interface ApiAppointmentService {
Result edit(ApiAppointmentEditRequest request); Result edit(ApiAppointmentEditRequest request);
Result editStorage(ApiAppointmentEditStorageRequest request);
Result editConfirmTime(ApiAppointmentEditConfirmTimeRequest request); Result editConfirmTime(ApiAppointmentEditConfirmTimeRequest request);
Result singleEdit(ApiAppointmentInfoDto apiAppointmentInfoDto); Result singleEdit(ApiAppointmentInfoDto apiAppointmentInfoDto);
...@@ -36,7 +36,13 @@ public interface ApiAppointmentService { ...@@ -36,7 +36,13 @@ public interface ApiAppointmentService {
Result editPolicyTransfer(ApiPolicyTransferRequest request); Result editPolicyTransfer(ApiPolicyTransferRequest request);
Result editStatus(ApiAppointmentEditStatusRequest request);
Result del(String appointmentBizId); Result del(String appointmentBizId);
Result<IPage<ApiAppointmentLogPageResponse>> logPage(ApiAppointmentLogPageRequest request);
Result<ApiAppointmentLogDetailResponse> logDetail(String appointmentLogBizId);
Result<Appointment> checkAppointmentIsExist(String appointmentBizId); Result<Appointment> checkAppointmentIsExist(String appointmentBizId);
} }
package com.yd.csf.api.service;
import com.yd.common.result.Result;
import com.yd.csf.feign.dto.appointment.ApiAppointmentUserSignDto;
import java.util.List;
public interface ApiAppointmentUserSignLogService {
Result saveAppointmentUserSignLogList(List<ApiAppointmentUserSignDto> userSignDtoList,
String appointmentLogBizId);
}
package com.yd.csf.api.service;
import com.yd.common.result.Result;
import com.yd.csf.feign.dto.appointment.ApiAppointmentUserSignDto;
import java.util.List;
public interface ApiAppointmentUserSignService {
Result saveAppointmentUserSignList(List<ApiAppointmentUserSignDto> userSignDtoList,
String appointmentBizId);
}
package com.yd.csf.api.service;
import com.yd.common.result.Result;
import com.yd.csf.feign.request.common.ApiCsfCalculateRequest;
import com.yd.csf.feign.response.common.ApiCsfCalculateResponse;
import java.util.List;
public interface ApiCsfCommonService {
Result<List<ApiCsfCalculateResponse>> calculate(ApiCsfCalculateRequest request);
}
...@@ -9,7 +9,7 @@ import com.yd.csf.feign.dto.appointment.*; ...@@ -9,7 +9,7 @@ import com.yd.csf.feign.dto.appointment.*;
import com.yd.csf.feign.request.appointment.ApiAppointmentAddRequest; import com.yd.csf.feign.request.appointment.ApiAppointmentAddRequest;
import com.yd.csf.feign.request.appointment.ApiAppointmentEditRequest; import com.yd.csf.feign.request.appointment.ApiAppointmentEditRequest;
import com.yd.csf.service.enums.CustomerTypeEnum; import com.yd.csf.service.enums.CustomerTypeEnum;
import com.yd.csf.service.enums.RelTypeEnum; import com.yd.csf.feign.enums.RelTypeEnum;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -92,15 +92,15 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -92,15 +92,15 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
dto = new ApiAppointmentInfoDto(); dto = new ApiAppointmentInfoDto();
} }
String tipStr = "预约信息-"; String tipStr = "预约信息-";
if (!Objects.isNull(dto.getId())) { // if (!Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"预约信息表主键id不传值"); // throw new BusinessException(tipStr+"预约信息表主键id不传值");
} // }
if (StringUtils.isNotBlank(dto.getAppointmentBizId())) { if (StringUtils.isNotBlank(dto.getAppointmentBizId())) {
throw new BusinessException(tipStr+"预约信息主表唯一业务ID不传值"); throw new BusinessException(tipStr+"预约信息主表唯一业务ID不传值");
} }
if (StringUtils.isNotBlank(dto.getAppointmentNo())) { // if (StringUtils.isNotBlank(dto.getAppointmentNo())) {
throw new BusinessException(tipStr+"预约编号不传值"); // throw new BusinessException(tipStr+"预约编号不传值");
} // }
//校验预约信息参数公共方法 //校验预约信息参数公共方法
checkApiAppointmentInfoDtoCommon(dto,tipStr); checkApiAppointmentInfoDtoCommon(dto,tipStr);
...@@ -114,15 +114,15 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -114,15 +114,15 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
*/ */
public Result checkEditApiAppointmentInfoDto(ApiAppointmentInfoDto dto) { public Result checkEditApiAppointmentInfoDto(ApiAppointmentInfoDto dto) {
String tipStr = "预约信息-"; String tipStr = "预约信息-";
if (Objects.isNull(dto.getId())) { // if (Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"预约信息表主键id不能为空"); // throw new BusinessException(tipStr+"预约信息表主键id不能为空");
} // }
if (StringUtils.isBlank(dto.getAppointmentBizId())) { if (StringUtils.isBlank(dto.getAppointmentBizId())) {
throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空"); throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空");
} }
if (StringUtils.isBlank(dto.getAppointmentNo())) { // if (StringUtils.isBlank(dto.getAppointmentNo())) {
throw new BusinessException(tipStr+"预约编号不能为空"); // throw new BusinessException(tipStr+"预约编号不能为空");
} // }
//校验预约信息参数公共方法 //校验预约信息参数公共方法
checkApiAppointmentInfoDtoCommon(dto,tipStr); checkApiAppointmentInfoDtoCommon(dto,tipStr);
...@@ -138,9 +138,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -138,9 +138,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
if (StringUtils.isBlank(dto.getApplyType())) { if (StringUtils.isBlank(dto.getApplyType())) {
throw new BusinessException(tipStr+"申请类型不能为空"); throw new BusinessException(tipStr+"申请类型不能为空");
} }
if (Objects.isNull(dto.getIntentionAppointmentTime())) { // if (Objects.isNull(dto.getIntentionAppointmentTime())) {
throw new BusinessException(tipStr+"意向预约时间不能为空"); // throw new BusinessException(tipStr+"意向预约时间不能为空");
} // }
//校验预约信息-客户和fna入参 //校验预约信息-客户和fna入参
checkCustomerAndFna(dto,tipStr); checkCustomerAndFna(dto,tipStr);
...@@ -221,12 +221,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -221,12 +221,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
dto = new ApiProductPlanMainInfoDto(); dto = new ApiProductPlanMainInfoDto();
} }
String tipStr = "产品计划-"; String tipStr = "产品计划-";
if (!Objects.isNull(dto.getId())) { // if (!Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"产品计划表主键id不传值"); // throw new BusinessException(tipStr+"产品计划表主键id不传值");
} // }
if (StringUtils.isNotBlank(dto.getAppointmentBizId())) { // if (StringUtils.isNotBlank(dto.getAppointmentBizId())) {
throw new BusinessException(tipStr+"预约信息主表唯一业务ID不传值"); // throw new BusinessException(tipStr+"预约信息主表唯一业务ID不传值");
} // }
if (StringUtils.isNotBlank(dto.getPlanBizId())) { if (StringUtils.isNotBlank(dto.getPlanBizId())) {
throw new BusinessException(tipStr+"产品计划信息表唯一业务ID不传值"); throw new BusinessException(tipStr+"产品计划信息表唯一业务ID不传值");
} }
...@@ -243,12 +243,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -243,12 +243,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
*/ */
public Result checkEditApiProductPlanMainInfoDto(ApiProductPlanMainInfoDto dto){ public Result checkEditApiProductPlanMainInfoDto(ApiProductPlanMainInfoDto dto){
String tipStr = "产品计划-"; String tipStr = "产品计划-";
if (Objects.isNull(dto.getId())) { // if (Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"产品计划表主键id不能为空"); // throw new BusinessException(tipStr+"产品计划表主键id不能为空");
} // }
if (StringUtils.isBlank(dto.getAppointmentBizId())) { // if (StringUtils.isBlank(dto.getAppointmentBizId())) {
throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空"); // throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空");
} // }
if (StringUtils.isBlank(dto.getPlanBizId())) { if (StringUtils.isBlank(dto.getPlanBizId())) {
throw new BusinessException(tipStr+"产品计划信息表唯一业务ID不能为空"); throw new BusinessException(tipStr+"产品计划信息表唯一业务ID不能为空");
} }
...@@ -264,18 +264,18 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -264,18 +264,18 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
* @return * @return
*/ */
public Result checkApiProductPlanMainInfoDtoCommon(ApiProductPlanMainInfoDto dto,String tipStr,Integer source) { public Result checkApiProductPlanMainInfoDtoCommon(ApiProductPlanMainInfoDto dto,String tipStr,Integer source) {
if (StringUtils.isBlank(dto.getProductBizId())) { // if (StringUtils.isBlank(dto.getProductBizId())) {
throw new BusinessException(tipStr+"保险产品名称不能为空"); // throw new BusinessException(tipStr+"保险产品名称不能为空");
} // }
if (StringUtils.isBlank(dto.getProductName())) { // if (StringUtils.isBlank(dto.getProductName())) {
throw new BusinessException(tipStr+"保险产品名称不能为空"); // throw new BusinessException(tipStr+"保险产品名称不能为空");
} // }
if (StringUtils.isBlank(dto.getCurrency())) { // if (StringUtils.isBlank(dto.getCurrency())) {
throw new BusinessException(tipStr+"货币不能为空"); // throw new BusinessException(tipStr+"货币不能为空");
} // }
if (StringUtils.isBlank(dto.getPaymentTerm())) { // if (StringUtils.isBlank(dto.getPaymentTerm())) {
throw new BusinessException(tipStr+"供款年期不能为空"); // throw new BusinessException(tipStr+"供款年期不能为空");
} // }
if (StringUtils.isBlank(dto.getPaymentFrequency())) { if (StringUtils.isBlank(dto.getPaymentFrequency())) {
throw new BusinessException(tipStr+"付款频率不能为空"); throw new BusinessException(tipStr+"付款频率不能为空");
} }
...@@ -378,15 +378,15 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -378,15 +378,15 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
dto = new ApiPolicyholderInfoDto(); dto = new ApiPolicyholderInfoDto();
} }
String tipStr = "投保人-"; String tipStr = "投保人-";
if (StringUtils.isBlank(dto.getCustomerType())) { // if (StringUtils.isBlank(dto.getCustomerType())) {
throw new BusinessException(tipStr+"客户类型不能为空"); // throw new BusinessException(tipStr+"客户类型不能为空");
} // }
if (!Objects.isNull(dto.getId())) { // if (!Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"投保人信息主键id不传值"); // throw new BusinessException(tipStr+"投保人信息主键id不传值");
} // }
if (StringUtils.isNotBlank(dto.getAppointmentBizId())) { // if (StringUtils.isNotBlank(dto.getAppointmentBizId())) {
throw new BusinessException(tipStr+"预约信息主表唯一业务ID不传值"); // throw new BusinessException(tipStr+"预约信息主表唯一业务ID不传值");
} // }
if (StringUtils.isNotBlank(dto.getPolicyholderBizId())) { if (StringUtils.isNotBlank(dto.getPolicyholderBizId())) {
throw new BusinessException(tipStr+"投保人信息表唯一业务ID不传值"); throw new BusinessException(tipStr+"投保人信息表唯一业务ID不传值");
} }
...@@ -406,15 +406,15 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -406,15 +406,15 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
*/ */
public Result checkEditApiPolicyholderInfoDto(ApiPolicyholderInfoDto dto) { public Result checkEditApiPolicyholderInfoDto(ApiPolicyholderInfoDto dto) {
String tipStr = "投保人-"; String tipStr = "投保人-";
if (StringUtils.isBlank(dto.getCustomerType())) { // if (StringUtils.isBlank(dto.getCustomerType())) {
throw new BusinessException(tipStr+"客户类型不能为空"); // throw new BusinessException(tipStr+"客户类型不能为空");
} // }
if (Objects.isNull(dto.getId())) { // if (Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"投保人信息主键id不能为空"); // throw new BusinessException(tipStr+"投保人信息主键id不能为空");
} // }
if (StringUtils.isBlank(dto.getAppointmentBizId())) { // if (StringUtils.isBlank(dto.getAppointmentBizId())) {
throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空"); // throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空");
} // }
if (StringUtils.isBlank(dto.getPolicyholderBizId())) { if (StringUtils.isBlank(dto.getPolicyholderBizId())) {
throw new BusinessException(tipStr+"投保人信息表唯一业务ID不能为空"); throw new BusinessException(tipStr+"投保人信息表唯一业务ID不能为空");
} }
...@@ -433,30 +433,30 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -433,30 +433,30 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
* @return * @return
*/ */
public Result checkApiPolicyholderInfoDtoCommon(ApiPolicyholderInfoDto dto,String tipStr) { public Result checkApiPolicyholderInfoDtoCommon(ApiPolicyholderInfoDto dto,String tipStr) {
if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) { // if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) {
//客户类型为个人的字段校验 // //客户类型为个人的字段校验
if (StringUtils.isBlank(dto.getMobile())) { // if (StringUtils.isBlank(dto.getMobile())) {
throw new BusinessException(tipStr+"移动电话不能为空"); // throw new BusinessException(tipStr+"移动电话不能为空");
} // }
if (StringUtils.isBlank(dto.getMobileCode())) { // if (StringUtils.isBlank(dto.getMobileCode())) {
throw new BusinessException(tipStr+"移动电话区号不能为空"); // throw new BusinessException(tipStr+"移动电话区号不能为空");
} // }
if (StringUtils.isBlank(dto.getNationality())) { // if (StringUtils.isBlank(dto.getNationality())) {
throw new BusinessException(tipStr+"国籍不能为空"); // throw new BusinessException(tipStr+"国籍不能为空");
} // }
//
//校验客户类型为个人类型的公共参数字段 // //校验客户类型为个人类型的公共参数字段
CustomerTypeIndividualCheckCommonDto individualCheckCommonDto = new CustomerTypeIndividualCheckCommonDto(); // CustomerTypeIndividualCheckCommonDto individualCheckCommonDto = new CustomerTypeIndividualCheckCommonDto();
BeanUtils.copyProperties(dto,individualCheckCommonDto); // BeanUtils.copyProperties(dto,individualCheckCommonDto);
checkCustomerTypeIndividualCheckCommonDto(individualCheckCommonDto,tipStr); // checkCustomerTypeIndividualCheckCommonDto(individualCheckCommonDto,tipStr);
//
}else if (CustomerTypeEnum.COMPANY.getItemValue().equals(dto.getCustomerType())){ // }else if (CustomerTypeEnum.COMPANY.getItemValue().equals(dto.getCustomerType())){
//客户类型为公司的字段校验 // //客户类型为公司的字段校验
CustomerTypeCompanyCheckCommonDto companyCheckCommonDto = new CustomerTypeCompanyCheckCommonDto(); // CustomerTypeCompanyCheckCommonDto companyCheckCommonDto = new CustomerTypeCompanyCheckCommonDto();
BeanUtils.copyProperties(dto,companyCheckCommonDto); // BeanUtils.copyProperties(dto,companyCheckCommonDto);
//校验客户类型为公司类型的公共参数字段 // //校验客户类型为公司类型的公共参数字段
checkCustomerTypeCompanyCheckCommonDto(companyCheckCommonDto,tipStr); // checkCustomerTypeCompanyCheckCommonDto(companyCheckCommonDto,tipStr);
} // }
return Result.success(); return Result.success();
} }
...@@ -470,9 +470,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -470,9 +470,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
dto = new ApiInsurantInfoDto(); dto = new ApiInsurantInfoDto();
} }
String tipStr = "受保人-"; String tipStr = "受保人-";
if (StringUtils.isBlank(dto.getCustomerType())) { // if (StringUtils.isBlank(dto.getCustomerType())) {
throw new BusinessException(tipStr+"客户类型不能为空"); // throw new BusinessException(tipStr+"客户类型不能为空");
} // }
if (StringUtils.isBlank(dto.getPolicyholderRel())) { if (StringUtils.isBlank(dto.getPolicyholderRel())) {
throw new BusinessException(tipStr+"与投保人关系不能为空"); throw new BusinessException(tipStr+"与投保人关系不能为空");
} }
...@@ -480,12 +480,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -480,12 +480,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
//如果对象空或者与投保人关系为本人,就放行不校验 //如果对象空或者与投保人关系为本人,就放行不校验
return Result.success(); return Result.success();
} }
if (!Objects.isNull(dto.getId())) { // if (!Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"受保人信息表主键id不传值"); // throw new BusinessException(tipStr+"受保人信息表主键id不传值");
} // }
if (StringUtils.isNotBlank(dto.getAppointmentBizId())) { // if (StringUtils.isNotBlank(dto.getAppointmentBizId())) {
throw new BusinessException(tipStr+"预约信息主表唯一业务ID不传值"); // throw new BusinessException(tipStr+"预约信息主表唯一业务ID不传值");
} // }
if (StringUtils.isNotBlank(dto.getInsurantBizId())) { if (StringUtils.isNotBlank(dto.getInsurantBizId())) {
throw new BusinessException(tipStr+"受保人信息表唯一业务ID不传值"); throw new BusinessException(tipStr+"受保人信息表唯一业务ID不传值");
} }
...@@ -508,9 +508,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -508,9 +508,9 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
*/ */
public Result checkEditApiInsurantInfoDto(ApiInsurantInfoDto dto) { public Result checkEditApiInsurantInfoDto(ApiInsurantInfoDto dto) {
String tipStr = "受保人-"; String tipStr = "受保人-";
if (StringUtils.isBlank(dto.getCustomerType())) { // if (StringUtils.isBlank(dto.getCustomerType())) {
throw new BusinessException(tipStr+"客户类型不能为空"); // throw new BusinessException(tipStr+"客户类型不能为空");
} // }
if (StringUtils.isBlank(dto.getPolicyholderRel())) { if (StringUtils.isBlank(dto.getPolicyholderRel())) {
throw new BusinessException(tipStr+"与投保人关系不能为空"); throw new BusinessException(tipStr+"与投保人关系不能为空");
} }
...@@ -518,12 +518,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -518,12 +518,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
//如果对象空或者与投保人关系为本人,就放行不校验 //如果对象空或者与投保人关系为本人,就放行不校验
return Result.success(); return Result.success();
} }
if (Objects.isNull(dto.getId())) { // if (Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"受保人信息表主键id不能为空"); // throw new BusinessException(tipStr+"受保人信息表主键id不能为空");
} // }
if (StringUtils.isBlank(dto.getAppointmentBizId())) { // if (StringUtils.isBlank(dto.getAppointmentBizId())) {
throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空"); // throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空");
} // }
if (StringUtils.isBlank(dto.getInsurantBizId())) { if (StringUtils.isBlank(dto.getInsurantBizId())) {
throw new BusinessException(tipStr+"受保人信息表唯一业务ID不能为空"); throw new BusinessException(tipStr+"受保人信息表唯一业务ID不能为空");
} }
...@@ -546,81 +546,81 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -546,81 +546,81 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
*/ */
@Override @Override
public Result checkEditApiBeneficiaryInfoDtoList(List<ApiBeneficiaryInfoDto> list){ public Result checkEditApiBeneficiaryInfoDtoList(List<ApiBeneficiaryInfoDto> list){
if (CollectionUtils.isEmpty(list)) { // if (CollectionUtils.isEmpty(list)) {
//如果对象集合空就放行不校验 // //如果对象集合空就放行不校验
return Result.success(); // return Result.success();
} // }
String tipStr = "受益人-"; // String tipStr = "受益人-";
//列表下标标记位 // //列表下标标记位
int i = 1; // int i = 1;
for (ApiBeneficiaryInfoDto dto : list) { // for (ApiBeneficiaryInfoDto dto : list) {
if (StringUtils.isBlank(dto.getCustomerType())) { //// if (StringUtils.isBlank(dto.getCustomerType())) {
throw new BusinessException(tipStr+"客户类型不能为空"); //// throw new BusinessException(tipStr+"客户类型不能为空");
} //// }
if (StringUtils.isBlank(dto.getInsurantRel())) { // if (StringUtils.isBlank(dto.getInsurantRel())) {
throw new BusinessException(tipStr+"与受保人关系不能为空"); // throw new BusinessException(tipStr+"与受保人关系不能为空");
}
// if (Objects.isNull(dto.getId())) {
// throw new BusinessException(tipStr+"第"+i+"项的受益人信息主键id不能为空");
// }
// if (StringUtils.isBlank(dto.getAppointmentBizId())) {
// throw new BusinessException(tipStr+"第"+i+"项的预约信息主表唯一业务ID不能为空");
// } // }
// if (StringUtils.isBlank(dto.getBeneficiaryBizId())) { //// if (Objects.isNull(dto.getId())) {
// throw new BusinessException(tipStr+"第"+i+"项的受益人信息表唯一业务ID不能为空"); //// throw new BusinessException(tipStr+"第"+i+"项的受益人信息主键id不能为空");
//// }
//// if (StringUtils.isBlank(dto.getAppointmentBizId())) {
//// throw new BusinessException(tipStr+"第"+i+"项的预约信息主表唯一业务ID不能为空");
//// }
//// if (StringUtils.isBlank(dto.getBeneficiaryBizId())) {
//// throw new BusinessException(tipStr+"第"+i+"项的受益人信息表唯一业务ID不能为空");
//// }
//
// if (RelTypeEnum.MYSELF.getItemValue().equals(dto.getInsurantRel())) {
// //如果对象与受保人关系为本人,就不校验下面的参数,继续循环下一个
// continue;
// } // }
//
if (RelTypeEnum.MYSELF.getItemValue().equals(dto.getInsurantRel())) { // if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) {
//如果对象与受保人关系为本人,就不校验下面的参数,继续循环下一个 // //客户类型为个人的字段校验
continue; // //校验客户类型为个人类型的公共参数字段
} //// if (StringUtils.isBlank(dto.getName())) {
//// throw new BusinessException(tipStr+"第"+i+"项的名字不能为空");
if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) { //// }
//客户类型为个人的字段校验 // if (StringUtils.isBlank(dto.getNameEn())) {
//校验客户类型为个人类型的公共参数字段 // throw new BusinessException(tipStr+"第"+i+"项的名字-英文不能为空");
// if (StringUtils.isBlank(dto.getName())) {
// throw new BusinessException(tipStr+"第"+i+"项的名字不能为空");
// } // }
if (StringUtils.isBlank(dto.getNameEn())) { // if (StringUtils.isBlank(dto.getGender())) {
throw new BusinessException(tipStr+"第"+i+"项的名字-英文不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的性别不能为空");
} // }
if (StringUtils.isBlank(dto.getGender())) { //// CustomerTypeIndividualCheckCommonDto individualCheckCommonDto = new CustomerTypeIndividualCheckCommonDto();
throw new BusinessException(tipStr+"第"+i+"项的性别不能为空"); //// BeanUtils.copyProperties(dto,individualCheckCommonDto);
} //// checkCustomerTypeIndividualCheckCommonDto(individualCheckCommonDto,tipStr);
// CustomerTypeIndividualCheckCommonDto individualCheckCommonDto = new CustomerTypeIndividualCheckCommonDto(); //
// BeanUtils.copyProperties(dto,individualCheckCommonDto); // }else if (CustomerTypeEnum.COMPANY.getItemValue().equals(dto.getCustomerType())){
// checkCustomerTypeIndividualCheckCommonDto(individualCheckCommonDto,tipStr); // //客户类型为公司的字段校验
// if (StringUtils.isBlank(dto.getCompanyName())) {
}else if (CustomerTypeEnum.COMPANY.getItemValue().equals(dto.getCustomerType())){ // throw new BusinessException(tipStr+"第"+i+"项的公司名称不能为空");
//客户类型为公司的字段校验 // }
if (StringUtils.isBlank(dto.getCompanyName())) { // if (StringUtils.isBlank(dto.getCompanyNameEn())) {
throw new BusinessException(tipStr+"第"+i+"项的公司名称不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的公司名称(英文)不能为空");
} // }
if (StringUtils.isBlank(dto.getCompanyNameEn())) { // if (StringUtils.isBlank(dto.getCompanyBusinessNo())) {
throw new BusinessException(tipStr+"第"+i+"项的公司名称(英文)不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的公司商业登记号码不能为空");
} // }
if (StringUtils.isBlank(dto.getCompanyBusinessNo())) { // if (Objects.isNull(dto.getCompanyRegisterTime())) {
throw new BusinessException(tipStr+"第"+i+"项的公司商业登记号码不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的公司注册日期不能为空");
} // }
if (Objects.isNull(dto.getCompanyRegisterTime())) { // if (Objects.isNull(dto.getCompanyMobile())) {
throw new BusinessException(tipStr+"第"+i+"项的公司注册日期不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的公司电话不能为空");
} // }
if (Objects.isNull(dto.getCompanyMobile())) { // if (Objects.isNull(dto.getCompanyMobileCode())) {
throw new BusinessException(tipStr+"第"+i+"项的公司电话不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的公司电话区号不能为空");
} // }
if (Objects.isNull(dto.getCompanyMobileCode())) { // if (Objects.isNull(dto.getCompanyRegisterRegion())) {
throw new BusinessException(tipStr+"第"+i+"项的公司电话区号不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的公司注册地区不能为空");
} // }
if (Objects.isNull(dto.getCompanyRegisterRegion())) { //// CustomerTypeCompanyCheckCommonDto companyCheckCommonDto = new CustomerTypeCompanyCheckCommonDto();
throw new BusinessException(tipStr+"第"+i+"项的公司注册地区不能为空"); //// BeanUtils.copyProperties(dto,companyCheckCommonDto);
} //// //校验客户类型为公司类型的公共参数字段
// CustomerTypeCompanyCheckCommonDto companyCheckCommonDto = new CustomerTypeCompanyCheckCommonDto(); //// checkCustomerTypeCompanyCheckCommonDto(companyCheckCommonDto,tipStr);
// BeanUtils.copyProperties(dto,companyCheckCommonDto); // }
// //校验客户类型为公司类型的公共参数字段 // i++;
// checkCustomerTypeCompanyCheckCommonDto(companyCheckCommonDto,tipStr); // }
}
i++;
}
return Result.success(); return Result.success();
} }
...@@ -631,51 +631,51 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -631,51 +631,51 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
* @return * @return
*/ */
public Result checkAddApiBeneficiaryInfoDtoList(List<ApiBeneficiaryInfoDto> list){ public Result checkAddApiBeneficiaryInfoDtoList(List<ApiBeneficiaryInfoDto> list){
if (CollectionUtils.isEmpty(list)) { // if (CollectionUtils.isEmpty(list)) {
//如果对象集合空就放行不校验 // //如果对象集合空就放行不校验
return Result.success(); // return Result.success();
} // }
String tipStr = "受益人-"; // String tipStr = "受益人-";
//列表下标标记位 // //列表下标标记位
int i = 1; // int i = 1;
for (ApiBeneficiaryInfoDto dto : list) { // for (ApiBeneficiaryInfoDto dto : list) {
if (StringUtils.isBlank(dto.getCustomerType())) { // if (StringUtils.isBlank(dto.getCustomerType())) {
throw new BusinessException(tipStr+"第"+i+"项的客户类型不能为空"); // throw new BusinessException(tipStr+"第"+i+"项的客户类型不能为空");
}
if (StringUtils.isBlank(dto.getInsurantRel())) {
throw new BusinessException(tipStr+"第"+i+"项的与受保人关系不能为空");
}
if (!Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"第"+i+"项的受益人信息主键id不传值");
}
// if (StringUtils.isBlank(dto.getAppointmentBizId())) {
// throw new BusinessException(tipStr+"第"+i+"项的预约信息主表唯一业务ID不能为空");
// } // }
if (StringUtils.isNotBlank(dto.getBeneficiaryBizId())) { // if (StringUtils.isBlank(dto.getInsurantRel())) {
throw new BusinessException(tipStr+"第"+i+"项的受益人信息表唯一业务ID不传值"); // throw new BusinessException(tipStr+"第"+i+"项的与受保人关系不能为空");
} // }
// if (!Objects.isNull(dto.getId())) {
if (RelTypeEnum.MYSELF.getItemValue().equals(dto.getInsurantRel())) { // throw new BusinessException(tipStr+"第"+i+"项的受益人信息主键id不传值");
//如果对象与受保人关系为本人,就不校验下面的参数,继续循环下一个 // }
continue; //// if (StringUtils.isBlank(dto.getAppointmentBizId())) {
} //// throw new BusinessException(tipStr+"第"+i+"项的预约信息主表唯一业务ID不能为空");
//// }
if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) { // if (StringUtils.isNotBlank(dto.getBeneficiaryBizId())) {
//客户类型为个人的字段校验 // throw new BusinessException(tipStr+"第"+i+"项的受益人信息表唯一业务ID不传值");
//校验客户类型为个人类型的公共参数字段 // }
CustomerTypeIndividualCheckCommonDto individualCheckCommonDto = new CustomerTypeIndividualCheckCommonDto(); //
BeanUtils.copyProperties(dto,individualCheckCommonDto); // if (RelTypeEnum.MYSELF.getItemValue().equals(dto.getInsurantRel())) {
checkCustomerTypeIndividualCheckCommonDto(individualCheckCommonDto,tipStr); // //如果对象与受保人关系为本人,就不校验下面的参数,继续循环下一个
// continue;
}else if (CustomerTypeEnum.COMPANY.getItemValue().equals(dto.getCustomerType())){ // }
//客户类型为公司的字段校验 //
CustomerTypeCompanyCheckCommonDto companyCheckCommonDto = new CustomerTypeCompanyCheckCommonDto(); // if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) {
BeanUtils.copyProperties(dto,companyCheckCommonDto); // //客户类型为个人的字段校验
//校验客户类型为公司类型的公共参数字段 // //校验客户类型为个人类型的公共参数字段
checkCustomerTypeCompanyCheckCommonDto(companyCheckCommonDto,tipStr); // CustomerTypeIndividualCheckCommonDto individualCheckCommonDto = new CustomerTypeIndividualCheckCommonDto();
} // BeanUtils.copyProperties(dto,individualCheckCommonDto);
i++; // checkCustomerTypeIndividualCheckCommonDto(individualCheckCommonDto,tipStr);
} //
// }else if (CustomerTypeEnum.COMPANY.getItemValue().equals(dto.getCustomerType())){
// //客户类型为公司的字段校验
// CustomerTypeCompanyCheckCommonDto companyCheckCommonDto = new CustomerTypeCompanyCheckCommonDto();
// BeanUtils.copyProperties(dto,companyCheckCommonDto);
// //校验客户类型为公司类型的公共参数字段
// checkCustomerTypeCompanyCheckCommonDto(companyCheckCommonDto,tipStr);
// }
// i++;
// }
return Result.success(); return Result.success();
} }
...@@ -685,45 +685,48 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -685,45 +685,48 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
* @return * @return
*/ */
public Result checkEditApiBeneficiaryInfoDto(ApiBeneficiaryInfoDto dto){ public Result checkEditApiBeneficiaryInfoDto(ApiBeneficiaryInfoDto dto){
if (!Objects.isNull(dto)) {
throw new BusinessException("入参对象不能为空");
}
String tipStr = "受益人-";
if (StringUtils.isBlank(dto.getCustomerType())) {
throw new BusinessException(tipStr+"客户类型不能为空");
}
if (StringUtils.isBlank(dto.getInsurantRel())) {
throw new BusinessException(tipStr+"与受保人关系不能为空");
}
if (Objects.isNull(dto.getId())) {
throw new BusinessException(tipStr+"受益人信息主键id不能为空");
}
if (StringUtils.isBlank(dto.getAppointmentBizId())) {
throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空");
}
if (StringUtils.isBlank(dto.getBeneficiaryBizId())) { if (StringUtils.isBlank(dto.getBeneficiaryBizId())) {
throw new BusinessException(tipStr+"受益人信息表唯一业务ID不能为空"); throw new BusinessException("受益人信息表唯一业务ID不能为空");
}
if (RelTypeEnum.MYSELF.getItemValue().equals(dto.getInsurantRel())) {
//如果对象与受保人关系为本人,就不校验下面的了
return Result.success();
}
if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) {
//客户类型为个人的字段校验
//校验客户类型为个人类型的公共参数字段
CustomerTypeIndividualCheckCommonDto individualCheckCommonDto = new CustomerTypeIndividualCheckCommonDto();
BeanUtils.copyProperties(dto,individualCheckCommonDto);
checkCustomerTypeIndividualCheckCommonDto(individualCheckCommonDto,tipStr);
}else if (CustomerTypeEnum.COMPANY.getItemValue().equals(dto.getCustomerType())){
//客户类型为公司的字段校验
CustomerTypeCompanyCheckCommonDto companyCheckCommonDto = new CustomerTypeCompanyCheckCommonDto();
BeanUtils.copyProperties(dto,companyCheckCommonDto);
//校验客户类型为公司类型的公共参数字段
checkCustomerTypeCompanyCheckCommonDto(companyCheckCommonDto,tipStr);
} }
// if (!Objects.isNull(dto)) {
// throw new BusinessException("入参对象不能为空");
// }
// String tipStr = "受益人-";
// if (StringUtils.isBlank(dto.getCustomerType())) {
// throw new BusinessException(tipStr+"客户类型不能为空");
// }
// if (StringUtils.isBlank(dto.getInsurantRel())) {
// throw new BusinessException(tipStr+"与受保人关系不能为空");
// }
// if (Objects.isNull(dto.getId())) {
// throw new BusinessException(tipStr+"受益人信息主键id不能为空");
// }
// if (StringUtils.isBlank(dto.getAppointmentBizId())) {
// throw new BusinessException(tipStr+"预约信息主表唯一业务ID不能为空");
// }
// if (StringUtils.isBlank(dto.getBeneficiaryBizId())) {
// throw new BusinessException(tipStr+"受益人信息表唯一业务ID不能为空");
// }
//
// if (RelTypeEnum.MYSELF.getItemValue().equals(dto.getInsurantRel())) {
// //如果对象与受保人关系为本人,就不校验下面的了
// return Result.success();
// }
//
// if (CustomerTypeEnum.INDIVIDUAL.getItemValue().equals(dto.getCustomerType())) {
// //客户类型为个人的字段校验
// //校验客户类型为个人类型的公共参数字段
// CustomerTypeIndividualCheckCommonDto individualCheckCommonDto = new CustomerTypeIndividualCheckCommonDto();
// BeanUtils.copyProperties(dto,individualCheckCommonDto);
// checkCustomerTypeIndividualCheckCommonDto(individualCheckCommonDto,tipStr);
//
// }else if (CustomerTypeEnum.COMPANY.getItemValue().equals(dto.getCustomerType())){
// //客户类型为公司的字段校验
// CustomerTypeCompanyCheckCommonDto companyCheckCommonDto = new CustomerTypeCompanyCheckCommonDto();
// BeanUtils.copyProperties(dto,companyCheckCommonDto);
// //校验客户类型为公司类型的公共参数字段
// checkCustomerTypeCompanyCheckCommonDto(companyCheckCommonDto,tipStr);
// }
return Result.success(); return Result.success();
} }
...@@ -737,12 +740,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -737,12 +740,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
//如果对象空就放行不校验 //如果对象空就放行不校验
return Result.success(); return Result.success();
} }
if (!Objects.isNull(dto.getId())) { // if (!Objects.isNull(dto.getId())) {
throw new BusinessException("第二持有人信息表主键id不传值"); // throw new BusinessException("第二持有人信息表主键id不传值");
} // }
if (StringUtils.isNotBlank(dto.getAppointmentBizId())) { // if (StringUtils.isNotBlank(dto.getAppointmentBizId())) {
throw new BusinessException("预约信息主表唯一业务ID不传值"); // throw new BusinessException("预约信息主表唯一业务ID不传值");
} // }
if (StringUtils.isNotBlank(dto.getSecondHolderBizId())) { if (StringUtils.isNotBlank(dto.getSecondHolderBizId())) {
throw new BusinessException("第二持有人信息表唯一业务ID不传值"); throw new BusinessException("第二持有人信息表唯一业务ID不传值");
} }
...@@ -761,12 +764,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic ...@@ -761,12 +764,12 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
return Result.success(); return Result.success();
} }
if (StringUtils.isNotBlank(dto.getSecondHolderBizId())) { if (StringUtils.isNotBlank(dto.getSecondHolderBizId())) {
if (Objects.isNull(dto.getId())) { // if (Objects.isNull(dto.getId())) {
throw new BusinessException("第二持有人信息表主键id不能为空"); // throw new BusinessException("第二持有人信息表主键id不能为空");
} // }
if (StringUtils.isBlank(dto.getAppointmentBizId())) { // if (StringUtils.isBlank(dto.getAppointmentBizId())) {
throw new BusinessException("预约信息主表唯一业务ID不能为空"); // throw new BusinessException("预约信息主表唯一业务ID不能为空");
} // }
} }
return Result.success(); return Result.success();
} }
......
package com.yd.csf.api.service.impl;
import com.yd.common.enums.CommonEnum;
import com.yd.common.result.Result;
import com.yd.common.utils.RandomStringGenerator;
import com.yd.csf.api.service.ApiAppointmentLogService;
import com.yd.csf.service.model.Appointment;
import com.yd.csf.service.model.AppointmentLog;
import com.yd.csf.service.service.IAppointmentLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
@Slf4j
public class ApiAppointmentLogServiceImpl implements ApiAppointmentLogService {
@Autowired
private IAppointmentLogService iAppointmentLogService;
/**
* 保存预约日志信息
* @param appointment
* @return
*/
@Override
public Result<String> saveAppointmentLog(Appointment appointment) {
AppointmentLog appointmentLog = new AppointmentLog();
BeanUtils.copyProperties(appointment,appointmentLog);
appointmentLog.setAppointmentBizId(appointment.getAppointmentBizId());
appointmentLog.setAppointmentLogBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_APPOINTMENT_LOG.getCode()));
iAppointmentLogService.saveOrUpdate(appointmentLog);
return Result.success(appointmentLog.getAppointmentLogBizId());
}
}
package com.yd.csf.api.service.impl;
import com.yd.common.enums.CommonEnum;
import com.yd.common.result.Result;
import com.yd.common.utils.RandomStringGenerator;
import com.yd.csf.api.service.ApiAppointmentReferrerLogService;
import com.yd.csf.feign.dto.appointment.ApiAppointmentReferrerDto;
import com.yd.csf.service.model.AppointmentReferrerLog;
import com.yd.csf.service.service.IAppointmentReferrerLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@Service
public class ApiAppointmentReferrerLogServiceImpl implements ApiAppointmentReferrerLogService {
@Autowired
private IAppointmentReferrerLogService iAppointmentReferrerLogService;
/**
* 保存预约-转介人信息日志信息
* @param referrerDtoList
* @param appointmentLogBizId
* @return
*/
@Override
public Result saveAppointmentReferrerLogList(List<ApiAppointmentReferrerDto> referrerDtoList,
String appointmentLogBizId) {
if (CollectionUtils.isEmpty(referrerDtoList)) {
return Result.success();
}
List<AppointmentReferrerLog> saveList = referrerDtoList.stream().map(dto -> {
AppointmentReferrerLog log = new AppointmentReferrerLog();
BeanUtils.copyProperties(dto,log);
log.setAppointmentLogBizId(appointmentLogBizId);
log.setAppointmentReferrerLogBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_APPOINTMENT_REFERRER_LOG.getCode()));
return log;
}).collect(Collectors.toList());
iAppointmentReferrerLogService.saveOrUpdateBatch(saveList);
return Result.success();
}
}
package com.yd.csf.api.service.impl;
import com.yd.common.enums.CommonEnum;
import com.yd.common.result.Result;
import com.yd.common.utils.RandomStringGenerator;
import com.yd.csf.api.service.ApiAppointmentReferrerService;
import com.yd.csf.feign.dto.appointment.ApiAppointmentReferrerDto;
import com.yd.csf.service.model.AppointmentReferrer;
import com.yd.csf.service.service.IAppointmentReferrerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@Service
public class ApiAppointmentReferrerServiceImpl implements ApiAppointmentReferrerService {
@Autowired
private IAppointmentReferrerService iAppointmentReferrerService;
/**
* 保存预约-转介人信息列表
* @param referrerDtoList
* @param appointmentBizId
* @return
*/
@Override
public Result saveAppointmentReferrerList(List<ApiAppointmentReferrerDto> referrerDtoList,
String appointmentBizId) {
if (CollectionUtils.isEmpty(referrerDtoList)) {
return Result.success();
}
//先删后新增
iAppointmentReferrerService.delByAppointmentBizId(appointmentBizId);
//新增
List<AppointmentReferrer> saveList = referrerDtoList.stream().map(dto -> {
AppointmentReferrer referrer = new AppointmentReferrer();
BeanUtils.copyProperties(dto,referrer);
referrer.setAppointmentBizId(appointmentBizId);
referrer.setAppointmentReferrerBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_APPOINTMENT_REFERRER.getCode()));
return referrer;
}).collect(Collectors.toList());
iAppointmentReferrerService.saveOrUpdateBatch(saveList);
return Result.success();
}
}
...@@ -15,9 +15,7 @@ import com.yd.csf.api.service.*; ...@@ -15,9 +15,7 @@ import com.yd.csf.api.service.*;
import com.yd.csf.feign.dto.appointment.*; import com.yd.csf.feign.dto.appointment.*;
import com.yd.csf.feign.dto.appointmentfile.ApiAppointmentFileDto; import com.yd.csf.feign.dto.appointmentfile.ApiAppointmentFileDto;
import com.yd.csf.feign.request.appointment.*; import com.yd.csf.feign.request.appointment.*;
import com.yd.csf.feign.response.appointment.ApiAppointmentAddResponse; import com.yd.csf.feign.response.appointment.*;
import com.yd.csf.feign.response.appointment.ApiAppointmentDetailResponse;
import com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse;
import com.yd.csf.service.dto.PolicySigner; import com.yd.csf.service.dto.PolicySigner;
import com.yd.csf.service.enums.AppointmentStatusEnum; import com.yd.csf.service.enums.AppointmentStatusEnum;
import com.yd.csf.service.enums.PolicyFollowStatusEnum; import com.yd.csf.service.enums.PolicyFollowStatusEnum;
...@@ -25,12 +23,15 @@ import com.yd.csf.service.enums.PolicyStatusEnum; ...@@ -25,12 +23,15 @@ import com.yd.csf.service.enums.PolicyStatusEnum;
import com.yd.csf.service.model.*; import com.yd.csf.service.model.*;
import com.yd.csf.service.service.*; import com.yd.csf.service.service.*;
import com.yd.csf.service.utils.GSONUtil; import com.yd.csf.service.utils.GSONUtil;
import com.yd.oss.feign.client.ApiMaterialFeignClient;
import com.yd.oss.feign.client.ApiRelObjectMaterialFeignClient;
import com.yd.oss.feign.request.ApiMaterialListRequest;
import com.yd.oss.feign.request.ApiRelObjectMaterialListAddRequest;
import com.yd.oss.feign.response.ApiMaterialListResponse;
import com.yd.question.feign.client.ApiQuestionnairesFeignClient; import com.yd.question.feign.client.ApiQuestionnairesFeignClient;
import com.yd.question.feign.dto.ApiAnswerSessionsDto;
import com.yd.question.feign.request.ApiAnswerSaveRequest; import com.yd.question.feign.request.ApiAnswerSaveRequest;
import com.yd.question.feign.request.ApiBatchSaveAnswerRequest; import com.yd.question.feign.request.ApiBatchSaveAnswerRequest;
import com.yd.question.feign.request.ApiObjectSaveRequest; import com.yd.question.feign.request.ApiObjectSaveRequest;
import com.yd.question.feign.response.ApiAnswerSaveResponse;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -45,6 +46,7 @@ import java.util.ArrayList; ...@@ -45,6 +46,7 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
/** /**
* 预约信息业务实现类 * 预约信息业务实现类
...@@ -84,9 +86,39 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -84,9 +86,39 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
private FnaService fnaService; private FnaService fnaService;
@Autowired @Autowired
private ApiAppointmentReferrerService appointmentReferrerService;
@Autowired
private ApiAppointmentLogService appointmentLogService;
@Autowired
private ApiAppointmentReferrerLogService apiAppointmentReferrerLogService;
@Autowired
private ApiAppointmentUserSignService apiAppointmentUserSignService;
@Autowired
private ApiAppointmentUserSignLogService apiAppointmentUserSignLogService;
@Autowired
private IAppointmentLogService iAppointmentLogService;
@Autowired
private IAppointmentReferrerLogService iAppointmentReferrerLogService;
@Autowired
private IAppointmentUserSignLogService iAppointmentUserSignLogService;
@Autowired
private ApiQuestionnairesFeignClient apiQuestionnairesFeignClient; private ApiQuestionnairesFeignClient apiQuestionnairesFeignClient;
@Autowired @Autowired
private ApiRelObjectMaterialFeignClient apiRelObjectMaterialFeignClient;
@Autowired
private ApiMaterialFeignClient apiMaterialFeignClient;
@Autowired
private PolicyFollowService policyFollowService; private PolicyFollowService policyFollowService;
@Resource @Resource
private PolicyService policyService; private PolicyService policyService;
...@@ -183,34 +215,38 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -183,34 +215,38 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result<ApiAppointmentAddResponse> add(ApiAppointmentAddRequest request) { public Result<ApiAppointmentAddResponse> add(ApiAppointmentAddRequest request) {
//新增预约入参字段校验(非库校验)
apiAppointmentCheckService.checkAddRequest(request);
//新增预约-添加预约信息主表数据 - 预约状态为待预约 //新增预约-添加预约信息主表数据 - 预约状态为待预约
Result<Appointment> appointmentResult = addAppointmentData(request.getApiAppointmentInfoDto(), AppointmentStatusEnum.DYY.getItemValue()); if (Objects.isNull(request.getApiAppointmentInfoDto())) {
request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto());
}
//提交 ——>流转状态为预约中
Result<Appointment> appointmentResult = addAppointmentData(request.getApiAppointmentInfoDto(), AppointmentStatusEnum.YYZ.getItemValue());
Appointment appointment = appointmentResult.getData(); Appointment appointment = appointmentResult.getData();
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointment);
//添加陪同转介人信息列表
appointmentReferrerService.saveAppointmentReferrerList(request.getApiAppointmentInfoDto().getReferrerDtoList(),appointment.getAppointmentBizId());
//添加预约-陪同转介人日志信息
apiAppointmentReferrerLogService.saveAppointmentReferrerLogList(request.getApiAppointmentInfoDto().getReferrerDtoList(), result.getData());
//添加产品计划信息表数据 //添加产品计划信息表数据
Result<ProductPlan> productPlanResult = apiProductPlanService.addProductPlanData(request.getApiProductPlanInfoDto(), appointment.getAppointmentBizId()); Result<ProductPlan> productPlanResult = apiProductPlanService.addProductPlanData(request.getApiProductPlanInfoDto(), appointment.getAppointmentBizId());
ProductPlan productPlan = productPlanResult.getData(); ProductPlan productPlan = productPlanResult.getData();
//批量添加产品计划-附加险信息表数据 //批量添加产品计划-附加险信息表数据
apiAdditionalService.batchAddAdditionalData(request.getApiProductPlanInfoDto(), productPlan.getPlanBizId()); apiAdditionalService.batchAddAdditionalData(request.getApiProductPlanInfoDto(), productPlan.getPlanBizId());
//添加投保人信息表数据 //添加投保人信息表数据
apiPolicyholderService.addPolicyholderData(request.getApiPolicyholderInfoDto(), appointment.getAppointmentBizId()); apiPolicyholderService.addPolicyholderData(request.getApiPolicyholderInfoDto(), appointment.getAppointmentBizId());
//添加受保人信息表数据 //添加受保人信息表数据
apiInsurantService.addInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId()); apiInsurantService.addInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId());
//批量添加受益人信息表数据 //批量添加受益人信息表数据
apiBeneficiaryService.batchAddBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId()); apiBeneficiaryService.batchAddBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
//添加第二持有人信息表数据 //添加第二持有人信息表数据
apiSecondHolderService.addSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId()); apiSecondHolderService.addSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId());
//新增健康问卷和预约对象关系绑定 //新增健康问卷和预约对象关系绑定
objectSaveJkQuestion(appointment.getAppointmentBizId()); objectSaveJkQuestion(appointment.getAppointmentBizId());
//新增对象材料关系信息
addRelObjectMaterialList(appointment.getAppointmentBizId());
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号) //预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
updateFnaBizIdAndNo(appointment.getFnaBizId(), appointment.getAppointmentBizId(), appointment.getAppointmentNo()); updateFnaBizIdAndNo(appointment.getFnaBizId(), appointment.getAppointmentBizId(), appointment.getAppointmentNo());
ApiAppointmentAddResponse response = new ApiAppointmentAddResponse(); ApiAppointmentAddResponse response = new ApiAppointmentAddResponse();
...@@ -219,6 +255,31 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -219,6 +255,31 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
} }
/** /**
* 新增对象材料关系信息
* @param appointmentBizId
* @return
*/
public Result addRelObjectMaterialList(String appointmentBizId) {
ApiMaterialListRequest request = new ApiMaterialListRequest();
request.setObjectType(CommonEnum.UID_TYPE_APPOINTMENT.getCode());
//列表查询-材料基础信息
Result<List<ApiMaterialListResponse>> result = apiMaterialFeignClient.list(request);
List<String> materialBizIdList = new ArrayList<>();
if (!CollectionUtils.isEmpty(result.getData())) {
materialBizIdList = result.getData().stream().map(ApiMaterialListResponse::getMaterialBizId).collect(Collectors.toList());
}
//添加-单个对象和材料列表关系信息
ApiRelObjectMaterialListAddRequest addRequest = new ApiRelObjectMaterialListAddRequest();
addRequest.setMaterialBizIdList(materialBizIdList);
addRequest.setObjectBizId(appointmentBizId);
addRequest.setObjectName(CommonEnum.UID_TYPE_APPOINTMENT.getName());
addRequest.setObjectTableName(CommonEnum.UID_TYPE_APPOINTMENT.getCode());
addRequest.setObjectType(CommonEnum.UID_TYPE_APPOINTMENT.getCode());
apiRelObjectMaterialFeignClient.addRelObjectMaterialList(addRequest);
return Result.success();
}
/**
* 提交待预约状态,预约信息更新到Fna表的预约业务id和预约编号 * 提交待预约状态,预约信息更新到Fna表的预约业务id和预约编号
* *
* @return * @return
...@@ -237,7 +298,6 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -237,7 +298,6 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/** /**
* 新增预约暂存 * 新增预约暂存
*
* @param request * @param request
* @return * @return
*/ */
...@@ -247,34 +307,33 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -247,34 +307,33 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
if (Objects.isNull(request.getApiAppointmentInfoDto())) { if (Objects.isNull(request.getApiAppointmentInfoDto())) {
request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto()); request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto());
} }
//校验预约信息-客户和fna入参
apiAppointmentCheckService.checkCustomerAndFna(request.getApiAppointmentInfoDto(), "预约信息-"); apiAppointmentCheckService.checkCustomerAndFna(request.getApiAppointmentInfoDto(), "预约信息-");
//新增预约暂存-添加预约信息主表数据为暂存状态 //新增预约暂存-添加预约信息主表数据为待完善状态
Result<Appointment> appointmentResult = addAppointmentData(request.getApiAppointmentInfoDto(), AppointmentStatusEnum.ZC.getItemValue()); Result<Appointment> appointmentResult = addAppointmentData(request.getApiAppointmentInfoDto(), AppointmentStatusEnum.DWS.getItemValue());
Appointment appointment = appointmentResult.getData(); Appointment appointment = appointmentResult.getData();
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointment);
//添加陪同转介人信息列表
appointmentReferrerService.saveAppointmentReferrerList(request.getApiAppointmentInfoDto().getReferrerDtoList(),appointment.getAppointmentBizId());
//添加预约-陪同转介人日志信息
apiAppointmentReferrerLogService.saveAppointmentReferrerLogList(request.getApiAppointmentInfoDto().getReferrerDtoList(), result.getData());
//添加产品计划信息表数据 //添加产品计划信息表数据
Result<ProductPlan> productPlanResult = apiProductPlanService.addProductPlanData(request.getApiProductPlanInfoDto(), appointment.getAppointmentBizId()); Result<ProductPlan> productPlanResult = apiProductPlanService.addProductPlanData(request.getApiProductPlanInfoDto(), appointment.getAppointmentBizId());
ProductPlan productPlan = productPlanResult.getData(); ProductPlan productPlan = productPlanResult.getData();
//批量添加产品计划-附加险信息表数据 //批量添加产品计划-附加险信息表数据
apiAdditionalService.batchAddAdditionalData(request.getApiProductPlanInfoDto(), productPlan.getPlanBizId()); apiAdditionalService.batchAddAdditionalData(request.getApiProductPlanInfoDto(), productPlan.getPlanBizId());
//添加投保人信息表数据 //添加投保人信息表数据
apiPolicyholderService.addPolicyholderData(request.getApiPolicyholderInfoDto(), appointment.getAppointmentBizId()); apiPolicyholderService.addPolicyholderData(request.getApiPolicyholderInfoDto(), appointment.getAppointmentBizId());
//添加受保人信息表数据 //添加受保人信息表数据
apiInsurantService.addInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId()); apiInsurantService.addInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId());
//批量添加受益人信息表数据 //批量添加受益人信息表数据
apiBeneficiaryService.batchAddBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId()); apiBeneficiaryService.batchAddBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
//添加第二持有人信息表数据 //添加第二持有人信息表数据
apiSecondHolderService.addSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId()); apiSecondHolderService.addSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId());
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号) //预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
updateFnaBizIdAndNo(appointment.getFnaBizId(), appointment.getAppointmentBizId(), appointment.getAppointmentNo()); updateFnaBizIdAndNo(appointment.getFnaBizId(), appointment.getAppointmentBizId(), appointment.getAppointmentNo());
//新增健康问卷和预约对象关系绑定 //新增健康问卷和预约对象关系绑定
objectSaveJkQuestion(appointment.getAppointmentBizId()); objectSaveJkQuestion(appointment.getAppointmentBizId());
...@@ -317,8 +376,6 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -317,8 +376,6 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result edit(ApiAppointmentEditRequest request) { public Result edit(ApiAppointmentEditRequest request) {
//编辑预约入参字段校验(非库校验)
apiAppointmentCheckService.checkEditRequest(request);
Integer status = null; Integer status = null;
Appointment appointmentCheck = null; Appointment appointmentCheck = null;
...@@ -326,48 +383,108 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -326,48 +383,108 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//校验预约信息是否存在 //校验预约信息是否存在
Result<Appointment> result = checkAppointmentIsExist(request.getApiAppointmentInfoDto().getAppointmentBizId()); Result<Appointment> result = checkAppointmentIsExist(request.getApiAppointmentInfoDto().getAppointmentBizId());
appointmentCheck = result.getData(); appointmentCheck = result.getData();
if (AppointmentStatusEnum.ZC.getItemValue().equals(appointmentCheck.getStatus())) { if (AppointmentStatusEnum.DWS.getItemValue().equals(appointmentCheck.getStatus())) {
//当前为暂存状态——>提交更新为待预约状态 //当前为待完善状态——>状态更新为预约中
status = AppointmentStatusEnum.DYY.getItemValue(); status = AppointmentStatusEnum.YYZ.getItemValue();
}else if (AppointmentStatusEnum.YQX.getItemValue().equals(appointmentCheck.getStatus())) {
//当前为已取消状态——>状态更新为预约中
status = AppointmentStatusEnum.YYZ.getItemValue();
}else if (AppointmentStatusEnum.YYZ.getItemValue().equals(appointmentCheck.getStatus())) {
//当前状态为预约中 ——> 状态更新为预约成功 ——> 新增新单跟进记录
status = AppointmentStatusEnum.YY_CG.getItemValue();
} }
// else if (AppointmentStatusEnum.DYY.getItemValue().equals(appointmentCheck.getStatus())){
// if (Objects.isNull(request.getApiAppointmentInfoDto().getConfirmAppointmentTime())) {
// //待预约提交到待签署状态,确定预约时间不能为空
// throw new BusinessException("待预约提交确定预约时间不能为空!");
// }
// //当前为待预约状态——>提交更新为待签署状态-->到新单跟进
// status = AppointmentStatusEnum.DQS.getItemValue();
// }
//其他状态下都是单纯编辑数据不做状态流转更新
} }
//编辑预约提交-编辑预约信息主表数据 //编辑预约提交-编辑预约信息主表数据
if (Objects.isNull(request.getApiAppointmentInfoDto())) {
request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto());
}
Result<Appointment> appointmentResult = editAppointmentData(request.getApiAppointmentInfoDto(), status); Result<Appointment> appointmentResult = editAppointmentData(request.getApiAppointmentInfoDto(), status);
Appointment appointment = appointmentResult.getData(); Appointment appointment = appointmentResult.getData();
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointmentResult.getData());
//添加陪同转介人信息列表
appointmentReferrerService.saveAppointmentReferrerList(request.getApiAppointmentInfoDto().getReferrerDtoList(),appointment.getAppointmentBizId());
//添加预约-陪同转介人日志信息
apiAppointmentReferrerLogService.saveAppointmentReferrerLogList(request.getApiAppointmentInfoDto().getReferrerDtoList(), result.getData());
//添加签单员列表信息
apiAppointmentUserSignService.saveAppointmentUserSignList(request.getApiAppointmentInfoDto().getUserSignDtoList(),appointment.getAppointmentBizId());
//添加预约-签单员列表信息日志
apiAppointmentUserSignLogService.saveAppointmentUserSignLogList(request.getApiAppointmentInfoDto().getUserSignDtoList(),result.getData());
//编辑产品计划信息表数据 //编辑产品计划信息表数据
Result<ProductPlan> productPlanResult = apiProductPlanService.editProductPlanData(request.getApiProductPlanInfoDto(), appointment.getAppointmentBizId()); Result<ProductPlan> productPlanResult = apiProductPlanService.editProductPlanData(request.getApiProductPlanInfoDto(), appointment.getAppointmentBizId());
ProductPlan productPlan = productPlanResult.getData(); ProductPlan productPlan = productPlanResult.getData();
//批量编辑产品计划-附加险信息表数据 //批量编辑产品计划-附加险信息表数据
apiAdditionalService.batchEditAdditionalData(request.getApiProductPlanInfoDto(), productPlan.getPlanBizId()); apiAdditionalService.batchEditAdditionalData(request.getApiProductPlanInfoDto(), productPlan.getPlanBizId());
//编辑投保人信息表数据 //编辑投保人信息表数据
apiPolicyholderService.editPolicyholderData(request.getApiPolicyholderInfoDto(), appointment.getAppointmentBizId()); apiPolicyholderService.editPolicyholderData(request.getApiPolicyholderInfoDto(), appointment.getAppointmentBizId());
//编辑受保人信息表数据 //编辑受保人信息表数据
apiInsurantService.editInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId()); apiInsurantService.editInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId());
//批量编辑受益人信息表数据 //批量编辑受益人信息表数据
apiBeneficiaryService.batchEditBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId()); apiBeneficiaryService.batchEditBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
//编辑第二持有人信息表数据 //编辑第二持有人信息表数据
apiSecondHolderService.editSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId()); apiSecondHolderService.editSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId());
if (!Objects.isNull(status) && AppointmentStatusEnum.DYY.getItemValue().equals(status)) { //远程调用-问卷-答题提交接口
//当前为暂存状态——>提交更新为待预约状态需要更新Fna表的编号和业务id完成绑定关联 if (!CollectionUtils.isEmpty(request.getAnswerSessionsDtoList())) {
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号) ApiAnswerSaveRequest answerSaveRequest = new ApiAnswerSaveRequest();
answerSaveRequest.setObjectBizId(appointment.getAppointmentBizId());
answerSaveRequest.setQuestionnaireBizId("questionnaires_1001");
answerSaveRequest.setAnswerSessionsDtoList(request.getAnswerSessionsDtoList());
apiQuestionnairesFeignClient.answerSave(answerSaveRequest);
}
if (!Objects.isNull(appointmentCheck) && AppointmentStatusEnum.YYZ.getItemValue().equals(appointmentCheck.getStatus())) {
//当前状态为预约中 ——> 状态更新为预约成功 ——> 更新FNA预约业务id和预约编号、新增新单跟进记录
//更新FNA预约业务id和预约编号
updateFnaBizIdAndNo(appointment.getFnaBizId(), appointment.getAppointmentBizId(), appointment.getAppointmentNo()); updateFnaBizIdAndNo(appointment.getFnaBizId(), appointment.getAppointmentBizId(), appointment.getAppointmentNo());
//新增新单跟进记录
savePolicyFollow(appointment);
} }
return Result.success();
}
/**
* 编辑预约暂存 (聚合信息编辑预约暂存)
* @param request
* @return
*/
@Override
public Result editStorage(ApiAppointmentEditStorageRequest request) {
//校验预约信息-客户和fna入参
apiAppointmentCheckService.checkCustomerAndFna(request.getApiAppointmentInfoDto(), "预约信息-");
//编辑预约提交-编辑预约信息主表数据
if (Objects.isNull(request.getApiAppointmentInfoDto())) {
request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto());
}
Result<Appointment> appointmentResult = editAppointmentData(request.getApiAppointmentInfoDto(), null);
Appointment appointment = appointmentResult.getData();
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointmentResult.getData());
//添加陪同转介人信息列表
appointmentReferrerService.saveAppointmentReferrerList(request.getApiAppointmentInfoDto().getReferrerDtoList(),appointment.getAppointmentBizId());
//添加预约-陪同转介人日志信息
apiAppointmentReferrerLogService.saveAppointmentReferrerLogList(request.getApiAppointmentInfoDto().getReferrerDtoList(), result.getData());
//添加签单员列表信息
apiAppointmentUserSignService.saveAppointmentUserSignList(request.getApiAppointmentInfoDto().getUserSignDtoList(),appointment.getAppointmentBizId());
//添加预约-签单员列表信息日志
apiAppointmentUserSignLogService.saveAppointmentUserSignLogList(request.getApiAppointmentInfoDto().getUserSignDtoList(),result.getData());
//编辑产品计划信息表数据
Result<ProductPlan> productPlanResult = apiProductPlanService.editProductPlanData(request.getApiProductPlanInfoDto(), appointment.getAppointmentBizId());
ProductPlan productPlan = productPlanResult.getData();
//批量编辑产品计划-附加险信息表数据
apiAdditionalService.batchEditAdditionalData(request.getApiProductPlanInfoDto(), productPlan.getPlanBizId());
//编辑投保人信息表数据
apiPolicyholderService.editPolicyholderData(request.getApiPolicyholderInfoDto(), appointment.getAppointmentBizId());
//编辑受保人信息表数据
apiInsurantService.editInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId());
//批量编辑受益人信息表数据
apiBeneficiaryService.batchEditBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
//编辑第二持有人信息表数据
apiSecondHolderService.editSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId());
//远程调用-问卷-答题提交接口 //远程调用-问卷-答题提交接口
if (!CollectionUtils.isEmpty(request.getAnswerSessionsDtoList())) { if (!CollectionUtils.isEmpty(request.getAnswerSessionsDtoList())) {
...@@ -377,7 +494,6 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -377,7 +494,6 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
answerSaveRequest.setAnswerSessionsDtoList(request.getAnswerSessionsDtoList()); answerSaveRequest.setAnswerSessionsDtoList(request.getAnswerSessionsDtoList());
apiQuestionnairesFeignClient.answerSave(answerSaveRequest); apiQuestionnairesFeignClient.answerSave(answerSaveRequest);
} }
return Result.success(); return Result.success();
} }
...@@ -391,25 +507,25 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -391,25 +507,25 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result editConfirmTime(ApiAppointmentEditConfirmTimeRequest request) { public Result editConfirmTime(ApiAppointmentEditConfirmTimeRequest request) {
//校验预约信息是否存在 //校验预约信息是否存在
Result<Appointment> result = checkAppointmentIsExist(request.getAppointmentBizId()); // Result<Appointment> result = checkAppointmentIsExist(request.getAppointmentBizId());
Appointment appointment = result.getData(); // Appointment appointment = result.getData();
if (!AppointmentStatusEnum.DYY.getItemValue().equals(appointment.getStatus())) { // if (!AppointmentStatusEnum.DYY.getItemValue().equals(appointment.getStatus())) {
//非待预约状态,不能更新 // //非待预约状态,不能更新
if (AppointmentStatusEnum.ZC.getItemValue().equals(appointment.getStatus())) { // if (AppointmentStatusEnum.ZC.getItemValue().equals(appointment.getStatus())) {
//暂存 // //暂存
throw new BusinessException("当前为暂存状态,不能提交到新单跟进!"); // throw new BusinessException("当前为暂存状态,不能提交到新单跟进!");
} else { // } else {
//其他状态 // //其他状态
throw new BusinessException("你已经提交到新单跟进,不能再次提交!"); // throw new BusinessException("你已经提交到新单跟进,不能再次提交!");
} // }
} // }
appointment.setConfirmAppointmentTime(request.getConfirmAppointmentTime()); // appointment.setConfirmAppointmentTime(request.getConfirmAppointmentTime());
//流转到新单跟进(这里的预约状态为待签署) // //流转到新单跟进(这里的预约状态为待签署)
appointment.setStatus(AppointmentStatusEnum.DQS.getItemValue()); // appointment.setStatus(AppointmentStatusEnum.DQS.getItemValue());
iAppointmentService.saveOrUpdate(appointment); // iAppointmentService.saveOrUpdate(appointment);
//
//确定预约时间提交 (流程流转到新单跟进) - 新增新单跟进记录 // //确定预约时间提交 (流程流转到新单跟进) - 新增新单跟进记录
savePolicyFollow(appointment); // savePolicyFollow(appointment);
return Result.success(); return Result.success();
} }
...@@ -478,7 +594,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -478,7 +594,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
// follow.setPaymentPremium(); // follow.setPaymentPremium();
// 保單持有人 // 保單持有人
if (apiPolicyholderInfoDto != null) { if (apiPolicyholderInfoDto != null) {
follow.setPolicyHolder(apiPolicyholderInfoDto.getName()); follow.setPolicyHolder(apiPolicyholderInfoDto.getNameCn());
} }
//TODO 预缴年期 //TODO 预缴年期
// follow.setPrepaidTerm(); // follow.setPrepaidTerm();
...@@ -494,7 +610,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -494,7 +610,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
follow.setUserBizId(appointment.getCreatorId()); follow.setUserBizId(appointment.getCreatorId());
if (!Objects.isNull(apiInsurantInfoDto)) { if (!Objects.isNull(apiInsurantInfoDto)) {
// 受保人 // 受保人
follow.setInsured(apiInsurantInfoDto.getName()); follow.setInsured(apiInsurantInfoDto.getNameCn());
// 受保人与保單持有人关系 // 受保人与保單持有人关系
if ("MYSELF".equals(apiInsurantInfoDto.getPolicyholderRel())) { if ("MYSELF".equals(apiInsurantInfoDto.getPolicyholderRel())) {
follow.setInsured(follow.getPolicyHolder()); follow.setInsured(follow.getPolicyHolder());
...@@ -503,26 +619,26 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -503,26 +619,26 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
if (!Objects.isNull(apiProductPlanMainInfoDto)) { if (!Objects.isNull(apiProductPlanMainInfoDto)) {
//币种 //币种
follow.setCurrency(apiProductPlanMainInfoDto.getCurrency()); follow.setCurrency(apiProductPlanMainInfoDto.getPolicyCurrency());
//生效日期 //生效日期
if (!Objects.isNull(apiProductPlanMainInfoDto.getPolicyEffectiveDate())) { // if (!Objects.isNull(apiProductPlanMainInfoDto.getPolicyEffectiveDate())) {
follow.setEffectiveDate(Date.from(apiProductPlanMainInfoDto.getPolicyEffectiveDate().atZone(ZoneId.systemDefault()).toInstant())); // follow.setEffectiveDate(Date.from(apiProductPlanMainInfoDto.getPolicyEffectiveDate().atZone(ZoneId.systemDefault()).toInstant()));
} // }
//首期保费(不含徽费,预缴保费)每期保费 //首期保费(不含徽费,预缴保费)每期保费
follow.setInitialPremium(apiProductPlanMainInfoDto.getEachIssuePremium()); follow.setInitialPremium(apiProductPlanMainInfoDto.getEachIssuePremium());
//保险公司 //保险公司
follow.setInsurer(apiProductPlanMainInfoDto.getCompanyName()); follow.setInsurer(apiProductPlanMainInfoDto.getCompanyName());
//是否预缴 //是否预缴
follow.setIsPrepaid(apiProductPlanMainInfoDto.getIsPrepay()); follow.setIsPrepaid(Integer.parseInt(apiProductPlanMainInfoDto.getIsPrepay()));
//供款年期 //供款年期
if (StringUtils.isNotBlank(apiProductPlanMainInfoDto.getPaymentTerm())) { if (StringUtils.isNotBlank(apiProductPlanMainInfoDto.getIssueNumber())) {
follow.setPaymentTerm(Integer.getInteger(apiProductPlanMainInfoDto.getPaymentTerm())); follow.setPaymentTerm(apiProductPlanMainInfoDto.getIssueNumber());
if (follow.getPaymentTerm() == null) { if (follow.getPaymentTerm() == null) {
follow.setPaymentTerm(productPlan.getPaymentTerm()); follow.setPaymentTerm(productPlan.getIssueNumber());
} }
} }
//产品名称 //产品名称
follow.setProductName(apiProductPlanMainInfoDto.getProductName()); follow.setProductName(apiProductPlanMainInfoDto.getProductLaunchName());
//签单员列表 //签单员列表
setSignerList(follow, appointment); setSignerList(follow, appointment);
} }
...@@ -631,9 +747,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -631,9 +747,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
for (ApiBeneficiaryInfoDto apiBeneficiaryInfoDto : apiBeneficiaryInfoDtoList) { for (ApiBeneficiaryInfoDto apiBeneficiaryInfoDto : apiBeneficiaryInfoDtoList) {
PolicyBeneficiary policyBeneficiary = new PolicyBeneficiary(); PolicyBeneficiary policyBeneficiary = new PolicyBeneficiary();
BeanUtils.copyProperties(apiBeneficiaryInfoDto, policyBeneficiary, "addressList"); BeanUtils.copyProperties(apiBeneficiaryInfoDto, policyBeneficiary, "addressList");
if (!CollectionUtils.isEmpty(apiBeneficiaryInfoDto.getAddressList())) { // if (!CollectionUtils.isEmpty(apiBeneficiaryInfoDto.getAddressList())) {
policyBeneficiary.setAddressList(GSONUtil.toJson(apiBeneficiaryInfoDto.getAddressList())); // policyBeneficiary.setAddressList(GSONUtil.toJson(apiBeneficiaryInfoDto.getAddressList()));
} // }
policyBeneficiary.setId(null); policyBeneficiary.setId(null);
policyBeneficiary.setPolicyBizId(policyBizId); policyBeneficiary.setPolicyBizId(policyBizId);
policyBeneficiary.setPolicyBeneficiaryBizId(RandomStringGenerator.generateBizId16("policy_beneficiary")); policyBeneficiary.setPolicyBeneficiaryBizId(RandomStringGenerator.generateBizId16("policy_beneficiary"));
...@@ -655,7 +771,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -655,7 +771,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
policyInsurant.setId(null); policyInsurant.setId(null);
policyInsurant.setPolicyBizId(policyBizId); policyInsurant.setPolicyBizId(policyBizId);
policyInsurant.setPolicyInsurantBizId(RandomStringGenerator.generateBizId16("policy_insurant")); policyInsurant.setPolicyInsurantBizId(RandomStringGenerator.generateBizId16("policy_insurant"));
policyInsurant.setName(apiInsurantInfoDto.getName()); policyInsurant.setName(apiInsurantInfoDto.getNameCn());
return policyInsurantService.saveOrUpdate(policyInsurant); return policyInsurantService.saveOrUpdate(policyInsurant);
} }
...@@ -672,7 +788,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -672,7 +788,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
policyPolicyholder.setId(null); policyPolicyholder.setId(null);
policyPolicyholder.setPolicyBizId(policyBizId); policyPolicyholder.setPolicyBizId(policyBizId);
policyPolicyholder.setPolicyPolicyholderBizId(RandomStringGenerator.generateBizId16("policy_policyholder")); policyPolicyholder.setPolicyPolicyholderBizId(RandomStringGenerator.generateBizId16("policy_policyholder"));
policyPolicyholder.setName(apiPolicyholderInfoDto.getName()); policyPolicyholder.setName(apiPolicyholderInfoDto.getNameCn());
return policyPolicyholderService.saveOrUpdate(policyPolicyholder); return policyPolicyholderService.saveOrUpdate(policyPolicyholder);
} }
...@@ -684,7 +800,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -684,7 +800,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
String policyBizId, String policyBizId,
String policyTransfer String policyTransfer
) { ) {
String appointmentBizId = apiProductPlanMainInfoDto.getAppointmentBizId(); // String appointmentBizId = apiProductPlanMainInfoDto.getAppointmentBizId();
String planBizId = apiProductPlanMainInfoDto.getPlanBizId(); String planBizId = apiProductPlanMainInfoDto.getPlanBizId();
if (productPlan == null) { if (productPlan == null) {
return false; return false;
...@@ -699,16 +815,16 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -699,16 +815,16 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
policy.setStatus(PolicyStatusEnum.INFORCE.getItemValue()); policy.setStatus(PolicyStatusEnum.INFORCE.getItemValue());
// 投保人姓名 // 投保人姓名
if (Objects.nonNull(apiPolicyholderInfoDto)) { if (Objects.nonNull(apiPolicyholderInfoDto)) {
policy.setPolicyHolder(apiPolicyholderInfoDto.getName()); policy.setPolicyHolder(apiPolicyholderInfoDto.getNameCn());
} }
// 被保人姓名 // 被保人姓名
if (Objects.nonNull(apiInsurantInfoDto)) { if (Objects.nonNull(apiInsurantInfoDto)) {
policy.setInsured(apiInsurantInfoDto.getName()); policy.setInsured(apiInsurantInfoDto.getNameCn());
} }
// 保额 // 保额
policy.setSumInsured(productPlan.getSumInsured()); policy.setSumInsured(productPlan.getSumInsured());
// 供款年期 // 供款年期
policy.setPaymentTerm(productPlan.getPaymentTerm()); policy.setPaymentTerm(productPlan.getIssueNumber());
// 付款频率(字典) // 付款频率(字典)
policy.setPaymentFrequency(productPlan.getPaymentFrequency()); policy.setPaymentFrequency(productPlan.getPaymentFrequency());
// 每期保费 // 每期保费
...@@ -718,7 +834,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -718,7 +834,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
// 保险公司 // 保险公司
policy.setInsurer(productPlan.getCompanyName()); policy.setInsurer(productPlan.getCompanyName());
// 是否预缴 // 是否预缴
policy.setIsPrepaid(productPlan.getIsPrepay()); policy.setIsPrepaid(Integer.parseInt(productPlan.getIsPrepay()));
// 转保声明选项(字典) // 转保声明选项(字典)
policy.setPolicyTransfer(policyTransfer); policy.setPolicyTransfer(policyTransfer);
policy.setInsurer(productPlan.getCompanyName()); policy.setInsurer(productPlan.getCompanyName());
...@@ -743,7 +859,17 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -743,7 +859,17 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
apiAppointmentCheckService.checkEditApiAppointmentInfoDto(apiAppointmentInfoDto); apiAppointmentCheckService.checkEditApiAppointmentInfoDto(apiAppointmentInfoDto);
//编辑预约-编辑预约信息主表数据 //编辑预约-编辑预约信息主表数据
editAppointmentData(apiAppointmentInfoDto, null); Result<Appointment> appointmentResult = editAppointmentData(apiAppointmentInfoDto, null);
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointmentResult.getData());
//添加陪同转介人信息列表
appointmentReferrerService.saveAppointmentReferrerList(apiAppointmentInfoDto.getReferrerDtoList(),apiAppointmentInfoDto.getAppointmentBizId());
//添加预约-陪同转介人日志信息
apiAppointmentReferrerLogService.saveAppointmentReferrerLogList(apiAppointmentInfoDto.getReferrerDtoList(), result.getData());
//添加签单员列表信息
apiAppointmentUserSignService.saveAppointmentUserSignList(apiAppointmentInfoDto.getUserSignDtoList(),apiAppointmentInfoDto.getAppointmentBizId());
//添加预约-签单员列表信息日志
apiAppointmentUserSignLogService.saveAppointmentUserSignLogList(apiAppointmentInfoDto.getUserSignDtoList(),result.getData());
return Result.success(); return Result.success();
} }
...@@ -759,15 +885,20 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -759,15 +885,20 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//预约信息对象不能为空 //预约信息对象不能为空
throw new BusinessException("预约信息对象不能为空"); throw new BusinessException("预约信息对象不能为空");
} }
if (StringUtils.isBlank(dto.getAppointmentBizId())) {
throw new BusinessException("预约信息主表唯一业务ID不能为空");
}
//校验预约信息是否存在 //校验预约信息是否存在
Result<Appointment> result = checkAppointmentIsExist(dto.getAppointmentBizId()); Result<Appointment> result = checkAppointmentIsExist(dto.getAppointmentBizId());
Appointment appointment = result.getData(); Appointment appointment = result.getData();
String appointmentNo = appointment.getAppointmentNo();
BeanUtils.copyProperties(dto, appointment); BeanUtils.copyProperties(dto, appointment);
if (!Objects.isNull(status)) { if (!Objects.isNull(status)) {
//不为空设置状态 //不为空设置状态
appointment.setStatus(status); appointment.setStatus(status);
} }
appointment.setAppointmentNo(appointmentNo);
iAppointmentService.saveOrUpdate(appointment); iAppointmentService.saveOrUpdate(appointment);
return Result.success(appointment); return Result.success(appointment);
} }
...@@ -871,6 +1002,23 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -871,6 +1002,23 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
} }
/** /**
* 编辑预约状态
* @param request
* @return
*/
@Override
public Result editStatus(ApiAppointmentEditStatusRequest request) {
//校验预约信息是否存在
Result<Appointment> result = checkAppointmentIsExist(request.getAppointmentBizId());
Appointment appointment = result.getData();
if (1 == request.getOprType() || 2 == request.getOprType()) {
appointment.setStatus(AppointmentStatusEnum.YYZ.getItemValue());
}
iAppointmentService.saveOrUpdate(appointment);
return Result.success();
}
/**
* 删除预约信息 * 删除预约信息
* *
* @param appointmentBizId * @param appointmentBizId
...@@ -887,6 +1035,56 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -887,6 +1035,56 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
} }
/** /**
* 历史记录 - 签约信息
* @param request
* @return
*/
@Override
public Result<IPage<ApiAppointmentLogPageResponse>> logPage(ApiAppointmentLogPageRequest request) {
Page<ApiAppointmentLogPageResponse> page = new Page<>(request.getPageNo(), request.getPageSize());
IPage<ApiAppointmentLogPageResponse> iPage = iAppointmentService.logPage(page, request);
return Result.success(iPage);
}
/**
* 历史记录 - 签约信息 - 详情
* @param appointmentLogBizId
* @return
*/
@Override
public Result<ApiAppointmentLogDetailResponse> logDetail(String appointmentLogBizId) {
AppointmentLog appointmentLog = iAppointmentLogService.queryOne(appointmentLogBizId);
if (!Objects.isNull(appointmentLog)) {
//预约信息日志表信息
ApiAppointmentLogDetailResponse response = new ApiAppointmentLogDetailResponse();
BeanUtils.copyProperties(appointmentLog,response);
//预约-转介人信息日志列表
List<AppointmentReferrerLog> referrerLogList = iAppointmentReferrerLogService.queryList(appointmentLogBizId);
if (!CollectionUtils.isEmpty(referrerLogList)) {
List<ApiAppointmentReferrerLogDto> referrerLogDtoList = referrerLogList.stream().map(dto -> {
ApiAppointmentReferrerLogDto logDto = new ApiAppointmentReferrerLogDto();
BeanUtils.copyProperties(dto,logDto);
return logDto;
}).collect(Collectors.toList());
response.setReferrerLogDtoList(referrerLogDtoList);
}
//预约-签单员信息日志列表
List<AppointmentUserSignLog> userSignLogList = iAppointmentUserSignLogService.queryList(appointmentLogBizId);
if (!CollectionUtils.isEmpty(userSignLogList)) {
List<ApiAppointmentUserSignLogDto> userSignLogDtoList = referrerLogList.stream().map(dto -> {
ApiAppointmentUserSignLogDto logDto = new ApiAppointmentUserSignLogDto();
BeanUtils.copyProperties(dto,logDto);
return logDto;
}).collect(Collectors.toList());
response.setUserSignLogDtoList(userSignLogDtoList);
}
}
return Result.success();
}
/**
* 新增健康问卷和预约对象关系绑定 * 新增健康问卷和预约对象关系绑定
* *
* @return * @return
......
package com.yd.csf.api.service.impl;
import com.yd.common.enums.CommonEnum;
import com.yd.common.result.Result;
import com.yd.common.utils.RandomStringGenerator;
import com.yd.csf.api.service.ApiAppointmentUserSignLogService;
import com.yd.csf.feign.dto.appointment.ApiAppointmentUserSignDto;
import com.yd.csf.service.model.AppointmentUserSignLog;
import com.yd.csf.service.service.IAppointmentUserSignLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@Service
public class ApiAppointmentUserSignLogServiceImpl implements ApiAppointmentUserSignLogService {
@Autowired
private IAppointmentUserSignLogService iAppointmentUserSignLogService;
/**
* 保存预约签单员列表日志
* @param userSignDtoList
* @param appointmentLogBizId
* @return
*/
@Override
public Result saveAppointmentUserSignLogList(List<ApiAppointmentUserSignDto> userSignDtoList,
String appointmentLogBizId) {
if (CollectionUtils.isEmpty(userSignDtoList)) {
return Result.success();
}
List<AppointmentUserSignLog> saveList = userSignDtoList.stream().map(dto -> {
AppointmentUserSignLog log = new AppointmentUserSignLog();
BeanUtils.copyProperties(dto,log);
log.setAppointmentLogBizId(appointmentLogBizId);
log.setAppointmentUserSignLogBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_APPOINTMENT_USER_SIGN_LOG.getCode()));
return log;
}).collect(Collectors.toList());
iAppointmentUserSignLogService.saveOrUpdateBatch(saveList);
return Result.success();
}
}
package com.yd.csf.api.service.impl;
import com.yd.common.enums.CommonEnum;
import com.yd.common.result.Result;
import com.yd.common.utils.RandomStringGenerator;
import com.yd.csf.api.service.ApiAppointmentUserSignService;
import com.yd.csf.feign.dto.appointment.ApiAppointmentUserSignDto;
import com.yd.csf.service.model.AppointmentReferrer;
import com.yd.csf.service.model.AppointmentUserSign;
import com.yd.csf.service.service.IAppointmentUserSignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@Service
public class ApiAppointmentUserSignServiceImpl implements ApiAppointmentUserSignService {
@Autowired
private IAppointmentUserSignService iAppointmentUserSignService;
/**
* 保存签单员列表信息
* @param userSignDtoList
* @param appointmentBizId
* @return
*/
@Override
public Result saveAppointmentUserSignList(List<ApiAppointmentUserSignDto> userSignDtoList, String appointmentBizId) {
if (CollectionUtils.isEmpty(userSignDtoList)) {
return Result.success();
}
//先删后新增
iAppointmentUserSignService.delByAppointmentBizId(appointmentBizId);
//新增
List<AppointmentUserSign> saveList = userSignDtoList.stream().map(dto -> {
AppointmentUserSign userSign = new AppointmentUserSign();
BeanUtils.copyProperties(dto,userSign);
userSign.setAppointmentBizId(appointmentBizId);
userSign.setAppointmentUserSignBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_APPOINTMENT_USER_SIGN.getCode()));
return userSign;
}).collect(Collectors.toList());
iAppointmentUserSignService.saveOrUpdateBatch(saveList);
return Result.success();
}
}
...@@ -54,8 +54,6 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService { ...@@ -54,8 +54,6 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService {
dtoList = list.stream().map(dto -> { dtoList = list.stream().map(dto -> {
ApiBeneficiaryInfoDto infoDto = new ApiBeneficiaryInfoDto(); ApiBeneficiaryInfoDto infoDto = new ApiBeneficiaryInfoDto();
BeanUtils.copyProperties(dto,infoDto); BeanUtils.copyProperties(dto,infoDto);
//地址列表
infoDto.setAddressList(CommonUtil.getAddressList(dto.getAddressList()));
return infoDto; return infoDto;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
...@@ -74,8 +72,6 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService { ...@@ -74,8 +72,6 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService {
Beneficiary beneficiary = result.getData(); Beneficiary beneficiary = result.getData();
ApiBeneficiaryInfoDto dto = new ApiBeneficiaryInfoDto(); ApiBeneficiaryInfoDto dto = new ApiBeneficiaryInfoDto();
BeanUtils.copyProperties(beneficiary,dto); BeanUtils.copyProperties(beneficiary,dto);
//地址列表
dto.setAddressList(CommonUtil.getAddressList(beneficiary.getAddressList()));
return Result.success(dto); return Result.success(dto);
} }
...@@ -88,7 +84,7 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService { ...@@ -88,7 +84,7 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService {
public Result add(ApiBeneficiaryInfoDto apiBeneficiaryInfoDto) { public Result add(ApiBeneficiaryInfoDto apiBeneficiaryInfoDto) {
List<ApiBeneficiaryInfoDto> list = new ArrayList<>(); List<ApiBeneficiaryInfoDto> list = new ArrayList<>();
list.add(apiBeneficiaryInfoDto); list.add(apiBeneficiaryInfoDto);
apiAppointmentCheckService.checkAddApiBeneficiaryInfoDtoList(list); // apiAppointmentCheckService.checkAddApiBeneficiaryInfoDtoList(list);
//批量添加受益人信息表数据 //批量添加受益人信息表数据
batchAddBeneficiaryData(list,apiBeneficiaryInfoDto.getAppointmentBizId()); batchAddBeneficiaryData(list,apiBeneficiaryInfoDto.getAppointmentBizId());
...@@ -104,10 +100,13 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService { ...@@ -104,10 +100,13 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService {
public Result edit(ApiBeneficiaryInfoDto apiBeneficiaryInfoDto) { public Result edit(ApiBeneficiaryInfoDto apiBeneficiaryInfoDto) {
//编辑预约入参字段校验 - 编辑单个受益人信息字段校验 //编辑预约入参字段校验 - 编辑单个受益人信息字段校验
apiAppointmentCheckService.checkEditApiBeneficiaryInfoDto(apiBeneficiaryInfoDto); apiAppointmentCheckService.checkEditApiBeneficiaryInfoDto(apiBeneficiaryInfoDto);
List<ApiBeneficiaryInfoDto> list = new ArrayList<>(); //校验受益人信息是否存在
list.add(apiBeneficiaryInfoDto); Result<Beneficiary> result = checkBeneficiaryIsExist(apiBeneficiaryInfoDto.getBeneficiaryBizId());
//批量编辑受益人信息表数据 Beneficiary beneficiary = result.getData();
batchEditBeneficiaryData(list,apiBeneficiaryInfoDto.getAppointmentBizId()); BeanUtils.copyProperties(apiBeneficiaryInfoDto,beneficiary);
beneficiary.setId(result.getData().getId());
beneficiary.setAppointmentBizId(result.getData().getAppointmentBizId());
iBeneficiaryService.saveOrUpdate(beneficiary);
return Result.success(); return Result.success();
} }
...@@ -160,8 +159,6 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService { ...@@ -160,8 +159,6 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService {
beneficiary.setBeneficiaryBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_BENEFICIARY.getCode())); beneficiary.setBeneficiaryBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_BENEFICIARY.getCode()));
//预约信息主表唯一业务ID //预约信息主表唯一业务ID
beneficiary.setAppointmentBizId(appointmentBizId); beneficiary.setAppointmentBizId(appointmentBizId);
//地址列表(json串)
beneficiary.setAddressList(CommonUtil.getAddressListJsonStr(dto.getAddressList()));
return beneficiary; return beneficiary;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
...@@ -177,68 +174,23 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService { ...@@ -177,68 +174,23 @@ public class ApiBeneficiaryServiceImpl implements ApiBeneficiaryService {
* @return * @return
*/ */
@Override @Override
public Result batchEditBeneficiaryData(List<ApiBeneficiaryInfoDto> list, public Result batchEditBeneficiaryData(List<ApiBeneficiaryInfoDto> list,String appointmentBizId) {
String appointmentBizId) {
if (CollectionUtils.isEmpty(list)){ if (CollectionUtils.isEmpty(list)){
//为空放行 //为空放行
return Result.success(); return Result.success();
} }
// //获取不为空的受益人信息表唯一业务ID列表
// List<String> beneficiaryBizIdList = list.stream()
// .filter(dto -> StringUtils.isNotBlank(dto.getBeneficiaryBizId()))
// .map(ApiBeneficiaryInfoDto::getBeneficiaryBizId)
// .collect(Collectors.toList());
//
// if (!CollectionUtils.isEmpty(beneficiaryBizIdList)) {
// //入参的受益人业务id列表至少一个不为空就走表数据校验,全部为空是全部新增操作,不走表数据校验
//
// //根据受益人信息表唯一业务ID列表查询表里面的列表信息
// List<Beneficiary> beneficiarys = iBeneficiaryService.queryList(BeneficiaryDto.builder()
// .beneficiaryBizIdList(beneficiaryBizIdList).build());
//
// //过滤入参的受益人列表信息在表里不存在的集合,然后抛出这些不存在的列表信息
// // 提取 existingBeneficiaryBizIds:从 beneficiarys 中获取所有已存在的 beneficiaryBizId 集合
// Set<String> existingBeneficiaryBizIds = beneficiarys.stream()
// .map(Beneficiary::getBeneficiaryBizId)
// .collect(Collectors.toSet());
// // 过滤 list:保留 beneficiaryBizId 不在 existingBeneficiaryBizIds 中的对象
// List<ApiBeneficiaryInfoDto> filteredList = list.stream()
// .filter(dto -> StringUtils.isNotBlank(dto.getBeneficiaryBizId()) && !existingBeneficiaryBizIds.contains(dto.getBeneficiaryBizId()))
// .collect(Collectors.toList());
// if (!CollectionUtils.isEmpty(filteredList)) {
// //入参对象列表中有传值的业务id在库中不存在的对象,提示
// List<String> beneficiaryProductNameList = filteredList
// .stream()
// .map(ApiBeneficiaryInfoDto::getName)
// .collect(Collectors.toList());
// throw new BusinessException("以下是在库里不存在的受益人数据的名字:"+String.join(" ;",beneficiaryProductNameList));
// }
// }
//先删后增加 //先删后增加
iBeneficiaryService.del(appointmentBizId); iBeneficiaryService.del(appointmentBizId);
//新增
//构造需要新增或者更新数据的对象集合 List<Beneficiary> saveList = list.stream().map(dto -> {
List<Beneficiary> updateList = list.stream().map(dto -> {
Beneficiary beneficiary = new Beneficiary(); Beneficiary beneficiary = new Beneficiary();
BeanUtils.copyProperties(dto,beneficiary); BeanUtils.copyProperties(dto,beneficiary);
beneficiary.setAppointmentBizId(appointmentBizId); beneficiary.setAppointmentBizId(appointmentBizId);
if (StringUtils.isBlank(dto.getBeneficiaryBizId())) { beneficiary.setBeneficiaryBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_BENEFICIARY.getCode()));
//为空表示新增数据
//生成受益人信息表唯一业务ID
beneficiary.setBeneficiaryBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_BENEFICIARY.getCode()));
}
//地址列表(json串)
beneficiary.setAddressList(CommonUtil.getAddressListJsonStr(dto.getAddressList()));
beneficiary.setId(null);
return beneficiary; return beneficiary;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
//批量新增
//批量新增或者更新 iBeneficiaryService.saveOrUpdateBatch(saveList);
iBeneficiaryService.saveOrUpdateBatch(updateList);
return Result.success(); return Result.success();
} }
......
package com.yd.csf.api.service.impl;
import com.yd.common.result.Result;
import com.yd.csf.api.service.ApiCsfCommonService;
import com.yd.csf.feign.request.common.ApiCsfCalculateRequest;
import com.yd.csf.feign.response.common.ApiCsfCalculateResponse;
import lombok.extern.slf4j.Slf4j;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.apache.commons.lang3.StringUtils;
import java.time.LocalDate;
import java.time.Period;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
@Slf4j
@Service
public class ApiCsfCommonServiceImpl implements ApiCsfCommonService {
// 身份证号码正则表达式(15位或18位)
private static final Pattern ID_CARD_PATTERN = Pattern.compile("(^\\d{15}$)|(^\\d{17}([0-9]|X|x)$)");
// 日期格式
private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
/**
* 计算-字段值
* @param request
* @return
*/
@Override
public Result<List<ApiCsfCalculateResponse>> calculate(ApiCsfCalculateRequest request) {
List<ApiCsfCalculateResponse> responses = new ArrayList<>();
try {
// 参数校验
if (request == null) {
return Result.fail("请求参数不能为空");
}
if (request.getCalculateType() == null) {
return Result.fail("计算类型不能为空");
}
// 创建响应对象
ApiCsfCalculateResponse response = new ApiCsfCalculateResponse();
response.setCalculateType(request.getCalculateType());
response.setRequestValue(request.getRequestValue());
response.setRequestValueList(request.getRequestValueList());
String result;
switch (request.getCalculateType()) {
case 1:
// 1-通过中文自动加载全部大写的拼音
result = calculatePinyin(request.getRequestValue());
response.setResponseValue(result);
responses.add(response);
break;
case 2:
// 2-身份证号码计算性别
result = calculateGenderFromIdCard(request.getRequestValue());
response.setResponseValue(result);
responses.add(response);
break;
case 3:
// 3-身份证号码计算生日
result = calculateBirthdayFromIdCard(request.getRequestValue());
response.setResponseValue(result);
responses.add(response);
break;
case 4:
// 4-生日计算年龄
result = calculateAgeFromBirthday(request.getRequestValue());
response.setResponseValue(result);
responses.add(response);
break;
case 5:
// 5-身高和体重计算BMI指数
result = calculateBMI(request.getRequestValueList());
response.setResponseValue(result);
responses.add(response);
break;
case 6:
// 6-身份证号码计算性别/生日/年龄
//性别
ApiCsfCalculateResponse response1 = new ApiCsfCalculateResponse();
//生日
ApiCsfCalculateResponse response2 = new ApiCsfCalculateResponse();
//年龄
ApiCsfCalculateResponse response3 = new ApiCsfCalculateResponse();
BeanUtils.copyProperties(request,response1);
response1.setCalculateType(2);
response1.setRequestValue(calculateGenderFromIdCard(request.getRequestValue()));
responses.add(response1);
BeanUtils.copyProperties(request,response2);
response2.setCalculateType(3);
response2.setRequestValue(calculateBirthdayFromIdCard(request.getRequestValue()));
responses.add(response2);
BeanUtils.copyProperties(request,response3);
response3.setCalculateType(4);
response3.setRequestValue(calculateAgeFromBirthday(request.getRequestValue()));
responses.add(response3);
break;
default:
return Result.fail("不支持的计算类型: " + request.getCalculateType());
}
return Result.success(responses);
} catch (Exception e) {
log.error("计算服务异常: ", e);
return Result.fail("计算失败: " + e.getMessage());
}
}
/**
* 通过中文自动加载全部大写的拼音
* @param chinese
* @return
*/
private String calculatePinyin(String chinese) {
if (StringUtils.isBlank(chinese)) {
throw new IllegalArgumentException("中文内容不能为空");
}
// 中文转拼音
return convertChineseToPinyin(chinese).toUpperCase();
}
/**
* 身份证号码计算性别
* @param idCard
* @return
*/
private String calculateGenderFromIdCard(String idCard) {
if (StringUtils.isBlank(idCard)) {
throw new IllegalArgumentException("身份证号码不能为空");
}
if (!ID_CARD_PATTERN.matcher(idCard).matches()) {
throw new IllegalArgumentException("身份证号码格式不正确");
}
// 获取性别位
String genderCode;
if (idCard.length() == 15) {
// 15位身份证:最后一位是性别位(奇数为男,偶数为女)
genderCode = idCard.substring(14, 15);
} else {
// 18位身份证:倒数第二位是性别位(奇数为男,偶数为女)
genderCode = idCard.substring(16, 17);
}
int code = Integer.parseInt(genderCode);
return code % 2 == 1 ? "男" : "女";
}
/**
* 身份证号码计算生日
* @param idCard
* @return
*/
private String calculateBirthdayFromIdCard(String idCard) {
if (StringUtils.isBlank(idCard)) {
throw new IllegalArgumentException("身份证号码不能为空");
}
if (!ID_CARD_PATTERN.matcher(idCard).matches()) {
throw new IllegalArgumentException("身份证号码格式不正确");
}
String birthdayStr;
if (idCard.length() == 15) {
// 15位身份证:第7-12位是生日(yyMMdd)
birthdayStr = "19" + idCard.substring(6, 12);
} else {
// 18位身份证:第7-14位是生日(yyyyMMdd)
birthdayStr = idCard.substring(6, 14);
}
// 格式化为yyyy-MM-dd
try {
LocalDate birthday = LocalDate.parse(birthdayStr,
DateTimeFormatter.ofPattern("yyyyMMdd"));
return birthday.format(DATE_FORMATTER);
} catch (Exception e) {
throw new IllegalArgumentException("身份证生日信息异常: " + birthdayStr);
}
}
/**
* 生日计算年龄
* @param birthday
* @return
*/
private String calculateAgeFromBirthday(String birthday) {
if (StringUtils.isBlank(birthday)) {
throw new IllegalArgumentException("生日不能为空");
}
try {
LocalDate birthDate = LocalDate.parse(birthday, DATE_FORMATTER);
LocalDate currentDate = LocalDate.now();
if (birthDate.isAfter(currentDate)) {
throw new IllegalArgumentException("生日日期不能晚于当前日期");
}
Period period = Period.between(birthDate, currentDate);
return String.valueOf(period.getYears());
} catch (Exception e) {
throw new IllegalArgumentException("生日格式不正确,应为yyyy-MM-dd格式");
}
}
/**
* 身高和体重计算BMI指数
* @param requestValueList
* @return
*/
private String calculateBMI(List<String> requestValueList) {
if (requestValueList == null || requestValueList.size() < 2) {
throw new IllegalArgumentException("身高和体重参数不能为空");
}
try {
// 身高(米)和体重(千克)
double height = Double.parseDouble(requestValueList.get(0));
double weight = Double.parseDouble(requestValueList.get(1));
if (height <= 0 || weight <= 0) {
throw new IllegalArgumentException("身高和体重必须为正数");
}
if (height > 3) {
// 如果身高输入的是厘米,转换为米
height = height / 100;
}
double bmi = weight / (height * height);
// 保留两位小数
return String.format("%.2f", bmi);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("身高和体重必须是有效数字");
}
}
/**
* 中文转拼音辅助方法
* @param chinese
* @return
*/
private String convertChineseToPinyin(String chinese) {
HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
format.setCaseType(HanyuPinyinCaseType.UPPERCASE);
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
StringBuilder pinyin = new StringBuilder();
for (char c : chinese.toCharArray()) {
if (Character.toString(c).matches("[\\u4E00-\\u9FA5]")) {
try {
String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(c, format);
if (pinyinArray != null && pinyinArray.length > 0) {
pinyin.append(pinyinArray[0]);
}
} catch (BadHanyuPinyinOutputFormatCombination e) {
pinyin.append(c);
}
} else {
pinyin.append(c);
}
}
return pinyin.toString();
}
}
...@@ -9,10 +9,13 @@ import com.yd.csf.api.service.ApiAppointmentCheckService; ...@@ -9,10 +9,13 @@ import com.yd.csf.api.service.ApiAppointmentCheckService;
import com.yd.csf.api.service.ApiInsurantService; import com.yd.csf.api.service.ApiInsurantService;
import com.yd.csf.feign.dto.appointment.ApiInsurantInfoDto; import com.yd.csf.feign.dto.appointment.ApiInsurantInfoDto;
import com.yd.csf.feign.utils.CommonUtil; import com.yd.csf.feign.utils.CommonUtil;
import com.yd.csf.feign.enums.RelTypeEnum;
import com.yd.csf.service.model.Insurant; import com.yd.csf.service.model.Insurant;
import com.yd.csf.service.model.Policyholder; import com.yd.csf.service.model.Policyholder;
import com.yd.csf.service.service.IInsurantService; import com.yd.csf.service.service.IInsurantService;
import com.yd.csf.service.service.IPolicyholderService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -29,6 +32,9 @@ public class ApiInsurantServiceImpl implements ApiInsurantService { ...@@ -29,6 +32,9 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
private IInsurantService iInsurantService; private IInsurantService iInsurantService;
@Autowired @Autowired
private IPolicyholderService iPolicyholderService;
@Autowired
private ApiAppointmentCheckService apiAppointmentCheckService; private ApiAppointmentCheckService apiAppointmentCheckService;
/** /**
...@@ -61,7 +67,7 @@ public class ApiInsurantServiceImpl implements ApiInsurantService { ...@@ -61,7 +67,7 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
apiAppointmentCheckService.checkEditApiInsurantInfoDto(apiInsurantInfoDto); apiAppointmentCheckService.checkEditApiInsurantInfoDto(apiInsurantInfoDto);
//编辑受保人信息表数据 //编辑受保人信息表数据
editInsurantData(apiInsurantInfoDto,apiInsurantInfoDto.getAppointmentBizId()); // editInsurantData(apiInsurantInfoDto,apiInsurantInfoDto.getAppointmentBizId());
return Result.success(); return Result.success();
} }
...@@ -77,8 +83,21 @@ public class ApiInsurantServiceImpl implements ApiInsurantService { ...@@ -77,8 +83,21 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
//为空设置,方便新建暂存公用方法 //为空设置,方便新建暂存公用方法
dto = new ApiInsurantInfoDto(); dto = new ApiInsurantInfoDto();
} }
//受保人信息信息
Insurant insurant = new Insurant(); Insurant insurant = new Insurant();
//与投保人关系
if (RelTypeEnum.MYSELF.getItemValue().equals(dto.getPolicyholderRel())) {
//与投保人关系如果是本人,直接查询投保人信息表新增数据到受保人信息表中
Policyholder policyholder = iPolicyholderService.queryOne(appointmentBizId,"");
if (!Objects.isNull(policyholder)) {
BeanUtils.copyProperties(policyholder,insurant);
insurant.setId(null);
insurant.setAppointmentBizId(appointmentBizId);
insurant.setInsurantBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_INSURANT.getCode()));
iInsurantService.saveOrUpdate(insurant);
return Result.success(insurant);
}
}
//受保人信息信息
BeanUtils.copyProperties(dto,insurant); BeanUtils.copyProperties(dto,insurant);
//生成受保人信息表唯一业务ID //生成受保人信息表唯一业务ID
insurant.setInsurantBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_INSURANT.getCode())); insurant.setInsurantBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_INSURANT.getCode()));
...@@ -102,10 +121,26 @@ public class ApiInsurantServiceImpl implements ApiInsurantService { ...@@ -102,10 +121,26 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
//受保人信息对象不能为空 //受保人信息对象不能为空
throw new BusinessException("受保人信息不能为空"); throw new BusinessException("受保人信息不能为空");
} }
if (StringUtils.isBlank(dto.getInsurantBizId())) {
throw new BusinessException("受保人信息表唯一业务ID不能为空");
}
Result<Insurant> result = checkInsurantIsExist(dto.getInsurantBizId()); Result<Insurant> result = checkInsurantIsExist(dto.getInsurantBizId());
//受保人信息信息 //受保人信息信息
Insurant insurant = result.getData(); Insurant insurant = result.getData();
//与投保人关系
if (RelTypeEnum.MYSELF.getItemValue().equals(dto.getPolicyholderRel())) {
//与投保人关系如果是本人,直接查询投保人信息表更新数据到受保人信息表中
Policyholder policyholder = iPolicyholderService.queryOne(appointmentBizId,"");
if (!Objects.isNull(policyholder)) {
BeanUtils.copyProperties(policyholder,insurant);
insurant.setId(result.getData().getId());
insurant.setAppointmentBizId(appointmentBizId);
iInsurantService.saveOrUpdate(insurant);
return Result.success(insurant);
}
}
BeanUtils.copyProperties(dto,insurant); BeanUtils.copyProperties(dto,insurant);
//预约信息主表唯一业务ID //预约信息主表唯一业务ID
insurant.setAppointmentBizId(appointmentBizId); insurant.setAppointmentBizId(appointmentBizId);
......
...@@ -12,6 +12,7 @@ import com.yd.csf.feign.utils.CommonUtil; ...@@ -12,6 +12,7 @@ import com.yd.csf.feign.utils.CommonUtil;
import com.yd.csf.service.model.Policyholder; import com.yd.csf.service.model.Policyholder;
import com.yd.csf.service.service.IPolicyholderService; import com.yd.csf.service.service.IPolicyholderService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -60,7 +61,7 @@ public class ApiPolicyholderServiceImpl implements ApiPolicyholderService { ...@@ -60,7 +61,7 @@ public class ApiPolicyholderServiceImpl implements ApiPolicyholderService {
//编辑预约入参字段校验 - 投保人信息字段校验 //编辑预约入参字段校验 - 投保人信息字段校验
apiAppointmentCheckService.checkEditApiPolicyholderInfoDto(apiPolicyholderInfoDto); apiAppointmentCheckService.checkEditApiPolicyholderInfoDto(apiPolicyholderInfoDto);
//编辑投保人信息表数据 //编辑投保人信息表数据
editPolicyholderData(apiPolicyholderInfoDto,apiPolicyholderInfoDto.getAppointmentBizId()); // editPolicyholderData(apiPolicyholderInfoDto,apiPolicyholderInfoDto.getAppointmentBizId());
return Result.success(); return Result.success();
} }
...@@ -101,6 +102,9 @@ public class ApiPolicyholderServiceImpl implements ApiPolicyholderService { ...@@ -101,6 +102,9 @@ public class ApiPolicyholderServiceImpl implements ApiPolicyholderService {
//投保人信息对象不能为空 //投保人信息对象不能为空
throw new BusinessException("投保人信息对象不能为空"); throw new BusinessException("投保人信息对象不能为空");
} }
if (StringUtils.isBlank(dto.getPolicyholderBizId())) {
throw new BusinessException("投保人信息表唯一业务ID不能为空");
}
//校验投保人信息是否存在 //校验投保人信息是否存在
Result<Policyholder> result = checkPolicyholderIsExist(dto.getPolicyholderBizId()); Result<Policyholder> result = checkPolicyholderIsExist(dto.getPolicyholderBizId());
Policyholder policyholder = result.getData(); Policyholder policyholder = result.getData();
......
...@@ -14,6 +14,7 @@ import com.yd.csf.feign.dto.appointment.ApiProductPlanMainInfoDto; ...@@ -14,6 +14,7 @@ import com.yd.csf.feign.dto.appointment.ApiProductPlanMainInfoDto;
import com.yd.csf.service.model.ProductPlan; import com.yd.csf.service.model.ProductPlan;
import com.yd.csf.service.service.IProductPlanService; import com.yd.csf.service.service.IProductPlanService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -85,11 +86,11 @@ public class ApiProductPlanServiceImpl implements ApiProductPlanService { ...@@ -85,11 +86,11 @@ public class ApiProductPlanServiceImpl implements ApiProductPlanService {
ApiProductPlanInfoDto productPlanInfoDto = new ApiProductPlanInfoDto(); ApiProductPlanInfoDto productPlanInfoDto = new ApiProductPlanInfoDto();
productPlanInfoDto.setApiProductPlanMainInfoDto(apiProductPlanMainInfoDto); productPlanInfoDto.setApiProductPlanMainInfoDto(apiProductPlanMainInfoDto);
Result<ProductPlan> result = editProductPlanData(productPlanInfoDto,apiProductPlanMainInfoDto.getAppointmentBizId()); // Result<ProductPlan> result = editProductPlanData(productPlanInfoDto,apiProductPlanMainInfoDto.getAppointmentBizId());
String planBizId = ""; String planBizId = "";
if (!Objects.isNull(result.getData())) { // if (!Objects.isNull(result.getData())) {
planBizId = result.getData().getPlanBizId(); // planBizId = result.getData().getPlanBizId();
} // }
return Result.success(planBizId); return Result.success(planBizId);
} }
...@@ -147,6 +148,12 @@ public class ApiProductPlanServiceImpl implements ApiProductPlanService { ...@@ -147,6 +148,12 @@ public class ApiProductPlanServiceImpl implements ApiProductPlanService {
//不能为空 //不能为空
throw new BusinessException("产品计划主信息对象不能为空"); throw new BusinessException("产品计划主信息对象不能为空");
} }
if (!Objects.isNull(productPlanInfoDto)
&& !Objects.isNull(productPlanInfoDto.getApiProductPlanMainInfoDto())
&& StringUtils.isNotBlank(productPlanInfoDto.getApiProductPlanMainInfoDto().getPlanBizId())){
//不能为空
throw new BusinessException("产品计划信息表唯一业务ID不能为空");
}
//产品计划主信息 //产品计划主信息
ApiProductPlanMainInfoDto dto = productPlanInfoDto.getApiProductPlanMainInfoDto(); ApiProductPlanMainInfoDto dto = productPlanInfoDto.getApiProductPlanMainInfoDto();
Result<ProductPlan> result = checkProductPlanIsExist(dto.getPlanBizId()); Result<ProductPlan> result = checkProductPlanIsExist(dto.getPlanBizId());
......
...@@ -60,7 +60,7 @@ public class ApiSecondHolderServiceImpl implements ApiSecondHolderService { ...@@ -60,7 +60,7 @@ public class ApiSecondHolderServiceImpl implements ApiSecondHolderService {
if (Objects.isNull(apiSecondHolderInfoDto)) { if (Objects.isNull(apiSecondHolderInfoDto)) {
apiSecondHolderInfoDto = new ApiSecondHolderInfoDto(); apiSecondHolderInfoDto = new ApiSecondHolderInfoDto();
} }
editSecondHolderData(apiSecondHolderInfoDto,apiSecondHolderInfoDto.getAppointmentBizId()); // editSecondHolderData(apiSecondHolderInfoDto,apiSecondHolderInfoDto.getAppointmentBizId());
return Result.success(); return Result.success();
} }
......
...@@ -41,5 +41,11 @@ ...@@ -41,5 +41,11 @@
<artifactId>yd-user-feign</artifactId> <artifactId>yd-user-feign</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.yd</groupId>
<artifactId>yd-base-feign</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -7,6 +7,7 @@ import com.yd.csf.feign.fallback.appointment.ApiAppointmentFeignFallbackFactory; ...@@ -7,6 +7,7 @@ import com.yd.csf.feign.fallback.appointment.ApiAppointmentFeignFallbackFactory;
import com.yd.csf.feign.request.appointment.*; import com.yd.csf.feign.request.appointment.*;
import com.yd.csf.feign.response.appointment.ApiAppointmentAddResponse; import com.yd.csf.feign.response.appointment.ApiAppointmentAddResponse;
import com.yd.csf.feign.response.appointment.ApiAppointmentDetailResponse; import com.yd.csf.feign.response.appointment.ApiAppointmentDetailResponse;
import com.yd.csf.feign.response.appointment.ApiAppointmentLogDetailResponse;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -57,7 +58,7 @@ public interface ApiAppointmentFeignClient { ...@@ -57,7 +58,7 @@ public interface ApiAppointmentFeignClient {
* @return * @return
*/ */
@PostMapping("/add/storage") @PostMapping("/add/storage")
Result addStorage(@Validated @RequestBody ApiAppointmentAddStorageRequest request); Result addStorage(@RequestBody ApiAppointmentAddStorageRequest request);
/** /**
* 编辑预约提交 (聚合信息编辑预约提交) * 编辑预约提交 (聚合信息编辑预约提交)
...@@ -68,6 +69,14 @@ public interface ApiAppointmentFeignClient { ...@@ -68,6 +69,14 @@ public interface ApiAppointmentFeignClient {
Result edit(@Validated @RequestBody ApiAppointmentEditRequest request); Result edit(@Validated @RequestBody ApiAppointmentEditRequest request);
/** /**
* 编辑预约暂存 (聚合信息编辑预约暂存)
* @param request
* @return
*/
@PutMapping("/edit/storage")
Result editStorage(@RequestBody ApiAppointmentEditStorageRequest request);
/**
* 确定预约时间提交 (流程流转到新单跟进) * 确定预约时间提交 (流程流转到新单跟进)
* @param request * @param request
* @return * @return
...@@ -124,10 +133,35 @@ public interface ApiAppointmentFeignClient { ...@@ -124,10 +133,35 @@ public interface ApiAppointmentFeignClient {
Result editPolicyTransfer(@Validated @RequestBody ApiPolicyTransferRequest request); Result editPolicyTransfer(@Validated @RequestBody ApiPolicyTransferRequest request);
/** /**
* 编辑预约状态
* @param request
* @return
*/
@PutMapping("/edit/status")
Result editStatus(@Validated @RequestBody ApiAppointmentEditStatusRequest request);
/**
* 删除预约信息 * 删除预约信息
* @param appointmentBizId * @param appointmentBizId
* @return * @return
*/ */
@DeleteMapping("/del") @DeleteMapping("/del")
Result del(@NotBlank(message = "预约信息主表唯一业务ID不能为空") @RequestParam(value = "appointmentBizId") String appointmentBizId); Result del(@NotBlank(message = "预约信息主表唯一业务ID不能为空") @RequestParam(value = "appointmentBizId") String appointmentBizId);
/**
* 历史记录 - 签约信息
* @param request
* @return
*/
@PostMapping("/log/page")
Result logPage(@Validated @RequestBody ApiAppointmentLogPageRequest request);
/**
* 历史记录 - 签约信息 - 详情
* @param appointmentLogBizId
* @return
*/
@GetMapping("/log/detail")
Result<ApiAppointmentLogDetailResponse> logDetail(@NotBlank(message = "预约信息日志表唯一业务ID不能为空") @RequestParam(value = "appointmentLogBizId") String appointmentLogBizId);
} }
package com.yd.csf.feign.client.common;
import com.yd.common.result.Result;
import com.yd.csf.feign.fallback.common.ApiCsfCommonFeignFallbackFactory;
import com.yd.csf.feign.request.common.ApiCsfCalculateRequest;
import com.yd.csf.feign.response.common.ApiCsfCalculateResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* 香港保险服务-公共接口信息Feign客户端
*/
@FeignClient(name = "yd-csf-api", fallbackFactory = ApiCsfCommonFeignFallbackFactory.class)
public interface ApiCsfCommonFeignClient {
/**
* 计算-字段值
* @param request
* @return
*/
@PostMapping("/calculate/fieldValue")
Result<List<ApiCsfCalculateResponse>> calculate(@Validated @RequestBody ApiCsfCalculateRequest request);
}
...@@ -2,7 +2,11 @@ package com.yd.csf.feign.dto.appointment; ...@@ -2,7 +2,11 @@ package com.yd.csf.feign.dto.appointment;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
/** /**
* 预约信息 * 预约信息
...@@ -11,38 +15,37 @@ import java.time.LocalDateTime; ...@@ -11,38 +15,37 @@ import java.time.LocalDateTime;
public class ApiAppointmentInfoDto { public class ApiAppointmentInfoDto {
/** /**
* 预约信息表主键id(新增不需要传值,修改需要传值)
*/
private Long id;
/**
* 预约信息主表唯一业务ID(新增不需要传值,修改需要传值) * 预约信息主表唯一业务ID(新增不需要传值,修改需要传值)
*/ */
private String appointmentBizId; private String appointmentBizId;
/** /**
* 预约编号(和预约信息主表唯一业务ID是一对,唯一,冗余字段) * 预约编号
*/ */
private String appointmentNo; private String appointmentNo;
/** /**
* 关联客户信息表唯一业务ID(冗余字段) * 关联客户信息表唯一业务ID(冗余字段)
*/ */
@NotBlank(message = "关联客户信息表唯一业务ID不能为空")
private String customerBizId; private String customerBizId;
/** /**
* 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段) * 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段)
*/ */
@NotBlank(message = "关联客户编号不能为空")
private String customerNo; private String customerNo;
/** /**
* 关联FNA信息表唯一业务ID(冗余字段) * 关联FNA信息表唯一业务ID(冗余字段)
*/ */
@NotBlank(message = "关联FNA信息表唯一业务ID不能为空")
private String fnaBizId; private String fnaBizId;
/** /**
* 关联FNA编号(和FNA信息表唯一业务ID是一对,唯一,冗余字段) * 关联FNA编号(和FNA信息表唯一业务ID是一对,唯一,冗余字段)
*/ */
@NotBlank(message = "关联FNA编号不能为空")
private String fnaNo; private String fnaNo;
/** /**
...@@ -58,51 +61,15 @@ public class ApiAppointmentInfoDto { ...@@ -58,51 +61,15 @@ public class ApiAppointmentInfoDto {
/** /**
* 申请类型(字典) * 申请类型(字典)
*/ */
// @NotBlank(message = "申请类型不能为空") @NotBlank(message = "申请类型不能为空")
private String applyType; private String applyType;
/** /**
* 业务编号 * 签单日
*/
private String businessNo;
/**
* 确定预约时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime confirmAppointmentTime;
/**
* 意向预约时间
*/ */
// @NotNull(message = "意向预约时间不能为空") @NotNull(message = "签单日不能为空")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime intentionAppointmentTime; private LocalDateTime signDate;
/**
* 顾问是否陪同: 0-否, 1-是(字典)
*/
private Integer isAccompany;
/**
* 陪同顾问姓名(FNA Form有填写,可带入)
*/
private String accompanyName;
/**
* 陪同顾问手机区号
*/
private String accompanyMobileCode;
/**
* 陪同顾问手机
*/
private String accompanyMobile;
/**
* 陪同顾问邮箱
*/
private String accompanyEmail;
/** /**
* 到港时间 * 到港时间
...@@ -122,7 +89,7 @@ public class ApiAppointmentInfoDto { ...@@ -122,7 +89,7 @@ public class ApiAppointmentInfoDto {
private String meetingPoint; private String meetingPoint;
/** /**
* 签单地址 * 签单地址(签单地点)
*/ */
private String signingAddress; private String signingAddress;
...@@ -189,37 +156,28 @@ public class ApiAppointmentInfoDto { ...@@ -189,37 +156,28 @@ public class ApiAppointmentInfoDto {
private String policyTransfer; private String policyTransfer;
/** /**
* 业务代表1账号 * 是否有用车服务:0-否, 1-是(字典)
*/
private String businessRepresentAccount1;
/**
* 业务代表1姓名
*/
private String businessRepresentName1;
/**
* 业务代表1电话号码区号
*/ */
private String businessRepresentMobile1Code; private Integer isUseCar;
/** /**
* 业务代表1电话号码 * 是否法定受益人
*/ */
private String businessRepresentMobile1; @NotBlank(message = "是否法定受益人不能为空")
private String isLegalBeneficiary;
/** /**
* 业务代表1邮箱 * 创建人用户名
*/ */
private String businessRepresentEmail1; private String creatorName;
/** /**
* 是否有用车服务:0-否, 1-是(字典) * 陪同转介人信息列表
*/ */
private Integer isUseCar; private List<ApiAppointmentReferrerDto> referrerDtoList;
/** /**
* 创建人用户名 * 签单员信息列表
*/ */
private String creatorName; private List<ApiAppointmentUserSignDto> userSignDtoList;
} }
package com.yd.csf.feign.dto.appointment;
import lombok.Data;
@Data
public class ApiAppointmentReferrerDto {
/**
* 系统用户-销售用户扩展表唯一业务ID(转介人,冗余)
*/
private String userSaleBizId;
/**
* 系统用户唯一业务ID(冗余)
*/
private String userBizId;
/**
* 姓名
*/
private String realName;
/**
* 手机号
*/
private String phone;
/**
* 邮箱
*/
private String email;
}
package com.yd.csf.feign.dto.appointment;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class ApiAppointmentReferrerLogDto {
/**
* 预约-转介人信息日志表主键ID
*/
private Long id;
/**
* 预约-转介人信息日志表唯一业务ID
*/
private String appointmentReferrerLogBizId;
/**
* 预约信息日志表唯一业务ID
*/
private String appointmentLogBizId;
/**
* 系统用户-销售用户扩展表唯一业务ID(转介人,冗余)
*/
private String userSaleBizId;
/**
* 系统用户唯一业务ID(冗余)
*/
private String userBizId;
/**
* 姓名
*/
private String realName;
/**
* 手机号
*/
private String phone;
/**
* 邮箱
*/
private String email;
/**
* 通用备注
*/
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
private Integer isDeleted;
/**
* 创建人ID
*/
private String creatorId;
/**
* 更新人ID
*/
private String updaterId;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新时间
*/
private LocalDateTime updateTime;
}
package com.yd.csf.feign.dto.appointment;
import lombok.Data;
@Data
public class ApiAppointmentUserSignDto {
/**
* 签单用户扩展唯一业务ID(冗余)
*/
private String userSignBizId;
/**
* 系统用户唯一业务ID(冗余)
*/
private String userBizId;
/**
* 姓名
*/
private String realName;
/**
* 执业编码
*/
private String practiceCode;
/**
* 手机号
*/
private String phone;
/**
* 证件类型
*/
private String cardType;
/**
* 证件号码
*/
private String cardNo;
/**
* 邮箱
*/
private String email;
}
package com.yd.csf.feign.dto.appointment;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class ApiAppointmentUserSignLogDto {
/**
* 预约-签单员信息日志表主键ID
*/
private Long id;
/**
* 预约-签单员信息日志表唯一业务ID
*/
private String appointmentUserSignLogBizId;
/**
* 预约信息日志表唯一业务ID
*/
private String appointmentLogBizId;
/**
* 签单用户扩展唯一业务ID(冗余)
*/
private String userSignBizId;
/**
* 系统用户唯一业务ID(冗余)
*/
private String userBizId;
/**
* 姓名
*/
private String realName;
/**
* 执业编码
*/
private String practiceCode;
/**
* 手机号
*/
private String phone;
/**
* 证件类型
*/
private String cardType;
/**
* 证件号码
*/
private String cardNo;
/**
* 邮箱
*/
private String email;
/**
* 通用备注
*/
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
private Integer isDeleted;
/**
* 创建人ID
*/
private String creatorId;
/**
* 更新人ID
*/
private String updaterId;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新时间
*/
private LocalDateTime updateTime;
}
package com.yd.csf.feign.dto.appointment; package com.yd.csf.feign.dto.appointment;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yd.csf.feign.dto.AddressDto;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
/** /**
* 受益人信息 * 受益人信息
...@@ -16,54 +12,37 @@ import java.util.List; ...@@ -16,54 +12,37 @@ import java.util.List;
public class ApiBeneficiaryInfoDto { public class ApiBeneficiaryInfoDto {
/** /**
* 受益人信息主键id(新增不需要传值,修改需要传值) * 受益人信息表主键ID
*/ */
private Long id; private Long id;
/** /**
* 预约信息主表唯一业务ID(新增不需要传值,修改需要传值) * 预约信息主表唯一业务ID
*/ */
private String appointmentBizId; private String appointmentBizId;
/** /**
* 受益人信息表唯一业务ID(新增不需要传值,修改需要传值) * 受益人信息表唯一业务ID
*/ */
private String beneficiaryBizId; private String beneficiaryBizId;
/** /**
* 客户类型(字典)(个人或者公司)
*/
// @NotBlank(message = "客户类型不能为空")
private String customerType;
/**
* 与受保人关系(字典) * 与受保人关系(字典)
*/ */
// @NotBlank(message = "与受保人关系不能为空")
private String insurantRel; private String insurantRel;
/** /**
* 受益比例 * 姓名-中文
*/
private BigDecimal benefitRatio;
/**
* 名字
*/
private String name;
/**
* 名字-英文
*/ */
private String nameEn; private String nameCn;
/** /**
* 性别(字典 * 姓名-(拼音/英文,通过中文自动加载全部大写的拼音
*/ */
private String gender; private String namePyEn;
/** /**
* 证件类型(字典) * 证件类型(字典,下拉选择
*/ */
private String documentType; private String documentType;
...@@ -73,99 +52,24 @@ public class ApiBeneficiaryInfoDto { ...@@ -73,99 +52,24 @@ public class ApiBeneficiaryInfoDto {
private String idNumber; private String idNumber;
/** /**
* 护照号码 * 性别(字典,如果是身份证,自动获取性别和生日)
*/
private String passportNumber;
/**
* 出生日期
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String gender;
private LocalDateTime birthTime;
/**
* 公司名称
*/
private String companyName;
/**
* 公司名称(英文)
*/
private String companyNameEn;
/**
* 公司商业登记号码
*/
private String companyBusinessNo;
/** /**
* 公司注册日期 * 出生日期(生日,如果是身份证,自动获取性别和生日)
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime companyRegisterTime; private LocalDateTime birthday;
/** /**
* 公司注册地区(字典 * 国籍(下拉选择
*/ */
private String companyRegisterRegion; private String nationality;
/** /**
* 公司电话区号 * 受益比例
*/
private String companyMobileCode;
/**
* 公司电话
*/
private String companyMobile;
/**
* 公司邮箱
*/
private String companyEmail;
/**
* 公司登记地址
*/
private String companyEnterAddress;
/**
* 通讯地址
*/
private String mailingAddress;
/**
* 授权代表姓名中文-名字
*/
private String authNameCn;
/**
* 授权代表姓名英文-名字
*/
private String authNameEn;
/**
* 授权代表职称
*/
private String authProfessional;
/**
* 授权代表电话区号
*/
private String authMobileCode;
/**
* 授权代表电话
*/
private String authMobile;
/**
* 地址列表
*/ */
private List<AddressDto> addressList; private BigDecimal benefitRatio;
/**
* 备注
*/
private String remark;
} }
...@@ -2,11 +2,17 @@ package com.yd.csf.feign.dto.appointment; ...@@ -2,11 +2,17 @@ package com.yd.csf.feign.dto.appointment;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yd.csf.feign.dto.AddressDto; import com.yd.csf.feign.dto.AddressDto;
import com.yd.csf.feign.dto.taxation.ApiTaxationDto;
import com.yd.csf.feign.enums.RelTypeEnum;
import com.yd.csf.feign.valid.GroupValid;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.Period;
import java.util.List; import java.util.List;
/** /**
...@@ -16,257 +22,248 @@ import java.util.List; ...@@ -16,257 +22,248 @@ import java.util.List;
public class ApiInsurantInfoDto { public class ApiInsurantInfoDto {
/** /**
* 受保人信息表主键id(新增不需要传值,修改需要传值) * 受保人信息表唯一业务ID
*/
private Long id;
/**
* 预约信息主表唯一业务ID(新增不需要传值,修改需要传值)
*/
private String appointmentBizId;
/**
* 受保人信息表唯一业务ID(新增不需要传值,修改需要传值)
*/ */
private String insurantBizId; private String insurantBizId;
/** /**
* 客户类型(字典)
*/
// @NotBlank(message = "客户类型不能为空")
private String customerType;
/**
* 关联客户信息表唯一业务ID(冗余字段) * 关联客户信息表唯一业务ID(冗余字段)
*/ */
@NotBlank(message = "关联客户信息表唯一业务ID不能为空", groups = GroupValid.NotSelf.class)
private String customerBizId; private String customerBizId;
/** /**
* 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段) * 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段)
*/ */
@NotBlank(message = "关联客户编号不能为空", groups = GroupValid.NotSelf.class)
private String customerNo; private String customerNo;
/** /**
* 与投保人关系(字典) * 与投保人关系(字典)
*/ */
// @NotBlank(message = "与投保人关系不能为空") @NotBlank(message = "与投保人关系不能为空", groups = GroupValid.Always.class)
private String policyholderRel; private String policyholderRel;
//-- 以下基础信息
/** /**
* 名字 * 姓名-中文
*/
private String name;
/**
* 名字-英文
*/ */
private String nameEn; @NotBlank(message = "姓名(中文)不能为空", groups = GroupValid.NotSelf.class)
@Pattern(regexp = "^[\u4e00-\u9fa5]{2,6}$", message = "姓名(中文)必须为2-6位汉字", groups = GroupValid.NotSelf.class)
private String nameCn;
/** /**
* 性别(字典 * 姓名-(拼音/英文,通过中文自动加载全部大写的拼音
*/ */
private String gender; @NotBlank(message = "姓名(拼音/英文)不能为空", groups = GroupValid.NotSelf.class)
private String namePyEn;
/** /**
* 证件类型(字典) * 证件类型(字典,下拉选择
*/ */
@NotBlank(message = "证件类型不能为空", groups = GroupValid.NotSelf.class)
private String documentType; private String documentType;
/** /**
* 证件号码 * 证件号码
*/ */
@NotBlank(message = "证件号码不能为空", groups = GroupValid.NotSelf.class)
private String idNumber; private String idNumber;
/** /**
* 出生日期 * 性别(字典,如果是身份证,自动获取性别和生日)
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @NotBlank(message = "性别不能为空", groups = GroupValid.NotSelf.class)
private LocalDateTime birthday; private String gender;
/** /**
* 年龄 * 出生日期(生日,如果是身份证,自动获取性别和生日)
*/ */
@NotNull(message = "生日不能为空", groups = GroupValid.NotSelf.class)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime birthday;
@AssertTrue(message = "必须大于18周岁", groups = GroupValid.NotSelf.class)
public boolean isBirthdayValid() {
if (birthday == null) {
// @NotNull 会处理空值
return true;
}
LocalDateTime now = LocalDateTime.now();
// 计算年龄
int age = Period.between(birthday.toLocalDate(), now.toLocalDate()).getYears();
return age > 18;
}
/**
* 年龄(通过生日自动获取年龄)
*/
@NotBlank(message = "年龄不能为空", groups = GroupValid.NotSelf.class)
private String age; private String age;
/** /**
* 居住地址 * 国籍(下拉选择)
*/
private String residentialAddress;
/**
* 移动电话区号
*/
private String mobileCode;
/**
* 移动电话
*/
private String mobile;
/**
* 邮箱
*/
private String email;
/**
* 行业
*/
private String industry;
/**
* 职位
*/ */
private String position; @NotBlank(message = "国籍不能为空", groups = GroupValid.NotSelf.class)
private String nationality;
/** /**
* 风险偏好(字典) * 出生地
*/ */
private String riskAppetite; private String birthplace;
/** /**
* 是否VIP: 0-否, 1-是(字典) * 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典)
*/ */
private Integer isVip; private String isOtherCountry;
/** /**
* vip备注 * 吸烟情况(字典)
*/ */
private String vipRemark; @NotBlank(message = "吸烟情况不能为空", groups = GroupValid.NotSelf.class)
private String smokingStatus;
/** /**
* 称谓(字典) * 婚姻情况(字典)
*/ */
private String appellation; @NotBlank(message = "婚姻情况不能为空", groups = GroupValid.NotSelf.class)
private String maritalStatus;
/** /**
* 是否区分吸烟(字典) * 教育程度(字典)
*/ */
private String smokingAllowed; @NotBlank(message = "教育程度不能为空", groups = GroupValid.NotSelf.class)
private String educationLevel;
/** /**
* 吸烟量(支/天) * 是否退休(字典)
*/ */
private String smokingVolume; @NotBlank(message = "是否退休不能为空", groups = GroupValid.NotSelf.class)
private String isRetirement;
/** /**
* 出生地(省市 * 退休年龄(如已退休,再显示
*/ */
private String birthplace; private String retirementAge;
/** /**
* 国籍 * 身高(CM)
*/ */
private String nationality; private String height;
/** /**
* 护照号码 * 体重(KG)
*/ */
private String passportNo; private String weight;
/** /**
* 通行证号码 * BMI指数(根据身高和体重自动计算)
*/ */
private String passNo; private String bmi;
/** /**
* 身高 * 风险偏好(字典,下拉选择)
*/ */
private String height; private String riskAppetite;
/** /**
* 体重 * 受供养人数目(通过FNA带入)
*/ */
private String weight; private Integer dependentsNum;
//-- 以下是联系信息
/** /**
* BMI * 移动电话区号
*/ */
private String bmi; @NotBlank(message = "移动电话区号不能为空", groups = GroupValid.NotSelf.class)
private String mobileCode;
/** /**
* 受雇于现职年期 * 移动电话
*/ */
private BigDecimal currentTenure; @NotBlank(message = "移动电话不能为空", groups = GroupValid.NotSelf.class)
private String mobile;
/** /**
* 总负债额 * 住宅电话区号
*/ */
private BigDecimal totalDebt; private String residenceMobileCode;
/** /**
* 受供养人数目 * 住宅电话
*/ */
private Integer dependentsNum; private String residenceMobile;
/** /**
* 婚姻状况(字典) * 固定电话区号
*/ */
private String maritalStatus; private String landlineCode;
/** /**
* 教育程度(字典) * 固定电话
*/ */
private String educationLevel; private String landline;
/** /**
* 总工作年期 * 邮箱
*/ */
private BigDecimal totalWorkingYears; private String email;
/** /**
* 货币(字典) * 证件地址
*/ */
private String currency; @NotBlank(message = "证件地址不能为空", groups = GroupValid.NotSelf.class)
private String certificateAddress;
/** /**
* 现时每月收入 * 通讯地址
*/ */
private BigDecimal currentMonthlyIncome; private String mailingAddress;
/** /**
* 固定电话 * 居住地址(住宅地址)
*/ */
private String landline; private String residentialAddress;
/** /**
* 过往一年是否所属国家以外地区居住超过182日: 0-否, 1-是(字典) * 通讯地址邮政编号
*/ */
private Integer isExceed; private String mailingAddressCode;
//-- 以下是工作信息
/** /**
* 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典 * 就业情况(字典,下拉选择
*/ */
private Integer isOtherCountry; private String employmentStatus;
/** /**
* 旅行(字典) * 公司/学校名称
*/ */
private String travel; private String csName;
/** /**
* 运动(字典) * 行业
*/ */
private String exercise; private String industry;
/** /**
* 游戏(字典) * 现时每月收入(HKD)
*/ */
private String game; private BigDecimal currentMonthlyIncome;
/** /**
* 电影/戏剧(字典) * 总工作年期
*/ */
private String movieDrama; private BigDecimal totalWorkingYears;
/** /**
* 美食(字典) * 受雇于现职年期
*/ */
private String delicacy; private BigDecimal currentTenure;
/** /**
* 公司名称 * 职位
*/ */
private String companyName; private String position;
/** /**
* 公司地址 * 公司地址
...@@ -284,78 +281,69 @@ public class ApiInsurantInfoDto { ...@@ -284,78 +281,69 @@ public class ApiInsurantInfoDto {
private String companyMobile; private String companyMobile;
/** /**
* 公司名称(英文) * 公司地址邮政编号
*/ */
private String companyNameEn; private String companyAddressCode;
/**
* 公司商业登记号码
*/
private String companyBusinessNo;
/**
* 公司注册日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime companyRegisterTime;
//-- 以下是财务信息
/** /**
* 公司注册地区(字典 * 平均每月收入(HKD
*/ */
private String companyRegisterRegion; private BigDecimal monthIncome;
/** /**
* 公司邮箱 * 平均每月支出(HKD)
*/ */
private String companyEmail; private BigDecimal monthExpenditure;
/** /**
* 公司登记地址 * 总流动资产(HKD)
*/ */
private String companyEnterAddress; private BigDecimal totalCurrentAssets;
/** /**
* 通讯地址 * 总负债额(HKD)
*/ */
private String mailingAddress; private BigDecimal totalDebt;
//-- 其他信息(非必填)
/** /**
* 授权代表姓名中文-名字 * 旅行(字典)
*/ */
private String authNameCn; private String travel;
/** /**
* 授权代表姓名英文-名字 * 运动(字典,下拉选择)
*/ */
private String authNameEn; private String exercise;
/** /**
* 授权代表职称 * 游戏(字典,下拉选择)
*/ */
private String authProfessional; private String game;
/** /**
* 授权代表电话区号 * 电影/戏剧(字典,下拉选择)
*/ */
private String authMobileCode; private String movieDrama;
/** /**
* 授权代表电话 * 美食(输入)
*/ */
private String authMobile; private String delicacy;
/** /**
* 其他电话 * 地址列表
*/ */
private String otherMobile; private List<AddressDto> addressList;
/** /**
* 是否接受推广信息: 0-否, 1-是(字典) * 税务信息列表
*/ */
private Integer isPromotion; private List<ApiTaxationDto> apiTaxationDtoList;
/** // 判断与投保人关系是否为本人关系
* 地址列表 public boolean isSelf() {
*/ return RelTypeEnum.MYSELF.getItemValue().equals(policyholderRel);
private List<AddressDto> addressList; }
} }
...@@ -2,11 +2,16 @@ package com.yd.csf.feign.dto.appointment; ...@@ -2,11 +2,16 @@ package com.yd.csf.feign.dto.appointment;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yd.csf.feign.dto.AddressDto; import com.yd.csf.feign.dto.AddressDto;
import io.swagger.v3.oas.annotations.media.Schema; import com.yd.csf.feign.dto.taxation.ApiTaxationDto;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.Period;
import java.util.List; import java.util.List;
/** /**
...@@ -16,271 +21,242 @@ import java.util.List; ...@@ -16,271 +21,242 @@ import java.util.List;
public class ApiPolicyholderInfoDto { public class ApiPolicyholderInfoDto {
/** /**
* 投保人信息主键id(新增不需要传值,修改需要传值) * 投保人信息表唯一业务ID
*/
private Long id;
/**
* 预约信息主表唯一业务ID(新增不需要传值,修改需要传值)
*/
private String appointmentBizId;
/**
* 投保人信息表唯一业务ID(新增不需要传值,修改需要传值)
*/ */
private String policyholderBizId; private String policyholderBizId;
/** /**
* 客户类型(字典)
*/
// @NotBlank(message = "客户类型不能为空")
private String customerType;
/**
* 关联客户信息表唯一业务ID(冗余字段) * 关联客户信息表唯一业务ID(冗余字段)
*/ */
@NotBlank(message = "关联客户信息表唯一业务ID不能为空")
private String customerBizId; private String customerBizId;
/** /**
* 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段) * 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段)
*/ */
@NotBlank(message = "关联客户编号不能为空")
private String customerNo; private String customerNo;
//-- 以下基础信息
/** /**
* 名字 * 姓名-中文
*/
private String name;
/**
* 名字-英文
*/ */
private String nameEn; @NotBlank(message = "姓名(中文)不能为空")
@Pattern(regexp = "^[\u4e00-\u9fa5]{2,6}$", message = "姓名(中文)必须为2-6位汉字")
private String nameCn;
/** /**
* 性别(字典 * 姓名-(拼音/英文,通过中文自动加载全部大写的拼音
*/ */
private String gender; @NotBlank(message = "姓名(拼音/英文)不能为空")
private String namePyEn;
/** /**
* 证件类型(字典) * 证件类型(字典,下拉选择
*/ */
@NotBlank(message = "证件类型不能为空")
private String documentType; private String documentType;
/** /**
* 证件号码 * 证件号码
*/ */
@NotBlank(message = "证件号码不能为空")
private String idNumber; private String idNumber;
/** /**
* 出生日期 * 性别(字典,如果是身份证,自动获取性别和生日)
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @NotBlank(message = "性别不能为空")
private LocalDateTime birthday; private String gender;
/** /**
* 年龄 * 出生日期(生日,如果是身份证,自动获取性别和生日)
*/ */
@NotNull(message = "生日不能为空")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime birthday;
@AssertTrue(message = "必须大于18周岁")
public boolean isBirthdayValid() {
if (birthday == null) {
// @NotNull 会处理空值
return true;
}
LocalDateTime now = LocalDateTime.now();
// 计算年龄
int age = Period.between(birthday.toLocalDate(), now.toLocalDate()).getYears();
return age > 18;
}
/**
* 年龄(通过生日自动获取年龄)
*/
@NotBlank(message = "年龄不能为空")
private String age; private String age;
/** /**
* 居住地址 * 国籍(下拉选择)
*/
private String residentialAddress;
/**
* 移动电话区号
*/
private String mobileCode;
/**
* 移动电话
*/
private String mobile;
/**
* 邮箱
*/
private String email;
/**
* 行业
*/
private String industry;
/**
* 职位
*/
private String position;
/**
* 风险偏好(字典)
*/
private String riskAppetite;
/**
* 是否VIP: 0-否, 1-是(字典)
*/ */
private Integer isVip; @NotBlank(message = "国籍不能为空")
private String nationality;
/**
* vip备注
*/
private String vipRemark;
/** /**
* 称谓(字典) * 出生地
*/ */
private String appellation; private String birthplace;
/** /**
* 是否区分吸烟(字典) * 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典)
*/ */
private String smokingAllowed; private String isOtherCountry;
/** /**
* 吸烟量(支/天) * 吸烟情况(字典)
*/ */
private String smokingVolume; @NotBlank(message = "吸烟情况不能为空")
private String smokingStatus;
/** /**
* 出生地(省市 * 婚姻情况(字典
*/ */
private String birthplace; @NotBlank(message = "婚姻情况不能为空")
private String maritalStatus;
/** /**
* 国籍 * 教育程度(字典)
*/ */
private String nationality; @NotBlank(message = "教育程度不能为空")
private String educationLevel;
/** /**
* 护照号码 * 是否退休(字典)
*/ */
private String passportNo; @NotBlank(message = "是否退休不能为空")
private String isRetirement;
/** /**
* 通行证号码 * 退休年龄(如已退休,再显示)
*/ */
private String passNo; private String retirementAge;
/** /**
* 身高 * 身高(CM)
*/ */
private String height; private String height;
/** /**
* 体重 * 体重(KG)
*/ */
private String weight; private String weight;
/** /**
* BMI * BMI指数(根据身高和体重自动计算)
*/ */
private String bmi; private String bmi;
/** /**
* 货币(字典) * 风险偏好(字典,下拉选择)
*/
private String currency;
/**
* 平均每月支出
*/ */
private BigDecimal monthExpenditure; private String riskAppetite;
/** /**
* 平均每月收入 * 受供养人数目(通过FNA带入)
*/ */
private BigDecimal monthIncome; private Integer dependentsNum;
//-- 以下是联系信息
/** /**
* 受雇于现职年期 * 移动电话区号
*/ */
private BigDecimal currentTenure; @NotBlank(message = "移动电话区号不能为空")
private String mobileCode;
/** /**
* 总流动资产 * 移动电话
*/ */
private BigDecimal totalCurrentAssets; @NotBlank(message = "移动电话不能为空")
private String mobile;
/** /**
* 总负债额 * 住宅电话区号
*/ */
private BigDecimal totalDebt; private String residenceMobileCode;
/** /**
* 受供养人数目 * 住宅电话
*/ */
private Integer dependentsNum; private String residenceMobile;
/** /**
* 婚姻状况(字典) * 固定电话区号
*/ */
private String maritalStatus; private String landlineCode;
/** /**
* 教育程度(字典) * 固定电话
*/ */
private String educationLevel; private String landline;
/** /**
* 总工作年期 * 邮箱
*/ */
private BigDecimal totalWorkingYears; private String email;
/** /**
* 现时每月收入 * 证件地址
*/ */
private BigDecimal currentMonthlyIncome; @NotBlank(message = "证件地址不能为空")
private String certificateAddress;
/** /**
* 固定电话 * 通讯地址
*/ */
private String landline; private String mailingAddress;
/** /**
* 过往一年是否所属国家以外地区居住超过182日: 0-否, 1-是(字典 * 居住地址(住宅地址
*/ */
private Integer isExceed; private String residentialAddress;
/** /**
* 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典) * 通讯地址邮政编号
*/ */
private Integer isOtherCountry; private String mailingAddressCode;
//-- 以下是工作信息
/** /**
* 投保人邮政编码 * 就业情况(字典,下拉选择)
*/ */
private String postalCode; private String employmentStatus;
/** /**
* 旅行(字典) * 公司/学校名称
*/ */
private String travel; private String csName;
/** /**
* 运动(字典) * 行业
*/ */
private String exercise; private String industry;
/** /**
* 游戏(字典) * 现时每月收入(HKD)
*/ */
private String game; private BigDecimal currentMonthlyIncome;
/** /**
* 电影/戏剧(字典) * 总工作年期
*/ */
private String movieDrama; private BigDecimal totalWorkingYears;
/** /**
* 美食(字典) * 受雇于现职年期
*/ */
private String delicacy; private BigDecimal currentTenure;
/** /**
* 公司名称 * 职位
*/ */
private String companyName; private String position;
/** /**
* 公司地址 * 公司地址
...@@ -298,78 +274,64 @@ public class ApiPolicyholderInfoDto { ...@@ -298,78 +274,64 @@ public class ApiPolicyholderInfoDto {
private String companyMobile; private String companyMobile;
/** /**
* 公司名称(英文) * 公司地址邮政编号
*/
private String companyNameEn;
/**
* 公司商业登记号码
*/
private String companyBusinessNo;
/**
* 公司注册日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime companyRegisterTime;
/**
* 公司注册地区(字典)
*/ */
private String companyRegisterRegion; private String companyAddressCode;
//-- 以下是财务信息
/** /**
* 公司邮箱 * 平均每月收入(HKD)
*/ */
private String companyEmail; private BigDecimal monthIncome;
/** /**
* 公司登记地址 * 平均每月支出(HKD)
*/ */
private String companyEnterAddress; private BigDecimal monthExpenditure;
/** /**
* 通讯地址 * 总流动资产(HKD)
*/ */
private String mailingAddress; private BigDecimal totalCurrentAssets;
/** /**
* 授权代表姓名中文-名字 * 总负债额(HKD)
*/ */
private String authNameCn; private BigDecimal totalDebt;
//-- 其他信息(非必填)
/** /**
* 授权代表姓名英文-名字 * 旅行(字典)
*/ */
private String authNameEn; private String travel;
/** /**
* 授权代表职称 * 运动(字典,下拉选择)
*/ */
private String authProfessional; private String exercise;
/** /**
* 授权代表电话区号 * 游戏(字典,下拉选择)
*/ */
private String authMobileCode; private String game;
/** /**
* 授权代表电话 * 电影/戏剧(字典,下拉选择)
*/ */
private String authMobile; private String movieDrama;
/** /**
* 其他电话 * 美食(输入)
*/ */
private String otherMobile; private String delicacy;
/** /**
* 是否接受推广信息: 0-否, 1-是(字典) * 地址列表
*/ */
private Integer isPromotion; private List<AddressDto> addressList;
/** /**
* 地址列表 * 税务信息列表
*/ */
private List<AddressDto> addressList; private List<ApiTaxationDto> apiTaxationDtoList;
} }
...@@ -2,6 +2,7 @@ package com.yd.csf.feign.dto.appointment; ...@@ -2,6 +2,7 @@ package com.yd.csf.feign.dto.appointment;
import lombok.Data; import lombok.Data;
import javax.validation.Valid;
import java.util.List; import java.util.List;
/** /**
...@@ -13,6 +14,7 @@ public class ApiProductPlanInfoDto { ...@@ -13,6 +14,7 @@ public class ApiProductPlanInfoDto {
/** /**
* 产品计划主信息 * 产品计划主信息
*/ */
@Valid
private ApiProductPlanMainInfoDto apiProductPlanMainInfoDto; private ApiProductPlanMainInfoDto apiProductPlanMainInfoDto;
/** /**
......
package com.yd.csf.feign.dto.appointment; package com.yd.csf.feign.dto.appointment;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
/** /**
* 产品计划主信息 * 产品计划主信息
...@@ -12,82 +11,71 @@ import java.time.LocalDateTime; ...@@ -12,82 +11,71 @@ import java.time.LocalDateTime;
public class ApiProductPlanMainInfoDto { public class ApiProductPlanMainInfoDto {
/** /**
* 产品计划表主键id(新增不需要传值,编辑需要传值) * 产品计划信息表唯一业务ID
*/ */
private Long id; private String planBizId;
/** /**
* 预约信息主表唯一业务ID(新增不需要传值,编辑需要传值 * 保险公司ID(产品上架信息绑定的保险公司参数
*/ */
private String appointmentBizId; private String companyId;
/** /**
* 产品计划信息表唯一业务ID(新增不需要传值,编辑需要传值) * 保险公司名称
*/ */
private String planBizId; private String companyName;
/** /**
* 保险产品唯一业务ID(中台保险产品业务id,冗余 * 保险险种ID(产品上架信息绑定的保险险种参数
*/ */
// @NotBlank(message = "保险产品唯一业务ID不能为空") private String insuranceTypeId;
private String productBizId;
/** /**
* 保险产品名称(中台保险产品名称,冗余) * 保险险种名称
*/ */
// @NotBlank(message = "保险产品名称不能为空") private String insuranceTypeName;
private String productName;
/** /**
* 保险公司名称(冗余字段) * 产品上架信息表唯一业务ID
*/ */
private String companyName; @NotBlank(message = "产品ID不能为空")
private String productLaunchBizId;
/** /**
* 地区 * 产品上架信息表名称(标题)
*/ */
private String region; @NotBlank(message = "产品名称不能为空")
private String productLaunchName;
/** /**
* 货币(字典) * 供款期数
*/ */
// @NotBlank(message = "货币不能为空") private String issueNumber;
private String currency;
/** /**
* 供款年期(字典) * 保障年期
*/ */
// @NotBlank(message = "供款年期不能为空") private String guaranteePeriod;
private String paymentTerm;
/** /**
* 付款频率(字典) * 保单币种
*/ */
// @NotBlank(message = "付款频率不能为空") private String policyCurrency;
private String paymentFrequency;
/** /**
* 每期保费 * 保单额度(重疾)
*/ */
// @NotNull(message = "每期保费不能为空")
private BigDecimal eachIssuePremium;
/**
* 保额
*/
// @NotNull(message = "保额不能为空")
private BigDecimal sumInsured; private BigDecimal sumInsured;
/** /**
* 是否预缴保费: 0-否, 1-是(字典) * 付款频率(字典)
*/ */
// @NotNull(message = "是否预缴保费不能为空") private String paymentFrequency;
private Integer isPrepay;
/** /**
* 预付额 * 每期保费
*/ */
private BigDecimal deductibles; private BigDecimal eachIssuePremium;
/** /**
* 首期付款方式(字典) * 首期付款方式(字典)
...@@ -95,33 +83,37 @@ public class ApiProductPlanMainInfoDto { ...@@ -95,33 +83,37 @@ public class ApiProductPlanMainInfoDto {
private String initialPaymentMethod; private String initialPaymentMethod;
/** /**
* 续期付款方式(字典) * 保单征费
*/ */
private String renewalPaymentMethod; private BigDecimal policyLevy;
/** /**
* 红利分配方式(字典) * 是否预缴保费: 0-否, 1-是(字典)
*/ */
private String dividendDistributionMethod; private String isPrepay;
/** /**
* 保单日期回溯: 0-否, 1-是(字典) * 是否追溯: 0-否, 1-是(字典)
*/ */
private Integer isBacktrack; private String isTraceable;
/** /**
* 保单生效日 * 保单日期回溯: 0-否, 1-是(字典)
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String isBacktrack;
private LocalDateTime policyEffectiveDate;
/** /**
* 是否参加递增保障权益: 0-否, 1-是(字典) * 是否参加递增保障权益: 0-否, 1-是(字典)
*/ */
private Integer isJoin; private String isJoin;
/** /**
* 保单征费 * 红利分配方式(字典)
*/ */
private BigDecimal policyLevy; private String dividendDistributionMethod;
/**
* 续期付款方式(字典)
*/
private String renewalPaymentMethod;
} }
...@@ -2,7 +2,6 @@ package com.yd.csf.feign.dto.appointment; ...@@ -2,7 +2,6 @@ package com.yd.csf.feign.dto.appointment;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**
...@@ -12,17 +11,7 @@ import java.time.LocalDateTime; ...@@ -12,17 +11,7 @@ import java.time.LocalDateTime;
public class ApiSecondHolderInfoDto { public class ApiSecondHolderInfoDto {
/** /**
* 第二持有人信息表主键id(新增不需要传值,修改需要传值) * 第二持有人信息表唯一业务ID
*/
private Long id;
/**
* 预约信息主表唯一业务ID(新增不需要传值,修改需要传值)
*/
private String appointmentBizId;
/**
* 第二持有人信息表唯一业务ID(新增不需要传值,修改需要传值)
*/ */
private String secondHolderBizId; private String secondHolderBizId;
...@@ -32,22 +21,17 @@ public class ApiSecondHolderInfoDto { ...@@ -32,22 +21,17 @@ public class ApiSecondHolderInfoDto {
private String insurantRel; private String insurantRel;
/** /**
* 名字 * 姓名-中文
*/ */
private String name; private String nameCn;
/** /**
* 名字-英文 * 姓名-(拼音/英文,通过中文自动加载全部大写的拼音)
*/ */
private String nameEn; private String namePyEn;
/** /**
* 性别(字典) * 证件类型(字典,下拉选择)
*/
private String gender;
/**
* 证件类型(字典)
*/ */
private String documentType; private String documentType;
...@@ -57,18 +41,13 @@ public class ApiSecondHolderInfoDto { ...@@ -57,18 +41,13 @@ public class ApiSecondHolderInfoDto {
private String idNumber; private String idNumber;
/** /**
* 护照号码 * 性别(字典,如果是身份证,自动获取性别和生日)
*/ */
private String passportNumber; private String gender;
/** /**
* 出生日期 * 出生日期(生日,如果是身份证,自动获取性别和生日)
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime birthTime; private LocalDateTime birthday;
/**
* 年龄
*/
private String age;
} }
...@@ -69,15 +69,15 @@ public class ApiExcelAppointmentMainDto { ...@@ -69,15 +69,15 @@ public class ApiExcelAppointmentMainDto {
return mainDto; return mainDto;
} }
/** // /**
* ApiExcelAppointmentMainDto构造ApiAppointmentInfoDto用于保存到表 // * ApiExcelAppointmentMainDto构造ApiAppointmentInfoDto用于保存到表
* @param dto // * @param dto
* @return // * @return
*/ // */
public static ApiAppointmentInfoDto setApiAppointmentInfoDto(ApiExcelAppointmentMainDto dto) { // public static ApiAppointmentInfoDto setApiAppointmentInfoDto(ApiExcelAppointmentMainDto dto) {
ApiAppointmentInfoDto infoDto = new ApiAppointmentInfoDto(); // ApiAppointmentInfoDto infoDto = new ApiAppointmentInfoDto();
infoDto.setIntentionAppointmentTime(DateUtil.getLocalDateTime(dto.getMainIntentionAppointmentDate() + " " + dto.getMainIntentionAppointmentTime())); // infoDto.setIntentionAppointmentTime(DateUtil.getLocalDateTime(dto.getMainIntentionAppointmentDate() + " " + dto.getMainIntentionAppointmentTime()));
infoDto.setIsTj(dto.getIsTj()); // infoDto.setIsTj(dto.getIsTj());
return infoDto; // return infoDto;
} // }
} }
...@@ -510,9 +510,9 @@ public class ApiExcelImportAppointmentDto { ...@@ -510,9 +510,9 @@ public class ApiExcelImportAppointmentDto {
//到港时间 //到港时间
infoDto.setArrivalTime(DateUtil.getLocalDateTime(dto.getHkArrivalTime())); infoDto.setArrivalTime(DateUtil.getLocalDateTime(dto.getHkArrivalTime()));
//业务编号->介绍人编号 TODO //业务编号->介绍人编号 TODO
infoDto.setBusinessNo(dto.getMainReferrerId()); // infoDto.setBusinessNo(dto.getMainReferrerId());
//确定预约时间->预约日期 (西元 年/月/日) + 預約時間 //确定预约时间->预约日期 (西元 年/月/日) + 預約時間
infoDto.setConfirmAppointmentTime(DateUtil.getLocalDateTime(dto.getMainIntentionAppointmentDate() + " " + dto.getMainIntentionAppointmentTime())); // infoDto.setConfirmAppointmentTime(DateUtil.getLocalDateTime(dto.getMainIntentionAppointmentDate() + " " + dto.getMainIntentionAppointmentTime()));
//离港时间->离港(澳)日期及时间(离港时间)(预约信息主表) //离港时间->离港(澳)日期及时间(离港时间)(预约信息主表)
infoDto.setDepartureTime(DateUtil.getLocalDateTime(dto.getHkDepartureTime())); infoDto.setDepartureTime(DateUtil.getLocalDateTime(dto.getHkDepartureTime()));
//客户在港期间联络电话->客户在港期间联络电话(预约信息主表)区号+号码 //客户在港期间联络电话->客户在港期间联络电话(预约信息主表)区号+号码
...@@ -540,7 +540,7 @@ public class ApiExcelImportAppointmentDto { ...@@ -540,7 +540,7 @@ public class ApiExcelImportAppointmentDto {
//保险公司名称 //保险公司名称
infoDto.setCompanyName(dto.getPlanCompanyName()); infoDto.setCompanyName(dto.getPlanCompanyName());
//货币(字典) //货币(字典)
infoDto.setCurrency(dto.getPlanCurrency()); infoDto.setPolicyCurrency(dto.getPlanCurrency());
//预付额 TODO //预付额 TODO
// infoDto.setDeductibles(); // infoDto.setDeductibles();
//红利分配方式(字典) //红利分配方式(字典)
...@@ -552,17 +552,17 @@ public class ApiExcelImportAppointmentDto { ...@@ -552,17 +552,17 @@ public class ApiExcelImportAppointmentDto {
infoDto.setInitialPaymentMethod(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses, infoDto.setInitialPaymentMethod(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses,
DictTypeEnum.CSF_AP_FIRST_ISSUE.getItemValue(),dto.getPlanInitialPaymentMethod())); DictTypeEnum.CSF_AP_FIRST_ISSUE.getItemValue(),dto.getPlanInitialPaymentMethod()));
//是否参加递增保障权益->是否參加遞增保障權益/通脹加保權益 //是否参加递增保障权益->是否參加遞增保障權益/通脹加保權益
infoDto.setIsJoin(Integer.getInteger(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses, infoDto.setIsJoin(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses,
DictTypeEnum.SYS_NO_YES.getItemValue(),dto.getPlanIsJoin()))); DictTypeEnum.SYS_NO_YES.getItemValue(),dto.getPlanIsJoin()));
//是否预缴保费->是否預繳保費 (如是,請填寫首期保費以外的剩餘保費)(是否预缴保费: 0-否, 1-是(字典)(产品计划信息表)) //是否预缴保费->是否預繳保費 (如是,請填寫首期保費以外的剩餘保費)(是否预缴保费: 0-否, 1-是(字典)(产品计划信息表))
infoDto.setIsPrepay(Integer.getInteger(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses, infoDto.setIsPrepay(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses,
DictTypeEnum.SYS_NO_YES.getItemValue(),dto.getPlanIsPrepay()))); DictTypeEnum.SYS_NO_YES.getItemValue(),dto.getPlanIsPrepay()));
//付款频率 //付款频率
infoDto.setPaymentFrequency(dto.getPlanPaymentFrequency()); infoDto.setPaymentFrequency(dto.getPlanPaymentFrequency());
//供款年期 //供款年期
infoDto.setPaymentTerm(dto.getPlanPaymentTerm()); infoDto.setIssueNumber(dto.getPlanPaymentTerm());
//保险产品名称->基本計劃名稱 //保险产品名称->基本計劃名稱
infoDto.setProductName(dto.getPlanProductName()); infoDto.setProductLaunchName(dto.getPlanProductName());
//续期付款方式 //续期付款方式
infoDto.setRenewalPaymentMethod(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses, infoDto.setRenewalPaymentMethod(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses,
DictTypeEnum.CSF_AP_FIRST_ISSUE.getItemValue(),dto.getPlanRenewalPaymentMethod())); DictTypeEnum.CSF_AP_FIRST_ISSUE.getItemValue(),dto.getPlanRenewalPaymentMethod()));
...@@ -610,14 +610,14 @@ public class ApiExcelImportAppointmentDto { ...@@ -610,14 +610,14 @@ public class ApiExcelImportAppointmentDto {
infoDto.setMobile(StringUtil.getSplitStr(dto.getPolicyholderMobile(),"-",1)); infoDto.setMobile(StringUtil.getSplitStr(dto.getPolicyholderMobile(),"-",1));
infoDto.setMobileCode(StringUtil.getSplitStr(dto.getPolicyholderMobile(),"-",0)); infoDto.setMobileCode(StringUtil.getSplitStr(dto.getPolicyholderMobile(),"-",0));
//名字->中文姓名(投保人信息表:名字) //名字->中文姓名(投保人信息表:名字)
infoDto.setName(dto.getPolicyholderName()); infoDto.setNameCn(dto.getPolicyholderName());
//名字-英文->英文姓名 (同护照)(投保人信息表:名字-英文) //名字-英文->英文姓名 (同护照)(投保人信息表:名字-英文)
infoDto.setNameEn(dto.getPolicyholderNameEn()); infoDto.setNamePyEn(dto.getPolicyholderNameEn());
//国籍 //国籍
infoDto.setNationality(dto.getPolicyholderNationality()); infoDto.setNationality(dto.getPolicyholderNationality());
//通行证号码->港澳通行证号码(投保人信息表:通行证号码) //通行证号码->港澳通行证号码(投保人信息表:通行证号码)
infoDto.setPassNo(dto.getPolicyholderPassNo()); // infoDto.setPassNo(dto.getPolicyholderPassNo());
infoDto.setPassportNo(dto.getPolicyholderPassportNo()); // infoDto.setPassportNo(dto.getPolicyholderPassportNo());
//职位 //职位
infoDto.setPosition(dto.getPolicyholderPosition()); infoDto.setPosition(dto.getPolicyholderPosition());
//居住地址->永久(住宅)地址(投保人信息表:居住地址) //居住地址->永久(住宅)地址(投保人信息表:居住地址)
...@@ -666,14 +666,14 @@ public class ApiExcelImportAppointmentDto { ...@@ -666,14 +666,14 @@ public class ApiExcelImportAppointmentDto {
infoDto.setMobile(StringUtil.getSplitStr(dto.getInsurantMobile(),"-",1)); infoDto.setMobile(StringUtil.getSplitStr(dto.getInsurantMobile(),"-",1));
infoDto.setMobileCode(StringUtil.getSplitStr(dto.getInsurantMobile(),"-",0)); infoDto.setMobileCode(StringUtil.getSplitStr(dto.getInsurantMobile(),"-",0));
//名字->中文姓名(投保人信息表:名字) //名字->中文姓名(投保人信息表:名字)
infoDto.setName(dto.getInsurantName()); infoDto.setNameCn(dto.getInsurantName());
//名字-英文->英文姓名 (同护照)(投保人信息表:名字-英文) //名字-英文->英文姓名 (同护照)(投保人信息表:名字-英文)
infoDto.setNameEn(dto.getInsurantNameEn()); infoDto.setNamePyEn(dto.getInsurantNameEn());
//国籍 //国籍
infoDto.setNationality(dto.getInsurantNationality()); infoDto.setNationality(dto.getInsurantNationality());
//通行证号码->港澳通行证号码(投保人信息表:通行证号码) //通行证号码->港澳通行证号码(投保人信息表:通行证号码)
infoDto.setPassNo(dto.getInsurantPassNo()); // infoDto.setPassNo(dto.getInsurantPassNo());
infoDto.setPassportNo(dto.getInsurantPassportNo()); // infoDto.setPassportNo(dto.getInsurantPassportNo());
//职位 //职位
infoDto.setPosition(dto.getInsurantPosition()); infoDto.setPosition(dto.getInsurantPosition());
//居住地址->永久(住宅)地址(投保人信息表:居住地址) //居住地址->永久(住宅)地址(投保人信息表:居住地址)
...@@ -693,7 +693,7 @@ public class ApiExcelImportAppointmentDto { ...@@ -693,7 +693,7 @@ public class ApiExcelImportAppointmentDto {
ApiSecondHolderInfoDto infoDto, ApiSecondHolderInfoDto infoDto,
List<GetDictItemListByDictTypeResponse> dictTypeResponses) { List<GetDictItemListByDictTypeResponse> dictTypeResponses) {
//出生日期 //出生日期
infoDto.setBirthTime(DateUtil.getYMDLocalDateTime(dto.getSecondHolderBirthTime())); infoDto.setBirthday(DateUtil.getYMDLocalDateTime(dto.getSecondHolderBirthTime()));
//性别(字典) //性别(字典)
infoDto.setGender(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses, infoDto.setGender(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses,
DictTypeEnum.SYS_GENDER.getItemValue(),dto.getSecondHolderGender())); DictTypeEnum.SYS_GENDER.getItemValue(),dto.getSecondHolderGender()));
...@@ -703,9 +703,9 @@ public class ApiExcelImportAppointmentDto { ...@@ -703,9 +703,9 @@ public class ApiExcelImportAppointmentDto {
infoDto.setInsurantRel(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses, infoDto.setInsurantRel(GetDictItemListByDictTypeResponse.getItemValue(dictTypeResponses,
DictTypeEnum.CSF_AP_REL.getItemValue(),ChineseTextConverter.traditionalToSimplified(dto.getSecondHolderInsurantRel()))); DictTypeEnum.CSF_AP_REL.getItemValue(),ChineseTextConverter.traditionalToSimplified(dto.getSecondHolderInsurantRel())));
//名字 //名字
infoDto.setName(dto.getSecondHolderName()); infoDto.setNameCn(dto.getSecondHolderName());
//名字-英文 //名字-英文
infoDto.setNameEn(dto.getSecondHolderNameEn()); infoDto.setNamePyEn(dto.getSecondHolderNameEn());
return infoDto; return infoDto;
} }
...@@ -727,11 +727,11 @@ public class ApiExcelImportAppointmentDto { ...@@ -727,11 +727,11 @@ public class ApiExcelImportAppointmentDto {
//受益比例 //受益比例
infoDto.setBenefitRatio(dto.getBeneficiaryBenefitRatio()); infoDto.setBenefitRatio(dto.getBeneficiaryBenefitRatio());
//出生日期 //出生日期
infoDto.setBirthTime(DateUtil.getYMDLocalDateTime(dto.getBeneficiaryBirthTime())); infoDto.setBirthday(DateUtil.getYMDLocalDateTime(dto.getBeneficiaryBirthTime()));
//中文姓名 //中文姓名
infoDto.setName(dto.getBeneficiaryName()); infoDto.setNameCn(dto.getBeneficiaryName());
//名字-英文 //名字-英文
infoDto.setNameEn(dto.getBeneficiaryNameEn()); infoDto.setNamePyEn(dto.getBeneficiaryNameEn());
//证件号码 //证件号码
infoDto.setIdNumber(dto.getBeneficiaryIdNumber()); infoDto.setIdNumber(dto.getBeneficiaryIdNumber());
//与受保人关系 //与受保人关系
......
package com.yd.csf.feign.dto.taxation;
import lombok.Data;
@Data
public class ApiTaxationDto {
/**
* 税务国家
*/
private String taxCountry;
/**
* 税务编号
*/
private String taxId;
}
package com.yd.csf.service.enums; package com.yd.csf.feign.enums;
/** /**
* 用户关系枚举 * 用户关系枚举
......
...@@ -6,6 +6,7 @@ import com.yd.csf.feign.dto.appointment.ApiAppointmentInfoDto; ...@@ -6,6 +6,7 @@ import com.yd.csf.feign.dto.appointment.ApiAppointmentInfoDto;
import com.yd.csf.feign.request.appointment.*; import com.yd.csf.feign.request.appointment.*;
import com.yd.csf.feign.response.appointment.ApiAppointmentAddResponse; import com.yd.csf.feign.response.appointment.ApiAppointmentAddResponse;
import com.yd.csf.feign.response.appointment.ApiAppointmentDetailResponse; import com.yd.csf.feign.response.appointment.ApiAppointmentDetailResponse;
import com.yd.csf.feign.response.appointment.ApiAppointmentLogDetailResponse;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -57,6 +58,11 @@ public class ApiAppointmentFeignFallbackFactory implements FallbackFactory<ApiAp ...@@ -57,6 +58,11 @@ public class ApiAppointmentFeignFallbackFactory implements FallbackFactory<ApiAp
} }
@Override @Override
public Result editStorage(ApiAppointmentEditStorageRequest request) {
return null;
}
@Override
public Result editConfirmTime(ApiAppointmentEditConfirmTimeRequest request) { public Result editConfirmTime(ApiAppointmentEditConfirmTimeRequest request) {
return null; return null;
} }
...@@ -87,9 +93,24 @@ public class ApiAppointmentFeignFallbackFactory implements FallbackFactory<ApiAp ...@@ -87,9 +93,24 @@ public class ApiAppointmentFeignFallbackFactory implements FallbackFactory<ApiAp
} }
@Override @Override
public Result editStatus(ApiAppointmentEditStatusRequest request) {
return null;
}
@Override
public Result del(String appointmentBizId) { public Result del(String appointmentBizId) {
return null; return null;
} }
@Override
public Result logPage(ApiAppointmentLogPageRequest request) {
return null;
}
@Override
public Result<ApiAppointmentLogDetailResponse> logDetail(String appointmentLogBizId) {
return null;
}
}; };
} }
} }
package com.yd.csf.feign.fallback.common;
import com.yd.common.result.Result;
import com.yd.csf.feign.client.common.ApiCsfCommonFeignClient;
import com.yd.csf.feign.request.common.ApiCsfCalculateRequest;
import com.yd.csf.feign.response.common.ApiCsfCalculateResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 香港保险服务-公共接口信息Feign降级处理
*/
@Slf4j
@Component
public class ApiCsfCommonFeignFallbackFactory implements FallbackFactory<ApiCsfCommonFeignClient> {
@Override
public ApiCsfCommonFeignClient create(Throwable cause) {
return new ApiCsfCommonFeignClient() {
@Override
public Result<List<ApiCsfCalculateResponse>> calculate(ApiCsfCalculateRequest request) {
return null;
}
};
}
}
...@@ -3,6 +3,8 @@ package com.yd.csf.feign.request.appointment; ...@@ -3,6 +3,8 @@ package com.yd.csf.feign.request.appointment;
import com.yd.csf.feign.dto.appointment.*; import com.yd.csf.feign.dto.appointment.*;
import com.yd.question.feign.dto.ApiAnswerSessionsDto; import com.yd.question.feign.dto.ApiAnswerSessionsDto;
import lombok.Data; import lombok.Data;
import javax.validation.Valid;
import java.util.List; import java.util.List;
/** /**
...@@ -12,18 +14,21 @@ import java.util.List; ...@@ -12,18 +14,21 @@ import java.util.List;
public class ApiAppointmentAddRequest { public class ApiAppointmentAddRequest {
/** /**
* 预约信息 * 预约信息(包含签约信息)
*/ */
@Valid
private ApiAppointmentInfoDto apiAppointmentInfoDto; private ApiAppointmentInfoDto apiAppointmentInfoDto;
/** /**
* 产品计划信息 * 产品计划信息
*/ */
@Valid
private ApiProductPlanInfoDto apiProductPlanInfoDto; private ApiProductPlanInfoDto apiProductPlanInfoDto;
/** /**
* 投保人信息 * 投保人信息
*/ */
@Valid
private ApiPolicyholderInfoDto apiPolicyholderInfoDto; private ApiPolicyholderInfoDto apiPolicyholderInfoDto;
/** /**
......
...@@ -4,6 +4,7 @@ import com.yd.csf.feign.dto.appointment.*; ...@@ -4,6 +4,7 @@ import com.yd.csf.feign.dto.appointment.*;
import com.yd.question.feign.dto.ApiAnswerSessionsDto; import com.yd.question.feign.dto.ApiAnswerSessionsDto;
import lombok.Data; import lombok.Data;
import javax.validation.Valid;
import java.util.List; import java.util.List;
/** /**
...@@ -15,16 +16,19 @@ public class ApiAppointmentEditRequest { ...@@ -15,16 +16,19 @@ public class ApiAppointmentEditRequest {
/** /**
* 预约信息 * 预约信息
*/ */
@Valid
private ApiAppointmentInfoDto apiAppointmentInfoDto; private ApiAppointmentInfoDto apiAppointmentInfoDto;
/** /**
* 产品计划信息 * 产品计划信息
*/ */
@Valid
private ApiProductPlanInfoDto apiProductPlanInfoDto; private ApiProductPlanInfoDto apiProductPlanInfoDto;
/** /**
* 投保人信息 * 投保人信息
*/ */
@Valid
private ApiPolicyholderInfoDto apiPolicyholderInfoDto; private ApiPolicyholderInfoDto apiPolicyholderInfoDto;
/** /**
......
package com.yd.csf.feign.request.appointment;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
public class ApiAppointmentEditStatusRequest {
/**
* 操作类型 1-取消申请 2-取消预约
*/
@NotNull(message = "操作类型不能为空")
private Integer oprType;
/**
* 预约信息主表唯一业务ID
*/
@NotBlank(message = "预约信息主表唯一业务ID不能为空")
private String appointmentBizId;
/**
* 预约状态
*/
@NotNull(message = "预约状态不能为空")
private Integer status;
/**
* 通用备注
*/
private String remark;
}
package com.yd.csf.feign.request.appointment;
import com.yd.csf.feign.dto.appointment.*;
import com.yd.question.feign.dto.ApiAnswerSessionsDto;
import lombok.Data;
import java.util.List;
@Data
public class ApiAppointmentEditStorageRequest {
/**
* 预约信息
*/
private ApiAppointmentInfoDto apiAppointmentInfoDto;
/**
* 产品计划信息
*/
private ApiProductPlanInfoDto apiProductPlanInfoDto;
/**
* 投保人信息
*/
private ApiPolicyholderInfoDto apiPolicyholderInfoDto;
/**
* 受保人信息
*/
private ApiInsurantInfoDto apiInsurantInfoDto;
/**
* 受益人列表信息
*/
private List<ApiBeneficiaryInfoDto> apiBeneficiaryInfoDtoList;
/**
* 第二持有人信息
*/
private ApiSecondHolderInfoDto apiSecondHolderInfoDto;
/**
* 健康信息 - 答题会话对象(实际回答问题的内容)集合,对象即ApiAnswerSessionsDto,一个对象一个问卷问题
*/
private List<ApiAnswerSessionsDto> answerSessionsDtoList;
}
package com.yd.csf.feign.request.appointment;
import com.yd.common.dto.PageDto;
import lombok.Data;
@Data
public class ApiAppointmentLogPageRequest extends PageDto {
}
package com.yd.csf.feign.request.common;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
public class ApiCsfCalculateRequest {
/**
* 计算类型 1-通过中文自动加载全部大写的拼音 2-身份证号码计算性别 3-身份证号码计算生日 4-生日计算年龄 5-身高和体重计算BMI指数 6-身份证号码计算性别/生日/年龄
*/
@NotNull(message = "计算类型不能为空")
private Integer calculateType;
/**
* 计算请求值(单个请求参数值)
*/
private String requestValue;
/**
* 计算请求值列表(多个请求参数值)
*/
private List<String> requestValueList;
}
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
public class ApiAppointmentDetailResponse { public class ApiAppointmentDetailResponse {
/** /**
* 预约状态: 0-暂存 1-待预约, 2-待签署 3-已签署 4-已取消(字典) * 预约状态
*/ */
private Integer status; private Integer status;
......
package com.yd.csf.feign.response.appointment;
import com.yd.csf.feign.dto.appointment.ApiAppointmentReferrerLogDto;
import com.yd.csf.feign.dto.appointment.ApiAppointmentUserSignLogDto;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
@Data
public class ApiAppointmentLogDetailResponse {
/**
* 预约信息日志表主键ID
*/
private Long id;
/**
* 预约信息日志表唯一业务ID
*/
private String appointmentLogBizId;
/**
* 预约信息主表唯一业务ID
*/
private String appointmentBizId;
/**
* 预约编号
*/
private String appointmentNo;
/**
* 关联客户信息表唯一业务ID(冗余字段)
*/
private String customerBizId;
/**
* 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段)
*/
private String customerNo;
/**
* 关联FNA信息表唯一业务ID(冗余字段)
*/
private String fnaBizId;
/**
* 关联FNA编号(和FNA信息表唯一业务ID是一对,唯一,冗余字段)
*/
private String fnaNo;
/**
* 关联计划书信息表唯一业务ID(冗余字段)
*/
private String proposalBizId;
/**
* 关联计划书编号(和计划书信息表唯一业务ID是一对,唯一,冗余字段)
*/
private String proposalNo;
/**
* 预约状态: 0-暂存 1-待预约, 2-待签署 3-已签署 4-已取消(字典)
*/
private Integer status;
/**
* 申请类型(字典)
*/
private String applyType;
/**
* 到港时间
*/
private LocalDateTime arrivalTime;
/**
* 离港时间
*/
private LocalDateTime departureTime;
/**
* 会面地点(字典)
*/
private String meetingPoint;
/**
* 签单地址
*/
private String signingAddress;
/**
* 客户在港期间联络电话区号
*/
private String hkMobileCode;
/**
* 客户在港期间联络电话
*/
private String hkMobile;
/**
* 是否开户: 0-否, 1-是(字典)
*/
private Integer isOpenAccount;
/**
* 开户行名称
*/
private String bankName;
/**
* 开户行支行(分行)
*/
private String bankBranchName;
/**
* 开户时间段(开始)
*/
private LocalDateTime openAccountStartTime;
/**
* 开户时间段(结束)
*/
private LocalDateTime openAccountEndTime;
/**
* 开户地点
*/
private String openAccountLocation;
/**
* 开户须知
*/
private String openAccountNotice;
/**
* 是否体检: 0-否, 1-是(字典)
*/
private Integer isTj;
/**
* 是否购买过香港保险: 0-否, 1-是(字典)
*/
private Integer isBuy;
/**
* 转保声明选项(字典)
*/
private String policyTransfer;
/**
* 是否有用车服务:0-否, 1-是(字典)
*/
private Integer isUseCar;
/**
* 通用备注
*/
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
private Integer isDeleted;
/**
* 创建人ID
*/
private String creatorId;
/**
* 创建人用户名
*/
private String creatorName;
/**
* 更新人ID
*/
private String updaterId;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新时间
*/
private LocalDateTime updateTime;
/**
* 预约-转介人信息日志列表
*/
private List<ApiAppointmentReferrerLogDto> referrerLogDtoList;
/**
* 预约-签单员信息日志列表
*/
private List<ApiAppointmentUserSignLogDto> userSignLogDtoList;
}
package com.yd.csf.feign.response.appointment;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class ApiAppointmentLogPageResponse {
/**
* 预约信息日志表主键ID
*/
private Long id;
/**
* 预约信息日志表唯一业务ID
*/
private String appointmentLogBizId;
/**
* 预约信息主表唯一业务ID
*/
private String appointmentBizId;
/**
* 预约状态
*/
private Integer status;
/**
* 通用备注
*/
private String remark;
/**
* 创建人ID
*/
private String creatorId;
/**
* 创建人用户名
*/
private String creatorName;
/**
* 创建时间
*/
private LocalDateTime createTime;
}
package com.yd.csf.feign.response.common;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
public class ApiCsfCalculateResponse {
/**
* 计算类型 1-通过中文自动加载全部大写的拼音 2-身份证号码计算性别 3-身份证号码计算生日 4-生日计算年龄 5-身高和体重计算BMI指数 6-身份证号码计算性别/生日/年龄
*/
@NotNull(message = "计算类型不能为空")
private Integer calculateType;
/**
* 计算请求值(单个请求参数值)
*/
private String requestValue;
/**
* 计算请求值列表(多个请求参数值)
*/
private List<String> requestValueList;
/**
* 计算返回值
*/
private String responseValue;
}
package com.yd.csf.feign.valid;
/**
* 分组校验接口
*/
public interface GroupValid {
// 非本人时需要校验的组
interface NotSelf {}
// 总是需要校验的组
interface Always {}
}
\ No newline at end of file
package com.yd.csf.service.dao;
import com.yd.csf.service.model.AppointmentLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 预约信息日志表(快照表) Mapper 接口
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface AppointmentLogMapper extends BaseMapper<AppointmentLog> {
}
...@@ -2,7 +2,9 @@ package com.yd.csf.service.dao; ...@@ -2,7 +2,9 @@ package com.yd.csf.service.dao;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yd.csf.feign.request.appointment.ApiAppointmentLogPageRequest;
import com.yd.csf.feign.request.appointment.ApiAppointmentPageRequest; import com.yd.csf.feign.request.appointment.ApiAppointmentPageRequest;
import com.yd.csf.feign.response.appointment.ApiAppointmentLogPageResponse;
import com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse; import com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse;
import com.yd.csf.feign.dto.appointmentfile.ItineraryDto; import com.yd.csf.feign.dto.appointmentfile.ItineraryDto;
import com.yd.csf.service.model.Appointment; import com.yd.csf.service.model.Appointment;
...@@ -26,4 +28,7 @@ public interface AppointmentMapper extends BaseMapper<Appointment> { ...@@ -26,4 +28,7 @@ public interface AppointmentMapper extends BaseMapper<Appointment> {
ItineraryDto getItineraryDto(@Param("appointmentBizId") String appointmentBizId); ItineraryDto getItineraryDto(@Param("appointmentBizId") String appointmentBizId);
Integer updateDelStatus(@Param("appointmentBizId") String appointmentBizId); Integer updateDelStatus(@Param("appointmentBizId") String appointmentBizId);
IPage<ApiAppointmentLogPageResponse> logPage(@Param("page") Page<ApiAppointmentLogPageResponse> page,
@Param("request") ApiAppointmentLogPageRequest request);
} }
package com.yd.csf.service.dao;
import com.yd.csf.service.model.AppointmentReferrerLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 预约-转介人信息日志表(快照表) Mapper 接口
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface AppointmentReferrerLogMapper extends BaseMapper<AppointmentReferrerLog> {
}
package com.yd.csf.service.dao;
import com.yd.csf.service.model.AppointmentReferrer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 预约-转介人信息表 Mapper 接口
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface AppointmentReferrerMapper extends BaseMapper<AppointmentReferrer> {
}
package com.yd.csf.service.dao;
import com.yd.csf.service.model.AppointmentUserSignLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 预约-签单员信息日志表(快照表) Mapper 接口
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface AppointmentUserSignLogMapper extends BaseMapper<AppointmentUserSignLog> {
}
package com.yd.csf.service.dao;
import com.yd.csf.service.model.AppointmentUserSign;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 预约-签单员信息表 Mapper 接口
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface AppointmentUserSignMapper extends BaseMapper<AppointmentUserSign> {
}
package com.yd.csf.service.dao;
import com.yd.csf.service.model.Taxation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 税务信息表 Mapper 接口
* </p>
*
* @author zxm
* @since 2025-12-17
*/
public interface TaxationMapper extends BaseMapper<Taxation> {
}
...@@ -6,10 +6,16 @@ package com.yd.csf.service.enums; ...@@ -6,10 +6,16 @@ package com.yd.csf.service.enums;
public enum AppointmentStatusEnum { public enum AppointmentStatusEnum {
//预约状态枚举 //预约状态枚举
ZC("暂存",0), // ZC("暂存",0),
DYY("待预约",1), // DYY("待预约",1),
DQS("待签署",2), // DQS("待签署",2),
YQS("已签署",3), // YQS("已签署",3),
// YQX("已取消",4),
DWS("待完善",0),
YYZ("预约中",1),
YY_CG("预约成功",2),
YQD("已签单",3),
YQX("已取消",4), YQX("已取消",4),
; ;
......
...@@ -125,6 +125,12 @@ public class Appointment implements Serializable { ...@@ -125,6 +125,12 @@ public class Appointment implements Serializable {
private LocalDateTime confirmAppointmentTime; private LocalDateTime confirmAppointmentTime;
/** /**
* 签单日
*/
@TableField("sign_date")
private LocalDateTime signDate;
/**
* 顾问是否陪同: 0-否, 1-是(字典) * 顾问是否陪同: 0-否, 1-是(字典)
*/ */
@TableField("is_accompany") @TableField("is_accompany")
...@@ -287,6 +293,12 @@ public class Appointment implements Serializable { ...@@ -287,6 +293,12 @@ public class Appointment implements Serializable {
private Integer isUseCar; private Integer isUseCar;
/** /**
* 是否法定受益人
*/
@TableField("is_legal_beneficiary")
private String isLegalBeneficiary;
/**
* 通用备注 * 通用备注
*/ */
@TableField("remark") @TableField("remark")
......
package com.yd.csf.service.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 预约信息日志表(快照表)
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Getter
@Setter
@TableName("appointment_log")
public class AppointmentLog implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 预约信息日志表唯一业务ID
*/
@TableField("appointment_log_biz_id")
private String appointmentLogBizId;
/**
* 预约信息主表唯一业务ID
*/
@TableField("appointment_biz_id")
private String appointmentBizId;
/**
* 预约编号
*/
@TableField("appointment_no")
private String appointmentNo;
/**
* 关联客户信息表唯一业务ID(冗余字段)
*/
@TableField("customer_biz_id")
private String customerBizId;
/**
* 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段)
*/
@TableField("customer_no")
private String customerNo;
/**
* 关联FNA信息表唯一业务ID(冗余字段)
*/
@TableField("fna_biz_id")
private String fnaBizId;
/**
* 关联FNA编号(和FNA信息表唯一业务ID是一对,唯一,冗余字段)
*/
@TableField("fna_no")
private String fnaNo;
/**
* 关联计划书信息表唯一业务ID(冗余字段)
*/
@TableField("proposal_biz_id")
private String proposalBizId;
/**
* 关联计划书编号(和计划书信息表唯一业务ID是一对,唯一,冗余字段)
*/
@TableField("proposal_no")
private String proposalNo;
/**
* 是否有其他预约同时进行: 0-否, 1-是(字典)
*/
@TableField("is_together")
private Integer isTogether;
/**
* 进行同时预约的分组编号
*/
@TableField("together_group_no")
private String togetherGroupNo;
/**
* 进行同时预约的预约编号
*/
@TableField("together_appointment_no")
private String togetherAppointmentNo;
/**
* 预约状态: 0-暂存 1-待预约, 2-待签署 3-已签署 4-已取消(字典)
*/
@TableField("status")
private Integer status;
/**
* 申请类型(字典)
*/
@TableField("apply_type")
private String applyType;
/**
* 业务编号
*/
@TableField("business_no")
private String businessNo;
/**
* 意向预约时间
*/
@TableField("intention_appointment_time")
private LocalDateTime intentionAppointmentTime;
/**
* 确定预约时间
*/
@TableField("confirm_appointment_time")
private LocalDateTime confirmAppointmentTime;
/**
* 顾问是否陪同: 0-否, 1-是(字典)
*/
@TableField("is_accompany")
private Integer isAccompany;
/**
* 陪同顾问姓名(FNA Form有填写,可带入)
*/
@TableField("accompany_name")
private String accompanyName;
/**
* 陪同顾问手机区号
*/
@TableField("accompany_mobile_code")
private String accompanyMobileCode;
/**
* 陪同顾问手机
*/
@TableField("accompany_mobile")
private String accompanyMobile;
/**
* 陪同顾问邮箱
*/
@TableField("accompany_email")
private String accompanyEmail;
/**
* 业务代表1账号
*/
@TableField("business_represent_account1")
private String businessRepresentAccount1;
/**
* 业务代表1姓名
*/
@TableField("business_represent_name1")
private String businessRepresentName1;
/**
* 业务代表1电话号码区号
*/
@TableField("business_represent_mobile1_code")
private String businessRepresentMobile1Code;
/**
* 业务代表1电话号码
*/
@TableField("business_represent_mobile1")
private String businessRepresentMobile1;
/**
* 业务代表1邮箱
*/
@TableField("business_represent_email1")
private String businessRepresentEmail1;
/**
* 到港时间
*/
@TableField("arrival_time")
private LocalDateTime arrivalTime;
/**
* 离港时间
*/
@TableField("departure_time")
private LocalDateTime departureTime;
/**
* 会面地点(字典)
*/
@TableField("meeting_point")
private String meetingPoint;
/**
* 签单地址
*/
@TableField("signing_address")
private String signingAddress;
/**
* 客户在港期间联络电话区号
*/
@TableField("hk_mobile_code")
private String hkMobileCode;
/**
* 客户在港期间联络电话
*/
@TableField("hk_mobile")
private String hkMobile;
/**
* 是否开户: 0-否, 1-是(字典)
*/
@TableField("is_open_account")
private Integer isOpenAccount;
/**
* 开户行名称
*/
@TableField("bank_name")
private String bankName;
/**
* 开户行支行(分行)
*/
@TableField("bank_branch_name")
private String bankBranchName;
/**
* 开户时间段(开始)
*/
@TableField("open_account_start_time")
private LocalDateTime openAccountStartTime;
/**
* 开户时间段(结束)
*/
@TableField("open_account_end_time")
private LocalDateTime openAccountEndTime;
/**
* 开户地点
*/
@TableField("open_account_location")
private String openAccountLocation;
/**
* 开户须知
*/
@TableField("open_account_notice")
private String openAccountNotice;
/**
* 是否体检: 0-否, 1-是(字典)
*/
@TableField("is_tj")
private Integer isTj;
/**
* 是否购买过香港保险: 0-否, 1-是(字典)
*/
@TableField("is_buy")
private Integer isBuy;
/**
* 转保声明选项(字典)
*/
@TableField("policy_transfer")
private String policyTransfer;
/**
* 是否有用车服务:0-否, 1-是(字典)
*/
@TableField("is_use_car")
private Integer isUseCar;
/**
* 通用备注
*/
@TableField("remark")
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
@TableField("is_deleted")
private Integer isDeleted;
/**
* 创建人ID
*/
@TableField("creator_id")
private String creatorId;
/**
* 创建人用户名
*/
@TableField("creator_name")
private String creatorName;
/**
* 更新人ID
*/
@TableField("updater_id")
private String updaterId;
/**
* 创建时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}
package com.yd.csf.service.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 预约-转介人信息表
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Getter
@Setter
@TableName("appointment_referrer")
public class AppointmentReferrer implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 预约-转介人信息表唯一业务ID
*/
@TableField("appointment_referrer_biz_id")
private String appointmentReferrerBizId;
/**
* 预约信息主表唯一业务ID(关联)
*/
@TableField("appointment_biz_id")
private String appointmentBizId;
/**
* 系统用户-销售用户扩展表唯一业务ID(转介人,冗余)
*/
@TableField("user_sale_biz_id")
private String userSaleBizId;
/**
* 系统用户唯一业务ID(冗余)
*/
@TableField("user_biz_id")
private String userBizId;
/**
* 姓名
*/
@TableField("real_name")
private String realName;
/**
* 手机号
*/
@TableField("phone")
private String phone;
/**
* 邮箱
*/
@TableField("email")
private String email;
/**
* 通用备注
*/
@TableField("remark")
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
@TableField("is_deleted")
private Integer isDeleted;
/**
* 创建人ID
*/
@TableField("creator_id")
private String creatorId;
/**
* 更新人ID
*/
@TableField("updater_id")
private String updaterId;
/**
* 创建时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}
package com.yd.csf.service.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 预约-转介人信息日志表(快照表)
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Getter
@Setter
@TableName("appointment_referrer_log")
public class AppointmentReferrerLog implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 预约-转介人信息日志表唯一业务ID
*/
@TableField("appointment_referrer_log_biz_id")
private String appointmentReferrerLogBizId;
/**
* 预约信息日志表唯一业务ID
*/
@TableField("appointment_log_biz_id")
private String appointmentLogBizId;
/**
* 系统用户-销售用户扩展表唯一业务ID(转介人,冗余)
*/
@TableField("user_sale_biz_id")
private String userSaleBizId;
/**
* 系统用户唯一业务ID(冗余)
*/
@TableField("user_biz_id")
private String userBizId;
/**
* 姓名
*/
@TableField("real_name")
private String realName;
/**
* 手机号
*/
@TableField("phone")
private String phone;
/**
* 邮箱
*/
@TableField("email")
private String email;
/**
* 通用备注
*/
@TableField("remark")
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
@TableField("is_deleted")
private Integer isDeleted;
/**
* 创建人ID
*/
@TableField("creator_id")
private String creatorId;
/**
* 更新人ID
*/
@TableField("updater_id")
private String updaterId;
/**
* 创建时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}
package com.yd.csf.service.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 预约-签单员信息表
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Getter
@Setter
@TableName("appointment_user_sign")
public class AppointmentUserSign implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 预约-签单员信息表唯一业务ID
*/
@TableField("appointment_user_sign_biz_id")
private String appointmentUserSignBizId;
/**
* 预约信息主表唯一业务ID(关联)
*/
@TableField("appointment_biz_id")
private String appointmentBizId;
/**
* 签单用户扩展唯一业务ID(冗余)
*/
@TableField("user_sign_biz_id")
private String userSignBizId;
/**
* 系统用户唯一业务ID(冗余)
*/
@TableField("user_biz_id")
private String userBizId;
/**
* 姓名
*/
@TableField("real_name")
private String realName;
/**
* 执业编码
*/
@TableField("practice_code")
private String practiceCode;
/**
* 手机号
*/
@TableField("phone")
private String phone;
/**
* 证件类型
*/
@TableField("card_type")
private String cardType;
/**
* 证件号码
*/
@TableField("card_no")
private String cardNo;
/**
* 邮箱
*/
@TableField("email")
private String email;
/**
* 通用备注
*/
@TableField("remark")
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
@TableField("is_deleted")
private Integer isDeleted;
/**
* 创建人ID
*/
@TableField("creator_id")
private String creatorId;
/**
* 更新人ID
*/
@TableField("updater_id")
private String updaterId;
/**
* 创建时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}
package com.yd.csf.service.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 预约-签单员信息日志表(快照表)
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Getter
@Setter
@TableName("appointment_user_sign_log")
public class AppointmentUserSignLog implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 预约-签单员信息日志表唯一业务ID
*/
@TableField("appointment_user_sign_log_biz_id")
private String appointmentUserSignLogBizId;
/**
* 预约信息日志表唯一业务ID
*/
@TableField("appointment_log_biz_id")
private String appointmentLogBizId;
/**
* 签单用户扩展唯一业务ID(冗余)
*/
@TableField("user_sign_biz_id")
private String userSignBizId;
/**
* 系统用户唯一业务ID(冗余)
*/
@TableField("user_biz_id")
private String userBizId;
/**
* 姓名
*/
@TableField("real_name")
private String realName;
/**
* 执业编码
*/
@TableField("practice_code")
private String practiceCode;
/**
* 手机号
*/
@TableField("phone")
private String phone;
/**
* 证件类型
*/
@TableField("card_type")
private String cardType;
/**
* 证件号码
*/
@TableField("card_no")
private String cardNo;
/**
* 邮箱
*/
@TableField("email")
private String email;
/**
* 通用备注
*/
@TableField("remark")
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
@TableField("is_deleted")
private Integer isDeleted;
/**
* 创建人ID
*/
@TableField("creator_id")
private String creatorId;
/**
* 更新人ID
*/
@TableField("updater_id")
private String updaterId;
/**
* 创建时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}
...@@ -17,7 +17,7 @@ import java.time.LocalDateTime; ...@@ -17,7 +17,7 @@ import java.time.LocalDateTime;
* </p> * </p>
* *
* @author zxm * @author zxm
* @since 2025-09-02 * @since 2025-12-18
*/ */
@Getter @Getter
@Setter @Setter
...@@ -42,43 +42,25 @@ public class Beneficiary implements Serializable { ...@@ -42,43 +42,25 @@ public class Beneficiary implements Serializable {
private String beneficiaryBizId; private String beneficiaryBizId;
/** /**
* 客户类型(字典)(个人或者公司)
*/
@TableField("customer_type")
private String customerType;
/**
* 与受保人关系(字典) * 与受保人关系(字典)
*/ */
@TableField("insurant_rel") @TableField("insurant_rel")
private String insurantRel; private String insurantRel;
/** /**
* 受益比例 * 姓名-中文
*/
@TableField("benefit_ratio")
private BigDecimal benefitRatio;
/**
* 名字
*/
@TableField("name")
private String name;
/**
* 名字-英文
*/ */
@TableField("name_en") @TableField("name_cn")
private String nameEn; private String nameCn;
/** /**
* 性别(字典 * 姓名-(拼音/英文,通过中文自动加载全部大写的拼音
*/ */
@TableField("gender") @TableField("name_py_en")
private String gender; private String namePyEn;
/** /**
* 证件类型(字典) * 证件类型(字典,下拉选择
*/ */
@TableField("document_type") @TableField("document_type")
private String documentType; private String documentType;
...@@ -90,112 +72,28 @@ public class Beneficiary implements Serializable { ...@@ -90,112 +72,28 @@ public class Beneficiary implements Serializable {
private String idNumber; private String idNumber;
/** /**
* 护照号码 * 性别(字典,如果是身份证,自动获取性别和生日)
*/ */
@TableField("passport_number") @TableField("gender")
private String passportNumber; private String gender;
/**
* 出生日期
*/
@TableField("birth_time")
private LocalDateTime birthTime;
/**
* 公司名称
*/
@TableField("company_name")
private String companyName;
/**
* 公司名称(英文)
*/
@TableField("company_name_en")
private String companyNameEn;
/**
* 公司商业登记号码
*/
@TableField("company_business_no")
private String companyBusinessNo;
/**
* 公司注册日期
*/
@TableField("company_register_time")
private LocalDateTime companyRegisterTime;
/**
* 公司注册地区(字典)
*/
@TableField("company_register_region")
private String companyRegisterRegion;
/**
* 公司电话区号
*/
@TableField("company_mobile_code")
private String companyMobileCode;
/**
* 公司电话
*/
@TableField("company_mobile")
private String companyMobile;
/**
* 公司邮箱
*/
@TableField("company_email")
private String companyEmail;
/**
* 公司登记地址
*/
@TableField("company_enter_address")
private String companyEnterAddress;
/**
* 通讯地址
*/
@TableField("mailing_address")
private String mailingAddress;
/**
* 授权代表姓名中文-名字
*/
@TableField("auth_name_cn")
private String authNameCn;
/**
* 授权代表姓名英文-名字
*/
@TableField("auth_name_en")
private String authNameEn;
/**
* 授权代表职称
*/
@TableField("auth_professional")
private String authProfessional;
/** /**
* 授权代表电话区号 * 出生日期(生日,如果是身份证,自动获取性别和生日)
*/ */
@TableField("auth_mobile_code") @TableField("birthday")
private String authMobileCode; private LocalDateTime birthday;
/** /**
* 授权代表电话 * 国籍(下拉选择)
*/ */
@TableField("auth_mobile") @TableField("nationality")
private String authMobile; private String nationality;
/** /**
* 地址列表(json串) * 受益比例
*/ */
@TableField("address_list") @TableField("benefit_ratio")
private String addressList; private BigDecimal benefitRatio;
/** /**
* 通用备注 * 通用备注
......
...@@ -4,15 +4,12 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -4,15 +4,12 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yd.csf.feign.dto.AddressDto;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
/** /**
* <p> * <p>
...@@ -20,7 +17,7 @@ import java.util.List; ...@@ -20,7 +17,7 @@ import java.util.List;
* </p> * </p>
* *
* @author zxm * @author zxm
* @since 2025-09-02 * @since 2025-12-18
*/ */
@Getter @Getter
@Setter @Setter
...@@ -33,22 +30,16 @@ public class Insurant implements Serializable { ...@@ -33,22 +30,16 @@ public class Insurant implements Serializable {
private Long id; private Long id;
/** /**
* 预约信息主表唯一业务ID
*/
@TableField("appointment_biz_id")
private String appointmentBizId;
/**
* 受保人信息表唯一业务ID * 受保人信息表唯一业务ID
*/ */
@TableField("insurant_biz_id") @TableField("insurant_biz_id")
private String insurantBizId; private String insurantBizId;
/** /**
* 客户类型(字典) * 预约信息主表唯一业务ID
*/ */
@TableField("customer_type") @TableField("appointment_biz_id")
private String customerType; private String appointmentBizId;
/** /**
* 关联客户信息表唯一业务ID(冗余字段) * 关联客户信息表唯一业务ID(冗余字段)
...@@ -69,25 +60,19 @@ public class Insurant implements Serializable { ...@@ -69,25 +60,19 @@ public class Insurant implements Serializable {
private String policyholderRel; private String policyholderRel;
/** /**
* 名字 * 姓名-中文
*/ */
@TableField("name") @TableField("name_cn")
private String name; private String nameCn;
/** /**
* 名字-英文 * 姓名-(拼音/英文,通过中文自动加载全部大写的拼音)
*/ */
@TableField("name_en") @TableField("name_py_en")
private String nameEn; private String namePyEn;
/** /**
* 性别(字典) * 证件类型(字典,下拉选择)
*/
@TableField("gender")
private String gender;
/**
* 证件类型(字典)
*/ */
@TableField("document_type") @TableField("document_type")
private String documentType; private String documentType;
...@@ -99,172 +84,190 @@ public class Insurant implements Serializable { ...@@ -99,172 +84,190 @@ public class Insurant implements Serializable {
private String idNumber; private String idNumber;
/** /**
* 出生日期 * 性别(字典,如果是身份证,自动获取性别和生日)
*/
@TableField("gender")
private String gender;
/**
* 出生日期(生日,如果是身份证,自动获取性别和生日)
*/ */
@TableField("birthday") @TableField("birthday")
private LocalDateTime birthday; private LocalDateTime birthday;
/** /**
* 年龄 * 年龄(通过生日自动获取年龄)
*/ */
@TableField("age") @TableField("age")
private String age; private String age;
/** /**
* 居住地址 * 国籍(下拉选择)
*/ */
@TableField("residential_address") @TableField("nationality")
private String residentialAddress; private String nationality;
/** /**
* 通讯地址 * 出生地
*/ */
@TableField("mailing_address") @TableField("birthplace")
private String mailingAddress; private String birthplace;
/** /**
* 移动电话区号 * 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典)
*/ */
@TableField("mobile_code") @TableField("is_other_country")
private String mobileCode; private String isOtherCountry;
/** /**
* 移动电话 * 吸烟情况(字典)
*/ */
@TableField("mobile") @TableField("smoking_status")
private String mobile; private String smokingStatus;
/** /**
* 邮箱 * 婚姻情况(字典)
*/ */
@TableField("email") @TableField("marital_status")
private String email; private String maritalStatus;
/** /**
* 公司名称 * 教育程度(字典)
*/ */
@TableField("company_name") @TableField("education_level")
private String companyName; private String educationLevel;
/** /**
* 公司地址 * 是否退休(字典)
*/ */
@TableField("company_address") @TableField("is_retirement")
private String companyAddress; private String isRetirement;
/** /**
* 行业 * 退休年龄(如已退休,再显示)
*/ */
@TableField("industry") @TableField("retirement_age")
private String industry; private String retirementAge;
/** /**
* 职位 * 身高(CM)
*/ */
@TableField("position") @TableField("height")
private String position; private String height;
/** /**
* 风险偏好(字典) * 体重(KG)
*/
@TableField("weight")
private String weight;
/**
* BMI指数(根据身高和体重自动计算)
*/
@TableField("bmi")
private String bmi;
/**
* 风险偏好(字典,下拉选择)
*/ */
@TableField("risk_appetite") @TableField("risk_appetite")
private String riskAppetite; private String riskAppetite;
/** /**
* 是否VIP: 0-否, 1-是(字典 * 受供养人数目(通过FNA带入
*/ */
@TableField("is_vip") @TableField("dependents_num")
private Integer isVip; private Integer dependentsNum;
/** /**
* vip备注 * 移动电话区号
*/ */
@TableField("vip_remark") @TableField("mobile_code")
private String vipRemark; private String mobileCode;
/** /**
* 称谓(字典) * 移动电话
*/ */
@TableField("appellation") @TableField("mobile")
private String appellation; private String mobile;
/** /**
* 是否区分吸烟(字典) * 住宅电话区号
*/ */
@TableField("smoking_allowed") @TableField("residence_mobile_code")
private String smokingAllowed; private String residenceMobileCode;
/** /**
* 出生地(省市) * 住宅电话
*/ */
@TableField("birthplace") @TableField("residence_mobile")
private String birthplace; private String residenceMobile;
/** /**
* 国籍 * 固定电话区号
*/ */
@TableField("nationality") @TableField("landline_code")
private String nationality; private String landlineCode;
/** /**
* 护照号码 * 固定电话
*/ */
@TableField("passport_no") @TableField("landline")
private String passportNo; private String landline;
/** /**
* 通行证号码 * 邮箱
*/ */
@TableField("pass_no") @TableField("email")
private String passNo; private String email;
/** /**
* 身高 * 证件地址
*/ */
@TableField("height") @TableField("certificate_address")
private String height; private String certificateAddress;
/** /**
* 体重 * 通讯地址
*/ */
@TableField("weight") @TableField("mailing_address")
private String weight; private String mailingAddress;
/** /**
* BMI * 居住地址(住宅地址)
*/ */
@TableField("bmi") @TableField("residential_address")
private String bmi; private String residentialAddress;
/** /**
* 受雇于现职年期 * 通讯地址邮政编号
*/ */
@TableField("current_tenure") @TableField("mailing_address_code")
private BigDecimal currentTenure; private String mailingAddressCode;
/** /**
* 总负债额 * 就业情况(字典,下拉选择)
*/ */
@TableField("total_debt") @TableField("employment_status")
private BigDecimal totalDebt; private String employmentStatus;
/** /**
* 受供养人数目 * 公司/学校名称
*/ */
@TableField("dependents_num") @TableField("cs_name")
private Integer dependentsNum; private String csName;
/** /**
* 婚姻状况(字典) * 行业
*/ */
@TableField("marital_status") @TableField("industry")
private String maritalStatus; private String industry;
/** /**
* 教育程度(字典) * 现时每月收入(HKD)
*/ */
@TableField("education_level") @TableField("current_monthly_income")
private String educationLevel; private BigDecimal currentMonthlyIncome;
/** /**
* 总工作年期 * 总工作年期
...@@ -273,10 +276,22 @@ public class Insurant implements Serializable { ...@@ -273,10 +276,22 @@ public class Insurant implements Serializable {
private BigDecimal totalWorkingYears; private BigDecimal totalWorkingYears;
/** /**
* 现时每月收入 * 受雇于现职年期
*/
@TableField("current_tenure")
private BigDecimal currentTenure;
/**
* 职位
*/ */
@TableField("current_monthly_income") @TableField("position")
private BigDecimal currentMonthlyIncome; private String position;
/**
* 公司地址
*/
@TableField("company_address")
private String companyAddress;
/** /**
* 公司电话区号 * 公司电话区号
...@@ -291,40 +306,34 @@ public class Insurant implements Serializable { ...@@ -291,40 +306,34 @@ public class Insurant implements Serializable {
private String companyMobile; private String companyMobile;
/** /**
* 固定电话区号 * 公司地址邮政编号
*/
@TableField("landline_code")
private String landlineCode;
/**
* 固定电话
*/ */
@TableField("landline") @TableField("company_address_code")
private String landline; private String companyAddressCode;
/** /**
* 其他电话 * 平均每月收入(HKD)
*/ */
@TableField("other_mobile") @TableField("month_income")
private String otherMobile; private BigDecimal monthIncome;
/** /**
* 过往一年是否所属国家以外地区居住超过182日: 0-否, 1-是(字典 * 平均每月支出(HKD
*/ */
@TableField("is_exceed") @TableField("month_expenditure")
private Integer isExceed; private BigDecimal monthExpenditure;
/** /**
* 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典 * 总流动资产(HKD
*/ */
@TableField("is_other_country") @TableField("total_current_assets")
private Integer isOtherCountry; private BigDecimal totalCurrentAssets;
/** /**
* 是否接受推广信息: 0-否, 1-是(字典 * 总负债额(HKD
*/ */
@TableField("is_promotion") @TableField("total_debt")
private Integer isPromotion; private BigDecimal totalDebt;
/** /**
* 旅行(字典) * 旅行(字典)
...@@ -333,25 +342,25 @@ public class Insurant implements Serializable { ...@@ -333,25 +342,25 @@ public class Insurant implements Serializable {
private String travel; private String travel;
/** /**
* 运动(字典) * 运动(字典,下拉选择
*/ */
@TableField("exercise") @TableField("exercise")
private String exercise; private String exercise;
/** /**
* 游戏(字典) * 游戏(字典,下拉选择
*/ */
@TableField("game") @TableField("game")
private String game; private String game;
/** /**
* 电影/戏剧(字典) * 电影/戏剧(字典,下拉选择
*/ */
@TableField("movie_drama") @TableField("movie_drama")
private String movieDrama; private String movieDrama;
/** /**
* 美食(字典 * 美食(输入
*/ */
@TableField("delicacy") @TableField("delicacy")
private String delicacy; private String delicacy;
...@@ -397,83 +406,4 @@ public class Insurant implements Serializable { ...@@ -397,83 +406,4 @@ public class Insurant implements Serializable {
*/ */
@TableField("update_time") @TableField("update_time")
private LocalDateTime updateTime; private LocalDateTime updateTime;
/**
* 吸烟量(支/天)
*/
@TableField("smoking_volume")
private String smokingVolume;
/**
* 货币(字典)
*/
@TableField("currency")
private String currency;
/**
* 公司名称(英文)
*/
@TableField("company_name_en")
private String companyNameEn;
/**
* 公司商业登记号码
*/
@TableField("company_business_no")
private String companyBusinessNo;
/**
* 公司注册日期
*/
@TableField("company_register_time")
private LocalDateTime companyRegisterTime;
/**
* 公司注册地区(字典)
*/
@TableField("company_register_region")
private String companyRegisterRegion;
/**
* 公司邮箱
*/
@TableField("company_email")
private String companyEmail;
/**
* 公司登记地址
*/
@TableField("company_enter_address")
private String companyEnterAddress;
/**
* 授权代表姓名中文-名字
*/
@TableField("auth_name_cn")
private String authNameCn;
/**
* 授权代表姓名英文-名字
*/
@TableField("auth_name_en")
private String authNameEn;
/**
* 授权代表职称
*/
@TableField("auth_professional")
private String authProfessional;
/**
* 授权代表电话区号
*/
@TableField("auth_mobile_code")
private String authMobileCode;
/**
* 授权代表电话
*/
@TableField("auth_mobile")
private String authMobile;
} }
...@@ -4,13 +4,11 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -4,13 +4,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/** /**
* <p> * <p>
...@@ -18,7 +16,7 @@ import java.time.LocalDateTime; ...@@ -18,7 +16,7 @@ import java.time.LocalDateTime;
* </p> * </p>
* *
* @author zxm * @author zxm
* @since 2025-09-02 * @since 2025-12-18
*/ */
@Getter @Getter
@Setter @Setter
...@@ -27,7 +25,6 @@ public class Policyholder implements Serializable { ...@@ -27,7 +25,6 @@ public class Policyholder implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
...@@ -44,12 +41,6 @@ public class Policyholder implements Serializable { ...@@ -44,12 +41,6 @@ public class Policyholder implements Serializable {
private String policyholderBizId; private String policyholderBizId;
/** /**
* 客户类型(字典)
*/
@TableField("customer_type")
private String customerType;
/**
* 关联客户信息表唯一业务ID(冗余字段) * 关联客户信息表唯一业务ID(冗余字段)
*/ */
@TableField("customer_biz_id") @TableField("customer_biz_id")
...@@ -62,25 +53,19 @@ public class Policyholder implements Serializable { ...@@ -62,25 +53,19 @@ public class Policyholder implements Serializable {
private String customerNo; private String customerNo;
/** /**
* 名字 * 姓名-中文
*/
@TableField("name")
private String name;
/**
* 名字-英文
*/ */
@TableField("name_en") @TableField("name_cn")
private String nameEn; private String nameCn;
/** /**
* 性别(字典 * 姓名-(拼音/英文,通过中文自动加载全部大写的拼音
*/ */
@TableField("gender") @TableField("name_py_en")
private String gender; private String namePyEn;
/** /**
* 证件类型(字典) * 证件类型(字典,下拉选择
*/ */
@TableField("document_type") @TableField("document_type")
private String documentType; private String documentType;
...@@ -92,190 +77,190 @@ public class Policyholder implements Serializable { ...@@ -92,190 +77,190 @@ public class Policyholder implements Serializable {
private String idNumber; private String idNumber;
/** /**
* 出生日期 * 性别(字典,如果是身份证,自动获取性别和生日)
*/
@TableField("gender")
private String gender;
/**
* 出生日期(生日,如果是身份证,自动获取性别和生日)
*/ */
@TableField("birthday") @TableField("birthday")
private LocalDateTime birthday; private LocalDateTime birthday;
/** /**
* 年龄 * 年龄(通过生日自动获取年龄)
*/ */
@TableField("age") @TableField("age")
private String age; private String age;
/** /**
* 居住地址 * 国籍(下拉选择)
*/ */
@TableField("residential_address") @TableField("nationality")
private String residentialAddress; private String nationality;
/** /**
* 通讯地址 * 出生地
*/ */
@TableField("mailing_address") @TableField("birthplace")
private String mailingAddress; private String birthplace;
/** /**
* 移动电话区号 * 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典)
*/ */
@TableField("mobile_code") @TableField("is_other_country")
private String mobileCode; private String isOtherCountry;
/** /**
* 移动电话 * 吸烟情况(字典)
*/ */
@TableField("mobile") @TableField("smoking_status")
private String mobile; private String smokingStatus;
/** /**
* 邮箱 * 婚姻情况(字典)
*/ */
@TableField("email") @TableField("marital_status")
private String email; private String maritalStatus;
/** /**
* 公司名称 * 教育程度(字典)
*/ */
@TableField("company_name") @TableField("education_level")
private String companyName; private String educationLevel;
/** /**
* 公司地址 * 是否退休(字典)
*/ */
@TableField("company_address") @TableField("is_retirement")
private String companyAddress; private String isRetirement;
/** /**
* 行业 * 退休年龄(如已退休,再显示)
*/ */
@TableField("industry") @TableField("retirement_age")
private String industry; private String retirementAge;
/** /**
* 职位 * 身高(CM)
*/ */
@TableField("position") @TableField("height")
private String position; private String height;
/**
* 风险偏好(字典)
*/
@TableField("risk_appetite")
private String riskAppetite;
/** /**
* 是否VIP: 0-否, 1-是(字典) * 体重(KG)
*/ */
@TableField("is_vip") @TableField("weight")
private Integer isVip; private String weight;
/** /**
* vip备注 * BMI指数(根据身高和体重自动计算)
*/ */
@TableField("vip_remark") @TableField("bmi")
private String vipRemark; private String bmi;
/** /**
* 称谓(字典 * 风险偏好(字典,下拉选择
*/ */
@TableField("appellation") @TableField("risk_appetite")
private String appellation; private String riskAppetite;
/** /**
* 是否区分吸烟(字典 * 受供养人数目(通过FNA带入
*/ */
@TableField("smoking_allowed") @TableField("dependents_num")
private String smokingAllowed; private Integer dependentsNum;
/** /**
* 出生地(省市) * 移动电话区号
*/ */
@TableField("birthplace") @TableField("mobile_code")
private String birthplace; private String mobileCode;
/** /**
* 国籍 * 移动电话
*/ */
@TableField("nationality") @TableField("mobile")
private String nationality; private String mobile;
/** /**
* 护照号码 * 住宅电话区号
*/ */
@TableField("passport_no") @TableField("residence_mobile_code")
private String passportNo; private String residenceMobileCode;
/** /**
* 通行证号码 * 住宅电话
*/ */
@TableField("pass_no") @TableField("residence_mobile")
private String passNo; private String residenceMobile;
/** /**
* 身高 * 固定电话区号
*/ */
@TableField("height") @TableField("landline_code")
private String height; private String landlineCode;
/** /**
* 体重 * 固定电话
*/ */
@TableField("weight") @TableField("landline")
private String weight; private String landline;
/** /**
* BMI * 邮箱
*/ */
@TableField("bmi") @TableField("email")
private String bmi; private String email;
/** /**
* 平均每月支出 * 证件地址
*/ */
@TableField("month_expenditure") @TableField("certificate_address")
private BigDecimal monthExpenditure; private String certificateAddress;
/** /**
* 平均每月收入 * 通讯地址
*/ */
@TableField("month_income") @TableField("mailing_address")
private BigDecimal monthIncome; private String mailingAddress;
/** /**
* 受雇于现职年期 * 居住地址(住宅地址)
*/ */
@TableField("current_tenure") @TableField("residential_address")
private BigDecimal currentTenure; private String residentialAddress;
/** /**
* 总流动资产 * 通讯地址邮政编号
*/ */
@TableField("total_current_assets") @TableField("mailing_address_code")
private BigDecimal totalCurrentAssets; private String mailingAddressCode;
/** /**
* 总负债额 * 就业情况(字典,下拉选择)
*/ */
@TableField("total_debt") @TableField("employment_status")
private BigDecimal totalDebt; private String employmentStatus;
/** /**
* 受供养人数目 * 公司/学校名称
*/ */
@TableField("dependents_num") @TableField("cs_name")
private Integer dependentsNum; private String csName;
/** /**
* 婚姻状况(字典) * 行业
*/ */
@TableField("marital_status") @TableField("industry")
private String maritalStatus; private String industry;
/** /**
* 教育程度(字典) * 现时每月收入(HKD)
*/ */
@TableField("education_level") @TableField("current_monthly_income")
private String educationLevel; private BigDecimal currentMonthlyIncome;
/** /**
* 总工作年期 * 总工作年期
...@@ -284,64 +269,64 @@ public class Policyholder implements Serializable { ...@@ -284,64 +269,64 @@ public class Policyholder implements Serializable {
private BigDecimal totalWorkingYears; private BigDecimal totalWorkingYears;
/** /**
* 现时每月收入 * 受雇于现职年期
*/ */
@TableField("current_monthly_income") @TableField("current_tenure")
private BigDecimal currentMonthlyIncome; private BigDecimal currentTenure;
/** /**
* 公司电话区号 * 职位
*/ */
@TableField("company_mobile_code") @TableField("position")
private String companyMobileCode; private String position;
/** /**
* 公司电话 * 公司地址
*/ */
@TableField("company_mobile") @TableField("company_address")
private String companyMobile; private String companyAddress;
/** /**
* 固定电话区号 * 公司电话区号
*/ */
@TableField("landline_code") @TableField("company_mobile_code")
private String landlineCode; private String companyMobileCode;
/** /**
* 固定电话 * 公司电话
*/ */
@TableField("landline") @TableField("company_mobile")
private String landline; private String companyMobile;
/** /**
* 其他电话 * 公司地址邮政编号
*/ */
@TableField("other_mobile") @TableField("company_address_code")
private String otherMobile; private String companyAddressCode;
/** /**
* 过往一年是否所属国家以外地区居住超过182日: 0-否, 1-是(字典 * 平均每月收入(HKD
*/ */
@TableField("is_exceed") @TableField("month_income")
private Integer isExceed; private BigDecimal monthIncome;
/** /**
* 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典 * 平均每月支出(HKD
*/ */
@TableField("is_other_country") @TableField("month_expenditure")
private Integer isOtherCountry; private BigDecimal monthExpenditure;
/** /**
* 是否接受推广信息: 0-否, 1-是(字典 * 总流动资产(HKD
*/ */
@TableField("is_promotion") @TableField("total_current_assets")
private Integer isPromotion; private BigDecimal totalCurrentAssets;
/** /**
* 投保人邮政编码 * 总负债额(HKD)
*/ */
@TableField("postal_code") @TableField("total_debt")
private String postalCode; private BigDecimal totalDebt;
/** /**
* 旅行(字典) * 旅行(字典)
...@@ -350,31 +335,31 @@ public class Policyholder implements Serializable { ...@@ -350,31 +335,31 @@ public class Policyholder implements Serializable {
private String travel; private String travel;
/** /**
* 运动(字典) * 运动(字典,下拉选择
*/ */
@TableField("exercise") @TableField("exercise")
private String exercise; private String exercise;
/** /**
* 游戏(字典) * 游戏(字典,下拉选择
*/ */
@TableField("game") @TableField("game")
private String game; private String game;
/** /**
* 电影/戏剧(字典) * 电影/戏剧(字典,下拉选择
*/ */
@TableField("movie_drama") @TableField("movie_drama")
private String movieDrama; private String movieDrama;
/** /**
* 美食(字典 * 美食(输入
*/ */
@TableField("delicacy") @TableField("delicacy")
private String delicacy; private String delicacy;
/** /**
* 地址信息(json串) * 地址列表(json串)
*/ */
@TableField("address_list") @TableField("address_list")
private String addressList; private String addressList;
...@@ -414,84 +399,4 @@ public class Policyholder implements Serializable { ...@@ -414,84 +399,4 @@ public class Policyholder implements Serializable {
*/ */
@TableField("update_time") @TableField("update_time")
private LocalDateTime updateTime; private LocalDateTime updateTime;
/**
* 吸烟量(支/天)
*/
@TableField("smoking_volume")
private String smokingVolume;
/**
* 货币(字典)
*/
@TableField("currency")
private String currency;
/**
* 公司名称(英文)
*/
@TableField("company_name_en")
private String companyNameEn;
/**
* 公司商业登记号码
*/
@TableField("company_business_no")
private String companyBusinessNo;
/**
* 公司注册日期
*/
@TableField("company_register_time")
private LocalDateTime companyRegisterTime;
/**
* 公司注册地区(字典)
*/
@TableField("company_register_region")
private String companyRegisterRegion;
/**
* 公司邮箱
*/
@TableField("company_email")
private String companyEmail;
/**
* 公司登记地址
*/
@TableField("company_enter_address")
private String companyEnterAddress;
/**
* 授权代表姓名中文-名字
*/
@TableField("auth_name_cn")
private String authNameCn;
/**
* 授权代表姓名英文-名字
*/
@TableField("auth_name_en")
private String authNameEn;
/**
* 授权代表职称
*/
@TableField("auth_professional")
private String authProfessional;
/**
* 授权代表电话区号
*/
@TableField("auth_mobile_code")
private String authMobileCode;
/**
* 授权代表电话
*/
@TableField("auth_mobile")
private String authMobile;
} }
package com.yd.csf.service.model; package com.yd.csf.service.model;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/** /**
* <p> * <p>
...@@ -14,7 +17,7 @@ import lombok.Setter; ...@@ -14,7 +17,7 @@ import lombok.Setter;
* </p> * </p>
* *
* @author zxm * @author zxm
* @since 2025-09-01 * @since 2025-12-18
*/ */
@Getter @Getter
@Setter @Setter
...@@ -23,86 +26,95 @@ public class ProductPlan implements Serializable { ...@@ -23,86 +26,95 @@ public class ProductPlan implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 产品计划信息表主键ID
*/
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
/** /**
* 产品计划信息表唯一业务ID
*/
@TableField("plan_biz_id")
private String planBizId;
/**
* 预约信息主表唯一业务ID * 预约信息主表唯一业务ID
*/ */
@TableField("appointment_biz_id") @TableField("appointment_biz_id")
private String appointmentBizId; private String appointmentBizId;
/** /**
* 产品计划信息表唯一业务ID * 保险公司ID(产品上架信息绑定的保险公司参数)
*/ */
@TableField("plan_biz_id") @TableField("company_id")
private String planBizId; private String companyId;
/** /**
* 保险产品唯一业务ID(中台保险产品业务id,冗余) * 保险公司名称
*/ */
@TableField("product_biz_id") @TableField("company_name")
private String productBizId; private String companyName;
/** /**
* 保险产品名称(中台保险产品名称,冗余 * 保险险种ID(产品上架信息绑定的保险险种参数
*/ */
@TableField("product_name") @TableField("insurance_type_id")
private String productName; private String insuranceTypeId;
/** /**
* 保险公司名称(冗余字段) * 保险险种名称
*/ */
@TableField("company_name") @TableField("insurance_type_name")
private String companyName; private String insuranceTypeName;
/** /**
* 地区(冗余字段) * 产品上架信息表唯一业务ID
*/ */
@TableField("region") @TableField("product_launch_biz_id")
private String region; private String productLaunchBizId;
/** /**
* 货币(字典 * 产品上架信息表名称(标题
*/ */
@TableField("currency") @TableField("product_launch_name")
private String currency; private String productLaunchName;
/** /**
* 供款年期(字典) * 供款期数
*/ */
@TableField("payment_term") @TableField("issue_number")
private String paymentTerm; private String issueNumber;
/** /**
* 付款频率(字典) * 保障年期
*/ */
@TableField("payment_frequency") @TableField("guarantee_period")
private String paymentFrequency; private String guaranteePeriod;
/** /**
* 每期保费 * 保单币种
*/ */
@TableField("each_issue_premium") @TableField("policy_currency")
private BigDecimal eachIssuePremium; private String policyCurrency;
/** /**
* 保 * 保单额度(重疾)
*/ */
@TableField("sum_insured") @TableField("sum_insured")
private BigDecimal sumInsured; private BigDecimal sumInsured;
/** /**
* 是否预缴保费: 0-否, 1-是(字典) * 付款频率(字典)
*/ */
@TableField("is_prepay") @TableField("payment_frequency")
private Integer isPrepay; private String paymentFrequency;
/** /**
* 预付额 * 每期保费
*/ */
@TableField("deductibles") @TableField("each_issue_premium")
private BigDecimal deductibles; private BigDecimal eachIssuePremium;
/** /**
* 首期付款方式(字典) * 首期付款方式(字典)
...@@ -111,40 +123,46 @@ public class ProductPlan implements Serializable { ...@@ -111,40 +123,46 @@ public class ProductPlan implements Serializable {
private String initialPaymentMethod; private String initialPaymentMethod;
/** /**
* 续期付款方式(字典) * 保单征费
*/ */
@TableField("renewal_payment_method") @TableField("policy_levy")
private String renewalPaymentMethod; private BigDecimal policyLevy;
/** /**
* 红利分配方式(字典) * 是否预缴保费: 0-否, 1-是(字典)
*/ */
@TableField("dividend_distribution_method") @TableField("is_prepay")
private String dividendDistributionMethod; private String isPrepay;
/** /**
* 保单日期回溯: 0-否, 1-是(字典) * 是否追溯: 0-否, 1-是(字典)
*/ */
@TableField("is_backtrack") @TableField("is_traceable")
private Integer isBacktrack; private String isTraceable;
/** /**
* 保单生效日 * 保单日期回溯: 0-否, 1-是(字典)
*/ */
@TableField(value = "policy_effective_date",updateStrategy = FieldStrategy.IGNORED) @TableField("is_backtrack")
private LocalDateTime policyEffectiveDate; private String isBacktrack;
/** /**
* 是否参加递增保障权益: 0-否, 1-是(字典) * 是否参加递增保障权益: 0-否, 1-是(字典)
*/ */
@TableField("is_join") @TableField("is_join")
private Integer isJoin; private String isJoin;
/** /**
* 保单征费 * 红利分配方式(字典)
*/ */
@TableField("policy_levy") @TableField("dividend_distribution_method")
private BigDecimal policyLevy; private String dividendDistributionMethod;
/**
* 续期付款方式(字典)
*/
@TableField("renewal_payment_method")
private String renewalPaymentMethod;
/** /**
* 通用备注 * 通用备注
......
...@@ -4,18 +4,19 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -4,18 +4,19 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.io.Serializable;
import java.time.LocalDateTime;
/** /**
* <p> * <p>
* 第二持有人信息表 * 第二持有人信息表
* </p> * </p>
* *
* @author zxm * @author zxm
* @since 2025-09-01 * @since 2025-12-19
*/ */
@Getter @Getter
@Setter @Setter
...@@ -28,43 +29,37 @@ public class SecondHolder implements Serializable { ...@@ -28,43 +29,37 @@ public class SecondHolder implements Serializable {
private Long id; private Long id;
/** /**
* 预约信息主表唯一业务ID
*/
@TableField("appointment_biz_id")
private String appointmentBizId;
/**
* 第二持有人信息表唯一业务ID * 第二持有人信息表唯一业务ID
*/ */
@TableField("second_holder_biz_id") @TableField("second_holder_biz_id")
private String secondHolderBizId; private String secondHolderBizId;
/** /**
* 与受保人关系(字典) * 预约信息主表唯一业务ID
*/ */
@TableField("insurant_rel") @TableField("appointment_biz_id")
private String insurantRel; private String appointmentBizId;
/** /**
* 名字 * 与受保人关系(字典)
*/ */
@TableField("name") @TableField("insurant_rel")
private String name; private String insurantRel;
/** /**
* 名字-英 * 姓名-中
*/ */
@TableField("name_en") @TableField("name_cn")
private String nameEn; private String nameCn;
/** /**
* 性别(字典 * 姓名-(拼音/英文,通过中文自动加载全部大写的拼音
*/ */
@TableField("gender") @TableField("name_py_en")
private String gender; private String namePyEn;
/** /**
* 证件类型(字典) * 证件类型(字典,下拉选择
*/ */
@TableField("document_type") @TableField("document_type")
private String documentType; private String documentType;
...@@ -76,22 +71,16 @@ public class SecondHolder implements Serializable { ...@@ -76,22 +71,16 @@ public class SecondHolder implements Serializable {
private String idNumber; private String idNumber;
/** /**
* 护照号码 * 性别(字典,如果是身份证,自动获取性别和生日)
*/
@TableField("passport_number")
private String passportNumber;
/**
* 出生日期
*/ */
@TableField("birth_time") @TableField("gender")
private LocalDateTime birthTime; private String gender;
/** /**
* 年龄 * 出生日期(生日,如果是身份证,自动获取性别和生日)
*/ */
@TableField("age") @TableField("birthday")
private String age; private LocalDateTime birthday;
/** /**
* 通用备注 * 通用备注
......
package com.yd.csf.service.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 税务信息表
* </p>
*
* @author zxm
* @since 2025-12-17
*/
@Getter
@Setter
@TableName("taxation")
public class Taxation implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 税务信息表唯一业务ID
*/
@TableField("taxation_biz_id")
private String taxationBizId;
/**
* 对象类型
*/
@TableField("object_type")
private String objectType;
/**
* 对象所属表名(投保人表、受保人表等)
*/
@TableField("object_table_name")
private String objectTableName;
/**
* 对象名
*/
@TableField("object_name")
private String objectName;
/**
* 对象业务ID
*/
@TableField("object_biz_id")
private String objectBizId;
/**
* 税务国家
*/
@TableField("tax_country")
private String taxCountry;
/**
* 税务编号
*/
@TableField("tax_id")
private String taxId;
/**
* 通用备注
*/
@TableField("remark")
private String remark;
/**
* 删除标识: 0-正常, 1-删除
*/
@TableField("is_deleted")
private Integer isDeleted;
/**
* 创建人ID
*/
@TableField("creator_id")
private String creatorId;
/**
* 更新人ID
*/
@TableField("updater_id")
private String updaterId;
/**
* 创建时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}
package com.yd.csf.service.service;
import com.yd.csf.service.model.AppointmentLog;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 预约信息日志表(快照表) 服务类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface IAppointmentLogService extends IService<AppointmentLog> {
AppointmentLog queryOne(String appointmentLogBizId);
}
package com.yd.csf.service.service;
import com.yd.csf.service.model.AppointmentReferrerLog;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 预约-转介人信息日志表(快照表) 服务类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface IAppointmentReferrerLogService extends IService<AppointmentReferrerLog> {
List<AppointmentReferrerLog> queryList(String appointmentLogBizId);
}
package com.yd.csf.service.service;
import com.yd.csf.service.model.AppointmentReferrer;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 预约-转介人信息表 服务类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface IAppointmentReferrerService extends IService<AppointmentReferrer> {
Boolean delByAppointmentBizId(String appointmentBizId);
}
...@@ -2,7 +2,9 @@ package com.yd.csf.service.service; ...@@ -2,7 +2,9 @@ package com.yd.csf.service.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yd.csf.feign.request.appointment.ApiAppointmentLogPageRequest;
import com.yd.csf.feign.request.appointment.ApiAppointmentPageRequest; import com.yd.csf.feign.request.appointment.ApiAppointmentPageRequest;
import com.yd.csf.feign.response.appointment.ApiAppointmentLogPageResponse;
import com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse; import com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse;
import com.yd.csf.feign.dto.appointmentfile.ItineraryDto; import com.yd.csf.feign.dto.appointmentfile.ItineraryDto;
import com.yd.csf.service.model.Appointment; import com.yd.csf.service.model.Appointment;
...@@ -26,4 +28,7 @@ public interface IAppointmentService extends IService<Appointment> { ...@@ -26,4 +28,7 @@ public interface IAppointmentService extends IService<Appointment> {
ItineraryDto getItineraryDto(String appointmentBizId); ItineraryDto getItineraryDto(String appointmentBizId);
void del(String appointmentBizId); void del(String appointmentBizId);
IPage<ApiAppointmentLogPageResponse> logPage(Page<ApiAppointmentLogPageResponse> page,
ApiAppointmentLogPageRequest request);
} }
package com.yd.csf.service.service;
import com.yd.csf.service.model.AppointmentUserSignLog;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 预约-签单员信息日志表(快照表) 服务类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface IAppointmentUserSignLogService extends IService<AppointmentUserSignLog> {
List<AppointmentUserSignLog> queryList(String appointmentLogBizId);
}
package com.yd.csf.service.service;
import com.yd.csf.service.model.AppointmentUserSign;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 预约-签单员信息表 服务类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
public interface IAppointmentUserSignService extends IService<AppointmentUserSign> {
Boolean delByAppointmentBizId(String appointmentBizId);
}
package com.yd.csf.service.service;
import com.yd.csf.service.model.Taxation;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 税务信息表 服务类
* </p>
*
* @author zxm
* @since 2025-12-17
*/
public interface ITaxationService extends IService<Taxation> {
}
package com.yd.csf.service.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yd.csf.service.model.AppointmentLog;
import com.yd.csf.service.dao.AppointmentLogMapper;
import com.yd.csf.service.service.IAppointmentLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 预约信息日志表(快照表) 服务实现类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Service
public class AppointmentLogServiceImpl extends ServiceImpl<AppointmentLogMapper, AppointmentLog> implements IAppointmentLogService {
@Override
public AppointmentLog queryOne(String appointmentLogBizId) {
return this.getOne(new LambdaQueryWrapper<AppointmentLog>().eq(AppointmentLog::getAppointmentLogBizId,appointmentLogBizId));
}
}
package com.yd.csf.service.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yd.csf.service.model.AppointmentReferrerLog;
import com.yd.csf.service.dao.AppointmentReferrerLogMapper;
import com.yd.csf.service.service.IAppointmentReferrerLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 预约-转介人信息日志表(快照表) 服务实现类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Service
public class AppointmentReferrerLogServiceImpl extends ServiceImpl<AppointmentReferrerLogMapper, AppointmentReferrerLog> implements IAppointmentReferrerLogService {
@Override
public List<AppointmentReferrerLog> queryList(String appointmentLogBizId) {
return this.baseMapper.selectList(new LambdaQueryWrapper<AppointmentReferrerLog>()
.eq(AppointmentReferrerLog::getAppointmentLogBizId,appointmentLogBizId));
}
}
package com.yd.csf.service.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yd.csf.service.model.AppointmentReferrer;
import com.yd.csf.service.dao.AppointmentReferrerMapper;
import com.yd.csf.service.service.IAppointmentReferrerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 预约-转介人信息表 服务实现类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Service
public class AppointmentReferrerServiceImpl extends ServiceImpl<AppointmentReferrerMapper, AppointmentReferrer> implements IAppointmentReferrerService {
@Override
public Boolean delByAppointmentBizId(String appointmentBizId) {
return this.remove(new LambdaQueryWrapper<AppointmentReferrer>().eq(AppointmentReferrer::getAppointmentBizId,appointmentBizId));
}
}
...@@ -3,7 +3,9 @@ package com.yd.csf.service.service.impl; ...@@ -3,7 +3,9 @@ package com.yd.csf.service.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yd.csf.feign.request.appointment.ApiAppointmentLogPageRequest;
import com.yd.csf.feign.request.appointment.ApiAppointmentPageRequest; import com.yd.csf.feign.request.appointment.ApiAppointmentPageRequest;
import com.yd.csf.feign.response.appointment.ApiAppointmentLogPageResponse;
import com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse; import com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse;
import com.yd.csf.feign.dto.appointmentfile.ItineraryDto; import com.yd.csf.feign.dto.appointmentfile.ItineraryDto;
import com.yd.csf.service.model.Appointment; import com.yd.csf.service.model.Appointment;
...@@ -63,4 +65,10 @@ public class AppointmentServiceImpl extends ServiceImpl<AppointmentMapper, Appoi ...@@ -63,4 +65,10 @@ public class AppointmentServiceImpl extends ServiceImpl<AppointmentMapper, Appoi
baseMapper.updateDelStatus(appointmentBizId); baseMapper.updateDelStatus(appointmentBizId);
} }
@Override
public IPage<ApiAppointmentLogPageResponse> logPage(Page<ApiAppointmentLogPageResponse> page,
ApiAppointmentLogPageRequest request) {
return baseMapper.logPage(page,request);
}
} }
package com.yd.csf.service.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yd.csf.service.model.AppointmentUserSignLog;
import com.yd.csf.service.dao.AppointmentUserSignLogMapper;
import com.yd.csf.service.service.IAppointmentUserSignLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 预约-签单员信息日志表(快照表) 服务实现类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Service
public class AppointmentUserSignLogServiceImpl extends ServiceImpl<AppointmentUserSignLogMapper, AppointmentUserSignLog> implements IAppointmentUserSignLogService {
@Override
public List<AppointmentUserSignLog> queryList(String appointmentLogBizId) {
return this.baseMapper.selectList(new LambdaQueryWrapper<AppointmentUserSignLog>()
.eq(AppointmentUserSignLog::getAppointmentLogBizId,appointmentLogBizId));
}
}
package com.yd.csf.service.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yd.csf.service.model.AppointmentUserSign;
import com.yd.csf.service.dao.AppointmentUserSignMapper;
import com.yd.csf.service.service.IAppointmentUserSignService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 预约-签单员信息表 服务实现类
* </p>
*
* @author zxm
* @since 2025-12-15
*/
@Service
public class AppointmentUserSignServiceImpl extends ServiceImpl<AppointmentUserSignMapper, AppointmentUserSign> implements IAppointmentUserSignService {
@Override
public Boolean delByAppointmentBizId(String appointmentBizId) {
return this.remove(new LambdaQueryWrapper<AppointmentUserSign>().eq(AppointmentUserSign::getAppointmentBizId,appointmentBizId));
}
}
...@@ -104,7 +104,7 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyMapper, Policy> ...@@ -104,7 +104,7 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyMapper, Policy>
if (apiProductPlanMainInfoDto != null) { if (apiProductPlanMainInfoDto != null) {
BeanUtils.copyProperties(apiProductPlanMainInfoDto, policy, "policyBizId", "id"); BeanUtils.copyProperties(apiProductPlanMainInfoDto, policy, "policyBizId", "id");
policy.setPaymentPremium(apiProductPlanMainInfoDto.getEachIssuePremium()); policy.setPaymentPremium(apiProductPlanMainInfoDto.getEachIssuePremium());
policy.setIsPrepaid(apiProductPlanMainInfoDto.getIsPrepay()); policy.setIsPrepaid(Integer.parseInt(apiProductPlanMainInfoDto.getIsPrepay()));
policy.setUpdateTime(now); policy.setUpdateTime(now);
// 更新保单 // 更新保单
this.updateById(policy); this.updateById(policy);
......
package com.yd.csf.service.service.impl;
import com.yd.csf.service.model.Taxation;
import com.yd.csf.service.dao.TaxationMapper;
import com.yd.csf.service.service.ITaxationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 税务信息表 服务实现类
* </p>
*
* @author zxm
* @since 2025-12-17
*/
@Service
public class TaxationServiceImpl extends ServiceImpl<TaxationMapper, Taxation> implements ITaxationService {
}
...@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; ...@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
public class MyBatisPlusCodeGenerator { public class MyBatisPlusCodeGenerator {
public static void main(String[] args) { public static void main(String[] args) {
FastAutoGenerator.create("jdbc:mysql://139.224.145.34:3308/yd_csf?serverTimezone=GMT%2B8", "root", "Zxm7320017") FastAutoGenerator.create("jdbc:mysql://139.224.145.34:3308/yd_csf_v1?serverTimezone=GMT%2B8", "root", "Zxm7320017")
.globalConfig(builder -> { .globalConfig(builder -> {
builder.author("zxm") builder.author("zxm")
// .outputDir("src/main/java/com/yd/csf/service"); .outputDir("src/main/java/com/yd/csf/service");
.outputDir("D:/soft/ideaproject/v2/yd-csf/yd-csf-service/src/main/java"); // .outputDir("D:/soft/ideaproject/v2/yd-csf/yd-csf-service/src/main/java");
}) })
.packageConfig(builder -> { .packageConfig(builder -> {
builder.parent("com.yd.csf.service") builder.parent("com.yd.csf.service")
...@@ -21,7 +21,7 @@ public class MyBatisPlusCodeGenerator { ...@@ -21,7 +21,7 @@ public class MyBatisPlusCodeGenerator {
}) })
.strategyConfig(builder -> { .strategyConfig(builder -> {
builder.addInclude( builder.addInclude(
"expected_fortune_log" "second_holder"
) )
.entityBuilder() .entityBuilder()
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.csf.service.dao.AppointmentLogMapper">
</mapper>
...@@ -81,6 +81,13 @@ ...@@ -81,6 +81,13 @@
limit 1 limit 1
</select> </select>
<select id="logPage" resultType="com.yd.csf.feign.response.appointment.ApiAppointmentLogPageResponse">
select al.* from appointment_log al
<where>
and al.is_deleted = 0
</where>
</select>
<!-- 更新预约状态 --> <!-- 更新预约状态 -->
<update id="updateDelStatus"> <update id="updateDelStatus">
update appointment set is_deleted = 1 where appointment_biz_id = #{appointmentBizId}; update appointment set is_deleted = 1 where appointment_biz_id = #{appointmentBizId};
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.csf.service.dao.AppointmentReferrerLogMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.csf.service.dao.AppointmentReferrerMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.csf.service.dao.AppointmentUserSignLogMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.csf.service.dao.AppointmentUserSignMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.csf.service.dao.TaxationMapper">
</mapper>
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