1.修复调拨单无法自动审核其他出入库单的问题

2.调整登录,去除多次试错
This commit is contained in:
qmj
2025-11-04 14:40:34 +08:00
parent 4d48bbf980
commit fac128c7f4
8 changed files with 182 additions and 47 deletions
@@ -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);
}
}