65 lines
2.5 KiB
C#
65 lines
2.5 KiB
C#
using System;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using bizFacade;
|
|
//using SystemFramework;
|
|
using MesServerWork;
|
|
|
|
namespace MesServerFunctions
|
|
{
|
|
partial class Functions_BASE_25
|
|
{
|
|
/// <summary>
|
|
/// 申请上线
|
|
/// </summary>
|
|
/// <param name="OpName"></param>
|
|
/// <param name="tagValue"></param>
|
|
private void PartLoad(object e)
|
|
{
|
|
try
|
|
{
|
|
DoWhatPlc.CustomeEvetnArgs msgEvent = (DoWhatPlc.CustomeEvetnArgs)e;
|
|
string OpName = Convert.ToString(msgEvent.OpName);
|
|
int tagValue = Convert.ToInt32(msgEvent.TagValue);
|
|
int engineTypeID_Sub;
|
|
string engineType_Sub;
|
|
string engineID_Sub;
|
|
|
|
int engineTypeID;
|
|
string engineType;
|
|
string engineID;
|
|
|
|
|
|
if (tagValue == 1)
|
|
{
|
|
// ********************* 机器人可能只会给发动机号********************
|
|
//engineID_Sub 然后从数据库查询Read_EngineType Read_EngineTypeID ***** 电子看板_发动机号_线首工位
|
|
MIS_BASE.Read_EngineTypeID_MES(OpName, out engineTypeID_Sub);
|
|
MIS_BASE.Read_EngineType_MES(OpName, out engineType_Sub);
|
|
MIS_BASE.Read_EngineID_MES(OpName, out engineID_Sub);
|
|
|
|
MIS_BASE.Read_EngineTypeID(OpName, out engineTypeID);
|
|
MIS_BASE.Read_EngineType(OpName, out engineType);
|
|
MIS_BASE.Read_EngineID(OpName, out engineID);
|
|
|
|
//电子看板_发动机号_分线组件装配关系_增加
|
|
BaseDataSystemMES.MailLineAndSubLineData_Insert(engineID, engineTypeID, engineType, engineID_Sub);//分线上总线数据转移
|
|
|
|
MIS_BASE.Write_FixAllow(OpName, true);//允许PLC工作
|
|
// 清除匹配位置
|
|
DtWebApi.ReadWritePLC.WritePLC("2014", OpName, 0);
|
|
// 清除界面显示
|
|
SendInfomation("MatchingCompleted", "0", OpName);//界面显示匹配完成
|
|
SendInfomation("Match", "0", OpName);//界面显示匹配完成
|
|
SendInfomation("MatchSuccess", "0", OpName);//界面显示匹配完成
|
|
|
|
}
|
|
}
|
|
catch (Exception err)
|
|
{
|
|
////ApplicationLog.WriteLog(err, "Function03:PartLoad");
|
|
}
|
|
}
|
|
}
|
|
}
|