48 lines
1.8 KiB
C#
48 lines
1.8 KiB
C#
using System;
|
|
//using SystemFramework;
|
|
using MesServerWork;
|
|
using bizFacade;
|
|
using System.Data;
|
|
|
|
namespace MesServerFunctions
|
|
{
|
|
partial class Functions_BASE_30
|
|
{
|
|
/// <summary>
|
|
/// PLC传递机型处理
|
|
/// </summary>
|
|
/// <param name="OpName"></param>
|
|
/// <param name="tagValue"></param>
|
|
private void EngineTypeGetOver_PLC(object e)
|
|
{
|
|
try
|
|
{
|
|
DoWhatPlc.CustomeEvetnArgs msgEvent = (DoWhatPlc.CustomeEvetnArgs)e;
|
|
string OpName = Convert.ToString(msgEvent.OpName);
|
|
//int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
|
|
|
int EngineTypeID;//机型代码
|
|
int PartPallet_Code;//托盘编号
|
|
|
|
string EngineType;//机型
|
|
string EngineID;//工件编号
|
|
|
|
string OrderForm = msgEvent.TagValue.ToString();
|
|
DataTable dt;
|
|
BaseDataSystemMES.Get_DataByOrderForm(OrderForm,out dt);
|
|
EngineTypeID = Convert.ToInt32(dt.Rows[0]["机型代码"]);
|
|
PartPallet_Code = Convert.ToInt32(dt.Rows[0]["托盘编号"]);
|
|
EngineType = dt.Rows[0]["发动机型号"].ToString();
|
|
EngineID = dt.Rows[0]["工件编号"].ToString();
|
|
|
|
//MIS_BASE.GetEngineTypeFromPLC(OpName, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out OrderForm);
|
|
EngineTypeGetOver_PLC_Work(OpName, EngineTypeID, EngineType, EngineID, PartPallet_Code, OrderForm);
|
|
}
|
|
catch (Exception err)
|
|
{
|
|
////ApplicationLog.WriteLog(err, "Function02:EngineTypeGetOver_PLC");
|
|
}
|
|
}
|
|
}
|
|
}
|