|
|
@ -57,6 +57,10 @@ public class DeliverRequestAppService : |
|
|
|
public virtual async Task<List<DeliverRequestDTO>> HandleListAsync(List<Guid> ids) |
|
|
|
{ |
|
|
|
var entitys = await _repository.GetListAsync(r=> ids.Contains(r.Id)).ConfigureAwait(false); |
|
|
|
if (entitys.Select(r => r.CustomerCode).Distinct().Count()>1) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"所选申请涉及多个客户不能创建为一个发货单,请重新选择!"); |
|
|
|
} |
|
|
|
Check.NotNull(entitys, typeof(DeliverRequest).Name); |
|
|
|
var result = await _deliverRequestManager.HandleListAsync(entitys).ConfigureAwait(false); |
|
|
|
var dtos = ObjectMapper.Map<List<DeliverRequest>, List<DeliverRequestDTO>>(entitys); |
|
|
|