zs
2025-05-07 086e8d457fb6480f126aedbd2677c7e97bdac193
HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Repositories/EfCoreWmsInOutStockRecordRepository.cs
@@ -36,7 +36,7 @@
            .IncludeDetails() 
            .Where(x => !x.IsDeleted) 
            .OrderBy(t => t.Sort) 
            .FirstOrDefaultAsync(t => t.Id == name, GetCancellationToken(cancellationToken));
            .FirstOrDefaultAsync(t => t.MaterialNo == name, GetCancellationToken(cancellationToken));
    } 
 
    /// <summary> 
@@ -47,7 +47,7 @@
    /// <returns></returns> 
    public async Task<bool> NameExistAsync(string name, Guid? id = null) 
    { 
        return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).Where(x => !x.IsDeleted).AnyAsync(x => x.Id == name);
        return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).Where(x => !x.IsDeleted).AnyAsync(x => x.MaterialNo == name);
    } 
 
    /// <summary>