Browse Source

mes多申请生产一个发货单处理

dev_DY_CC
lvzb 12 months ago
parent
commit
80af186dde
  1. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs

4
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<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);

Loading…
Cancel
Save