diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs index 3a919536a..6b4bc05ae 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesIncomingBackgroundWorker.cs @@ -60,58 +60,58 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase await TransferNoteConverter.ConvertAsync(mesOutsFromExternalList_TransferNote).ConfigureAwait(false); } - Logger.LogInformation($"Read Scrap");//报废 - var scrapReader = workerContext.ServiceProvider.GetRequiredService(); - var scrapConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存Scrap - var scrapsFromExternalList = await scrapReader.ReadAsync().ConfigureAwait(false); - //转换Scrap - await scrapConverter.ConvertAsync(scrapsFromExternalList).ConfigureAwait(false); - - - Logger.LogInformation($"Read BackFlush");//耗用单 - var BackFlushReader = workerContext.ServiceProvider.GetRequiredService(); - var BackFlushConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存BackFlush - var backFlushsFromExternalList = await BackFlushReader.ReadAsync().ConfigureAwait(false); - //转换BackFlush - await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false); - - - Logger.LogInformation($"Read TransferNote");//储位调拨 - var TransferNoteReader = workerContext.ServiceProvider.GetRequiredService(); - // var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存TransferNote - var transferNoteFromExternalList = await TransferNoteReader.ReadAsync().ConfigureAwait(false); - //转换TransferNote - await TransferNoteConverter.ConvertAsync(transferNoteFromExternalList).ConfigureAwait(false); - - Logger.LogInformation($"Read Frozen");//冻结解冻 - var FrozenReader = workerContext.ServiceProvider.GetRequiredService(); - var FrozenConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存Frozen - var mesNoteFromExternalList = await FrozenReader.ReadAsync().ConfigureAwait(false); - //转换Frozen - await FrozenConverter.ConvertAsync(mesNoteFromExternalList).ConfigureAwait(false); - - - Logger.LogInformation($"Read Delivery");//成品发运 - var DeliveryReader = workerContext.ServiceProvider.GetRequiredService(); - var DeliveryConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存Delivery - var deliveryNoteFromExternalList = await DeliveryReader.ReadAsync().ConfigureAwait(false); - //转换Delivery - await DeliveryConverter.ConvertAsync(deliveryNoteFromExternalList).ConfigureAwait(false); - - - - Logger.LogInformation($"Read CallMtl");//自动叫料 - var CallMtlReader = workerContext.ServiceProvider.GetRequiredService(); - var CallMtlConverter = workerContext.ServiceProvider.GetRequiredService(); - //读取并保存Delivery - var callMtlFromExternalList = await CallMtlReader.ReadAsync().ConfigureAwait(false); - //转换Delivery - await CallMtlConverter.ConvertAsync(callMtlFromExternalList).ConfigureAwait(false); + //Logger.LogInformation($"Read Scrap");//报废 + //var scrapReader = workerContext.ServiceProvider.GetRequiredService(); + //var scrapConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存Scrap + //var scrapsFromExternalList = await scrapReader.ReadAsync().ConfigureAwait(false); + ////转换Scrap + //await scrapConverter.ConvertAsync(scrapsFromExternalList).ConfigureAwait(false); + + + //Logger.LogInformation($"Read BackFlush");//耗用单 + //var BackFlushReader = workerContext.ServiceProvider.GetRequiredService(); + //var BackFlushConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存BackFlush + //var backFlushsFromExternalList = await BackFlushReader.ReadAsync().ConfigureAwait(false); + ////转换BackFlush + //await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false); + + + //Logger.LogInformation($"Read TransferNote");//储位调拨 + //var TransferNoteReader = workerContext.ServiceProvider.GetRequiredService(); + //// var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存TransferNote + //var transferNoteFromExternalList = await TransferNoteReader.ReadAsync().ConfigureAwait(false); + ////转换TransferNote + //await TransferNoteConverter.ConvertAsync(transferNoteFromExternalList).ConfigureAwait(false); + + //Logger.LogInformation($"Read Frozen");//冻结解冻 + //var FrozenReader = workerContext.ServiceProvider.GetRequiredService(); + //var FrozenConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存Frozen + //var mesNoteFromExternalList = await FrozenReader.ReadAsync().ConfigureAwait(false); + ////转换Frozen + //await FrozenConverter.ConvertAsync(mesNoteFromExternalList).ConfigureAwait(false); + + + //Logger.LogInformation($"Read Delivery");//成品发运 + //var DeliveryReader = workerContext.ServiceProvider.GetRequiredService(); + //var DeliveryConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存Delivery + //var deliveryNoteFromExternalList = await DeliveryReader.ReadAsync().ConfigureAwait(false); + ////转换Delivery + //await DeliveryConverter.ConvertAsync(deliveryNoteFromExternalList).ConfigureAwait(false); + + + + //Logger.LogInformation($"Read CallMtl");//自动叫料 + //var CallMtlReader = workerContext.ServiceProvider.GetRequiredService(); + //var CallMtlConverter = workerContext.ServiceProvider.GetRequiredService(); + ////读取并保存Delivery + //var callMtlFromExternalList = await CallMtlReader.ReadAsync().ConfigureAwait(false); + ////转换Delivery + //await CallMtlConverter.ConvertAsync(callMtlFromExternalList).ConfigureAwait(false); Logger.LogInformation($"Completed: Handling {Incoming}"); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs index df94183cf..8f02b2b60 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs @@ -89,7 +89,7 @@ public class MesOutConverter : IIncomingConverter var productReceiptNote = JsonSerializer.Deserialize(incomingFromExternal.DestinationDataContent); var wmsProductReceiptNoteDetail = _objectMapper.Map(productReceiptNote.Detail); - var oldNoteDetail = wmsProductReceiptNote.Details.FirstOrDefault(r =>r.MesQuality== wmsProductReceiptNoteDetail.MesQuality&& r.ItemCode == wmsProductReceiptNoteDetail.ItemCode && r.LocationErpCode == wmsProductReceiptNoteDetail.LocationErpCode && (first.TableType != EnumExchangeTableType.MainTable ? true : r.ReturnQty != 0)); + //var oldNoteDetail = wmsProductReceiptNote.Details.FirstOrDefault(r =>r.MesQuality== wmsProductReceiptNoteDetail.MesQuality&& r.ItemCode == wmsProductReceiptNoteDetail.ItemCode && r.LocationErpCode == wmsProductReceiptNoteDetail.LocationErpCode && (first.TableType != EnumExchangeTableType.MainTable ? true : r.ReturnQty != 0)); sumdetail.itemCode = wmsProductReceiptNoteDetail.ItemCode; sumdetail.locationCode = wmsProductReceiptNoteDetail.LocationErpCode; @@ -98,14 +98,14 @@ public class MesOutConverter : IIncomingConverter sumdetail.Memo = wmsProductReceiptNoteDetail.Remark; sumdetail.MesGuid = incomingFromExternal.SourceDataId; sumDetails.Add(sumdetail); - if (oldNoteDetail != null) - { - oldNoteDetail.Qty = oldNoteDetail.Qty + wmsProductReceiptNoteDetail.Qty; - oldNoteDetail.ReturnQty = oldNoteDetail.ReturnQty + wmsProductReceiptNoteDetail.ReturnQty; - } - else - { - wmsProductReceiptNoteDetail.Lot = ""; //排序批次 + //if (oldNoteDetail != null) + //{ + // oldNoteDetail.Qty = oldNoteDetail.Qty + wmsProductReceiptNoteDetail.Qty; + // oldNoteDetail.ReturnQty = oldNoteDetail.ReturnQty + wmsProductReceiptNoteDetail.ReturnQty; + //} + //else + //{ + wmsProductReceiptNoteDetail.Lot = ""; //排序批次 wmsProductReceiptNoteDetail.PackingCode = "";//箱标签 wmsProductReceiptNoteDetail.Status = EnumInventoryStatus.OK; wmsProductReceiptNoteDetail.WarehouseCode = "T9"; @@ -160,7 +160,7 @@ public class MesOutConverter : IIncomingConverter wmsProductReceiptNoteDetail.Uom = ""; } wmsProductReceiptNote.Details.Add(wmsProductReceiptNoteDetail); - } + //} } wmsProductReceiptNote.ExtraProperties = new ExtraPropertyDictionary(); wmsProductReceiptNote.ExtraProperties.Add(first.SourceDataGroupCode, JsonSerializer.Serialize(sumDetails)); diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json index 7b848b1b8..0f8bdf492 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json @@ -29,7 +29,7 @@ "BaseUrl": "http://dev.ccwin-in.com:60084/" }, "Store": { - "BaseUrl": "http://localhost:59095/" + "BaseUrl": "http://dev.ccwin-in.com:60085/" }, "Label": { "BaseUrl": "http://dev.ccwin-in.com:60082/" diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs index 17418503c..f33a7441d 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs @@ -31,6 +31,7 @@ public class JobController : AbpController private readonly IPurchaseReturnJobAppService _purchaseReturnJobAppService; private readonly IPutawayJobAppService _putawayJobAppService; private readonly IProductionReturnJobAppService _productionReturnJobAppService; + private readonly IThirdLocationJobAppService _thirdLocationJobAppService; /// /// @@ -54,7 +55,8 @@ public class JobController : AbpController IPurchaseReceiptJobAppService purchaseReceiptJobAppService, IPurchaseReturnJobAppService purchaseReturnJobAppService, IPutawayJobAppService putawayJobAppService, - IProductionReturnJobAppService productionReturnJobAppService) + IProductionReturnJobAppService productionReturnJobAppService, + IThirdLocationJobAppService thirdLocationJobAppService) { _userWorkGroupAppService = userWorkGroupAppService; _countJobAppService = countJobAppService; @@ -66,6 +68,7 @@ public class JobController : AbpController _purchaseReturnJobAppService = purchaseReturnJobAppService; _putawayJobAppService = putawayJobAppService; _productionReturnJobAppService = productionReturnJobAppService; + _thirdLocationJobAppService = thirdLocationJobAppService; } /// @@ -205,8 +208,20 @@ public class JobController : AbpController } }).ConfigureAwait(false); list.Add(new JobCountDto { JobType = EnumJobType.ProductionReturnJob, Count = productionReturnJobs }); + //三方库 + var thirdLocationJobs = await _thirdLocationJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + { + Condition = new Condition + { + Filters = new List + { + new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + } + } + }).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.ThirdLocationJob, Count = thirdLocationJobs }); return new ListResultDto(list); } - } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs index d526b507c..773cfa4ad 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs @@ -98,4 +98,10 @@ public enum EnumJobType /// [Display(Name = "转移")] ContainerTransferJob = 16, + + /// + /// 三方库 + /// + [Display(Name = "三方库")] + ThirdLocationJob = 17, }