schangxiang@126.com
2024-12-23 de8fa9c9602c4e905b9f2819bebf460f53bf7409
人工能重复记录下线记录?
已修改1个文件
14 ■■■■■ 文件已修改
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs
@@ -18,6 +18,8 @@
[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;
@@ -454,6 +456,9 @@
    [UnitOfWork]
    public async Task UnlineForNGPackage(UnlineForNGPackageInput input)
    {
        await semaphore.WaitAsync();
        try
        {
        if (input == null)
        {
            throw Oops.Oh("参数不能为空");
@@ -575,7 +580,16 @@
        await _mesPackageGatherRep.UpdateAsync(singlePackage);
        await _mesBatchOrderUpiRep.UpdateRangeAsync(upiList);
        }
        catch (Exception)
        {
            throw;
        }
        finally
        {
            semaphore.Release();
        }
    }
    /// <summary>