Commit 3c4180fe authored by 李灿灿's avatar 李灿灿

20221108 被替换人员在新系统里,需体现替换为的姓名、身份证号、所在项目、封面抬头信息。

parent b3d72b56
...@@ -317,26 +317,50 @@ public class InsuranceDetailVO implements Serializable { ...@@ -317,26 +317,50 @@ public class InsuranceDetailVO implements Serializable {
/** /**
* 被替换人姓名 * 被替换人姓名
*/ */
@Schema(description = "被替换人姓名(替换类型专用字段)") @Schema(description = "被替换人姓名")
private String coverEmpName; private String coverEmpName;
/** /**
* 被替换人身份证号 * 被替换人身份证号
*/ */
@Schema(description = "被替换人身份证号(替换类型专用字段)") @Schema(description = "被替换人身份证号)")
private String coverEmpIdcardNo; private String coverEmpIdcardNo;
/** /**
* 被替换人项目名称 * 被替换人项目名称
*/ */
@Schema(description = "被替换人项目名称(替换类型专用字段)") @Schema(description = "被替换人项目名称")
private String coverProjectName; private String coverProjectName;
/** /**
* 被替换人封面抬头 * 被替换人封面抬头
*/ */
@Schema(description = "被替换人封面抬头") @Schema(description = "被替换人封面抬头")
private String coveInvoiceTitle; private String coverInvoiceTitle;
/**
* 替换人姓名
*/
@Schema(description = "替换人姓名")
private String replaceEmpName;
/**
* 替换人身份证号
*/
@Schema(description = "替换人身份证号")
private String replaceEmpIdcardNo;
/**
* 替换人项目名称
*/
@Schema(description = "被替换人项目名称")
private String replaceProjectName;
/**
* 替换人封面抬头
*/
@Schema(description = "替换人封面抬头")
private String replaceInvoiceTitle;
/** /**
* 退保金额 todo 数据库暂时没有 * 退保金额 todo 数据库暂时没有
......
...@@ -809,8 +809,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -809,8 +809,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceDetailVO.setDistributeType(insuranceDetailVO.getReduceHandleStatus() == null?insuranceDetailVO.getBuyType():CommonConstants.FIVE_INT); insuranceDetailVO.setDistributeType(insuranceDetailVO.getReduceHandleStatus() == null?insuranceDetailVO.getBuyType():CommonConstants.FIVE_INT);
//派单状态 //派单状态
insuranceDetailVO.setDistributeStatus(insuranceDetailVO.getDistributeType() == CommonConstants.FIVE_INT?insuranceDetailVO.getReduceHandleStatus():insuranceDetailVO.getBuyHandleStatus()); insuranceDetailVO.setDistributeStatus(insuranceDetailVO.getDistributeType() == CommonConstants.FIVE_INT?insuranceDetailVO.getReduceHandleStatus():insuranceDetailVO.getBuyHandleStatus());
//替换类型 //被替换人
if (insuranceDetailVO.getBuyType() == CommonConstants.FOUR_INT){
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, insuranceDetailVO.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, insuranceDetailVO.getId())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
...@@ -822,16 +821,41 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -822,16 +821,41 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
R<SetInfoVo> infoByCodes = archivesDaprUtil.getSetInfoByCodes(Arrays.asList(byId.getDeptNo())); R<SetInfoVo> infoByCodes = archivesDaprUtil.getSetInfoByCodes(Arrays.asList(byId.getDeptNo()));
if (null != infoByCodes && infoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(infoByCodes.getData())) { if (null != infoByCodes && infoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(infoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = infoByCodes.getData().getProjectSetInfoVoMap(); Map<String, ProjectSetInfoVo> data = infoByCodes.getData().getProjectSetInfoVoMap();
if(Objects.nonNull(data)){
ProjectSetInfoVo setInfoVo = data.get(byId.getDeptNo()); ProjectSetInfoVo setInfoVo = data.get(byId.getDeptNo());
if (null != setInfoVo){ if (null != setInfoVo){
insuranceDetailVO.setCoverProjectName(Optional.ofNullable(setInfoVo.getDepartName()).orElse("")); insuranceDetailVO.setCoverProjectName(Optional.ofNullable(setInfoVo.getDepartName()).orElse(""));
insuranceDetailVO.setCoveInvoiceTitle(Optional.ofNullable(setInfoVo.getInvoiceTitleInsurance()).orElse("")); insuranceDetailVO.setCoverInvoiceTitle(Optional.ofNullable(setInfoVo.getInvoiceTitleInsurance()).orElse(""));
} }
} }
} }
} }
} }
//替换人
TInsuranceReplace replace = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getFromInsuranceDetailId, insuranceDetailVO.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(replace).isPresent()) {
TInsuranceDetail replaceById = this.getById(replace.getToInsuranceDetailId());
if (Optional.ofNullable(replaceById).isPresent()) {
insuranceDetailVO.setReplaceEmpName(replaceById.getEmpName());
insuranceDetailVO.setReplaceEmpIdcardNo(replaceById.getEmpIdcardNo());
R<SetInfoVo> infoByCodes = archivesDaprUtil.getSetInfoByCodes(Arrays.asList(replaceById.getDeptNo()));
if (null != infoByCodes && infoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(infoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = infoByCodes.getData().getProjectSetInfoVoMap();
if(Objects.nonNull(data)){
ProjectSetInfoVo setInfoVo = data.get(replaceById.getDeptNo());
if (null != setInfoVo){
insuranceDetailVO.setReplaceProjectName(Optional.ofNullable(setInfoVo.getDepartName()).orElse(""));
insuranceDetailVO.setReplaceInvoiceTitle(Optional.ofNullable(setInfoVo.getInvoiceTitleInsurance()).orElse(""));
}
}
}
}
}
//减员类型 处理创建人、创建时间、备注 //减员类型 处理创建人、创建时间、备注
if(CommonConstants.FIVE_INT == insuranceDetailVO.getDistributeType()){ if(CommonConstants.FIVE_INT == insuranceDetailVO.getDistributeType()){
TInsuranceRefund refund = tInsuranceRefundService.getOne(Wrappers.<TInsuranceRefund>query().lambda() TInsuranceRefund refund = tInsuranceRefundService.getOne(Wrappers.<TInsuranceRefund>query().lambda()
......
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