Commit 00a9de85 by yiyu.li
parents 37383a52 1ff2eccb
......@@ -149,7 +149,7 @@ namespace Siger.ApiACC.Controllers
{
section = line,
projectId = PID,
status = 0,
status = 1,
updatetime = DateTime.Now,
mode = mode
});
......
......@@ -227,15 +227,22 @@ namespace Siger.ApiACC.Controllers
guid = Guid.NewGuid().ToString(),
locationid = location.locationid,
location_cid = location.id,
fixturename=fixturetool.name,
fixturetools = fixturetool.guid,
productid= fixturetoolProduct != null ? fixturetoolProduct.productid : 0,
productcode = fixturetoolProduct!=null? fixturetoolProduct.productcode:"",
attachment = req.fileurl,
filename = req.filename,
remark = req.remark,
projectId = ProjectId,
updatetime = DateTime.Now,
updator = UserId,
ordernumber="",
route="",
sn="",
extend1=""
};
_autoLocationRepository.Insert(entity);
if (_unitOfWork.Commit() > 0)
......
......@@ -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