From 0fee7e6f6f34cd5b55a55896a2f71a7686be372f Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 8 May 2025 15:08:43 +0800 Subject: [PATCH] =?UTF-8?q?2025-05-08=20=E5=90=8C=E6=AD=A5=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=AD=89=E7=BA=A7=E6=8E=A5=E5=8F=A3=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BA=BA=E5=91=98=E7=AD=89=E7=BA=A7=E5=92=8C?= =?UTF-8?q?=E6=88=90=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/RoutingManagementServiceImpl.java | 36 +++++++++---------- .../modules/part/task/PartRelatedTask.java | 13 ++++--- src/main/resources/application-dev.yml | 7 ++-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/spring/modules/part/service/impl/RoutingManagementServiceImpl.java b/src/main/java/com/spring/modules/part/service/impl/RoutingManagementServiceImpl.java index 25e7dbcd..6ad75581 100644 --- a/src/main/java/com/spring/modules/part/service/impl/RoutingManagementServiceImpl.java +++ b/src/main/java/com/spring/modules/part/service/impl/RoutingManagementServiceImpl.java @@ -1341,7 +1341,6 @@ public class RoutingManagementServiceImpl extends ServiceImpl commonKeys = new HashSet<>(mapListAll.keySet()); - commonKeys.retainAll(mapList1.keySet()); - List toUpdate = commonKeys.stream() - .filter(key -> !mapListAll.get(key).getIfsRowVersion().equals(mapList1.get(key).getIfsRowVersion())) - .map(key -> mapListAll.get(key)) // 选择listAll中的版本进行更新 - .collect(Collectors.toList()); +// Set commonKeys = new HashSet<>(mapListAll.keySet()); +// commonKeys.retainAll(mapList1.keySet()); +// List toUpdate = commonKeys.stream() +// .filter(key -> !mapListAll.get(key).getIfsRowVersion().equals(mapList1.get(key).getIfsRowVersion())) +// .map(key -> mapListAll.get(key)) // 选择listAll中的版本进行更新 +// .collect(Collectors.toList()); // // 删除 // if (!toDelete.isEmpty()) { @@ -1405,23 +1404,22 @@ public class RoutingManagementServiceImpl extends ServiceImpl subList = toUpdate.subList(i, end); - routingManagementMapper.syncUpdateLocation(subList); - } - } +// // 修改 +// if (!toUpdate.isEmpty()) { +// // 分批修改 +// int batchSize = 100; // 假设每批100条记录 +// for (int i = 0; i < toUpdate.size(); i += batchSize) { +// int end = Math.min(i + batchSize, toUpdate.size()); +// List subList = toUpdate.subList(i, end); +// routingManagementMapper.syncUpdateLocation(subList); +// } +// } } /** * 同步人员等级到PLM */ @Override - @Transactional public void syncLaborClassToPLM(PersonnelLevelVo data) { // 查出最大的 rowVersion String rowVersion = routingManagementMapper.getMaxLaborClassRowVersion(); @@ -1501,7 +1499,6 @@ public class RoutingManagementServiceImpl extends ServiceImpl