소스 검색

质量月报 - 采样点名称相关的代码优化

wangggziwen 1 년 전
부모
커밋
683db11ebb

+ 24 - 24
master/src/main/java/com/ruoyi/project/production/controller/TMonthlyQualityReportController.java

@@ -153,53 +153,53 @@ public class TMonthlyQualityReportController extends BaseController
                 Cell cell = row.getCell(1);
                 cell.setCellType(CellType.STRING);
                 String cellValue = ExcelUtils.getCellValue(cell);
-                if ("S-0501".equals(cellValue)) {
+                if ("S-0501".equals(cellValue) || "S0501".equals(cellValue)) {
                     listS0501.add(row);
-                } else if ("S-2002".equals(cellValue)) {
+                } else if ("S-2002".equals(cellValue) || "S2002".equals(cellValue)) {
                     listS2002.add(row);
-                } else if ("S-2005".equals(cellValue)) {
+                } else if ("S-2005".equals(cellValue) || "S2005".equals(cellValue)) {
                     listS2005.add(row);
-                } else if ("S-2007".equals(cellValue)) {
+                } else if ("S-2007".equals(cellValue) || "S2007".equals(cellValue)) {
                     listS2007.add(row);
-                } else if ("S-2011".equals(cellValue)) {
+                } else if ("S-2011".equals(cellValue) || "S2011".equals(cellValue)) {
                     listS2011.add(row);
-                } else if ("S-2400".equals(cellValue)) {
+                } else if ("S-2400".equals(cellValue) || "S2400".equals(cellValue)) {
                     listS2400.add(row);
-                } else if ("S-3004".equals(cellValue)) {
+                } else if ("S-3004".equals(cellValue) || "S3004".equals(cellValue)) {
                     listS3004.add(row);
-                } else if ("S-3009".equals(cellValue)) {
+                } else if ("S-3009".equals(cellValue) || "S3009".equals(cellValue)) {
                     listS3009.add(row);
-                } else if ("S-3010".equals(cellValue)) {
+                } else if ("S-3010".equals(cellValue) || "S3010".equals(cellValue)) {
                     listS3010.add(row);
-                } else if ("S-3011".equals(cellValue)) {
+                } else if ("S-3011".equals(cellValue) || "S3011".equals(cellValue)) {
                     listS3011.add(row);
-                } else if ("S-3012".equals(cellValue)) {
+                } else if ("S-3012".equals(cellValue) || "S3012".equals(cellValue)) {
                     listS3012.add(row);
-                } else if ("S-3022".equals(cellValue)) {
+                } else if ("S-3022".equals(cellValue) || "S3022".equals(cellValue)) {
                     listS3022.add(row);
-                } else if ("S-4012".equals(cellValue)) {
+                } else if ("S-4012".equals(cellValue) || "S4012".equals(cellValue)) {
                     listS4012.add(row);
-                } else if ("S-4013".equals(cellValue)) {
+                } else if ("S-4013".equals(cellValue) || "S4013".equals(cellValue)) {
                     listS4013.add(row);
-                } else if ("S-5001".equals(cellValue)) {
+                } else if ("S-5001".equals(cellValue) || "S5001".equals(cellValue)) {
                     listS5001.add(row);
-                } else if ("S-5003".equals(cellValue)) {
+                } else if ("S-5003".equals(cellValue) || "S5003".equals(cellValue)) {
                     listS5003.add(row);
-                } else if ("S-5010".equals(cellValue)) {
+                } else if ("S-5010".equals(cellValue) || "S5010".equals(cellValue)) {
                     listS5010.add(row);
-                } else if ("S-5012".equals(cellValue)) {
+                } else if ("S-5012".equals(cellValue) || "S5012".equals(cellValue)) {
                     listS5012.add(row);
-                } else if ("S-6107".equals(cellValue)) {
+                } else if ("S-6107".equals(cellValue) || "S6107".equals(cellValue)) {
                     listS6107.add(row);
-                } else if ("S1301".equals(cellValue)) {
+                } else if ("S1301".equals(cellValue) || "S-1301".equals(cellValue)) {
                     listS1301.add(row);
-                } else if ("S4501".equals(cellValue)) {
+                } else if ("S4501".equals(cellValue) || "S-4501".equals(cellValue)) {
                     listS4501.add(row);
-                } else if ("S6101".equals(cellValue)) {
+                } else if ("S6101".equals(cellValue) || "S-6101".equals(cellValue)) {
                     listS6101.add(row);
-                } else if ("S6301".equals(cellValue)) {
+                } else if ("S6301".equals(cellValue) || "S-6301".equals(cellValue)) {
                     listS6301.add(row);
-                } else if ("Z-404".equals(cellValue)) {
+                } else if ("Z-404".equals(cellValue) || "Z404".equals(cellValue)) {
                     listZ404.add(row);
                 }
             } catch (Exception e) {

+ 24 - 24
ui/src/views/production/quality/index.vue

@@ -4298,168 +4298,168 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      if (row.samplePoint == 'S0501') {
+      if (row.samplePoint == 'S0501' || row.samplePoint == 'S-0501') {
         this.resetS0501();
         getS0501(row.id).then(response => {
           this.formS0501 = response.data;
           this.openS0501 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S1301') {
+      } else if (row.samplePoint == 'S1301' || row.samplePoint == 'S-1301') {
         this.resetS1301();
         getS1301(row.id).then(response => {
           this.formS1301 = response.data;
           this.openS1301 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S2002') {
+      } else if (row.samplePoint == 'S2002' || row.samplePoint == 'S-2002') {
         this.resetS2002();
         getS2002(row.id).then(response => {
           this.formS2002 = response.data;
           this.openS2002 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S2005') {
+      } else if (row.samplePoint == 'S2005' || row.samplePoint == 'S-2005') {
         this.resetS2005();
         getS2005(row.id).then(response => {
           this.formS2005 = response.data;
           this.openS2005 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S2007') {
+      } else if (row.samplePoint == 'S2007' || row.samplePoint == 'S-2007') {
         this.resetS2007();
         getS2007(row.id).then(response => {
           this.formS2007 = response.data;
           this.openS2007 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S2011') {
+      } else if (row.samplePoint == 'S2011' || row.samplePoint == 'S-2011') {
         this.resetS2011();
         getS2011(row.id).then(response => {
           this.formS2011 = response.data;
           this.openS2011 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S2400') {
+      } else if (row.samplePoint == 'S2400' || row.samplePoint == 'S-2400') {
         this.resetS2400();
         getS2400(row.id).then(response => {
           this.formS2400 = response.data;
           this.openS2400 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S3004') {
+      } else if (row.samplePoint == 'S3004' || row.samplePoint == 'S-3004') {
         this.resetS3004();
         getS3004(row.id).then(response => {
           this.formS3004 = response.data;
           this.openS3004 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S3009') {
+      } else if (row.samplePoint == 'S3009' || row.samplePoint == 'S-3009') {
         this.resetS3009();
         getS3009(row.id).then(response => {
           this.formS3009 = response.data;
           this.openS3009 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S3010') {
+      } else if (row.samplePoint == 'S3010' || row.samplePoint == 'S-3010') {
         this.resetS3010();
         getS3010(row.id).then(response => {
           this.formS3010 = response.data;
           this.openS3010 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S3011') {
+      } else if (row.samplePoint == 'S3011' || row.samplePoint == 'S-3011') {
         this.resetS3011();
         getS3011(row.id).then(response => {
           this.formS3011 = response.data;
           this.openS3011 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S3012') {
+      } else if (row.samplePoint == 'S3012' || row.samplePoint == 'S-3012') {
         this.resetS3012();
         getS3012(row.id).then(response => {
           this.formS3012 = response.data;
           this.openS3012 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S3022') {
+      } else if (row.samplePoint == 'S3022' || row.samplePoint == 'S-3022') {
         this.resetS3022();
         getS3022(row.id).then(response => {
           this.formS3022 = response.data;
           this.openS3022 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S4012') {
+      } else if (row.samplePoint == 'S4012' || row.samplePoint == 'S-4012') {
         this.resetS4012();
         getS4012(row.id).then(response => {
           this.formS4012 = response.data;
           this.openS4012 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S4013') {
+      } else if (row.samplePoint == 'S4013' || row.samplePoint == 'S-4013') {
         this.resetS4013();
         getS4013(row.id).then(response => {
           this.formS4013 = response.data;
           this.openS4013 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S4501') {
+      } else if (row.samplePoint == 'S4501' || row.samplePoint == 'S-4501') {
         this.resetS4501();
         getS4501(row.id).then(response => {
           this.formS4501 = response.data;
           this.openS4501 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S5001') {
+      } else if (row.samplePoint == 'S5001' || row.samplePoint == 'S-5001') {
         this.resetS5001();
         getS5001(row.id).then(response => {
           this.formS5001 = response.data;
           this.openS5001 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S5003') {
+      } else if (row.samplePoint == 'S5003' || row.samplePoint == 'S-5003') {
         this.resetS5003();
         getS5003(row.id).then(response => {
           this.formS5003 = response.data;
           this.openS5003 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S5010') {
+      } else if (row.samplePoint == 'S5010' || row.samplePoint == 'S-5010') {
         this.resetS5010();
         getS5010(row.id).then(response => {
           this.formS5010 = response.data;
           this.openS5010 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S5012') {
+      } else if (row.samplePoint == 'S5012' || row.samplePoint == 'S-5012') {
         this.resetS5012();
         getS5012(row.id).then(response => {
           this.formS5012 = response.data;
           this.openS5012 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S6101') {
+      } else if (row.samplePoint == 'S6101' || row.samplePoint == 'S-6101') {
         this.resetS6101();
         getS6101(row.id).then(response => {
           this.formS6101 = response.data;
           this.openS6101 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S6107') {
+      } else if (row.samplePoint == 'S6107' || row.samplePoint == 'S-6107') {
         this.resetS6107();
         getS6107(row.id).then(response => {
           this.formS6107 = response.data;
           this.openS6107 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'S6301') {
+      } else if (row.samplePoint == 'S6301' || row.samplePoint == 'S-6301') {
         this.resetS6301();
         getS6301(row.id).then(response => {
           this.formS6301 = response.data;
           this.openS6301 = true;
           this.title = "修改质量月报";
         });
-      } else if (row.samplePoint == 'Z404') {
+      } else if (row.samplePoint == 'Z404' || row.samplePoint == 'Z-404') {
         this.resetZ404();
         getZ404(row.id).then(response => {
           this.formZ404 = response.data;