From 9b2837d4b844099f3b7536065ada857b136c1c92 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 11 十二月 2024 15:29:12 +0800
Subject: [PATCH] 电路试验的驻波比csv报告解析2.0(加报告)+撤销项目还需要判断样品下的项目是不是全部都撤销了,如果都撤销了,样品也需要撤销

---
 inspect-server/src/main/java/com/yuanchu/mom/utils/WordUtils.java |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/inspect-server/src/main/java/com/yuanchu/mom/utils/WordUtils.java b/inspect-server/src/main/java/com/yuanchu/mom/utils/WordUtils.java
index dc22aae..8924bde 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/utils/WordUtils.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/utils/WordUtils.java
@@ -155,7 +155,7 @@
                 if (inspectionItemSubclass.contains("鍚屾瀬鍖栭殧绂诲害")) {
                     List<InsProductResult2> result2s = insProductResult2s.stream().filter(insProductResult2 ->
                             insProductMapper.selectById(insProductResult2.getInsProductId())
-                                    .getInspectionItemSubclass().equals("鍚屾瀬鍖栭殧绂诲害")
+                                    .getInspectionItemSubclass().equals("鍚屾瀬鍖栭殧绂诲害") && insProductResult2.getFrequency().equals(s)
                     ).collect(Collectors.toList());
                     int length = result2s.get(0).getPort().split(",").length;
                     aa += (angles + 1) * (length % (ports > 8 ? 4 : (ports + 1) / 2) == 0 ? length / (ports > 8 ? 4 : (ports + 1) / 2) : length / (ports > 8 ? 4 : (ports + 1) / 2) + 1);
@@ -163,7 +163,7 @@
                 if (inspectionItemSubclass.contains("寮傛瀬鍖栭殧绂诲害")) {
                     List<InsProductResult2> result2s = insProductResult2s.stream().filter(insProductResult2 ->
                             insProductMapper.selectById(insProductResult2.getInsProductId())
-                                    .getInspectionItemSubclass().equals("寮傛瀬鍖栭殧绂诲害")
+                                    .getInspectionItemSubclass().equals("寮傛瀬鍖栭殧绂诲害") && insProductResult2.getFrequency().equals(s)
                     ).collect(Collectors.toList());
                     int length = result2s.get(0).getPort().split(",").length;
                     aa += (angles + 1) * (length % (ports > 8 ? 4 : (ports + 1) / 2) == 0 ? length / (ports > 8 ? 4 : (ports + 1) / 2) : length / (ports > 8 ? 4 : (ports + 1) / 2) + 1);
@@ -180,7 +180,7 @@
                 if (inspectionItemSubclass.contains("骞呭害鍋忓樊")) {
                     List<InsProductResult2> result2s = insProductResult2s.stream().filter(insProductResult2 ->
                             insProductMapper.selectById(insProductResult2.getInsProductId())
-                                    .getInspectionItemSubclass().equals("骞呭害鍋忓樊")
+                                    .getInspectionItemSubclass().equals("骞呭害鍋忓樊")&& insProductResult2.getFrequency().equals(s)
                     ).collect(Collectors.toList());
                     int length = result2s.get(0).getPort().split(",").length;
                     aa += (angles + 1) * (length % 8 == 0 ? length / 8 : length / 8 + 1);
@@ -188,7 +188,7 @@
                 if (inspectionItemSubclass.contains("鏈�澶х浉浣嶅亸宸�")) {
                     List<InsProductResult2> result2s = insProductResult2s.stream().filter(insProductResult2 ->
                             insProductMapper.selectById(insProductResult2.getInsProductId())
-                                    .getInspectionItemSubclass().equals("鏈�澶х浉浣嶅亸宸�")
+                                    .getInspectionItemSubclass().equals("鏈�澶х浉浣嶅亸宸�")&& insProductResult2.getFrequency().equals(s)
                     ).collect(Collectors.toList());
                     int length = result2s.get(0).getPort().split(",").length;
                     aa += (angles + 1) * (length % 8 == 0 ? length / 8 : length / 8 + 1);
@@ -963,7 +963,7 @@
                                         }
                                     }
                                 }
-                                if (inspectionItemSubclass.contains("浜掕皟") && i > (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) && i <= ((ee == 0 ? ((dd == 0 ? cc : dd)) : ee) + (angles + 1) * portRow * often)) {
+                            if (inspectionItemSubclass.contains("浜掕皟") && i > (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) && i <= ((ee == 0 ? ((dd == 0 ? cc : dd)) : ee) + (angles + 1) * portRow * often)) {
                                     ff = (int) ((ee == 0 ? ((dd == 0 ? cc : dd)) : ee) + (angles + 1) * portRow * often);
                                     if (itemSet.add("浜掕皟")) {
                                         index.getAndIncrement();
@@ -1060,7 +1060,7 @@
                                         cells.add(cellRenderData);
                                     }
                                 }
-                                if (inspectionItemSubclass.contains("鏈�澶ц�﹀悎搴�") && i > (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) && i <= ((ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) + (angles + 1))) {
+                            if (inspectionItemSubclass.contains("鏈�澶ц�﹀悎搴�") && i > (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) && i <= ((ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) + (angles + 1))) {
                                     gg = ((ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) + (angles + 1));
                                     if (itemSet.add("鏈�澶ц�﹀悎搴�")) {
                                         index.getAndIncrement();
@@ -1153,7 +1153,7 @@
                                         cells.add(cellRenderData);
                                     }
                                 }
-                                if (inspectionItemSubclass.contains("鏈�灏忚�﹀悎搴�") && i > (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) && i <= ((gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) + (angles + 1))) {
+                            if (inspectionItemSubclass.contains("鏈�灏忚�﹀悎搴�") && i > (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) && i <= ((gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) + (angles + 1))) {
                                     hh = (gg == 0 ? (ff == 0 ? (ee == 0 ? ((dd == 0 ? cc : dd)) : ee) : ff) : gg) + (angles + 1);
                                     if (itemSet.add("鏈�灏忚�﹀悎搴�")) {
                                         index.getAndIncrement();
@@ -1246,7 +1246,7 @@
                                         cells.add(cellRenderData);
                                     }
                                 }
-                                if (inspectionItemSubclass.contains("骞呭害鍋忓樊")) {
+                            if (inspectionItemSubclass.contains("骞呭害鍋忓樊")) {
                                     List<InsProduct> products = insProducts.stream().filter(insProduct -> insProduct.getInspectionItemSubclass().equals("骞呭害鍋忓樊")).collect(Collectors.toList());
                                     List<InsProductResult2> result2s = insProductResult2s.stream()
                                             .filter(insProductResult2 -> insProductResult2.getFrequency().equals(s) && insProductResult2.getInsProductId().equals(products.get(0).getId()))
@@ -1352,7 +1352,7 @@
                                         }
                                     }
                                 }
-                                if (inspectionItemSubclass.contains("鏈�澶х浉浣嶅亸宸�")) {
+                            if (inspectionItemSubclass.contains("鏈�澶х浉浣嶅亸宸�")) {
                                     List<InsProduct> products = insProducts.stream().filter(insProduct -> insProduct.getInspectionItemSubclass().equals("鏈�澶х浉浣嶅亸宸�")).collect(Collectors.toList());
                                     List<InsProductResult2> result2s = insProductResult2s.stream()
                                             .filter(insProductResult2 -> insProductResult2.getFrequency().equals(s) && insProductResult2.getInsProductId().equals(products.get(0).getId()))
@@ -2385,7 +2385,7 @@
                     if (inspectionItemSubclass.contains("鍚屾瀬鍖栭殧绂诲害")) {
                         List<InsProductResult2> result2s = insProductResult2s.stream().filter(insProductResult2 ->
                                 insProductMapper.selectById(insProductResult2.getInsProductId())
-                                        .getInspectionItemSubclass().equals("鍚屾瀬鍖栭殧绂诲害")
+                                        .getInspectionItemSubclass().equals("鍚屾瀬鍖栭殧绂诲害")&& insProductResult2.getFrequency().equals(s)
                         ).collect(Collectors.toList());
                         int length = result2s.get(0).getPort().split(",").length;
                         aa += (angles + 1) * (length % (ports > 8 ? 4 : (ports + 1) / 2) == 0 ? length / (ports > 8 ? 4 : (ports + 1) / 2) : length / (ports > 8 ? 4 : (ports + 1) / 2) + 1);
@@ -2393,7 +2393,7 @@
                     if (inspectionItemSubclass.contains("寮傛瀬鍖栭殧绂诲害")) {
                         List<InsProductResult2> result2s = insProductResult2s.stream().filter(insProductResult2 ->
                                 insProductMapper.selectById(insProductResult2.getInsProductId())
-                                        .getInspectionItemSubclass().equals("寮傛瀬鍖栭殧绂诲害")
+                                        .getInspectionItemSubclass().equals("寮傛瀬鍖栭殧绂诲害")&& insProductResult2.getFrequency().equals(s)
                         ).collect(Collectors.toList());
                         int length = result2s.get(0).getPort().split(",").length;
                         aa += (angles + 1) * (length % (ports > 8 ? 4 : (ports + 1) / 2) == 0 ? length / (ports > 8 ? 4 : (ports + 1) / 2) : length / (ports > 8 ? 4 : (ports + 1) / 2) + 1);
@@ -2410,7 +2410,7 @@
                     if (inspectionItemSubclass.contains("骞呭害鍋忓樊")) {
                         List<InsProductResult2> result2s = insProductResult2s.stream().filter(insProductResult2 ->
                                 insProductMapper.selectById(insProductResult2.getInsProductId())
-                                        .getInspectionItemSubclass().equals("骞呭害鍋忓樊")
+                                        .getInspectionItemSubclass().equals("骞呭害鍋忓樊")&& insProductResult2.getFrequency().equals(s)
                         ).collect(Collectors.toList());
                         int length = result2s.get(0).getPort().split(",").length;
                         aa += (angles + 1) * (length % 8 == 0 ? length / 8 : length / 8 + 1);
@@ -2418,7 +2418,7 @@
                     if (inspectionItemSubclass.contains("鏈�澶х浉浣嶅亸宸�")) {
                         List<InsProductResult2> result2s = insProductResult2s.stream().filter(insProductResult2 ->
                                 insProductMapper.selectById(insProductResult2.getInsProductId())
-                                        .getInspectionItemSubclass().equals("鏈�澶х浉浣嶅亸宸�")
+                                        .getInspectionItemSubclass().equals("鏈�澶х浉浣嶅亸宸�")&& insProductResult2.getFrequency().equals(s)
                         ).collect(Collectors.toList());
                         int length = result2s.get(0).getPort().split(",").length;
                         aa += (angles + 1) * (length % 8 == 0 ? length / 8 : length / 8 + 1);

--
Gitblit v1.9.3