增加明细行作废
This commit is contained in:
@@ -54,11 +54,13 @@ namespace WMS.Web.Domain.Services
|
||||
/// <returns></returns>
|
||||
public async Task<Result> Repeal(OperateRequest dto, LoginInDto loginInfo)
|
||||
{
|
||||
var list = await _outStockTaskRepositories.GetEntityList(dto.Ids);
|
||||
var list = await _outStockTaskRepositories.GetEntityListByDetailIds(dto.Ids);
|
||||
foreach (var entity in list)
|
||||
{
|
||||
List<int> e_ids = entity.Details.Select(s => s.Id).ToList();
|
||||
var j_ids = e_ids.Intersect(dto.Ids).ToList();
|
||||
//作废
|
||||
entity.Repeal(loginInfo.UserInfo.StaffId);
|
||||
entity.Repeal(loginInfo.UserInfo.StaffId, j_ids);
|
||||
}
|
||||
var isSuccess = await _outStockTaskRepositories.EditEntityList(list, true);
|
||||
if (!isSuccess) return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
@@ -373,7 +375,7 @@ namespace WMS.Web.Domain.Services
|
||||
if (!isSuccess)
|
||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
|
||||
|
||||
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
|
||||
@@ -424,13 +426,13 @@ namespace WMS.Web.Domain.Services
|
||||
if (!result.IsSuccess) isRollback = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//4.提交事务
|
||||
isSuccess = _transactionRepositories.CommitTransaction(isRollback, _transaction);
|
||||
_redisClientService.SetStringKey($"wms_outstock_sync", false, TimeSpan.FromMinutes(5));
|
||||
if (!isSuccess)
|
||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
|
||||
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user