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冻结库存,并把盘点表传到WMS /// public class InterfaceInventoryListJob : IJobService { private readonly IInterfaceMasterRepository repository; public InterfaceInventoryListJob(IInterfaceMasterRepository _repository) { this.repository = _repository; } public string ExecuteService(string parameter) { try { List sapCycos = repository.GetInventoryListInfo(); if (sapCycos.Count <= 0) { return "没有待处理的盘点单信息!"; } bool bl = repository.InsertInventoryListInfo(sapCycos); if (bl == true) { return "盘点单信息同步成功!"; } else { return "盘点单信息同步失败!"; } } catch (Exception ex) { LogHelper.Error("盘点单信息同步错误!" + ex); return "盘点单信息同步错误!" + ex.Message; } } } }