Browse Source

只要求16位

liuwei 8 hours ago
parent
commit
49d0ae6453
1 changed files with 4 additions and 7 deletions
  1. 4 7
      src/com/mes/component/WorkJPanelScan.java

+ 4 - 7
src/com/mes/component/WorkJPanelScan.java

@@ -34,10 +34,8 @@ public class WorkJPanelScan extends JPanel {
 
     public String lineSn = "CZ060";
 
-    /** 兼容现场短码、旧码和 24 位 EVE 长码 */
-    public static final int SN_LEN_SHORT = 16;
-    public static final int SN_LEN_LEGACY = 19;
-    public static final int SN_LEN_EVE = 24;
+    /** 工件码格式例如 CZ0601956A220011,共 16 位 */
+    public static final int SN_LEN = 16;
 
     public JLabel feedinglabel;
 
@@ -377,7 +375,7 @@ public class WorkJPanelScan extends JPanel {
             return;
         }
         if(!isValidSn(sn)){
-            setMenuStatus("工件码应为16、19或24位,当前" + sn.length() + "位", -1);
+            setMenuStatus("工件码应为16位,当前" + sn.length() + "位", -1);
             return;
         }
         manualPendingSn = sn;
@@ -395,8 +393,7 @@ public class WorkJPanelScan extends JPanel {
         if(sn == null){
             return false;
         }
-        int length = sn.trim().length();
-        return length == SN_LEN_SHORT || length == SN_LEN_LEGACY || length == SN_LEN_EVE;
+        return sn.trim().length() == SN_LEN;
     }
 
     public void resetFeeding() {