chore: 初始化东安动力MES采集程序

This commit is contained in:
yexingqiang
2026-05-29 13:57:19 +08:00
commit b5c49a5d86
1121 changed files with 168795 additions and 0 deletions

View File

@@ -0,0 +1,189 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//using SystemFramework;
namespace MesWebFun_base
{
public partial class MisWebInterface
{
/// <summary>
///
/// </summary>
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 = ReceivedSignal_MobySelect( m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ShowMoby" + "|" + "info");
}
break;
//显示操作指南√
case "ProcessList":
try
{
responseStr = ReceivedSignal_ProcessList(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ProcessList" + "|" + "info");
}
break;
//显示物料√
case "MaterialList":
try
{
responseStr = ReceivedSignal_MaterialList(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点MaterialList" + "|" + "info");
}
break;
//显示操作图片√
case "PicShow":
try
{
responseStr = ReceivedSignal_PictureShow(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点PicShow" + "|" + "info");
}
break;
//显示拧紧位置√
case "ShaftPosition":
try
{
responseStr = InitShowGuidCircle(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ShaftPosition" + "|" + "info");
}
break;
//实时显示质量数据√
case "ShowTimelyQuality":
try
{
// url: '../submit/OpName.ashx?type=ShowTimelyQuality&value=' + opName,
responseStr = _MesWebFun_base.ProcessRequest("ShowTimelyQuality", m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ShowTimelyQuality" + "|" + "info");
}
break;
//手动拧紧实时显示质量数据√
case "ShowTimelyQuality_Tight":
try
{
// url: '../submit/OpName.ashx?type=ShowTimelyQuality&value=' + opName,
responseStr = _MesWebFun_base.ProcessRequest("ShowTimelyQuality", m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ShowTimelyQuality_Tight" + "|" + "info");
}
break;
//√
case "OrderFormList":
try
{
// ReloadOrderInfoData();
//url: '../submit/OpName.ashx?type=OrderFormList&value=' + opName,
responseStr = _MesWebFun_base.ProcessRequest("OrderFormList", m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点OrderFormList" + "|" + "info");
}
break;
//弹窗消息√
case "Notice":
try
{
responseStr = ShowWindowNotice(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点Notice" + "|" + "info");
}
break;
//LED消息提醒√
case "ScrollNotice":
try
{
responseStr = ShowLEDNotice(m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点ScrollNotice" + "|" + "info");
}
break;
//物料检测初始化√
case "MaterialCheckPosition":
responseStr = InitMaterialCheck(m_Opname);
break;
//返修质量数据显示√
case "RepairQuality":
try
{
// IniQualityButtons_bgColor_byenergineID_socket(m_Value);
//url: '../submit/OpName.ashx?type=QualityDataButton_bgColor_Select_ByEnergineID&value=' + opName + '&energineID=' + energineID + '&v=' + new Date().getTime(),
responseStr = _MesWebFun_base.ProcessRequest("QualityDataButton_bgColor_Select_ByEnergineID", m_Opname);
}
catch (Exception exception)
{
//ApplicationLog.WriteLog("信息提示" + "|" + "错误断点RepairQuality" + "|" + "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;
}
}
}