Browse Source

mes接口修改

集成Redis
唐明亮 2 years ago
parent
commit
b76289a3d8
  1. 4
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Backflus/Backflu.cs
  2. 42
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs
  3. 4
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/ScrapConverter.cs
  4. 5
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/ScrapReader.cs

4
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Backflus/Backflu.cs

@ -1,3 +1,4 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities;
namespace Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes;
@ -15,6 +16,7 @@ public class Backflu : Entity
/// <summary>
/// TYRP单号
/// </summary>
[Key]
public string scmout_nbr { get; set; }
/// <summary>
/// 料号
@ -51,6 +53,6 @@ public class Backflu : Entity
public override object[] GetKeys()
{
return new object[] { scmout_type + scmout_nbr + scmout_part + scmout_no };
return new object[] { scmout_nbr };
}
}

42
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs

@ -42,13 +42,13 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
////转换MesOut
//await mesOutConverter.ConvertAsync(mesOutsFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Read PullTask");//拉动任务
var pullTaskReader = workerContext.ServiceProvider.GetRequiredService<PullTaskReader>();
var pullTaskConverter = workerContext.ServiceProvider.GetRequiredService<PullTaskConverter>();
//读取并保存PullTask
var pullTaskFromExternalList = await pullTaskReader.ReadAsync().ConfigureAwait(false);
//转换PullTask
await pullTaskConverter.ConvertAsync(pullTaskFromExternalList).ConfigureAwait(false);
//Logger.LogInformation($"Read PullTask");//拉动任务
//var pullTaskReader = workerContext.ServiceProvider.GetRequiredService<PullTaskReader>();
//var pullTaskConverter = workerContext.ServiceProvider.GetRequiredService<PullTaskConverter>();
////读取并保存PullTask
//var pullTaskFromExternalList = await pullTaskReader.ReadAsync().ConfigureAwait(false);
////转换PullTask
//await pullTaskConverter.ConvertAsync(pullTaskFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Read Scrap");
var scrapReader = workerContext.ServiceProvider.GetRequiredService<ScrapReader>();
@ -58,21 +58,21 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
//转换Scrap
await scrapConverter.ConvertAsync(scrapsFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Read Issue");
var pckHandleService = workerContext.ServiceProvider.GetRequiredService<IssueReader>();
var pckConverter = workerContext.ServiceProvider.GetRequiredService<IssueConverter>();
//读取并保持Pck
var pcksFromExternalList = await pckHandleService.ReadAsync().ConfigureAwait(false);
//转换Pck
await pckConverter.ConvertAsync(pcksFromExternalList).ConfigureAwait(false);
//Logger.LogInformation($"Read Issue");
//var pckHandleService = workerContext.ServiceProvider.GetRequiredService<IssueReader>();
//var pckConverter = workerContext.ServiceProvider.GetRequiredService<IssueConverter>();
////读取并保持Pck
//var pcksFromExternalList = await pckHandleService.ReadAsync().ConfigureAwait(false);
////转换Pck
//await pckConverter.ConvertAsync(pcksFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Read BackFlush");//耗用单
var BackFlushReader = workerContext.ServiceProvider.GetRequiredService<BackFluReader>();
var BackFlushConverter = workerContext.ServiceProvider.GetRequiredService<BackFluConverter>();
//读取并保存Customer
var backFlushsFromExternalList = await BackFlushReader.ReadAsync().ConfigureAwait(false);
//转换Customer
await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false);
//Logger.LogInformation($"Read BackFlush");//耗用单
//var BackFlushReader = workerContext.ServiceProvider.GetRequiredService<BackFluReader>();
//var BackFlushConverter = workerContext.ServiceProvider.GetRequiredService<BackFluConverter>();
////读取并保存Customer
//var backFlushsFromExternalList = await BackFlushReader.ReadAsync().ConfigureAwait(false);
////转换Customer
//await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Completed: Handling {Incoming}");
}

4
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/ScrapConverter.cs

@ -86,7 +86,9 @@ public class ScrapConverter : IIncomingConverter
wmsScrapDetail.FromLot = "";
wmsScrapDetail.FromWarehouseCode = "";
wmsScrapDetail.ToWarehouseCode = "";
wmsScrapDetail.FromStatus = EnumInventoryStatus.OK;
wmsScrapDetail.FromStatus = EnumInventoryStatus.OK;
wmsScrapDetail.FromLocationArea = "";
wmsScrapDetail.ToLocationGroup = "";
var item = await _itemBasicAppService.GetByCodeAsync(wmsScrapDetail.ItemCode).ConfigureAwait(false);
if (item != null)
{

5
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/ScrapReader.cs

@ -4,6 +4,7 @@ using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.DataExchange.Domain;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes;
using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
@ -95,8 +96,8 @@ public class ScrapReader : IReader
var crap = new ScrapNoteExchangeDto()
{
Worker = scrap.mesout_asd_user,
ActiveDate = DateTime.ParseExact(scrap.Mesout_asd_date, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture)
ActiveDate = DateTime.ParseExact(scrap.Mesout_asd_date, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture),
Type = EnumTransSubType.Scrap_WIP.ToString()
};
var crapDetail = new ScrapNoteDetailExchangeDto()
{

Loading…
Cancel
Save