查询指定工单下的缺陷
This commit is contained in:
parent
6097d50da1
commit
c61bcc50b2
@ -47,6 +47,18 @@ namespace DOAN.WebApi.Controllers.MES.quality.FQC
|
||||
|
||||
}
|
||||
|
||||
//TODO 查询指定工单下的缺陷
|
||||
[HttpGet("search_defects")]
|
||||
public IActionResult SearchDefectList(string WorkOrder)
|
||||
{
|
||||
if (string.IsNullOrEmpty(WorkOrder) )
|
||||
{
|
||||
throw new CustomException("WorkOrder为空");
|
||||
}
|
||||
var response = qcFinishedproductDefectService.SearchDefectList(WorkOrder);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using DOAN.Model.MES.quality.FQC;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -10,5 +11,6 @@ namespace DOAN.Service.MES.quality.FQC.IService
|
||||
{
|
||||
bool AddDefectNum(string WorkOrder,string name);
|
||||
bool UpdateDefectNum(string WorkOrder,string name,int num);
|
||||
List<QcFinishedproductDefectCollection> SearchDefectList(string WorkOrder);
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,6 +70,12 @@ namespace DOAN.Service.MES.quality.FQC
|
||||
.ExecuteCommand();
|
||||
return flag > 0 ? true : false;
|
||||
}
|
||||
|
||||
public List<QcFinishedproductDefectCollection> SearchDefectList(string WorkOrder)
|
||||
{
|
||||
return Context.Queryable<QcFinishedproductDefectCollection>().Where(it => it.Workorder == WorkOrder).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user