1.出库界面展示当前正在进行出库的单据
2.后台退出了入库模式 通知前台扫码枪退出入库 3.对接盟讯公司登录Mes接口 4.接口记录增加本地日志排查问题
This commit is contained in:
@ -72,28 +72,45 @@ namespace WCS.WebApi.Controllers
|
||||
|
||||
finally
|
||||
{
|
||||
var guid = Guid.NewGuid();
|
||||
//TO DO如何将记日志的 和不记日志的分开 解耦
|
||||
if (!context.Request.Path.ToString().Contains("getInterfaceRecord"))
|
||||
{
|
||||
try
|
||||
{
|
||||
Logs.Write($"[记录接口日志]{guid},开始记录{context.Request.Path.ToString()}", LogsType.Api);
|
||||
var logRecord = new SystemApiLogRecord()
|
||||
{
|
||||
DeviceIp = context?.Connection?.RemoteIpAddress?.ToString(),
|
||||
RequestUrl = context.Request.Path,
|
||||
RequestUrl = context.Request?.Path,
|
||||
RequestBody = requestBody,
|
||||
QueryString = context.Request.QueryString.ToString(),
|
||||
QueryString = context.Request?.QueryString.ToString(),
|
||||
IsResponse = true,
|
||||
ResponseJson = responseBody,
|
||||
RequestTime = requestTime,
|
||||
ResponseTime = DateTime.Now,
|
||||
ExecutionTime = stopwatch.ElapsedMilliseconds
|
||||
};
|
||||
await DbHelp.dbLog.Insertable(logRecord).ExecuteCommandAsync();
|
||||
Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
DbHelp.dbLog.Insertable(logRecord).ExecuteCommand();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logs.Write($"[记录接口日志]{guid}保存数据失败!发生异常:" + ex.Message, LogsType.Api);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//TO DO txt记录失败的日志和响应实体
|
||||
Logs.Write($"[记录接口日志]{guid}失败!发生异常:" + e.Message, LogsType.Api);
|
||||
}
|
||||
}
|
||||
else
|
||||
Logs.Write($"[记录接口日志]{guid},不记录getInterfaceRecord", LogsType.Api);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user