Commit 1f181df1 by zhangxingmin

Merge remote-tracking branch 'origin/test' into test

parents 005ceb1a be35be29
......@@ -18,6 +18,7 @@ import com.yd.csf.feign.request.appointment.*;
import com.yd.csf.feign.response.appointment.ApiAppointmentAddResponse;
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.enums.AppointmentStatusEnum;
import com.yd.csf.service.enums.PolicyFollowStatusEnum;
import com.yd.csf.service.enums.PolicyStatusEnum;
......@@ -518,6 +519,8 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
}
//产品名称
follow.setProductName(apiProductPlanMainInfoDto.getProductName());
//签单员列表
setSignerList(follow, appointment);
}
policyFollowService.saveOrUpdate(follow);
......@@ -540,6 +543,26 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
return Result.success();
}
private void setSignerList(PolicyFollow follow, Appointment appointment) {
List<PolicySigner> signerList = new ArrayList<>();
PolicySigner signer = new PolicySigner();
if (!Objects.isNull(appointment.getBusinessNo())) {
signer.setRegistrationNumber(appointment.getBusinessNo());
}
if (!Objects.isNull(appointment.getBusinessRepresentName1())) {
signer.setSigner(appointment.getBusinessRepresentName1());
}
if (!Objects.isNull(appointment.getBusinessRepresentMobile1())) {
signer.setPhone(appointment.getBusinessRepresentMobile1());
}
if (!Objects.isNull(appointment.getBusinessRepresentEmail1())) {
signer.setEmail(appointment.getBusinessRepresentEmail1());
}
signerList.add(signer);
follow.setSignerList(GSONUtil.toJson(signerList));
}
private void savePolicyQuestionnaire(String appointmentBizId, String policyBizId) {
// 当前登录用户
AuthUserDto currentLoginUser = SecurityUtil.getCurrentLoginUser();
......
......@@ -49,10 +49,10 @@ public class PolicyFollowAddRequest implements Serializable {
private String appointmentNo;
/**
* 签单
* 签单员列表
*/
@Schema(description = "签单")
private String signer;
@Schema(description = "签单员列表")
private List<PolicySigner> signerList;
/**
* 供款年期
......
......@@ -151,9 +151,8 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
PolicyFollowUpdateDto policyFollowUpdateDto = policyFollowUpdateRequest.getPolicyFollowUpdateDto();
if (policyFollowUpdateDto != null) {
BeanUtils.copyProperties(policyFollowUpdateDto, policyFollow, "id", "policyBizId");
if (CollectionUtils.isNotEmpty(policyFollowUpdateDto.getSignerList())) {
policyFollow.setSignerList(GSONUtil.toJson(policyFollowUpdateDto.getSignerList()));
}
// 签单员列表 => 字符串
policyFollow.setSignerList(GSONUtil.toJson(policyFollowUpdateDto.getSignerList()));
// 计算冷却期结束日期
if (policyFollowUpdateDto.getCoolingOffDays() != null && policyFollowUpdateDto.getEffectiveDate() != null) {
policyFollow.setCoolingOffEndDate(DateUtil.offset(policyFollowUpdateDto.getEffectiveDate(), DateField.DAY_OF_MONTH, policyFollowUpdateDto.getCoolingOffDays()));
......@@ -243,6 +242,9 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
// 生成新单编号
String policyBizId = RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_POLICY.getCode());
policyFollow.setPolicyBizId(policyBizId);
// 签单员列表 => 字符串
policyFollow.setSignerList(GSONUtil.toJson(policyFollowAddRequest.getSignerList()));
// 计算冷却期结束日期
if (policyFollowAddRequest.getCoolingOffDays() != null) {
policyFollow.setCoolingOffEndDate(DateUtil.offset(policyFollowAddRequest.getEffectiveDate(), DateField.DAY_OF_MONTH, policyFollowAddRequest.getCoolingOffDays()));
}
......
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