Commit bc2d7eca authored by hongguangwu's avatar hongguangwu

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

parents 23c9ecda 68efb7f8
......@@ -694,7 +694,13 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
&& !preVo.getContractEnd().equals(preVo.getDispatchPeriodEnd())){
errorMessages.add("合同截止日期与派遣截止日期不一致");
}
//固定期限时 劳务派遣合同需要校验 标准合同的年限和劳务派遣合同的年限一致
if (CommonConstants.ONE_STRING.equals(preVo.getContractTerm())){
if (!preVo.getContractDurationYear().equals(preVo.getDispatchPeriodYear())
|| !preVo.getContractDurationMonth().equals(preVo.getDispatchPeriodMonth())){
errorMessages.add("劳务派遣合同需要和标准合同一致");
}
}
// 如果有错误信息,一起返回
if (!errorMessages.isEmpty()) {
return String.join(";", errorMessages);
......
......@@ -1275,6 +1275,15 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
}
}
}
//固定期限时 劳务派遣合同需要校验 标准合同的年限和劳务派遣合同的年限一致
if ("劳务派遣合同".equals(employeeContractPreVo.getContractType())
&& CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractTerm())){
if (!employeeContractPreVo.getContractDurationYear().equals(employeeContractPreVo.getDispatchPeriodYear())
|| !employeeContractPreVo.getContractDurationMonth().equals(employeeContractPreVo.getDispatchPeriodMonth())){
allErrorMessages.add("劳务派遣合同需要和标准合同一致");
}
}
// 校验合同有效期:合同截止日期不得早于合同开始日期
if (Common.isNotNull(employeeContractPreVo.getContractStart())
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -148,9 +146,11 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "商险ID")
private String insurancesId;
@TableField(updateStrategy = FieldStrategy.IGNORED)
@Schema(description = "发起失败原因")
private String errorInfo;
@TableField(updateStrategy = FieldStrategy.IGNORED)
@Schema(description = "发起失败时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@JsonIgnore
......
......@@ -18,9 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -312,6 +310,7 @@ public class TInsurancePreRenewDetail extends BaseEntity {
/**
* 失败原因
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "失败原因", maxLength = 200)
@Length(max = 200, message = "失败原因不能超过200个字符")
@ExcelProperty("失败原因")
......@@ -320,6 +319,7 @@ public class TInsurancePreRenewDetail extends BaseEntity {
/**
* 失败时间
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ExcelAttribute(name = "失败时间", isDate = true)
@ExcelProperty("失败时间")
@Schema(description = "失败时间")
......
......@@ -1044,8 +1044,14 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
}
}
// 已完成状态不需要更新
if (CommonConstants.SIX_STRING.equals(insurancePre.getProcessStatus())) {
return true;
}
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeInsurancePre::getRegisterId, preVo.getRegisterId());
updateWrapper.ne(TEmployeeInsurancePre::getProcessStatus, CommonConstants.SIX_STRING);
updateWrapper.set(TEmployeeInsurancePre::getIsRefuse, CommonConstants.ZERO_STRING);
return this.update(updateWrapper);
}
......
......@@ -10048,6 +10048,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
if (Common.isNotNull(pre)) {
pre.setProcessStatus(status);
if (CommonConstants.THREE_STRING.equals(status) || CommonConstants.SEVEN_STRING.equals(status)){
pre.setErrorInfo(null);
pre.setErrorTime(null);
}
if (Common.isNotNull(insuranceDetail.getId())) {
pre.setInsurancesId(insuranceDetail.getId());
pre.setIsAddress(insuranceDetail.getIsAdress());
......@@ -10097,6 +10101,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
if (Common.isNotNull(pre)) {
pre.setProcessStatus(status);
if (CommonConstants.THREE_STRING.equals(status) || CommonConstants.SEVEN_STRING.equals(status)){
pre.setErrorInfo(null);
pre.setErrorTime(null);
}
if (Common.isNotNull(insuranceDetail.getId())) {
pre.setInsurancesIdNew(insuranceDetail.getId());
pre.setIsAddress(insuranceDetail.getIsAdress());
......@@ -10423,7 +10431,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//通过ids 更新自动化测状态processStatus为待投保
LambdaUpdateWrapper<TEmployeeInsurancePre> updateDiyInfoWrapper = new LambdaUpdateWrapper<>();
updateDiyInfoWrapper.in(TEmployeeInsurancePre::getInsurancesId, ids)
.set(TEmployeeInsurancePre::getProcessStatus,CommonConstants.THREE_STRING);
.set(TEmployeeInsurancePre::getProcessStatus,CommonConstants.THREE_STRING)
.set(TEmployeeInsurancePre::getErrorInfo,null)
.set(TEmployeeInsurancePre::getErrorTime,null);
employeeInsurancePreMapper.update(null, updateDiyInfoWrapper);
}
}
......@@ -10478,12 +10489,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//通过ids 更新自动化测状态processStatus为待投保
LambdaUpdateWrapper<TEmployeeInsurancePre> updateDiyInfoWrapper = new LambdaUpdateWrapper<>();
updateDiyInfoWrapper.in(TEmployeeInsurancePre::getInsurancesId, insuranceIds)
.set(TEmployeeInsurancePre::getProcessStatus,CommonConstants.SEVEN_STRING);
.set(TEmployeeInsurancePre::getProcessStatus,CommonConstants.SEVEN_STRING)
.set(TEmployeeInsurancePre::getErrorTime,null)
.set(TEmployeeInsurancePre::getErrorInfo,null);;
employeeInsurancePreMapper.update(null, updateDiyInfoWrapper);
LambdaUpdateWrapper<TInsurancePreRenewDetail> updateReNewInfoWrapper = new LambdaUpdateWrapper<>();
updateReNewInfoWrapper.in(TInsurancePreRenewDetail::getInsurancesId, insuranceIds)
.set(TInsurancePreRenewDetail::getProcessStatus,CommonConstants.SEVEN_STRING);
.set(TInsurancePreRenewDetail::getProcessStatus,CommonConstants.SEVEN_STRING)
.set(TInsurancePreRenewDetail::getErrorTime,null)
.set(TInsurancePreRenewDetail::getErrorInfo,null);
tInsurancePreRenewDetailMapper.update(null, updateReNewInfoWrapper);
}
}
......
......@@ -279,11 +279,15 @@ public class DoJointInsuranceTask {
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeInsurancePre::getInsurancesId,detail.getId());
updateWrapper.set(TEmployeeInsurancePre::getProcessStatus,CommonConstants.THREE_STRING);
updateWrapper.set(TEmployeeInsurancePre::getErrorTime,null);
updateWrapper.set(TEmployeeInsurancePre::getErrorInfo,null);
tEmployeeInsurancePreMapper.update(null, updateWrapper);
LambdaUpdateWrapper<TInsurancePreRenewDetail> updateReNewInfoWrapper = new LambdaUpdateWrapper<>();
updateReNewInfoWrapper.eq(TInsurancePreRenewDetail::getInsurancesId, detail.getId())
.set(TInsurancePreRenewDetail::getProcessStatus,CommonConstants.SEVEN_STRING);
.set(TInsurancePreRenewDetail::getProcessStatus,CommonConstants.SEVEN_STRING)
.set(TInsurancePreRenewDetail::getErrorTime,null)
.set(TInsurancePreRenewDetail::getErrorInfo,null);
tInsurancePreRenewDetailMapper.update(null, updateReNewInfoWrapper);
}
}
......
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