修复bug

This commit is contained in:
18942506660
2023-12-26 16:04:41 +08:00
parent 9d38271d6a
commit 12df4e40e4
4 changed files with 12 additions and 7 deletions

View File

@@ -125,6 +125,7 @@ namespace WMS.Web.Repositories
if (!string.IsNullOrEmpty(dto.Creator)) if (!string.IsNullOrEmpty(dto.Creator))
{ {
var staffList = await _basicsRepositories.GetStaffListAsync(companyId); var staffList = await _basicsRepositories.GetStaffListAsync(companyId);
if (staffList != null)
ids = staffList.Where(w => w.Name.Contains(dto.Creator)).Select(s => s.Id).ToList(); ids = staffList.Where(w => w.Name.Contains(dto.Creator)).Select(s => s.Id).ToList();
} }

View File

@@ -108,7 +108,7 @@ namespace WMS.Web.Repositories
/// </summary> /// </summary>
/// <param name="dto"></param> /// <param name="dto"></param>
/// <returns></returns> /// <returns></returns>
public async Task<(List<MoveBoxRecordQueryInfoResponse> list, int total)> GetListAsync(MoveBoxRecordQueryRequest dto, int companyId=0) public async Task<(List<MoveBoxRecordQueryInfoResponse> list, int total)> GetListAsync(MoveBoxRecordQueryRequest dto, int companyId = 0)
{ {
if (companyId == 0) if (companyId == 0)
companyId = _loginRepositories.CompanyId; companyId = _loginRepositories.CompanyId;
@@ -116,6 +116,7 @@ namespace WMS.Web.Repositories
if (!string.IsNullOrEmpty(dto.Creator)) if (!string.IsNullOrEmpty(dto.Creator))
{ {
var staffList = await _basicsRepositories.GetStaffListAsync(companyId); var staffList = await _basicsRepositories.GetStaffListAsync(companyId);
if (staffList != null)
ids = staffList.Where(w => w.Name.Contains(dto.Creator)).Select(s => s.Id).ToList(); ids = staffList.Where(w => w.Name.Contains(dto.Creator)).Select(s => s.Id).ToList();
} }
@@ -160,7 +161,7 @@ namespace WMS.Web.Repositories
public async Task<(object obj, int total)> GetListField(MoveBoxRecordQueryRequest dto, int companyId) public async Task<(object obj, int total)> GetListField(MoveBoxRecordQueryRequest dto, int companyId)
{ {
return await GetListAsync(dto,companyId); return await GetListAsync(dto, companyId);
} }
} }
} }

View File

@@ -91,6 +91,7 @@ namespace WMS.Web.Repositories
if (!string.IsNullOrEmpty(dto.Creator)) if (!string.IsNullOrEmpty(dto.Creator))
{ {
var staffList = await _basicsRepositories.GetStaffListAsync(companyId); var staffList = await _basicsRepositories.GetStaffListAsync(companyId);
if (staffList != null)
ids = staffList.Where(w => w.Name.Contains(dto.Creator)).Select(s => s.Id).ToList(); ids = staffList.Where(w => w.Name.Contains(dto.Creator)).Select(s => s.Id).ToList();
} }
#region erp基础资料 #region erp基础资料
@@ -100,6 +101,7 @@ namespace WMS.Web.Repositories
//物料集合;模糊查询后的物料集合 //物料集合;模糊查询后的物料集合
if (!string.IsNullOrEmpty(dto.MaterialNumber)) if (!string.IsNullOrEmpty(dto.MaterialNumber))
{ {
if (materials != null)
mIds = materials.Where(w => w.MaterialNumber.Contains(dto.MaterialNumber)).Select(s => s.MaterialId).ToList(); mIds = materials.Where(w => w.MaterialNumber.Contains(dto.MaterialNumber)).Select(s => s.MaterialId).ToList();
} }

View File

@@ -227,6 +227,7 @@ namespace WMS.Web.Repositories
//物料集合;模糊查询后的物料集合 //物料集合;模糊查询后的物料集合
if (!string.IsNullOrEmpty(dto.MaterialNumber)) if (!string.IsNullOrEmpty(dto.MaterialNumber))
{ {
if (materials != null)
mIds = materials.Where(w => w.MaterialNumber.Contains(dto.MaterialNumber)).Select(s => s.MaterialId).ToList(); mIds = materials.Where(w => w.MaterialNumber.Contains(dto.MaterialNumber)).Select(s => s.MaterialId).ToList();
} }