From 337173fa2d9dea2d7660886a1a0770756f7b83c9 Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Thu, 19 Sep 2024 14:33:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E7=A0=81=E6=A0=A1=E9=AA=8C=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=A0=87=E7=AD=BE=E6=98=AF=E5=90=A6=E4=B8=8E=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E5=B7=A5=E5=8D=95=E5=8C=B9=E9=85=8D=20=200=20?= =?UTF-8?q?=E4=B8=8D=E5=8C=B9=E9=85=8D=20=201=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JobKanban/WorkOrderProgressController.cs | 15 +++++++++++++++ DOAN.Model/MES/product/Dto/ProWorkorderDto.cs | 2 -- .../IService/IWorkorderProgressService.cs | 3 +++ .../JobKanban/WorkorderProgressService.cs | 11 +++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/DOAN.Admin.WebApi/Controllers/JobKanban/WorkOrderProgressController.cs b/DOAN.Admin.WebApi/Controllers/JobKanban/WorkOrderProgressController.cs index 7d22345..12151aa 100644 --- a/DOAN.Admin.WebApi/Controllers/JobKanban/WorkOrderProgressController.cs +++ b/DOAN.Admin.WebApi/Controllers/JobKanban/WorkOrderProgressController.cs @@ -134,6 +134,21 @@ namespace DOAN.WebApi.Controllers.JobKanban return SUCCESS(response); } + //TODO 扫码校验判断标签是否与当前工单匹配 0 不匹配 1匹配 + [HttpGet("label_workorder_match")] + public IActionResult LabelWorkOrderMatch(string LabelContext,string workOrder) + { + if(string.IsNullOrEmpty(LabelContext)||string.IsNullOrEmpty(workOrder)) + { + return SUCCESS(null); + } + int response = workorderProgressService.LabelWorkOrderMatch( LabelContext, workOrder); + + return SUCCESS(response); + } + + + } diff --git a/DOAN.Model/MES/product/Dto/ProWorkorderDto.cs b/DOAN.Model/MES/product/Dto/ProWorkorderDto.cs index dc13e68..e1ca83a 100644 --- a/DOAN.Model/MES/product/Dto/ProWorkorderDto.cs +++ b/DOAN.Model/MES/product/Dto/ProWorkorderDto.cs @@ -112,8 +112,6 @@ namespace DOAN.Model.MES.product.Dto /// public DateTime? WorkorderDate { get; set; } - - /// /// 优先级 1-100 /// diff --git a/DOAN.Service/JobKanban/IService/IWorkorderProgressService.cs b/DOAN.Service/JobKanban/IService/IWorkorderProgressService.cs index 29e0f4e..a9d8a19 100644 --- a/DOAN.Service/JobKanban/IService/IWorkorderProgressService.cs +++ b/DOAN.Service/JobKanban/IService/IWorkorderProgressService.cs @@ -29,5 +29,8 @@ namespace DOAN.Service.JobKanban.IService int FinishWorkOrder(string workorder); ProWorkorder GetProductingWorkorder(string group_code, string line_code, DateTime handleDate); + + int LabelWorkOrderMatch(string LabelContext, string workOrder); + } } diff --git a/DOAN.Service/JobKanban/WorkorderProgressService.cs b/DOAN.Service/JobKanban/WorkorderProgressService.cs index c4cb6b5..a1b1081 100644 --- a/DOAN.Service/JobKanban/WorkorderProgressService.cs +++ b/DOAN.Service/JobKanban/WorkorderProgressService.cs @@ -183,6 +183,17 @@ namespace DOAN.Service.JobKanban } + + public int LabelWorkOrderMatch(string LabelContext, string workOrder) + { + + return Context.Updateable() + .Where(it=>it.Workorder == workOrder) + .Where(it=>it.LabelContext == LabelContext) + .SetColumns(it=>it.Status==1) + .ExecuteCommand(); + } + } }