优化
This commit is contained in:
@@ -640,8 +640,9 @@ namespace WMS.Web.Domain.Services
|
|||||||
foreach (var entity in list)
|
foreach (var entity in list)
|
||||||
{
|
{
|
||||||
var det_ids = entity.Details.Select(s => s.Id).ToList();
|
var det_ids = entity.Details.Select(s => s.Id).ToList();
|
||||||
|
var change_ids = det_ids.Intersect(dto.Ids).ToList();
|
||||||
//作废
|
//作废
|
||||||
entity.Repeal(loginInfo.UserInfo.StaffId, det_ids);
|
entity.Repeal(loginInfo.UserInfo.StaffId, change_ids);
|
||||||
}
|
}
|
||||||
var isSuccess = await _inStockTaskRepositories.UpdateRange(list, true);
|
var isSuccess = await _inStockTaskRepositories.UpdateRange(list, true);
|
||||||
if (!isSuccess) return Result.ReFailure(ResultCodes.DateWriteError);
|
if (!isSuccess) return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
|||||||
@@ -107,12 +107,12 @@ namespace WMS.Web.Repositories
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<InStockTask>> GetListByDetailIds(List<int> ids)
|
public async Task<List<InStockTask>> GetListByDetailIds(List<int> ids)
|
||||||
{
|
{
|
||||||
var res = await _context.InStockTask
|
var list = await _context.InStockTask
|
||||||
.Include(s => s.Details)
|
.Include(s => s.Details)
|
||||||
.Where(f => f.Details.Where(dw => ids.Contains(dw.Id)).Count() > 0)
|
.Where(f => f.Details.Where(dw => ids.Contains(dw.Id)).Count() > 0)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
return res.Clone();
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user