From 7e94c77f81dc37d3c9f026ab20f44625768c7591 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 6 Jun 2024 14:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Jobs/JobController.cs | 156 ++++++++++++++++-- .../Enums/Inventory/EnumTransSubType.cs | 12 +- .../Enums/Job/EnumJobType.cs | 49 +++++- .../GaoTongs/GaoTongAppService.cs | 2 +- .../Jobs/CountJobs/CountExtension.cs | 14 +- 5 files changed, 208 insertions(+), 25 deletions(-) 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 f33a7441d..1ed6a0dad 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 @@ -32,6 +32,13 @@ public class JobController : AbpController private readonly IPutawayJobAppService _putawayJobAppService; private readonly IProductionReturnJobAppService _productionReturnJobAppService; private readonly IThirdLocationJobAppService _thirdLocationJobAppService; + private readonly IContainerJobAppService _containerJobAppService; + private readonly IInjectionIssueJobAppService _injectionIssueJobAppService; + private readonly IInjectionPlanJobAppService _injectionPlanJobAppService; + private readonly ICoatingIssueJobAppService _coatingIssueJobAppService; + private readonly IAssembleIssueJobAppService _assembleIssueJobAppService; + private readonly IKittingIssueJobAppService _kittingIssueJobAppService; + private readonly ISparePartIssueJobAppService _sparePartIssueJobAppService; /// /// @@ -56,7 +63,14 @@ public class JobController : AbpController IPurchaseReturnJobAppService purchaseReturnJobAppService, IPutawayJobAppService putawayJobAppService, IProductionReturnJobAppService productionReturnJobAppService, - IThirdLocationJobAppService thirdLocationJobAppService) + IThirdLocationJobAppService thirdLocationJobAppService, + IContainerJobAppService containerJobAppService, + IInjectionIssueJobAppService injectionIssueJobAppService, + IInjectionPlanJobAppService injectionPlanJobAppService, + ICoatingIssueJobAppService coatingIssueJobAppService, + IAssembleIssueJobAppService assembleIssueJobAppService, + IKittingIssueJobAppService kittingIssueJobAppService, + ISparePartIssueJobAppService sparePartIssueJobAppService) { _userWorkGroupAppService = userWorkGroupAppService; _countJobAppService = countJobAppService; @@ -69,6 +83,13 @@ public class JobController : AbpController _putawayJobAppService = putawayJobAppService; _productionReturnJobAppService = productionReturnJobAppService; _thirdLocationJobAppService = thirdLocationJobAppService; + _containerJobAppService = containerJobAppService; + _injectionIssueJobAppService = injectionIssueJobAppService; + _injectionPlanJobAppService = injectionPlanJobAppService; + _coatingIssueJobAppService = coatingIssueJobAppService; + _assembleIssueJobAppService = assembleIssueJobAppService; + _kittingIssueJobAppService = kittingIssueJobAppService; + _sparePartIssueJobAppService = sparePartIssueJobAppService; } /// @@ -81,24 +102,39 @@ public class JobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetUserWorkGroupAsync(userId).ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes.Select(p=>p.WorkGroupCode)); - var status = new List() { EnumJobStatus.Open,EnumJobStatus.Doing }; + var status = new List() { EnumJobStatus.Open,EnumJobStatus.Doing, EnumJobStatus.Partial}; var jsonStatus = JsonSerializer.Serialize(status); var list = new List(); - - var countJobs = await _countJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + //盘点有箱码 (原料盘点) + var countJobs_ByPackingCode = await _countJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase { Condition = new Condition { Filters = new List { new(nameof(CountJobDTO.WorkGroupCode),jsonCodes,"In"), - new(nameof(CountJobDTO.JobStatus),jsonStatus,"In") + new(nameof(CountJobDTO.JobStatus),jsonStatus,"In"), + new(nameof(CountJobDTO.InventoryMode),EnumInventoryMode.ByPackingCode.ToString()) } } }).ConfigureAwait(false); - list.Add(new JobCountDto { JobType = EnumJobType.CountJob, Count = countJobs }); - + list.Add(new JobCountDto { JobType = EnumJobType.CountJob_ByPackingCode, Count = countJobs_ByPackingCode }); + //盘点无箱码 (成品盘点) + var countJobs_ByErpItemCode = await _countJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + { + Condition = new Condition + { + Filters = new List + { + new(nameof(CountJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(CountJobDTO.JobStatus),jsonStatus,"In"), + new(nameof(CountJobDTO.InventoryMode),EnumInventoryMode.ByErpItemCode.ToString()) + } + } + }).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.CountJob_ByPackingCode, Count = countJobs_ByErpItemCode }); + //发货 var deliverJobs = await _deliverJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase { Condition = new Condition @@ -111,7 +147,7 @@ public class JobController : AbpController } }).ConfigureAwait(false); list.Add(new JobCountDto { JobType = EnumJobType.DeliverJob, Count = deliverJobs }); - + //检验 var inspectJobs = await _inspectJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase { Condition = new Condition @@ -124,7 +160,7 @@ public class JobController : AbpController } }).ConfigureAwait(false); list.Add(new JobCountDto { JobType = EnumJobType.InspectJob, Count = inspectJobs }); - + //发料 var issueJobs = await _issueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase { Condition = new Condition @@ -137,7 +173,7 @@ public class JobController : AbpController } }).ConfigureAwait(false); list.Add(new JobCountDto { JobType = EnumJobType.IssueJob, Count = issueJobs }); - + //完工收货 var productReceiveJobs = await _productReceiveJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase { Condition = new Condition @@ -150,7 +186,7 @@ public class JobController : AbpController } }).ConfigureAwait(false); list.Add(new JobCountDto { JobType = EnumJobType.ProductReceiveJob, Count = productReceiveJobs }); - + //采购收货 var purchaseReceiptJobRequest = new SfsJobRequestInputBase { Condition = new Condition @@ -169,7 +205,7 @@ public class JobController : AbpController } var purchaseReceiptJobs = await _purchaseReceiptJobAppService.GetCountByFilterAsync(purchaseReceiptJobRequest).ConfigureAwait(false); list.Add(new JobCountDto { JobType = EnumJobType.PurchaseReceiptJob, Count = purchaseReceiptJobs }); - + //采购退货 var purchaseReturnJobs = await _purchaseReturnJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase { Condition = new Condition @@ -182,7 +218,7 @@ public class JobController : AbpController } }).ConfigureAwait(false); list.Add(new JobCountDto { JobType = EnumJobType.PurchaseReturnJob, Count = purchaseReturnJobs }); - + //上架 var putawayJobs = await _putawayJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase { Condition = new Condition @@ -195,7 +231,7 @@ public class JobController : AbpController } }).ConfigureAwait(false); list.Add(new JobCountDto { JobType = EnumJobType.PutawayJob, Count = putawayJobs }); - + //退料 var productionReturnJobs = await _productionReturnJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase { Condition = new Condition @@ -221,7 +257,97 @@ public class JobController : AbpController } }).ConfigureAwait(false); list.Add(new JobCountDto { JobType = EnumJobType.ThirdLocationJob, Count = thirdLocationJobs }); - + //空器具库移 + var containerTransferJob = await _containerJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + { + Condition = new Condition + { + Filters = new List + { + new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + } + } + }).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.ContainerTransferJob, Count = containerTransferJob }); + //注塑发料 + var injectionIssueJob = await _injectionIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + { + Condition = new Condition + { + Filters = new List + { + new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + } + } + }).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.InjectionIssueJob, Count = injectionIssueJob }); + //注塑计划 + var injectionPlanJob = await _injectionPlanJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + { + Condition = new Condition + { + Filters = new List + { + new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + } + } + }).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.InjectionPlanJob, Count = injectionPlanJob }); + //喷涂发料 + var coatingIssueJob = await _coatingIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + { + Condition = new Condition + { + Filters = new List + { + new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + } + } + }).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.CoatingIssueJob, Count = coatingIssueJob }); + //装配发料 + var assembleIssueJob = await _assembleIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + { + Condition = new Condition + { + Filters = new List + { + new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + } + } + }).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.AssembleIssueJob, Count = assembleIssueJob }); + //kitting发料 + var kittingIssueJob = await _kittingIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + { + Condition = new Condition + { + Filters = new List + { + new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + } + } + }).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.KittingIssueJob, Count = kittingIssueJob }); + //备品发料 + var sparePartIssueJob = await _sparePartIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase + { + Condition = new Condition + { + Filters = new List + { + new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + } + } + }).ConfigureAwait(false); + list.Add(new JobCountDto { JobType = EnumJobType.SparePartIssueJob, Count = sparePartIssueJob }); return new ListResultDto(list); } } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs index c0569f598..5a45e7d5d 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransSubType.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations; +using System.Xml.Linq; namespace Win_in.Sfs.Shared.Domain.Shared; @@ -216,8 +217,13 @@ public enum EnumTransSubType ExcelInCountPlan = 6002, /// - /// 立库出库 + /// 立库出库线边仓调拨 /// - [Display(Name = "立库出库")] - Depot_Out = 1510 + [Display(Name = "立库出库线边仓调拨")] + Depot_Transfer_WIP = 1510, + /// + /// 立库出库线边仓领料 + /// + [Display(Name = "立库出库线边仓领料")] + Depot_Issue_WIP = 1511 } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs index 773cfa4ad..7989b1d7b 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobType.cs @@ -58,11 +58,15 @@ public enum EnumJobType CheckJob = 8, /// - /// 盘点任务 + /// 盘点任务有箱码 /// - [Display(Name = "盘点")] - CountJob = 9, - + [Display(Name = "盘点任务有箱码")] + CountJob_ByPackingCode = 9, + /// + /// 盘点任务无箱码 + /// + [Display(Name = "盘点任务无箱码")] + CountJob_ByErpItemCode = 10, /// /// JIS发货 /// @@ -96,7 +100,7 @@ public enum EnumJobType /// /// 器具转移 /// - [Display(Name = "转移")] + [Display(Name = "器具转移")] ContainerTransferJob = 16, /// @@ -104,4 +108,39 @@ public enum EnumJobType /// [Display(Name = "三方库")] ThirdLocationJob = 17, + /// + /// 注塑发料 + /// + [Display(Name = "注塑发料")] + InjectionIssueJob = 18, + /// + /// 注塑计划 + /// + [Display(Name = "注塑计划")] + InjectionPlanJob = 19, + /// + /// 喷涂发料 + /// + [Display(Name = "喷涂发料")] + CoatingIssueJob = 20, + /// + /// 装配发料 + /// + [Display(Name = "装配发料")] + AssembleIssueJob = 21, + /// + /// kitting发料 + /// + [Display(Name = "kitting发料")] + KittingIssueJob = 22, + /// + /// 备品发料 + /// + [Display(Name = "备品发料")] + SparePartIssueJob = 23, + /// + /// 盘点任务 + /// + [Display(Name = "盘点任务")] + CountJob = 24, } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs index 80143b4d8..0745cfeab 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/GaoTongs/GaoTongAppService.cs @@ -186,7 +186,7 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService transferNoteEditInput.Remark = String.Empty; transferNoteEditInput.Worker = _currentUser.UserName; transferNoteEditInput.ActiveDate = CommonHelper.CurTime; - transferNoteEditInput.Type = EnumTransSubType.Depot_Out.ToString(); //喷涂完工转储 + //transferNoteEditInput.Type = EnumTransSubType.Depot_Out.ToString(); //喷涂完工转储 transferNoteEditInput.UseOnTheWayLocation = false; //transferNoteEditInput.number //transferNoteEditInput.CallServerName diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountExtension.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountExtension.cs index 086f91a2e..e75bde263 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountExtension.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountExtension.cs @@ -19,7 +19,19 @@ public static class CountExtension public static CountJob Init(this CountJob job) { job.JobStatus = EnumJobStatus.Open; - job.JobType = EnumJobType.CountJob; + if (job.InventoryMode == EnumInventoryMode.ByPackingCode) + { + job.JobType = EnumJobType.CountJob_ByPackingCode; + } + else if (job.InventoryMode == EnumInventoryMode.ByErpItemCode) + { + job.JobType = EnumJobType.CountJob_ByErpItemCode; + } + else + { + job.JobType = EnumJobType.CountJob; + } + return job; }