修改日志类

read_card
CaesarBao 2 months ago
parent 2e755b98a9
commit 49efceff65

@ -3,6 +3,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Models;
using Nancy;
using Serilog;
using SlnMesnac.Model.AirportApiEntity;
using SlnMesnac.Model.domain;
using SlnMesnac.Model.dto;
@ -126,7 +127,7 @@ namespace SlnMesnac.TouchSocket
// 设置标志位为 true表示方法正在执行
iFlag = true;
_RefreshLogMessageAction?.Invoke("接收MES主动读取指令" + JsonSerializer.Serialize(mesReadPara));
_logger.Info("接收MES主动读取指令"+ JsonSerializer.Serialize(mesReadPara));
Log.Information("接收MES主动读取指令"+ JsonSerializer.Serialize(mesReadPara));
string FilterData = rfidAbsractFactory.Find(x => x.ConfigKey == mesReadPara.EQUID).FilterData;
List<TagInfo> rfid = await rfidAbsractFactory.Find(x => x.ConfigKey == mesReadPara.EQUID).GetRFIDAsync();
@ -179,7 +180,7 @@ namespace SlnMesnac.TouchSocket
Msg = Msg,
};
_RefreshLogMessageAction?.Invoke("发送MES主动读取指令" + JsonSerializer.Serialize(response));
_logger.Info("发送MES主动读取指令"+ JsonSerializer.Serialize(response));
Log.Information("发送MES主动读取指令"+ JsonSerializer.Serialize(response));
Real_mesdata real_Mesdata = new Real_mesdata()
{
Combineid = mesReadPara.EQUID.ToString(),
@ -199,7 +200,7 @@ namespace SlnMesnac.TouchSocket
}
catch (Exception ex)
{
_logger.Error("read接口异常" + ex.ToString());
Log.Information("read接口异常" + ex.ToString());
return response;
}
finally
@ -228,7 +229,7 @@ namespace SlnMesnac.TouchSocket
ApiResponse<MesParaData> response = new ApiResponse<MesParaData>();
_RefreshLogMessageAction?.Invoke("接收MES控制报警灯指令" + JsonSerializer.Serialize(mesAlarmLightPara));
_logger.Info("接收MES控制报警灯指令"+ JsonSerializer.Serialize(mesAlarmLightPara));
Log.Information("接收MES控制报警灯指令"+ JsonSerializer.Serialize(mesAlarmLightPara));
if (mesAlarmLightPara.Code == "0")
{
@ -253,7 +254,7 @@ namespace SlnMesnac.TouchSocket
Msg = "sucess",
};
_RefreshLogMessageAction?.Invoke("发送MES控制报警灯指令" + JsonSerializer.Serialize(response));
_logger.Info("发送MES控制报警灯指令"+ JsonSerializer.Serialize(response));
Log.Information("发送MES控制报警灯指令"+ JsonSerializer.Serialize(response));
Real_mesdata real_Mesdata = new Real_mesdata()
{
Combineid = mesAlarmLightPara.EQUID.ToString(),
@ -279,7 +280,7 @@ namespace SlnMesnac.TouchSocket
{
_RefreshLogMessageAction?.Invoke("接收Web下发频段设置指令" + Deviceid + ","+ Para);
_logger.Info("接收Web下发频段设置指令" + Deviceid + "," + Para);
Log.Information("接收Web下发频段设置指令" + Deviceid + "," + Para);
ApiResponse<MesParaData> response = new ApiResponse<MesParaData>();
if (!rfidAbsractFactory.Exists(x => x.deviceid == Deviceid))
{
@ -322,7 +323,7 @@ namespace SlnMesnac.TouchSocket
{
_RefreshLogMessageAction?.Invoke("接收Web下发获取频段指令" + Deviceid);
_logger.Info("接收Web下发获取频段指令" + Deviceid);
Log.Information("接收Web下发获取频段指令" + Deviceid);
string Frequency = "China1";
ApiResponse<MesParaData> response = new ApiResponse<MesParaData>();
//设备编号验证
@ -368,7 +369,7 @@ namespace SlnMesnac.TouchSocket
string Return = "";
_RefreshLogMessageAction?.Invoke("接收Web下发获取过滤数据指令" + Deviceid);
_logger.Info("接收Web下发获取过滤数据指令" + Deviceid);
Log.Information("接收Web下发获取过滤数据指令" + Deviceid);
ApiResponse<MesParaData> response = new ApiResponse<MesParaData>();
//设备编号验证
if (!rfidAbsractFactory.Exists(x => x.deviceid == Deviceid))
@ -413,7 +414,7 @@ namespace SlnMesnac.TouchSocket
{
_RefreshLogMessageAction?.Invoke("接收Web下发设置过滤数据指令" + Deviceid + "," + Para);
_logger.Info("接收Web下发设置过滤数据指令" + Deviceid + "," + Para);
Log.Information("接收Web下发设置过滤数据指令" + Deviceid + "," + Para);
ApiResponse<MesParaData> response = new ApiResponse<MesParaData>();
if (!rfidAbsractFactory.Exists(x => x.deviceid == Deviceid))
{
@ -457,7 +458,7 @@ namespace SlnMesnac.TouchSocket
string Return = "";
_RefreshLogMessageAction?.Invoke("接收Web下发获取设备功率指令" + Deviceid);
_logger.Info("接收Web下发获取设备功率指令" + Deviceid);
Log.Information("接收Web下发获取设备功率指令" + Deviceid);
ApiResponse<MesParaData> response = new ApiResponse<MesParaData>();
//设备编号验证
if (!rfidAbsractFactory.Exists(x => x.deviceid == Deviceid))
@ -502,7 +503,7 @@ namespace SlnMesnac.TouchSocket
{
_RefreshLogMessageAction?.Invoke("接收Web下发设置设备功率指令" + Deviceid + "," + Para);
_logger.Info("接收Web下发设置设备功率指令" + Deviceid + "," + Para);
Log.Information("接收Web下发设置设备功率指令" + Deviceid + "," + Para);
ApiResponse<MesParaData> response = new ApiResponse<MesParaData>();
if (!rfidAbsractFactory.Exists(x => x.deviceid == Deviceid))
{

@ -1,4 +1,5 @@
using SlnMesnac.Common;
using Serilog;
using SlnMesnac.Common;
using SlnMesnac.Model.domain;
using SlnMesnac.Model.dto;
using SlnMesnac.Rfid.Dto;
@ -70,7 +71,7 @@ namespace SlnMesnac.Rfid.Factory
if (e.Memory.Span.ToArray()[3] == 0x02)
{
_logger.Info($"{m_deviceID},IP:{m_strIP}接收自报{_stringChange.bytesToHexStr(receivedBuffer, receivedBuffer.Length)}");
Log.Information($"{m_deviceID},IP:{m_strIP}接收自报{_stringChange.bytesToHexStr(receivedBuffer, receivedBuffer.Length)}");
byte[] resultBuffer = PareReceiveBufferData(receivedBuffer, receivedBuffer.Length);
List<TagInfo> tagInfoList = Device_DealTagInfoList(resultBuffer);
string info = "";
@ -87,7 +88,7 @@ namespace SlnMesnac.Rfid.Factory
}
else
{
_logger.Info($"{m_deviceID},IP:{m_strIP}接收原始报文{_stringChange.bytesToHexStr(receivedBuffer, receivedBuffer.Length)}");
Log.Information($"{m_deviceID},IP:{m_strIP}接收原始报文{_stringChange.bytesToHexStr(receivedBuffer, receivedBuffer.Length)}");
}
//MesParaData mesParaData = new MesParaData()
@ -171,17 +172,17 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
//_logger.Info($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
//Log.Information($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Filter = Filter + "\r\n";
//byte[] reciveBuffer = await waitClient.SendThenReturnAsync(Filter + "\r\n", 2000);
using (var responsedData = await waitClient.SendThenResponseAsync(Filter, 2000))
{
var memory = responsedData.Memory;
string result = Encoding.GetEncoding("GBK").GetString(memory.ToArray(), 0, memory.Length);
_logger.Info($"{m_deviceID}接收设置过滤指令{result}");
Log.Information($"{m_deviceID}接收设置过滤指令{result}");
return true;
}
//_logger.Info($"{m_deviceID}接收修改功率指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
//Log.Information($"{m_deviceID}接收修改功率指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
}
return iflag;
}
@ -210,7 +211,7 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
//_logger.Info($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
//Log.Information($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
//byte[] reciveBuffer = await waitClient.SendThenReturnAsync("filter?\r\n", 2000);
@ -218,7 +219,7 @@ namespace SlnMesnac.Rfid.Factory
{
var memory = responsedData.Memory;
string result = Encoding.GetEncoding("GBK").GetString(memory.ToArray(), 0, memory.Length);
_logger.Info($"{m_deviceID}接收设置过滤指令{result}");
Log.Information($"{m_deviceID}接收设置过滤指令{result}");
return result;
}
return iflag;
@ -265,11 +266,11 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
_logger.Info($"{m_deviceID}发送设置频段指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Log.Information($"{m_deviceID}发送设置频段指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
using (var responsedData = await waitClient.SendThenResponseAsync(pMessagePack.m_pData, 2000))
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}接收设置频段指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID}接收设置频段指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
if (reciveBuffer[3] == 0x44)
{
iflag = true;
@ -318,11 +319,11 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
_logger.Info($"{m_deviceID}发送获取频段指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Log.Information($"{m_deviceID}发送获取频段指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
using (var responsedData = await waitClient.SendThenResponseAsync(pMessagePack.m_pData, 2000))
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}接收获取频段指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID}接收获取频段指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
if (reciveBuffer[3] == 0x74)
{
byte bDB = reciveBuffer[5];
@ -692,7 +693,7 @@ namespace SlnMesnac.Rfid.Factory
iFirstPC = iFirstAnt + 1;
iFirstLeftBarcketPos = iFirstLeftBarcketPos + iBarcodeLength + 5;
_RefreshLogMessageAction?.Invoke($"----{m_deviceID}第[" + (iCommonSecondFlag + 1) + "]次数据解析为:" + tag.EPCstring + ",\r\n读取标签次数[" + tempDataCount + "],标签信号强度:[" + tempDataRSSI + "],天线号:[" + tempDataANT + "]");
_logger.Info($"----{m_deviceID}第[" + (iCommonSecondFlag + 1) + "]次数据解析为:" + tag.EPCstring + ",读取标签次数:[" + tempDataCount + "],标签信号强度:[" + tempDataRSSI + "],天线号:[" + tempDataANT + "]");
Log.Information($"----{m_deviceID}第[" + (iCommonSecondFlag + 1) + "]次数据解析为:" + tag.EPCstring + ",读取标签次数:[" + tempDataCount + "],标签信号强度:[" + tempDataRSSI + "],天线号:[" + tempDataANT + "]");
iCommonSecondFlag++;
if (iCommonSecondFlag == iBarcodeGroupCount)
{

@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Models;
using Serilog;
using SlnMesnac.Common;
using SlnMesnac.Model.domain;
using SlnMesnac.Model.dto;
@ -127,7 +128,7 @@ namespace SlnMesnac.Rfid.Factory
{
DealMessageData(receivedBuffer);
}
//_logger.Info($"{m_deviceID},IP:{m_strIP}接收自报{_stringChange.bytesToHexStr(receivedBuffer, receivedBuffer.Length)}");
//Log.Information($"{m_deviceID},IP:{m_strIP}接收自报{_stringChange.bytesToHexStr(receivedBuffer, receivedBuffer.Length)}");
//byte[] resultBuffer = PareReceiveBufferData(receivedBuffer, receivedBuffer.Length);
//List<TagInfo> tagInfoList = Device_DealTagInfoList(resultBuffer);
//string info = "";
@ -144,7 +145,7 @@ namespace SlnMesnac.Rfid.Factory
}
else
{
_logger.Info($"{m_deviceID},IP:{m_strIP}接收原始报文{_stringChange.bytesToHexStr(receivedBuffer, receivedBuffer.Length)}");
Log.Information($"{m_deviceID},IP:{m_strIP}接收原始报文{_stringChange.bytesToHexStr(receivedBuffer, receivedBuffer.Length)}");
}
}
@ -160,7 +161,7 @@ namespace SlnMesnac.Rfid.Factory
}
catch (Exception e)
{
_logger.Error($"{m_deviceID},IP:{m_strIP}数据接收异常" + e.Message);
Log.Information($"{m_deviceID},IP:{m_strIP}数据接收异常" + e.Message);
return false;
}
}
@ -218,10 +219,10 @@ namespace SlnMesnac.Rfid.Factory
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}发送读取指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Log.Information($"{m_deviceID}发送读取指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
byte[] resultBuffer = PareReceiveBufferData(reciveBuffer, reciveBuffer.Length);
_logger.Info($"{m_deviceID}接收读取指令{_stringChange.bytesToHexStr(resultBuffer, resultBuffer.Length)}");
Log.Information($"{m_deviceID}接收读取指令{_stringChange.bytesToHexStr(resultBuffer, resultBuffer.Length)}");
tagInfoList = Device_DealTagInfoList(resultBuffer);
@ -232,7 +233,7 @@ namespace SlnMesnac.Rfid.Factory
}
catch (Exception e)
{
_logger.Error($"{m_deviceID}数据接收异常"+ e);
Log.Information($"{m_deviceID}数据接收异常"+ e);
return tagInfoList;
//throw new InvalidOperationException($"{m_strIP}按时间段盘点异常:{e.Message}");
}
@ -366,11 +367,11 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
_logger.Info($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Log.Information($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
using (var responsedData = await waitClient.SendThenResponseAsync(pMessagePack.m_pData, 2000))
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}接收修改功率指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID}接收修改功率指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
if (reciveBuffer[3] == 0x42)
{
return true;
@ -421,7 +422,7 @@ namespace SlnMesnac.Rfid.Factory
using (var responsedData = await waitClient.SendThenResponseAsync(pMessagePack.m_pData, 2000))
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}接收修改功率指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID}接收修改功率指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
if (reciveBuffer[3] == 0x72)
{
byte[] bDB = new byte[2];
@ -463,7 +464,7 @@ namespace SlnMesnac.Rfid.Factory
}
catch (Exception ex)
{
_logger.Error(ex.Message);
Log.Information(ex.Message);
}
}
@ -499,11 +500,11 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
_logger.Info($"{m_deviceID}发送停止连续盘点指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Log.Information($"{m_deviceID}发送停止连续盘点指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
using (var responsedData = await waitClient.SendThenResponseAsync(pMessagePack.m_pData, 2000))
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}接收停止连续盘点指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID}接收停止连续盘点指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
if (reciveBuffer[3] == 0x12)
{
return true;
@ -551,11 +552,11 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
_logger.Info($"{m_deviceID}发送连续盘点指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Log.Information($"{m_deviceID}发送连续盘点指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
using (var responsedData = await waitClient.SendThenResponseAsync(pMessagePack.m_pData, 2000))
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}接收连续盘点指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID}接收连续盘点指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
if (reciveBuffer[3] == 0x11)
{
return true;
@ -646,11 +647,11 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
_logger.Info($"{m_deviceID}发送写入指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Log.Information($"{m_deviceID}发送写入指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
using (var responsedData = await waitClient.SendThenResponseAsync(pMessagePack.m_pData, 2000))
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}接收写入指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID}接收写入指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
if (reciveBuffer[3] == 0x03 && reciveBuffer[4] == 0x00)
{
return true;
@ -967,7 +968,7 @@ namespace SlnMesnac.Rfid.Factory
iFirstPC = iFirstAnt + 1;
iFirstLeftBarcketPos = iFirstLeftBarcketPos + iBarcodeLength + 5;
_RefreshLogMessageAction?.Invoke($"----{m_deviceID}第[" + (iCommonSecondFlag + 1) + "]次数据解析为:" + tag.EPCstring + ",\r\n读取标签次数[" + tempDataCount + "],标签信号强度:[" + tempDataRSSI + "],天线号:[" + tempDataANT + "]");
_logger.Info($"----{m_deviceID}第[" + (iCommonSecondFlag + 1) + "]次数据解析为:" + tag.EPCstring + ",读取标签次数:[" + tempDataCount + "],标签信号强度:[" + tempDataRSSI + "],天线号:[" + tempDataANT + "]");
Log.Information($"----{m_deviceID}第[" + (iCommonSecondFlag + 1) + "]次数据解析为:" + tag.EPCstring + ",读取标签次数:[" + tempDataCount + "],标签信号强度:[" + tempDataRSSI + "],天线号:[" + tempDataANT + "]");
iCommonSecondFlag++;
if (iCommonSecondFlag == iBarcodeGroupCount)
{
@ -987,7 +988,7 @@ namespace SlnMesnac.Rfid.Factory
catch (Exception ex)
{
//mutauto.ReleaseMutex();
_logger.Error($"{m_deviceID},IP:{m_strIP}Device_AutoDealContent异常" + ex.Message);
Log.Information($"{m_deviceID},IP:{m_strIP}Device_AutoDealContent异常" + ex.Message);
return tagInfoList;
//throw new InvalidOperationException($"Device_AutoDealContent 自动处理函数异常:{ex.Message}");
}
@ -1072,7 +1073,7 @@ namespace SlnMesnac.Rfid.Factory
iFirstPC = iFirstAnt + 1;
iFirstLeftBarcketPos = iFirstLeftBarcketPos + iBarcodeLength + 5;
_RefreshLogMessageAction?.Invoke($"----{m_deviceID}第[" + (iCommonSecondFlag + 1) + "]次数据解析为:" + tag.EPCstring + ",\r\n读取标签次数[" + tempDataCount + "],标签信号强度:[" + tempDataRSSI + "],天线号:[" + tempDataANT + "]");
_logger.Info($"----{m_deviceID}第[" + (iCommonSecondFlag + 1) + "]次数据解析为:" + tag.EPCstring + ",读取标签次数:[" + tempDataCount + "],标签信号强度:[" + tempDataRSSI + "],天线号:[" + tempDataANT + "]");
Log.Information($"----{m_deviceID}第[" + (iCommonSecondFlag + 1) + "]次数据解析为:" + tag.EPCstring + ",读取标签次数:[" + tempDataCount + "],标签信号强度:[" + tempDataRSSI + "],天线号:[" + tempDataANT + "]");
iCommonSecondFlag++;
if (iCommonSecondFlag == iBarcodeGroupCount)
{
@ -1092,7 +1093,7 @@ namespace SlnMesnac.Rfid.Factory
catch (Exception ex)
{
//mutauto.ReleaseMutex();
_logger.Error($"{m_deviceID},IP:{m_strIP}Device_AutoDealContent异常" + ex.Message);
Log.Information($"{m_deviceID},IP:{m_strIP}Device_AutoDealContent异常" + ex.Message);
return tagInfoList;
//throw new InvalidOperationException($"Device_AutoDealContent 自动处理函数异常:{ex.Message}");
}
@ -1132,17 +1133,17 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
//_logger.Info($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
//Log.Information($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Filter = Filter + "\r\n";
//byte[] reciveBuffer = await waitClient.SendThenReturnAsync(Filter + "\r\n", 2000);
using (var responsedData = await waitClient.SendThenResponseAsync(Filter, 2000))
{
var memory = responsedData.Memory;
string result = Encoding.GetEncoding("GBK").GetString(memory.ToArray(), 0, memory.Length);
_logger.Info($"{m_deviceID}接收设置过滤指令{result}");
Log.Information($"{m_deviceID}接收设置过滤指令{result}");
return true;
}
//_logger.Info($"{m_deviceID}接收修改功率指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
//Log.Information($"{m_deviceID}接收修改功率指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
}
return iflag;
}
@ -1174,7 +1175,7 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
//_logger.Info($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
//Log.Information($"{m_deviceID}发送修改功率指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
//byte[] reciveBuffer = await waitClient.SendThenReturnAsync("filter?\r\n", 2000);
@ -1182,7 +1183,7 @@ namespace SlnMesnac.Rfid.Factory
{
var memory = responsedData.Memory;
string result = Encoding.GetEncoding("GBK").GetString(memory.ToArray(), 0, memory.Length);
_logger.Info($"{m_deviceID}接收设置过滤指令{result}");
Log.Information($"{m_deviceID}接收设置过滤指令{result}");
return result;
}
return iflag;
@ -1233,11 +1234,11 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
_logger.Info($"{m_deviceID}发送设置频段指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Log.Information($"{m_deviceID}发送设置频段指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
using (var responsedData = await waitClient.SendThenResponseAsync(pMessagePack.m_pData, 2000))
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}接收设置频段指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID}接收设置频段指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
if (reciveBuffer[3] == 0x44)
{
iflag = true;
@ -1290,11 +1291,11 @@ namespace SlnMesnac.Rfid.Factory
return false;
}
});
_logger.Info($"{m_deviceID}发送获取频段指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
Log.Information($"{m_deviceID}发送获取频段指令{_stringChange.bytesToHexStr(pMessagePack.m_pData, pMessagePack.m_pData.Length)}");
using (var responsedData = await waitClient.SendThenResponseAsync(pMessagePack.m_pData, 2000))
{
var reciveBuffer = responsedData.Memory.ToArray();
_logger.Info($"{m_deviceID}接收获取频段指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID}接收获取频段指令{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
if (reciveBuffer[3] == 0x74)
{
byte bDB = reciveBuffer[5];
@ -1320,7 +1321,7 @@ namespace SlnMesnac.Rfid.Factory
//连续盘点返回
if (reciveBuffer[3] == 0x01)
{
_logger.Info($"{m_deviceID},IP:{m_strIP}接收自报{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID},IP:{m_strIP}接收自报{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
byte[] resultBuffer = PareReceiveBufferData(reciveBuffer, reciveBuffer.Length);
List<TagInfo> tagInfoList = Device_LXDealTagInfoList(resultBuffer);
string info = "";
@ -1339,7 +1340,7 @@ namespace SlnMesnac.Rfid.Factory
//按时间段盘点返回
if (reciveBuffer[3] == 0x02)
{
_logger.Info($"{m_deviceID},IP:{m_strIP}接收自报{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
Log.Information($"{m_deviceID},IP:{m_strIP}接收自报{_stringChange.bytesToHexStr(reciveBuffer, reciveBuffer.Length)}");
byte[] resultBuffer = PareReceiveBufferData(reciveBuffer, reciveBuffer.Length);
List<TagInfo> tagInfoList = Device_DealTagInfoList(resultBuffer);
string info = "";
@ -1358,7 +1359,7 @@ namespace SlnMesnac.Rfid.Factory
}
catch (Exception ex)
{
_logger.Error($"》》》设备:{m_deviceID},IP:{m_strIP},处理数据异常:{ex}");
Log.Information($"》》》设备:{m_deviceID},IP:{m_strIP},处理数据异常:{ex}");
}
}
public override async Task<bool> SendHeartPack()

@ -124,7 +124,7 @@ namespace SlnMesnac.TouchSocket
if (responseValue != null)
{
Console.WriteLine("MES接口返回:" + JsonSerializer.Serialize(responseValue));
// _logger.Info("MES接口返回:" + JsonSerializer.Serialize(responseValue));
// Log.Information("MES接口返回:" + JsonSerializer.Serialize(responseValue));
rFIDDeviceApiResponse = JsonSerializer.Deserialize<RFIDDeviceApiResponse<MesOrderInfo>>(responseValue);
Console.WriteLine("MES接口返回成功");
return responseValue;
@ -139,7 +139,7 @@ namespace SlnMesnac.TouchSocket
{
rFIDDeviceApiResponse.Code = 202;
Console.WriteLine(ex.ToString());
_logger.Error(ex.Message);
Log.Information(ex.Message);
return "202";
}
@ -174,14 +174,14 @@ namespace SlnMesnac.TouchSocket
JToken responseValue = await MESHttpClient.InvokeTAsync<JToken>("POST:/autoread", null, requestValue);
_RefreshLogMessageAction?.Invoke("发送MES自动读取指令"+JsonSerializer.Serialize(requestValue));
_logger.Info("发送MES自动读取指令"+ JsonSerializer.Serialize(requestValue));
Log.Information("发送MES自动读取指令"+ JsonSerializer.Serialize(requestValue));
RefreshStateEvent?.Invoke(requestValue.EQUID,requestValue.EPCID);
return JTokenToEntity<ApiResponse<MesParaData>>(responseValue);
}
catch (Exception ex)
{
_logger.Info("autoread ERROR: " + ex.Message);
Log.Information("autoread ERROR: " + ex.Message);
return new ApiResponse<MesParaData>();
}

@ -48,25 +48,38 @@ namespace SlnMesnac.Serilog
// 使用实例数据路径下的Logs目录
logPath = Path.Combine(appConfig.InstanceDataPath, "Logs");
}
Console.WriteLine($"[DEBUG] Serilog 日志路径: {logPath}");
Console.WriteLine($"[DEBUG] InstanceDataPath: {appConfig?.InstanceDataPath}");
// 确保日志目录存在
EnsureLogDirectories(logPath);
#endregion
// Log.Logger = new LoggerConfiguration()
//.MinimumLevel.Information()
//.Enrich.WithProperty("InstanceId", appConfig?.InstanceId ?? "Unknown")
//.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3} {InstanceId}] {Message:lj}{NewLine}{Exception}")
//// ✅ 先用最简单的配置测试,去掉所有 Filter
//.WriteTo.File(
// Path.Combine(logPath, "app.log"),
// rollingInterval: RollingInterval.Day,
// shared: true)
//.CreateLogger();
// 构建日志配置包含实例ID作为上下文
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.Enrich.WithProperty("InstanceId", appConfig?.InstanceId ?? "Unknown")
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3} {InstanceId}] {Message:lj}{NewLine}{Exception}")
.WriteTo.Logger(lc => lc
.Filter.ByIncludingOnly(logEvent =>
logEvent.Properties.ContainsKey("Module") &&
logEvent.Properties["Module"].ToString().Contains("Info"))
//.Filter.ByIncludingOnly(logEvent =>
// logEvent.Properties.ContainsKey("Module") &&
// logEvent.Properties["Module"].ToString().Contains("Info"))
.WriteTo.File(
Path.Combine($"{logPath}/Info/", "Info.log"),
rollingInterval: RollingInterval.Day,
outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff} {Level:u3} {InstanceId}] {Message:lj}{NewLine}{Exception}",
shared: true,
retainedFileCountLimit: 7)) // 保留最近7天的日志文件
.WriteTo.Logger(lc => lc
.Filter.ByIncludingOnly(logEvent =>
@ -76,6 +89,7 @@ namespace SlnMesnac.Serilog
Path.Combine($"{logPath}/Data/", "Data.log"),
rollingInterval: RollingInterval.Day,
outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff} {Level:u3} {InstanceId}] {Message:lj}{NewLine}{Exception}",
shared: true,
retainedFileCountLimit: 7))
.WriteTo.Logger(lc => lc
.Filter.ByIncludingOnly(logEvent =>
@ -85,6 +99,7 @@ namespace SlnMesnac.Serilog
Path.Combine($"{logPath}/Error/", "Error.log"),
rollingInterval: RollingInterval.Day,
outputTemplate: "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff} {Level:u3} {InstanceId}] {Message:lj}{NewLine}{Exception}",
shared: true,
retainedFileCountLimit: 30)) // 错误日志保留更长时间
.CreateLogger();
}

