Commit 0960ff7a by jiawei.su

fixedbug

parent 57a9f688
......@@ -278,8 +278,13 @@ namespace Siger.ApiACC.Controllers
return new ObjectResult(CommonEnum.Succefull);
}
CreateTaskList(req.sectionid, req.productid, product.code, req.sn, req.routeid.ToInt());
var tasklist = _automationTaskList.GetList(f => f.sectionid == req.sectionid && f.action == Automation.TaskAction.Step_LK_CJT).LastOrDefault();
if (tasklist == null)
{
throw new BadRequestException(CommonEnum.Fail);
}
inspection.workorder = tasklist.ordercode;
CreateTaskList(tasklist, req.sectionid, req.productid, product.code, req.sn, req.routeid.ToInt());
AddSnList(req.materialid.ToInt(), inspection, product.code, section.parentid);//把二维码插入到 sn_list表
}
catch(Exception ex)
......@@ -335,13 +340,9 @@ namespace Siger.ApiACC.Controllers
}
}
private void CreateTaskList(int section, int productid, string productcode, string sn, int routeid)
private void CreateTaskList(siger_automation_task_list tasklist, int section, int productid, string productcode, string sn, int routeid)
{
var tasklist = _automationTaskList.GetList(f => f.sectionid == section && f.action == Automation.TaskAction.Step_LK_CJT).LastOrDefault();
if (tasklist == null)
{
throw new BadRequestException(CommonEnum.Fail);
}
//找到上下料位
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment