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.
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 Estsh.Core.Model.EnumUtil ;
using Estsh.Core.Models ;
using Estsh.Core.Quartz.BaseService ;
using Estsh.Core.Util ;
using Estsh.Core.Wms.IRepositories ;
namespace Estsh.Core.Wms.Jobs
{
/// <summary>
/// SAP系统把ASN传递到WMS用于采购收货
/// </summary>
public class InterfaceASNDataJob : IJobService
{
private readonly IInterfaceMasterRepository repository ;
public InterfaceASNDataJob ( IInterfaceMasterRepository _repository )
{
this . repository = _repository ;
}
public string ExecuteService ( string parameter )
{
try
{
List < SapAsn > sapAsns = repository . GetASNDataInfo ( ) ;
if ( sapAsns . Count < = 0 )
{
return "没有待处理的ASN信息! " ;
}
bool bl = repository . InsertASNDataInfo ( sapAsns ) ;
if ( bl = = true )
{
return "ASN信息同步成功! " ;
}
else
{
return "ASN信息同步失败! " ;
}
}
catch ( Exception ex )
{
LogHelper . Error ( "ASN信息同步错误! " + ex ) ;
return "ASN信息同步错误! " + ex . Message ;
}
}
}
}