1. 修复完成工作发生的主键冲突
This commit is contained in:
parent
55dc9f1685
commit
0c82ebffc3
|
|
@ -782,9 +782,6 @@ public class WorkServiceImplements implements IWorkService {
|
||||||
if (workFlowList.isEmpty()) {
|
if (workFlowList.isEmpty()) {
|
||||||
return "没有已完成的工作流可以确认";
|
return "没有已完成的工作流可以确认";
|
||||||
}
|
}
|
||||||
// 保存,防止标签未打印
|
|
||||||
workFlowLastService.remove(new LambdaQueryWrapper<WorkFlowLast>().eq(WorkFlowLast::getWorkStation, workStation));
|
|
||||||
workFlowLastService.saveBatch(BeanUtil.copyToList(workFlowList, WorkFlowLast.class));
|
|
||||||
// workSummary列表
|
// workSummary列表
|
||||||
List<WorkSummary> workSummaryList = new ArrayList<>();
|
List<WorkSummary> workSummaryList = new ArrayList<>();
|
||||||
List<KateOrders> needUpdateKateOrdersList = new ArrayList<>();
|
List<KateOrders> needUpdateKateOrdersList = new ArrayList<>();
|
||||||
|
|
@ -852,11 +849,15 @@ public class WorkServiceImplements implements IWorkService {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean doTransResult = dbTransUtils.useTran(() -> {
|
boolean doTransResult = dbTransUtils.useTran(() -> {
|
||||||
|
// 保存,防止标签未打印
|
||||||
|
workFlowLastService.remove(new LambdaQueryWrapper<WorkFlowLast>().eq(WorkFlowLast::getWorkStation, workStation));
|
||||||
|
workFlowLastService.saveOrUpdateBatch(BeanUtil.copyToList(workFlowList, WorkFlowLast.class));
|
||||||
|
// 保存总结
|
||||||
workSummaryService.saveOrUpdateBatch(workSummaryList);
|
workSummaryService.saveOrUpdateBatch(workSummaryList);
|
||||||
// 先清空之前的
|
// 先清空之前的
|
||||||
eLocationConfigLastService.remove(new LambdaQueryWrapper<ELocationConfigLast>()
|
eLocationConfigLastService.remove(new LambdaQueryWrapper<ELocationConfigLast>()
|
||||||
.eq(ELocationConfigLast::getWorkStation, workStation));
|
.eq(ELocationConfigLast::getWorkStation, workStation));
|
||||||
eLocationConfigLastService.saveBatch(eLocationConfigLastList);
|
eLocationConfigLastService.saveOrUpdateBatch(eLocationConfigLastList);
|
||||||
// 删除所有的标签配置
|
// 删除所有的标签配置
|
||||||
eLocationConfigService.remove(new LambdaQueryWrapper<ELocationConfig>()
|
eLocationConfigService.remove(new LambdaQueryWrapper<ELocationConfig>()
|
||||||
.eq(ELocationConfig::getWorkStation, workStation));
|
.eq(ELocationConfig::getWorkStation, workStation));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user