Browse Source

跟新版本

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

20
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 Volo.Abp.Application.Dtos;
using Win_in.Sfs.Basedata.Application; using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain;
@ -32,7 +33,7 @@ public class CustomerProductionReturnNoteAppService :
private readonly ICustomerItemAppService _customerItemAppService; private readonly ICustomerItemAppService _customerItemAppService;
private readonly ICustomerAppService _customerAppService; private readonly ICustomerAppService _customerAppService;
private readonly ICustomerItemRepository _customerItemRepository;
private readonly ISalePriceSheetAppService _salePriceSheetAppService; private readonly ISalePriceSheetAppService _salePriceSheetAppService;
public CustomerProductionReturnNoteAppService( public CustomerProductionReturnNoteAppService(
@ -40,10 +41,12 @@ public class CustomerProductionReturnNoteAppService :
, ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager , ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager
, ICustomerItemAppService customerItemAppService, , ICustomerItemAppService customerItemAppService,
ISalePriceSheetAppService salePriceSheetAppService, ISalePriceSheetAppService salePriceSheetAppService,
ICustomerAppService customerAppService ICustomerAppService customerAppService,
ICustomerItemRepository customerItemRepository
) : base(repository) ) : base(repository)
{ {
_customerItemRepository = customerItemRepository;
_customerItemAppService = customerItemAppService; _customerItemAppService = customerItemAppService;
@ -89,6 +92,7 @@ public class CustomerProductionReturnNoteAppService :
if (customerlist.Count > 0) if (customerlist.Count > 0)
{ {
entity.CustomerName = customerlist.FirstOrDefault().Name; entity.CustomerName = customerlist.FirstOrDefault().Name;
} }
else else
@ -114,7 +118,17 @@ public class CustomerProductionReturnNoteAppService :
#endregion #endregion
#region 20241230修改 #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