Commit 710c3aa2 authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'feature/insurance-1.3.0'

Feature licancan

See merge request !312
parents ca2b6699 aa897b38
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -92,4 +93,10 @@ public class InsuranceInsuredParam implements Serializable {
*/
@Schema(description = "错误信息")
private String errorMessage;
/**
* 数据传递对象
*/
@JsonIgnore
private TInsuranceDetail detail;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -68,4 +70,10 @@ public class InsuranceRegisterInvoiceNoParam implements Serializable {
*/
@Schema(description = "错误信息")
private String errorMessage;
/**
* 数据传递对象
*/
@JsonIgnore
private TInsuranceDetail detail;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -80,4 +82,10 @@ public class InsuranceRegisterParam implements Serializable {
*/
@Schema(description = "错误信息")
private String errorMessage;
/**
* 数据传递对象
*/
@JsonIgnore
private TInsuranceDetail detail;
}
......@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -100,6 +101,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema(description = "错误信息")
private String errorMessage;
/**
* 数据传递对象
*/
@JsonIgnore
private TInsuranceDetail detail;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
......
......@@ -466,24 +466,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//替换
TInsuranceDetail newDetail = new TInsuranceDetail();
//原数据置为无效:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准 + 有效
TInsuranceDetail detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getEmpName, success.getEmpName())
.eq(TInsuranceDetail::getEmpIdcardNo, success.getEmpIdcardNo())
.eq(TInsuranceDetail::getDeptNo, success.getDeptNo())
.eq(TInsuranceDetail::getInsuranceCompanyName, success.getInsuranceCompanyName())
.eq(TInsuranceDetail::getInsuranceTypeName, success.getInsuranceTypeName())
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(success.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(success.getPolicyEnd()))
.eq(TInsuranceDetail::getBuyStandard, success.getBuyStandard())
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
//有效
.and(
wrapper -> wrapper.eq(TInsuranceDetail::getIsEffect,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsEffect)
)
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
TInsuranceDetail detail = success.getDetail();
BeanCopyUtils.copyProperties(detail,newDetail);
detail.setIsEffect(CommonConstants.ONE_INT);
detail.setIsOverdue(null);
......@@ -1756,20 +1739,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuranceRegisterParam success : listSuccess) {
//登记保单保费
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail detail = baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getEmpName, success.getEmpName())
.eq(TInsuranceDetail::getEmpIdcardNo, success.getEmpIdcardNo())
.eq(TInsuranceDetail::getInsuranceCompanyName, success.getInsuranceCompanyName())
.eq(TInsuranceDetail::getInsuranceTypeName, success.getInsuranceTypeName())
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(success.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(success.getPolicyEnd()))
.eq(TInsuranceDetail::getBuyStandard, success.getBuyStandard())
//排除替换类型,解决保单保费挂靠问题
.ne(TInsuranceDetail::getBuyType,CommonConstants.FOUR_INT)
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
TInsuranceDetail detail = success.getDetail();
actualMoney = detail.getActualPremium();
if (StringUtils.isNotBlank(success.getInvoiceNo())){
detail.setInvoiceNo(success.getInvoiceNo());
......@@ -2046,22 +2016,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<TInsuranceDetail> detailList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(listSuccess)){
for (InsuranceRegisterInvoiceNoParam success : listSuccess) {
TInsuranceDetail detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getEmpName, success.getEmpName())
.eq(TInsuranceDetail::getEmpIdcardNo, success.getEmpIdcardNo())
.eq(TInsuranceDetail::getInsuranceCompanyName, success.getInsuranceCompanyName())
.eq(TInsuranceDetail::getInsuranceTypeName, success.getInsuranceTypeName())
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(success.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(success.getPolicyEnd()))
.eq(TInsuranceDetail::getBuyStandard,success.getBuyStandard())
//排除替换类型
.ne(TInsuranceDetail::getBuyType,CommonConstants.FOUR_INT)
//只查询已投保和已减员的
.in(TInsuranceDetail::getBuyHandleStatus,CommonConstants.THREE_INT,CommonConstants.FIVE_INT)
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
TInsuranceDetail detail = success.getDetail();
if (Optional.ofNullable(detail).isPresent()){
//当两次发票号不一致时才更新
if (!success.getInvoiceNo().equals(detail.getInvoiceNo())){
......@@ -2161,20 +2116,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<TInsuranceDetail> detailList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(listSuccess)){
for (InsuranceInsuredParam success : listSuccess) {
TInsuranceDetail detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getEmpName, success.getEmpName())
.eq(TInsuranceDetail::getEmpIdcardNo, success.getEmpIdcardNo())
.eq(TInsuranceDetail::getInsuranceCompanyName, success.getInsuranceCompanyName())
.eq(TInsuranceDetail::getInsuranceTypeName, success.getInsuranceTypeName())
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(success.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(success.getPolicyEnd()))
.eq(TInsuranceDetail::getBuyStandard,success.getBuyStandard())
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
//只查询已投保和已减员的
.in(TInsuranceDetail::getBuyHandleStatus,CommonConstants.THREE_INT,CommonConstants.FIVE_INT)
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
TInsuranceDetail detail = success.getDetail();
if (Optional.ofNullable(detail).isPresent()){
TInsuranceDetail oldDetail = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,oldDetail);
......@@ -3390,6 +3332,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
//所有校验通过后设置查到的结果
param.setDetail(detail);
listSuccess.add(param);
}
map.put("listResult",listResult);
......@@ -3638,6 +3582,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
param.setErrorMessage(CommonConstants.RESULT_DATA_SUCESS);
//所有校验通过后设置查到的结果
param.setDetail(detail);
}
return paramList.stream().distinct().collect(Collectors.toList());
}
......@@ -3731,6 +3677,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
param.setErrorMessage(CommonConstants.RESULT_DATA_SUCESS);
//所有校验通过后设置查到的结果
param.setDetail(detail);
}
return collect;
}
......@@ -3868,6 +3816,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
param.setErrorMessage(CommonConstants.RESULT_DATA_SUCESS);
//所有校验通过后设置查到的结果
param.setDetail(detail);
}
return collect;
}
......@@ -6645,7 +6595,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
YifuUser user = SecurityUtils.getUser();
//根据当前登录人获取其拥有的项目列表权限
List<String> deptNoList = getDeptNoList(user);
return R.ok(deptNoList,"查询项目列表成功");
List<Dept> deptList = new ArrayList<>(16);
if (CollectionUtils.isNotEmpty(deptNoList)){
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(deptNoList);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
SetInfoVo data = setInfoByCodes.getData();
if (Optional.ofNullable(data).isPresent()){
Map<String, ProjectSetInfoVo> projectSetInfoVoMap = data.getProjectSetInfoVoMap();
if (MapUtils.isNotEmpty(projectSetInfoVoMap)){
for (String deptNo : deptNoList) {
ProjectSetInfoVo projectSetInfoVo = projectSetInfoVoMap.get(deptNo);
if(!Common.isEmpty(projectSetInfoVo)){
deptList.add(new Dept(projectSetInfoVo.getDepartNo(),projectSetInfoVo.getDepartName()));
}
}
}
}
}
}
return R.ok(deptList,"查询项目列表成功");
}
/**
......
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