Commit eb397598 by zhangxingmin

push

parent 4685fe9f
......@@ -2,6 +2,7 @@ package com.yd.csf.api.service;
import com.yd.common.result.Result;
import com.yd.csf.feign.dto.appointment.ApiBeneficiaryInfoDto;
import com.yd.csf.feign.dto.appointment.ApiBeneficiaryInfoFzDto;
import com.yd.csf.feign.request.beneficiary.ApiBatchEditBeneficiaryRequest;
import java.util.List;
......
......@@ -45,7 +45,7 @@ public class ApiAppointmentCheckServiceImpl implements ApiAppointmentCheckServic
checkAddApiInsurantInfoDto(request.getApiInsurantInfoDto());
//新增预约入参字段校验 - 受益人列表信息字段校验
checkAddApiBeneficiaryInfoDtoList(request.getApiBeneficiaryInfoDtoList());
checkAddApiBeneficiaryInfoDtoList(request.getApiBeneficiaryInfoFzDto().getApiBeneficiaryInfoDtoList());
//新增预约入参字段校验 - 第二持有人信息字段校验
checkAddApiSecondHolderInfoDto(request.getApiSecondHolderInfoDto());
......
......@@ -175,8 +175,11 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
Result<ApiInsurantInfoDto> result3 = apiInsurantService.detail(appointmentBizId, "");
response.setApiInsurantInfoDto(result3.getData());
//受益人列表信息
ApiBeneficiaryInfoFzDto apiBeneficiaryInfoFzDto = new ApiBeneficiaryInfoFzDto();
apiBeneficiaryInfoFzDto.setIsLegalBeneficiary(appointment.getIsLegalBeneficiary());
Result<List<ApiBeneficiaryInfoDto>> result4 = apiBeneficiaryService.list(appointmentBizId);
response.setApiBeneficiaryInfoDtoList(result4.getData());
apiBeneficiaryInfoFzDto.setApiBeneficiaryInfoDtoList(result4.getData());
response.setApiBeneficiaryInfoFzDto(apiBeneficiaryInfoFzDto);
//第二持有人信息
Result<ApiSecondHolderInfoDto> result5 = apiSecondHolderService.detail(appointmentBizId, "");
response.setApiSecondHolderInfoDto(result5.getData());
......@@ -221,7 +224,11 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto());
}
//提交 ——>流转状态为预约中
Result<Appointment> appointmentResult = addAppointmentData(request.getApiAppointmentInfoDto(), AppointmentStatusEnum.YYZ.getItemValue());
Result<Appointment> appointmentResult = addAppointmentData(
request.getApiAppointmentInfoDto(),
AppointmentStatusEnum.YYZ.getItemValue(),
request.getApiBeneficiaryInfoFzDto().getIsLegalBeneficiary());
Appointment appointment = appointmentResult.getData();
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointment);
......@@ -244,7 +251,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//添加受保人信息表数据
apiInsurantService.addInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId());
//批量添加受益人信息表数据
apiBeneficiaryService.batchAddBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
apiBeneficiaryService.batchAddBeneficiaryData(request.getApiBeneficiaryInfoFzDto().getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
//添加第二持有人信息表数据
apiSecondHolderService.addSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId());
//新增健康问卷和预约对象关系绑定
......@@ -311,10 +318,15 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
if (Objects.isNull(request.getApiAppointmentInfoDto())) {
request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto());
}
if (Objects.isNull(request.getApiBeneficiaryInfoFzDto())) {
request.setApiBeneficiaryInfoFzDto(new ApiBeneficiaryInfoFzDto());
}
apiAppointmentCheckService.checkCustomerAndFna(request.getApiAppointmentInfoDto(), "预约信息-");
//新增预约暂存-添加预约信息主表数据为待完善状态
Result<Appointment> appointmentResult = addAppointmentData(request.getApiAppointmentInfoDto(), AppointmentStatusEnum.DWS.getItemValue());
Result<Appointment> appointmentResult = addAppointmentData(request.getApiAppointmentInfoDto(),
AppointmentStatusEnum.DWS.getItemValue(),
request.getApiBeneficiaryInfoFzDto().getIsLegalBeneficiary());
Appointment appointment = appointmentResult.getData();
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointment);
......@@ -337,7 +349,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//添加受保人信息表数据
apiInsurantService.addInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId());
//批量添加受益人信息表数据
apiBeneficiaryService.batchAddBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
apiBeneficiaryService.batchAddBeneficiaryData(request.getApiBeneficiaryInfoFzDto().getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
//添加第二持有人信息表数据
apiSecondHolderService.addSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId());
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
......@@ -355,7 +367,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
* @return
*/
@Transactional(rollbackFor = Exception.class)
public Result<Appointment> addAppointmentData(ApiAppointmentInfoDto dto, Integer status) {
public Result<Appointment> addAppointmentData(ApiAppointmentInfoDto dto,
Integer status,
String isLegalBeneficiary) {
if (Objects.isNull(dto)) {
//为空设置,方便新建暂存公用方法
dto = new ApiAppointmentInfoDto();
......@@ -371,6 +385,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//预约状态
appointment.setStatus(status);
appointment.setCreatorName(authUserDto.getUsername());
appointment.setIsLegalBeneficiary(isLegalBeneficiary);
iAppointmentService.saveOrUpdate(appointment);
return Result.success(appointment);
}
......@@ -410,7 +425,10 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
if (Objects.isNull(request.getApiAppointmentInfoDto())) {
request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto());
}
Result<Appointment> appointmentResult = editAppointmentData(request.getApiAppointmentInfoDto(), status);
Result<Appointment> appointmentResult = editAppointmentData(request.getApiAppointmentInfoDto(),
status,
request.getApiBeneficiaryInfoFzDto().getIsLegalBeneficiary());
Appointment appointment = appointmentResult.getData();
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointmentResult.getData());
......@@ -433,7 +451,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//编辑受保人信息表数据
apiInsurantService.editInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId());
//批量编辑受益人信息表数据
apiBeneficiaryService.batchEditBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
apiBeneficiaryService.batchEditBeneficiaryData(request.getApiBeneficiaryInfoFzDto().getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
//编辑第二持有人信息表数据
apiSecondHolderService.editSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId());
......@@ -473,7 +491,11 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
if (Objects.isNull(request.getApiAppointmentInfoDto())) {
request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto());
}
Result<Appointment> appointmentResult = editAppointmentData(request.getApiAppointmentInfoDto(), null);
if (Objects.isNull(request.getApiBeneficiaryInfoFzDto())) {
request.setApiBeneficiaryInfoFzDto(new ApiBeneficiaryInfoFzDto());
}
Result<Appointment> appointmentResult = editAppointmentData(request.getApiAppointmentInfoDto(), null,request.getApiBeneficiaryInfoFzDto().getIsLegalBeneficiary());
Appointment appointment = appointmentResult.getData();
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointmentResult.getData());
......@@ -496,7 +518,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//编辑受保人信息表数据
apiInsurantService.editInsurantData(request.getApiInsurantInfoDto(), appointment.getAppointmentBizId());
//批量编辑受益人信息表数据
apiBeneficiaryService.batchEditBeneficiaryData(request.getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
apiBeneficiaryService.batchEditBeneficiaryData(request.getApiBeneficiaryInfoFzDto().getApiBeneficiaryInfoDtoList(), appointment.getAppointmentBizId());
//编辑第二持有人信息表数据
apiSecondHolderService.editSecondHolderData(request.getApiSecondHolderInfoDto(), appointment.getAppointmentBizId());
......@@ -573,7 +595,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
// 受保人
apiInsurantInfoDto = response.getApiInsurantInfoDto();
// 受益人列表信息
apiBeneficiaryInfoDtoList = response.getApiBeneficiaryInfoDtoList();
apiBeneficiaryInfoDtoList = response.getApiBeneficiaryInfoFzDto().getApiBeneficiaryInfoDtoList();
// 第二持有人
apiSecondHolderInfoDto = response.getApiSecondHolderInfoDto();
}
......@@ -872,7 +894,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
apiAppointmentCheckService.checkEditApiAppointmentInfoDto(apiAppointmentInfoDto);
//编辑预约-编辑预约信息主表数据
Result<Appointment> appointmentResult = editAppointmentData(apiAppointmentInfoDto, null);
Result<Appointment> appointmentResult = editAppointmentData(apiAppointmentInfoDto, null,null);
//添加预约日志信息
Result<String> result = appointmentLogService.saveAppointmentLog(appointmentResult.getData());
//添加陪同转介人信息列表
......@@ -893,7 +915,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
* @return
*/
@Transactional(rollbackFor = Exception.class)
public Result<Appointment> editAppointmentData(ApiAppointmentInfoDto dto, Integer status) {
public Result<Appointment> editAppointmentData(ApiAppointmentInfoDto dto, Integer status,String isLegalBeneficiary) {
if (Objects.isNull(dto)) {
//预约信息对象不能为空
throw new BusinessException("预约信息对象不能为空");
......@@ -912,6 +934,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
appointment.setStatus(status);
}
appointment.setAppointmentNo(appointmentNo);
appointment.setIsLegalBeneficiary(isLegalBeneficiary);
iAppointmentService.saveOrUpdate(appointment);
return Result.success(appointment);
}
......
......@@ -8,6 +8,7 @@ import com.yd.common.utils.RandomStringGenerator;
import com.yd.csf.api.service.ApiAppointmentCheckService;
import com.yd.csf.api.service.ApiBeneficiaryService;
import com.yd.csf.feign.dto.appointment.ApiBeneficiaryInfoDto;
import com.yd.csf.feign.dto.appointment.ApiBeneficiaryInfoFzDto;
import com.yd.csf.feign.request.beneficiary.ApiBatchEditBeneficiaryRequest;
import com.yd.csf.feign.utils.CommonUtil;
import com.yd.csf.service.dto.BeneficiaryDto;
......
......@@ -101,7 +101,7 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
//保单受保人(被保人)
premiumReconciliation.setInsured(policy.getInsured());
//保险公司名称
premiumReconciliation.setInsurer(policy.getInsurer());
premiumReconciliation.setInsurer(policy.getInsuranceCompany());
//保单号
premiumReconciliation.setPolicyNo(policy.getPolicyNo());
//保费对账记录表唯一业务ID
......
......@@ -166,12 +166,6 @@ public class ApiAppointmentInfoDto {
private Integer isUseCar;
/**
* 是否法定受益人
*/
@NotBlank(message = "签约信息-是否法定受益人不能为空")
private String isLegalBeneficiary;
/**
* 转介人是否陪同
*/
private String isReferrerAccompany;
......
package com.yd.csf.feign.dto.appointment;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.List;
@Data
public class ApiBeneficiaryInfoFzDto {
/**
* 是否法定受益人
*/
@NotBlank(message = "受益人-是否法定受益人不能为空")
private String isLegalBeneficiary;
/**
* 受益人列表信息
*/
private List<ApiBeneficiaryInfoDto> apiBeneficiaryInfoDtoList;
}
......@@ -37,9 +37,10 @@ public class ApiAppointmentAddRequest {
private ApiInsurantInfoDto apiInsurantInfoDto;
/**
* 受益人列表信息
* 受益人封装对象
*/
private List<ApiBeneficiaryInfoDto> apiBeneficiaryInfoDtoList;
@Valid
private ApiBeneficiaryInfoFzDto apiBeneficiaryInfoFzDto;
/**
* 第二持有人信息
......
......@@ -2,6 +2,8 @@ package com.yd.csf.feign.request.appointment;
import com.yd.csf.feign.dto.appointment.*;
import lombok.Data;
import javax.validation.Valid;
import java.util.List;
/**
......@@ -31,9 +33,9 @@ public class ApiAppointmentAddStorageRequest {
private ApiInsurantInfoDto apiInsurantInfoDto;
/**
* 受益人列表信息
* 受益人封装对象
*/
private List<ApiBeneficiaryInfoDto> apiBeneficiaryInfoDtoList;
private ApiBeneficiaryInfoFzDto apiBeneficiaryInfoFzDto;
/**
* 第二持有人信息
......
......@@ -42,9 +42,10 @@ public class ApiAppointmentEditRequest {
private ApiInsurantInfoDto apiInsurantInfoDto;
/**
* 受益人列表信息
* 受益人封装信息
*/
private List<ApiBeneficiaryInfoDto> apiBeneficiaryInfoDtoList;
@Valid
private ApiBeneficiaryInfoFzDto apiBeneficiaryInfoFzDto;
/**
* 第二持有人信息
......
......@@ -30,9 +30,9 @@ public class ApiAppointmentEditStorageRequest {
private ApiInsurantInfoDto apiInsurantInfoDto;
/**
* 受益人列表信息
* 受益人封装信息
*/
private List<ApiBeneficiaryInfoDto> apiBeneficiaryInfoDtoList;
private ApiBeneficiaryInfoFzDto apiBeneficiaryInfoFzDto;
/**
* 第二持有人信息
......
......@@ -41,9 +41,9 @@ public class ApiAppointmentDetailResponse {
private ApiInsurantInfoDto apiInsurantInfoDto;
/**
* 受益人列表信息
* 受益人封装信息
*/
private List<ApiBeneficiaryInfoDto> apiBeneficiaryInfoDtoList;
private ApiBeneficiaryInfoFzDto apiBeneficiaryInfoFzDto;
/**
* 第二持有人信息
......
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