bug修复2

This commit is contained in:
tongfei
2023-12-04 10:30:28 +08:00
parent cf2912173e
commit 5862868154
2 changed files with 4 additions and 0 deletions

View File

@@ -440,8 +440,10 @@ namespace WMS.Web.Domain.Services
foreach (var item in dto.Boxs)
{
var taskBox = _mapper.Map<InStockTaskBox>(item);
taskBox.TaskId = entity.Id;
var current_dto_box_dets= boxEntitys.Where(x => x.Id == item.BoxId).Select(x=>x.Details).ToList();
taskBox.Details = _mapper.Map<List<InStockTaskBoxDetails>>(current_dto_box_dets);
taskBox.Details.ForEach(x => { x.ErpDetailId = item.ErpDetailId; });
taskBoxAdd.Add(taskBox);
}
var isSuccess= await _inStockTaskBoxRepositories.AddRange(taskBoxAdd);