From fbde0b947b4641081b558302ea77d88c902c4cd1 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 30 四月 2025 10:03:24 +0800
Subject: [PATCH] 可靠性计划优化检验项
---
basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardProductListServiceImpl.java | 63 +++++++++++++++++++++++++------
1 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardProductListServiceImpl.java b/basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardProductListServiceImpl.java
index 220bce6..7603c55 100644
--- a/basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardProductListServiceImpl.java
+++ b/basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardProductListServiceImpl.java
@@ -133,18 +133,54 @@
if (Objects.equals(a.getBsm(), "1")) {
return true;
} else {
- if (sections.get(i).contains("&")) {
- String[] split = sections.get(i).split("&");
- isIf = getIsIf(split[0], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample)
- && getIsIf(split[1], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample);
- } else {
- isIf = getIsIf(sections.get(i), modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample);
+ int firstIndex = a.getTree().indexOf(" - ");
+ String result2 = null;
+ if (firstIndex != -1) {
+ int secondIndex = a.getTree().indexOf(" - ", firstIndex + 3);
+ if (secondIndex != -1) {
+ int thirdIndex = a.getTree().indexOf(" - ", secondIndex + 3);
+ if (thirdIndex != -1) {
+ result2 = a.getTree().substring(secondIndex + 3, thirdIndex);
+ }
+ }
}
- if (isIf) {
- a.setSection(sections.get(i));
- a.setAsk(asks.get(i));
- a.setTell(tells.get(i));
- return true;
+ // 鍒ゆ柇 鍘熻緟鏉� 鍖呮潗
+ Set<String> targetStrings = new HashSet<>();
+ targetStrings.add("鍘熻緟鏉�");
+ targetStrings.add("鍖呮潗");
+ boolean isType;
+ isType = targetStrings.contains(result2);
+ if (isType) {
+ if (StringUtils.isNotEmpty(modelNum)){
+ String currentSection = sections.get(i);
+ String sectionValue = currentSection;
+ int equalIndex = currentSection.indexOf("=");
+ if (equalIndex != -1) {
+ sectionValue = currentSection.substring(equalIndex + 1);
+ }
+ if (modelNum.equals(sectionValue)) {
+ a.setSection(sections.get(i));
+ a.setAsk(asks.get(i));
+ a.setTell(tells.get(i));
+ return true;
+ }
+ }else {
+ return false;
+ }
+ } else {
+ if (sections.get(i).contains("&")) {
+ String[] split = sections.get(i).split("&");
+ isIf = getIsIf(split[0], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample)
+ && getIsIf(split[1], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample);
+ } else {
+ isIf = getIsIf(sections.get(i), modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample);
+ }
+ if (isIf) {
+ a.setSection(sections.get(i));
+ a.setAsk(asks.get(i));
+ a.setTell(tells.get(i));
+ return true;
+ }
}
}
}
@@ -213,7 +249,7 @@
if (StringUtils.isNotEmpty(productPart.getInspectionItem())) {
String inspectionItem = productPart.getInspectionItem();
list = list.stream()
- .filter(standardProductList -> inspectionItem.equals(standardProductList.getInspectionItem()))
+ .filter(standardProductList -> inspectionItem.contains(standardProductList.getInspectionItem()))
.collect(Collectors.toList());
}
}
@@ -399,8 +435,9 @@
// 濡傛灉鏈粦瀹�
if (!existFlag) {
BeanUtils.copyProperties(structureItemParameter, addStandProductList);
+ addStandProductList.setTell(structureItemParameter.getAskTell());
addStandProductList.setStructureItemParameterId(structureItemParameter.getId());
-
+ addStandProductList.setManHour(Objects.toString(structureItemParameter.getManHour(), ""));
}
addStandProductList.setId(addStandProductList.getId() != null ? addStandProductList.getId() : IdWorker.getId());
batchInsertStandardProductListArray.add(addStandProductList);
--
Gitblit v1.9.3