53 lines
2.1 KiB
C#
Executable File
53 lines
2.1 KiB
C#
Executable File
using Microsoft.Extensions.DependencyInjection;
|
|
using Opsoft.NetCore.O3App.Domain.Interface;
|
|
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
|
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
|
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
|
using Opsoft.NetCore.O3App.Shared;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Opsoft.NetCore.O3App.Services.WMS
|
|
{
|
|
[MapTo(typeof(ISTKTransferService), ServiceLifetime.Transient)]
|
|
public class STKTransferService : ServiceBase<BaseEntity, ISTKTransferRepository>, ISTKTransferService
|
|
{
|
|
private readonly ISelBillRepository _selBillRepository;
|
|
public STKTransferService(ISTKTransferRepository repository, ISelBillRepository selBillRepository) : base(repository)
|
|
{
|
|
Init(repository);
|
|
Init(selBillRepository);
|
|
_selBillRepository = selBillRepository;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 调拨管理
|
|
/// </summary>
|
|
/// <param name="data"></param>
|
|
/// <returns></returns>
|
|
public async Task<RetMessage> STKTransferSubmit(InputBarCode<BD_BARCODERS2> request)
|
|
{
|
|
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
|
{
|
|
return new RetMessage
|
|
{
|
|
Status = 0,
|
|
Message = "提交信息为空"
|
|
};
|
|
}
|
|
string tranType = "STK_TransferManage";
|
|
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
|
if (selBillList == null || selBillList.Count <= 0)
|
|
{
|
|
return new RetMessage
|
|
{
|
|
Status = 0,
|
|
Message = "调拨管理对应的出入库流程信息未找到"
|
|
};
|
|
}
|
|
request.TranType = tranType;
|
|
return await (repository as ISTKTransferRepository).STKTransferSubmit(request, selBillList);
|
|
}
|
|
}
|
|
}
|