优化详情
This commit is contained in:
@@ -49,6 +49,11 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
public int? ReceiverId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否解绑
|
||||
/// </summary>
|
||||
public bool? UnBind { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 明细
|
||||
/// </summary>
|
||||
|
||||
@@ -11,12 +11,6 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
/// </summary>
|
||||
public interface IInStockTaskBoxRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 集合:任务单ID
|
||||
/// </summary>
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<InStockTaskBox>> GetListBy(int taskId);
|
||||
|
||||
/// <summary>
|
||||
/// 集合:根据boxIDS
|
||||
@@ -62,5 +56,13 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
/// <param name="isTransaction"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteRange(List<int> ids, bool isTransaction = true);
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="entitys"></param>
|
||||
/// <param name="isTransaction"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateRange(List<InStockTaskBox> entitys, bool isTransaction = true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace WMS.Web.Domain.Services
|
||||
var t_boxIds = boxIds.Distinct().ToList();
|
||||
var list= await _inStockTaskBoxRepositories.GetListBy(t_boxIds);
|
||||
|
||||
delete_ids= list.Select(x => x.Id).ToList();
|
||||
//delete_ids= list.Select(x => x.Id).ToList();
|
||||
//var boxInvetList = await _boxInventoryRepositories.GetList(t_boxIds);
|
||||
//foreach (var item in list)
|
||||
//{
|
||||
@@ -47,9 +47,16 @@ namespace WMS.Web.Domain.Services
|
||||
// delete_ids.Add(item.Id);
|
||||
//}
|
||||
|
||||
if (delete_ids.Count != 0)
|
||||
//if (delete_ids.Count != 0)
|
||||
//{
|
||||
// var isSuccess= await _inStockTaskBoxRepositories.DeleteRange(delete_ids, isTransaction);
|
||||
// if (!isSuccess)
|
||||
// return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
//}
|
||||
|
||||
if (list.Count != 0)
|
||||
{
|
||||
var isSuccess= await _inStockTaskBoxRepositories.DeleteRange(delete_ids, isTransaction);
|
||||
var isSuccess = await _inStockTaskBoxRepositories.UpdateRange(list, isTransaction);
|
||||
if (!isSuccess)
|
||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user