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 4002a48b9..2848d243d 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 @@ -1,12 +1,12 @@ { "ConnectionStrings": { - "Default": "Server=dev.ccwin-in.com,21195;Database=DataExchange_Main;uid=sa;pwd=aA123456!;TrustServerCertificate=True", - "DataExchange": "Server=dev.ccwin-in.com,21195;Database=DataExchange_Main;uid=sa;pwd=aA123456!;TrustServerCertificate=True", + "Default": "Server=dev.ccwin-in.com,13319;Database=Wms_Dy_ShangHai;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True", + "DataExchange": "Server=dev.ccwin-in.com,13319;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True", "EOS": "Server=61.139.155.47;Database=EOSSH;Uid=wms;Pwd=1;TrustServerCertificate=True" }, "AuthServer": { - "Authority": "http://dev.ccwin-in.com:21293/", + "Authority": "http://dev.ccwin-in.com:60083/", "RequireHttpsMetadata": "false", "SwaggerClientId": "admin", "SwaggerClientSecret": "1q2w3E*", @@ -25,13 +25,13 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://dev.ccwin-in.com:21294/" + "BaseUrl": "http://dev.ccwin-in.com:60084/" }, "Store": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://dev.ccwin-in.com:60085/" }, "Label": { - "BaseUrl": "http://dev.ccwin-in.com:21292/" + "BaseUrl": "http://dev.ccwin-in.com:60082/" } }, "EosOptions": { 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 2ea101bee..bc19028cb 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,21195;Database= WMS;uid=sa;pwd=aA123456!;TrustServerCertificate=True;", - "DataExchange": "Server=dev.ccwin-in.com,21195;Database=DataExchange_Main;uid=sa;pwd=aA123456!;TrustServerCertificate=True;", + "Default": "Server=dev.ccwin-in.com,13319;Database=Wms_Dy_ShangHai;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True", + "DataExchange": "Server=dev.ccwin-in.com,13319;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True", "MES": "Server=10.164.1.12;Port=3306;Database=erp;Uid=wms;Pwd=123456;" }, "AuthServer": { - "Authority": "http://dev.ccwin-in.com:21293/", + "Authority": "http://dev.ccwin-in.com:60083/", "RequireHttpsMetadata": "false", "SwaggerClientId": "admin", "SwaggerClientSecret": "1q2w3E*", @@ -24,14 +24,15 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://dev.ccwin-in.com:21294/" + "BaseUrl": "http://dev.ccwin-in.com:60084/" }, "Store": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://dev.ccwin-in.com:60085/" }, "Label": { - "BaseUrl": "http://dev.ccwin-in.com:21292/" + "BaseUrl": "http://dev.ccwin-in.com:60082/" } + }, "MesOptions": { "IncomingOptions": { diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ScontrolWriter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ScontrolWriter.cs index 6ed8f0f61..d843ae8c3 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ScontrolWriter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ScontrolWriter.cs @@ -41,14 +41,24 @@ public class ScontrolWriter : IWriter var receipt = JsonSerializer.Deserialize(entity.DestinationDataContent); dataInterfaceList.Add(receipt); } - else if (entity.TableType == EnumExchangeTableType.DetailTable) // 子表(DetailTable) + else if (entity.TableType == EnumExchangeTableType.DetailTable) // 子表(DetailTable) { var receiptDetail = JsonSerializer.Deserialize(entity.DestinationDataContent); dataInterfaceDetailList.Add(receiptDetail); } } - //dataInterface分主子表分别写入ERP - await _dataInterfaceManager.PostListAsync(dataInterfaceList, dataInterfaceDetailList).ConfigureAwait(false); + try + { + //dataInterface分主子表分别写入ERP + await _dataInterfaceManager.PostListAsync(dataInterfaceList, dataInterfaceDetailList).ConfigureAwait(false); + } + catch (System.Exception ex) + { + foreach (var item in entitys) + { + item.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); + } + } } //将数据归档 await _outgoingToExternalManager.ArchiveManyAsync(outgoingDataList).ConfigureAwait(false); 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 f51ade931..c28ee032a 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 @@ -125,13 +125,14 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase var ItemTransformNoteConvert = workerContext.ServiceProvider.GetRequiredService(); var ItemTransformNoteList = await ItemTransformNoteConvert.ConvertAsync().ConfigureAwait(false); await countadjustWriter.WriteAsync(ItemTransformNoteList).ConfigureAwait(false); - Logger.LogInformation($"Completed: Handling {Outgoing}"); + Logger.LogInformation($"Write ScrapNote");//报废单、线边仓报废单 var scrapNoteConvert = workerContext.ServiceProvider.GetRequiredService(); var scrapNoteList = await scrapNoteConvert.ConvertAsync().ConfigureAwait(false); await countadjustWriter.WriteAsync(scrapNoteList).ConfigureAwait(false); + Logger.LogInformation($"Completed: Handling {Outgoing}"); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/WmsoutmWriter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/WmsoutmWriter.cs index 12fc07dd8..fc86daa52 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/WmsoutmWriter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/WmsoutmWriter.cs @@ -46,9 +46,20 @@ public class WmsoutmWriter : IWriter var receiptDetail = JsonSerializer.Deserialize(entity.DestinationDataContent); dataInterfaceDetailList.Add(receiptDetail); } + } + try + { + //dataInterface分主子表分别写入ERP + await _wmsoutdManager.PostListAsync(dataInterfaceList, dataInterfaceDetailList).ConfigureAwait(false); + } + catch (System.Exception ex) + { + foreach (var item in entitys) + { + item.SetError(EnumExchangeDataErrorCode.Exception, ex.Message, ex.ToString()); + } } - //dataInterface分主子表分别写入ERP - await _wmsoutdManager.PostListAsync(dataInterfaceList, dataInterfaceDetailList).ConfigureAwait(false); + } //将数据归档 await _outgoingToExternalManager.ArchiveManyAsync(outgoingDataList).ConfigureAwait(false); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json index 5ae655400..4735fc6e1 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json @@ -1,13 +1,13 @@ { "ConnectionStrings": { - "Default": "Server=dev.ccwin-in.com,21195;Database=Wms;uid=sa;pwd=aA123456!;TrustServerCertificate=True", - "DataExchange": "Server=dev.ccwin-in.com,21195;Database=DataExchange_Main;uid=sa;pwd=aA123456!;TrustServerCertificate=True", - "TYRP": "Server=dev.ccwin-in.com,21195;Database=TYRP;Uid=sa;Pwd=aA123456!;TrustServerCertificate=True", - "SYBASE_TYRP": "Data Source=10.164.1.11; Port=5000; Database=mesdb; Uid=mesuser; Pwd=mesuser1234;Charset=cp850;" //iso_1 + "Default": "Server=dev.ccwin-in.com,13319;Database=Wms_Dy_ShangHai;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True", + "DataExchange": "Server=dev.ccwin-in.com,13319;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True", + "TYRP": "Server=dev.ccwin-in.com,13319;Database=Wms_TYRP_Dy_ShangHai;Uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True", + "SYBASE_TYRP": "Data Source=10.164.115.137; Port=5000; Database=mesdb; Uid=mesuser; Pwd=mesuser1234;Charset=cp850;" //iso_1 }, "AuthServer": { - "Authority": "http://dev.ccwin-in.com:21293/", + "Authority": "http://dev.ccwin-in.com:60083/", "RequireHttpsMetadata": "false", "SwaggerClientId": "admin", "SwaggerClientSecret": "1q2w3E*", @@ -26,16 +26,16 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://dev.ccwin-in.com:21294/" + "BaseUrl": "http://dev.ccwin-in.com:60084/" }, "Store": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://dev.ccwin-in.com:60085/" }, "Label": { - "BaseUrl": "http://dev.ccwin-in.com:21292/" + "BaseUrl": "http://dev.ccwin-in.com:60082/" }, "Auth": { - "BaseUrl": "http://dev.ccwin-in.com:21293/" + "BaseUrl": "http://dev.ccwin-in.com:60083/" } }, "TyrpOptions": { diff --git a/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Mes/Mes/MesProductL7PartsNoteAutoMapperProfile.cs b/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Mes/Mes/MesProductL7PartsNoteAutoMapperProfile.cs index 3d08f09ac..ca59169c5 100644 --- a/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Mes/Mes/MesProductL7PartsNoteAutoMapperProfile.cs +++ b/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Mes/Mes/MesProductL7PartsNoteAutoMapperProfile.cs @@ -11,7 +11,6 @@ public class MesProductL7PartsNoteAutoMapperProfile : Profile public MesProductL7PartsNoteAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() .ForMember(x => x.CreationTime, y => y.MapFrom(d => d.CreationTime)) .ReverseMap(); diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs index 9dafc2553..e90cc02d7 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs @@ -124,7 +124,7 @@ public class IncomingToWmsWorker : AsyncPeriodicBackgroundWorkerBase //await incomingToWms.HandleAsnsAsync(workerContext).ConfigureAwait(false); break; case EnumIncomingDataType.ProductReceipt: - //await incomingToWms.HandleProductReceiptsAsync(workerContext).ConfigureAwait(false); + await incomingToWms.HandleProductReceiptsAsync(workerContext).ConfigureAwait(false); break; case EnumIncomingDataType.MaterialRequest: await incomingToWms.HandleMaterialRequestsAsync(workerContext).ConfigureAwait(false); 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 b88f61946..be14f7d44 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 @@ -1,13 +1,13 @@ { "ConnectionStrings": { - "Default": "Server=dev.ccwin-in.com,21195;Database=DataExchange_Main;uid=sa;pwd=aA123456!;TrustServerCertificate=True", - "DataExchange": "Server=dev.ccwin-in.com,21195;Database=DataExchange_Main;uid=sa;pwd=aA123456!;TrustServerCertificate=True" + "Default": "Server=dev.ccwin-in.com,13319;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True", + "DataExchange": "Server=dev.ccwin-in.com,13319;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True" }, "AuthServer": { - "Authority": "http://dev.ccwin-in.com:21293/", + "Authority": "http://dev.ccwin-in.com:60083/", "RequireHttpsMetadata": "false", "SwaggerClientId": "admin", "SwaggerClientSecret": "1q2w3E*", @@ -26,16 +26,16 @@ "RemoteServices": { "BaseData": { - "BaseUrl": "http://dev.ccwin-in.com:21294/" + "BaseUrl": "http://dev.ccwin-in.com:60084/" }, "Store": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://dev.ccwin-in.com:60085/" }, "Label": { - "BaseUrl": "http://dev.ccwin-in.com:21292/" + "BaseUrl": "http://dev.ccwin-in.com:60082/" }, "Auth": { - "BaseUrl": "http://dev.ccwin-in.com:21293/" + "BaseUrl": "http://dev.ccwin-in.com:60083/" } }, "DataExchangeOptions": { diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application/OutgoingFromWms/OutgoingFromWmsAutoMapperProfile.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application/OutgoingFromWms/OutgoingFromWmsAutoMapperProfile.cs index 489ebfa63..fe7819e86 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application/OutgoingFromWms/OutgoingFromWmsAutoMapperProfile.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application/OutgoingFromWms/OutgoingFromWmsAutoMapperProfile.cs @@ -10,7 +10,6 @@ public class OutgoingFromWmsAutoMapperProfile : Profile public OutgoingFromWmsAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() .ForMember(x => x.CreationTime, y => y.MapFrom(d => d.CreationTime)) .ReverseMap(); diff --git a/be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/Departments/DepartmentAutoMapperProfile.cs b/be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/Departments/DepartmentAutoMapperProfile.cs index a0407a3c0..e12fb49a2 100644 --- a/be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/Departments/DepartmentAutoMapperProfile.cs +++ b/be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/Departments/DepartmentAutoMapperProfile.cs @@ -10,7 +10,6 @@ public partial class AuthApplicationAutoMapperProfile : Profile private void DepartmentAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() .IgnoreAuditedObjectProperties() diff --git a/be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/BasedataHttpApiHostModule.cs b/be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/BasedataHttpApiHostModule.cs index 1ed8d1002..3f5af902b 100644 --- a/be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/BasedataHttpApiHostModule.cs +++ b/be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/BasedataHttpApiHostModule.cs @@ -67,14 +67,19 @@ public class BasedataHttpApiHostModule : ModuleBase { public override void ConfigureServices(ServiceConfigurationContext context) { + //base.ConfigureServices(context); + //ConfigureAuditing(); + //// + //ConfigureBlobStoring(); + //Configure(options => + //{ + // options.Kind = DateTimeKind.Local; + //}); + base.ConfigureServices(context); ConfigureAuditing(); // ConfigureBlobStoring(); - Configure(options => - { - options.Kind = DateTimeKind.Local; - }); } public override void PostConfigureServices(ServiceConfigurationContext context) diff --git a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql index 87364c0a6..286935fff 100644 --- a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql +++ b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql @@ -2529,6 +2529,9 @@ CREATE TABLE [Job_PutawayJobDetail] ( CREATE TABLE [Job_UnplannedIssueJobDetail] ( [Id] uniqueidentifier NOT NULL, [ReasonCode] nvarchar(max) NULL, + [CaseCode] nvarchar(max) NULL, + [ProjCapacityCode] nvarchar(max) NULL, + [OnceBusiCode] nvarchar(max) NULL, [ExtraProperties] nvarchar(max) NULL, [CreationTime] datetime2 NOT NULL, [CreatorId] uniqueidentifier NULL, @@ -2579,6 +2582,9 @@ CREATE TABLE [Job_UnplannedIssueJobDetail] ( CREATE TABLE [Job_UnplannedReceiptJobDetail] ( [Id] uniqueidentifier NOT NULL, [ReasonCode] nvarchar(max) NULL, + [CaseCode] nvarchar(max) NULL, + [ProjCapacityCode] nvarchar(max) NULL, + [OnceBusiCode] nvarchar(max) NULL, [ExtraProperties] nvarchar(max) NULL, [CreationTime] datetime2 NOT NULL, [CreatorId] uniqueidentifier NULL, @@ -4875,6 +4881,9 @@ CREATE TABLE [Store_TransferRequestDetail] ( CREATE TABLE [Store_UnplannedIssueNoteDetail] ( [Id] uniqueidentifier NOT NULL, [ReasonCode] nvarchar(max) NULL, + [CaseCode] nvarchar(max) NULL, + [ProjCapacityCode] nvarchar(max) NULL, + [OnceBusiCode] nvarchar(max) NULL, [ExtraProperties] nvarchar(max) NULL, [CreationTime] datetime2 NOT NULL, [CreatorId] uniqueidentifier NULL, @@ -4937,6 +4946,9 @@ CREATE TABLE [Store_UnplannedIssueNoteDetail] ( CREATE TABLE [Store_UnplannedIssueRequestDetail] ( [Id] uniqueidentifier NOT NULL, + [CaseCode] nvarchar(max) NULL, + [ProjCapacityCode] nvarchar(max) NULL, + [OnceBusiCode] nvarchar(max) NULL, [ExtraProperties] nvarchar(max) NULL, [CreationTime] datetime2 NOT NULL, [CreatorId] uniqueidentifier NULL, @@ -4974,6 +4986,9 @@ CREATE TABLE [Store_UnplannedIssueRequestDetail] ( CREATE TABLE [Store_UnplannedReceiptNoteDetail] ( [Id] uniqueidentifier NOT NULL, [ReasonCode] nvarchar(max) NULL, + [CaseCode] nvarchar(max) NULL, + [ProjCapacityCode] nvarchar(max) NULL, + [OnceBusiCode] nvarchar(max) NULL, [ExtraProperties] nvarchar(max) NULL, [CreationTime] datetime2 NOT NULL, [CreatorId] uniqueidentifier NULL, @@ -5036,6 +5051,10 @@ CREATE TABLE [Store_UnplannedReceiptNoteDetail] ( CREATE TABLE [Store_UnplannedReceiptRequestDetail] ( [Id] uniqueidentifier NOT NULL, + [ReasonCode] nvarchar(max) NULL, + [CaseCode] nvarchar(max) NULL, + [ProjCapacityCode] nvarchar(max) NULL, + [OnceBusiCode] nvarchar(max) NULL, [ExtraProperties] nvarchar(max) NULL, [CreationTime] datetime2 NOT NULL, [CreatorId] uniqueidentifier NULL, diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/DictController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/DictController.cs index eeaf54727..2bb773383 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/DictController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/DictController.cs @@ -1,6 +1,9 @@ +using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Json; using Win_in.Sfs.Basedata.Application.Contracts; namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas; @@ -18,9 +21,11 @@ public class DictController : AbpController /// /// /// - public DictController(IDictAppService dictApp) + public DictController(IDictAppService dictApp,IOptions options) { _dictApp = dictApp; + var str = options.Value.DefaultDateTimeFormat; + Console.WriteLine(str); } /// @@ -31,6 +36,8 @@ public class DictController : AbpController [HttpGet("by-code")] public virtual async Task GetByCodeAsync(string code) { - return await _dictApp.GetByCodeAsync(code).ConfigureAwait(false); + var dtos = await _dictApp.GetByCodeAsync(code).ConfigureAwait(false); + + return dtos; } } 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 0eea0a436..17418503c 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 @@ -1,4 +1,6 @@ +using System; using System.Collections.Generic; +using System.Linq; using System.Text.Json; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; @@ -70,13 +72,13 @@ public class JobController : AbpController /// 获取全部任务数量统计 /// /// - [HttpGet("{isToday}")] - public virtual async Task> CountAsync(bool isToday) + [HttpGet("get-job-count/{isToday}")] + public virtual async Task> CountAsync(Guid userId ,bool isToday) { - var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); - var jsonCodes = JsonSerializer.Serialize(wlgCodes); + var wlgCodes = await _userWorkGroupAppService.GetUserWorkGroupAsync(userId).ConfigureAwait(false); + var jsonCodes = JsonSerializer.Serialize(wlgCodes.Select(p=>p.WorkGroupCode)); - var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; + var status = new List() { EnumJobStatus.Open,EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var list = new List(); @@ -162,6 +164,8 @@ public class JobController : AbpController purchaseReceiptJobRequest.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), Clock.Now.ToString("yyyy-MM-dd"), ">=", "And")); purchaseReceiptJobRequest.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), Clock.Now.AddDays(1).ToString("yyyy-MM-dd"), "<=", "And")); } + var purchaseReceiptJobs = await _purchaseReceiptJobAppService.GetCountByFilterAsync(purchaseReceiptJobRequest).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.PurchaseReceiptJob, Count = purchaseReceiptJobs }); var purchaseReturnJobs = await _purchaseReturnJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase { diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAutoMapperProfile.cs index 05459426f..b64bfb41d 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAutoMapperProfile.cs @@ -13,7 +13,7 @@ public partial class BasedataApplicationAutoMapperProfile : Profile ; CreateMap() - .IgnoreAuditedObjectProperties(); + ; CreateMap() .IgnoreAuditedObjectProperties() diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs index d063a0463..bcfbbed1c 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs @@ -275,6 +275,7 @@ public class BalanceAppService dto.ItemName = item.Name; dto.ItemDesc1 = item.Desc1; dto.ItemDesc2 = item.Desc2; + dto.Uom = item.BasicUom; } return dtos; } diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Containers/ContainerAutoMapperProfile.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Containers/ContainerAutoMapperProfile.cs index 5fadf445f..eb1ddb3d3 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Containers/ContainerAutoMapperProfile.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Containers/ContainerAutoMapperProfile.cs @@ -12,7 +12,8 @@ public partial class InventoryApplicationAutoMapperProfile : Profile CreateMap() .ReverseMap(); - CreateMap().IgnoreAuditedObjectProperties(); + CreateMap() + ; CreateMap() .IgnoreAuditedObjectProperties() diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/TransactionManager.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/TransactionManager.cs index 26cf02cbd..fabcb95d3 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/TransactionManager.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/TransactionManager.cs @@ -18,7 +18,8 @@ public class TransactionManager : DomainService, ITransactionManager private readonly IBalanceManager _balanceManager; private readonly IItemBasicAclService _itemBasicAclService; private readonly ILocationAclService _locationAclService; - private readonly ITransactionTypeAclService _transactionTypeAclService; + //private readonly ITransactionTypeAclService _transactionTypeAclService; + private readonly ITransactionTypeAppService _transactionTypeAppService; private readonly ITransactionRepository _transactionRepository; private readonly IBalanceRepository _balanceRepository; private readonly ISnowflakeIdGenerator _numberGenerator; @@ -28,20 +29,22 @@ public class TransactionManager : DomainService, ITransactionManager IBalanceManager balanceManager , IItemBasicAclService itemBasicAclService , ILocationAclService locationAclService - , ITransactionTypeAclService transactionTypeAclService + //, ITransactionTypeAclService transactionTypeAclService , ITransactionRepository transactionRepository , IBalanceRepository balanceRepository , ISnowflakeIdGenerator numberGenerator - , ILocationCapacityManager locationCapacityManager) + , ILocationCapacityManager locationCapacityManager + , ITransactionTypeAppService transactionTypeAppService) { _balanceManager = balanceManager; _itemBasicAclService = itemBasicAclService; _locationAclService = locationAclService; - _transactionTypeAclService = transactionTypeAclService; + //_transactionTypeAclService = transactionTypeAclService; _transactionRepository = transactionRepository; _balanceRepository = balanceRepository; _numberGenerator = numberGenerator; _locationCapacityManager = locationCapacityManager; + _transactionTypeAppService = transactionTypeAppService; } public virtual async Task AddAsync(Transaction transaction) @@ -96,7 +99,7 @@ public class TransactionManager : DomainService, ITransactionManager var item = await _itemBasicAclService.GetByCodeAsync(transaction.ItemCode).ConfigureAwait(false); var location = await _locationAclService.GetByCodeAsync(transaction.LocationCode).ConfigureAwait(false); - var transactionType = await _transactionTypeAclService.GetByTransTypeAsync(transaction.TransType, transaction.TransSubType).ConfigureAwait(false); + var transactionType = await _transactionTypeAppService.GetByTransTypeAsync(transaction.TransType, transaction.TransSubType).ConfigureAwait(false); transaction.CheckTransactionType(transactionType, item, location); //执行库存余额的变动 @@ -158,7 +161,7 @@ public class TransactionManager : DomainService, ITransactionManager //库位注意大小写 var location = locations.FirstOrDefault(p => p.Code.ToUpper() == transaction.LocationCode.ToUpper()); - var transactionType = await _transactionTypeAclService.GetByTransTypeAsync(transaction.TransType, transaction.TransSubType).ConfigureAwait(false); + var transactionType = await _transactionTypeAppService.GetByTransTypeAsync(transaction.TransType, transaction.TransSubType).ConfigureAwait(false); transaction.CheckTransactionType(transactionType, item, location); await UpdateBalanceAsync(transaction, item, location).ConfigureAwait(false); diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/CountLabels/CountLabelAutoMapperProfile.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/CountLabels/CountLabelAutoMapperProfile.cs index e94bad7dc..6894bb819 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/CountLabels/CountLabelAutoMapperProfile.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/CountLabels/CountLabelAutoMapperProfile.cs @@ -10,8 +10,7 @@ public class CountLabelAutoMapperProfile : Profile public CountLabelAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() - .ReverseMap(); + .ReverseMap(); CreateMap(); } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/PalletCode/PalletCodeAutoMapperProfile.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/PalletCode/PalletCodeAutoMapperProfile.cs index 79b154e49..4c591b486 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/PalletCode/PalletCodeAutoMapperProfile.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/PalletCode/PalletCodeAutoMapperProfile.cs @@ -10,8 +10,7 @@ public class PalletCodeAutoMapperProfile : Profile public PalletCodeAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() - .ReverseMap(); + .ReverseMap(); CreateMap(); } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/PalletLabels/PalletLabelAutoMapperProfile.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/PalletLabels/PalletLabelAutoMapperProfile.cs index b92d2680a..1195131aa 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/PalletLabels/PalletLabelAutoMapperProfile.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/PalletLabels/PalletLabelAutoMapperProfile.cs @@ -10,7 +10,6 @@ public class PalletLabelAutoMapperProfile : Profile public PalletLabelAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() .ForMember(x => x.ItemName, y => y.MapFrom(d => d.Name)) .ForMember(x => x.ItemDesc1, y => y.MapFrom(d => d.Desc1)) .ForMember(x => x.ItemDesc2, y => y.MapFrom(d => d.Desc2)) diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/SaleLabels/SaleLabelAutoMapperProfile.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/SaleLabels/SaleLabelAutoMapperProfile.cs index 5c0f94e93..fa931b956 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/SaleLabels/SaleLabelAutoMapperProfile.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/SaleLabels/SaleLabelAutoMapperProfile.cs @@ -10,7 +10,6 @@ public class SaleLabelAutoMapperProfile : Profile public SaleLabelAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); } } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/SerialCode/SerialCodeAutoMapperProfile.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/SerialCode/SerialCodeAutoMapperProfile.cs index 585f112e9..edf57b3de 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/SerialCode/SerialCodeAutoMapperProfile.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/SerialCode/SerialCodeAutoMapperProfile.cs @@ -10,8 +10,7 @@ public class SerialCodeAutoMapperProfile : Profile public SerialCodeAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() - .ReverseMap(); + .ReverseMap(); CreateMap(); } diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs index 7fedb3bf6..547f34e10 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypeSubscribes/MessageTypeSubscribeAutoMapperProfile.cs @@ -10,8 +10,7 @@ public partial class MessageApplicationAutoMapperProfile : Profile public void MessageTypeSubscribesAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() - .ReverseMap(); + .ReverseMap(); CreateMap() .IgnoreAuditedObjectProperties() diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypes/MessageTypeAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypes/MessageTypeAutoMapperProfile.cs index d602c2108..08dd8ec08 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypes/MessageTypeAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/MessageTypes/MessageTypeAutoMapperProfile.cs @@ -10,7 +10,6 @@ public partial class MessageApplicationAutoMapperProfile : Profile public void MessageTypeAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() - .ReverseMap(); + .ReverseMap(); } } diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/NotifyMessages/NotifyMessageAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/NotifyMessages/NotifyMessageAutoMapperProfile.cs index cfbf6da69..44e43ddb7 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/NotifyMessages/NotifyMessageAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/NotifyMessages/NotifyMessageAutoMapperProfile.cs @@ -11,8 +11,7 @@ public partial class MessageApplicationAutoMapperProfile : Profile public void NotifyMessageAutoMapperProfileConfig() { CreateMap() - .IgnoreAuditedObjectProperties() - .ReverseMap(); + .ReverseMap(); CreateMap() .Ignore(x => x.ConcurrencyStamp) diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/PrivateMessages/PrivateMessageAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/PrivateMessages/PrivateMessageAutoMapperProfile.cs index 460d3b5ae..f147927eb 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/PrivateMessages/PrivateMessageAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/PrivateMessages/PrivateMessageAutoMapperProfile.cs @@ -10,7 +10,6 @@ public class PrivateMessageAutoMapperProfile : Profile public PrivateMessageAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() - .ReverseMap(); + .ReverseMap(); } } diff --git a/be/Modules/Message/src/Win_in.Sfs.Message.Application/UserNotifyMessages/UserNotifyMessageAutoMapperProfile.cs b/be/Modules/Message/src/Win_in.Sfs.Message.Application/UserNotifyMessages/UserNotifyMessageAutoMapperProfile.cs index c86fc455e..78ba65c1d 100644 --- a/be/Modules/Message/src/Win_in.Sfs.Message.Application/UserNotifyMessages/UserNotifyMessageAutoMapperProfile.cs +++ b/be/Modules/Message/src/Win_in.Sfs.Message.Application/UserNotifyMessages/UserNotifyMessageAutoMapperProfile.cs @@ -11,8 +11,7 @@ public partial class MessageApplicationAutoMapperProfile : Profile public void UserNotifyAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() - .BeforeMap((x, y) => y.UserId = x.CreatorId==null?Guid.Empty: x.CreatorId.Value) + .BeforeMap((x, y) => y.UserId = x.CreatorId==null?Guid.Empty: x.CreatorId.Value) .ReverseMap(); CreateMap(); diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/CachingExtensions.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/CachingExtensions.cs index 4a0f5b9ab..d2c552f04 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/CachingExtensions.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/CachingExtensions.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Caching.Distributed; using Volo.Abp.Caching; +using Volo.Abp.Json; namespace Win_in.Sfs.Shared.Application; diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs index 600523dce..fd6654cd6 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs @@ -159,8 +159,12 @@ public abstract class SfsCrudWithDetailsAppServiceBase, List>(entities); - var hasDetails = typeof(TEntity) is SfsMasterAggregateRootBase detailEntity; - return ExportImportService.Export(list, detailsProptyName: hasDetails ? nameof(detailEntity.Details) : null); + + //var hasDetails = typeof(TEntity) is SfsMasterAggregateRootBase detailEntity; + var tt = typeof(TEntity).GetBaseClasses(typeof(SfsMasterAggregateRootBase)); + var hasDetails = tt.Length > 0 ? true : false; + + return ExportImportService.Export(list,detailsProptyName: hasDetails ? nameof(TDetail) : null); } /// 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 dfe744d20..55467616b 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 @@ -1,3 +1,6 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + namespace Win_in.Sfs.Shared.Domain.Shared; public enum EnumJobStatus @@ -5,30 +8,36 @@ public enum EnumJobStatus /// /// 空枚举 /// + [Display(Name = "空枚举")] None = 0, /// /// 待处理 /// + [Display(Name = "待处理")] Open = 1, /// /// 执行中 /// + [Display(Name = "执行中")] Doing = 2, /// /// 完成 /// + [Display(Name = "完成")] Done = 3, /// /// 关闭 /// + [Display(Name = "关闭")] Closed = 8, /// /// 作废 /// + [Display(Name = "作废")] Cancelled = 9 } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Entities/SfsMasterAggregateRootBase.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Entities/SfsMasterAggregateRootBase.cs index 02df8fc8c..4cd6d8ee4 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Entities/SfsMasterAggregateRootBase.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Entities/SfsMasterAggregateRootBase.cs @@ -67,7 +67,7 @@ public abstract class SfsMasterAggregateRootBase : SfsAggregateRootBase Details.AddRange(details); } - public void ReplaceDetail(Guid id, TDetail newDetail) + public void ReplaceDetail(Guid id,TDetail newDetail) { var detail = GetDetail(id); @@ -106,7 +106,6 @@ public abstract class SfsMasterAggregateRootBase : SfsAggregateRootBase property.SetValue(detail, newValue); } } - /* ////todo check //var detail = GetDetail(id); diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Host/ModuleBase.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Host/ModuleBase.cs index 4324e42bd..49586cc1f 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Host/ModuleBase.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Host/ModuleBase.cs @@ -249,7 +249,8 @@ public abstract class ModuleBase : AbpModule where T : AbpModule protected virtual void Configure() { //todo 解决时间 - ServiceConfigurationContext.Services.AddTransient(); + // ServiceConfigurationContext.Services.AddTransient(); + } protected virtual void ConfigureAddCors() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/IIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/IIssueJobAppService.cs index f0d2cc33a..1b9ad5f7d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/IIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/IIssueJobAppService.cs @@ -14,4 +14,6 @@ public interface IIssueJobAppService Task> GetListByTypeAsync(SfsJobRequestInputBase requestInput, string requestType, bool includeDetails = false, CancellationToken cancellationToken = default); + + Task> GetByRequestNumberAsync(string requestNumber); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedIssueJobs/DTOs/UnplannedIssueJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedIssueJobs/DTOs/UnplannedIssueJobDetailDTO.cs index 1d656fd2c..b42d6f039 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedIssueJobs/DTOs/UnplannedIssueJobDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedIssueJobs/DTOs/UnplannedIssueJobDetailDTO.cs @@ -10,4 +10,22 @@ public class UnplannedIssueJobDetailDTO : SfsJobRecommendFromDetailDTOBase [Display(Name = "原因代码")] public string ReasonCode { get; set; } + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedIssueJobs/Inputs/UnplannedIssueJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedIssueJobs/Inputs/UnplannedIssueJobDetailInput.cs index 9aa5b26de..a0523ab5c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedIssueJobs/Inputs/UnplannedIssueJobDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedIssueJobs/Inputs/UnplannedIssueJobDetailInput.cs @@ -11,6 +11,24 @@ public class UnplannedIssueJobDetailInput : SfsJobRecommendFromDetailInputBase, [Display(Name = "原因代码")] public string ReasonCode { get; set; } + //// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDetailDTO.cs index 8e729e1a6..916479a0f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDetailDTO.cs @@ -1,6 +1,38 @@ +using DocumentFormat.OpenXml.Wordprocessing; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Data; + namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class UnplannedReceiptJobDetailDTO : SfsJobRecommendToDetailDTOBase { + /// + /// 原因代码 + /// + [Display(Name = "原因代码")] + public string ReasonCode { get; set; } + + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// + /// 扩展属性 + /// + [Display(Name = "扩展属性")] + public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobDetailInput.cs index b42869a3f..a3ea7b3e3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobDetailInput.cs @@ -11,6 +11,24 @@ public class UnplannedReceiptJobDetailInput : SfsJobRecommendToDetailInputBase, [Display(Name = "原因代码")] public string ReasonCode { get; set; } + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedIssueNotes/DTOs/UnplannedIssueNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedIssueNotes/DTOs/UnplannedIssueNoteDetailDTO.cs index f93ca2d14..efa949974 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedIssueNotes/DTOs/UnplannedIssueNoteDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedIssueNotes/DTOs/UnplannedIssueNoteDetailDTO.cs @@ -17,4 +17,22 @@ public class UnplannedIssueNoteDetailDTO : SfsStoreRecommendFromDetailWithLotPac [Display(Name = "原因代码")] public string ReasonCode { get; set; } + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedIssueNotes/Inputs/UnplannedIssueNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedIssueNotes/Inputs/UnplannedIssueNoteDetailInput.cs index 8f3179cb4..923365b36 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedIssueNotes/Inputs/UnplannedIssueNoteDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedIssueNotes/Inputs/UnplannedIssueNoteDetailInput.cs @@ -13,6 +13,24 @@ public class UnplannedIssueNoteDetailInput : SfsStoreRecommendFromDetailWithLotP [Display(Name = "原因代码")] public string ReasonCode { get; set; } + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedReceiptNotes/DTOs/UnplannedReceiptNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedReceiptNotes/DTOs/UnplannedReceiptNoteDetailDTO.cs index ea74d4e34..dbedb405b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedReceiptNotes/DTOs/UnplannedReceiptNoteDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedReceiptNotes/DTOs/UnplannedReceiptNoteDetailDTO.cs @@ -16,4 +16,22 @@ public class UnplannedReceiptNoteDetailDTO : SfsStoreRecommendToDetailWithLotPac /// [Display(Name = "原因代码")] public string ReasonCode { get; set; } + + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedReceiptNotes/Inputs/UnplannedReceiptNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedReceiptNotes/Inputs/UnplannedReceiptNoteDetailInput.cs index c03b2db03..327e6af54 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedReceiptNotes/Inputs/UnplannedReceiptNoteDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/UnplannedReceiptNotes/Inputs/UnplannedReceiptNoteDetailInput.cs @@ -11,6 +11,24 @@ public class UnplannedReceiptNoteDetailInput : SfsStoreRecommendToDetailWithLotP [Display(Name = "原因代码")] public string ReasonCode { get; set; } + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Orders/PurchaseOrders/IPurchaseOrderAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Orders/PurchaseOrders/IPurchaseOrderAppService.cs index c50180570..034ea1a1b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Orders/PurchaseOrders/IPurchaseOrderAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Orders/PurchaseOrders/IPurchaseOrderAppService.cs @@ -29,7 +29,7 @@ public interface IPurchaseOrderAppService /// /// /// - Task UpdateDetailsAsync(string number, List input); + Task UpdateDetailsAsync(string number,List input); /// /// 【批量创建】到货通知 (收货单) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedIssueRequests/DTOs/UnplannedIssueRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedIssueRequests/DTOs/UnplannedIssueRequestDetailDTO.cs index 129aef93c..d5ecf445f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedIssueRequests/DTOs/UnplannedIssueRequestDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedIssueRequests/DTOs/UnplannedIssueRequestDetailDTO.cs @@ -12,4 +12,22 @@ public class UnplannedIssueRequestDetailDTO /// [Display(Name = "扩展属性")] public ExtraPropertyDictionary ExtraProperties { set; get; } = new ExtraPropertyDictionary(); + + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedIssueRequests/Inputs/UnplannedIssueRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedIssueRequests/Inputs/UnplannedIssueRequestDetailInput.cs index c5f9138bf..d052b41b3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedIssueRequests/Inputs/UnplannedIssueRequestDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedIssueRequests/Inputs/UnplannedIssueRequestDetailInput.cs @@ -10,4 +10,22 @@ public class UnplannedIssueRequestDetailInput : SfsStoreDetailWithLotPackingQtyL /// [Display(Name = "扩展属性")] public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary(); + + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/DTOs/UnplannedReceiptRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/DTOs/UnplannedReceiptRequestDetailDTO.cs index aa67eb319..3bedef9ee 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/DTOs/UnplannedReceiptRequestDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/DTOs/UnplannedReceiptRequestDetailDTO.cs @@ -7,6 +7,30 @@ public class UnplannedReceiptRequestDetailDTO : SfsStoreDetailWithLotPackingQtyLocationStatusDTOBase , IHasExtraProperties { + /// + /// 原因代码 + /// + [Display(Name = "原因代码")] + public string ReasonCode { get; set; } + + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestDetailInput.cs index 4d527adfd..bf59628f8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestDetailInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestDetailInput.cs @@ -5,6 +5,24 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class UnplannedReceiptRequestDetailInput : SfsStoreDetailWithLotPackingQtyLocationInputBase, IHasExtraProperties { + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobAppServiceBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobAppServiceBase.cs index aa9cc4b2c..8aa54abe2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobAppServiceBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobAppServiceBase.cs @@ -11,6 +11,7 @@ using Volo.Abp.Validation; using Win_in.Sfs.Shared.Application; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; @@ -153,6 +154,12 @@ public abstract class SfsJobAppServiceBase CompleteAsync(Guid id, TEntityDto dto) { var handleEntity = ObjectMapper.Map(dto); + var job= await _repository.GetAsync(id).ConfigureAwait(false); + if (job.JobStatus is EnumJobStatus.Closed or EnumJobStatus.Cancelled or EnumJobStatus.None or EnumJobStatus.Done)//需要考虑下 多次提交的问题 所以不判断 进行中 + { + throw new UserFriendlyException($"任务状态错误:编号为【{job.Number}】的任务已经【{job.JobStatus.GetDisplayName()}】"); + } + var handleResult = await _jobManager.CompleteAsync(handleEntity, CurrentUser).ConfigureAwait(false); var handleDto = ObjectMapper.Map(handleResult); return handleDto; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ExchangeDatas/StoreApplicationAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ExchangeDatas/StoreApplicationAutoMapperProfile.cs index ab2640e21..0593916fd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ExchangeDatas/StoreApplicationAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ExchangeDatas/StoreApplicationAutoMapperProfile.cs @@ -10,7 +10,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile private void ExchangeDataAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); // CreateMap() // .IgnoreAuditedObjectProperties() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CheckJobs/CheckJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CheckJobs/CheckJobAutoMapperProfile.cs index b8ae62e62..9bcd74c3a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CheckJobs/CheckJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CheckJobs/CheckJobAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAutoMapperProfile.cs index e1e543e8c..df81e992b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/CountJobs/CountJobAutoMapperProfile.cs @@ -73,11 +73,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.Details); CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/DeliverJobs/DeliverJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/DeliverJobs/DeliverJobAutoMapperProfile.cs index f8bccdeb5..54e4efa4b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/DeliverJobs/DeliverJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/DeliverJobs/DeliverJobAutoMapperProfile.cs @@ -13,10 +13,10 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties(); + ; CreateMap() - .IgnoreAuditedObjectProperties(); + ; CreateMap(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAutoMapperProfile.cs index b12f088ce..b48a352c2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAutoMapperProfile.cs @@ -16,11 +16,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile ; CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() @@ -31,11 +29,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.Id); CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() @@ -47,7 +43,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile ; CreateMap() - .IgnoreAuditedObjectProperties() .Ignore(x => x.WarehouseCode) .Ignore(x => x.Details) .Ignore(x => x.SummaryDetails) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs index 7515e713f..6ec183a2b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs @@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.Application.Dtos; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -151,6 +152,13 @@ public class IssueJobAppService } + [HttpPost("by-request-number/{requestNumber}")] + public virtual async Task> GetByRequestNumberAsync(string requestNumber) + { + var entitys = await _repository.GetListAsync(p => p.MaterialRequestNumber == requestNumber).ConfigureAwait(false); + return ObjectMapper.Map, List>(entitys); + } + /* /// /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAutoMapperProfile.cs index f382757bc..4758bb65f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAutoMapperProfile.cs @@ -14,11 +14,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap(); CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/JisDeliverJobs/JisDeliverJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/JisDeliverJobs/JisDeliverJobAutoMapperProfile.cs index 21a63b0c9..6e0b160b7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/JisDeliverJobs/JisDeliverJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/JisDeliverJobs/JisDeliverJobAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductReceiveJobs/ProductReceiveJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductReceiveJobs/ProductReceiveJobAutoMapperProfile.cs index 817171844..7b9b0543a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductReceiveJobs/ProductReceiveJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductReceiveJobs/ProductReceiveJobAutoMapperProfile.cs @@ -13,8 +13,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() - .ReverseMap(); + .ReverseMap(); CreateMap() .IgnoreAuditedObjectProperties() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductionReturnJobs/ProductionReturnJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductionReturnJobs/ProductionReturnJobAutoMapperProfile.cs index 6eead08ba..2435e9d3b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductionReturnJobs/ProductionReturnJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ProductionReturnJobs/ProductionReturnJobAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap(); @@ -26,7 +25,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.Id); CreateMap() - .IgnoreAuditedObjectProperties() ; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAutoMapperProfile.cs index 963b4b5b3..0c9469123 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAutoMapperProfile.cs @@ -16,11 +16,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile ; CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() - .IgnoreAuditedObjectProperties() ; CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReturnJobs/PurchaseReturnJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReturnJobs/PurchaseReturnJobAutoMapperProfile.cs index f486e014c..2ca4390c6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReturnJobs/PurchaseReturnJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReturnJobs/PurchaseReturnJobAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAutoMapperProfile.cs index dec115e62..5ecdd3e85 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAutoMapperProfile.cs index 8591cf74a..1716b485c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ContainerBindNotes/ContainerBindNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ContainerBindNotes/ContainerBindNoteAutoMapperProfile.cs index d3969a17c..24c1894f3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ContainerBindNotes/ContainerBindNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ContainerBindNotes/ContainerBindNoteAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs index 278f8a52c..47cdf7440 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs @@ -24,7 +24,14 @@ namespace Win_in.Sfs.Wms.Store.Application; [Route($"{StoreConsts.RootPath}count-note")] public class CountNoteAppService : - SfsStoreWithDetailsAppServiceBase, + SfsStoreWithDetailsAppServiceBase, ICountNoteAppService { private readonly ICountNoteManager _countNoteManager; @@ -35,7 +42,10 @@ public class CountNoteAppService : public CountNoteAppService( ICountNoteRepository repository, - ICountNoteManager countNoteManager, ICountPlanAppService countPlanAppService, ILocationAppService locationAppService, IItemBasicAppService itemBasicAppService) : base(repository) + ICountNoteManager countNoteManager, + ICountPlanAppService countPlanAppService, + ILocationAppService locationAppService, + IItemBasicAppService itemBasicAppService) : base(repository) { _countNoteManager = countNoteManager; _countPlanAppService = countPlanAppService; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/JisProductReceiptNotes/JisProductReceiptNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/JisProductReceiptNotes/JisProductReceiptNoteAutoMapperProfile.cs index bae5c6578..f4e2446a3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/JisProductReceiptNotes/JisProductReceiptNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/JisProductReceiptNotes/JisProductReceiptNoteAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .Ignore(x => x.ProdLine) .ReverseMap(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs index cb730c146..7bfc7fd9f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .Ignore(x => x.ProdLine) .ReverseMap(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAutoMapperProfile.cs index cfc41e44f..b4877764b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAutoMapperProfile.cs @@ -14,7 +14,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs index bc12055ab..ce58489bc 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ReceiptAbnormalNotes/ReceiptAbnormalNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ReceiptAbnormalNotes/ReceiptAbnormalNoteAutoMapperProfile.cs index 3532b2ca5..f92e2ca8f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ReceiptAbnormalNotes/ReceiptAbnormalNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ReceiptAbnormalNotes/ReceiptAbnormalNoteAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs index ba42b49cf..3e09d396c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs @@ -49,31 +49,32 @@ public class RecycledMaterialReceiptNoteAppService : [HttpPost("")] public override async Task CreateAsync(RecycledMaterialReceiptNoteEditInput input) { - var entity= ObjectMapper.Map(input); + var entity = ObjectMapper.Map(input); - entity.Number=string.IsNullOrEmpty(input.Number) + entity.Number = string.IsNullOrEmpty(input.Number) ? await GenerateNumberAsync(nameof(RecycledMaterialReceiptNote), input.ActiveDate) .ConfigureAwait(false) : input.Number; + entity.SetId(GuidGenerator.Create()); foreach (var detail in entity.Details) { var detailNumber = await GenerateNumberAsync(nameof(RecycledMaterialReceiptNote), input.ActiveDate) .ConfigureAwait(false); - detail.Number=detailNumber; + detail.SetIdAndNumber(GuidGenerator, entity.Id, detailNumber); var locationDto = await _locationAppService.GetByCodeAsync(detail.LocationCode).ConfigureAwait(false); detail.LocationErpCode = locationDto.ErpLocationCode; detail.LocationArea = locationDto.AreaCode; detail.LocationGroup = locationDto.LocationGroupCode; - detail.WarehouseCode=locationDto.WarehouseCode; - var itemBasicDto=await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + detail.WarehouseCode = locationDto.WarehouseCode; + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); detail.StdPackQty = itemBasicDto.StdPackQty; detail.Uom = itemBasicDto.BasicUom; } - entity=await _repository.InsertAsync(entity).ConfigureAwait(false); + entity = await _repository.InsertAsync(entity).ConfigureAwait(false); - await LocalEventBus.PublishAsync(new SfsCreatedEntityEventData(entity),false).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsCreatedEntityEventData(entity), false).ConfigureAwait(false); return ObjectMapper.Map(entity); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAutoMapperProfile.cs index 35ee6a020..4ac78addc 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAutoMapperProfile.cs index 2ef9b67b1..bff9c5e7d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/SaleOrders/SaleOrderAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/SaleOrders/SaleOrderAutoMapperProfile.cs index 7006bf3f2..93c75bbf8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/SaleOrders/SaleOrderAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/SaleOrders/SaleOrderAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs index de9cea2ea..cf4254513 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAppService.cs @@ -23,7 +23,14 @@ using Win_in.Sfs.Shared.Domain; [Route($"{StoreConsts.RootPath}count-plan")] public class CountPlanAppService : - SfsStoreRequestAppServiceBase, + SfsStoreRequestAppServiceBase, ICountPlanAppService { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAutoMapperProfile.cs index fbac04195..cb7430c66 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/CountPlans/CountPlanAutoMapperProfile.cs @@ -29,7 +29,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .Ignore(x => x.DiffQty) .ReverseMap(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/PreparationPlans/PreparationPlanAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/PreparationPlans/PreparationPlanAutoMapperProfile.cs index 90a14f582..bd3697b54 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/PreparationPlans/PreparationPlanAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/PreparationPlans/PreparationPlanAutoMapperProfile.cs @@ -10,7 +10,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile private void PreparationPlanAutoMapperProfile() { CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs index 484fe8dfb..2a980b30b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestFisAppService.cs @@ -115,7 +115,7 @@ public class DeliverRequestFisAppService : detail.ItemDesc2 = itemBasicDto.Desc2; detail.ItemName = itemBasicDto.Name; detail.Uom = itemBasicDto.BasicUom; - + detail.StdPackQty=itemBasicDto.StdPackQty; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InspectRequests/InspectRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InspectRequests/InspectRequestAutoMapperProfile.cs index 2e27bf9ac..239fd3a30 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InspectRequests/InspectRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InspectRequests/InspectRequestAutoMapperProfile.cs @@ -14,7 +14,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties(); + ; CreateMap() .IgnoreAuditedObjectProperties() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAppService.cs index 647f38610..ec2059cc0 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAppService.cs @@ -75,7 +75,8 @@ public class ItemTransformRequestAppService : { var fromLocationDto= await LocationAclService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false); var toLocationDto= await LocationAclService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - var itemBasicDto=await ItemBasicAclService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + var fromItemBasicDto=await ItemBasicAclService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + var toItemBasicDto = await ItemBasicAclService.GetByCodeAsync(detail.ToItemCode).ConfigureAwait(false); var balanceDto= await _balanceAppService.GetByItemLocationAndPackingAsync(detail.FromPackingCode, detail.ItemCode, detail.FromLocationCode).ConfigureAwait(false); @@ -97,10 +98,15 @@ public class ItemTransformRequestAppService : detail.ToLocationGroup = toLocationDto.LocationGroupCode; detail.ToWarehouseCode = toLocationDto.WarehouseCode; - detail.ItemDesc1 = itemBasicDto.Desc1; - detail.ItemDesc2= itemBasicDto.Desc2; - detail.ItemName= itemBasicDto.Name; - detail.Uom = itemBasicDto.BasicUom; + detail.ItemDesc1 = fromItemBasicDto.Desc1; + detail.ItemDesc2= fromItemBasicDto.Desc2; + detail.ItemName= fromItemBasicDto.Name; + detail.Uom = fromItemBasicDto.BasicUom; + + detail.ToItemCode = toItemBasicDto.Code; + detail.ToItemDesc1 = toItemBasicDto.Desc2; + detail.ToItemDesc2 = toItemBasicDto.Name; + detail.ItemName = toItemBasicDto.BasicUom; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAutoMapperProfile.cs index 4e7dd161f..72add1c78 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ItemTransformRequests/ItemTransformRequestAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ForMember(x => x.ToItemName, y => y.MapFrom(d => d.ToItemName)) .ForMember(x => x.ToItemDesc1, y => y.MapFrom(d => d.ToItemDesc1)) .ForMember(x => x.ToItemDesc2, y => y.MapFrom(d => d.ToItemDesc2)) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs index 7a3ddd00b..bf07d2a39 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; +using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main; using IdentityModel; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -43,15 +44,17 @@ public class MaterialRequestAppService : SfsStoreRequestAppServiceBase() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap() diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductionReturnRequests/ProductionReturnRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductionReturnRequests/ProductionReturnRequestAutoMapperProfile.cs index 18c6c170f..c5d12102a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductionReturnRequests/ProductionReturnRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ProductionReturnRequests/ProductionReturnRequestAutoMapperProfile.cs @@ -13,7 +13,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap(); CreateMap(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReturnRequests/PurchaseReturnRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReturnRequests/PurchaseReturnRequestAppService.cs index d07e428e6..8adf9ce95 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReturnRequests/PurchaseReturnRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReturnRequests/PurchaseReturnRequestAppService.cs @@ -37,18 +37,20 @@ public class PurchaseReturnRequestAppService : private readonly ILocationAppService _locationAppService; private readonly ITransactionTypeAppService _transactionTypeAppService; private readonly IPurchaseReturnRequestManager _purchaseReturnRequestManager; - + private readonly IPurchaseOrderAppService _purchaseOrderAppService; public PurchaseReturnRequestAppService( IPurchaseReturnRequestRepository repository, IPurchaseReturnRequestManager purchaseReturnRequestManager, IInventoryLabelAppService inventoryLabelApp, ILocationAppService locationAppService, - ITransactionTypeAppService transactionTypeAppService) : base(repository, purchaseReturnRequestManager) + ITransactionTypeAppService transactionTypeAppService, + IPurchaseOrderAppService purchaseOrderAppService) : base(repository, purchaseReturnRequestManager) { _purchaseReturnRequestManager = purchaseReturnRequestManager; _inventoryLabelApp = inventoryLabelApp; _locationAppService = locationAppService; _transactionTypeAppService = transactionTypeAppService; + _purchaseOrderAppService = purchaseOrderAppService; base.CreatePolicyName = PurchaseReturnRequestPermissions.Create; base.UpdatePolicyName = PurchaseReturnRequestPermissions.Update; @@ -97,13 +99,16 @@ public class PurchaseReturnRequestAppService : var labelDto = await _inventoryLabelApp.GetByCodeAsync(detail.PackingCode).ConfigureAwait(false); var balanceDto = await BalanceAclService.GetByPackingCodeAsync(detail.PackingCode).ConfigureAwait(false); var locationDto= await _locationAppService.GetByCodeAsync(balanceDto.LocationCode).ConfigureAwait(false); + var purchaseOrderDto= await _purchaseOrderAppService.GetByNumberAsync(labelDto.PoNumber).ConfigureAwait(false); + purchaseOrderDto = await _purchaseOrderAppService.GetAsync(purchaseOrderDto.Id).ConfigureAwait(false); + purchaseReturnRequest.AsnNumber = labelDto.AsnNumber; purchaseReturnRequest.RpNumber = labelDto.RpNumber; purchaseReturnRequest.ReturnTime=DateTime.Now; purchaseReturnRequest.SupplierCode= labelDto.SupplierCode; purchaseReturnRequest.ReturnType = EnumPurchaseReturnType.AfterPuton; purchaseReturnRequest.PoNumber = labelDto.PoNumber; - await SetDetailPropertiesAsync(detail, labelDto, balanceDto,locationDto).ConfigureAwait(false); + await SetDetailPropertiesAsync(detail, labelDto, balanceDto,locationDto, purchaseOrderDto).ConfigureAwait(false); } } @@ -135,12 +140,15 @@ public class PurchaseReturnRequestAppService : /// /// /// + /// /// private async Task SetDetailPropertiesAsync( PurchaseReturnRequestDetail detail, InventoryLabelDto labelDto, BalanceDTO balanceDto, - LocationDTO locationDto) + LocationDTO locationDto, + PurchaseOrderDTO purchaseOrderDto + ) { if (labelDto != null) { @@ -171,6 +179,12 @@ public class PurchaseReturnRequestAppService : detail.StdPackQty = balanceDto.StdPackQty; detail.Qty = balanceDto.Qty; } + + if (purchaseOrderDto != null) + { + detail.PoLine = + purchaseOrderDto.Details.FirstOrDefault(p => p.ItemCode == balanceDto.ItemCode && p.Lot == balanceDto.Lot).PoLine; + } } #endregion diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobManager.cs index 63a8d4584..11d85fc8d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobManager.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Users; using Volo.Abp.Validation; using Win_in.Sfs.Shared.Domain.Shared; @@ -31,9 +32,7 @@ public class PurchaseReceiptJobManager : SfsJobManagerBase CompleteAsync(PurchaseReceiptJob input, ICurrentUser user) { var entity = await Repository.FindAsync(input.Id).ConfigureAwait(false); - BuildDetailHandledAsync(input, entity); - //设置任务为完成 return await base.CompleteAsync(entity, user).ConfigureAwait(false); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedIssueJobs/UnplannedIssueJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedIssueJobs/UnplannedIssueJobDetail.cs index 5b1623f9d..bb548a9b7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedIssueJobs/UnplannedIssueJobDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedIssueJobs/UnplannedIssueJobDetail.cs @@ -1,3 +1,4 @@ +using System.ComponentModel.DataAnnotations; using Volo.Abp.Data; namespace Win_in.Sfs.Wms.Store.Domain; @@ -9,6 +10,24 @@ public class UnplannedIssueJobDetail : SfsJobRecommendFromDetailEntityBase, IHas /// public string ReasonCode { get; set; } + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobDetail.cs index a2ba8a699..9d1b62089 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobDetail.cs @@ -1,3 +1,4 @@ +using System.ComponentModel.DataAnnotations; using Volo.Abp.Data; namespace Win_in.Sfs.Wms.Store.Domain; @@ -10,6 +11,24 @@ public class UnplannedReceiptJobDetail : SfsJobRecommendToDetailEntityBase, IHas /// public string ReasonCode { get; set; } + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/UnplannedIssueNotes/UnplannedIssueNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/UnplannedIssueNotes/UnplannedIssueNoteDetail.cs index 8f575b250..ef461133a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/UnplannedIssueNotes/UnplannedIssueNoteDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/UnplannedIssueNotes/UnplannedIssueNoteDetail.cs @@ -1,3 +1,4 @@ +using System.ComponentModel.DataAnnotations; using Volo.Abp.Data; namespace Win_in.Sfs.Wms.Store.Domain; @@ -9,6 +10,24 @@ public class UnplannedIssueNoteDetail : SfsStoreRecommendFromDetailWithLotPackin /// public string ReasonCode { get; set; } + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/UnplannedReceiptNotes/UnplannedReceiptNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/UnplannedReceiptNotes/UnplannedReceiptNoteDetail.cs index 138e792de..eb0c1b067 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/UnplannedReceiptNotes/UnplannedReceiptNoteDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/UnplannedReceiptNotes/UnplannedReceiptNoteDetail.cs @@ -1,3 +1,4 @@ +using System.ComponentModel.DataAnnotations; using Volo.Abp.Data; namespace Win_in.Sfs.Wms.Store.Domain; @@ -9,6 +10,24 @@ public class UnplannedReceiptNoteDetail : SfsStoreRecommendToDetailWithLotPackin /// public string ReasonCode { get; set; } + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/MaterialRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/MaterialRequestDetail.cs index 2d4e5ba9d..1c59a4fda 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/MaterialRequestDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/MaterialRequestDetail.cs @@ -74,7 +74,7 @@ public class MaterialRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasToLoca public EnumStatus Status { get; set; } /// - /// 请求未发 + /// 请求未发 还未发送的数量 /// [NotMapped] public decimal ToBeIssuedQty => Qty - IssuedQty; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/MaterialRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/MaterialRequestManager.cs index 02f0fe835..9150c5461 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/MaterialRequestManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/MaterialRequestManager.cs @@ -1,6 +1,8 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using DocumentFormat.OpenXml.Math; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Event; using static Win_in.Sfs.Wms.Store.Domain.Shared.StoreSettings; @@ -12,12 +14,15 @@ public class MaterialRequestManager , IMaterialRequestManager { private readonly IMaterialRequestRepository _repository; + private readonly IIssueJobRepository _issueJobRepository; public MaterialRequestManager( IMaterialRequestRepository repository + , IIssueJobRepository issueJobRepository ) : base(repository) { _repository = repository; + _issueJobRepository = issueJobRepository; } /// @@ -27,7 +32,7 @@ public class MaterialRequestManager /// public virtual async Task CreateBynNumberAsync(MaterialRequest entity) { - var number = string.IsNullOrEmpty(entity.Number) ? await GenerateNumberAsync(typeof(MaterialRequest).Name, entity.ActiveDate).ConfigureAwait(false) : entity.Number; + var number = string.IsNullOrEmpty(entity.Number) ? await GenerateNumberAsync(nameof(MaterialRequest), entity.ActiveDate).ConfigureAwait(false) : entity.Number; entity.SetIdAndNumberWithDetails(GuidGenerator, number); entity.Submit(); entity.Agree(); @@ -38,6 +43,72 @@ public class MaterialRequestManager return entity; } + public virtual async Task UpdateDetailsAsync(MaterialRequest newEntity) + { + var oldEntity = await Repository.FindAsync(newEntity.Id, true).ConfigureAwait(false); + + foreach (var newDetail in newEntity.Details) + { + oldEntity.ReplaceDetail(newDetail.Id, newDetail); + } + + foreach (var detail in oldEntity.Details) + { + SetMaterialRequestDetailStatus(detail); + } + + await SetMaterialRequestStatus(oldEntity).ConfigureAwait(false); + + await Repository.UpdateAsync(oldEntity).ConfigureAwait(false); + } + + private void SetMaterialRequestDetailStatus(MaterialRequestDetail detail) + { + if (detail.ReceivedQty >= detail.Qty)//执行的时候 实际收料 多余 要料数 + { + detail.Status = EnumStatus.Close; + } + else + { + detail.Status = EnumStatus.Open; + } + } + + private async Task SetMaterialRequestStatus(MaterialRequest materialRequest) + { + if (!materialRequest.Details.All(p => p.Status == EnumStatus.Close)) + { + var issueJobs = await _issueJobRepository.GetListAsync(t => t.MaterialRequestNumber == materialRequest.Number).ConfigureAwait(false); + if (issueJobs.Count > 0) + { + if (issueJobs.All(t => t.JobStatus == EnumJobStatus.Done||t.JobStatus==EnumJobStatus.Closed||t.JobStatus==EnumJobStatus.Cancelled)) + { + materialRequest.RequestStatus = EnumRequestStatus.Completed; + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Completed; + } + } + + public virtual async Task CompleteAsync(string number) + { + var entity = await GetByNumberAsync(number).ConfigureAwait(false); + if (entity != null && !entity.Details.Any(p => p.ToBeIssuedQty > 0)) + { + await CompleteAsync(entity).ConfigureAwait(false); + } + } #region 公有 @@ -119,33 +190,6 @@ public class MaterialRequestManager } */ - public virtual async Task UpdateDetailsAsync(MaterialRequest newEntity) - { - var oldEntity = await Repository.FindAsync(newEntity.Id, true).ConfigureAwait(false); - - foreach (var newDetail in newEntity.Details) - { - oldEntity.ReplaceDetail(newDetail.Id, newDetail); - } - - var flag=oldEntity.Details.Any(p => p.ReceivedQty < p.Qty);//还有补料完 没收到的货 - - if (!flag) - { - oldEntity.Complete(); - } - - await Repository.UpdateAsync(oldEntity).ConfigureAwait(false); - } - - public virtual async Task CompleteAsync(string number) - { - var entity = await GetByNumberAsync(number).ConfigureAwait(false); - if (entity!=null &&!entity.Details.Any(p => p.ToBeIssuedQty > 0)) - { - await CompleteAsync(entity).ConfigureAwait(false); - } - } #endregion diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedIssueRequests/UnplannedIssueRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedIssueRequests/UnplannedIssueRequestDetail.cs index 2d597734a..a98da6f81 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedIssueRequests/UnplannedIssueRequestDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedIssueRequests/UnplannedIssueRequestDetail.cs @@ -1,3 +1,4 @@ +using System.ComponentModel.DataAnnotations; using Volo.Abp.Data; namespace Win_in.Sfs.Wms.Store.Domain; @@ -8,6 +9,24 @@ namespace Win_in.Sfs.Wms.Store.Domain; public class UnplannedIssueRequestDetail : SfsStoreDetailWithLotPackingQtyLocationStatusEntityBase , IHasExtraProperties { + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestDetail.cs index ec68fc967..1ac70ec54 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestDetail.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestDetail.cs @@ -1,3 +1,4 @@ +using System.ComponentModel.DataAnnotations; using Volo.Abp.Data; namespace Win_in.Sfs.Wms.Store.Domain; @@ -7,6 +8,29 @@ namespace Win_in.Sfs.Wms.Store.Domain; /// public class UnplannedReceiptRequestDetail : SfsStoreDetailWithLotPackingQtyLocationStatusEntityBase, IHasExtraProperties { + /// + /// 原因代码 + /// + public string ReasonCode { get; set; } + + /// + /// 专案 + /// + [Display(Name = "专案")] + public string CaseCode { get; set; } + + /// + /// 项目分类 + /// + [Display(Name = "项目分类")] + public string ProjCapacityCode { get; set; } + + /// + /// 次交易码 + /// + [Display(Name = "次交易码")] + public string OnceBusiCode { get; set; } + /// /// 扩展属性 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs index a0253c5fa..eb88b8826 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CountJobAutoMapperProfile.cs @@ -102,8 +102,6 @@ public partial class StoreEventAutoMapperProfile : Profile ; CreateMap() - .IgnoreAuditedObjectProperties() - // .ForMember(x => x.Item, y => y.MapFrom(d => new Item(d.ItemName, d.ItemDesc1, d.ItemDesc2))) // .ForMember(x => x.Batch, y => y.MapFrom(d => new Batch(d.SupplierBatch, d.ArriveDate, d.ProduceDate, d.ExpireDate))) .ForMember(x => x.InventoryLocationCode, y => y.MapFrom(d => d.LocationCode)) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/RecycledMaterialReceiptNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/RecycledMaterialReceiptNoteAutoMapperProfile.cs index d8e9c64ce..55dbc66b5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/RecycledMaterialReceiptNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/RecycledMaterialReceiptNoteAutoMapperProfile.cs @@ -24,7 +24,6 @@ public partial class StoreEventAutoMapperProfile : Profile CreateMap() .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() .ReverseMap() ; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/ExpectInOuts/IssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/ExpectInOuts/IssueJobEventHandler.cs index 70d496dfa..f3cb5ca84 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/ExpectInOuts/IssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/ExpectInOuts/IssueJobEventHandler.cs @@ -17,6 +17,13 @@ public class IssueJobEventHandler : , ILocalEventHandler> { + private readonly IBalanceAppService _balanceAppService; + + public IssueJobEventHandler(IBalanceAppService balanceAppService) + { + _balanceAppService = balanceAppService; + } + [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ProductionReturnJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ProductionReturnJobEventHandler.cs index b8ac3da2a..4690c9f2d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ProductionReturnJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ProductionReturnJobEventHandler.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -59,6 +60,7 @@ public class ProductionReturnJobEventHandler : { var input = ObjectMapper.Map(entity); + input.ReturnTime=DateTime.Now; input.Details = new List(); foreach (var detail in entity.Details.Where(detail => detail.HandledQty != 0)) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/PurchaseReceiptJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/PurchaseReceiptJobEventHandler.cs index 331faa759..09821b5db 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/PurchaseReceiptJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/PurchaseReceiptJobEventHandler.cs @@ -35,7 +35,7 @@ public class PurchaseReceiptJobEventHandler : var entity = eventData.Entity; //创建收货记录 - await CreatePurchaseReceiptNoteAsync(entity).ConfigureAwait(false); + await BuildPurchaseReceiptNoteAsync(entity).ConfigureAwait(false); } #region 私有 @@ -44,8 +44,9 @@ public class PurchaseReceiptJobEventHandler : /// 创建收货记录 /// /// - private async Task CreatePurchaseReceiptNoteAsync(PurchaseReceiptJob purchaseReceiptJob) + private async Task BuildPurchaseReceiptNoteAsync(PurchaseReceiptJob purchaseReceiptJob) { + var holdLocation = await LocationAclService.GetFirstByTypeAsync(EnumLocationType.HOLD).ConfigureAwait(false); //隔离库位 var createInput = ObjectMapper.Map(purchaseReceiptJob); //未收货记录 @@ -58,6 +59,16 @@ public class PurchaseReceiptJobEventHandler : detailInput.PurchaseReceiptInspectStatus = EnumPurchaseReceiptInspect.NORECEIPT; } + var noOkNoteDetailInputs = + createInput.Details.Where(p => p.PurchaseReceiptInspectStatus == EnumPurchaseReceiptInspect.NOK); + foreach (var detailInput in noOkNoteDetailInputs) + { + detailInput.HandledToLocationArea = holdLocation.AreaCode; + detailInput.HandledToLocationErpCode = holdLocation.ErpLocationCode; + detailInput.HandledToLocationGroup = holdLocation.LocationGroupCode; + detailInput.HandledToWarehouseCode=holdLocation.WarehouseCode; + } + await _purchaseReceiptNoteAppService.CreateAsync(createInput).ConfigureAwait(false); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs index acba1747c..f63574787 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/DeliverRequestEventHandler.cs @@ -9,33 +9,89 @@ using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; -using Win_in.Sfs.Wms.Store.Application.Contracts; - public class DeliverRequestEventHandler : StoreEventHandlerBase - , ILocalEventHandler> - , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler>> { private readonly IDeliverNoteAppService _deliverNoteApp; private readonly IDeliverJobAppService _deliverJobApp; private readonly ICustomerAddressAppService _customerAddressApp; + private readonly IDeliverRequestManager _deliverRequestManager; public DeliverRequestEventHandler( IDeliverJobAppService deliverJobApp , IDeliverNoteAppService deliverNoteApp - , ICustomerAddressAppService customerAddressApp - ) + , ICustomerAddressAppService customerAddressApp, IDeliverRequestManager deliverRequestManager) { _deliverNoteApp = deliverNoteApp; _deliverJobApp = deliverJobApp; _customerAddressApp = customerAddressApp; + _deliverRequestManager = deliverRequestManager; + } + + + /// + /// 创建后 + /// + /// Event data + [UnitOfWork] + public async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (entity.AutoSubmit) + { + await _deliverRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + + /// + /// 批量创建后 + /// + /// Event data + [UnitOfWork] + public async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _deliverRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } } + /// + /// 审批后 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsAbortedEntityEventData eventData) + { + var entity = eventData.Entity; + + //东阳特殊逻辑 + if (!entity.DirectCreateNote) + { + await _deliverJobApp.CancelByDeliverRequestAsync(entity.Number).ConfigureAwait(false); + } + } + + /// + /// 执行后 + /// + /// + /// [UnitOfWork] public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) { @@ -54,26 +110,32 @@ public class DeliverRequestEventHandler } } + + #region 私有 + private async Task BuildDeliverNoteAsync(DeliverRequest request) { - var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Deliver, EnumTransSubType.None).ConfigureAwait(false); + var transactionType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.Deliver, EnumTransSubType.None).ConfigureAwait(false); if (request.DeliverRequestType == EnumDeliverRequestType.Normal) { transactionType = await TransactionTypeAclService.GetByTransTypeAsync( - EnumTransType.Deliver, - EnumTransSubType.Deliver_Standard).ConfigureAwait(false); + EnumTransType.Deliver, + EnumTransSubType.Deliver_Standard).ConfigureAwait(false); } else if (request.DeliverRequestType == EnumDeliverRequestType.FIS) { transactionType = await TransactionTypeAclService.GetByTransTypeAsync( - EnumTransType.Deliver, - EnumTransSubType.Deliver_FIS).ConfigureAwait(false); + EnumTransType.Deliver, + EnumTransSubType.Deliver_FIS).ConfigureAwait(false); } var createInput = ObjectMapper.Map(request); - var customerAddress = (await _customerAddressApp.GetByCustomerCodeAsync(request.CustomerCode).ConfigureAwait(false)).FirstOrDefault(); + var customerAddress = + (await _customerAddressApp.GetByCustomerCodeAsync(request.CustomerCode).ConfigureAwait(false)) + .FirstOrDefault(); LocationDTO toLocation = null; if (customerAddress != null && !string.IsNullOrEmpty(customerAddress.LocationCode)) @@ -88,14 +150,14 @@ public class DeliverRequestEventHandler foreach (var detail in request.Details) { var balances = await BalanceAclService.GetRecommendBalancesAsync( - new RecommendBalanceRequestInput() - { - ItemCode = detail.ItemCode, - Qty = detail.Qty, - LocationTypes = transactionType.OutLocationTypes, - LocationAreas = new List() { detail.AreaCode }, - Statuses = transactionType.OutInventoryStatuses - }).ConfigureAwait(false); + new RecommendBalanceRequestInput + { + ItemCode = detail.ItemCode, + Qty = detail.Qty, + LocationTypes = transactionType.OutLocationTypes, + LocationAreas = new List { detail.AreaCode }, + Statuses = transactionType.OutInventoryStatuses + }).ConfigureAwait(false); var sumQty = balances.Sum(t => t.Qty); @@ -150,9 +212,12 @@ public class DeliverRequestEventHandler throw new ArgumentOutOfRangeException(); } - var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Deliver, transSubType).ConfigureAwait(false); + var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Deliver, transSubType) + .ConfigureAwait(false); var createInput = ObjectMapper.Map(request); - var customerAddress = (await _customerAddressApp.GetByCustomerCodeAsync(request.CustomerCode).ConfigureAwait(false)).FirstOrDefault(); + var customerAddress = + (await _customerAddressApp.GetByCustomerCodeAsync(request.CustomerCode).ConfigureAwait(false)) + .FirstOrDefault(); LocationDTO toLocation = null; if (customerAddress != null && !string.IsNullOrEmpty(customerAddress.LocationCode)) { @@ -165,14 +230,14 @@ public class DeliverRequestEventHandler foreach (var detail in request.Details) { var balances = await BalanceAclService.GetRecommendBalancesAsync( - new RecommendBalanceRequestInput() - { - ItemCode = detail.ItemCode, - Qty = detail.Qty, - LocationTypes = transactionType.OutLocationTypes, - LocationAreas = new List() { detail.AreaCode }, - Statuses = transactionType.OutInventoryStatuses - }).ConfigureAwait(false); + new RecommendBalanceRequestInput + { + ItemCode = detail.ItemCode, + Qty = detail.Qty, + LocationTypes = transactionType.OutLocationTypes, + LocationAreas = new List { detail.AreaCode }, + Statuses = transactionType.OutInventoryStatuses + }).ConfigureAwait(false); var sumQty = balances.Sum(t => t.Qty); @@ -190,6 +255,7 @@ public class DeliverRequestEventHandler inputDetail.ToLocationErpCode = toLocation.ErpLocationCode; inputDetail.ToWarehouseCode = toLocation.WarehouseCode; } + var item = await ItemBasicAclService.GetByCodeAsync(balance.ItemCode).ConfigureAwait(false); if (item != null) @@ -214,18 +280,8 @@ public class DeliverRequestEventHandler createInput.Priority = PriorityHelper.GetPriority(Clock); createInput.PriorityIncrement = 1; - return new List() { createInput }; + return new List { createInput }; } - [UnitOfWork] - public virtual async Task HandleEventAsync(SfsAbortedEntityEventData eventData) - { - var entity = eventData.Entity; - - //东阳特殊逻辑 - if (!entity.DirectCreateNote) - { - await _deliverJobApp.CancelByDeliverRequestAsync(entity.Number).ConfigureAwait(false); - } - } + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ItemTransformRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ItemTransformRequestEventHandler.cs index a71aeb6c3..3baf0a20c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ItemTransformRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ItemTransformRequestEventHandler.cs @@ -74,9 +74,9 @@ public class ItemTransformRequestEventHandler ReasonCode = detail.ReasonCode, ToArriveDate = detail.ToArriveDate, ToExpireDate = detail.ToExpireDate, - ToItemDesc1 = detail.ItemDesc1, - ToItemDesc2 = detail.ItemDesc2, - ToItemName = detail.ItemName, + ToItemDesc1 = detail.ToItemDesc1, + ToItemDesc2 = detail.ToItemDesc2, + ToItemName = detail.ToItemName, ToLot = detail.ToLot, ToPackingCode = detail.ToPackingCode, ToQty = detail.ToQty, diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs index df7782591..02937f8ff 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs @@ -28,17 +28,20 @@ public class MaterialRequestEventHandler private readonly IProductionLineAppService _productionLineAppService; private readonly IMaterialRequestManager _materialRequestManager; private readonly ILocationAppService _locationAppService; + private readonly IBalanceAppService _balanceAppService; public MaterialRequestEventHandler( IIssueJobAppService issueJobAppService , IProductionLineAppService productionLineAppService , IMaterialRequestManager materialRequestManager - , ILocationAppService locationAppService) + , ILocationAppService locationAppService + , IBalanceAppService balanceAppService) { _issueJobAppService = issueJobAppService; _productionLineAppService = productionLineAppService; _materialRequestManager = materialRequestManager; _locationAppService = locationAppService; + _balanceAppService = balanceAppService; } /// @@ -121,14 +124,18 @@ public class MaterialRequestEventHandler { var jobs = new List(); - var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); - var toLocationCodes = materialRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList(); - var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false); + var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false);//库存事务 - foreach (var materialRequestDetail in materialRequest.Details.Where(p => p.ToBeIssuedQty > 0))//如果有还有剩余未叫料的数量 则创建新的任务 + var toLocationCodes = materialRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合 + var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合 + + var materialRequestDetails = materialRequest.Details.Where(p => p.ToBeIssuedQty > 0);//所有还没发送物品的集合 + foreach (var materialRequestDetail in materialRequestDetails)//如果有还有剩余未叫料的数量 则创建新的任务 { - var toLocation = toLocations.FirstOrDefault(p => p.Code == materialRequestDetail.ToLocationCode); + var toLocation = toLocations.FirstOrDefault(p => p.Code == materialRequestDetail.ToLocationCode);//判断目标库位是否存在 Check.NotNull(toLocation, "库位代码", $"库位 {materialRequestDetail.ToLocationCode} 不存在"); + + //创建详情 var jobDetails = await BuildIssueJobDetailInputsAsync(materialRequest, materialRequestDetail, transactionType, toLocation.LocationGroupCode).ConfigureAwait(false); if (!jobDetails.Any()) { @@ -144,7 +151,7 @@ public class MaterialRequestEventHandler jobs.Add(job); } job.Details.AddRange(jobDetails); - if (materialRequestDetail.ToBeIssuedQty <= 0) + if (materialRequestDetail.ToBeIssuedQty < 0) { materialRequestDetail.Status = EnumStatus.Close; } @@ -204,7 +211,7 @@ public class MaterialRequestEventHandler Statuses = transactionType.OutInventoryStatuses, }; //获取推荐库存 - var recommendList = await BalanceAclService.GetRecommendBalancesAsync(input).ConfigureAwait(false); + var recommendList = await _balanceAppService.GetRecommendBalancesAsync(input).ConfigureAwait(false); //没有推荐库存时 跳过此明细 不生成任务 if (recommendList.Count != 0) { @@ -215,16 +222,17 @@ public class MaterialRequestEventHandler if (materialRequest.UseOnTheWayLocation) { //获取在途库 - var locationDto= await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); + var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); detail.OnTheWayLocationCode = locationDto.Code; } jobDetails.Add(detail); materialRequestDetail.IssuedQty += recommend.Qty; + await _materialRequestManager.UpdateDetailsAsync(materialRequest).ConfigureAwait(false); + } } - return jobDetails; } @@ -240,21 +248,22 @@ public class MaterialRequestEventHandler detail.RecommendPackingCode = balance.PackingCode; detail.RecommendContainerCode = balance.ContainerCode; detail.RecommendSupplierBatch = balance.SupplierBatch; - detail.RecommendProduceDate= balance.ProduceDate; - detail.RecommendExpireDate= balance.ExpireDate; - detail.RecommendLot= balance.Lot; - detail.RecommendProduceDate=balance.ProduceDate; - detail.RecommendArriveDate= balance.ArriveDate; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendExpireDate = balance.ExpireDate; + detail.RecommendLot = balance.Lot; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendArriveDate = balance.ArriveDate; detail.RecommendFromLocationArea = balance.LocationArea; - detail.RecommendFromLocationCode= balance.LocationCode; - detail.RecommendFromLocationErpCode= balance.LocationErpCode; - detail.RecommendFromLocationGroup= balance.LocationGroup; - detail.RecommendFromWarehouseCode= balance.WarehouseCode; + detail.RecommendFromLocationCode = balance.LocationCode; + detail.RecommendFromLocationErpCode = balance.LocationErpCode; + detail.RecommendFromLocationGroup = balance.LocationGroup; + detail.RecommendFromWarehouseCode = balance.WarehouseCode; + detail.RecommendQty = balance.Qty; detail.Uom = balance.Uom; detail.ToLocationCode = materialRequestDetail.ToLocationCode; detail.ToLocationErpCode = materialRequestDetail.ToLocationErpCode; - detail.ToLocationArea= materialRequestDetail.ToLocationArea; + detail.ToLocationArea = materialRequestDetail.ToLocationArea; detail.ToWarehouseCode = materialRequestDetail.ToWarehouseCode; detail.ToLocationGroup = materialRequestDetail.ToLocationGroup; //detail.Operation = //TODO diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs index 94d4e8369..8f718fb7e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/IssueNoteEventHandler.cs @@ -6,6 +6,8 @@ using Volo.Abp.Uow; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Domain; +using static Win_in.Sfs.Wms.Store.Domain.Shared.StoreSettings; +using MaterialRequest = Win_in.Sfs.Wms.Store.Domain.MaterialRequest; namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; @@ -37,33 +39,6 @@ public class IssueNoteEventHandler await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); } - private async Task UpdateReceivedQtyMaterialRequestAsync(IssueNote entity) - { - var receiveQtyGroup = entity.Details - .GroupBy(p => new { p.ItemCode, p.ToLocationCode }) - .Select(p => new { p.Key.ItemCode, p.Key.ToLocationCode, Qty = p.Sum(d => d.Qty) }) - .ToList(); - - var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); - - if (entity.RequestType != EnumMaterialRequestType.Issue_Direct.ToString()) - { - //更新叫料请求的已收数量 - foreach (var materialRequestDetail in materialRequest.Details) - { - var receiveQty = receiveQtyGroup.FirstOrDefault(p => - p.ItemCode == materialRequestDetail.ItemCode && - p.ToLocationCode == materialRequestDetail.ToLocationCode)?.Qty; - if (receiveQty != null) - { - materialRequestDetail.ReceivedQty += receiveQty.Value; - } - } - - await _materialRequestManager.UpdateDetailsAsync(materialRequest).ConfigureAwait(false); - } - } - /// /// 当叫料记录创建后 修改请求的值 /// @@ -93,4 +68,31 @@ public class IssueNoteEventHandler await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); } } + + private async Task UpdateReceivedQtyMaterialRequestAsync(IssueNote entity) + { + var receiveQtyGroup = entity.Details + .GroupBy(p => new { p.ItemCode, p.ToLocationCode }) + .Select(p => new { p.Key.ItemCode, p.Key.ToLocationCode, Qty = p.Sum(d => d.Qty) }) + .ToList(); + + var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); + + if (entity.RequestType != EnumMaterialRequestType.Issue_Direct.ToString()) + { + //更新叫料请求的已收数量 + foreach (var materialRequestDetail in materialRequest.Details) + { + var receiveQty = receiveQtyGroup.FirstOrDefault(p => + p.ItemCode == materialRequestDetail.ItemCode && + p.ToLocationCode == materialRequestDetail.ToLocationCode)?.Qty; + if (receiveQty != null) + { + materialRequestDetail.ReceivedQty += receiveQty.Value; + } + } + + await _materialRequestManager.UpdateDetailsAsync(materialRequest).ConfigureAwait(false); + } + } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductRecycleRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductRecycleRequestEventHandler.cs index fa0a16a2e..2e0b3a9f8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductRecycleRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductRecycleRequestEventHandler.cs @@ -16,20 +16,55 @@ using Application.Contracts; public class ProductRecycleRequestEventHandler : StoreEventHandlerBase , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler>> { private readonly IProductRecycleNoteAppService _productRecycleNoteApp; private readonly IBackFlushNoteAppService _backFlushNoteApp; private readonly IBomAppService _bomApp; + private readonly IProductRecycleRequestManager _productRecycleRequestManager; public ProductRecycleRequestEventHandler( IProductRecycleNoteAppService productRecycleNoteApp, IBackFlushNoteAppService backFlushNoteApp, - IBomAppService bomApp - ) + IBomAppService bomApp, IProductRecycleRequestManager + productRecycleRequestManager) { _productRecycleNoteApp = productRecycleNoteApp; _backFlushNoteApp = backFlushNoteApp; _bomApp = bomApp; + _productRecycleRequestManager = productRecycleRequestManager; + } + + /// + /// 创建后 + /// + /// Event data + [UnitOfWork] + public async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (entity.AutoSubmit) + { + await _productRecycleRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + + /// + /// 批量创建后 + /// + /// Event data + [UnitOfWork] + public async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _productRecycleRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } } [UnitOfWork] @@ -49,6 +84,8 @@ public class ProductRecycleRequestEventHandler } } + #region 私有 + private async Task BuildProductRecycleNoteAsync(ProductRecycleRequest request) { var createInput = ObjectMapper.Map(request); @@ -115,6 +152,10 @@ public class ProductRecycleRequestEventHandler return detailInput; } + #endregion + + + /* private async Task> BuildFlushNotesAsync(ProductRecycleRequest request) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedIssueRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedIssueRequestEventHandler.cs index 4969e34e8..acfe68f31 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedIssueRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedIssueRequestEventHandler.cs @@ -10,20 +10,58 @@ namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; public class UnplannedIssueRequestEventHandler : StoreEventHandlerBase - , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler>> + , ILocalEventHandler> { private readonly IUnplannedIssueJobAppService _unplannedIssueJobApp; private readonly IUnplannedIssueNoteAppService _unplannedIssueNoteAppService; + private readonly IUnplannedIssueRequestManager _unplannedIssueRequestManager; public UnplannedIssueRequestEventHandler( - IUnplannedIssueJobAppService unplannedIssueJobApp - , IUnplannedIssueNoteAppService unplannedIssueNoteAppService - ) + IUnplannedIssueJobAppService unplannedIssueJobApp, + IUnplannedIssueNoteAppService unplannedIssueNoteAppService, + IUnplannedIssueRequestManager unplannedIssueRequestManager) { _unplannedIssueJobApp = unplannedIssueJobApp; _unplannedIssueNoteAppService = unplannedIssueNoteAppService; + _unplannedIssueRequestManager = unplannedIssueRequestManager; } + /// + /// 创建后 + /// + /// Event data + public async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (entity.AutoSubmit) + { + await _unplannedIssueRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + + /// + /// 批量创建后 + /// + /// Event data + public async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _unplannedIssueRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + } + + /// + /// 执行后 + /// + /// + /// public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) { var entity = eventData.Entity; @@ -39,7 +77,10 @@ public class UnplannedIssueRequestEventHandler } } - private async Task BuildUnplannedIssueNoteCreateInputAsync(UnplannedIssueRequest entity) + #region 私有 + + private async Task BuildUnplannedIssueNoteCreateInputAsync( + UnplannedIssueRequest entity) { await Task.CompletedTask.ConfigureAwait(false); var createInput = ObjectMapper.Map(entity); @@ -50,6 +91,8 @@ public class UnplannedIssueRequestEventHandler return createInput; } + #endregion + private async Task BuildUnplannedIssueJobCreateInputAsync(UnplannedIssueRequest entity) { await Task.CompletedTask.ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedReceiptRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedReceiptRequestEventHandler.cs index 5e93227dc..dcec7d221 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedReceiptRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/UnplannedReceiptRequestEventHandler.cs @@ -10,20 +10,58 @@ namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; public class UnplannedReceiptRequestEventHandler : StoreEventHandlerBase - , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler>> + , ILocalEventHandler> { private readonly IUnplannedReceiptJobAppService _unplannedReceiptJobApp; private readonly IUnplannedReceiptNoteAppService _unplannedReceiptNoteApp; + private readonly IUnplannedReceiptRequestManager _unplannedReceiptRequestManager; public UnplannedReceiptRequestEventHandler( - IUnplannedReceiptJobAppService unplannedReceiptJobApp - , IUnplannedReceiptNoteAppService unplannedReceiptNoteApp - ) + IUnplannedReceiptJobAppService unplannedReceiptJobApp, + IUnplannedReceiptNoteAppService unplannedReceiptNoteApp, + IUnplannedReceiptRequestManager unplannedReceiptRequestManager) { _unplannedReceiptNoteApp = unplannedReceiptNoteApp; + _unplannedReceiptRequestManager = unplannedReceiptRequestManager; _unplannedReceiptJobApp = unplannedReceiptJobApp; } + /// + /// 创建后 + /// + /// Event data + public async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (entity.AutoSubmit) + { + await _unplannedReceiptRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + + /// + /// 批量创建后 + /// + /// Event data + public async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _unplannedReceiptRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + } + + /// + /// 执行后 + /// + /// + /// public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) { var entity = eventData.Entity; @@ -41,7 +79,10 @@ public class UnplannedReceiptRequestEventHandler } } - private async Task BuildUnplannedReceiptNoteCreateInputAsync(UnplannedReceiptRequest entity) + #region 私有 + + private async Task BuildUnplannedReceiptNoteCreateInputAsync( + UnplannedReceiptRequest entity) { await Task.CompletedTask.ConfigureAwait(false); var createInput = ObjectMapper.Map(entity); @@ -52,7 +93,8 @@ public class UnplannedReceiptRequestEventHandler return createInput; } - private async Task BuildToUnplannedReceiptJobCreateInputAsync(UnplannedReceiptRequest entity) + private async Task BuildToUnplannedReceiptJobCreateInputAsync( + UnplannedReceiptRequest entity) { await Task.CompletedTask.ConfigureAwait(false); var createInput = ObjectMapper.Map(entity); @@ -75,6 +117,8 @@ public class UnplannedReceiptRequestEventHandler return createInput; } + #endregion + /* 改用AutoMapper实现 private void SetUnplannedReceiptJobDetails(UnplannedReceiptJobCreateInput createInput, List details) { @@ -111,5 +155,4 @@ public class UnplannedReceiptRequestEventHandler } } */ - } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReceiptNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReceiptNoteEventHandler.cs index 891d194c9..719171fa8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReceiptNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReceiptNoteEventHandler.cs @@ -120,7 +120,6 @@ public class PurchaseReceiptNoteEventHandler Dictionary dictionary) { if (entity.Details.Any(p => - p.PurchaseReceiptInspectStatus == EnumPurchaseReceiptInspect.NOK || p.PurchaseReceiptInspectStatus == EnumPurchaseReceiptInspect.OK)) { var inboundTransactions = new List(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReturnNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReturnNoteEventHandler.cs index 4942734d8..0c5f36fa1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReturnNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/PurchaseReturnNoteEventHandler.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Threading.Tasks; using Volo.Abp.EventBus; using Volo.Abp.Uow; +using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Inventory.Application.Contracts; @@ -25,14 +26,16 @@ public class PurchaseReturnNoteEventHandler private readonly IPurchaseReturnRequestAppService _purchaseReturnRequestApp; private readonly IPurchaseOrderAppService _purchaseOrderAppService; + private readonly IInventoryLabelAppService _inventoryLabelAppService; public PurchaseReturnNoteEventHandler( IPurchaseReturnRequestAppService purchaseReturnRequestApp - , IPurchaseOrderAppService purchaseOrderAppService - ) + , IPurchaseOrderAppService purchaseOrderAppService, + IInventoryLabelAppService inventoryLabelAppService) { _purchaseReturnRequestApp = purchaseReturnRequestApp; _purchaseOrderAppService = purchaseOrderAppService; + _inventoryLabelAppService = inventoryLabelAppService; } [UnitOfWork] @@ -53,10 +56,15 @@ public class PurchaseReturnNoteEventHandler private async Task UpdatePurchaseOrderAsync(PurchaseReturnNote entity) { - var purchaseOrderDetailUpdateInputs = entity.Details + foreach (var detail in entity.Details) + { + var inventoryLabelDto=await _inventoryLabelAppService.GetByCodeAsync(detail.PackingCode).ConfigureAwait(false); + + var purchaseOrderDetailUpdateInputs = entity.Details .Select(BuildPurchaseOrderDetailUpdateInput).ToList(); - await _purchaseOrderAppService.UpdateDetailsAsync(entity.PoNumber, purchaseOrderDetailUpdateInputs).ConfigureAwait(false); + await _purchaseOrderAppService.UpdateDetailsAsync(entity.PoNumber, purchaseOrderDetailUpdateInputs).ConfigureAwait(false); + } } private static PurchaseOrderDetailUpdateInput BuildPurchaseOrderDetailUpdateInput(PurchaseReturnNoteDetail purchaseReturnNoteDetail) diff --git a/build/src/docker/publish/conf/settings/appsettings.Development.json b/build/src/docker/publish/conf/settings/appsettings.Development.json index 469960c01..5a4efcb2d 100644 --- a/build/src/docker/publish/conf/settings/appsettings.Development.json +++ b/build/src/docker/publish/conf/settings/appsettings.Development.json @@ -111,13 +111,13 @@ }, "RemoteServices": { "Auth": { - "BaseUrl": "http://localhost:59093/" + "BaseUrl": "http://dev.ccwin-in.com:60083/" }, "BaseData": { - "BaseUrl": "http://localhost:59094/" + "BaseUrl": "http://dev.ccwin-in.com:60084/" }, "Default": { - "BaseUrl": "http://localhost:59093/" + "BaseUrl": "http://dev.ccwin-in.com:60083/" }, "FileStorage": { "BaseUrl": "http://dev.ccwin-in.com:60082/" diff --git a/fe/PC/src/api/wms-api.js b/fe/PC/src/api/wms-api.js index 7d96a106d..8f8c59486 100644 --- a/fe/PC/src/api/wms-api.js +++ b/fe/PC/src/api/wms-api.js @@ -2,6 +2,7 @@ import request from '@/utils/request' import store from '@/store' // let baseURL = process.env.VUE_APP_BASE_API + '/' let baseURL = localStorage.getItem('base') + '/api/' +let printURL = localStorage.getItem('print') + '/api/' //新建 export function postCreate(data, url) { if (Object.keys(data).includes('company')) { @@ -242,7 +243,7 @@ export function getPage(data, url) { //打印标签 export function PrintServices(data) { return request({ - url: baseURL + 'reporting/PrintServices', + url: printURL + 'reporting/PrintServices', method: 'post', headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' @@ -408,11 +409,20 @@ export function notifyMessage(params, id) { }) } -// 库存-启用 | 库存余额 -export function inventoryBalanceActive(id) { +// 库存-启用 | 库存余额 +// export function inventoryBalanceActive(id) { +// return request({ +// url: baseURL + 'wms/inventory/inventory-balance/active?id=' + id, +// method: 'post', +// }) +// } + +// 库存-启用 | 库存余额 改 +export function inventoryBalanceActive(params) { return request({ - url: baseURL + 'wms/inventory/inventory-balance/active?id=' + id, + url: baseURL + 'wms/inventory/inventory-balance/' + params.id + '/active', method: 'post', + params: params, }) } @@ -456,8 +466,9 @@ export function createAndHandle(data) { // 人工叫料申请 | 人工发料任务 | 人工发料记录 | 自动叫料申请 | 自动发料任务 | 自动发料记录 | 直接发料记录 // 完工收货缴库申请 | 线边仓缴库申请 | 线边仓缴库记录 | 线边仓报废申请 | 线边仓报废记录 | 原料报废记录 export function materialRequestByType(data, url, params) { + let _type = params.type?params.type:params.requestType return request({ - url: baseURL + url + '/' + params.type, + url: baseURL + url + '/' + _type, method: 'post', params: params, data @@ -499,7 +510,7 @@ export function getPageListWip(data, url) { }) } -// 线边仓调拨确认按钮 | 客户调拨确认按钮 +// 线边仓调拨确认按钮 | 客户调拨确认按钮 | 自动发料记录 export function confirm(id, url) { return request({ url: baseURL + url + '/confirm/' + id, @@ -530,6 +541,22 @@ export function allSupplierByCodes(data) { data }) } + +// 根据code获取当前供应商信息 打印需要获取供应商信息(供应商简称等)相关位置 +export function getOneSupplierInfoByCode(code) { + return request({ + url: baseURL + 'basedata/supplier/by-code/' + code, + method: 'get' + }) +} + +// 根据code获取当前客户信息 打印需要获取供应商信息(客户地址等)相关位置 +export function getOneCustomerInfoByCode(code) { + return request({ + url: baseURL + 'basedata/customer/by-code/' + code, + method: 'get' + }) +} // 根据编号获取字典信息 // export function getDictByCode(code) { // return request({ diff --git a/fe/PC/src/api/wms-core.js b/fe/PC/src/api/wms-core.js index 965aa35c5..40ad301dc 100644 --- a/fe/PC/src/api/wms-core.js +++ b/fe/PC/src/api/wms-core.js @@ -2,6 +2,14 @@ import request from '@/utils/request' // let baseURL = localStorage.getItem('print') + '/api/' let baseURL = localStorage.getItem('base') + '/api/' +// 根据箱码获取标签相关信息 | 补打标签 +export function getOneInventoryLabelByCode(code) { + return request({ + url: baseURL + 'label/inventory-label/by-code/' + code, + method: 'get' + }) +} + // 批量获取箱标签信息 | 到货请求 export function getInventoryLabelByCodes(data) { return request({ diff --git a/fe/PC/src/api/wms-job.js b/fe/PC/src/api/wms-job.js index 6afac7482..62e663b3c 100644 --- a/fe/PC/src/api/wms-job.js +++ b/fe/PC/src/api/wms-job.js @@ -168,8 +168,9 @@ export function InspectJobHandle(data, params, url) { //人工发料任务 | 自动发料任务 export function materialRequestByType(data, url, params) { + let _type = params.type?params.type:params.requestType return request({ - url: baseURL + url + '/' + params.type, + url: baseURL + url + '/' + _type, method: 'post', params: params, data @@ -198,7 +199,7 @@ export function preparationPlanByNumber(params) { //质检——完成质检 export function completeSummaryDetailStatus(params, data) { return request({ - url: baseURL + 'wms/job/inspect-job/complete-summary-detail-status/' + params.id, + url: baseURL + 'wms/store/inspect-job/complete-summary-detail-status/' + params.id, method: 'post', params: params, data @@ -208,7 +209,7 @@ export function completeSummaryDetailStatus(params, data) { //质检——设置默认状态(清除质检) export function setDetailDefaultOkStatus(params, id, data) { return request({ - url: baseURL + 'wms/job/inspect-job/set-detail-default-ok-status/' + id, + url: baseURL + 'wms/store/inspect-job/set-detail-default-ok-status/' + id, method: 'post', params: params, data @@ -218,7 +219,7 @@ export function setDetailDefaultOkStatus(params, id, data) { //质检——设置详情为合格 export function setDetailOkStatus(params, id, data) { return request({ - url: baseURL + 'wms/job/inspect-job/set-detail-ok-status/' + id, + url: baseURL + 'wms/store/inspect-job/set-detail-ok-status/' + id, method: 'post', params: params, data @@ -228,7 +229,7 @@ export function setDetailOkStatus(params, id, data) { //质检——设置详情为不合格 export function setDetailNookStatus(params, id, data) { return request({ - url: baseURL + 'wms/job/inspect-job/set-detail-nook-status/' + id, + url: baseURL + 'wms/store/inspect-job/set-detail-nook-status/' + id, method: 'post', params: params, data diff --git a/fe/PC/src/components/StepsCountPlanForm/index.vue b/fe/PC/src/components/StepsCountPlanForm/index.vue index 46fbf5b54..d786649be 100644 --- a/fe/PC/src/components/StepsCountPlanForm/index.vue +++ b/fe/PC/src/components/StepsCountPlanForm/index.vue @@ -412,6 +412,15 @@ export default { //确定筛选 advancedFilter(url, list, TotalCount, data, oldSkipCount) { return () => { + // 盘点库存 过滤线边仓数据 20230417 + if (data == 'locationData') { + list.condition.filters.push({ + action: "!=", + column: "type", + logic: "And", + value: "5" + }) + } list.SkipCount = (oldSkipCount - 1) * list.MaxResultCount; this.tableLoading = true; getPageList(list, url) diff --git a/fe/PC/src/components/commonTabel-drawer/index.vue b/fe/PC/src/components/commonTabel-drawer/index.vue index c45b70de8..175f20e22 100644 --- a/fe/PC/src/components/commonTabel-drawer/index.vue +++ b/fe/PC/src/components/commonTabel-drawer/index.vue @@ -8,7 +8,6 @@ :with-header="false" :modal="false" size="100%" - style="height:calc(100% - 28px);top: 14px;right:14px" >
@@ -70,6 +69,7 @@