Răsfoiți Sursa

修改SIS SID規則 加上量測 說明判斷

manto07m 3 ani în urmă
părinte
comite
ab1eafa50c
1 a modificat fișierele cu 5 adăugiri și 2 ștergeri
  1. 5 2
      script/php/read_excel.php

+ 5 - 2
script/php/read_excel.php

@@ -74,7 +74,7 @@ if (isset($_FILES["excel"])) {
                 }
                 for ($j = $startC; $j <= $endC; $j++) {
                     if ($skipC != $j) {
-                        if($first){
+                        if ($first) {
                             $first = false;
                         }
                         $col_count++;
@@ -83,7 +83,10 @@ if (isset($_FILES["excel"])) {
                         if ((str_contains($sheetName, "SIS") || str_contains($sheetName, "SID")) && $j == 'C' && $value == null) {  //若為SIS且C行為空,則跳過
                             $skip = true;
                             break;
-                        } else if ($j == 'A' && (!str_contains($value, "-") || str_contains($value, "說明"))) { //若儀器資料不含'-'且含'說明'則跳過
+                        } else if (($j == 'A') && (!str_contains($value, "-") || str_contains($value, "說明"))) { //若儀器資料不含'-'且含'說明'則跳過
+                            $skip = true;
+                            break;
+                        } else if ((str_contains($sheetName, "SIS") || str_contains($sheetName, "SID")) && $j == 'C' && (str_contains($value, "量測") || str_contains($value, "說明"))) { //若儀器資料含'說明'則跳過
                             $skip = true;
                             break;
                         } else if ($j == 'A' && str_contains($sheetName, "TI")) {