Commit 86038d3c by jiawei.su

someupdate

parent 9c9e41c8
......@@ -201,6 +201,7 @@ namespace Siger.ApiACC.Controllers
}
var sendToPLC = new RequestPLC
{
LineID=levelsection.parentid,
RStation = taskobj.sectionid,
Fixture = taskobj.fixtureguid,
RequestForm = taskobj.no,
......
......@@ -37,9 +37,10 @@ namespace Siger.ApiACC.Tasks
var tasks = tasklist.OrderBy(s => s.actiontype);
var task = tasks.FirstOrDefault();
var levelsction = dbhelper.GetLevelsection(task.sectionid);
var sendToPLC = new RequestPLC
{
LineID= levelsction.parentid,
RStation = task.sectionid,
Fixture = task.fixtureguid,
RequestForm = task.no,
......
......@@ -2,6 +2,7 @@
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.CncRepository;
using Siger.Middlelayer.Repository;
using Siger.Middlelayer.Repository.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
......@@ -52,6 +53,10 @@ namespace Siger.ApiACC.Tasks
AccDbContext.siger_automation_task_list.Update(taskNo);
return AccDbContext.SaveChanges() > 0;
}
public siger_project_level_section GetLevelsection(int id)
{
return AccDbContext.siger_project_level_section.FirstOrDefault(f => f.id==id);
}
public void Dispose()
{
CncDbContext?.Dispose();
......
......@@ -128,13 +128,13 @@ namespace Siger.Middlelayer.AccRepository.Repositories
actionTypeExpression = q => q.actionTypeid==actionType;
}
Expression<Func<ResponseAutomationTasklist, bool>> triggerTimeTypeExpression = f => true;
if (string.IsNullOrEmpty(tiggertime))
if (!string.IsNullOrEmpty(tiggertime))
{
triggerTimeTypeExpression = q => q.triggervalue == tiggertime.ToDateTime();
}
Expression<Func<ResponseAutomationTasklist, bool>> comptimeExpression = f => true;
if (actionType != 0)
if (!string.IsNullOrEmpty(comptime))
{
comptimeExpression = q => q.complatevalue == comptime.ToDateTime();
}
......
......@@ -34,6 +34,8 @@ namespace Siger.Middlelayer.AccRepository.Request
/// 加工程序号 ,上料完成后自动加工需要
/// </summary>
public string Program { get; set; }
public int LineID { get; set; }
}
public class ResponsePlC
......
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