任务单作废接口
This commit is contained in:
@@ -80,6 +80,14 @@ namespace WMS.Web.Domain.Entitys
|
||||
this.CreateTime = createTime;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 作废
|
||||
/// </summary>
|
||||
public void Repeal(int creatorId)
|
||||
{
|
||||
this.Status = InstockStatus.Repeal;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建订单号
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core.Dto;
|
||||
using WMS.Web.Core.Dto.InStockTask;
|
||||
using WMS.Web.Core.Dto.Login;
|
||||
using WMS.Web.Core.Internal.Results;
|
||||
|
||||
namespace WMS.Web.Domain.IService
|
||||
@@ -64,5 +66,13 @@ namespace WMS.Web.Domain.IService
|
||||
/// <param name="billNos"></param>
|
||||
/// <returns></returns>
|
||||
Task<Result> Sysn(List<string> billNos = null);
|
||||
|
||||
/// <summary>
|
||||
/// 作废
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <param name="loginInfo"></param>
|
||||
/// <returns></returns>
|
||||
Task<Result> Repeal(OperateRequest dto, LoginInDto loginInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user