改了查询
This commit is contained in:
@@ -203,6 +203,11 @@ namespace BarCode.Web.Repositories
|
||||
|| w.Specifications.Contains(dto.MaterialNumber)
|
||||
).Select(s => s.MaterialNumber).ToList();
|
||||
}
|
||||
List<int> cr_ids = new List<int>();
|
||||
if (!string.IsNullOrEmpty(dto.CreateUser))
|
||||
{
|
||||
cr_ids = await _basicsRepositories.GetUserIdsAsync(dto.CreateUser, loginInfo.UserInfo.CompanyId);
|
||||
}
|
||||
List<int> sIds = new List<int>();
|
||||
if (dto.SecurityNumbers != null && dto.SecurityNumbers.Count() > 0)
|
||||
{
|
||||
@@ -210,6 +215,7 @@ namespace BarCode.Web.Repositories
|
||||
.GroupBy(g => g.GenerateRecordId).Select(s => s.Key).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
////供应商
|
||||
//var supplier_result = await _erpService.BillQueryForSupplier();
|
||||
//List<ErpSupplierDto> suppliers = new List<ErpSupplierDto>();
|
||||
@@ -252,6 +258,8 @@ namespace BarCode.Web.Repositories
|
||||
if (dto.SecurityNumbers != null && dto.SecurityNumbers.Count() > 0)
|
||||
query = query.Where(w => sIds.Contains(w.Id));
|
||||
|
||||
if (!string.IsNullOrEmpty(dto.CreateUser))
|
||||
query = query.Where(w => cr_ids.Contains(w.CreatorId));
|
||||
|
||||
int total = await query.CountAsync();
|
||||
var list = await query.Select(s => new SecurityGenerateRecordInfoResponse()
|
||||
|
||||
Reference in New Issue
Block a user