Commit 0a1c5c46 by jiawei.su

fixedbug 调整检验工位发送PLC的工站

parent 7b1993d6
......@@ -187,7 +187,7 @@ namespace Siger.ApiACC.Controllers
}
var section = taskobj.extend1.ToInt();
//抽检台-》上料位特殊逻辑
if (taskobj.action == Automation.TaskAction.Step_CJT_SXLW)
if (taskobj.action == Automation.TaskAction.Step_LK_CJT || taskobj.action == Automation.TaskAction.Step_CJT_SXLW)
{
section = taskobj.sectionid;
}
......@@ -555,18 +555,17 @@ namespace Siger.ApiACC.Controllers
//2. 无检验状态 (立库-》上下料工位)
var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Manual);
var action = lineMode.inspect == 1 ? Automation.TaskAction.Step_LK_CJT : Automation.TaskAction.Step_LK_SXLW;
var section = unloading.section;
var fromSection = unloading.section ;
var toSection = 0;
if (lineMode.inspect==1)
{
var sectionProperty = _sectionPropertyRepository.Get(f => f.propertytype == 3);
if(sectionProperty==null)
var QcProperty = _sectionPropertyRepository.Get(f => f.propertytype == 3);
if(QcProperty == null)
{
throw new BadRequestException(AccEnum.SectionPropertyNull);
}
section = sectionProperty.sectionid;
fromSection= sectionProperty.sectionid;
toSection = QcProperty.sectionid;
}
var tasklst = _automationTaskList.GetList(f => f.sectionid == unloading.section && f.action == action && f.status!=(int)TaskResultStatus.Complated);
if (tasklst.Any())
......@@ -583,7 +582,7 @@ namespace Siger.ApiACC.Controllers
tasktype = Automation.TaskActionType.Load,
operater = UserId,
operatetime = DateTime.MinValue,
sectionid = section,
sectionid = toSection,
send = 0,
status = 1,
completetime = DateTime.MinValue,
......@@ -598,7 +597,7 @@ namespace Siger.ApiACC.Controllers
processid = 0,
programnumber = "",
remark =lineMode.inspect==1? "准备下料-》抽检台":"准备下料",
extend1= fromSection.ToString()
extend1 = unloading.section.ToStr()
});
......
......@@ -48,7 +48,7 @@ namespace Siger.ApiACC.Tasks
var section = task.extend1.ToInt();
//抽检台-》上料位特殊逻辑
if (task.action== Automation.TaskAction.Step_CJT_SXLW )
if (task.action==Automation.TaskAction.Step_LK_CJT || task.action == Automation.TaskAction.Step_CJT_SXLW)
{
section = task.sectionid;
}
......
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