using Dapper;
using Estsh.Core.Base;
using Estsh.Core.Model.Result;
using Estsh.Core.Models;
using Estsh.Core.Services;
using Estsh.Core.Wms.IRepositories;
using Estsh.Core.Wms.IServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Estsh.Core.Wms.Services
{
///
/// ERP接口
///
public class ERPInterfaceService : BaseService, IERPInterfaceService
{
private readonly IERPInterfaceRepository repository;
public ERPInterfaceService(IERPInterfaceRepository _repository) : base(_repository)
{
repository = _repository;
}
///
/// 从SAP传递物料基本信息到WMS
///
///
///
public WmsInterfaceResult MaterialMasterMethod(string sid, List sapPt)
{
WmsInterfaceResult rfInfo = repository.MaterialMasterMethod(sid,sapPt);
return rfInfo;
}
///
/// 从SAP传递供应商基本信息到WMS
///
///
///
public WmsInterfaceResult SupplierMasterMethod(string sid, List sapSu)
{
WmsInterfaceResult rfInfo = repository.SupplierMasterMethod(sid, sapSu);
return rfInfo;
}
///
/// 从SAP传递客户基本信息到WMS
///
///
///
public WmsInterfaceResult CustomerMasterMethod(string sid, List sapCu)
{
WmsInterfaceResult rfInfo = repository.CustomerMasterMethod(sid,sapCu);
return rfInfo;
}
///
/// 从SAP传递物料号与客户物料号对照信息到WMS
///
///
///
public WmsInterfaceResult CustomerItemMasterMethod(string sid, List sapPtcpt)
{
WmsInterfaceResult rfInfo = repository.CustomerItemMasterMethod(sid, sapPtcpt);
return rfInfo;
}
///
/// MBOM同步到MES系统
///
///
///
public WmsInterfaceResult BomMasterMethod(string sid, List sapBom)
{
WmsInterfaceResult rfInfo = repository.BomMasterMethod(sid, sapBom);
return rfInfo;
}
///
/// SAP系统把ASN传递到WMS用于采购收货
///
///
///
public WmsInterfaceResult ASNDataMethod(string sid, List sapAsn)
{
WmsInterfaceResult rfInfo = repository.ASNDataMethod(sid, sapAsn);
return rfInfo;
}
///
/// SAP系统把PO传递到WMS用于采购收货
///
///
///
public WmsInterfaceResult PODataMethod(string sid, List sapDspo)
{
WmsInterfaceResult rfInfo = repository.PODataMethod(sid, sapDspo);
return rfInfo;
}
///
/// SAP系统将一定期间内待发运交货单信息发布到WMS用于后续捡配发货
///
///
///
public WmsInterfaceResult SalesAndDeliveryPlanMethod(string sid, List sapDns)
{
WmsInterfaceResult rfInfo = repository.SalesAndDeliveryPlanMethod(sid, sapDns);
return rfInfo;
}
///
/// SAP把物料的零星出(入)指令传到WMS
///
///
///
public WmsInterfaceResult SporadicEntryAndExitMethod(string sid, List sapMiscos)
{
WmsInterfaceResult rfInfo = repository.SporadicEntryAndExitMethod(sid, sapMiscos);
return rfInfo;
}
///
/// 盘点开始时,SAP冻结库存,并把盘点表传到WMS
///
///
///
public WmsInterfaceResult InventoryListMethod(string sid, List sapCycos)
{
WmsInterfaceResult rfInfo = repository.InventoryListMethod(sid, sapCycos);
return rfInfo;
}
///
/// SAP把盘点差异转移到差异库的结果传到WMS,使得WMS可以根据盘点结果调整库存
///
///
///
public WmsInterfaceResult InventoryDifferenceAdjustmentMethod(string sid, List sapDifos)
{
WmsInterfaceResult rfInfo = repository.InventoryDifferenceAdjustmentMethod(sid, sapDifos);
return rfInfo;
}
}
}