From fa4087e57416c52c0cb9b70325c3023001369a2e Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期二, 28 十月 2025 09:16:14 +0800
Subject: [PATCH] yys 修改word模板
---
basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardTreeServiceImpl.java | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardTreeServiceImpl.java b/basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardTreeServiceImpl.java
index f6661dc..5c7f324 100644
--- a/basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardTreeServiceImpl.java
+++ b/basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardTreeServiceImpl.java
@@ -21,6 +21,7 @@
import com.ruoyi.basic.service.StructureTestObjectService;
import com.ruoyi.common.exception.base.BaseException;
import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -35,6 +36,7 @@
*/
@Service
@AllArgsConstructor
+@Slf4j
public class StandardTreeServiceImpl extends ServiceImpl<StandardTreeMapper, StandardTree>
implements StandardTreeService {
@@ -51,6 +53,7 @@
@Override
public List<FactoryDto> selectStandardTreeList() {
List<FactoryDto> factoryDtos = standardTreeMapper.selectStandardTreeList();
+ log.info("FactoryDtoOne:{}", factoryDtos);
for (FactoryDto factoryDto : factoryDtos) {
for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) {
laboratoryDto.getChildren().sort((o1, o2) -> (o1.getSort() == null ? 0 : o1.getSort())
@@ -62,6 +65,7 @@
}
}
}
+ log.info("FactoryDtoTwo:{}", factoryDtos);
return factoryDtos;
}
@@ -156,10 +160,18 @@
// 淇敼鍚嶇О鍖归厤鐨勬爣鍑嗘爲涓嬬殑妫�楠岄」鐩�
// 鏌ヨ鎵�鏈夊璞�+鍚嶇О鐨勬爲
- List<StandardProductList> standardProductLists = standardProductListService.list(Wrappers.<StandardProductList>lambdaUpdate()
- .eq(StandardProductList::getSample, standardTree.getSample())
+ LambdaUpdateWrapper<StandardProductList> updateWrapper = Wrappers.<StandardProductList>lambdaUpdate()
+ .eq(StandardProductList::getFactory, standardTree.getFactory())
+ .eq(StandardProductList::getLaboratory, standardTree.getLaboratory())
.eq(StandardProductList::getSampleType, standardTree.getSampleType())
- .eq(StandardProductList::getModel, standardTree.getOldModel()));
+ .eq(StandardProductList::getModel, standardTree.getOldModel());
+ if (StringUtils.isNotBlank(standardTree.getSample()) && !standardTree.getSample().equals("null")) {
+ updateWrapper.eq(StandardProductList::getSample, standardTree.getSample());
+ } else {
+ updateWrapper.isNull(StandardProductList::getSample);
+ }
+
+ List<StandardProductList> standardProductLists = standardProductListService.list(updateWrapper);
if (CollectionUtils.isNotEmpty(standardProductLists)) {
for (StandardProductList standardProductList : standardProductLists) {
// 淇敼鏍峰搧鍚嶇О
@@ -182,8 +194,10 @@
.eq(StandardTree::getSampleType, standardTree.getSampleType())
.eq(StandardTree::getModel, standardTree.getOldModel())
.set(StandardTree::getModel, standardTree.getModel());
- if (StringUtils.isNotBlank(standardTree.getSample())) {
+ if (StringUtils.isNotBlank(standardTree.getSample()) && !standardTree.getSample().equals("null")) {
wrapper.eq(StandardTree::getSample, standardTree.getSample());
+ } else {
+ wrapper.isNull(StandardTree::getSample);
}
return standardTreeMapper.update(null, wrapper);
}
--
Gitblit v1.9.3