chore: initial commit

This commit is contained in:
XingCheng3
2026-05-29 09:34:04 +08:00
commit 78ae9dcd2e
683 changed files with 68110 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
using MesServerWork;
using MisDataFunDll;
using System;
namespace MesServerFunctions
{
partial class FunctionMES
{
/// <summary>
/// 允许AGV离开
/// </summary>
/// <param name="e"></param>
private void AllowAGVLeave(object e)
{
try
{
DeviceDriver_BasicData.CustomeEvetnArgs msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
string OpName = Convert.ToString(msgEvent.OpName);
int tagValue = Convert.ToInt32(msgEvent.TagValue);
string msg = $"【{OpName}】允许AGV离开";
if (tagValue == 1)
{
// PLC允许AGV离开信号被置位后应调用AGV允许离开接口
MIS_BASE.Read_EngineID(OpName,out string EngineID);
bool isOk = MisDataSaveDate.AGV_BusinessLogic.PassAgvInOut(OpName, EngineID, "release");
if (isOk) {
msg = $"【{OpName}】允许AGV离开失败请注意";
}
else
{
msg = $"【{OpName}】允许AGV离开成功!";
}
SendMessage.AsyncSendMessage_Notice(OpName, msg);
MyLog4Net.MyLogHelper.Info("AllowAGVLeave", msg);
// 记录允许AGV离开状态
MisDataFun.Location_MIS_MOBY_Insert(OpName, "AllowAGVLeave", "1");
}
else
{
MisDataFun.Location_MIS_MOBY_Insert(OpName, "AllowAGVLeave", "0");
}
}
catch (Exception err)
{
MisDataSaveDate.FuntionMesRead.Alarm_SaveFileLog4Error(System.Reflection.MethodBase.GetCurrentMethod().Name, e, "Fun1054", err);
}
}
}
}