qihuangondganjiaoyan

This commit is contained in:
qianhao.xu 2025-04-10 16:51:14 +08:00
parent 3c490893e4
commit dc32c4202d
3 changed files with 27 additions and 0 deletions

View File

@ -218,4 +218,15 @@ public class WorkOrderProgressController : BaseController
var response = workorderProgressService.GetWorkOrderScanCodeInfo(workorder);
return SUCCESS(response);
}
//TODO 切换工单时校验,前工单的末标签是否校验成功通过
[HttpGet("switch_workorder_checkLabel")]
public IActionResult SwitchWorkOrderCheckLabel(string pre_workorder)
{
if (string.IsNullOrEmpty(pre_workorder)) throw new CustomException("workorder is null");
var response = workorderProgressService.SwitchWorkOrderCheckLabel(pre_workorder);
return SUCCESS(response);
}
}

View File

@ -42,5 +42,7 @@ namespace DOAN.Service.JobKanban.IService
(DateTime, float) GetWorkOrderTime(string workorder);
List<ProReportworkDetail> GetWorkOrderScanCodeInfo(string workorder);
bool SwitchWorkOrderCheckLabel(string pre_workorder);
}
}

View File

@ -3,6 +3,7 @@ using DOAN.Model.MES.base_;
using DOAN.Model.MES.mm;
using DOAN.Model.MES.product;
using DOAN.Model.MES.product.Dto;
using DOAN.Model.Mobile;
using DOAN.Service.JobKanban.IService;
using DOAN.Service.MES.mm.line;
using Infrastructure.Attribute;
@ -353,4 +354,17 @@ public class WorkorderProgressService : BaseService<ProWorkorder>, IWorkorderPro
return progress;
}
public bool SwitchWorkOrderCheckLabel(string pre_workorder)
{
var result = Context.Queryable<ProInspectionLabel>().Where(it => it.Workorder == pre_workorder)
.Select(it => it.EndLabel).First();
if (!string.IsNullOrEmpty(result) )
{
return true;
}
else
{
return false;
}
}
}