1.修复调拨单无法自动审核其他出入库单的问题
2.调整登录,去除多次试错
This commit is contained in:
@@ -91,9 +91,21 @@ namespace UFIDA.U8.Framework.Api.ControlObject.U8M
|
||||
/// <exception cref="Exception"></exception>
|
||||
public void Init(LoginParamter paramter, bool bMon = true, int traceTimes = 0)
|
||||
{
|
||||
var lastError = "";
|
||||
|
||||
|
||||
if (traceTimes > 5)
|
||||
throw new Exception("U8登录异常");
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(lastError))
|
||||
{
|
||||
throw new Exception("U8登录异常");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(lastError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
@@ -126,7 +138,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.U8M
|
||||
|
||||
if (!_vbLogin.Login(paramter.pSubId, paramter.pAccId, paramter.pYearId, paramter.pUserId, paramter.pPassword, paramter.pDate, paramter.cSrv, paramter.cSerial) && string.IsNullOrWhiteSpace(_vbLogin.userToken))
|
||||
{
|
||||
throw new Exception($"VB--U8登录失败---{_vbLogin.ShareString}");
|
||||
throw new Exception($"U8登录失败---{_vbLogin.ShareString}");
|
||||
}
|
||||
|
||||
_logInfo.Debug($"VB--开始创建连接对象:{_vbLogin.userToken}");
|
||||
@@ -381,7 +393,9 @@ namespace UFIDA.U8.Framework.Api.ControlObject.U8M
|
||||
{
|
||||
_logInfo.Error($"重试次数:{traceTimes},错误信息:{ex.Message}", ex);
|
||||
|
||||
Init(paramter, bMon, traceTimes + 1);
|
||||
lastError = ex.Message;
|
||||
|
||||
//Init(paramter, bMon, traceTimes + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user