分档
This commit is contained in:
@@ -783,14 +783,14 @@ namespace JinYuan.MES
|
||||
long outTime = sw.ElapsedMilliseconds;
|
||||
if (outTime > 1000)
|
||||
{
|
||||
LoggerHelp.WriteLog($"预焊出站PC<=>MES上传耗时:{outTime}ms,电芯码:{listBar.CSBYHCODEA}", "MESTime");
|
||||
LoggerHelp.WriteLog($"外观检出站PC<=>MES上传耗时:{outTime}ms,电芯码:{listBar.CSBYHCODEA}", "MESTime");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(result))
|
||||
{
|
||||
string resData = result == "" ? "" : result;
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(组装)\{nowDate.ToString("HH")}.txt", resJson);
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(包装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(包装)\{nowDate.ToString("HH")}.txt", resJson);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -799,22 +799,22 @@ namespace JinYuan.MES
|
||||
{
|
||||
res = true;
|
||||
GetOutMesResType(res1, listBar.CSBYHCODEA, ref MesMessage, ref mesResType);
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(组装)\{nowDate.ToString("HH")}.txt", resJson);
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(包装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(包装)\{nowDate.ToString("HH")}.txt", resJson);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetOutMesResType(res1, listBar.CSBYHCODEA, ref MesMessage, ref mesResType);
|
||||
var resData = res1 == null ? "" : result;
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(组装)\{nowDate.ToString("HH")}.txt", resJson);
|
||||
resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(包装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}";
|
||||
TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(包装)\{nowDate.ToString("HH")}.txt", resJson);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
resJson = $"产品出站信息(组装)接口发生异常:{ex.Message}";
|
||||
LoggerHelp.WriteEX("产品出站信息(组装)接口", ex);
|
||||
resJson = $"产品出站信息(包装)接口发生异常:{ex.Message}";
|
||||
LoggerHelp.WriteEX("产品出站信息(包装)接口", ex);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user