| | |
| | | [ApiDescriptionSettings(ApplicationConst.WmsTaskGroupName, Order = 100)] |
| | | public class WmsOperationTaskService : IDynamicApiController, ITransient |
| | | { |
| | | private static readonly SemaphoreSlim semaphore = new SemaphoreSlim(1, 1); |
| | | |
| | | private readonly SqlSugarRepository<WmsRbLineTask> _rep; |
| | | private readonly SqlSugarRepository<WmsStockQuan> _wmsStockQuanRep; |
| | | private readonly SqlSugarRepository<Mes_Package_Gather> _mesPackageGatherRep; |
| | |
| | | [UnitOfWork] |
| | | public async Task UnlineForNGPackage(UnlineForNGPackageInput input) |
| | | { |
| | | await semaphore.WaitAsync(); |
| | | try |
| | | { |
| | | if (input == null) |
| | | { |
| | | throw Oops.Oh("参数不能为空"); |
| | |
| | | |
| | | await _mesPackageGatherRep.UpdateAsync(singlePackage); |
| | | await _mesBatchOrderUpiRep.UpdateRangeAsync(upiList); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | throw; |
| | | } |
| | | finally |
| | | { |
| | | semaphore.Release(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |