From a503031eafb683e8a1dd9f95df89b4b0d3be2343 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 26 Apr 2023 20:10:57 +0800 Subject: [PATCH 1/6] =?UTF-8?q?EOS=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Outgoing/ArriveConverter.cs | 13 ++++++++++++- ...Sfs.Wms.DataExchange.Application.Contracts.xml | 15 +++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs index f66228193..207931f9a 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Text.Json; using System.Threading.Tasks; using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.EOS; using Win_in.Sfs.Wms.DataExchange.Domain.Shared; @@ -17,6 +19,7 @@ public class ArriveConverter : IOutgoingConverter private readonly IOutgoingToExternalManager _outgoingToExternalManager; private readonly ISupplierAsnAppService _supplierAsnAppService; private readonly IObjectMapper _objectMapper; + private readonly IInventoryLabelAppService _inventoryLabelAppService; public ArriveConverter( @@ -24,8 +27,10 @@ public class ArriveConverter : IOutgoingConverter , IOutgoingToExternalManager outgoingToExternalManager , ISupplierAsnAppService supplierAsnAppService , IObjectMapper objectMapper + , IInventoryLabelAppService inventoryLabelAppService ) { + _inventoryLabelAppService = inventoryLabelAppService; _outgoingFromWmsManager = outgoingFromWmsManager; _outgoingToExternalManager = outgoingToExternalManager; _supplierAsnAppService = supplierAsnAppService; @@ -60,6 +65,12 @@ public class ArriveConverter : IOutgoingConverter var exchangeReceipt = await BuildPutawayExchangeDtoAsync(wmsReceipt, detail).ConfigureAwait(false); outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceipt); var arrive = BuildArrive(exchangeReceipt); + + var label = await _inventoryLabelAppService.GetByCodeAsync(arrive.DetailMatNo).ConfigureAwait(false); + if (label != null) + { + arrive.ShipBillNo = label.AsnNumber; + } outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive); outgoingToExternalList.Add(outgoingToExternal); @@ -87,7 +98,7 @@ public class ArriveConverter : IOutgoingConverter DocNo = exchangeReceipt.Number, DetailMatNo = detail.ToPackingCode, ERP = detail.ItemCode, - Qty = detail.ShippedQty, + Qty = detail.Qty, HgQty = detail.Qty, ProductDate = detail.ProduceDate, ProductBatch = detail.ToLot, diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml index c1283a9e2..89fa4a1e8 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml @@ -876,6 +876,11 @@ 物品代码 + + + 库位组 + + 排序批次 @@ -1601,6 +1606,11 @@ 来源ERP库位 + + + 库位组 + + 数量 @@ -1636,6 +1646,11 @@ 来源ERP库位 + + + 库位组 + + 数量 From 4601988db1783c661987e3ae668cfc66563dcc66 Mon Sep 17 00:00:00 2001 From: mahao Date: Thu, 27 Apr 2023 09:37:22 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=88=A4=E6=96=AD=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E6=97=B6=E9=97=B4=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Orders/PurchaseOrderEventHandler.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs index 373067035..60d96fa18 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs @@ -158,7 +158,12 @@ public class PurchaseOrderEventHandler //供应商时间窗口 var dayOfWeek = new List() { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; var chineseWeek= dayOfWeek[Clock.Now.DayOfWeek.GetHashCode()]; //中文星期 - var dateTimeWindowDto=supplierTimeWindowDtos.First(p => p.Week == chineseWeek); + var dateTimeWindowDto=supplierTimeWindowDtos.FirstOrDefault(p => p.Week == chineseWeek); + if (dateTimeWindowDto == null) + { + throw new UserFriendlyException($"供应商窗口时间窗口当前时间【{chineseWeek}】不存在"); + } + supplierAsnEditInput.TimeWindow = dateTimeWindowDto.TimeSlot; //生效日期 From 1e1541b324e07d02417753b016faa241bd46b139 Mon Sep 17 00:00:00 2001 From: mahao Date: Thu, 27 Apr 2023 11:50:25 +0800 Subject: [PATCH 3/6] up --- .../Orders/PurchaseOrderEventHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs index 60d96fa18..5fa8594c1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs @@ -161,7 +161,7 @@ public class PurchaseOrderEventHandler var dateTimeWindowDto=supplierTimeWindowDtos.FirstOrDefault(p => p.Week == chineseWeek); if (dateTimeWindowDto == null) { - throw new UserFriendlyException($"供应商窗口时间窗口当前时间【{chineseWeek}】不存在"); + throw new UserFriendlyException($"供应商时间窗口当前时间【{chineseWeek}】不存在"); } supplierAsnEditInput.TimeWindow = dateTimeWindowDto.TimeSlot; From d94d31a8eb87e8dcbc2166273c28f84952afe5f3 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Fri, 28 Apr 2023 10:05:52 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=9B=B6=E4=BB=B6=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Incoming/ItemBasicConverter.cs | 2 ++ .../WMS/ItemBasic/ItemBasicExchangeDto.cs | 4 ++-- .../Items/ItemBasicEfCoreRepository.cs | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs index a50d73ebf..5583c701c 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs @@ -7,6 +7,7 @@ using Microsoft.Extensions.Logging; using Volo.Abp.Guids; using Volo.Abp.ObjectMapping; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.WMS.ItemBasic; @@ -69,6 +70,7 @@ public class ItemBasicConverter : IIncomingConverter incomingToWms.SetEffectiveDate(item.EffectiveDate); var exchangeItemBasicRequest = JsonSerializer.Deserialize(item.DestinationDataContent); var wmsMaterialRequest = _objectMapper.Map(exchangeItemBasicRequest); + wmsMaterialRequest.ValidityUnit = EnumValidityUnit.Infinite; incomingToWms.DataContent = JsonSerializer.Serialize(wmsMaterialRequest); incomingToWmsList.Add(incomingToWms); } diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ItemBasic/ItemBasicExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ItemBasic/ItemBasicExchangeDto.cs index c6860062c..41daaedb0 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ItemBasic/ItemBasicExchangeDto.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ItemBasic/ItemBasicExchangeDto.cs @@ -89,13 +89,13 @@ public class ItemBasicExchangeDto ItemBasicExchangeDto itembasic = obj as ItemBasicExchangeDto; return Code == itembasic.Code && Desc1 == itembasic.Desc1 && Desc2 == itembasic.Desc2 && Configuration == itembasic.Configuration && Type == itembasic.Type && CanMake == itembasic.CanMake && CanBuy == itembasic.CanBuy && CanOutsourcing == itembasic.CanOutsourcing && IsRecycled == itembasic.IsRecycled && - BasicUom == itembasic.BasicUom; + BasicUom == itembasic.BasicUom&& StdPackQty==itembasic.StdPackQty; } return false; } public override int GetHashCode() { - return Code.GetHashCode() ^ (Desc1 == null ? 0 : Desc1.GetHashCode()) ^ (Desc2 == null ? 0 : Desc2.GetHashCode()) ^ (Configuration == null ? 0 : Configuration.GetHashCode()) ^ (Type == null ? 0 : Type.GetHashCode()) ^ CanMake.GetHashCode() ^ CanBuy.GetHashCode() ^ CanOutsourcing.GetHashCode() ^ IsRecycled.GetHashCode() ^ BasicUom.GetHashCode(); + return Code.GetHashCode() ^ (Desc1 == null ? 0 : Desc1.GetHashCode()) ^ (Desc2 == null ? 0 : Desc2.GetHashCode()) ^ (Configuration == null ? 0 : Configuration.GetHashCode()) ^ (Type == null ? 0 : Type.GetHashCode()) ^ CanMake.GetHashCode() ^ CanBuy.GetHashCode() ^ CanOutsourcing.GetHashCode() ^ IsRecycled.GetHashCode() ^ BasicUom.GetHashCode() ^ StdPackQty.GetHashCode(); } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs index 023b05f31..ce2fb4ebb 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs @@ -22,6 +22,7 @@ public class ItemBasicEfCoreRepository : SfsBaseDataEfCoreRepositoryBase Date: Fri, 28 Apr 2023 10:28:10 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E9=9B=B6=E4=BB=B6=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Incoming/ItemBasicReader.cs | 21 +------------------ .../Items/ItemBasicEfCoreRepository.cs | 2 +- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs index de94dfad5..ecab2e62a 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs @@ -121,25 +121,6 @@ public class ItemBasicReader : IReader catch (Exception) { } - string type = ""; - switch (product.mes_product_code) - { - case "10C01": - type = "成品"; - break; - case "10C02": - type = "成品"; - break; - case "10C03": - type = "物料"; - break; - case "10C04": - type = "半成品"; - break; - default: - type = "无"; - break; - } var itemBasicRequest = new ItemBasicExchangeDto() { @@ -157,7 +138,7 @@ public class ItemBasicReader : IReader IsRecycled = product.mes_product_mfg == "10406" ? true : false, //10406 回收 #endregion - Type = type,//10C01成品、10C02原料、10C03物料、10C04半成品 + Type = product.mes_product_code,//10C01成品、10C02原料、10C03物料、10C04半成品 Configuration = product.mes_product_spec, BasicUom = product.mes_product_unit, AbcClass = "", diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs index ce2fb4ebb..4b4bedc65 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs @@ -27,7 +27,7 @@ public class ItemBasicEfCoreRepository : SfsBaseDataEfCoreRepositoryBase Date: Sat, 29 Apr 2023 17:44:32 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9pda=20=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Inventories/BalanceController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs index 444f4c83c..2b466b511 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs @@ -286,11 +286,11 @@ public class BalanceController : AbpController } } - //if (listInput.inventoryStatuses != null && listInput.inventoryStatuses.Any()) - //{ - // input.Condition.Filters.Add( - // new Filter("Status", JsonSerializer.Serialize(listInput.inventoryStatuses), "In")); - //} + if (listInput.inventoryStatuses != null && listInput.inventoryStatuses.Any()) + { + input.Condition.Filters.Add( + new Filter("Status", JsonSerializer.Serialize(listInput.inventoryStatuses), "In")); + } var balanceDTOs = await _balanceAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false);