Browse Source

跟新版本

Agv分支2024-11-19
赵新宇 4 months ago
parent
commit
40a36614b7
  1. 18
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs

18
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs

@ -9,6 +9,7 @@ using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@ -32,7 +33,7 @@ public class CustomerProductionReturnNoteAppService :
private readonly ICustomerItemAppService _customerItemAppService;
private readonly ICustomerAppService _customerAppService;
private readonly ICustomerItemRepository _customerItemRepository;
private readonly ISalePriceSheetAppService _salePriceSheetAppService;
public CustomerProductionReturnNoteAppService(
@ -40,10 +41,12 @@ public class CustomerProductionReturnNoteAppService :
, ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager
, ICustomerItemAppService customerItemAppService,
ISalePriceSheetAppService salePriceSheetAppService,
ICustomerAppService customerAppService
ICustomerAppService customerAppService,
ICustomerItemRepository customerItemRepository
) : base(repository)
{
_customerItemRepository = customerItemRepository;
_customerItemAppService = customerItemAppService;
@ -89,6 +92,7 @@ public class CustomerProductionReturnNoteAppService :
if (customerlist.Count > 0)
{
entity.CustomerName = customerlist.FirstOrDefault().Name;
}
else
@ -114,6 +118,16 @@ public class CustomerProductionReturnNoteAppService :
#endregion
#region 20241230修改
foreach (var itm in input.Details)
{
var part= custitmDetail.FirstOrDefault(p => p.CustomerCode == entity.CustomerCode && p.ItemCode==itm.ItemCode);
if (part == null)
{
throw new UserFriendlyException($"零件编号{itm.ItemCode}客户编码{entity.CustomerCode}在零件关系表中不存在!");
}
}

Loading…
Cancel
Save