Commit 305b6d65 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.7.19' into MVP1.7.19

parents 13d9354f dd51c838
...@@ -1233,7 +1233,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -1233,7 +1233,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
List<TEmployeeInsurancePre> list = dataR.getData().getInsurancePreList(); List<TEmployeeInsurancePre> list = dataR.getData().getInsurancePreList();
for (TEmployeeInsurancePre pre : list) { for (TEmployeeInsurancePre pre : list) {
//项目不同 //项目不同
if (!preVo.getDeptNo().equals(pre.getDeptNo()) && (pre.getProcessStatus().equals(CommonConstants.ZERO_STRING) || if (!preVo.getDeptNo().equals(pre.getDeptNo()) && (
pre.getProcessStatus().equals(CommonConstants.ZERO_STRING) ||
pre.getProcessStatus().equals(CommonConstants.ONE_STRING) || pre.getProcessStatus().equals(CommonConstants.ONE_STRING) ||
pre.getProcessStatus().equals(CommonConstants.TWO_STRING))) { pre.getProcessStatus().equals(CommonConstants.TWO_STRING))) {
erorFlag = true; erorFlag = true;
...@@ -1256,7 +1257,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -1256,7 +1257,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
//第一次确认接收场景 //第一次确认接收场景
if (Common.isNotNull(insuranceDetail)) { if (Common.isNotNull(insuranceDetail)) {
//项目不同 //项目不同
if (!preVo.getDeptNo().equals(insuranceDetail.getDeptNo()) && (insuranceDetail.getBuyHandleStatus() == CommonConstants.ONE_INT || if (!preVo.getDeptNo().equals(insuranceDetail.getDeptNo()) && (
insuranceDetail.getBuyHandleStatus() == CommonConstants.SIX_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.ONE_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.TWO_INT || insuranceDetail.getBuyHandleStatus() == CommonConstants.TWO_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.THREE_INT)) { insuranceDetail.getBuyHandleStatus() == CommonConstants.THREE_INT)) {
erorFlag = true; erorFlag = true;
...@@ -1271,6 +1274,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -1271,6 +1274,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
preVo.setProcessStatus(CommonConstants.SIX_STRING); preVo.setProcessStatus(CommonConstants.SIX_STRING);
} else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.FOUR_INT) { } else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.FOUR_INT) {
preVo.setProcessStatus(CommonConstants.FIVE_STRING); preVo.setProcessStatus(CommonConstants.FIVE_STRING);
} else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.SIX_INT) {
preVo.setProcessStatus(CommonConstants.SEVEN_STRING);
} }
//是否地市自购 //是否地市自购
preVo.setIsAddress(insuranceDetail.getIsAdress()); preVo.setIsAddress(insuranceDetail.getIsAdress());
......
...@@ -1135,7 +1135,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1135,7 +1135,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//前端客服的所有项目权限赋值 //前端客服的所有项目权限赋值
EmployeeRegistrationSearchVo searchVo = new EmployeeRegistrationSearchVo(); EmployeeRegistrationSearchVo searchVo = new EmployeeRegistrationSearchVo();
initSearchVo(searchVo); initSearchVo(searchVo);
searchVo.setStatusList(CommonConstants.processPreStatus); List<String> statusList = CommonConstants.processPreStatus;
CommonConstants.processPreStatus.add(CommonConstants.THREE_STRING);
searchVo.setStatusList(statusList);
searchVo.setTypeList(CommonConstants.processPreStatus); searchVo.setTypeList(CommonConstants.processPreStatus);
searchVo.setDeptNo(preVo.getDeptNo()); searchVo.setDeptNo(preVo.getDeptNo());
if (Common.isNotNull(preVo.getIdcardList())) { if (Common.isNotNull(preVo.getIdcardList())) {
...@@ -1162,6 +1164,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1162,6 +1164,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
exitCheckVo.setEmpIdcard(registration.getEmpIdcard()); exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
exitCheckVo.setDeptName(registration.getDeptName()); exitCheckVo.setDeptName(registration.getDeptName());
exitCheckVo.setDeptNo(registration.getDeptNo()); exitCheckVo.setDeptNo(registration.getDeptNo());
if (CommonConstants.THREE_STRING.equals(registration.getProcessStatus())) {
exitCheckVo.setType(preVo.getServerItem());
exitCheckVo.setErrorMsg("已拒绝入职,不可操作!");
errorList.add(exitCheckVo);
continue;
}
if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) { if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) {
//批量的商险是否已购买默认为否 //批量的商险是否已购买默认为否
if (Common.isEmpty(preVo.getInsuranceIsBuy())) { if (Common.isEmpty(preVo.getInsuranceIsBuy())) {
...@@ -2290,7 +2298,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -2290,7 +2298,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//第一次确认接收场景 //第一次确认接收场景
if (Common.isNotNull(insuranceDetail)) { if (Common.isNotNull(insuranceDetail)) {
//项目不同 //项目不同
if (!preVo.getDeptNo().equals(insuranceDetail.getDeptNo()) && (insuranceDetail.getBuyHandleStatus() == CommonConstants.ONE_INT || if (!preVo.getDeptNo().equals(insuranceDetail.getDeptNo()) && (
insuranceDetail.getBuyHandleStatus() == CommonConstants.ONE_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.SIX_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.TWO_INT || insuranceDetail.getBuyHandleStatus() == CommonConstants.TWO_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.THREE_INT)) { insuranceDetail.getBuyHandleStatus() == CommonConstants.THREE_INT)) {
erorFlag = true; erorFlag = true;
...@@ -2305,6 +2315,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -2305,6 +2315,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.setProcessStatus(CommonConstants.SIX_STRING); preVo.setProcessStatus(CommonConstants.SIX_STRING);
} else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.FOUR_INT) { } else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.FOUR_INT) {
preVo.setProcessStatus(CommonConstants.FIVE_STRING); preVo.setProcessStatus(CommonConstants.FIVE_STRING);
} else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.SIX_INT) {
preVo.setProcessStatus(CommonConstants.SEVEN_STRING);
} }
//是否地市自购 //是否地市自购
preVo.setIsAddress(insuranceDetail.getIsAdress()); preVo.setIsAddress(insuranceDetail.getIsAdress());
......
...@@ -68,7 +68,7 @@ public class TEmployeeInsurancePreVo implements Serializable { ...@@ -68,7 +68,7 @@ public class TEmployeeInsurancePreVo implements Serializable {
* 状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职4已完成 * 状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职4已完成
*/ */
@ExcelAttribute(name = "状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职4已完成") @ExcelAttribute(name = "状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职4已完成")
@Schema(description = "状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已完成") @Schema(description = "状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已完成, 待缴费")
@ExcelProperty("状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已完成") @ExcelProperty("状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已完成")
private String processStatus; private String processStatus;
/** /**
......
...@@ -677,6 +677,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -677,6 +677,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
.eq(TInsuranceDetail::getIsOverdue, CommonConstants.ZERO_INT) .eq(TInsuranceDetail::getIsOverdue, CommonConstants.ZERO_INT)
.eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.THREE_INT) .eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.THREE_INT)
.or().eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.TWO_INT) .or().eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.TWO_INT)
.or().eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.SIX_INT)
.or().eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.ONE_INT))); .or().eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.ONE_INT)));
return count == preVo.getExitInsuranceInfoList().size(); return count == preVo.getExitInsuranceInfoList().size();
} }
......
...@@ -537,22 +537,32 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -537,22 +537,32 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//计算购买周期:购买周期=保单结束日期-参保开始日期+1(天数);购买周期=保单结束日期-参保开始日期+1(天数)推算出月数; //计算购买周期:购买周期=保单结束日期-参保开始日期+1(天数);购买周期=保单结束日期-参保开始日期+1(天数)推算出月数;
//按天计费方式 //按天计费方式
long day = LocalDateUtil.betweenDay(buyStartDate.toString(),detail.getPolicyEnd().toString());
if (null != detail.getBillingType() && CommonConstants.ZERO_INT == detail.getBillingType().intValue()){ if (null != detail.getBillingType() && CommonConstants.ZERO_INT == detail.getBillingType().intValue()){
//计算预计保费:根据计费方式、购买标准、购买天数/月数等计算: //计算预计保费:根据计费方式、购买标准、购买天数/月数等计算:
//“计费方式”为“按天”的,预估保费=购买周期天数/365*购买标准+5元; //“计费方式”为“按天”的,预估保费=购买周期天数/365*购买标准+5元;
//“计费方式”为“按月”的,预估保费=购买周期月数对应的费率*购买标准+5元 //“计费方式”为“按月”的,预估保费=购买周期月数对应的费率*购买标准+5元
//按天计费方式 //按天计费方式
detail.setEstimatePremium(new BigDecimal(detail.getBuyStandard()) detail.setEstimatePremium(new BigDecimal(detail.getBuyStandard())
.multiply(new BigDecimal(purchaseCycle)) .multiply(new BigDecimal(day))
.divide(new BigDecimal("365"), 2, RoundingMode.HALF_UP) .divide(new BigDecimal("365"), 2, RoundingMode.HALF_UP)
.add(new BigDecimal("5.00"))); .add(new BigDecimal("5.00")));
TInsuranceTypeRate typeRate = tInsuranceTypeRateService.getOne(Wrappers.<TInsuranceTypeRate>query().lambda()
.eq(TInsuranceTypeRate::getInsuranceTypeId, detail.getInsuranceTypeId())
.eq(TInsuranceTypeRate::getMonth, purchaseCycle)
.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (null != typeRate){
detail.setRate(new BigDecimal(typeRate.getRate()));
}
//按月计费方式 //按月计费方式
}else if (null != detail.getBillingType() && CommonConstants.ONE_INT == detail.getBillingType().intValue()){ }else if (null != detail.getBillingType() && CommonConstants.ONE_INT == detail.getBillingType().intValue()){
detail.setEstimatePremium(new BigDecimal(detail.getBuyStandard()) detail.setEstimatePremium(new BigDecimal(detail.getBuyStandard())
.multiply(null== detail.getRate()?BigDecimal.ZERO: detail.getRate()) .multiply(null== detail.getRate()?BigDecimal.ZERO: detail.getRate())
.add(new BigDecimal("5.00"))); .add(new BigDecimal("5.00")));
} }
long day = LocalDateUtil.betweenDay(buyStartDate.toString(),detail.getPolicyEnd().toString());
//购买周期 //购买周期
detail.setPurchaseCycle(purchaseCycle+"个月/"+day+"天"); detail.setPurchaseCycle(purchaseCycle+"个月/"+day+"天");
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){ if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
...@@ -2196,6 +2206,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2196,6 +2206,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateEmployeeInsurancePreRenewById(detail, Stream.of("4").collect(Collectors.toList()),CommonConstants.SIX_STRING, false); updateEmployeeInsurancePreRenewById(detail, Stream.of("4").collect(Collectors.toList()),CommonConstants.SIX_STRING, false);
//如果是见费出单,生成差额数据 //如果是见费出单,生成差额数据
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){ if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
//保费存储
TInsuranceSettle settle = new TInsuranceSettle();
settle.setInsDetailId(detail.getId());
settle.setSettleType(CommonConstants.TWO_INT);
settle.setSettleHandleStatus(CommonConstants.ONE_STRING);
settle.setEstimatePremium(BigDecimalUtils.safeAdd(detail.getActualPremium(),detail.getEstimatePremium()));
settle.setActualPremium(BigDecimal.ZERO);
//调完ekp接口才会是1
settle.setIsEstimatePush(CommonConstants.ONE_INT);
settle.setEstimatePushTime(LocalDateTime.now());
settle.setCreateTime(LocalDateTime.now());
settle.setId(RandomStringUtils.randomNumeric(19));
settleList.add(settle);
TInsuranceDetail detailTemp = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,detailTemp);
detailTemp.setDefaultSettleId(settle.getId());
detailTemp.setEstimatePremium(BigDecimalUtils.safeAdd(detail.getActualPremium(),detail.getEstimatePremium()));
detailTemp.setActualPremium(BigDecimal.ZERO);
//差额结算
detailTemp.setSettleType(CommonConstants.TWO_INT);
successBanlance.add(detailTemp);
successThree.add(detail); successThree.add(detail);
} }
} }
......
...@@ -661,6 +661,8 @@ public class DoJointInsuranceTask { ...@@ -661,6 +661,8 @@ public class DoJointInsuranceTask {
} }
} }
} else if ("0".equals(param.getIsJfcd())){ } else if ("0".equals(param.getIsJfcd())){
//见费出单 是否全部结算 都是 是
pushParam.setFd_3b13b2ecc164aa("是");
//3、针对提前缴费的项目,无论是否为预估模式,商险存在预估费用,预估费用中应收有值为按照规则计算得出的,应支为0;存在实缴费用,实缴费用应收为0,应支等于导入的实缴金额; //3、针对提前缴费的项目,无论是否为预估模式,商险存在预估费用,预估费用中应收有值为按照规则计算得出的,应支为0;存在实缴费用,实缴费用应收为0,应支等于导入的实缴金额;
// 存在差额费用,差额费用应收有值,等于“实缴的应支金额-预估的应收金额——此类实缴支出会判断是否存在提前缴费的标识,若存在,则支出可以选择的到, // 存在差额费用,差额费用应收有值,等于“实缴的应支金额-预估的应收金额——此类实缴支出会判断是否存在提前缴费的标识,若存在,则支出可以选择的到,
// 选择后即可支出(差额明细逻辑:导入后根据预估明细和实缴明细,生成“单据类型”为“差额”的商险明细数据(只有应收金额没有应支,应收金额=实缴的应支-预估的应收,若>0, // 选择后即可支出(差额明细逻辑:导入后根据预估明细和实缴明细,生成“单据类型”为“差额”的商险明细数据(只有应收金额没有应支,应收金额=实缴的应支-预估的应收,若>0,
...@@ -671,8 +673,7 @@ public class DoJointInsuranceTask { ...@@ -671,8 +673,7 @@ public class DoJointInsuranceTask {
//应支=0 //应支=0
pushParam.setFd_3adfe6e3911ffe(0.00); pushParam.setFd_3adfe6e3911ffe(0.00);
pushParam.setFd_3adfe6af71a1cc("预估"); pushParam.setFd_3adfe6af71a1cc("预估");
//见费出单 是否全部结算 都是 是
pushParam.setFd_3b13b2ecc164aa("是");
//实际结算月份 //实际结算月份
pushParam.setFd_3af9d11088facc(null); pushParam.setFd_3af9d11088facc(null);
//有无预估 //有无预估
...@@ -681,8 +682,6 @@ public class DoJointInsuranceTask { ...@@ -681,8 +682,6 @@ public class DoJointInsuranceTask {
} }
if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())){ if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())){
ys = 0L; ys = 0L;
//见费出单 是否全部结算 都是 是
pushParam.setFd_3b13b2ecc164aa("是");
} }
//差额 //差额
if (InsurancesConstants.BALANCE_SETTLE_BILL.equals(param.getSettleType())){ if (InsurancesConstants.BALANCE_SETTLE_BILL.equals(param.getSettleType())){
...@@ -692,8 +691,6 @@ public class DoJointInsuranceTask { ...@@ -692,8 +691,6 @@ public class DoJointInsuranceTask {
pushParam.setFd_3adfe6e3911ffe(0.00); pushParam.setFd_3adfe6e3911ffe(0.00);
//实际保费设置为0.0 //实际保费设置为0.0
pushParam.setFd_3adfe6610c0d2c(null == param.getActualPremium()?0.00:param.getActualPremium().doubleValue()); pushParam.setFd_3adfe6610c0d2c(null == param.getActualPremium()?0.00:param.getActualPremium().doubleValue());
//见费出单 是否全部结算 都是 是
pushParam.setFd_3b13b2ecc164aa("是");
//实际结算月份 //实际结算月份
pushParam.setFd_3af9d11088facc(null); pushParam.setFd_3af9d11088facc(null);
//有无预估 //有无预估
...@@ -728,10 +725,16 @@ public class DoJointInsuranceTask { ...@@ -728,10 +725,16 @@ public class DoJointInsuranceTask {
if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())) { if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())) {
EkpInsurancesInfo info = insurancesInfoMapper.getEkpInsurancesInfoYg(param.getDetailId()+ EkpInsurancesInfo info = insurancesInfoMapper.getEkpInsurancesInfoYg(param.getDetailId()+
CommonConstants.DOWN_LINE_STRING + (null == param.getDefaultSettleId() ? "" :param.getDefaultSettleId())); CommonConstants.DOWN_LINE_STRING + (null == param.getDefaultSettleId() ? "" :param.getDefaultSettleId()));
//特殊处理下是否见费出单 是否全部结算为是
if ("0".equals(param.getIsJfcd())) {
//见费出单 是否全部结算 都是 是
info.setFd_3b13b2ecc164aa("是");
}
if (Common.isNotNull(info)) { if (Common.isNotNull(info)) {
initValueUpdate(info, deptInfoVo, param); initValueUpdate(info, deptInfoVo, param);
} }
} }
} }
//红冲 //红冲
if (InsurancesConstants.CORRECT_SETTLE_BILL.equals(param.getInteractiveType()) && "否".equals(param.getBpoFlag())) { if (InsurancesConstants.CORRECT_SETTLE_BILL.equals(param.getInteractiveType()) && "否".equals(param.getBpoFlag())) {
...@@ -753,6 +756,11 @@ public class DoJointInsuranceTask { ...@@ -753,6 +756,11 @@ public class DoJointInsuranceTask {
pushParam.setFd_usebpo_settle("否".equals(deptInfoVo.getIsBpo()) ? "否" : deptInfoVo.getBpoSettle()); pushParam.setFd_usebpo_settle("否".equals(deptInfoVo.getIsBpo()) ? "否" : deptInfoVo.getBpoSettle());
//应收 //应收
pushParam.setFd_3adfe6e30f2a3c(InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType()) ? param.getActualPremium().doubleValue() :param.getEstimatePremium().doubleValue()); pushParam.setFd_3adfe6e30f2a3c(InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType()) ? param.getActualPremium().doubleValue() :param.getEstimatePremium().doubleValue());
//特殊处理下是否见费出单 是否全部结算为是
if ("0".equals(param.getIsJfcd())) {
//见费出单 是否全部结算 都是 是
pushParam.setFd_3b13b2ecc164aa("是");
}
insurancesInfoMapper.insert(pushParam); insurancesInfoMapper.insert(pushParam);
} }
//更新 //更新
......
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