feat: 增加LG/TCS-AGV接口并完善物料校验与Function逻辑

This commit is contained in:
XingCheng3
2026-07-16 16:47:45 +08:00
parent 7303ddde9a
commit 8e44e11248
74 changed files with 4324 additions and 1091 deletions

View File

@@ -16,6 +16,9 @@ namespace MesServerFunctions
/// <param name="tagValue"></param>
private void MesRead(object e)
{
string opName = "";
string engineID = "";
string orderForm = "";
{
try
{
@@ -33,6 +36,7 @@ namespace MesServerFunctions
{
DeviceDriver_BasicData.CustomeEvetnArgs msgEvent = (DeviceDriver_BasicData.CustomeEvetnArgs)e;
string OpName = Convert.ToString(msgEvent.OpName);
opName = OpName;
int tagValue = Convert.ToInt32(msgEvent.TagValue);
if (tagValue == 1)
@@ -40,6 +44,8 @@ namespace MesServerFunctions
int qualityMask;
MIS_BASE.GetEngineTypeFromPLC(OpName, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out OrderForm);
engineID = EngineID;
orderForm = OrderForm;
//MIS_BASE.GetEngineTypeFromPLC_MES(OpName, out EngineTypeID_MES, out EngineType_MES, out EngineID_MES, out OrderForm_MES);
//保存数据到线首表 先保存到 北汽福田变速器序列号总线上线 用于之前判断是否重号
// 保存质量数据
@@ -51,7 +57,10 @@ namespace MesServerFunctions
// 测量数据发动机在线状态
MisDataFun.WorkStartInsert(OpName, qualityMask);
// 存追溯表数据
//保存质量数据到 接口表
MisDataFun.SaveQualityInterfaceData(OpName, EngineID);
// 调用工位完工
MisDataFun.WorkOrderOpWorkOver(OpName, EngineID, OrderForm);
// 推送质量数据到MES的页面
@@ -79,7 +88,10 @@ namespace MesServerFunctions
}
catch (Exception err)
{
////ApplicationLog.WriteLog(err, "Function08:MesReadOver");
string logOpName = string.IsNullOrWhiteSpace(opName) ? "Function1052_MesRead" : opName;
string logText = $"MesRead异常订单号={orderForm}, 工件编号={engineID}, 异常={err.Message}";
MisDataSaveDate.Helper.ApiLogHelper.SaveMesLog(logOpName, logText, MisDataSaveDate.Helper.MesLogType.ERROR);
MyLog4Net.MyLogHelper.Error("Function1052_MesRead", $"{logText}{Environment.NewLine}{err}");
}
}