From d63702891d051378298628ba261badf4b1387ea9 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 6 Feb 2025 13:51:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E6=A0=B8=E7=AE=97=E4=BA=BA=E6=95=B0=E5=A4=A7?= =?UTF-8?q?=E4=BA=8E1000=E6=97=B6sqlbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/SIAccountServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 18d48fccd..fbf15b7f4 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -5076,8 +5076,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List employeeList = new ArrayList<>(); if (!isFirstFlag) { // 不是首次核算,需要把社保历史数据取出 - historyDetailData.addAll(getInsuranceAccountDetailMapper().list(InsuranceAccountDetailParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization.toString()).employeeIds(ids).build())); - historyDetailData.addAll(getInsuranceAccountDetailMapper().extList(InsuranceAccountDetailParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization.toString()).employeeIds(ids).build())); + List> partition = Lists.partition(ids, 100); + partition.forEach(part -> { + historyDetailData.addAll(getInsuranceAccountDetailMapper().list(InsuranceAccountDetailParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization.toString()).employeeIds(part).build())); + historyDetailData.addAll(getInsuranceAccountDetailMapper().extList(InsuranceAccountDetailParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization.toString()).employeeIds(part).build())); + }); } else { employeeList = getSalaryEmployeeService(user).listByIds(ids); }