mes集成增加MesCallResult
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user