|
|
@@ -307,10 +307,10 @@ public class MesClient extends JFrame {
|
|
|
}
|
|
|
|
|
|
public static void scanBarcode() {
|
|
|
- if(work_status == 1){
|
|
|
- JOptionPane.showMessageDialog(mesClientFrame,"工作中,勿扫码","提示窗口", JOptionPane.INFORMATION_MESSAGE);
|
|
|
- return;
|
|
|
- }
|
|
|
+// if(work_status == 1){
|
|
|
+// JOptionPane.showMessageDialog(mesClientFrame,"工作中,勿扫码","提示窗口", JOptionPane.INFORMATION_MESSAGE);
|
|
|
+// return;
|
|
|
+// }
|
|
|
String scanBarcodeTitle = "";
|
|
|
switch(scan_type) {
|
|
|
case 1:
|
|
|
@@ -333,26 +333,19 @@ public class MesClient extends JFrame {
|
|
|
product_sn.setText(scanBarcode);
|
|
|
break;
|
|
|
}
|
|
|
- // 校验工件码格式:长度为28位且前13位为"5024026602751"
|
|
|
- if(scanBarcode.length() == 28 && scanBarcode.startsWith("5024026602751")) {
|
|
|
- work_status = 1;
|
|
|
- check_quality_result = true;
|
|
|
- finish_ok_bt.setEnabled(true);
|
|
|
- finish_ng_bt.setEnabled(true);
|
|
|
- setMenuStatus("该工件可以加工", 0);
|
|
|
- } else {
|
|
|
- finish_ok_bt.setEnabled(false);
|
|
|
- finish_ng_bt.setEnabled(false);
|
|
|
- setMenuStatus("工件码格式错误", -1);
|
|
|
- product_sn.setText("");
|
|
|
- }
|
|
|
+// // 校验工件码格式:长度为28位且前13位为"5024026602751"
|
|
|
+ work_status = 1;
|
|
|
+ check_quality_result = true;
|
|
|
+ finish_ok_bt.setEnabled(true);
|
|
|
+ finish_ng_bt.setEnabled(true);
|
|
|
+ setMenuStatus("该工件可以加工", 0);
|
|
|
//刷新界面
|
|
|
mesClientFrame.repaint();
|
|
|
|
|
|
- if(!tcp_connect_flag) {
|
|
|
- JOptionPane.showMessageDialog(mesClientFrame,"设备未连接Mes服务器","提示窗口", JOptionPane.INFORMATION_MESSAGE);
|
|
|
- return;
|
|
|
- }
|
|
|
+// if(!tcp_connect_flag) {
|
|
|
+// JOptionPane.showMessageDialog(mesClientFrame,"设备未连接Mes服务器","提示窗口", JOptionPane.INFORMATION_MESSAGE);
|
|
|
+// return;
|
|
|
+// }
|
|
|
|
|
|
// 查询工件质量
|
|
|
// Boolean sendret = DataUtil.checkQuality(nettyClient,barcode36,user20);
|
|
|
@@ -563,10 +556,10 @@ public class MesClient extends JFrame {
|
|
|
MesClient.resetScanA();
|
|
|
MesClient.setMenuStatus("结果提交成功,请扫下一件", 0);
|
|
|
MesClient.scan_type = 1;
|
|
|
-// MesClient.scanBarcode();
|
|
|
+ MesClient.scanBarcode();
|
|
|
} else {
|
|
|
MesClient.setMenuStatus(retObj.get("message").toString(),-1);
|
|
|
- work_status = 0;
|
|
|
+// work_status = 0;
|
|
|
}
|
|
|
}
|
|
|
}
|