移箱支持多个

This commit is contained in:
18942506660
2023-11-15 15:28:39 +08:00
parent b5af69bb1a
commit 1736096743
13 changed files with 224 additions and 27 deletions

View File

@@ -133,14 +133,14 @@ namespace WMS.Web.Domain.Services
foreach (var item in billNos)
{
var e = erp_list.FirstOrDefault(f => f.SourceBillNo == item);
var dto = new OutStockTask();
dto.Create((OutStockType)e.Type, e.DeliveryOrgId, e.ReceiptCustomerId, (DateTime)e.CreateTime);
var entity = new OutStockTask();
entity.Create((OutStockType)e.Type, e.DeliveryOrgId, e.ReceiptCustomerId, (DateTime)e.CreateTime);
//找到当前对应来源单据编号的集合数据
var current_erp_details = erp_list.Where(x => x.SourceBillNo == item).ToList();
//给到dto的实体明细中
dto.Details = _mapper.Map<List<OutStockTaskDetails>>(current_erp_details);
add_entitys.Add(dto);
entity.Details = _mapper.Map<List<OutStockTaskDetails>>(current_erp_details);
add_entitys.Add(entity);
}
//3.1提交新增
isSuccess = await _outStockTaskRepositories.AddRange(add_entitys, isTransaction);