Commit 03e7e3a3 by jiawei.su

fixedbug

parent e546a966
...@@ -299,6 +299,7 @@ namespace Siger.ApiACC.Controllers ...@@ -299,6 +299,7 @@ namespace Siger.ApiACC.Controllers
location.productid = taskObj.productid; location.productid = taskObj.productid;
location.routeid = taskObj.route; location.routeid = taskObj.route;
location.sn = taskObj.sn; location.sn = taskObj.sn;
location.status = (int)LocationStatus.In;
_automationLocation.Update(location); _automationLocation.Update(location);
} }
...@@ -389,7 +390,7 @@ namespace Siger.ApiACC.Controllers ...@@ -389,7 +390,7 @@ namespace Siger.ApiACC.Controllers
return; return;
} }
//工件回到立库 //工件回到立库
locationObj.status = 1; locationObj.status = (int)LocationStatus.In;
_automationLocation.Update(locationObj); _automationLocation.Update(locationObj);
CreateTask(cleanMachine.section, TaskActionType.Unload, TaskAction.Step_QXJ_LK, tasklist.fixtureguid, tasklist.ordercode, tasklist.sn, "无程序", tasklist.productid, tasklist.productcode, tasklist.locationid, tasklist.route); CreateTask(cleanMachine.section, TaskActionType.Unload, TaskAction.Step_QXJ_LK, tasklist.fixtureguid, tasklist.ordercode, tasklist.sn, "无程序", tasklist.productid, tasklist.productcode, tasklist.locationid, tasklist.route);
...@@ -425,7 +426,7 @@ namespace Siger.ApiACC.Controllers ...@@ -425,7 +426,7 @@ namespace Siger.ApiACC.Controllers
locationObj.route = nextRoute != null ? nextRoute.name : ""; locationObj.route = nextRoute != null ? nextRoute.name : "";
} }
//工件已出立库 //工件已出立库
locationObj.status = 2; locationObj.status = (int)LocationStatus.Out;
_automationLocation.Update(locationObj); _automationLocation.Update(locationObj);
CreateTask(location.section, TaskActionType.Load, TaskAction.Step_LK_JGZX, location.fixture, location.ordernumber, location.sn, location.pn, location.productId, location.productCode, location.location,location.route); CreateTask(location.section, TaskActionType.Load, TaskAction.Step_LK_JGZX, location.fixture, location.ordernumber, location.sn, location.pn, location.productId, location.productCode, location.location,location.route);
......
...@@ -22,6 +22,7 @@ using Siger.Middlelayer.Common.Configuration; ...@@ -22,6 +22,7 @@ using Siger.Middlelayer.Common.Configuration;
using Siger.Middlelayer.Common.Helpers; using Siger.Middlelayer.Common.Helpers;
using Newtonsoft.Json; using Newtonsoft.Json;
using NPOI.SS.Formula; using NPOI.SS.Formula;
using static Siger.Middlelayer.Share.Enum.ModuleEnum.Automation;
namespace Siger.ApiACC.Controllers namespace Siger.ApiACC.Controllers
{ {
...@@ -488,7 +489,7 @@ namespace Siger.ApiACC.Controllers ...@@ -488,7 +489,7 @@ namespace Siger.ApiACC.Controllers
{ {
throw new BadRequestException(AccEnum.MonitorNotfound); throw new BadRequestException(AccEnum.MonitorNotfound);
} }
//移出 上料位 //检测工序是否配置正确
var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Manual); var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Manual);
...@@ -516,6 +517,7 @@ namespace Siger.ApiACC.Controllers ...@@ -516,6 +517,7 @@ namespace Siger.ApiACC.Controllers
processid = 0, processid = 0,
programnumber = "", programnumber = "",
remark = "手动任务-安装完成", remark = "手动任务-安装完成",
route=monitor.route
}); });
monitor.taskno = taskNo; monitor.taskno = taskNo;
...@@ -680,6 +682,7 @@ namespace Siger.ApiACC.Controllers ...@@ -680,6 +682,7 @@ namespace Siger.ApiACC.Controllers
if (location!=null) if (location!=null)
{ {
location.sn = ""; location.sn = "";
location.status= (int)LocationStatus.Out;
_automationLocation.Update(location); _automationLocation.Update(location);
} }
var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Manual); var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Manual);
......
...@@ -148,5 +148,13 @@ namespace Siger.Middlelayer.Share.Enum.ModuleEnum ...@@ -148,5 +148,13 @@ namespace Siger.Middlelayer.Share.Enum.ModuleEnum
[Description("清洗机->加工中心")] [Description("清洗机->加工中心")]
Step_QXJ_JGZX = 10, Step_QXJ_JGZX = 10,
} }
public enum LocationStatus
{
[Description("在库内")]
In =1,
[Description("不在库内")]
Out =2
}
} }
} }
...@@ -121,7 +121,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -121,7 +121,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{ {
var query = from q in _context.siger_automation_fixture_tools var query = from q in _context.siger_automation_fixture_tools
join l in _context.siger_automation_location on q.guid equals l.fixturetools join l in _context.siger_automation_location on q.guid equals l.fixturetools
where q.projectId ==projectId && q.guid==guid && l.locationid==loactionId where q.projectId == projectId && q.guid == guid && l.locationid == loactionId
&& l.status == 1
select new ResponseProductFixtureInfo select new ResponseProductFixtureInfo
{ {
FixtureGuid=q.guid, FixtureGuid=q.guid,
......
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