From 9004d51f5b6096827b5c66b444729cb554997ec4 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 26 九月 2025 14:32:30 +0800
Subject: [PATCH] 原材料订单拆分功能调整v2
---
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java | 41 +++++++++++++++++++++--------------------
1 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
index 3778b0c..1a7ce8c 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
@@ -49,6 +49,7 @@
import org.springframework.core.io.ClassPathResource;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
@@ -796,7 +797,7 @@
@Override
- @Transactional(rollbackFor = Exception.class)
+ @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED)
public void isRawMaterial(InsOrder insOrder,Boolean registerInsResults,Boolean hasExemption) {
IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>()
.eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
@@ -822,9 +823,9 @@
if(Objects.isNull(vo.getInsOrderId())){
rawMaterialOrderService.rawOrderRelease(vo.getId(), vo.getPartDesc());
}else if(Objects.equals(vo.getInsOrderId(),insOrder.getId())){
- toLocation = insOrderService.moveRawMaterial(one);
+ toLocation = insOrderService.moveRawMaterial(vo);
}else if(Objects.nonNull(vo.getInsResult()) && 1 == vo.getInsResult()){
- toLocation = insOrderService.moveRawMaterial(one);
+ toLocation = insOrderService.moveRawMaterial(vo);
}
}
}else{
@@ -855,23 +856,23 @@
.eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
}
-// threadPoolTaskExecutor.execute(() -> {
-// // 浼佷笟寰俊閫氱煡
-// String message = "";
-// message += "妫�娴嬬粨鏋滄彁浜ら�氱煡";
-// message += "\n鎵规鍙�: " + one.getUpdateBatchNo();
-// message += "\n闆朵欢鍙�: " + one.getPartNo();
-// message += "\n闆朵欢鎻忚堪: " + one.getPartDesc();
-// message += "\n渚涘簲鍟嗗悕绉�: " + one.getSupplierName();
-// message += "\n鎶佃揪鏁伴噺: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas();
-// // 鍙戦�佷紒涓歩nspectStatus淇¢�氱煡
-// if (inspectStatus == 1) {
-// message += "\n妫�娴嬬粨鏋�: 鍚堟牸";
-// } else {
-// message += "\n妫�娴嬬粨鏋�: 涓嶅悎鏍�";
-// }
-// WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
-// });
+ threadPoolTaskExecutor.execute(() -> {
+ // 浼佷笟寰俊閫氱煡
+ String message = "";
+ message += "妫�娴嬬粨鏋滄彁浜ら�氱煡";
+ message += "\n鎵规鍙�: " + one.getUpdateBatchNo();
+ message += "\n闆朵欢鍙�: " + one.getPartNo();
+ message += "\n闆朵欢鎻忚堪: " + one.getPartDesc();
+ message += "\n渚涘簲鍟嗗悕绉�: " + one.getSupplierName();
+ message += "\n鎶佃揪鏁伴噺: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas();
+ // 鍙戦�佷紒涓歩nspectStatus淇¢�氱煡
+ if (inspectStatus == 1) {
+ message += "\n妫�娴嬬粨鏋�: 鍚堟牸";
+ } else {
+ message += "\n妫�娴嬬粨鏋�: 涓嶅悎鏍�";
+ }
+ WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
+ });
}
--
Gitblit v1.9.3