任务单作废接口

This commit is contained in:
tongfei
2023-11-15 15:20:34 +08:00
parent eb4d812b9b
commit b5af69bb1a
6 changed files with 90 additions and 1 deletions

View File

@@ -5,8 +5,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core.Dto;
using WMS.Web.Core.Dto.Erp;
using WMS.Web.Core.Dto.InStockTask;
using WMS.Web.Core.Dto.Login;
using WMS.Web.Core.Internal.Results;
using WMS.Web.Domain.Entitys;
using WMS.Web.Domain.Infrastructure;
@@ -319,5 +321,25 @@ namespace WMS.Web.Domain.Services
return Result.ReSuccess();
}
/// <summary>
/// 作废
/// </summary>
/// <param name="dto"></param>
/// <param name="loginInfo"></param>
/// <returns></returns>
public async Task<Result> Repeal(OperateRequest dto, LoginInDto loginInfo)
{
var list = await _inStockTaskRepositories.GetList(dto.Ids);
foreach (var entity in list)
{
//作废
entity.Repeal(loginInfo.UserInfo.StaffId);
}
var isSuccess = await _inStockTaskRepositories.UpdateRange(list, true);
if (!isSuccess) return Result.ReFailure(ResultCodes.DateWriteError);
return Result.ReSuccess();
}
}
}