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.

52 lines
1.5 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 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把盘点差异转移到差异库的结果传到WMS使得WMS可以根据盘点结果调整库存
/// </summary>
public class InterfaceInventoryDifferenceJob : IJobService
{
private readonly IInterfaceMasterRepository repository;
public InterfaceInventoryDifferenceJob(IInterfaceMasterRepository _repository)
{
this.repository = _repository;
}
public string ExecuteService(string parameter)
{
try
{
List<SapDifo> sapDifos = repository.GetInventoryDifferenceAdjustmentInfo();
if (sapDifos.Count <= 0)
{
return "没有待处理的盘点差异调整信息!";
}
bool bl = repository.InsertInventoryDifferenceAdjustmentInfo(sapDifos);
if (bl == true)
{
return "盘点差异调整信息同步成功!";
}
else
{
return "盘点差异调整信息同步失败!";
}
}
catch (Exception ex)
{
LogHelper.Error("盘点差异调整信息同步错误!" + ex);
return "盘点差异调整信息同步错误!" + ex.Message;
}
}
}
}