Commit 5fada366 authored by fangxinjiang's avatar fangxinjiang

入职确认接收和修改合同优化-fxj

parent 5693b5f3
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TContractPreDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TDispatchInfoPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TDispatchInfoPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TFundPreDetailVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TFundPreDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSocialPreDetailVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSocialPreDetailVo;
...@@ -159,6 +160,10 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -159,6 +160,10 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private List<TFundPreDetailVo> exitFundInfoList; private List<TFundPreDetailVo> exitFundInfoList;
@Schema(description = "合同流程中信息集合")
@TableField(exist = false)
private List<TContractPreDetailVo> exitContractInfoList;
@Schema(description = "附件集合") @Schema(description = "附件集合")
@TableField(exist = false) @TableField(exist = false)
private List<TAttaInfo> attaList; private List<TAttaInfo> attaList;
......
...@@ -158,6 +158,9 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -158,6 +158,9 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "公积金流程中信息集合") @Schema(description = "公积金流程中信息集合")
private List<TFundPreDetailVo> exitFundInfoList; private List<TFundPreDetailVo> exitFundInfoList;
@Schema(description = "合同流程中信息集合")
private List<TContractPreDetailVo> exitContractInfoList;
@Schema(description = "附件集合") @Schema(description = "附件集合")
private List<TAttaInfoSaveVo> attaList; private List<TAttaInfoSaveVo> attaList;
......
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TContractPreDetail;
import com.yifu.cloud.plus.v1.yifu.archives.service.TContractPreDetailService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 合同流程中信息记录表
*
* @author system
* @date 2026-04-23
*/
@RestController
@RequestMapping("/tcontractpredetail")
@RequiredArgsConstructor
public class TContractPreDetailController {
private final TContractPreDetailService tContractPreDetailService;
/**
* 批量保存合同流程中信息
*/
@Operation(description = "批量保存合同流程中信息")
@Inner
@PostMapping("/inner/saveBatch")
public Boolean saveBatch(@RequestBody List<TContractPreDetail> detailList) {
if (Common.isEmpty(detailList)) {
return true;
}
return tContractPreDetailService.saveBatch(detailList);
}
}
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TContractPreDetail;
import org.apache.ibatis.annotations.Mapper;
/**
* 合同流程中信息记录表
*
* @author system
* @date 2026-04-23
*/
@Mapper
public interface TContractPreDetailMapper extends BaseMapper<TContractPreDetail> {
}
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TContractPreDetail;
/**
* 合同流程中信息记录表
*
* @author system
* @date 2026-04-23
*/
public interface TContractPreDetailService extends IService<TContractPreDetail> {
}
...@@ -103,6 +103,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -103,6 +103,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
private final TGzOfferInfoMapper gzOfferInfoMapper; private final TGzOfferInfoMapper gzOfferInfoMapper;
private final TContractPreDetailService tContractPreDetailService;
@Autowired @Autowired
@Lazy @Lazy
private ScheduleService scheduleService; private ScheduleService scheduleService;
...@@ -936,6 +938,28 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -936,6 +938,28 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
employeeRegistrationPre.setEmployeeContractPre(null); employeeRegistrationPre.setEmployeeContractPre(null);
} }
} }
//1.9.18合同流程中信息集合处理逻辑
if (employeeRegistrationPre.getServerItem().contains("合同")
&& Common.isNotNull(employeeRegistrationPre.getExitContractInfoList())
&& !employeeRegistrationPre.getExitContractInfoList().isEmpty()) {
// 设置registerId
for (TContractPreDetailVo contractDetail : employeeRegistrationPre.getExitContractInfoList()) {
contractDetail.setRegisterId(id);
}
// 删除旧的合同流程中信息
tContractPreDetailService.remove(Wrappers.<TContractPreDetail>lambdaQuery()
.eq(TContractPreDetail::getRegisterId, id));
// 批量新增合同流程中信息
List<TContractPreDetail> detailList = new ArrayList<>();
for (TContractPreDetailVo vo : employeeRegistrationPre.getExitContractInfoList()) {
TContractPreDetail detail = new TContractPreDetail();
BeanUtils.copyProperties(vo, detail);
detail.setId(null);
detailList.add(detail);
}
tContractPreDetailService.saveBatch(detailList);
}
} }
//1.9.16社保自动化校验逻辑 //1.9.16社保自动化校验逻辑
......
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TContractPreDetail;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TContractPreDetailMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TContractPreDetailService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 合同流程中信息记录表
*
* @author system
* @date 2026-04-23
*/
@Log4j2
@Service
public class TContractPreDetailServiceImpl extends ServiceImpl<TContractPreDetailMapper, TContractPreDetail> implements TContractPreDetailService {
}
...@@ -823,4 +823,29 @@ public class ArchivesDaprUtil { ...@@ -823,4 +823,29 @@ public class ArchivesDaprUtil {
} }
return res; return res;
} }
/**
* @Description: 批量保存合同流程中信息
* @Author: system
* @Date: 2026-04-23
* @param preVo 入职待建档信息VO
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> saveContractPreDetailList(EmployeeRegistrationPreVo preVo){
if (Common.isEmpty(preVo) || Common.isEmpty(preVo.getExitContractInfoList())) {
return R.ok(true);
}
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),
daprArchivesProperties.getAppId(),
"/tcontractpredetail/inner/saveBatch",
JSON.toJSONString(preVo.getExitContractInfoList()),
Boolean.class,
SecurityConstants.FROM_IN
);
if (Common.isEmpty(res)){
return R.failed("保存合同流程中信息失败!");
}
return res;
}
} }
...@@ -917,6 +917,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -917,6 +917,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.getEmployeeContractPreVos().setRegisterId(domainR.getData()); preVo.getEmployeeContractPreVos().setRegisterId(domainR.getData());
archivesDaprUtil.saveContractPreInfo(preVo.getEmployeeContractPreVos()); archivesDaprUtil.saveContractPreInfo(preVo.getEmployeeContractPreVos());
} }
// 处理合同流程中信息集合
if (preVo.getServerItem().contains("合同")
&& null != preVo.getExitContractInfoList()
&& !preVo.getExitContractInfoList().isEmpty()) {
// 设置registerId关联
preVo.getExitContractInfoList().forEach(contractPreDetailVo ->
contractPreDetailVo.setRegisterId(domainR.getData()));
// 保存合同流程中信息集合
archivesDaprUtil.saveContractPreDetailList(preVo);
}
//服务类型包含社保购买时 //服务类型包含社保购买时
if (preVo.getServerItem().contains("社保") && (null != preVo.getExitSocialInfoList() if (preVo.getServerItem().contains("社保") && (null != preVo.getExitSocialInfoList()
|| null != preVo.getDispatchInfoPreVo())) { || null != preVo.getDispatchInfoPreVo())) {
...@@ -1718,6 +1728,15 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1718,6 +1728,15 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
employeeContractPreVo.setRegisterId(domainR.getData()); employeeContractPreVo.setRegisterId(domainR.getData());
archivesDaprUtil.saveContractPreInfo(employeeContractPreVo); archivesDaprUtil.saveContractPreInfo(employeeContractPreVo);
} }
// 服务类型包含合同且存在合同流程中信息集合时
if (preVo.getServerItem().contains("合同")
&& null != preVo.getExitContractInfoList()
&& !preVo.getExitContractInfoList().isEmpty()) {
preVo.getExitContractInfoList().forEach(contractPreDetailVo ->
contractPreDetailVo.setRegisterId(domainR.getData()));
// 保存合同流程中信息集合
archivesDaprUtil.saveContractPreDetailList(preVo);
}
//服务类型包含社保购买时 //服务类型包含社保购买时
if (preVo.getServerItem().contains("社保") && (null != preVo.getExitSocialInfoList() if (preVo.getServerItem().contains("社保") && (null != preVo.getExitSocialInfoList()
|| null != preVo.getDispatchInfoPreVo())) { || null != preVo.getDispatchInfoPreVo())) {
......
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