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

Merge branch 'feature-licancan' into 'develop'

导出办理,勾选的数据有变动,给出提示

See merge request fangxinjiang/yifu!146
parents 5aa544a9 07bf72f7
......@@ -31,6 +31,10 @@ public class InsurancesConstants {
* 编辑
*/
public static final String EDIT = "编辑";
/**
* 数据发生变动,请刷新数据后重新办理
*/
public static final String CHANGE_ERROR = "数据发生变动,请刷新数据后重新办理";
/**
* 导出办理
*/
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -52,6 +53,12 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@JsonIgnore
private Integer buyHandleStatus;
/**
* 购买月数
*/
......@@ -150,6 +157,12 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 创建人姓名
*/
......
......@@ -208,7 +208,7 @@ public class TInsuranceDetailController {
@Operation(summary = "导出办理", description = "导出办理")
@PostMapping("/getInsuranceExportList")
public R<List<InsuranceExportListVO>> getInsuranceExportList(@RequestBody InsuranceExportListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceExportList(param));
return tInsuranceDetailService.getInsuranceExportList(param);
}
/**
......
......@@ -134,9 +134,9 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*
* @author licancan
* @param param
* @return {@link List<InsuranceExportListVO>}
* @return {@link R<List<InsuranceExportListVO>>}
*/
List<InsuranceExportListVO> getInsuranceExportList(InsuranceExportListParam param);
R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param);
/**
* 投保退回
......
......@@ -781,18 +781,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @author licancan
*/
@Override
public List<InsuranceExportListVO> getInsuranceExportList(InsuranceExportListParam param) {
public R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param) {
YifuUser user = SecurityUtils.getUser();
List<InsuranceExportListVO> insuranceExportList = new ArrayList<>();
//todo 根据登录人获取数据权限
String regionSQL = getRegionSQL(user);
param.setRegionSql(regionSQL);
if(StringUtils.isBlank(regionSQL)){
return insuranceExportList;
return R.ok(insuranceExportList);
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){
insuranceExportList = baseMapper.getInsuranceExportListBySelect(param.getIdList());
if (CollectionUtils.isNotEmpty(insuranceExportList)){
for (InsuranceExportListVO exportListVO : insuranceExportList) {
if (exportListVO.getBuyHandleStatus() != CommonConstants.ONE_INT){
return R.failed(InsurancesConstants.CHANGE_ERROR);
}
}
}
}else {
insuranceExportList = baseMapper.getInsuranceExportList(param);
}
......@@ -875,7 +883,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
return insuranceExportList;
return R.ok(insuranceExportList);
}
/**
......
......@@ -326,6 +326,7 @@
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName,
......@@ -341,9 +342,10 @@
detail.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName,
detail.POLICY_NO as policyNo,
detail.REMARK as remark
from t_insurance_detail detail
where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1 and detail.id in
where detail.DELETE_FLAG = 0 and detail.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
......@@ -371,6 +373,7 @@
detail.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName,
detail.POLICY_NO as policyNo,
detail.REMARK as remark
from t_insurance_detail detail
where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1
......
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