优化详情

This commit is contained in:
tongfei
2024-04-22 09:37:05 +08:00
parent 4f668a209b
commit 319c5a8c77
6 changed files with 112 additions and 219 deletions

View File

@@ -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>

View File

@@ -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);
}
}

View File

@@ -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);
}