工单号传入为空

This commit is contained in:
qianhao.xu 2025-04-16 10:53:33 +08:00
parent 64723e0a8d
commit 992cecc2d4
3 changed files with 12 additions and 5 deletions

View File

@ -35,6 +35,7 @@ namespace DOAN.WebApi.Controllers.Mobile.product
[HttpGet("CheckBoxInspectionLabel")]
public IActionResult CheckBoxInspectionLabel(string workorder, string box_label)
{
var response = printAndReportWork3Service.CheckBoxInspectionLabel(workorder, box_label);
return SUCCESS(response);
return SUCCESS(true);

View File

@ -73,7 +73,7 @@ namespace DOAN.Service.Mobile
Context.Updateable<ProInspectionLabel>()
.Where(it => it.Workorder == workorder)
.SetColumns(it => new ProInspectionLabel() { FirstLabel = first_label, UpdatedTime = DateTime.Now })
.SetColumns(it => new ProInspectionLabel() { FirstLabel = first_label, UpdatedTime = DateTime.Now ,UpdatedBy="U13和U16"})
.ExecuteCommand();
@ -86,7 +86,8 @@ namespace DOAN.Service.Mobile
Workorder = workorder,
FirstLabel = first_label,
CreatedTime = DateTime.Now,
CreatedBy= "U13和U1"
};
@ -126,7 +127,7 @@ namespace DOAN.Service.Mobile
Context.Updateable<ProInspectionLabel>()
.Where(it => it.Workorder == workorder)
.SetColumns(it => new ProInspectionLabel() { EndLabel = end_label, UpdatedTime = DateTime.Now })
.SetColumns(it => new ProInspectionLabel() { EndLabel = end_label, UpdatedTime = DateTime.Now ,CreatedBy= "U13和U1" })
.ExecuteCommand();
@ -139,6 +140,7 @@ namespace DOAN.Service.Mobile
Workorder = workorder,
FirstLabel = end_label,
CreatedTime = DateTime.Now,
CreatedBy = "U13和U1"
};

View File

@ -25,6 +25,10 @@ namespace DOAN.Service.Mobile
{
try
{
if(string.IsNullOrEmpty(workorder))
{
return "工单号传入为空!";
}
if (string.IsNullOrEmpty(box_label))
{
return "箱标签传入为空!";
@ -36,11 +40,11 @@ namespace DOAN.Service.Mobile
return "箱标签解析失败!";
}
// 提取工单规格
// 提取工单存货编码
string workorderProductionCode = Context.Queryable<ProWorkorder>().Where(it => it.Workorder == workorder).Select(it => it.ProductionCode).First();
if (string.IsNullOrEmpty(workorderProductionCode))
{
return "工单规格异常,规格为空!";
return "工单存货编码异常,规格为空!";
}
if (box_labelArray[0] == workorderProductionCode)
{