diff --git a/src/main/java/com/wms/service/business/serviceImplements/WorkServiceImplements.java b/src/main/java/com/wms/service/business/serviceImplements/WorkServiceImplements.java index 240cc1a..3152a41 100644 --- a/src/main/java/com/wms/service/business/serviceImplements/WorkServiceImplements.java +++ b/src/main/java/com/wms/service/business/serviceImplements/WorkServiceImplements.java @@ -782,9 +782,6 @@ public class WorkServiceImplements implements IWorkService { if (workFlowList.isEmpty()) { return "没有已完成的工作流可以确认"; } - // 保存,防止标签未打印 - workFlowLastService.remove(new LambdaQueryWrapper().eq(WorkFlowLast::getWorkStation, workStation)); - workFlowLastService.saveBatch(BeanUtil.copyToList(workFlowList, WorkFlowLast.class)); // workSummary列表 List workSummaryList = new ArrayList<>(); List needUpdateKateOrdersList = new ArrayList<>(); @@ -852,11 +849,15 @@ public class WorkServiceImplements implements IWorkService { } boolean doTransResult = dbTransUtils.useTran(() -> { + // 保存,防止标签未打印 + workFlowLastService.remove(new LambdaQueryWrapper().eq(WorkFlowLast::getWorkStation, workStation)); + workFlowLastService.saveOrUpdateBatch(BeanUtil.copyToList(workFlowList, WorkFlowLast.class)); + // 保存总结 workSummaryService.saveOrUpdateBatch(workSummaryList); // 先清空之前的 eLocationConfigLastService.remove(new LambdaQueryWrapper() .eq(ELocationConfigLast::getWorkStation, workStation)); - eLocationConfigLastService.saveBatch(eLocationConfigLastList); + eLocationConfigLastService.saveOrUpdateBatch(eLocationConfigLastList); // 删除所有的标签配置 eLocationConfigService.remove(new LambdaQueryWrapper() .eq(ELocationConfig::getWorkStation, workStation));