fix: 为员工调动导入的数据库重复错误信息添加行号

在员工调动导入功能中,当检测到数据库中已存在相同的调动记录时,
错误信息现在会包含行号,便于用户快速定位问题数据。

修改文件:
- CcdiStaffTransferImportServiceImpl.java

修改内容:
- 将 "该员工在%s的调动记录已存在"
- 改为 "第%d行: 该员工在%s的调动记录已存在"

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
wkc
2026-02-11 15:40:35 +08:00
parent fd9e208fa3
commit b314c75574

View File

@@ -100,7 +100,8 @@ public class CcdiStaffTransferImportServiceImpl implements ICcdiStaffTransferImp
if (existingKeys.contains(uniqueKey)) { if (existingKeys.contains(uniqueKey)) {
// 数据库中已存在 // 数据库中已存在
throw new RuntimeException(String.format( throw new RuntimeException(String.format(
"该员工在%s的调动记录已存在从%s调往%s", "第%d行: 该员工在%s的调动记录已存在从%s调往%s",
i + 1,
addDTO.getTransferDate(), addDTO.getTransferDate(),
addDTO.getDeptNameBefore(), addDTO.getDeptNameBefore(),
addDTO.getDeptNameAfter() addDTO.getDeptNameAfter()