|
|
@ -25,7 +25,6 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager |
|
|
|
|
|
|
|
public async Task<bool> BatchInsertAsync(List<SplitPackingRec> input) |
|
|
|
{ |
|
|
|
var query = await _repository.GetQueryableAsync().ConfigureAwait(false); |
|
|
|
foreach (SplitPackingRec item in input) |
|
|
|
{ |
|
|
|
#region 校验
|
|
|
@ -44,6 +43,11 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
} |
|
|
|
|
|
|
|
var query = await _repository.GetQueryableAsync().ConfigureAwait(false); |
|
|
|
foreach (SplitPackingRec item in input) |
|
|
|
{ |
|
|
|
|
|
|
|
if (item.OprType == OprTypeEnum.SplitBox || item.OprType == OprTypeEnum.MergeBox) |
|
|
|
{ |
|
|
@ -75,11 +79,11 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager |
|
|
|
newObj.FromUom = newObj.ToUom; |
|
|
|
newObj.FromQty = newObj.ToQty; |
|
|
|
newObj.FromLot = newObj.ToLot; |
|
|
|
var res = await _repository.InsertAsync(newObj, true).ConfigureAwait(false); |
|
|
|
var res = await _repository.InsertAsync(newObj, false).ConfigureAwait(false); |
|
|
|
} |
|
|
|
SplitPackingRec newEntity = CommonHelper.CloneObj(item); |
|
|
|
newEntity.SetId(GuidGenerator.Create()); |
|
|
|
var ret = await _repository.InsertAsync(newEntity, true).ConfigureAwait(false); |
|
|
|
var ret = await _repository.InsertAsync(newEntity, false).ConfigureAwait(false); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
@ -93,7 +97,7 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager |
|
|
|
} |
|
|
|
SplitPackingRec newEntity = CommonHelper.CloneObj(item); |
|
|
|
newEntity.SetId(GuidGenerator.Create()); |
|
|
|
var ret = await _repository.InsertAsync(newEntity, true).ConfigureAwait(false); |
|
|
|
var ret = await _repository.InsertAsync(newEntity, false).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} //foreach
|
|
|
|
return true; |
|
|
|