You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.5 KiB
67 lines
2.5 KiB
1 year ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
using Microsoft.AspNetCore.Authorization;
|
||
|
using Microsoft.AspNetCore.Components;
|
||
|
using Volo.Abp.Caching;
|
||
|
using Win_in.Sfs.Basedata.Application.Contracts;
|
||
|
using Win_in.Sfs.Basedata.Domain;
|
||
|
using Win_in.Sfs.Basedata.Domain.Shared;
|
||
|
|
||
|
namespace Win_in.Sfs.Basedata.Application;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 拆箱记录
|
||
|
/// </summary>
|
||
|
//[Authorize]
|
||
|
[Route($"{BasedataConsts.RootPath}split-packing-rec")]
|
||
|
public class SplitPackingRecAppService :
|
||
|
SfsBaseDataAppServiceBase<SplitPackingRec, SplitPackingRecDTO, SfsBaseDataRequestInputBase, SplitPackingRecEditInput
|
||
|
, SplitPackingRecImportInput>
|
||
|
, ISplitPackingRecAppService
|
||
|
{
|
||
|
private readonly ISplitPackingRecManager _splitPackingRecManager;
|
||
|
|
||
|
public SplitPackingRecAppService(ISplitPackingRecRepository repository
|
||
|
,ISplitPackingRecManager splitPackingRecManager
|
||
|
,IDistributedCache<SplitPackingRecDTO> cache
|
||
|
) : base(repository, cache)
|
||
|
{
|
||
|
_splitPackingRecManager = splitPackingRecManager;
|
||
|
}
|
||
|
|
||
|
public async Task<bool> BatchInsertAsync(List<SplitPackingRecEditInput> inputs)
|
||
|
{
|
||
|
List<SplitPackingRec> lst = ObjectMapper.Map<List<SplitPackingRecEditInput>, List<SplitPackingRec>>(inputs);
|
||
|
bool ret = await _splitPackingRecManager.BatchInsertAsync(lst).ConfigureAwait(false);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 取每个目标箱码的最后一条拆箱记录
|
||
|
/// </summary>
|
||
|
/// <param name="toPackingCodeList">目标箱码列表</param>
|
||
|
/// <returns></returns>
|
||
|
public async Task<List<SplitPackingRecDTO>> GetListByToPackingCode(List<string> toPackingCodeList)
|
||
|
{
|
||
|
var lst = await _splitPackingRecManager.GetListByToPackingCode(toPackingCodeList).ConfigureAwait(false);
|
||
|
List<SplitPackingRecDTO> ret = ObjectMapper.Map<List<SplitPackingRec>, List<SplitPackingRecDTO>>(lst);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 取每个源标箱码的“操作状态=其它”的拆箱记录
|
||
|
/// </summary>
|
||
|
/// <param name="fromPackingCodeList">源标箱码列表</param>
|
||
|
/// <returns></returns>
|
||
|
public async Task<List<SplitPackingRecDTO>> GetListByFromPackingCode(List<string> fromPackingCodeList)
|
||
|
{
|
||
|
var lst = await _splitPackingRecManager.GetListByFromPackingCode(fromPackingCodeList).ConfigureAwait(false);
|
||
|
List<SplitPackingRecDTO> ret = ObjectMapper.Map<List<SplitPackingRec>, List<SplitPackingRecDTO>>(lst);
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|