|
@@ -152,20 +152,20 @@ public class MesRevice {
|
|
|
public static void updateResultRevice(String processMsgRet,String mes_msg){
|
|
public static void updateResultRevice(String processMsgRet,String mes_msg){
|
|
|
try{
|
|
try{
|
|
|
String sn = ProtocolParam.getSn(mes_msg).trim();
|
|
String sn = ProtocolParam.getSn(mes_msg).trim();
|
|
|
|
|
+ String oprno = ProtocolParam.getOprno(mes_msg).trim();
|
|
|
if(processMsgRet.equalsIgnoreCase("OK")) {
|
|
if(processMsgRet.equalsIgnoreCase("OK")) {
|
|
|
- if(sn.equals(MesClient.product_sn2.getText())){
|
|
|
|
|
- MesClient.pxstatus2.setText("B:提交成功");
|
|
|
|
|
- MesClient.resetScanB();
|
|
|
|
|
- }else{
|
|
|
|
|
- MesClient.pxstatus1.setText("A:提交成功");
|
|
|
|
|
- MesClient.resetScanA();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 只有本工位的回复才执行resetScan,OP040回复不参与逻辑
|
|
|
|
|
+ if(oprno.startsWith(MesClient.mes_gw)){
|
|
|
|
|
+ if(sn.equals(MesClient.product_sn2.getText())){
|
|
|
|
|
+ MesClient.pxstatus2.setText("B:提交成功");
|
|
|
|
|
+ MesClient.resetScanB();
|
|
|
|
|
+ }else{
|
|
|
|
|
+ MesClient.pxstatus1.setText("A:提交成功");
|
|
|
|
|
+ MesClient.resetScanA();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // OP040联动提交
|
|
|
|
|
- if(MesClient.op040AutoSubmit){
|
|
|
|
|
- String oprno = ProtocolParam.getOprno(mes_msg).trim();
|
|
|
|
|
- // 只有OP060自身的提交成功才触发,避免OP040回复再次触发
|
|
|
|
|
- if(oprno.startsWith(MesClient.mes_gw)){
|
|
|
|
|
|
|
+ // OP040联动提交
|
|
|
|
|
+ if(MesClient.op040AutoSubmit){
|
|
|
MesClient.getUser();
|
|
MesClient.getUser();
|
|
|
String barcode36 = MesClient.getBarcode(sn);
|
|
String barcode36 = MesClient.getBarcode(sn);
|
|
|
Boolean op040ret = DataUtil.sendQualityForOp040(MesClient.nettyClient, barcode36, "OK", MesClient.user20);
|
|
Boolean op040ret = DataUtil.sendQualityForOp040(MesClient.nettyClient, barcode36, "OK", MesClient.user20);
|
|
@@ -175,14 +175,18 @@ public class MesRevice {
|
|
|
System.out.println("OP040联动提交已发送");
|
|
System.out.println("OP040联动提交已发送");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }else{
|
|
|
|
|
+ // OP040等其他工位的回复,只打印日志不处理
|
|
|
|
|
+ System.out.println("收到非本工位回复,oprno=" + oprno + ",忽略");
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
- if(sn.equals(MesClient.product_sn2.getText())){
|
|
|
|
|
- MesClient.pxstatus2.setText("B:提交失败");
|
|
|
|
|
-// MesClient.resetScanB();
|
|
|
|
|
- }else{
|
|
|
|
|
- MesClient.pxstatus1.setText("A:提交失败");
|
|
|
|
|
-// MesClient.resetScanA();
|
|
|
|
|
|
|
+ // 失败回复也只处理本工位的
|
|
|
|
|
+ if(oprno.startsWith(MesClient.mes_gw)){
|
|
|
|
|
+ if(sn.equals(MesClient.product_sn2.getText())){
|
|
|
|
|
+ MesClient.pxstatus2.setText("B:提交失败");
|
|
|
|
|
+ }else{
|
|
|
|
|
+ MesClient.pxstatus1.setText("A:提交失败");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|