Quellcode durchsuchen

新增异常上报记录

Administrator vor 3 Jahren
Ursprung
Commit
c33c632025

+ 9 - 0
Projects/永冠OPP/WCS.Service/Log/InfoLog.cs

@@ -143,5 +143,14 @@ namespace WCS.Service.Log
         {
             Log.Info(msg, "INFO_TIMING");
         }
+
+        /// <summary>
+        /// WCS异常上抛记录
+        /// </summary>
+        /// <param name="msg"></param>
+        public static void INFO_I_WCS_GetExcTask(string msg)
+        {
+            Log.Info(msg, "INFO_UPEX");
+        }
     }
 }

+ 3 - 2
Projects/永冠OPP/WCS.Service/WebApi/WMS/WMS.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
 using WCS.Service.Entity;
+using WCS.Service.Log;
 
 namespace WCS.Service
 {
@@ -254,8 +255,8 @@ namespace WCS.Service
                         EquipmentNo = device,
                         ExcMessage = exMsg,
                     });
-                    if (!res.ResType)
-                        throw new WarnException(res.ResMessage);
+                    InfoLog.INFO_I_WCS_GetExcTask(device + ":" + exMsg);
+                    if (!res.ResType) throw new WarnException(res.ResMessage);
                 }
                 catch (Exception ex)
                 {

+ 2 - 1
Projects/永冠OPP/WCS.Service/config.json

@@ -16,7 +16,8 @@
         "INFO_WMSREQUEST": "INFO_WMSRequest",
         "INFO_WARN": "Info_Warn",
         "INFO_PLCREADLOG": "Info_PlcReadLog",
-        "INFO_TIMING": "Info_Timing"
+        "INFO_TIMING": "Info_Timing",
+        "INFO_UPEX": "INFO_I_WCS_GetExcTask"
       }
     },
     {