Commit 89d32f3a by jiawei.su

fixedbug Sn重复出库

parent 04c17349
...@@ -253,6 +253,37 @@ namespace Siger.ApiACC.Controllers ...@@ -253,6 +253,37 @@ namespace Siger.ApiACC.Controllers
Logger.WriteLineInfo($"PlCfeeback 设备属性为维护"); Logger.WriteLineInfo($"PlCfeeback 设备属性为维护");
throw new BadRequestException(AccEnum.SectionPropertyNull); throw new BadRequestException(AccEnum.SectionPropertyNull);
} }
//PLC 反馈执行中
if(status==(int)TaskResultStatus.Produce)
{
var location = _automationLocation.Get(f => f.fixturetools == taskObj.fixtureguid && f.locationid == taskObj.locationid);
if (location == null)
{
Logger.WriteLineInfo($"PlCfeeback 未找到该工装储位信息");
throw new BadRequestException(AccEnum.MachineDisable);
}
if (sectionProperty.propertytype == 1)
{ //执行中时 Sn 已经出库
//从立库储位拿SN 工件到上料位
if (taskObj.action == TaskAction.Step_LK_SXLW)
{
location.sn = taskObj.sn;
location.ordernumber = taskObj.ordercode;
location.productcode = taskObj.productcode;
location.productid = taskObj.productid;
location.productname = taskObj.productname;
location.route = taskObj.route.ToString();
location.routeid = taskObj.route;
location.status = (int)LocationStatus.Out;
_automationLocation.Update(location);
}
}
}
//PLC 反馈结束. //PLC 反馈结束.
if (status == (int)TaskResultStatus.Complated) if (status == (int)TaskResultStatus.Complated)
{ {
......
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