From 80af186dde89a92ad238593fd0522b2958f5dfaa Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 9 May 2024 17:25:46 +0800 Subject: [PATCH] =?UTF-8?q?mes=E5=A4=9A=E7=94=B3=E8=AF=B7=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E4=B8=80=E4=B8=AA=E5=8F=91=E8=B4=A7=E5=8D=95=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Requests/DeliverRequests/DeliverRequestAppService.cs | 4 ++++ 1 file changed, 4 insertions(+) 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);