|
@@ -10,6 +10,43 @@ import java.awt.*;
|
|
|
|
|
|
|
|
public class MesRevice {
|
|
public class MesRevice {
|
|
|
|
|
|
|
|
|
|
+ // 创建产品记录回复
|
|
|
|
|
+ public static void createRevice(String processMsgRet,String mes_msg){
|
|
|
|
|
+ try{
|
|
|
|
|
+ String oprno = ProtocolParam.getOprno(mes_msg).trim();
|
|
|
|
|
+ if(processMsgRet.equalsIgnoreCase("OK") || processMsgRet.equalsIgnoreCase("CF")) {
|
|
|
|
|
+ // 创建成功或已存在,直接进入等待加工状态
|
|
|
|
|
+ String tip = processMsgRet.equalsIgnoreCase("OK") ? "录入成功" : "工件码已存在";
|
|
|
|
|
+ MesClient.lastpage = 0;
|
|
|
|
|
+ if(oprno.equals(MesClient.mes_gw+"A") || oprno.equals(MesClient.mes_gw+"C") || oprno.equals(MesClient.mes_gw+"E")){
|
|
|
|
|
+ MesClient.finish_ok_bt.setEnabled(false);
|
|
|
|
|
+ MesClient.mesQualityFlagA = true;
|
|
|
|
|
+ MesClient.pxstatus1.setText("A:" + tip + ",等待设备启动");
|
|
|
|
|
+ MesClient.curSna = MesClient.product_sn.getText();
|
|
|
|
|
+ MesClient.tjFlaga = 1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ MesClient.finish_ng_bt.setEnabled(false);
|
|
|
|
|
+ MesClient.mesQualityFlagB = true;
|
|
|
|
|
+ MesClient.pxstatus2.setText("B:" + tip + ",等待设备启动");
|
|
|
|
|
+ MesClient.curSnb = MesClient.product_sn2.getText();
|
|
|
|
|
+ MesClient.tjFlagb = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ MesClient.setMenuStatus(tip + ",等待设备启动",0);
|
|
|
|
|
+ }else if(processMsgRet.equalsIgnoreCase("BM")){
|
|
|
|
|
+ MesClient.setMenuStatus("物料未绑定或已失效",1);
|
|
|
|
|
+ }else if(processMsgRet.equalsIgnoreCase("GS")){
|
|
|
|
|
+ MesClient.setMenuStatus("工件码格式不正确",1);
|
|
|
|
|
+ }else if(processMsgRet.equalsIgnoreCase("DJ")){
|
|
|
|
|
+ MesClient.setMenuStatus("未进行开班点检",1);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ MesClient.setMenuStatus("录入MES失败,请重试",1);
|
|
|
|
|
+ }
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ MesClient.setMenuStatus("录入MES失败,请重试",1);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 质量查询
|
|
// 质量查询
|
|
|
public static void checkQualityRevice(String processMsgRet,String mes_msg){
|
|
public static void checkQualityRevice(String processMsgRet,String mes_msg){
|
|
|
try{
|
|
try{
|