|
|
@@ -159,14 +159,13 @@ public class MesClientComponent extends JPanel {
|
|
|
if (!hgA && !hgB) {
|
|
|
sn = "";
|
|
|
}
|
|
|
-
|
|
|
if (hgA) {
|
|
|
sn = MesClient.s7PLC.readString(oprnoClass.getHgA_sn());
|
|
|
- }
|
|
|
- if (hgB) {
|
|
|
+ }else if (hgB) {
|
|
|
sn = MesClient.s7PLC.readString(oprnoClass.getHgB_sn());
|
|
|
+ }else {
|
|
|
+ sn = MesClient.s7PLC.readString(oprnoClass.getProduct_sn());
|
|
|
}
|
|
|
-
|
|
|
if (sn == null || sn.trim().isEmpty() || "".equals(sn)) {
|
|
|
setMenuStatus("扫码结果为空", -1);
|
|
|
return;
|
|
|
@@ -197,6 +196,7 @@ public class MesClientComponent extends JPanel {
|
|
|
// 未扫码,等待允许扫码信号
|
|
|
// 当遍历出有上料点位为true的工位时
|
|
|
if (MesClient.s7PLC.readBoolean(oprnoClass.getHgA_out()) || MesClient.s7PLC.readBoolean(oprnoClass.getHgB_out())) {
|
|
|
+ MesClient.s7PLC.writeBoolean(oprnoClass.getMes_out(),false);
|
|
|
String sn = "";
|
|
|
boolean hgA = MesClient.s7PLC.readBoolean(oprnoClass.getHgA_out());
|
|
|
boolean hgB = MesClient.s7PLC.readBoolean(oprnoClass.getHgB_out());
|
|
|
@@ -207,6 +207,10 @@ public class MesClientComponent extends JPanel {
|
|
|
if (hgB) {
|
|
|
sn = MesClient.s7PLC.readString(oprnoClass.getHgB_sn());
|
|
|
}
|
|
|
+ if (sn == null || sn.trim().isEmpty() || "".equals(sn)){
|
|
|
+ setMenuStatus("扫码结果为空", -1);
|
|
|
+ return;
|
|
|
+ }
|
|
|
productSn.setText(sn);
|
|
|
work_status = 1;
|
|
|
}
|
|
|
@@ -215,6 +219,8 @@ public class MesClientComponent extends JPanel {
|
|
|
String sn = productSn.getText();
|
|
|
if (sn == null || sn.trim().isEmpty() || "".equals(sn)) {
|
|
|
setMenuStatus("读码结果为空", -1);
|
|
|
+ productSn.setText("");
|
|
|
+ work_status = 0;
|
|
|
return;
|
|
|
}
|
|
|
Boolean checkQualityResult = DataUtil.checkQualityByGw(MesClient.nettyClient, sn,MesClient.user20,oprnoClass.getOprno());
|