mes集成增加MesCallResult

This commit is contained in:
liming 蔡
2026-07-14 16:09:25 +08:00
parent 5d2c7afb9c
commit 2ecfd549b3
12 changed files with 198 additions and 49 deletions
+6 -5
View File
@@ -12,6 +12,7 @@ using JY.Inspection.Frm;
using JY.Inspection.Mes;
using JY.MES;
using JY.MES.Entity;
using JY.MES.Enum;
using JY.MES.MES;
using JY.Model;
using JY.Model.Excel;
@@ -2434,17 +2435,17 @@ namespace JY.Inspection
if (m != null)
{
#region 3、产品结果加工参数
MesResponse resMes = ToMesData.ProductResultParameters(m);
if (!resMes.success)
MesCallResult<RespProductResult> resMes = ToMesData.ProductResultParameters(m);
if (!resMes.IsSuccess)
{
if (resMes.error == 99)
if (resMes.ErrorType == MesErrorType.NetworkError || resMes.ErrorType == MesErrorType.NetworkTimeout)
{
omronPLCCom.lstMcUI[0].WriteDReg("W249", (short)1);//MES网络异常
LogManagerControl.AddLog("结果数据上传MES超时或无法访问MES服务器", LogAddtype.local, Logtype.Error);
}
else
{
LogManagerControl.AddLog("结果数据上传MES失败NG" + resMes.message, LogAddtype.local, Logtype.Error);
LogManagerControl.AddLog("结果数据上传MES失败NG" + resMes.OriResponse.Message, LogAddtype.local, Logtype.Error);
}
}
#endregion
@@ -2469,7 +2470,7 @@ namespace JY.Inspection
}
}
};
RespArrivalStation resp = ToMesData.PostProductExitStationData(req);
RespExitStation resp = ToMesData.PostProductExitStationData(req);
if (resp == null || !resp.Success)
{