diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs index 608c0382b..ff890095c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs @@ -57,6 +57,10 @@ public class DeliverRequestAppService : public virtual async Task> HandleListAsync(List 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>(entitys);