Commit c40cecd6 by zhangxingmin

push

parent 733dfa88
...@@ -401,23 +401,25 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -401,23 +401,25 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result edit(ApiAppointmentEditRequest request) { public Result edit(ApiAppointmentEditRequest request) {
Integer status = null; Integer oldStatus = null;
Integer newStatus = null;
Appointment appointmentCheck = null; Appointment appointmentCheck = null;
if (!Objects.isNull(request.getApiAppointmentInfoDto())) { if (!Objects.isNull(request.getApiAppointmentInfoDto())) {
//校验预约信息是否存在 //校验预约信息是否存在
Result<Appointment> result = checkAppointmentIsExist(request.getApiAppointmentInfoDto().getAppointmentBizId()); Result<Appointment> result = checkAppointmentIsExist(request.getApiAppointmentInfoDto().getAppointmentBizId());
appointmentCheck = result.getData(); appointmentCheck = result.getData();
oldStatus = appointmentCheck.getStatus();
if (AppointmentStatusEnum.DWS.getItemValue().equals(appointmentCheck.getStatus())) { if (AppointmentStatusEnum.DWS.getItemValue().equals(appointmentCheck.getStatus())) {
//当前为待完善状态——>状态更新为预约中 //当前为待完善状态——>状态更新为预约中
status = AppointmentStatusEnum.YYZ.getItemValue(); newStatus = AppointmentStatusEnum.YYZ.getItemValue();
}else if (AppointmentStatusEnum.YQX.getItemValue().equals(appointmentCheck.getStatus())) { }else if (AppointmentStatusEnum.YQX.getItemValue().equals(appointmentCheck.getStatus())) {
//当前为已取消状态——>状态更新为预约中 //当前为已取消状态——>状态更新为预约中
status = AppointmentStatusEnum.YYZ.getItemValue(); newStatus = AppointmentStatusEnum.YYZ.getItemValue();
}else if (AppointmentStatusEnum.YYZ.getItemValue().equals(appointmentCheck.getStatus())) { }else if (AppointmentStatusEnum.YYZ.getItemValue().equals(appointmentCheck.getStatus())) {
if (request.getSource() == 2) { if (request.getSource() == 2) {
//当前生成新单跟进提交: //当前生成新单跟进提交:
//当前状态为预约中 ——> 状态更新为预约成功 ——> 新增新单跟进记录 //当前状态为预约中 ——> 状态更新为预约成功 ——> 新增新单跟进记录
status = AppointmentStatusEnum.YY_CG.getItemValue(); newStatus = AppointmentStatusEnum.YY_CG.getItemValue();
} }
} }
} }
...@@ -427,7 +429,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -427,7 +429,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto()); request.setApiAppointmentInfoDto(new ApiAppointmentInfoDto());
} }
Result<Appointment> appointmentResult = editAppointmentData(request.getApiAppointmentInfoDto(), Result<Appointment> appointmentResult = editAppointmentData(request.getApiAppointmentInfoDto(),
status, newStatus,
request.getApiBeneficiaryInfoFzDto().getIsLegalBeneficiary()); request.getApiBeneficiaryInfoFzDto().getIsLegalBeneficiary());
Appointment appointment = appointmentResult.getData(); Appointment appointment = appointmentResult.getData();
...@@ -465,9 +467,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService { ...@@ -465,9 +467,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
apiQuestionnairesFeignClient.answerSave(answerSaveRequest); apiQuestionnairesFeignClient.answerSave(answerSaveRequest);
} }
if (!Objects.isNull(appointmentCheck) if (!Objects.isNull(oldStatus)
&& request.getSource() == 2 && AppointmentStatusEnum.YYZ.getItemValue().equals(oldStatus)
&& AppointmentStatusEnum.YYZ.getItemValue().equals(appointmentCheck.getStatus())) { && request.getSource() == 2) {
//生成新单跟进提交 //生成新单跟进提交
//当前状态为预约中 ——> 状态更新为预约成功 ——> 更新FNA预约业务id和预约编号、新增新单跟进记录 //当前状态为预约中 ——> 状态更新为预约成功 ——> 更新FNA预约业务id和预约编号、新增新单跟进记录
//更新FNA预约业务id和预约编号 //更新FNA预约业务id和预约编号
......
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