diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs index 43fc043db..d1ed0e792 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs @@ -166,7 +166,7 @@ public class EosAgentModule : AbpModule { context.AddBackgroundWorkerAsync(); - context.AddBackgroundWorkerAsync(); + //context.AddBackgroundWorkerAsync(); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs index 7b109e3fc..cfcb955d4 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs @@ -62,7 +62,7 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase var shipHandleService = workerContext.ServiceProvider.GetRequiredService(); var shipConverter = workerContext.ServiceProvider.GetRequiredService(); //读取并保持Ship - var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false); + var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false); //转换Ship await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false); Logger.LogInformation($"处理发货单【{shipsFromExternalList.Count}】条数据"); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs index 689fe389b..00113ed79 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs @@ -82,17 +82,19 @@ public class PlanConverter : IIncomingConverter { var wmsPo = _objectMapper.Map(exchangePo); - wmsPo.PoType = "2"; + wmsPo.PoType = "采购订单"; wmsPo.IsConsignment = false; wmsPo.Version = ""; wmsPo.TaxRate = 0; wmsPo.Details = new List(); + int poline = 1; foreach (var incomingFromExternal in group.ToList()) { var po = JsonSerializer.Deserialize(incomingFromExternal.DestinationDataContent); var wmsPoDetail = await BuildPurchaseOrderDetailInput(po).ConfigureAwait(false); - + wmsPoDetail.PoLine = poline.ToString(); wmsPo.Details.Add(wmsPoDetail); + poline++; } return wmsPo; diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/appsettings.json index 889b25a6a..40a8fdd21 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/appsettings.json +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/appsettings.json @@ -28,7 +28,7 @@ "BaseUrl": "http://10.164.233.5:60084/" }, "Store": { - "BaseUrl": "http://localhost:59095/" + "BaseUrl": "http://10.164.233.5:60085/" }, "Label": { "BaseUrl": "http://10.164.233.5:60082/" diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs index 62c920660..a503aee64 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs @@ -161,7 +161,7 @@ public class MesAgentModule : AbpModule { context.AddBackgroundWorkerAsync(); - //context.AddBackgroundWorkerAsync(); + context.AddBackgroundWorkerAsync(); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json index b21a53442..299dee9ea 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json @@ -1,12 +1,12 @@ { "ConnectionStrings": { - "Default": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false", - "DataExchange": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_DataExchange_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false", + "Default": "Server=10.164.233.6;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false", + "DataExchange": "Server=10.164.233.6;Database=WMS_DongYang_DataExchange_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false", "MES": "Server=10.164.233.7;Database=MES_JY;uid=sa;pwd=Asdf1234$;TrustServerCertificate=True;Encrypt=false" }, "AuthServer": { - "Authority": "http://dev.ccwin-in.com:60083/", + "Authority": "http://10.164.233.5:60083/", "RequireHttpsMetadata": "false", "SwaggerClientId": "admin", "SwaggerClientSecret": "1q2w3E*", @@ -24,13 +24,13 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://dev.ccwin-in.com:60084/" + "BaseUrl": "http://10.164.233.5:60084/" }, "Store": { - "BaseUrl": "http://dev.ccwin-in.com:60085/" + "BaseUrl": "http://10.164.233.5:60085/" }, "Label": { - "BaseUrl": "http://dev.ccwin-in.com:60082/" + "BaseUrl": "http://10.164.233.5:60082/" } }, @@ -43,7 +43,7 @@ "RetryTimes": 3 }, "OutgoingOptions": { - "Active": true, + "Active": false, "PeriodSeconds": 10, "BatchSize": 10, "MaxCount": 100, diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs index 84afa8dc4..453c323d6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs @@ -8,9 +8,9 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class DeliverRequestImportInput : SfsStoreImportInputBase { /// - /// 单据号 + /// 单据号调拨单号 /// - [Display(Name = "单据号")] + [Display(Name = "单据号调拨单号")] [Required] [Key] public string Number { get; set; } @@ -30,9 +30,9 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase public DateTime DeliverTime { get; set; } /// - /// 客户 + /// 客户代码 /// - [Display(Name = "客户")] + [Display(Name = "客户代码")] [Required] [Key] public string CustomerCode { get; set; } @@ -67,14 +67,12 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase /// Mes发货计划号 /// [Display(Name = "Mes发货计划号")] - [Required] public string MesDeliveryPlan { get; set; } /// /// Mes器具号 /// [Display(Name = "Mes器具号")] - [Required] public string MesDeliveryContainer { get; set; } /// /// Mes车牌号 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs index 95a7034ba..79afa8653 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs @@ -118,29 +118,29 @@ IItemBasicAppService itemBasicAppService) if (model.DeliverRequestType == EnumDeliverRequestType.FIS) { - if (string.IsNullOrEmpty(model.IdentityNo)) - { - validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写底盘号", new string[] { "底盘号" })); - } - if (string.IsNullOrEmpty(model.MesDeliveryContainer)) - { - validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写Mes器具号", new string[] { "Mes器具号" })); - } - if (string.IsNullOrEmpty(model.MesDeliveryPlan)) - { - validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" })); - } + //if (string.IsNullOrEmpty(model.IdentityNo)) + //{ + // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写底盘号", new string[] { "底盘号" })); + //} + //if (string.IsNullOrEmpty(model.MesDeliveryContainer)) + //{ + // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写Mes器具号", new string[] { "Mes器具号" })); + //} + //if (string.IsNullOrEmpty(model.MesDeliveryPlan)) + //{ + // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" })); + //} } if (model.DeliverRequestType == EnumDeliverRequestType.Normal ) { - if (string.IsNullOrEmpty(model.MesDeliveryPlan)) - { - validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" })); - } - if(!string.IsNullOrEmpty(model.IdentityNo)) - { - validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货底盘号应该为空", new string[] { "底盘号"})); - } + //if (string.IsNullOrEmpty(model.MesDeliveryPlan)) + //{ + // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" })); + //} + //if(!string.IsNullOrEmpty(model.IdentityNo)) + //{ + // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货底盘号应该为空", new string[] { "底盘号"})); + //} } var area = await _areaApp.GetByCodeAsync(model.AreaCode).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs index a37a2f692..c6bbd24e6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs @@ -61,6 +61,12 @@ public class PurchaseOrderManager : SfsStoreManagerBase CreateAsync(PurchaseOrder purchaseOrder) { + var supplier = await _supplierApp.GetByCodeAsync(purchaseOrder.SupplierCode).ConfigureAwait(false); + if (supplier != null) + { + purchaseOrder.SupplierAddress = supplier.Address; + purchaseOrder.SupplierName = supplier.Name; + } //接收到新的采购订单时,更新无PO收货单的PoNumber //await _purchaseReceiptNoteManager.AppendPoNumberAsync(purchaseOrder).ConfigureAwait(false); purchaseOrder.SetIdAndNumberWithDetails(GuidGenerator, purchaseOrder.Number);