From 66553ba41c4110671ecc07376323e932bf9a2f9e Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Fri, 21 Jun 2024 09:44:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=88=90=E5=93=81=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BD=A6=E7=89=8C=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FawtygAutoMapperProfile.cs | 1 - .../Incoming/DeliveryReader.cs | 4 +++- .../Outgoing/CustomerReturnNoteConverter.cs | 2 +- .../Outgoing/TyrpOutgoingBackgroundWorker.cs | 10 +++++----- .../Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json | 4 ++-- .../WMS/DeliverRequest/DeliverRequestExchangeDto.cs | 9 ++++++++- ...n_in.Sfs.Wms.DataExchange.Application.Contracts.xml | 10 ++++++++++ .../Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs | 5 +++++ .../Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs | 5 +++++ .../Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs | 5 +++++ .../Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs | 6 +++++- .../Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs | 4 ++++ .../DeliverRequests/Inputs/DeliverRequestEditInput.cs | 2 ++ .../Inputs/DeliverRequestImportInput.cs | 5 +++++ .../DeliverRequests/DeliverRequestAppService.cs | 8 ++++++++ .../Jobs/DeliverJobs/DeliverJob.cs | 4 ++++ .../Notes/DeliverNotes/DeliverNote.cs | 5 ++++- .../Requests/DeliverRequests/DeliverRequest.cs | 5 ++++- .../DeliverJobDbContextModelCreatingExtensions.cs | 1 + .../DeliverNoteDbContextModelCreatingExtensions.cs | 2 +- .../DeliverRequestDbContextModelCreatingExtensions.cs | 2 +- 21 files changed, 83 insertions(+), 16 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs index 7f5cc4065..e5fd5ef17 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs @@ -250,7 +250,6 @@ public class FawtygAutoMapperProfile : Profile .Ignore(x => x.StdPackQty); CreateMap() - .Ignore(x => x.DeliverPlanNumber) .Ignore(x => x.ExtraProperties) .Ignore(x => x.Details) .Ignore(x => x.CustomerAddressCode) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs index 6a5238413..1f6f35bbb 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs @@ -98,11 +98,13 @@ public class DeliveryReader : IReader var mesRequest = new DeliverRequestExchangeDto() { DeliverRequestType = Delivery.mesout_delivery_type == "0" ? EnumDeliverRequestType.FIS : EnumDeliverRequestType.Normal, + DeliverPlanNumber= Delivery.mesout_delivery_type == "0" ? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan, CustomerCode = Delivery.mesout_delivery_customer, Number = Delivery.mesout_delivery_no, Worker = "MESFY", ActiveDate = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime) ? dateTime : DateTime.Now, - DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now + DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now, + MesTruckNumber=Delivery.mesout_delivery_carno, }; var mesRequestDetail = new DeliverRequestDetailExchangeDto() { diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs index 17c559965..2dcee1142 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs @@ -41,7 +41,7 @@ public class CustomerReturnNoteConverter : IOutgoingConverter { var outgoingToExternalList = new List(); //获取要同步得数据 - var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.UnplannedReceipt, EnumSystemType.ERP).ConfigureAwait(false); + var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.CustomerReturn, EnumSystemType.ERP).ConfigureAwait(false); foreach (var outgoingFromWms in outgoingFromWmsList) { #region 主表 diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs index 038899008..809c11b66 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs @@ -156,12 +156,12 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase } #endregion - #region --接口以关闭-- 退货单 UnplannedReceipt wmsoutm + #region --接口以关闭-- 退货单 CustomerReturn wmsoutm //暂无此接口 - //Logger.LogInformation($"Write CustomerReturnNote");//退货单 - //var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService(); - //var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false); - //await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false); + Logger.LogInformation($"Write CustomerReturnNote");//退货单 + var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService(); + var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false); + await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false); #endregion #region 非生产领料单 UnplannedIssue wmsoutm 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 2e0324e5f..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 @@ -26,10 +26,10 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://localhost:59094/" + "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/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs index 7273c7ce0..d98237813 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs @@ -27,7 +27,14 @@ public class DeliverRequestExchangeDto /// 发货类型 /// public EnumDeliverRequestType DeliverRequestType { get; set; } - + /// + /// 看板件发货计划单号/JIS发货单号 + /// + public string DeliverPlanNumber { get; set; } + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } /// /// 客户 /// 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 0799d6c0e..84bf66f23 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 @@ -626,6 +626,16 @@ 发货类型 + + + 看板件发货计划单号/JIS发货单号 + + + + + Mes车牌号 + + 客户 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs index 7c0feea34..7b2546cb4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs @@ -38,5 +38,10 @@ public class DeliverJobDTO : SfsJobDTOBase /// [Display(Name = "发货请求单号")] public string DeliverRequestNumber { get; set; } + /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs index 2e8d7a2a8..66ffb8100 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs @@ -73,5 +73,10 @@ public class DeliverJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInp /// [Display(Name = "发货计划单号")] public string DeliverPlanNumber { get; set; } + /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs index 0bc9f5a03..e91ba0574 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs @@ -54,6 +54,11 @@ public class DeliverNoteDTO : SfsStoreDTOBase /// [Display(Name = "打印次数")] public int CountPrint { get; set; } + /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } /// /// 发货类型 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs index 38c0e9206..bd1154061 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs @@ -57,7 +57,11 @@ public class DeliverNoteEditInput : SfsStoreCreateOrUpdateInputBase /// [Display(Name = "发货类型")] public EnumDeliverRequestType DeliverRequestType { get; set; } - + /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } /// /// 明细列表 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs index a3686c8a1..729272318 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs @@ -31,4 +31,8 @@ public class DeliverRequestDTO : SfsStoreRequestDTOBase /// [Display(Name = "客户地址")] public string CustomerAddressCode { get; set; } + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs index f58713e69..b612b97f3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs @@ -33,6 +33,8 @@ public class DeliverRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase [Display(Name = "发货类型")] public EnumDeliverRequestType DeliverRequestType { get; set; } + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } [Display(Name = "明细列表")] public List Details { get; set; } 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 917c5b910..cb66bb549 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 @@ -69,6 +69,11 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase [Display(Name = "Mes发货计划号")] public string MesDeliveryPlan { get; set; } /// + /// Mes车牌号 + /// + [Display(Name = "Mes车牌号")] + public string MesTruckNumber { get; set; } + /// /// 底盘号 /// [Display(Name = "底盘号")] 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 2146cf2d2..c4d6b30fe 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 @@ -72,6 +72,14 @@ IItemBasicAppService itemBasicAppService) { throw new UserFriendlyException($"同一发货类型、发货时间、客户的存在相同零件号!"); } + if(request.DeliverRequestType== EnumDeliverRequestType.FIS) + { + request.DeliverPlanNumber = request.Details.First().MesDeliveryNo; + } + else if (request.DeliverRequestType == EnumDeliverRequestType.Normal) + { + request.DeliverPlanNumber = request.Details.First().MesDeliveryPlan; + } foreach (var detail in request.Details) { var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs index d2bcfcdff..6b12186c6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs @@ -41,6 +41,10 @@ public class DeliverJob : SfsJobAggregateRootBase /// [IgnoreUpdate] public string DeliverPlanNumber { get; set; } + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } /// /// 任务明细 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs index 6a60d8f74..4745cf029 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs @@ -60,7 +60,10 @@ public class DeliverNote : SfsStoreAggregateRootBase, IHasJob /// [Display(Name = "打印次数")] public int CountPrint { get; set; } - + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } /// /// 明细列表 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs index a7d5cd8d1..e722611d3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs @@ -20,7 +20,6 @@ public class DeliverRequest : SfsStoreRequestAggregateRootBase /// 发货计划单号 /// - [IgnoreUpdate] public string DeliverPlanNumber { get; set; } /// @@ -39,6 +38,10 @@ public class DeliverRequest : SfsStoreRequestAggregateRootBase public EnumDeliverRequestType DeliverRequestType { get; set; } + /// + /// Mes车牌号 + /// + public string MesTruckNumber { get; set; } /// /// 任务明细 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs index 7c20cec54..17e1ccf96 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs @@ -24,6 +24,7 @@ public static class DeliverJobDbContextModelCreatingExtensions b.Property(q => q.DeliverRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerAddressCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.MesTruckNumber).HasMaxLength(SfsPropertyConst.CodeLength); //Relations b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); //Indexes diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs index 5d71253f9..cb2807abb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs @@ -22,7 +22,7 @@ public static class DeliverNoteDbContextModelCreatingExtensions b.Property(q => q.CustomerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerAddressCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.DeliverRequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); - + b.Property(q => q.MesTruckNumber).HasMaxLength(SfsPropertyConst.CodeLength); //Relations b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs index b6530b9ff..97fe98634 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs @@ -24,7 +24,7 @@ public static class DeliverRequestDbContextModelCreatingExtensions b.Property(q => q.DeliverRequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); b.Property(q => q.DeliverPlanNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.RequestStatus).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); - + b.Property(q => q.MesTruckNumber).HasMaxLength(SfsPropertyConst.CodeLength); //Relations b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); From 619e3c19e78d4f425f81d890d78ad08d108c3d16 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Fri, 21 Jun 2024 12:04:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Incoming/TyrpIncomingBackgroundWorker.cs | 10 ++++++++++ .../Enums/Job/EnumJobStatus.cs | 4 ++-- .../Inputs/TransferRequestImportInput.cs | 4 +++- .../InjectionPlanJobs/InjectionPlanJobAppService.cs | 2 +- .../AssembleIssueJobs/AssembleIssueJobAppService.cs | 2 +- .../CoatingIssueJobs/CoatingIssueJobAppService.cs | 2 +- .../InjectionIssueJobs/InjectionIssueJobAppService.cs | 2 +- .../KittingIssueJobs/KittingIssueJobAppService.cs | 2 +- .../SparePartIssueJobs/SparePartIssueJobAppService.cs | 2 +- .../Jobs/InjectionPlanJobEventHandler.cs | 2 +- .../Jobs/Issue/AssembleIssueJobEventHandler.cs | 2 +- .../Jobs/Issue/CoatingIssueJobEventHandler.cs | 2 +- .../Jobs/Issue/InjectionIssueJobEventHandler.cs | 2 +- .../Jobs/Issue/KittingIssueJobEventHandler.cs | 2 +- .../Jobs/Issue/SparePartIssueJobEventHandler.cs | 2 +- 15 files changed, 27 insertions(+), 15 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs index 1f186a5c6..d4be75195 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs @@ -119,6 +119,16 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase //转换Dictpj await dictConverter.ConvertAsync(dictpjOutsFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read ErpLocation");//ERP库位 + var ErpLocationReader = workerContext.ServiceProvider.GetRequiredService(); + var ErpLocationConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存ErpLocationItem + var erpLocationFromExternalList = await ErpLocationReader.ReadAsync().ConfigureAwait(false); + //转换ErpLocationItem + await ErpLocationConverter.ConvertAsync(erpLocationFromExternalList).ConfigureAwait(false); + + Logger.LogInformation($"Read Customer");//客户资料 var CustomerReader = workerContext.ServiceProvider.GetRequiredService(); var CustomerConverter = workerContext.ServiceProvider.GetRequiredService(); diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs index 619e84684..b626f9ef6 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs @@ -48,8 +48,8 @@ public enum EnumJobStatus Cancelled = 9, /// - /// 等待 + /// 待库移 /// - [Display(Name = "等待")] + [Display(Name = "待库移")] Wait=30, } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs index 6a9be79c9..4ac172314 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs @@ -1,3 +1,4 @@ +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; @@ -73,7 +74,8 @@ public class TransferRequestImportInput : SfsStoreImportInputBase /// [Display(Name = "状态")] [Required(ErrorMessage = "{0}是必填项")] - public EnumInventoryStatus Status { get; set; } + [ValueMapping("合格", EnumInventoryStatus.OK)] + public string Status { get; set; } #region 回调服务相关 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs index 5bd6066ae..1fc134ae3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs @@ -64,7 +64,7 @@ public class InjectionPlanJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs index d45755a79..625c6c6d7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs @@ -564,7 +564,7 @@ public class AssembleIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs index 373273410..c9f82ca58 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs @@ -559,7 +559,7 @@ public class CoatingIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs index b45b43e2a..4ee1530b1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs @@ -512,7 +512,7 @@ public class InjectionIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs index ee8077bce..cbb97cbaf 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs @@ -509,7 +509,7 @@ public class KittingIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs index 5e9f7674d..a3e9b1b2f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs @@ -493,7 +493,7 @@ public class SparePartIssueJobAppService } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 并把库移推荐的From和To赋值 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs index 18713e89c..62a3a90bd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs @@ -202,7 +202,7 @@ public class InjectionPlanJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs index c2ac70396..5e75579cd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs @@ -214,7 +214,7 @@ public class AssembleIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs index 7a445f6db..2d209e177 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs @@ -214,7 +214,7 @@ public class CoatingIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs index b6ccf84ca..2bf12c343 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs @@ -213,7 +213,7 @@ public class InjectionIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs index b2f17565f..8cd66b5d1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs @@ -213,7 +213,7 @@ public class KittingIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs index b46ef749b..5a3086456 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs @@ -213,7 +213,7 @@ public class SparePartIssueJobEventHandler : } /// - /// 判断是不是在最底层 如果不是则把状态变更为等待 + /// 判断是不是在最底层 如果不是则把状态变更为待库移 /// /// /// From b457742f55804676a35519f6426cfd5514f9bcf9 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Fri, 21 Jun 2024 13:54:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=99=A8=E5=85=B7=E8=A7=84=E6=A0=BC=E7=BC=96?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E4=BF=9D=E5=AD=98=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dicts/DictAppService.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs index 828a8bba0..67c7941df 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs @@ -17,6 +17,7 @@ using System.Text; using DocumentFormat.OpenXml.Office2010.ExcelAc; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; +using Volo.Abp; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories; using Win_in.Sfs.Shared; @@ -60,9 +61,17 @@ public class DictAppService : SfsBaseDataWithCodeAppServiceBase UpdateAsync(Guid id, DictEditInput input) + public override async Task UpdateAsync(Guid id, DictEditInput input) { - return base.UpdateAsync(id, input); + //return await base.UpdateAsync(id, input).ConfigureAwait(false); //lyf at 0621, 更新报错所以注释 + var entity = await _repository.GetAsync(id).ConfigureAwait(false); + if (entity == null) + { + throw new UserFriendlyException($"根据Id取字典表为空:{id}"); + } + ObjectMapper.Map(input, entity); + await _repository.UpdateAsync(entity, true).ConfigureAwait(false); + return ObjectMapper.Map(entity); } [HttpPost("update")]