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(); + } + } }