chore: 初始化东安动力MES采集程序
This commit is contained in:
70
MisDataFun/SendMessageToWebMqtt/12SendMessageToWeb.csproj
Normal file
70
MisDataFun/SendMessageToWebMqtt/12SendMessageToWeb.csproj
Normal file
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E4EB6420-906D-4672-947A-CA33DDCDADFC}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SendMessageToWebMqtt</RootNamespace>
|
||||
<AssemblyName>SendMessageToWebMqtt</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="InitHashtable_MesServerCode.cs" />
|
||||
<Compile Include="SendMessage.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SendMessageFun.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\00MesWorkMqtt\MesWorkMqtt\00MesWorkMqtt.csproj">
|
||||
<Project>{f55da1a0-a982-4479-8c47-0d9a5aaf3e18}</Project>
|
||||
<Name>00MesWorkMqtt</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\04DataBaseAccess\DataBaseAccess\04-DataBaseAccess.csproj">
|
||||
<Project>{f434e066-4c59-47c8-aa82-6f48cc84501a}</Project>
|
||||
<Name>04-DataBaseAccess</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\07WebBusinessFacade\BusinessFacade\07BusinessFacade.csproj">
|
||||
<Project>{f0a0c525-03fd-428a-9b17-7f54aa0e4475}</Project>
|
||||
<Name>07BusinessFacade</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\09MesDataFunction\MesDataFunction\09-MesDataFunction.csproj">
|
||||
<Project>{90E76FB4-646D-45E2-95DB-0B8AB4E465D6}</Project>
|
||||
<Name>09-MesDataFunction</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,52 @@
|
||||
using DataLinkMesWork;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 命令
|
||||
///显示托盘信息√ case "ShowMoby":
|
||||
///显示操作指南√ case "ProcessList":
|
||||
///显示物料√ case "MaterialList":
|
||||
///显示操作图片√ case "PicShow":
|
||||
///显示拧紧位置√ case "ShaftPosition":
|
||||
///实时显示质量数据√ case "ShowTimelyQuality":
|
||||
///手动拧紧实时显示质量数据√case "ShowTimelyQuality_Tight":
|
||||
///√ case "OrderFormList":
|
||||
///弹窗消息√ case "Notice":
|
||||
///LED消息提醒√ case "ScrollNotice":
|
||||
///物料检测初始化√ case "MaterialCheckPosition":
|
||||
///返修质量数据显示√ case "RepairQuality"
|
||||
///
|
||||
/// </summary>
|
||||
public class MesServerCode
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// MES_基本变量_DB数据结构_获得激发变量
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DataTable BaseData_tagTable_All()
|
||||
{
|
||||
int MES_Code = 1;
|
||||
DataTable dt = null;
|
||||
string sql;
|
||||
sql = "SELECT TagID,0 as TagValue,TagName,工位号,数据来源,TagTypeID,TagLong,列位置,测量位置,变量类型代码,测量项目,TagAdr,TagAdrDemo,变量特点,变量排序 FROM [MES_基本变量_原始数据] "
|
||||
+ " where ((变量类型代码 >= 19 and 变量类型代码 <= 27) or (变量类型代码 = 101) or (变量类型代码 = 102) or (变量类型代码 = 105) or (变量类型代码 = 1000) or (变量类型代码 = 1001) or (变量类型代码 = 1002) or (变量类型代码 = 1003) or (变量类型代码 = 1004)) and (是否启用 = 1) "
|
||||
+ " and (监控属性代码 = '" + MES_Code.ToString() + "')"
|
||||
+ " ORDER BY TagID ";
|
||||
DataAccess.ExecuteDataTable(sql, out dt);
|
||||
return dt;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
36
MisDataFun/SendMessageToWebMqtt/Properties/AssemblyInfo.cs
Normal file
36
MisDataFun/SendMessageToWebMqtt/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("SendMessageToWebMqtt")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SendMessageToWebMqtt")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("e4eb6420-906d-4672-947a-ca33ddcdadfc")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
741
MisDataFun/SendMessageToWebMqtt/SendMessage.cs
Normal file
741
MisDataFun/SendMessageToWebMqtt/SendMessage.cs
Normal file
@@ -0,0 +1,741 @@
|
||||
using bizFacade;
|
||||
using MesServerWork;
|
||||
using MesWorkMqtt;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 命令
|
||||
///显示托盘信息√ case "ShowMoby":
|
||||
///显示操作指南√ case "ProcessList":
|
||||
///显示物料√ case "MaterialList":
|
||||
///显示操作图片√ case "PicShow":
|
||||
///显示拧紧位置√ case "ShaftPosition":
|
||||
///实时显示质量数据√ case "ShowTimelyQuality":
|
||||
///手动拧紧实时显示质量数据√case "ShowTimelyQuality_Tight":
|
||||
///√ case "OrderFormList":
|
||||
///弹窗消息√ case "Notice":
|
||||
///LED消息提醒√ case "ScrollNotice":
|
||||
///物料检测初始化√ case "MaterialCheckPosition":
|
||||
///返修质量数据显示√ case "RepairQuality"
|
||||
///
|
||||
/// </summary>
|
||||
public class SendMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// MES/InstantMessaging/BQ
|
||||
/// </summary>
|
||||
public static string MqttTargetTopic = ConfigurationManager.AppSettings["MqttTargetTopic"];
|
||||
/// <summary>
|
||||
/// WEB/InstantMessaging/BQ/MisServer
|
||||
/// </summary>
|
||||
public static string MqttTargetTopicWEB = ConfigurationManager.AppSettings["MqttTargetTopicWEB"];
|
||||
/// <summary>
|
||||
/// BAR/InstantMessaging/BQ
|
||||
/// </summary>
|
||||
public static string MqttTargetTopicBAR = ConfigurationManager.AppSettings["MqttTargetTopicBAR"];
|
||||
|
||||
public static void SendMessageBARToMES(string opName, string msgText)
|
||||
{
|
||||
var topic = $"{MqttTargetTopicBAR}";
|
||||
|
||||
if (msgText.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, msgText));
|
||||
}
|
||||
SendMessageMESToWEB(opName, msgText);
|
||||
}
|
||||
public static void SendMessageMESToWEB(string opName, string msgText)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
|
||||
if (msgText.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, msgText));
|
||||
}
|
||||
}
|
||||
public static void SendMessageWEBToMES(string msgText)
|
||||
{
|
||||
var topic = $"{MqttTargetTopicWEB}";
|
||||
|
||||
if (msgText.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, msgText));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 5 显示订单、机型信息 上线工位
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
public static void ShowMoby_FirstOpName(string opName)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = ShowMoby_String_FirstOpName(opName);
|
||||
string cmd = "ShowMoby";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 5 显示订单、机型信息 非上线工位
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
public static void ShowMoby(string opName, int type = 1)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = ShowMoby_String(opName, type);
|
||||
string cmd = "ShowMoby";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
}
|
||||
public static void MaterialList_Dif(string opName, string msgText)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
string cmd = "MaterialList_Dif";
|
||||
if (msgText.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{msgText}"));
|
||||
}
|
||||
}
|
||||
public static void AsyncSendMessage_Notice(string opname, string notice)
|
||||
{
|
||||
//通知Web界面
|
||||
BaseDataSystemMES.Web_Notice_Insert(opname, notice);
|
||||
Notice(opname);
|
||||
}
|
||||
public static void Notice(string opName)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = Notice_String(opName);
|
||||
string cmd = "Notice";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 1(直接在界面通过选择机型确认工序内容)
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
public static void ProcessList(string opName)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = ProcessList_String(opName);
|
||||
string cmd = "ProcessList";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
}
|
||||
public static void ProcessList_FirstOpName(string opName)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = ProcessList_String_FirstOpName(opName);
|
||||
string cmd = "ProcessList";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 2显示物料
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
public static void MaterialList(string opName)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = MaterialList_String(opName);
|
||||
string cmd = "MaterialList";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
|
||||
}
|
||||
public static void MaterialList_FirstOpName(string opName)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = MaterialList_String_FirstOpName(opName);
|
||||
string cmd = "MaterialList";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 3显示操作指导图片
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
public static void PicShow(string opName)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = PicShow_String(opName);
|
||||
string cmd = "PicShow";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
}
|
||||
public static void PicShow_FirstOpName(string opName)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = PicShow_String_FirstOpName(opName);
|
||||
string cmd = "PicShow";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 4订单完工模块刷新完成数量
|
||||
/// </summary>
|
||||
/// <param name="opName"></param>
|
||||
public static void OrderFormList(string opName)
|
||||
{
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
var responseStr = OrderFormList_String();
|
||||
string cmd = "OrderFormList";
|
||||
if (responseStr.Length > 0)
|
||||
{
|
||||
Task.Run(() => Mqtt.Publish(topic, $"MES|{cmd}_Resources|{opName}|{responseStr}"));
|
||||
}
|
||||
}
|
||||
|
||||
//实时显示质量数据√
|
||||
public static void ShowTimelyQuality(string opName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static void SendActuallyCount(string OpName, int tagValue)
|
||||
{
|
||||
//当工件离开时,更新在线产量、在线节拍
|
||||
//if (tagValue == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
int opNameCount = 0;//在线产量
|
||||
int opNameCountTime = 0;//在线节拍
|
||||
|
||||
BaseDataSystemMES.OpNameCount_BQ(OpName, out opNameCount, out opNameCountTime); //基本数据_工作日历_班次产量查询_New
|
||||
|
||||
SendInfomation("ActuallyCount", opNameCount.ToString() + "&" + opNameCountTime.ToString(), OpName);
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "Function01:SendActuallyCount");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void SendInfomation(string Command, string Value, string OpName)
|
||||
{
|
||||
|
||||
string SendMessage = "MES|" + Command + "|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
}
|
||||
|
||||
public static void AsyncSendMessage(string Message)
|
||||
{
|
||||
//lock (locker)
|
||||
{
|
||||
//"MES|MachinePlan|OpName|Value
|
||||
var array = Message.Split('|');
|
||||
var cmd = array[1];
|
||||
var opName = array[2];
|
||||
var topic = $"{MqttTargetTopic}/{opName}";
|
||||
Task.Run(() => Mqtt.Publish(topic, Message));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private static string ProcessList_String(string OpName)
|
||||
{
|
||||
string jsonStr_Process = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = "";
|
||||
DataTable dt_Proccess;
|
||||
|
||||
MES1.Moby_Select(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode, out EngineTypeString);
|
||||
|
||||
MES.Process_Select(OpName, EngineTypeID, EngineType, out dt_Proccess);
|
||||
if (dt_Proccess != null)
|
||||
{
|
||||
if (dt_Proccess.Rows.Count > 0)
|
||||
{
|
||||
jsonStr_Process = JsonHelper.CreateJsonParameters(dt_Proccess);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:ProcessList");
|
||||
}
|
||||
return jsonStr_Process;
|
||||
}
|
||||
private static string ProcessList_String_FirstOpName(string OpName)
|
||||
{
|
||||
string jsonStr_Process = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = "";
|
||||
DataTable dt_Proccess;
|
||||
|
||||
MES1.Moby_Select_FirstOpName(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode);
|
||||
|
||||
MES.Process_Select(OpName, EngineTypeID, EngineType, out dt_Proccess);
|
||||
if (dt_Proccess != null)
|
||||
{
|
||||
//if (dt_Proccess.Rows.Count > 0)
|
||||
//{
|
||||
// jsonStr_Process = JsonHelper.CreateJsonParameters(dt_Proccess);
|
||||
//}
|
||||
jsonStr_Process = JsonHelper.CreateJsonParameters(dt_Proccess);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:ProcessList");
|
||||
}
|
||||
return jsonStr_Process;
|
||||
}
|
||||
//
|
||||
private static string PicShow_String(string OpName)
|
||||
{
|
||||
string data = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = "";
|
||||
byte[] imgBytesIn;
|
||||
MES1.Moby_Select(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode, out EngineTypeString);
|
||||
BaseDataSystemMES.GetImageFile(OpName, EngineTypeID.ToString(), out imgBytesIn);
|
||||
if (imgBytesIn == null)
|
||||
{
|
||||
return data;
|
||||
}
|
||||
data = Convert.ToBase64String(imgBytesIn);
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:PictureShow");
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
private static string PicShow_String_FirstOpName(string OpName)
|
||||
{
|
||||
string data = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = "";
|
||||
byte[] imgBytesIn;
|
||||
MES1.Moby_Select_FirstOpName(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode);
|
||||
|
||||
BaseDataSystemMES.GetImageFile(OpName, EngineTypeID.ToString(), out imgBytesIn);
|
||||
if (imgBytesIn == null)
|
||||
{
|
||||
return data;
|
||||
}
|
||||
data = Convert.ToBase64String(imgBytesIn);
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:PictureShow");
|
||||
}
|
||||
return data;
|
||||
}
|
||||
/// <summary>
|
||||
/// 上线工位
|
||||
/// </summary>
|
||||
/// <param name="OpName"></param>
|
||||
/// <returns></returns>
|
||||
private static string ShowMoby_String(string OpName, int type = 1)
|
||||
{
|
||||
string data = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = "";
|
||||
//线首工位用
|
||||
MES1.Moby_Select(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode, out EngineTypeString, type);
|
||||
data = orderNum + "&" + EngineTypeID + "&" + EngineType + "&" + EngineID + "&" + PartPallet_Code + "&" + IsrepairBarcode + "&" + repairBarcode + "&" + EngineTypeString;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:MobySelect");
|
||||
}
|
||||
return data;
|
||||
}//Moby_Select_FirstOpName
|
||||
private static string ShowMoby_String_FirstOpName(string OpName)
|
||||
{
|
||||
string data = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = ""; // BQ
|
||||
//线首工位用
|
||||
MES1.Moby_Select_FirstOpName(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode);
|
||||
|
||||
data = orderNum + "&" + EngineTypeID + "&" + EngineType + "&" + EngineID + "&" + PartPallet_Code + "&" + IsrepairBarcode + "&" + repairBarcode + "&" + EngineTypeString;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:MobySelect");
|
||||
}
|
||||
return data;
|
||||
}
|
||||
/// <summary>
|
||||
/// 非上线工位
|
||||
/// </summary>
|
||||
/// <param name="OpName"></param>
|
||||
/// <returns></returns>
|
||||
//private static string ShowMoby_String(string OpName)
|
||||
//{
|
||||
// string data = "";
|
||||
// try
|
||||
// {
|
||||
// string orderNum = "";
|
||||
// int EngineTypeID = 0;
|
||||
// string EngineType = "";
|
||||
// string EngineID = "";
|
||||
// string PartPallet_Code = "";
|
||||
// int IsrepairBarcode = 0;
|
||||
// string repairBarcode = "";
|
||||
// MES1.Moby_Select(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode);
|
||||
// data = orderNum + "&" + EngineTypeID + "&" + EngineType + "&" + EngineID + "&" + PartPallet_Code + "&" + IsrepairBarcode + "&" + repairBarcode;
|
||||
// }
|
||||
// catch (Exception err)
|
||||
// {
|
||||
// ////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:MobySelect");
|
||||
// }
|
||||
// return data;
|
||||
//}
|
||||
private static string MaterialList_String(string OpName)
|
||||
{
|
||||
string jsonStr_Materail = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = "";
|
||||
|
||||
MES1.Moby_Select(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode, out EngineTypeString);
|
||||
DataTable dt_Material;
|
||||
|
||||
MES.PartMaterialVerify_Select(OpName, EngineTypeID, EngineType, out dt_Material);
|
||||
if (dt_Material != null)
|
||||
{
|
||||
if (dt_Material.Rows.Count > 0)
|
||||
{
|
||||
jsonStr_Materail = JsonHelper.CreateJsonParameters(dt_Material);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:MaterialList");
|
||||
}
|
||||
return jsonStr_Materail;
|
||||
}
|
||||
private static string MaterialList_String_FirstOpName(string OpName)
|
||||
{
|
||||
string jsonStr_Materail = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = "";
|
||||
|
||||
MES1.Moby_Select_FirstOpName(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode);
|
||||
|
||||
DataTable dt_Material;
|
||||
|
||||
MES.PartMaterialVerify_Select(OpName, EngineTypeID, EngineType, out dt_Material);
|
||||
if (dt_Material != null)
|
||||
{
|
||||
if (dt_Material.Rows.Count > 0)
|
||||
{
|
||||
jsonStr_Materail = JsonHelper.CreateJsonParameters(dt_Material);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:MaterialList");
|
||||
}
|
||||
return jsonStr_Materail;
|
||||
}
|
||||
|
||||
private static string ShowTimelyQuality_String(string OpName)
|
||||
{
|
||||
string text = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = "";
|
||||
DataTable dt;
|
||||
|
||||
MES1.Moby_Select(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode, out EngineTypeString);
|
||||
MES.QualitySelect(OpName, EngineID, out dt);
|
||||
if (dt != null)
|
||||
{
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
text = JsonHelper.CreateJsonParameters(dt);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:Quality_Select");
|
||||
}
|
||||
return text;
|
||||
}
|
||||
private static string ShowTimelyQuality_String_FirstOpName(string OpName)
|
||||
{
|
||||
string text = "";
|
||||
try
|
||||
{
|
||||
string orderNum = "";
|
||||
int EngineTypeID = 0;
|
||||
string EngineType = "";
|
||||
string EngineID = "";
|
||||
string PartPallet_Code = "";
|
||||
int IsrepairBarcode = 0;
|
||||
string repairBarcode = "";
|
||||
string EngineTypeString = "";
|
||||
DataTable dt;
|
||||
MES1.Moby_Select_FirstOpName(OpName, out orderNum, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out IsrepairBarcode, out repairBarcode);
|
||||
|
||||
MES.QualitySelect(OpName, EngineID, out dt);
|
||||
if (dt != null)
|
||||
{
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
text = JsonHelper.CreateJsonParameters(dt);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:Quality_Select");
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
private static string OrderFormList_String()
|
||||
{
|
||||
string enginetypelist = "";
|
||||
try
|
||||
{
|
||||
System.Data.DataTable dt = null;
|
||||
ShaftPosition.EngineType_Select(out dt);
|
||||
if (dt != null)
|
||||
{
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
enginetypelist = JsonHelper.DataTableToJson(dt);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:Orderenginetypeselect");
|
||||
}
|
||||
return enginetypelist;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 消息提醒
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private static string Notice_String(string opname)
|
||||
{
|
||||
string text = "";
|
||||
try
|
||||
{
|
||||
System.Data.DataTable dt = null;
|
||||
MES.ShowWindowNotice(opname, out dt);
|
||||
if (dt != null)
|
||||
{
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
text = JsonHelper.DataTableToJson(dt);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "MesWebFun_baseFun:ShowWindowNotice");
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量发送WEB消息(Value为BOOL值)
|
||||
/// </summary>
|
||||
/// <param name="MessageNumm">消息编号组合</param>
|
||||
/// <param name="Value">消息值组合</param>
|
||||
/// <param name="OpName">工位号</param>
|
||||
static public void Sendmessage(string MessageNumm, string Value, string OpName)
|
||||
{
|
||||
for (int i = 0; i < MessageNumm.Length; i++)
|
||||
{
|
||||
Sendmessage(MessageNumm[i], Value[i].ToString(), OpName);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 选择发送给WEB的消息
|
||||
/// </summary>
|
||||
/// <param name="Num">消息类型</param>
|
||||
/// <param name="OpName">消息工位</param>
|
||||
static void Sendmessage(char Num, string Value, string OpName)
|
||||
{
|
||||
string SendMessage;
|
||||
switch (Num)
|
||||
{
|
||||
case '1':
|
||||
//1(直接在界面通过选择机型确认工序内容)
|
||||
SendMessage = "MES|ProcessList|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
|
||||
case '2':
|
||||
//2显示物料
|
||||
SendMessage = "MES|MaterialList|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
|
||||
case '3':
|
||||
|
||||
//3显示操作指导图片
|
||||
SendMessage = "MES|PicShow|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '4':
|
||||
//3显示操作指导图片
|
||||
SendMessage = "MES|OrderFormList|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
|
||||
case '5':
|
||||
SendMessage = "MES|ShowMoby|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '6':
|
||||
SendMessage = "MES|MaterialCheckPosition|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '7':
|
||||
SendMessage = "MES|WorkStart|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '8':
|
||||
SendMessage = "MES|OrderFormList|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '9':
|
||||
SendMessage = "MES|ConfirmOkGo|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case 'a':
|
||||
SendMessage = "MES|FixAllow|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case 'b':
|
||||
SendMessage = "MES|ShaftPosition|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case 'c':
|
||||
SendMessage = "MES|ShowQuality|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
}
|
||||
}
|
||||
///// <summary>
|
||||
///// 发送信息到MES通讯服务器或者其他的
|
||||
///// </summary>
|
||||
///// <param name="Message"></param>
|
||||
//static private void AsyncSendMessage1(string Message)
|
||||
//{
|
||||
// MIS_BASE.asyncSendMessage(Message);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
231
MisDataFun/SendMessageToWebMqtt/SendMessageFun.cs
Normal file
231
MisDataFun/SendMessageToWebMqtt/SendMessageFun.cs
Normal file
@@ -0,0 +1,231 @@
|
||||
using bizFacade;
|
||||
using MesServerWork;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
/// <summary>
|
||||
/// 命令
|
||||
///显示托盘信息√ case "ShowMoby":
|
||||
///显示操作指南√ case "ProcessList":
|
||||
///显示物料√ case "MaterialList":
|
||||
///显示操作图片√ case "PicShow":
|
||||
///显示拧紧位置√ case "ShaftPosition":
|
||||
///实时显示质量数据√ case "ShowTimelyQuality":
|
||||
///手动拧紧实时显示质量数据√case "ShowTimelyQuality_Tight":
|
||||
///√ case "OrderFormList":
|
||||
///弹窗消息√ case "Notice":
|
||||
///LED消息提醒√ case "ScrollNotice":
|
||||
///物料检测初始化√ case "MaterialCheckPosition":
|
||||
///返修质量数据显示√ case "RepairQuality"
|
||||
///
|
||||
/// </summary>
|
||||
public class SendMessageFun
|
||||
{
|
||||
/// <summary>
|
||||
/// 批量发送WEB消息(Value为BOOL值)
|
||||
/// 1:显示工序内容
|
||||
/// 2:显示物料
|
||||
/// 3:显示操作指导图片
|
||||
/// 5:显示机型、工件流水号、订单信息
|
||||
/// c:显示质量数据
|
||||
/// </summary>
|
||||
/// <param name="MessageNumm">消息编号组合</param>
|
||||
/// <param name="Value">消息值组合</param>
|
||||
/// <param name="OpName">工位号</param>
|
||||
static public void SendMessage(string MessageNumm, string Value, string OpName)
|
||||
{
|
||||
for (int i = 0; i < MessageNumm.Length; i++)
|
||||
{
|
||||
SendMessage(MessageNumm[i], Value[i].ToString(), OpName);
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 向WEB发送信息(value为字符串)
|
||||
/// </summary>
|
||||
/// <param name="Command">消息种类</param>
|
||||
/// <param name="Value">消息内容</param>
|
||||
/// <param name="OpName">工位号</param>
|
||||
static public void SendInfomation(string Command, string Value, string OpName)
|
||||
{
|
||||
|
||||
string SendMessage = "MES|" + Command + "|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
}
|
||||
|
||||
static public void AsyncSendMessage_Notice(string opname, string notice)
|
||||
{
|
||||
//通知Web界面
|
||||
BaseDataSystemMES.Web_Notice_Insert(opname, notice);
|
||||
string SendMessage = "MES|Notice|" + opname + "|" + "1";
|
||||
MIS_BASE.asyncSendMessage(SendMessage);
|
||||
}
|
||||
/// <summary>
|
||||
/// 选择发送给WEB的消息
|
||||
/// 1:显示工序内容
|
||||
/// 2:显示物料
|
||||
/// 3:显示操作指导图片
|
||||
/// 5:显示机型、工件流水号、订单信息
|
||||
/// c:显示质量数据
|
||||
/// </summary>
|
||||
/// <param name="Num">消息类型</param>
|
||||
/// <param name="OpName">消息工位</param>
|
||||
static void SendMessage(char Num, string Value, string OpName)
|
||||
{
|
||||
string SendMessage;
|
||||
switch (Num)
|
||||
{
|
||||
case '1':
|
||||
//1(直接在界面通过选择机型确认工序内容)
|
||||
SendMessage = "MES|ProcessList|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
|
||||
case '2':
|
||||
//2显示物料
|
||||
SendMessage = "MES|MaterialList|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
|
||||
case '3':
|
||||
|
||||
//3显示操作指导图片
|
||||
SendMessage = "MES|PicShow|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '4':
|
||||
//3显示操作指导图片
|
||||
SendMessage = "MES|OrderFormList|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
|
||||
case '5':
|
||||
SendMessage = "MES|ShowMoby|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '6':
|
||||
SendMessage = "MES|MaterialCheckPosition|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '7':
|
||||
SendMessage = "MES|WorkStart|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '8':
|
||||
SendMessage = "MES|OrderFormList|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case '9':
|
||||
SendMessage = "MES|ConfirmOkGo|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case 'a':
|
||||
SendMessage = "MES|FixAllow|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case 'b':
|
||||
SendMessage = "MES|ShaftPosition|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
case 'c':
|
||||
//SendMessage = "MES|ShowQuality|" + OpName + "|" + Value;
|
||||
SendMessage = "MES|ShowTimelyQuality|" + OpName + "|" + Value;
|
||||
AsyncSendMessage(SendMessage);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 向WEB发送信息(value为字符串)
|
||||
/// </summary>
|
||||
/// <param name="Command">消息种类</param>
|
||||
/// <param name="Value">消息内容</param>
|
||||
/// <param name="OpName">工位号</param>
|
||||
//void SendInfomation(string Command, string Value, string OpName)
|
||||
//{
|
||||
|
||||
// string SendMessage = "MES|" + Command + "|" + OpName + "|" + Value;
|
||||
// AsyncSendMessage(SendMessage);
|
||||
//}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 发送在线产量、在线节拍
|
||||
/// </summary>
|
||||
/// <param name="OpName"></param>
|
||||
/// <param name="tagValue"></param>
|
||||
private void SendActuallyCount(string OpName, int tagValue)
|
||||
{
|
||||
//当工件离开时,更新在线产量、在线节拍
|
||||
if (tagValue == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
int opNameCount = 0;//在线产量
|
||||
int opNameCountTime = 0;//在线节拍
|
||||
|
||||
BaseDataSystemMES.OpNameCount_New(OpName, out opNameCount, out opNameCountTime); //基本数据_工作日历_班次产量查询_New
|
||||
|
||||
SendInfomation("ActuallyCount", opNameCount.ToString() + "&" + opNameCountTime.ToString(), OpName);
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
////ApplicationLog.WriteLog(err, "Function01:SendActuallyCount");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送信息到MES通讯服务器或者其他的
|
||||
/// </summary>
|
||||
/// <param name="Message"></param>
|
||||
static public void AsyncSendMessage(string Message)
|
||||
{
|
||||
MIS_BASE.asyncSendMessage(Message);
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 发送提示消息
|
||||
///// </summary>
|
||||
///// <param name="Message"></param>
|
||||
//static public void AsyncSendMessage_Notice(string opname, string notice)
|
||||
//{
|
||||
// //通知Web界面
|
||||
// BaseDataSystemMES.Web_Notice_Insert(opname, notice);
|
||||
// string SendMessage = "MES|Notice|" + opname + "|" + "1";
|
||||
// MIS_BASE.asyncSendMessage(SendMessage);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 发送信息到打印机
|
||||
/// </summary>
|
||||
/// <param name="Message"></param>
|
||||
private void asyncSendMessageToMark(string Message)
|
||||
{
|
||||
string messageSend = (string)Message;
|
||||
//UDPClientSend.Send_ALL(ApplicationConfig.MES_MarkPortNum, messageSend);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送信息到LED
|
||||
/// </summary>
|
||||
/// <param name="Message"></param>
|
||||
private void asyncSendMessageLED(string OpName)
|
||||
{
|
||||
|
||||
//发送到大屏幕显示 41104
|
||||
string strMessage = "MIS|" + OpName + "|" + "0" + "|" + "1";
|
||||
//UDPClientSend.Send_ALL(ApplicationConfig.Port_ShowLED_ProductCount, strMessage);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user