From bf57c66fc1cb29c399af2f7749376ded18b6647f Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Wed, 26 Feb 2025 15:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=AE=9A=E8=96=AA?= =?UTF-8?q?=E8=B6=85=E8=BF=871000=E6=97=A5=E5=BF=97=E6=8A=A5=E9=94=99bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalaryArchiveServiceImpl.java | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java index f4fdc079b..65c200b7b 100644 --- a/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java @@ -1099,9 +1099,13 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe return StringUtils.EMPTY; } // 从待定薪到停薪 - getSalaryArchiveMapper().deletePendingTodo(ids); + List> partition = Lists.partition((List) ids, 800); + partition.forEach(getSalaryArchiveMapper()::deletePendingTodo); // 记录日志 - List newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build()); + List newList = new ArrayList<>(); + partition.forEach(part -> { + newList.addAll(getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(part).build())); + }); String operatedesc = SalaryI18nUtil.getI18nLabel(0, "删除待办"); recordLog(oldList, newList, operatedesc); @@ -1131,11 +1135,14 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe } // 从待定薪到定薪 - List> partition = Lists.partition((List) ids, 1000); + List> partition = Lists.partition((List) ids, 800); partition.forEach(getSalaryArchiveMapper()::gotoFixed); // 记录日志 - List newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build()); + List newList = new ArrayList<>(); + partition.forEach(part -> { + newList.addAll(getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(part).build())); + }); String operateDesc = SalaryI18nUtil.getI18nLabel(0, "设为发薪员工"); recordLog(salaryArchiveList, newList, operateDesc); @@ -1201,10 +1208,14 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe } // 从待停薪到停薪 - getSalaryArchiveMapper().gotoStop(ids); + List> partition = Lists.partition((List) ids, 800); + partition.forEach(getSalaryArchiveMapper()::gotoStop); // 记录日志 - List newList = getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(ids).build()); + List newList = new ArrayList<>(); + partition.forEach(part -> { + newList.addAll( getSalaryArchiveMapper().listSome(SalaryArchivePO.builder().ids(part).build())); + }); String operatedesc = SalaryI18nUtil.getI18nLabel(0, "停薪"); recordLog(oldList, newList, operatedesc);