Commit 73943217 by jiawei.su

fixedbug

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