|
|
@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Omu.ValueInjecter; |
|
|
|
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.Shared.Domain.Shared; |
|
|
@ -29,13 +30,16 @@ public class CustomerProductionReturnNoteAppService : |
|
|
|
|
|
|
|
private readonly ICustomerItemAppService _customerItemAppService; |
|
|
|
|
|
|
|
private readonly ICustomerAppService _customerAppService; |
|
|
|
|
|
|
|
private readonly ISalePriceSheetAppService _salePriceSheetAppService; |
|
|
|
|
|
|
|
public CustomerProductionReturnNoteAppService( |
|
|
|
ICustomerProductionReturnNoteRepository repository |
|
|
|
, ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager |
|
|
|
, ICustomerItemAppService customerItemAppService, |
|
|
|
ISalePriceSheetAppService salePriceSheetAppService |
|
|
|
ISalePriceSheetAppService salePriceSheetAppService, |
|
|
|
ICustomerAppService customerAppService |
|
|
|
) : base(repository) |
|
|
|
{ |
|
|
|
|
|
|
@ -45,6 +49,7 @@ public class CustomerProductionReturnNoteAppService : |
|
|
|
_salePriceSheetAppService = salePriceSheetAppService; |
|
|
|
|
|
|
|
_CustomerProductionReturnNoteManager = CustomerProductionReturnNoteManager; |
|
|
|
_customerAppService = customerAppService; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -58,6 +63,25 @@ public class CustomerProductionReturnNoteAppService : |
|
|
|
{ |
|
|
|
var entity = ObjectMapper.Map<CustomerProductionReturnNoteEditInput, CustomerProductionReturnNote>(input); |
|
|
|
|
|
|
|
var customerlist= await _customerAppService.GetByCodesWithPostAsync(new List<string>() { entity.CustomerCode }).ConfigureAwait(false); |
|
|
|
|
|
|
|
if (customerlist.Count > 0) |
|
|
|
{ |
|
|
|
entity.CustomerName = customerlist.FirstOrDefault().Name; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"未{entity.CustomerCode}查到客户信息!"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 客户名称
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var parts= input.Details.Select(itm => itm.ItemCode).Distinct(); |
|
|
|
|
|
|
|
//var ls=await IsExistCustomerItemPrice(parts.ToList(),input.CustomerCode).ConfigureAwait(false);
|
|
|
@ -155,4 +179,8 @@ public class CustomerProductionReturnNoteAppService : |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|