Commit 50559fd2 by jiawei.su

someupate

parent 7720ba8c
......@@ -428,7 +428,7 @@ namespace Siger.ApiACC.Controllers
return; //完成当前任务 退出
}
}
//优先级3:其他设备下料 (加工中心 ->立库)
//优先级3:其他设备下料 (加工中心 ->清洗机)
if (cleanMachine != null)
{
var fullMachine = machineStatusList.FirstOrDefault(f => f.status == (int)Automation.MachineStatus.Complated);
......
......@@ -500,8 +500,54 @@ namespace Siger.ApiACC.Controllers
[HttpPost]
public IActionResult Unloading([FromBody]requestAutomationUnloading unloading)
{
var monitor = _automationFixtureMonitor.Get(f => f.section == unloading.section);
if (monitor == null)
{
Logger.WriteLineInfo($"AutoProcess 找不到CNC监控信息");
return new ObjectResult(CommonEnum.RecordNotFound);
}
if (string.IsNullOrEmpty( monitor.sn))
{
Logger.WriteLineInfo($"AutoProcess 找不到CNC监控SN信息");
return new ObjectResult(CommonEnum.RecordNotFound);
}
var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Manual);
_automationTaskList.Insert(new siger_automation_task_list
{
no = taskNo,
action = Automation.TaskAction.Step_LK_SXLW,
actiontype = Automation.ExcueType.None,
triggertime = DateTime.Now,
tasktype = Automation.TaskActionType.Load,
operater = UserId,
operatetime = DateTime.MinValue,
sectionid = unloading.section,
send = 0,
status = 1,
completetime = DateTime.MinValue,
trigger = Automation.TaskTrigerType.Manual,
projectId = ProjectId,
productid = monitor.productId,
sn = monitor.sn,
ordercode = monitor.ordernumber,
fixtureguid = monitor.fixtureguid,
locationid = monitor.locationId,
productcode = monitor.productCode,
processid = 0,
programnumber = "",
remark = "手动任务-准备上料",
return new ObjectResult(1);
});
if (_unitOfWork.Commit() > 0)
{
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
}
/// <summary>
......
......@@ -43,5 +43,10 @@ namespace Siger.Middlelayer.Share.Constant
/// </summary>
public const string WarehouseStation = "WarehouseStation";
/// <summary>
/// 检验
/// </summary>
public const string InspectStation = "InspectStation";
}
}
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