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 { /// /// SAP系统把PO传递到WMS用于采购收货 /// public class InterfacePODataJob : IJobService { private readonly IInterfaceMasterRepository repository; public InterfacePODataJob(IInterfaceMasterRepository _repository) { this.repository = _repository; } public string ExecuteService(string parameter) { try { List sapDspos = repository.GetDSPODataInfo(); if (sapDspos.Count <= 0) { return "没有待处理的PO信息!"; } bool bl = repository.InsertPODataInfo(sapDspos); if (bl == true) { return "PO信息同步成功!"; } else { return "PO信息同步失败!"; } } catch (Exception ex) { LogHelper.Error("PO信息同步错误!" + ex); return "PO信息同步错误!" + ex.Message; } } } }