@ -1,4 +1,5 @@
using SlnMesnac.Common;
using Serilog;
using SlnMesnac.Common;
using SlnMesnac.Model.dto;
using SlnMesnac.Model.Enum;
using SlnMesnac.Serilog;
@ -73,7 +74,7 @@ namespace SlnMesnac.TouchSocket
{
_service.Connecting = (client, e) =>
{
_logger.Info($"客户端{client.IP}正在接入服务");
Log.Information($"客户端{client.IP}正在接入服务");
if (!client.IsClient)
{
e.Id = $"{client.IP}:{client.Port}";
@ -82,13 +83,13 @@ namespace SlnMesnac.TouchSocket
};
_service.Connected = (client, e) =>
{
_logger.Info($"客户端{client.IP}接入服务成功");
Log.Information($"客户端{client.IP}接入服务成功");
RefreshClientInfoEvent?.Invoke(_service);
return EasyTask.CompletedTask;
};
_service.Closed = (client, e) =>
{
_logger.Info($"客户端{client.IP}断开连接");
Log.Information($"客户端{client.IP}断开连接");
RefreshClientInfoEvent?.Invoke(_service);
return EasyTask.CompletedTask;
};
@ -124,7 +125,7 @@ namespace SlnMesnac.TouchSocket
//自定义插件
}));
_service.StartAsync();
_logger.Info($"TcpServer启动成功监听端口{serverPort}");
Log.Information($"TcpServer启动成功监听端口{serverPort}");
Task.Run(async delegate
{
//await Task.Delay(1000 * 20);
@ -134,7 +135,7 @@ namespace SlnMesnac.TouchSocket
catch (Exception ex)
{
//throw new InvalidOperationException($"TcpServer启动异常{ex.Message}");
_logger.Error($"TcpServer启动异常{ex.Message}");
Log.Information($"TcpServer启动异常{ex.Message}");
}
}
public byte DealMessage(byte[] bytes)
@ -216,7 +217,7 @@ namespace SlnMesnac.TouchSocket
}
catch (Exception ex)
{
_logger.Error($"SendHeartBeat异常{ex.Message}");
Log.Information($"SendHeartBeat异常{ex.Message}");
}
Thread.Sleep(1000 * 5 * 1);
@ -273,12 +274,12 @@ namespace SlnMesnac.TouchSocket
await tcpSessionClient.SendAsync(readOnlyMemory);
}
#endregion
_logger.Info($"{pMessagePack.iStationId}发送原始报文{_stringChange.bytesToHexStr(SendBuffer, SendBuffer.Length)}");
Log.Information($"{pMessagePack.iStationId}发送原始报文{_stringChange.bytesToHexStr(SendBuffer, SendBuffer.Length)}");
}
}
catch (Exception ex)
{
_logger.Error($"SendMessage异常{ex.Message}");
Log.Information($"SendMessage异常{ex.Message}");
}
}

