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; }
/// <summary>
///客户编码
/// </summary>
[Display(Name = "客户名称")]
public string CustomerName { get; set; }
/// <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}个字符")]
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 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 :
}

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.Id)
.Ignore(x=>x.Remark)
.Ignore(x=>x.CustomerName)
.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>
public string CustomerCode { get; set; }
/// <summary>
/// 客户名称
/// </summary>
public string CustomerName { get; set; }
/// <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>
public string Customer { get; set; }
/// <summary>
/// 明细列表
/// </summary>

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

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

Loading…
Cancel
Save