Browse Source

修改客户退货

dev_DY_CC
赵新宇 6 months ago
parent
commit
d92fc6eff9
  1. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/DTOs/CustomerProductionReturnNoteDTO.cs
  2. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerReturnNotes/DTOs/CustomerReturnNoteDTO.cs
  3. 30
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs
  4. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAutoMapperProfile.cs
  5. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNote.cs
  6. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CustomerReturnNotes/CustomerReturnNote.cs
  7. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerReturnNoteEventHandler.cs

7
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerProductionReturnNotes/DTOs/CustomerProductionReturnNoteDTO.cs

@ -23,6 +23,13 @@ public class CustomerProductionReturnNoteDTO : SfsStoreDTOBase<CustomerProductio
public string CustomerCode { get; set; } public string CustomerCode { get; set; }
/// <summary>
///客户编码
/// </summary>
[Display(Name = "客户名称")]
public string CustomerName { get; set; }
/// <summary> /// <summary>
/// 退料单号 /// 退料单号
/// </summary> /// </summary>

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/CustomerReturnNotes/DTOs/CustomerReturnNoteDTO.cs

@ -29,4 +29,8 @@ public class CustomerReturnNoteDTO : SfsStoreDTOBase<CustomerReturnNoteDetailDTO
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Customer { get; set; } public string Customer { get; set; }
} }

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

@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Omu.ValueInjecter; using Omu.ValueInjecter;
using Volo.Abp; using Volo.Abp;
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.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
@ -29,13 +30,16 @@ public class CustomerProductionReturnNoteAppService :
private readonly ICustomerItemAppService _customerItemAppService; private readonly ICustomerItemAppService _customerItemAppService;
private readonly ICustomerAppService _customerAppService;
private readonly ISalePriceSheetAppService _salePriceSheetAppService; private readonly ISalePriceSheetAppService _salePriceSheetAppService;
public CustomerProductionReturnNoteAppService( public CustomerProductionReturnNoteAppService(
ICustomerProductionReturnNoteRepository repository ICustomerProductionReturnNoteRepository repository
, ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager , ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager
, ICustomerItemAppService customerItemAppService, , ICustomerItemAppService customerItemAppService,
ISalePriceSheetAppService salePriceSheetAppService ISalePriceSheetAppService salePriceSheetAppService,
ICustomerAppService customerAppService
) : base(repository) ) : base(repository)
{ {
@ -45,6 +49,7 @@ public class CustomerProductionReturnNoteAppService :
_salePriceSheetAppService = salePriceSheetAppService; _salePriceSheetAppService = salePriceSheetAppService;
_CustomerProductionReturnNoteManager = CustomerProductionReturnNoteManager; _CustomerProductionReturnNoteManager = CustomerProductionReturnNoteManager;
_customerAppService = customerAppService;
} }
/// <summary> /// <summary>
@ -58,6 +63,25 @@ public class CustomerProductionReturnNoteAppService :
{ {
var entity = ObjectMapper.Map<CustomerProductionReturnNoteEditInput, CustomerProductionReturnNote>(input); 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 parts= input.Details.Select(itm => itm.ItemCode).Distinct();
//var ls=await IsExistCustomerItemPrice(parts.ToList(),input.CustomerCode).ConfigureAwait(false); //var ls=await IsExistCustomerItemPrice(parts.ToList(),input.CustomerCode).ConfigureAwait(false);
@ -154,5 +178,9 @@ public class CustomerProductionReturnNoteAppService :
} }

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAutoMapperProfile.cs

@ -28,6 +28,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile
.Ignore(x => x.Number) .Ignore(x => x.Number)
.Ignore(x => x.Id) .Ignore(x => x.Id)
.Ignore(x=>x.Remark) .Ignore(x=>x.Remark)
.Ignore(x=>x.CustomerName)
.Ignore(x=>x.ExtraProperties) .Ignore(x=>x.ExtraProperties)
; ;
} }

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNote.cs

@ -26,8 +26,10 @@ public class CustomerProductionReturnNote : SfsStoreAggregateRootBase<CustomerPr
/// </summary> /// </summary>
public string CustomerCode { get; set; } public string CustomerCode { get; set; }
/// <summary>
/// 客户名称
/// </summary>
public string CustomerName { get; set; }
/// <summary> /// <summary>
/// 退料时间 /// 退料时间
/// </summary> /// </summary>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/CustomerReturnNotes/CustomerReturnNote.cs

@ -23,6 +23,8 @@ public class CustomerReturnNote : SfsStoreAggregateRootBase<CustomerReturnNoteDe
/// </summary> /// </summary>
public string Customer { get; set; } public string Customer { get; set; }
/// <summary> /// <summary>
/// 明细列表 /// 明细列表
/// </summary> /// </summary>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerReturnNoteEventHandler.cs

@ -63,6 +63,8 @@ public class CustomerReturnNoteEventHandler
transferLog.Worker = customerReturnNote.Worker; transferLog.Worker = customerReturnNote.Worker;
transferLog.DocNumber = customerReturnNote.Number; transferLog.DocNumber = customerReturnNote.Number;
transferLog.JobNumber = customerReturnNote.JobNumber; transferLog.JobNumber = customerReturnNote.JobNumber;
transferLogCreateInputs.Add(transferLog); transferLogCreateInputs.Add(transferLog);
} }

Loading…
Cancel
Save