|
|
@ -6,6 +6,8 @@ using Volo.Abp.Caching; |
|
|
|
using Win_in.Sfs.Basedata.Application.Contracts; |
|
|
|
using Win_in.Sfs.Basedata.Domain; |
|
|
|
using Win_in.Sfs.Basedata.Domain.Shared; |
|
|
|
using System.Linq; |
|
|
|
using Volo.Abp; |
|
|
|
|
|
|
|
namespace Win_in.Sfs.Basedata.Application; |
|
|
|
|
|
|
@ -101,5 +103,29 @@ public class SplitPackingRecAppService : |
|
|
|
return ret; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据to箱码取所有具有相同箱码的拆箱记录
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="toPackingCode"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet("get-same-ponumber-list-by-topackingcode")] |
|
|
|
public async Task<List<SplitPackingRecDTO>> GetSamePoNumberListByToPackingCode(string toPackingCode) |
|
|
|
{ |
|
|
|
List<SplitPackingRecDTO> ret = new List<SplitPackingRecDTO>(); |
|
|
|
var entity = await _splitPackingRecManager.GetTopPackingCode(toPackingCode).ConfigureAwait(false); |
|
|
|
if (entity == null) |
|
|
|
{ |
|
|
|
return ret; |
|
|
|
} |
|
|
|
if (entity.PurchaseInfo_PoNumber.IsNullOrEmpty2()) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"PurchaseInfo_PoNumber不能为空,to箱码:{toPackingCode}"); |
|
|
|
} |
|
|
|
var lst = await Repository.GetListAsync(itm => itm.PurchaseInfo_PoNumber == entity.PurchaseInfo_PoNumber).ConfigureAwait(false); |
|
|
|
|
|
|
|
ret = ObjectMapper.Map<List<SplitPackingRec>, List<SplitPackingRecDTO>>(lst); |
|
|
|
return ret; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|