Commit 73943217 by jiawei.su

fixedbug

parent 0562c6d2
......@@ -150,10 +150,10 @@ namespace Siger.ApiACC.Controllers
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
if (sectionProperty.upload==0 && sectionProperty.down==0)
{
throw new BadRequestException(CommonEnum.RecordNotFound);
}
//if (sectionProperty.upload==0 && sectionProperty.down==0)
//{
// throw new BadRequestException(CommonEnum.RecordNotFound);
//}
var monitor = _automationFixtureMonitor.Get(f =>f.section==section );
var img = string.Empty;
if (monitor!=null)
......@@ -486,16 +486,16 @@ namespace Siger.ApiACC.Controllers
{
throw new BadRequestException(AccEnum.MonitorNotfound);
}
var tasklist = _automationTaskList.Get(f => f.projectId == ProjectId && f.no == monitor.taskno);
if(tasklist==null)
{
throw new BadRequestException(AccEnum.MachineDisable);
}
//var tasklist = _automationTaskList.Get(f => f.projectId == ProjectId && f.no == monitor.taskno);
//if(tasklist==null)
//{
// throw new BadRequestException(AccEnum.MachineDisable);
//}
if (tasklist.status!=(int)Automation.TaskResultStatus.Complated)
{
throw new BadRequestException(AccEnum.TaskProcessing);
}
//if (tasklist.status!=(int)Automation.TaskResultStatus.Complated)
//{
// throw new BadRequestException(AccEnum.TaskProcessing);
//}
//检测工序是否配置正确
var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Manual);
_automationTaskList.Insert(new siger_automation_task_list
......
......@@ -241,7 +241,7 @@ namespace Siger.ApiACC.Controllers
if (_unitOfWork.Commit() > 0)
{
Logger.WriteLineError($"手动任务创建成功-{Siger.Middlelayer.Common.Helpers.EnumHelper.GetEnumDesc(Automation.TaskAction.Step_LK_SXLW)}");
Logger.WriteLineError($"手动任务删除成功-{Siger.Middlelayer.Common.Helpers.EnumHelper.GetEnumDesc(Automation.TaskAction.Step_LK_SXLW)}");
return new ObjectResult(CommonEnum.Succefull);
}
else
......
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