You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
5.2 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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
{
/// <summary>
/// ERP接口
/// </summary>
public class ERPInterfaceService : BaseService<BaseEntity>, IERPInterfaceService
{
private readonly IERPInterfaceRepository repository;
public ERPInterfaceService(IERPInterfaceRepository _repository) : base(_repository)
{
repository = _repository;
}
/// <summary>
/// 从SAP传递物料基本信息到WMS
/// </summary>
/// <param name="sapPt"></param>
/// <returns></returns>
public WmsInterfaceResult MaterialMasterMethod(string sid, List<SapPtInterface> sapPt)
{
WmsInterfaceResult rfInfo = repository.MaterialMasterMethod(sid,sapPt);
return rfInfo;
}
/// <summary>
/// 从SAP传递供应商基本信息到WMS
/// </summary>
/// <param name="sapPt"></param>
/// <returns></returns>
public WmsInterfaceResult SupplierMasterMethod(string sid, List<SapSuInterface> sapSu)
{
WmsInterfaceResult rfInfo = repository.SupplierMasterMethod(sid, sapSu);
return rfInfo;
}
/// <summary>
/// 从SAP传递客户基本信息到WMS
/// </summary>
/// <param name="sapPt"></param>
/// <returns></returns>
public WmsInterfaceResult CustomerMasterMethod(string sid, List<SapCuInterface> sapCu)
{
WmsInterfaceResult rfInfo = repository.CustomerMasterMethod(sid,sapCu);
return rfInfo;
}
/// <summary>
/// 从SAP传递物料号与客户物料号对照信息到WMS
/// </summary>
/// <param name="sapPt"></param>
/// <returns></returns>
public WmsInterfaceResult CustomerItemMasterMethod(string sid, List<SapPtcptInterface> sapPtcpt)
{
WmsInterfaceResult rfInfo = repository.CustomerItemMasterMethod(sid, sapPtcpt);
return rfInfo;
}
/// <summary>
/// MBOM同步到MES系统
/// </summary>
/// <param name="sapBom"></param>
/// <returns></returns>
public WmsInterfaceResult BomMasterMethod(string sid, List<SapBomInterface> sapBom)
{
WmsInterfaceResult rfInfo = repository.BomMasterMethod(sid, sapBom);
return rfInfo;
}
/// <summary>
/// SAP系统把ASN传递到WMS用于采购收货
/// </summary>
/// <param name="sapAsn"></param>
/// <returns></returns>
public WmsInterfaceResult ASNDataMethod(string sid, List<SapAsnInterface> sapAsn)
{
WmsInterfaceResult rfInfo = repository.ASNDataMethod(sid, sapAsn);
return rfInfo;
}
/// <summary>
/// SAP系统把PO传递到WMS用于采购收货
/// </summary>
/// <param name="sapDspo"></param>
/// <returns></returns>
public WmsInterfaceResult PODataMethod(string sid, List<SapDspoInterface> sapDspo)
{
WmsInterfaceResult rfInfo = repository.PODataMethod(sid, sapDspo);
return rfInfo;
}
/// <summary>
/// SAP系统将一定期间内待发运交货单信息发布到WMS用于后续捡配发货
/// </summary>
/// <param name="orderNo"></param>
/// <returns></returns>
public WmsInterfaceResult SalesAndDeliveryPlanMethod(string sid, List<SapDnInterface> sapDns)
{
WmsInterfaceResult rfInfo = repository.SalesAndDeliveryPlanMethod(sid, sapDns);
return rfInfo;
}
/// <summary>
/// SAP把物料的零星出(入指令传到WMS
/// </summary>
/// <param name="orderNo"></param>
/// <returns></returns>
public WmsInterfaceResult SporadicEntryAndExitMethod(string sid, List<SapMiscoInterface> sapMiscos)
{
WmsInterfaceResult rfInfo = repository.SporadicEntryAndExitMethod(sid, sapMiscos);
return rfInfo;
}
/// <summary>
/// 盘点开始时SAP冻结库存并把盘点表传到WMS
/// </summary>
/// <param name="orderNo"></param>
/// <returns></returns>
public WmsInterfaceResult InventoryListMethod(string sid, List<SapCycoInterface> sapCycos)
{
WmsInterfaceResult rfInfo = repository.InventoryListMethod(sid, sapCycos);
return rfInfo;
}
/// <summary>
/// SAP把盘点差异转移到差异库的结果传到WMS使得WMS可以根据盘点结果调整库存
/// </summary>
/// <param name="orderNo"></param>
/// <returns></returns>
public WmsInterfaceResult InventoryDifferenceAdjustmentMethod(string sid, List<SapDifoInterface> sapDifos)
{
WmsInterfaceResult rfInfo = repository.InventoryDifferenceAdjustmentMethod(sid, sapDifos);
return rfInfo;
}
}
}