Commit 9fc71e6b authored by zhaji's avatar zhaji

"feature-zhaJi:新增减员办理导入类和减员办理退回时的办理意见校验"

parent b2181b5b
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaji
* @description 减员办理导入校验
* @date 2022-08-22 10:15:19
*/
@Data
@Tag(name = "减员办理导入参数")
public class InsuranceRefundImportParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 商险id
*/
@Schema(description = "商险id")
private String id;
/**
* 办理意见
*/
@Schema(description = "办理意见")
private String remark;
}
......@@ -34,4 +34,7 @@ public class InsuranceRefundListParam implements Serializable {
@Schema(name = "更新时间")
private LocalDateTime updateTime;
@Schema(name = "办理意见")
private String remark;
}
......@@ -2607,6 +2607,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<TInsuranceOperate> operateList = new ArrayList<>();
for (TInsuranceDetail detail : detailList) {
TInsuranceOperate operate = new TInsuranceOperate();
operate.setRemark(remark);
operate.setInsuranceDetailId(detail.getId());
operate.setOperateDesc(operateDesc);
operate.setCreateBy(user.getId());
......@@ -2986,6 +2987,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CollectionUtils.isEmpty(insuranceDetailList)){
return R.failed("减员办理列表为空");
}
String remark = insuranceDetail.getRemark();
if(CommonConstants.FOUR_INT == refundType && Common.isEmpty(remark)){
return R.failed("减员退回的办理意见不能为空");
}
List<RefundErrorVo> errorList = new ArrayList<>();
List<TInsuranceDetail> successList = new ArrayList<>();
List<TInsuranceDetail> tInsuranceDetails = this.listByIds(insuranceDetailList);
......@@ -3034,9 +3039,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateBatchById(successList);
//操作记录
if(CommonConstants.FOUR_INT == refundType){
addOperate(successList,user,InsurancesConstants.INSURANCE_REFUND_SUCCESS,null);
addOperate(successList,user,InsurancesConstants.INSURANCE_REFUND_SUCCESS,remark);
}else{
addOperate(successList,user,InsurancesConstants.INSURANCE_REFUND_FAILED,null);
addOperate(successList,user,InsurancesConstants.INSURANCE_REFUND_FAILED,remark);
}
return R.ok(errorList,"操作成功");
}
......
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