@ -90,25 +90,27 @@ namespace SlnMesnac.WPF
// 创建ServiceProvider
ServiceProvider = services.BuildServiceProvider();
ServiceProvider.UseTouchSocketExtensions();
// 配置Serilog和其他扩展
ServiceProvider.UseSerilogExtensions();
// 获取AppConfig并更新实例特定的配置
var appConfig = ServiceProvider.GetService<AppConfig>();
if (appConfig != null)
{
// 更新日志路径为实例专用路径
appConfig.logPath = Path.Combine(_instanceDataPath, "Logs");
Directory.CreateDirectory(appConfig.logPath);
//var appConfig = ServiceProvider.GetService<AppConfig>();
//if (appConfig != null)
//{
// // 更新日志路径为实例专用路径
// appConfig.logPath = Path.Combine(_instanceDataPath, "Logs");
// Directory.CreateDirectory(appConfig.logPath);
// 更新其他可能需要实例化的路径
appConfig.InstanceId = _instanceId;
appConfig.InstanceDataPath = _instanceDataPath;
// // 更新其他可能需要实例化的路径
// appConfig.InstanceId = _instanceId;
// appConfig.InstanceDataPath = _instanceDataPath;
// 根据实例ID调整数据库连接如果需要
// AdjustDatabaseConnectionForInstance(appConfig);
}
// // 根据实例ID调整数据库连接如果需要
// // AdjustDatabaseConnectionForInstance(appConfig);
//}
// 配置Serilog和其他扩展
ServiceProvider.UseSerilogExtensions();
// 显示主窗口
var loginWindow = ServiceProvider.GetRequiredService<MainWindow>();
loginWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
@ -120,7 +122,7 @@ namespace SlnMesnac.WPF
serilog = ServiceProvider.GetRequiredService<SerilogHelper>();
serilog.Info($"应用程序启动 - 实例ID: {_instanceId}, 进程ID: {Process.GetCurrentProcess().Id}");
serilog.Info($"日志目录: {appConfig?.logPath}");
//serilog.Info($"日志目录: {appConfig?.logPath}");
//serilog.Data($"数据目录: {_instanceDataPath}");
//serilog.Error($"日志目录: {appConfig?.logPath}");
}
@ -400,12 +402,11 @@ namespace SlnMesnac.WPF
.AsSelf()
.WithSingletonLifetime());
services.Scan(scan => scan
.FromAssemblyOf<MainWindow>()
.AddClasses(classes => classes.WithAttribute<RegisterAsTransientAttribute>())
.AsSelf()
.WithTransientLifetime());
//services.AddSingleton<Action<Real_DataInfo>>();
//services.Scan(scan => scan
// .FromAssemblyOf<MainWindow>()
// .AddClasses(classes => classes.WithAttribute<RegisterAsTransientAttribute>())
// .AsSelf()
// .WithTransientLifetime());
// 注册ORM
services.AddSqlSugarSetup();

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Serilog;
using SlnMesnac.Model.AirportApiEntity;
using SlnMesnac.Serilog;
using SlnMesnac.TouchSocket;
@ -68,12 +69,12 @@ namespace SlnMesnac.WPF
private void Window_Loaded(object sender, RoutedEventArgs e)
{
_logger.Info("系统启动!");
Log.Information("系统启动!");
}
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
_logger.Info("系统关闭!");
Log.Information("系统关闭!");
}

