webcad拆单更新自定义版编号feign请求置于事务最后

This commit is contained in:
gaoqr
2025-05-19 17:25:14 +08:00
parent 164a0a1857
commit 5e736bd1c6
2 changed files with 6 additions and 4 deletions
@@ -288,6 +288,9 @@ public class WebCadOrderImportAsyncFactory {
// 更新导入任务为成功
updateTaskSuccess(taskId);
// 所有自定义板编号生成完成后更新配置到生产单
customPlateNoGenerateService.updateCustomPlateNoGenerateConfig(plateNoGenerateConfigVO, orderDO);
} catch (Exception e) {
if (esInsert) {
CompletableFuture.runAsync(() -> {
@@ -583,8 +586,6 @@ public class WebCadOrderImportAsyncFactory {
}
reader.endArray();
orderPlateBatchInsertWithinThreshold(plateDOS, true);
// 所有自定义板编号生成完成后更新配置到生产单
customPlateNoGenerateService.updateCustomPlateNoGenerateConfig(plateNoGenerateConfigVO, orderDO);
// 批量插入造型数据
orderModelsBatchInsertWithinThreshold(true);
}
@@ -245,6 +245,9 @@ public class WebCadOrderImportFactory {
saveData();
log.debug("====================【cad拆单全局保存结束】====================");
// 所有自定义板编号生成完成后更新配置到生产单
customPlateNoGenerateService.updateCustomPlateNoGenerateConfig(plateNoGenerateConfigVO, orderDO);
if (plateNumReachThreshold) {
log.warn(ServiceExceptionUtil.exception(WEBCAD_ORDER_IMPORT_ORDER_PLATENUM_REACH_THRESHOLD_ERROR, orderId, cadImportPlateNumThreshold).getMessage());
}
@@ -510,8 +513,6 @@ public class WebCadOrderImportFactory {
}
}
orderPlateBatchInsertWithinThreshold(plateDOS, true);
// 所有自定义板编号生成完成后更新配置到生产单
customPlateNoGenerateService.updateCustomPlateNoGenerateConfig(plateNoGenerateConfigVO, orderDO);
// 批量插入造型数据
orderModelsBatchInsertWithinThreshold(true);
}