Commit 3b7549aa authored by hongguangwu's avatar hongguangwu

1.7.23-确认接收留存历史数据并清空上一份入职数据

parent 14da156a
# 入职确认信息历史归档改造计划
## 1. 需求分析
### 1.1 业务场景
入职-离职-再次入职流程中,需要将每次入职的确认信息及其附属明细(合同、社保、公积金等)进行版本隔离,避免数据混淆。
### 1.2 解决方案思路
在确认接收时:
1. 查询该人员该项目下是否存在历史入职确认信息
2. 如果存在,将历史数据迁移到对应的历史表
3. 创建新的入职确认信息及附属明细
## 2. 现有架构分析
### 2.1 现有数据表结构
| 模块 | 主表 | 说明 |
|------|------|------|
| archives | `employee_registration_pre` | 入职待建档表 |
| archives | `t_employee_contract_pre` | 合同待签订表 |
| archives | `t_employee_contract_pre_history` | 合同历史表(已存在) |
| insurances | `t_employee_insurance_pre` | 商险待购买表 |
| social | `t_dispatch_info_pre` | 社保/公积金待派单表 |
### 2.2 确认接收流程(现有)
```
EmployeeRegistrationServiceImpl.confirmReceive()
├── 数据校验
├── 查询历史入职确认信息(通过身份证+项目编码)
├── 如果存在历史数据:
│ ├── archivesDaprUtil.archiveRegisterPreInfo() // 归档入职确认信息
│ ├── archivesDaprUtil.archiveContractPreInfo() // 归档合同待签订数据
│ ├── insuranceDaprUtil.archiveInsurancePreInfo() // 归档商险待购买数据
│ └── socialDaprUtils.archiveSocialFundPreInfo() // 归档社保/公积金待派单数据
├── 原有确认接收逻辑:
│ ├── archivesDaprUtil.saveRegistPreInfo()
│ ├── insuranceDaprUtil.saveInsurancePreInfo()
│ ├── archivesDaprUtil.saveContractPreInfo()
│ ├── socialDaprUtils.saveSocialPreInfo()
│ └── socialDaprUtils.saveFundPreInfo()
└── 返回结果
```
## 3. 改造方案
### 3.1 新增历史表
#### 3.1.1 入职确认信息历史表
**表名**: `employee_registration_pre_old_history`
| 字段 | 类型 | 说明 |
|------|------|------|
| id | varchar(32) | 主键(继承自主表) |
| employee_name | varchar(100) | 员工姓名 |
| emp_idcard | varchar(18) | 身份证号 |
| emp_phone | varchar(20) | 手机号码 |
| position | varchar(100) | 就职岗位 |
| join_leave_date | date | 入职日期 |
| process_status | varchar(2) | 状态 |
| customer_username | varchar(100) | 前端客服 |
| customer_user_loginname | varchar(100) | 前端客服登录名 |
| dept_name | varchar(200) | 项目名称 |
| dept_no | varchar(50) | 项目编码 |
| dept_id | varchar(32) | 项目ID |
| emp_nature | varchar(2) | 员工类型 |
| contract_type | varchar(2) | 合同类型 |
| contract_sub_name | varchar(10) | 合同业务细分 |
| data_source | varchar(2) | 数据来源 |
| expected_collection_time | datetime | 预计收集时间 |
| server_item | varchar(200) | 服务事项 |
| file_province | varchar(100) | 档案所在地-省 |
| file_city | varchar(100) | 档案所在地-市 |
| file_town | varchar(100) | 档案所在地-县 |
| province_code | varchar(20) | 档案所在地-省编号 |
| city_code | varchar(20) | 档案所在地-市编号 |
| town_code | varchar(20) | 档案所在地-县编号 |
| insurance_is_buy | varchar(1) | 商险是否已购买 |
| social_is_buy | varchar(1) | 社保是否已购买 |
| fund_is_buy | varchar(1) | 公积金是否已参保 |
| contract_is_buy | varchar(1) | 是否已签署合同 |
| confirm_user | varchar(100) | 确认人 |
| confirm_time | datetime | 确认时间 |
| customer_username_new | varchar(100) | 最新的客服名称 |
| is_refuse | varchar(1) | 是否拒绝入职 |
| is_leave | varchar(1) | 是否已确认离职 |
| history_time | datetime | **归档时间(新增)** |
| create_by | varchar(32) | 创建人 |
| create_name | varchar(100) | 创建人姓名 |
| create_time | datetime | 创建时间 |
| update_by | varchar(32) | 更新人 |
| update_name | varchar(100) | 更新人姓名 |
| update_time | datetime | 更新时间 |
### 3.2 修改的文件
#### 3.2.1 新增实体类
| 文件路径 | 说明 |
|----------|------|
| `yifu-archives/yifu-archives-api/src/main/java/.../entity/EmployeeRegistrationPreOldHistory.java` | 入职确认信息历史实体(继承自EmployeeRegistrationPre) |
#### 3.2.2 新增Mapper
| 文件路径 | 说明 |
|----------|------|
| `yifu-archives/yifu-archives-biz/src/main/java/.../mapper/EmployeeRegistrationPreHistoryMapper.java` | 入职确认信息历史Mapper |
#### 3.2.3 新增Service
| 文件路径 | 说明 |
|----------|------|
| `yifu-archives/yifu-archives-biz/src/main/java/.../service/EmployeeRegistrationPreHistoryService.java` | 入职确认信息历史Service接口 |
| `yifu-archives/yifu-archives-biz/src/main/java/.../service/impl/EmployeeRegistrationPreHistoryServiceImpl.java` | 入职确认信息历史Service实现 |
#### 3.2.4 修改确认接收逻辑
| 文件路径 | 修改内容 |
|----------|----------|
| `yifu-csp/yifu-csp-biz/src/main/java/.../service/impl/EmployeeRegistrationServiceImpl.java` | 添加 `getHistoryIdMap()` 方法和归档逻辑 |
#### 3.2.5 新增Dapr接口
| 文件路径 | 说明 |
|----------|------|
| `yifu-archives/yifu-archives-biz/src/main/java/.../controller/EmployeeRegistrationPreController.java` | 新增归档接口 `/inner/archiveByRegisterId` |
#### 3.2.6 更新Dapr工具类
| 文件路径 | 说明 |
|----------|------|
| `yifu-common/yifu-common-dapr/src/main/java/.../util/ArchivesDaprUtil.java` | 新增归档调用方法 `archiveRegisterPreInfo()``archiveContractPreInfo()` |
| `yifu-common/yifu-common-dapr/src/main/java/.../util/InsuranceDaprUtil.java` | 新增归档调用方法 `archiveInsurancePreInfo()` |
| `yifu-common/yifu-common-dapr/src/main/java/.../util/SocialDaprUtils.java` | 新增归档调用方法 `archiveSocialFundPreInfo()` |
## 4. 改造流程
### 4.1 确认接收时的归档流程
```
confirmReceive()
├── 查询该人员该项目下是否存在历史入职确认信息
│ └── getHistoryIdMap(cardDeptList, curIdList, historyIdMap)
│ └── SELECT * FROM employee_registration_pre
│ WHERE emp_idcard + dept_no IN (cardDeptList)
│ AND id NOT IN (curIdList)
├── 如果存在历史数据:
│ ├── archivesDaprUtil.archiveRegisterPreInfo(historyId) // 归档入职确认信息
│ ├── archivesDaprUtil.archiveContractPreInfo(historyId) // 归档合同待签订数据
│ ├── insuranceDaprUtil.archiveInsurancePreInfo(historyId) // 归档商险待购买数据
│ └── socialDaprUtils.archiveSocialFundPreInfo(historyId) // 归档社保/公积金待派单数据
├── 原有确认接收逻辑:
│ ├── archivesDaprUtil.saveRegistPreInfo()
│ ├── insuranceDaprUtil.saveInsurancePreInfo()
│ ├── archivesDaprUtil.saveContractPreInfo()
│ ├── socialDaprUtils.saveSocialPreInfo()
│ └── socialDaprUtils.saveFundPreInfo()
└── 返回结果
```
### 4.2 归档逻辑实现
`EmployeeRegistrationPreServiceImpl` 中新增方法:
```java
/**
* 归档入职确认信息到历史表
* @param registerId 入职待建档ID
* @return 是否成功
*/
Boolean archiveByRegisterId(String registerId);
```
### 4.3 Dapr接口定义
| 接口路径 | 方法 | 说明 |
|----------|------|------|
| `/employeeregistrationpre/inner/archiveByRegisterId` | POST | 归档入职确认信息 |
| `/temployeeinsurancepre/inner/archiveByRegisterId` | POST | 归档商险待购买数据 |
| `/temployeecontractpre/inner/archiveContractByRegisterId` | POST | 归档合同待签订数据 |
| `/tdispatchinfopre/inner/archiveByRegisterId` | POST | 归档社保/公积金待派单数据 |
## 5. 数据库脚本
### 5.1 创建入职确认信息历史表
```sql
CREATE TABLE `employee_registration_pre_old_history` (
`id` VARCHAR(32) NOT NULL COMMENT '主键',
`employee_name` VARCHAR(100) DEFAULT NULL COMMENT '员工姓名',
`emp_idcard` VARCHAR(18) DEFAULT NULL COMMENT '身份证号',
`emp_phone` VARCHAR(20) DEFAULT NULL COMMENT '手机号码',
`position` VARCHAR(100) DEFAULT NULL COMMENT '就职岗位',
`join_leave_date` DATE DEFAULT NULL COMMENT '入职日期',
`process_status` VARCHAR(2) DEFAULT NULL COMMENT '状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职,4已完成,5已确认离职',
`customer_username` VARCHAR(100) DEFAULT NULL COMMENT '前端客服',
`customer_user_loginname` VARCHAR(100) DEFAULT NULL COMMENT '前端客服登录名',
`dept_name` VARCHAR(200) DEFAULT NULL COMMENT '项目名称',
`dept_no` VARCHAR(50) DEFAULT NULL COMMENT '项目编码',
`dept_id` VARCHAR(32) DEFAULT NULL COMMENT '项目ID',
`emp_nature` VARCHAR(2) DEFAULT NULL COMMENT '员工类型(字典值,0外包1派遣2代理)',
`contract_type` VARCHAR(2) DEFAULT NULL COMMENT '合同类型(字典值)',
`contract_sub_name` VARCHAR(10) DEFAULT NULL COMMENT '合同业务细分(字典值)',
`data_source` VARCHAR(2) DEFAULT NULL COMMENT '数据来源',
`expected_collection_time` DATETIME DEFAULT NULL COMMENT '预计收集时间',
`server_item` VARCHAR(200) DEFAULT NULL COMMENT '服务事项',
`file_province` VARCHAR(100) DEFAULT NULL COMMENT '档案所在地-省',
`file_city` VARCHAR(100) DEFAULT NULL COMMENT '档案所在地-市',
`file_town` VARCHAR(100) DEFAULT NULL COMMENT '档案所在地-县',
`province_code` VARCHAR(20) DEFAULT NULL COMMENT '档案所在地-省编号',
`city_code` VARCHAR(20) DEFAULT NULL COMMENT '档案所在地-市编号',
`town_code` VARCHAR(20) DEFAULT NULL COMMENT '档案所在地-县编号',
`insurance_is_buy` VARCHAR(1) DEFAULT NULL COMMENT '商险是否已购买 0 是 1 否',
`social_is_buy` VARCHAR(1) DEFAULT NULL COMMENT '社保是否已购买 0 是 1 否',
`fund_is_buy` VARCHAR(1) DEFAULT NULL COMMENT '公积金是否已参保 0 是 1 否',
`contract_is_buy` VARCHAR(1) DEFAULT NULL COMMENT '是否已签署合同 0 是 1 否',
`confirm_user` VARCHAR(100) DEFAULT NULL COMMENT '确认人',
`confirm_time` DATETIME DEFAULT NULL COMMENT '确认时间',
`customer_username_new` VARCHAR(100) DEFAULT NULL COMMENT '最新的客服名称',
`is_refuse` VARCHAR(1) DEFAULT NULL COMMENT '是否拒绝入职:0 是 1 否',
`is_leave` VARCHAR(1) DEFAULT NULL COMMENT '是否已确认离职:0 是 1 否',
`history_time` DATETIME DEFAULT NULL COMMENT '归档时间',
`create_by` VARCHAR(32) DEFAULT NULL COMMENT '创建人',
`create_name` VARCHAR(100) DEFAULT NULL COMMENT '创建人姓名',
`create_time` DATETIME DEFAULT NULL COMMENT '创建时间',
`update_by` VARCHAR(32) DEFAULT NULL COMMENT '更新人',
`update_name` VARCHAR(100) DEFAULT NULL COMMENT '更新人姓名',
`update_time` DATETIME DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
INDEX `idx_emp_idcard` (`emp_idcard`),
INDEX `idx_dept_no` (`dept_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='入职待建档历史表';
```
## 6. 风险与注意事项
### 6.1 数据一致性
- 归档操作需要在事务中执行,确保所有关联数据都成功归档
- 如果归档失败,需要回滚并返回错误信息
### 6.2 性能考虑
- 归档操作会增加确认接收的响应时间,需要评估性能影响
- 可以考虑异步归档,但需要处理数据一致性问题
### 6.3 历史数据查询
- 需要提供历史数据查询接口,支持按身份证号、项目编号查询
- 历史数据只读,不允许修改
### 6.4 迁移兼容性
- 历史表结构通过继承主表实现,便于数据迁移
- 需要考虑数据类型的兼容性
## 7. 测试要点
| 测试场景 | 预期结果 |
|----------|----------|
| 首次入职确认接收 | 正常创建新记录,无归档操作 |
| 再次入职确认接收(存在历史数据) | 先归档历史数据,再创建新记录 |
| 归档失败 | 返回错误信息,不创建新记录 |
| 历史数据查询 | 可以查询到已归档的历史记录 |
| 历史记录修改 | 禁止修改历史记录 |
---
**改造影响范围**
- 入职确认接收流程
- 入职确认信息查询接口
- 合同、社保、公积金待办数据处理
- 需要同步修改三个服务模块(archives、insurances、social)
\ No newline at end of file
---
name: "code-style-guide"
description: "检查代码是否符合Yifu项目开发规范,包括命名规范、代码格式、注解使用、异常处理等。Invoke when user wants to verify code compliance or needs guidance on coding standards."
---
# Yifu 代码规范检查器
## 功能说明
本Skill用于检查代码是否符合Yifu项目的开发规范,帮助开发者在编码过程中保持代码风格的一致性。
## 检查范围
### 1. 命名规范
- 类名:采用大驼峰命名(PascalCase)
- 方法名:采用小驼峰命名(camelCase)
- 变量名:采用小驼峰命名(camelCase)
- 常量名:全大写+下划线(UPPER_CASE)
- 文件名:与类名保持一致
### 2. 代码格式
- 缩进:4个空格
- 换行:每行不超过120字符
- 空行:方法之间空1行,逻辑块之间空1行
- 大括号:左大括号不换行,右大括号单独占一行
### 3. 注解顺序(从上到下)
1. Spring组件注解(@RestController, @Service等)
2. Lombok注解(@RequiredArgsConstructor, @Log4j2等)
3. 请求映射注解(@RequestMapping)
4. Swagger注解(@Tag, @Operation等)
### 4. 依赖注入
- 优先使用构造器注入(@RequiredArgsConstructor)
- 禁止使用字段注入(@Autowired在字段上)
### 5. 异常处理
- 使用统一响应封装 `R<T>`
- 异常必须记录日志
- 禁止使用 `System.out.println`
### 6. 日志规范
- 使用 `@Log4j2` 注解
- 日志级别:INFO用于业务操作,ERROR用于异常
### 7. REST API规范
- HTTP方法:GET(查询)、POST(新增)、PUT(更新)、DELETE(删除)
- 路径命名:小写字母+连字符,如 `/employeeregistration/page`
- 响应格式:统一使用 `R<T>` 封装
## 使用方式
```java
// 示例:符合规范的Controller类
@RestController
@RequiredArgsConstructor
@RequestMapping("/employeeregistration")
@Tag(name = "入离职登记表管理")
public class EmployeeRegistrationController {
private final EmployeeRegistrationService employeeRegistrationService;
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<EmployeeRegistration>> getEmployeeRegistrationPage(
Page<EmployeeRegistration> page,
EmployeeRegistrationSearchVo searchVo) {
return new R<>(employeeRegistrationService.getEmployeeRegistrationPage(page, searchVo));
}
}
```
## 检查清单
| 检查项 | 检查内容 |
|-------|---------|
| 命名规范 | 类名、方法名、变量名是否符合规范 |
| 代码格式 | 缩进、换行、空行是否符合规范 |
| 注解使用 | 注解顺序、权限注解是否正确 |
| 异常处理 | 是否有日志记录、异常是否正确处理 |
| 依赖注入 | 是否使用构造器注入 |
| 响应格式 | 是否统一使用 `R<T>` 封装 |
| 日志记录 | 是否使用 `@Log4j2`、日志级别是否合适 |
## 代码生成器集成
本规范已集成到项目的代码生成器模板中,使用代码生成功能时会自动生成符合规范的代码。
## 静态检查
项目已集成 `spring-javaformat-maven-plugin`,执行以下命令进行代码格式化检查:
```bash
# 检查代码格式
mvn spring-javaformat:check
# 自动格式化代码
mvn spring-javaformat:apply
```
## 参考文档
- [Yifu项目架构说明](https://wiki.example.com/yifu/architecture)
- [MyBatis Plus官方文档](https://baomidou.com/)
- [Spring Boot官方文档](https://docs.spring.io/spring-boot/docs/current/reference/html/)
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
@Data
@TableName("employee_registration_pre_old_history")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "入职待建档历史表")
public class EmployeeRegistrationPreOldHistory extends EmployeeRegistrationPre {
@Schema(description = "归档时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime historyTime;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 合同待签订任务记录表
*
* @author huych
* @date 2025-06-11 14:15:53
*/
@Data
@TableName("t_employee_contract_pre_old_history")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "合同待签订任务归档表")
public class TEmployeeContractPreOldHistory extends TEmployeeContractPre {
@Schema(description = "归档时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime historyTime;
}
......@@ -224,4 +224,15 @@ public class EmployeeRegistrationPreController {
return employeeRegistrationPreService.getGzEmployeeInfo(vo);
}
/**
* @Description: 归档入职确认信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
**/
@Inner
@PostMapping("/inner/archiveByRegisterId")
public Boolean archiveByCardAndDeptNo(@RequestBody BaseSearchVO paramVo) {
return employeeRegistrationPreService.archiveByRegisterId(paramVo.getRegisterId());
}
}
......@@ -353,4 +353,16 @@ public class TEmployeeContractPreController {
public Boolean judgeHaveProcessingContracnt(@RequestBody BaseSearchVO paramVo) {
return tEmployeeContractPreService.judgeHaveProcessingContracnt(paramVo);
}
/**
* @Description: 归档入职确认信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
**/
@Inner
@PostMapping("/inner/archiveContractByRegisterId")
public Boolean archiveContractByRegisterId(@RequestBody BaseSearchVO paramVo) {
return tEmployeeContractPreService.archiveContractByRegisterId(paramVo.getRegisterId());
}
}
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.EmployeeRegistrationPreOldHistory;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EmployeeRegistrationPreHistoryMapper extends BaseMapper<EmployeeRegistrationPreOldHistory> {
}
\ No newline at end of file
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.TEmployeeContractPreOldHistory;
import org.apache.ibatis.annotations.Mapper;
/**
* 合同待签订任务归档表
*
* @author hgw
* @date 2026-05-13 14:15:53
*/
@Mapper
public interface TEmployeeContractPreOldHistoryMapper extends BaseMapper<TEmployeeContractPreOldHistory> {
}
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.EmployeeRegistrationPreOldHistory;
public interface EmployeeRegistrationPreHistoryService extends IService<EmployeeRegistrationPreOldHistory> {
}
\ No newline at end of file
......@@ -124,4 +124,12 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr
**/
EmployeeRegistrationPre getEmployeeRegistrationPreById(String id);
/**
* @Description: 归档入职确认信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
* @return: java.lang.Boolean
**/
Boolean archiveByRegisterId(String registerId);
}
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.TEmployeeContractPreOldHistory;
/**
* 合同待签订任务归档表
*
* @author hgw
* @date 2026-05-13 14:15:53
*/
public interface TEmployeeContractPreOldHistoryService extends IService<TEmployeeContractPreOldHistory> {
}
......@@ -100,7 +100,7 @@ public interface TEmployeeContractPreService extends IService<TEmployeeContractP
/**
* 合同待签订一键催办
* @param idList id集合
* @param id id集合
* @return
*/
R contractUrg(String id);
......@@ -108,4 +108,7 @@ public interface TEmployeeContractPreService extends IService<TEmployeeContractP
R<TEmployeeContractPre> getInfoByRegistId(String registId);
boolean judgeHaveProcessingContracnt(BaseSearchVO paramVo);
// 归档合同
boolean archiveContractByRegisterId(String registerId);
}
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.EmployeeRegistrationPreOldHistory;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreHistoryMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreHistoryService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
@Log4j2
@Service
public class EmployeeRegistrationPreHistoryServiceImpl extends ServiceImpl<EmployeeRegistrationPreHistoryMapper, EmployeeRegistrationPreOldHistory> implements EmployeeRegistrationPreHistoryService {
}
\ No newline at end of file
......@@ -31,8 +31,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.OnProcessInsurancesVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
......@@ -114,6 +112,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Autowired
SysConfigMapper sysConfigMapper;
private final EmployeeRegistrationPreHistoryService employeeRegistrationPreHistoryService;
/**
* 入职待建档表简单分页查询
* @param employeeRegistrationPre 入职待建档表
......@@ -1909,4 +1909,19 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
return pre;
}
@Override
public Boolean archiveByRegisterId(String registerId) {
if (Common.isNotNull(registerId)) {
EmployeeRegistrationPre registration = this.getById(registerId);
if (registration != null && Common.isNotNull(registration.getId())) {
EmployeeRegistrationPreOldHistory history = new EmployeeRegistrationPreOldHistory();
BeanUtils.copyProperties(registration, history);
history.setHistoryTime(LocalDateTime.now());
employeeRegistrationPreHistoryService.saveOrUpdate(history);
baseMapper.deleteById(registerId);
}
}
return true;
}
}
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.TEmployeeContractPreOldHistory;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractPreOldHistoryMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreOldHistoryService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 合同待签订任务归档表
*
* @author hgw
* @date 2026-05-13 14:15:53
*/
@Log4j2
@Service
@RequiredArgsConstructor
public class TEmployeeContractPreOldHistoryServiceImpl extends ServiceImpl<TEmployeeContractPreOldHistoryMapper, TEmployeeContractPreOldHistory> implements TEmployeeContractPreOldHistoryService {
}
......@@ -26,6 +26,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
......@@ -57,6 +58,9 @@ import java.util.stream.Stream;
public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContractPreMapper, TEmployeeContractPre> implements TEmployeeContractPreService {
private final TEmployeeContractPreHistoryMapper tEmployeeContractPreHistoryMapper;
private final TEmployeeContractPreOldHistoryService tEmployeeContractPreOldHistoryService;
private final TSettleDomainService tSettleDomainService;
private final TEmployeeContractAuditService tEmployeeContractAuditService;
......@@ -1285,4 +1289,26 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
return false;
}
}
@Override
public boolean archiveContractByRegisterId(String registerId) {
if (Common.isNotNull(registerId)) {
List<TEmployeeContractPre> contractPreList = baseMapper.selectList(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRegisterId, registerId));
if (contractPreList != null && !contractPreList.isEmpty()) {
TEmployeeContractPreOldHistory history;
for (TEmployeeContractPre pre : contractPreList) {
if (pre != null && Common.isNotNull(pre.getId())) {
history = new TEmployeeContractPreOldHistory();
BeanUtils.copyProperties(pre, history);
history.setHistoryTime(LocalDateTime.now());
tEmployeeContractPreOldHistoryService.saveOrUpdate(history);
baseMapper.deleteById(pre.getId());
}
}
}
}
return true;
}
}
......@@ -848,4 +848,52 @@ public class ArchivesDaprUtil {
}
return res;
}
/**
* @Description: 归档入职确认信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
* @param registerId 入职ID
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> archiveRegisterPreInfo(String registerId){
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setRegisterId(registerId);
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),
daprArchivesProperties.getAppId(),
"/employeeregistrationpre/inner/archiveByRegisterId",
paramVo,
Boolean.class,
SecurityConstants.FROM_IN
);
if (Common.isEmpty(res)){
return R.failed("归档入职确认信息失败!");
}
return res;
}
/**
* @Description: 归档合同待签订信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
* @param registerId 入职待建档ID
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> archiveContractPreInfo(String registerId){
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setRegisterId(registerId);
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),
daprArchivesProperties.getAppId(),
"/temployeecontractpre/inner/archiveContractByRegisterId",
paramVo,
Boolean.class,
SecurityConstants.FROM_IN
);
if (Common.isEmpty(res)){
return R.failed("归档合同待签订信息失败!");
}
return res;
}
}
......@@ -264,4 +264,28 @@ public class InsuranceDaprUtil {
return res;
}
/**
* @Description: 归档商险待购买信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
* @param registerId 入职待建档ID
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> archiveInsurancePreInfo(String registerId){
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setRegisterId(registerId);
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprInsurancesProperties.getAppUrl(),
daprInsurancesProperties.getAppId(),
"/temployeeinsurancepre/inner/archiveInsuranceByRegisterId",
paramVo,
Boolean.class,
SecurityConstants.FROM_IN
);
if (Common.isEmpty(res)){
return R.failed("归档商险待购买信息失败!");
}
return res;
}
}
......@@ -502,4 +502,28 @@ public class SocialDaprUtils {
}
return res;
}
/**
* @Description: 归档社保/公积金待派单信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
* @param registerId 入职待建档ID
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> archiveSocialFundPreInfo(String registerId) {
BaseSearchVO paramVo = new BaseSearchVO();
paramVo.setRegisterId(registerId);
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprProperties.getAppUrl(),
daprProperties.getAppId(),
"/tdispatchinfopre/inner/archiveSocialFundPreInfo",
paramVo,
Boolean.class,
SecurityConstants.FROM_IN
);
if (Common.isEmpty(res)){
return R.failed("归档社保/公积金待派单信息失败!");
}
return res;
}
}
......@@ -50,6 +50,9 @@ public interface EmployeeRegistrationMapper extends BaseMapper<EmployeeRegistrat
List<EmployeeRegistration> selectRegistrationListBySure(@Param("idList") List<String> idList);
// emp_idcard里存的是key,身份证加项目编码
List<EmployeeRegistration> getHistoryId(@Param("cardDeptList") List<String> cardDeptList, @Param("curIdList") List<String> curIdList);
// 查询是否有处理中的离职信息,如果有,不允许再次登记入离职
int getEmployeeRegistrationLeavingCount(@Param("idCard") String idCard, @Param("deptNo") String deptNo);
......
......@@ -898,6 +898,23 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
user.getNickname(), null);
try {
List<String> cardDeptList = new ArrayList<>();
List<String> curIdList = new ArrayList<>();
String cardDeptKey = registration.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + registration.getDeptNo();
cardDeptList.add(cardDeptKey);
curIdList.add(registration.getId());
// 上一次入职信息,用于存储历史数据
Map<String, String> historyIdMap = new HashMap<>();
getHistoryIdMap(cardDeptList, curIdList, historyIdMap);
String historyId = historyIdMap.get(cardDeptKey);
if (Common.isNotNull(historyId)) {
// 历史数据归档
archivesDaprUtil.archiveRegisterPreInfo(historyId);
archivesDaprUtil.archiveContractPreInfo(historyId);
insuranceDaprUtil.archiveInsurancePreInfo(historyId);
socialDaprUtils.archiveSocialFundPreInfo(historyId);
}
//生成档案待建档数据
initRegistPreInfo(registration, preVo, user, CommonConstants.ZERO_STRING);
R<String> domainR = archivesDaprUtil.saveRegistPreInfo(preVo);
......@@ -1515,7 +1532,22 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
TEmployeeAutoRegistCheckVo exitCheckVo;
R<SysBaseSetInfoVo> resR;
SysBaseSetInfoVo setInfo;
// 查找历史的入职,如果有,存历史的入职确认信息等
List<String> cardDeptList = new ArrayList<>();
List<String> curIdList = new ArrayList<>();
for (EmployeeRegistration registration:registrationList) {
cardDeptList.add(registration.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + registration.getDeptNo());
curIdList.add(registration.getId());
}
// 上一次入职信息,用于存储历史数据
Map<String, String> historyIdMap = new HashMap<>();
getHistoryIdMap(cardDeptList, curIdList, historyIdMap);
String cardDeptKey;
String historyId;
for (EmployeeRegistration registration:registrationList) {
cardDeptKey = registration.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + registration.getDeptNo();
exitCheckVo = new TEmployeeAutoRegistCheckVo();
exitCheckVo.setEmployeeName(registration.getEmployeeName());
exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
......@@ -1708,6 +1740,14 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
user.getNickname(), null);
try {
historyId = historyIdMap.get(cardDeptKey);
if (Common.isNotNull(historyId)) {
// 历史数据归档
archivesDaprUtil.archiveRegisterPreInfo(historyId);
archivesDaprUtil.archiveContractPreInfo(historyId);
insuranceDaprUtil.archiveInsurancePreInfo(historyId);
socialDaprUtils.archiveSocialFundPreInfo(historyId);
}
//生成档案待建档数据
initRegistPreInfo(registration, preVo, user, CommonConstants.ZERO_STRING);
R<String> domainR = archivesDaprUtil.saveRegistPreInfo(preVo);
......@@ -1761,6 +1801,17 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return R.ok();
}
// 获取上一次的入职id,用于存储历史
private void getHistoryIdMap(List<String> cardDeptList, List<String> curIdList, Map<String, String> historyIdMap) {
List<EmployeeRegistration> historyIdList = baseMapper.getHistoryId(cardDeptList, curIdList);
if (historyIdList != null && !historyIdList.isEmpty()) {
// emp_idcard里存的是key,身份证加项目编码
for (EmployeeRegistration er : historyIdList) {
historyIdMap.put(er.getEmpIdcard(), er.getId());
}
}
}
@Override
public R registAdd(EmployeeRegistration registration) {
//提交校验内容:
......
......@@ -428,6 +428,23 @@
</select>
<!-- 取上一次入职的1条 -->
<select id="getHistoryId" resultMap="employeeRegistrationMap">
SELECT
concat(a.emp_idcard,'_',a.dept_no) emp_idcard,SUBSTRING_INDEX(GROUP_CONCAT(a.id ORDER BY a.CREATE_TIME desc),',',1) as id
FROM employee_registration a
where a.feedback_type = '1' and concat(a.emp_idcard,'_',a.dept_no) in
<foreach item="cardStr" index="index" collection="cardDeptList" open="(" separator="," close=")">
#{cardStr}
</foreach>
AND a.id not in
<foreach item="idStr" index="index" collection="curIdList" open="(" separator="," close=")">
#{idStr}
</foreach>
group by a.emp_idcard,a.dept_no
</select>
<!--查询是否有处理中的离职信息,如果有,不允许再次登记入离职-->
<select id="getEmployeeRegistrationLeavingCount" resultType="java.lang.Integer">
SELECT
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 商险待购买历史表
*
* @Author: hgw-trae
* @Date: 2026/5/12
*/
@Data
@TableName("t_employee_insurance_pre_old_history")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "商险待购买历史表")
public class TEmployeeInsurancePreOldHistory extends TEmployeeInsurancePre {
@Schema(description = "归档时间")
private LocalDateTime historyTime;
}
......@@ -404,4 +404,15 @@ public class TEmployeeInsurancePreController {
return tEmployeeInsurancePreService.judgeHaveProcessingInsurance(paramVo);
}
/**
* @Description: 归档商险待购买信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
**/
@Inner
@PostMapping("/inner/archiveInsuranceByRegisterId")
public Boolean archiveInsuranceByRegisterId(@RequestBody BaseSearchVO paramVo) {
return tEmployeeInsurancePreService.archiveInsuranceByRegisterId(paramVo.getRegisterId());
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePreOldHistory;
import org.apache.ibatis.annotations.Mapper;
/**
* 商险待购买历史表
*
* @Author: hgw-trae
* @Date: 2026/5/12
*/
@Mapper
public interface TEmployeeInsurancePreOldHistoryMapper extends BaseMapper<TEmployeeInsurancePreOldHistory> {
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePreOldHistory;
/**
* 商险待购买历史表
*
* @Author: hgw-trae
* @Date: 2026/5/12
*/
public interface TEmployeeInsurancePreOldHistoryService extends IService<TEmployeeInsurancePreOldHistory> {
}
......@@ -142,4 +142,13 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
boolean judgeHaveProcessingInsurance(BaseSearchVO paramVo);
/**
* @Description: 归档商险待购买信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
* @param registerId 入职待建档ID
* @return: java.lang.Boolean
**/
Boolean archiveInsuranceByRegisterId(String registerId);
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePreOldHistory;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TEmployeeInsurancePreOldHistoryMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TEmployeeInsurancePreOldHistoryService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* 商险待购买历史表
*
* @Author: hgw-trae
* @Date: 2026/5/12
*/
@Service
@RequiredArgsConstructor
public class TEmployeeInsurancePreOldHistoryServiceImpl extends ServiceImpl<TEmployeeInsurancePreOldHistoryMapper, TEmployeeInsurancePreOldHistory> implements TEmployeeInsurancePreOldHistoryService {
}
......@@ -89,6 +89,9 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
@Autowired
private TInsurancePreRenewDetailService tInsurancePreRenewDetailService;
@Autowired
private TEmployeeInsurancePreOldHistoryService tEmployeeInsurancePreOldHistoryService;
/**
* 商险待办任务表简单分页查询
*
......@@ -1121,4 +1124,22 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return false;
}
}
@Override
public Boolean archiveInsuranceByRegisterId(String registerId) {
if (Common.isNotNull(registerId)) {
List<TEmployeeInsurancePre> insurancePreList = baseMapper.selectList(Wrappers.<TEmployeeInsurancePre>query().lambda()
.eq(TEmployeeInsurancePre::getRegisterId, registerId));
if (insurancePreList != null && !insurancePreList.isEmpty()) {
for (TEmployeeInsurancePre pre : insurancePreList) {
TEmployeeInsurancePreOldHistory history = new TEmployeeInsurancePreOldHistory();
BeanUtils.copyProperties(pre, history);
history.setHistoryTime(LocalDateTime.now());
tEmployeeInsurancePreOldHistoryService.saveOrUpdate(history);
baseMapper.deleteById(pre.getId());
}
}
}
return true;
}
}
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 社保/公积金待派单历史表
*
* @Author: hgw-trae
* @Date: 2026/5/12
*/
@Data
@TableName("t_dispatch_info_pre_old_history")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "社保/公积金待派单历史表")
public class TDispatchInfoPreOldHistory extends TDispatchInfoPre {
@Schema(description = "归档时间")
private LocalDateTime historyTime;
}
......@@ -536,4 +536,15 @@ public class TDispatchInfoPreController {
return tDispatchInfoPreService.judgeHaveProcessingSocialOrFund(paramVo);
}
/**
* @Description: 归档社保/公积金待派单信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
**/
@Inner
@PostMapping("/inner/archiveSocialFundPreInfo")
public Boolean archiveSocialFundPreInfo(@RequestBody BaseSearchVO paramVo) {
return tDispatchInfoPreService.archiveSocialFundPreInfo(paramVo.getRegisterId());
}
}
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPreOldHistory;
import org.apache.ibatis.annotations.Mapper;
/**
* 社保/公积金待派单历史表
*
* @Author: hgw-trae
* @Date: 2026/5/12
*/
@Mapper
public interface TDispatchInfoPreOldHistoryMapper extends BaseMapper<TDispatchInfoPreOldHistory> {
}
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPreOldHistory;
/**
* 社保/公积金待派单历史表
*
* @Author: hgw-trae
* @Date: 2026/5/12
*/
public interface TDispatchInfoPreOldHistoryService extends IService<TDispatchInfoPreOldHistory> {
}
......@@ -117,4 +117,14 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
Boolean updateLeaveFundPreInfo(String id);
boolean judgeHaveProcessingSocialOrFund(BaseSearchVO paramVo);
/**
* @Description: 归档社保/公积金待派单信息到历史表
* @Author: hgw-trae
* @Date: 2026/5/12
* @param registerId 入职待建档ID
* @return: java.lang.Boolean
**/
Boolean archiveSocialFundPreInfo(String registerId);
}
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPreOldHistory;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchInfoPreOldHistoryMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoPreOldHistoryService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* 社保/公积金待派单历史表
*
* @Author: hgw-trae
* @Date: 2026/5/12
*/
@Service
@RequiredArgsConstructor
public class TDispatchInfoPreOldHistoryServiceImpl extends ServiceImpl<TDispatchInfoPreOldHistoryMapper, TDispatchInfoPreOldHistory> implements TDispatchInfoPreOldHistoryService {
}
......@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.config.WxConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPreOldHistory;
import com.yifu.cloud.plus.v1.yifu.social.entity.TFundPreDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialAutoLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialPreDetail;
......@@ -81,6 +82,9 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
@Autowired
private final THouseHoldLimitService houseHoldLimitService;
@Autowired
private TDispatchInfoPreOldHistoryService tDispatchInfoPreOldHistoryService;
/**
* 社保待购买表简单分页查询
* @param tDispatchInfoPre 社保待购买表
......@@ -1140,4 +1144,23 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
}
}
@Override
public Boolean archiveSocialFundPreInfo(String registerId) {
if (Common.isNotNull(registerId)) {
List<TDispatchInfoPre> dispatchInfoPreList = baseMapper.selectList(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getRegisterId, registerId));
if (dispatchInfoPreList != null && !dispatchInfoPreList.isEmpty()) {
TDispatchInfoPreOldHistory history;
for (TDispatchInfoPre pre : dispatchInfoPreList) {
history = new TDispatchInfoPreOldHistory();
BeanUtils.copyProperties(pre, history);
history.setHistoryTime(LocalDateTime.now());
tDispatchInfoPreOldHistoryService.saveOrUpdate(history);
baseMapper.deleteById(pre.getId());
}
}
}
return true;
}
}
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