@ -125,7 +125,7 @@
</StackPanel>
<StackPanel Grid.Column="1" >
<Button
Content="查询" Width="200" FontSize="20" Command="{Binding GetOrderInfoCommand}" CommandParameter="{Binding Name,ElementName=Search}"
Content="查询" Width="200" Visibility="Hidden" FontSize="20" Command="{Binding GetOrderInfoCommand}" CommandParameter="{Binding Name,ElementName=Search}"
Background="#009999" Margin="0 0 100 0"/>
</StackPanel>

@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging;
using Models;
using Nancy;
using Nancy.Json;
using Serilog;
using SlnMesnac.Common;
using SlnMesnac.Config;
using SlnMesnac.Model.domain;
@ -106,6 +107,7 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
};
WeakReferenceMessenger.Default.Send(real_Data);
MessageBox.Show("MES订单切换成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
Log.Information($"{mesOrderNo}MES订单切换成功{JsonSerializer.Serialize(real_Data)}");
}
/// <summary>
@ -161,9 +163,10 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
if (responsejson.Code != 200)
{
MessageBox.Show("MES订单获取失败!" + responsejson.Code + responsejson.Msg, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
Log.Information($"MES订单获取失败{JsonSerializer.Serialize(responsejson)}");
return;
}
Console.WriteLine("序列化:" + responsejson.Code);
//Console.WriteLine("序列化:" + responsejson.Code);
if (response != null)
{
@ -177,8 +180,8 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
}
catch (Exception ex)
{
Console.WriteLine($"JSON解析失败: {ex.Message}");
Console.WriteLine($"原始内容: {response}");
Log.Information($"JSON解析失败: {ex.Message}");
Log.Information($"原始内容: {response}");
}
}

