Files
XingCheng3 dff0156cdd MVP!
2026-05-26 09:41:24 +08:00

165 lines
7.8 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
namespace MesWebFun_base
{
public partial class MisWebInterface
{
public static MesWebFun_base _MesWebFun_base = new MesWebFun_base();
public string WebSocket_Function(string msg)
{
var responseStr = "";
try
{
//返回的数据msg.data包含了协议中的4部分9
var arrays_signal = msg.Split('|');
var m_Source = arrays_signal[0];
var m_Command = arrays_signal[1];
var m_Opname = arrays_signal[2];
var m_Value = arrays_signal[3];
// var opName = $("#tbx_opname").val();
switch (m_Source)
{
case "MES":
switch (m_Command)
{
//显示托盘信息 √
case "ShowMoby":
try
{
responseStr = MesWebFun_base.MobySelect(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ShowMoby" + "|" + "info");
}
break;
//显示操作指南√
case "ProcessList":
try
{
responseStr = MesWebFun_base.ProcessList(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ProcessList" + "|" + "info");
}
break;
//显示物料√
case "MaterialList":
try
{
responseStr = MesWebFun_base.MaterialList(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点MaterialList" + "|" + "info");
}
break;
//显示操作图片√
case "PicShow":
try
{
responseStr = MesWebFun_base.PictureShow(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点PicShow" + "|" + "info");
}
break;
//显示拧紧位置√
case "ShaftPosition":
try
{
responseStr = MesWebFun_base.ShaftPotion_Select(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ShaftPosition" + "|" + "info");
}
break;
//实时显示质量数据√
case "ShowTimelyQuality":
try
{
responseStr = MesWebFun_base.Quality_Select(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ShowTimelyQuality" + "|" + "info");
}
break;
//手动拧紧实时显示质量数据√
case "ShowTimelyQuality_Tight":
try
{
responseStr = MesWebFun_base.Quality_Select(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ShowTimelyQuality_Tight" + "|" + "info");
}
break;
//√
case "OrderFormList":
try
{
responseStr = MesWebFun_base.OrderFormList(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点OrderFormList" + "|" + "info");
}
break;
//弹窗消息√
case "Notice":
try
{
responseStr = MesWebFun_base.ShowWindowNotice(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点Notice" + "|" + "info");
}
break;
//LED消息提醒√
case "ScrollNotice":
try
{
responseStr = MesWebFun_base.ShowLEDNotice(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ScrollNotice" + "|" + "info");
}
break;
//物料检测初始化√
case "MaterialCheckPosition":
try
{
responseStr = MesWebFun_base.MaterialCheckPosition(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点MaterialCheckPosition" + "|" + "info");
}
break;
default:
// Web_Socket_Interface(m_Opname, msg);
break;
}
break;
}
}
catch (Exception exception)
{
var error = exception.ToString();
//ApplicationLog.WriteLog("信息提示" + "|" + "系统出现错误接受onmessage" + "|" + error + "|" + "info");
responseStr = "";
}
return responseStr;
}
}
}