From e9bf5a0070b5fbdf9afd4475adbf51e46f579040 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 17 四月 2025 17:20:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_ztzb' into dev_ztzb
---
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
index 64e4d1a..dba348e 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
@@ -654,7 +654,7 @@
ifsInventoryQuantity.setIsSource(1);
ifsInventoryQuantity.setState(0);
- IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>()
+ Long count = ifsInventoryQuantityMapper.selectCount(new LambdaQueryWrapper<IfsInventoryQuantity>()
.eq(IfsInventoryQuantity::getOrderNo, ifsInventoryQuantity.getOrderNo())
.eq(IfsInventoryQuantity::getLineNo, ifsInventoryQuantity.getLineNo())
.eq(IfsInventoryQuantity::getReleaseNo, ifsInventoryQuantity.getReleaseNo())
@@ -666,8 +666,7 @@
.eq(IfsInventoryQuantity::getWaivDevRejNo, ifsInventoryQuantity.getWaivDevRejNo())
.eq(IfsInventoryQuantity::getActivitySeq, ifsInventoryQuantity.getActivitySeq())
);
- if(Objects.isNull(one)) {
-
+ if(count == 0) {
ifsInventoryQuantity.setIsFirst(0);
// 鏌ヨ浜т笟閾炬娴嬫暟鎹�
String industryChainAttrFields = IndustryChainUtils.getIndustryChainAttrFields(ifsInventoryQuantity.getOrderNo(),
@@ -968,6 +967,7 @@
product.setCreateUser(null);
product.setUpdateTime(null);
product.setUpdateUser(null);
+ product.setSection(null);
product.setInsSampleId(omitOrderProductDto.getInsSampleId());
if (StringUtils.isBlank(product.getCableTag())) {
product.setCableTag(null);
@@ -1034,6 +1034,24 @@
}
}
+ /**
+ * 淇敼鏍峰搧鍨嬪彿
+ * @param insSample
+ */
+ @Override
+ public void updateSampleModel(InsSample insSample) {
+ // 鍒ゆ柇褰撳墠璁㈠崟鏄惁鐢熸垚浜嗘姤鍛�, 鐢熸垚浜嗘姤鍛婁笉鑳戒慨鏀瑰崟鍙�
+ Long count = insReportMapper.selectCount(Wrappers.<InsReport>lambdaQuery()
+ .eq(InsReport::getInsOrderId, insSample.getInsOrderId()));
+ if (count > 0 ) {
+ throw new ErrorException("褰撳墠璁㈠崟宸茬粡鐢熸垚浜嗘姤鍛婁笉鑳戒慨鏀圭紪鍙�");
+ }
+
+ insSampleService.update(Wrappers.<InsSample>lambdaUpdate()
+ .eq(InsSample::getId, insSample.getId())
+ .set(InsSample::getModel, insSample.getModel()));
+ }
+
}
--
Gitblit v1.9.3