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