@ -4,6 +4,7 @@ using GalaSoft.MvvmLight;
using HslCommunication.Enthernet;
using Microsoft.Extensions.DependencyInjection;
using Models;
using Serilog;
using SlnMesnac.Common;
using SlnMesnac.Config;
using SlnMesnac.Model.domain;
@ -106,7 +107,7 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
CurrentDateTime = DateTime.Now;
};
_timer.Start();
Log.Information("RFID输送带系统启动");
}
private void RefreshData(object? t)
@ -281,7 +282,7 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
return;
}
//拼接订单号写入标签
string WriteData = Deviceinfo.FirstOrDefault(x => x.Deviceid == iCombineId).RfidASCII + Deviceinfo.FirstOrDefault(x => x.Deviceid == iCombineId).OrderNo + Deviceinfo.FirstOrDefault(x => x.Deviceid == iCombineId).LineNo + DateTime.Now.ToString("yy")+ Deviceinfo.FirstOrDefault(x => x.Deviceid == iCombineId).SerialNo + Deviceinfo.FirstOrDefault(x => x.Deviceid == iCombineId).SerialNo;
string WriteData = Deviceinfo.FirstOrDefault(x => x.Deviceid == iCombineId).OrderNo + Deviceinfo.FirstOrDefault(x => x.Deviceid == iCombineId).LineNo + DateTime.Now.ToString("yy")+ Deviceinfo.FirstOrDefault(x => x.Deviceid == iCombineId).SerialNo + Deviceinfo.FirstOrDefault(x => x.Deviceid == iCombineId).SerialNo;
////测试写入
//bool writeflag = await rfidList.FirstOrDefault(x => x.deviceid == iCombineId).Set_Write(Encoding.ASCII.GetString(tagInfos[0].EPC), "JG26522604101");
//if (!writeflag)
@ -320,7 +321,7 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
}
catch (Exception e)
{
_logger.Error($"RecvIdentifyData_Instance异常{e.Message}");
Log.Error($"RecvIdentifyData_Instance异常{e.Message}");
}
}
public void RefreshEventArgs(string iCombineId, List<TagInfo> tagInfos)
@ -336,7 +337,7 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
}
catch (Exception ex)
{
_logger.Error($"异常:{ex.Message}");
Log.Information($"异常:{ex.Message}");
}
}
// 添加数据的方法(核心:添加前/后判断行数)
@ -407,7 +408,7 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
}
catch (Exception ex)
{
_logger.Error($"监听设备状态异常:{ex.Message}");
Log.Information($"监听设备状态异常:{ex.Message}");
}
await Task.Delay(1000 * 30);
}
@ -478,40 +479,40 @@ namespace SlnMesnac.WPF.ViewModel.IndexPage
}
}
//存库,如果没有则插入如果存在则更新
lock (string.Empty)
{
try
{
List<Base_device_state> Base_device_state = sqlSugarClient.Ado.Context.CopyNew().Queryable<Base_device_state>().Where(x => x.DeviceId == int.Parse(device.deviceid)).ToList();
if (Base_device_state != null && Base_device_state.Count > 0)
{
//只更新
Base_device_state[0].DeviceState = iflag ? 1 : 0;
Base_device_state[0].DeviceTime = DateTime.Now;
sqlSugarClient.Ado.Context.CopyNew().Updateable(Base_device_state).UpdateColumns(it => new { it.DeviceState, it.DeviceTime }).ExecuteCommand();
}
else
{
Base_device_state base_device_state = new Base_device_state()
{
DeviceId = int.Parse(device.deviceid),
DeviceState = iflag ? 1 : 0,
DeviceTime = DateTime.Now,
};
var a = sqlSugarClient.Ado.Context.CopyNew().Insertable<Base_device_state>(base_device_state).ExecuteCommand();
}
}
catch (Exception ex)
{
_logger.Error($"更新RFID状态异常:{ex.Message}", ex);
}
}
//lock (string.Empty)
//{
// try
// {
// List<Base_device_state> Base_device_state = sqlSugarClient.Ado.Context.CopyNew().Queryable<Base_device_state>().Where(x => x.DeviceId == int.Parse(device.deviceid)).ToList();
// if (Base_device_state != null && Base_device_state.Count > 0)
// {
// //只更新
// Base_device_state[0].DeviceState = iflag ? 1 : 0;
// Base_device_state[0].DeviceTime = DateTime.Now;
// sqlSugarClient.Ado.Context.CopyNew().Updateable(Base_device_state).UpdateColumns(it => new { it.DeviceState, it.DeviceTime }).ExecuteCommand();
// }
// else
// {
// Base_device_state base_device_state = new Base_device_state()
// {
// DeviceId = int.Parse(device.deviceid),
// DeviceState = iflag ? 1 : 0,
// DeviceTime = DateTime.Now,
// };
// var a = sqlSugarClient.Ado.Context.CopyNew().Insertable<Base_device_state>(base_device_state).ExecuteCommand();
// }
// }
// catch (Exception ex)
// {
// Log.Information($"更新RFID状态异常:{ex.Message}", ex);
// }
//}
}
catch (Exception ex)
{
_logger.Error($"更新RFID状态异常:{ex.Message}", ex);
Log.Information($"更新RFID状态异常:{ex.Message}", ex);
}
}

@ -3,6 +3,7 @@ using GalaSoft.MvvmLight.Command;
using HslCommunication.Enthernet;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Serilog;
using SlnMesnac.Business.@base;
using SlnMesnac.Config;
using SlnMesnac.Extensions;
@ -171,7 +172,7 @@ namespace SlnMesnac.WPF.ViewModel
}
catch (Exception ex)
{
_logger.Error("窗体控制逻辑异常", ex);
Log.Information("窗体控制逻辑异常", ex);
}
}
@ -199,7 +200,7 @@ namespace SlnMesnac.WPF.ViewModel
}
catch (Exception ex)
{
_logger.Error("界面跳转逻辑异常", ex);
Log.Information("界面跳转逻辑异常", ex);
}
}

Loading…
Cancel
Save