|
@ -304,26 +304,18 @@ public class OtherZllService : ApplicationService, IOtherZllService |
|
|
} |
|
|
} |
|
|
if (!bErr) |
|
|
if (!bErr) |
|
|
{ |
|
|
{ |
|
|
try |
|
|
if (_recieveList.Count > 0) |
|
|
{ |
|
|
|
|
|
if (_recieveList.Count > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
await _tbBillRepository.AddManyAsync(_billList); |
|
|
|
|
|
await _tbProductReceiveRepository.AddAsync(_recieveList); |
|
|
|
|
|
} |
|
|
|
|
|
if (_stockList != null && _stockList.Count() > 0) |
|
|
|
|
|
await _tsStockDetailRepository.AddAsync(_stockList); |
|
|
|
|
|
if (_stockUpdateList != null && _stockUpdateList.Count() > 0) |
|
|
|
|
|
await _tmPgWmsUpdate.UpdateTsStock(_stockUpdateList); |
|
|
|
|
|
if (_stockDelList != null && _stockDelList.Count() > 0) |
|
|
|
|
|
await _tmPgWmsUpdate.DeleteTsStock(_stockDelList); |
|
|
|
|
|
await _tlTransactionRepository.AddAsync(_transList); |
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
{ |
|
|
dto.ITYPE = ex.GetBaseException().Message; |
|
|
await _tbBillRepository.AddManyAsync(_billList); |
|
|
throw new Exception("操作数据库失败,请稍后重试。", ex); |
|
|
await _tbProductReceiveRepository.AddAsync(_recieveList); |
|
|
} |
|
|
} |
|
|
|
|
|
if (_stockList != null && _stockList.Count() > 0) |
|
|
|
|
|
await _tsStockDetailRepository.AddAsync(_stockList); |
|
|
|
|
|
if (_stockUpdateList != null && _stockUpdateList.Count() > 0) |
|
|
|
|
|
await _tmPgWmsUpdate.UpdateTsStock(_stockUpdateList); |
|
|
|
|
|
if (_stockDelList != null && _stockDelList.Count() > 0) |
|
|
|
|
|
await _tmPgWmsUpdate.DeleteTsStock(_stockDelList); |
|
|
|
|
|
await _tlTransactionRepository.AddAsync(_transList); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
@ -355,7 +347,7 @@ public class OtherZllService : ApplicationService, IOtherZllService |
|
|
await _backgroundJobRequestRetry.AddBackgroundJobAsync(EnumActionName.OtherZllAdd, content.ToString()); |
|
|
await _backgroundJobRequestRetry.AddBackgroundJobAsync(EnumActionName.OtherZllAdd, content.ToString()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
throw; |
|
|
throw new Exception("操作数据库失败,稍后系统自动重试。", ex); |
|
|
} |
|
|
} |
|
|
finally |
|
|
finally |
|
|
{ |
|
|
{ |
|
|