Commit 81995529 authored by huyuchen's avatar huyuchen

huych-社保自动化相关提交

parent 8b6e36b3
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
......@@ -389,4 +390,21 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "更新人")
private String updateBy;
/**
* 基数上限(社保或公积金)
*/
@ExcelAttribute(name = "基数上限(社保或公积金)" )
@Schema(description = "基数上限(社保或公积金)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数上限(社保或公积金)" )
private BigDecimal upperLimit;
/**
* 基数下限(社保或公积金)
*/
@ExcelAttribute(name = "基数下限(社保或公积金)" )
@Schema(description = "基数下限(社保或公积金)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数下限(社保或公积金)" )
private BigDecimal lowerLimit;
}
......@@ -52,6 +52,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.text.ParseException;
import java.time.LocalDateTime;
import java.util.*;
......@@ -356,13 +357,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
diffTitle = "商险信息";
}
}
} else {
// 没有变更
if (Common.isNotNull(diffTitle)) {
diffTitle += "、商险信息";
} else {
diffTitle = "商险信息";
}
}
String differenceContractKey = null;
......@@ -497,6 +491,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (newInfo.getServerItem().contains("社保")) {
EmployeeRegistrationPreVo preVo = new EmployeeRegistrationPreVo();
BeanUtils.copyProperties(newInfo,preVo);
initSocialPreInfo(preVo, preVo.getDispatchInfoPreVo(), user,empPreId);
socialDaprUtils.saveSocialPreInfo(preVo);
}
if (!saveOrUpdateList.isEmpty()) {
......@@ -784,4 +779,29 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
}
//社保待购买数据初始化
private void initSocialPreInfo(EmployeeRegistrationPreVo pre, TDispatchInfoPreVo preVo,
YifuUser user, String id) throws ParseException {
preVo.setRegisterId(id);
preVo.setCustomerUsername(pre.getCustomerUsernameNew());
preVo.setCustomerUserLoginName(pre.getCustomerUserLoginname());
preVo.setDeptName(pre.getDeptName());
preVo.setDeptId(pre.getDeptId());
preVo.setJoinLeaveDate(pre.getJoinLeaveDate());
preVo.setDeptNo(pre.getDeptNo());
preVo.setEmpName(pre.getEmployeeName());
preVo.setPhone(pre.getEmpPhone());
preVo.setPosition(pre.getPosition());
preVo.setEmpIdcard(pre.getEmpIdcard());
preVo.setCreateBy(user.getId());
preVo.setCreateName(user.getNickname());
preVo.setUpdateBy(user.getId());
preVo.setTypeSub(CommonConstants.ZERO_STRING);
preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDispatchItem("养老、医疗、生育、失业、工伤、大病");
if (CommonConstants.ZERO_STRING.equals(preVo.getIsCreateDate()) && Common.isEmpty(preVo.getSocialStartDate())) {
preVo.setSocialStartDate(pre.getJoinLeaveDate());
}
}
}
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -431,4 +432,21 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("就职岗位")
private String position;
/**
* 基数上限(社保或公积金)
*/
@ExcelAttribute(name = "基数上限(社保或公积金)" )
@Schema(description = "基数上限(社保或公积金)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数上限(社保或公积金)" )
private BigDecimal upperLimit;
/**
* 基数下限(社保或公积金)
*/
@ExcelAttribute(name = "基数下限(社保或公积金)" )
@Schema(description = "基数下限(社保或公积金)" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("基数下限(社保或公积金)" )
private BigDecimal lowerLimit;
}
......@@ -186,12 +186,18 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.eq(TDispatchInfoPre::getRegisterId,registrationPreVo.getExitSocialInfoList()
.get(0).getRegisterId()));
} else {
//删除已存在的入职确认信息对应的社保明细
TDispatchInfoPreVo preVo = registrationPreVo.getDispatchInfoPreVo();
if (null != preVo) {
socialPreDetailService.remove(Wrappers.<TSocialPreDetail>lambdaQuery()
.eq(TSocialPreDetail::getRegisterId, preVo.getRegisterId()));
if (Common.isNotNull(preVo) && Common.isNotNull(preVo.getId())) {
//更新逻辑
TDispatchInfoPre pre = new TDispatchInfoPre();
BeanUtils.copyProperties(preVo, pre);
baseMapper.updateById(pre);
}
if (Common.isNotNull(preVo) && Common.isEmpty(preVo.getId())) {
try {
//删除已存在的入职确认信息对应的社保明细
socialPreDetailService.remove(Wrappers.<TSocialPreDetail>lambdaQuery()
.eq(TSocialPreDetail::getRegisterId, preVo.getRegisterId()));
//判断是否存在社保待购买信息
TDispatchInfoPre preExit = baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getRegisterId, preVo.getRegisterId())
......
......@@ -35,6 +35,8 @@
<result property="configId" column="CONFIG_ID"/>
<result property="receiveType" column="RECEIVE_TYPE"/>
<result property="registerId" column="REGISTER_ID"/>
<result property="upperLimit" column="UPPER_LIMIT"/>
<result property="lowerLimit" column="LOWER_LIMIT"/>
<result property="pensionStart" column="PENSION_START"/>
<result property="medicalStart" column="MEDICAL_START"/>
<result property="unemployStart" column="UNEMPLOY_START"/>
......
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