agv调整

This commit is contained in:
qianhao.xu
2024-05-14 15:41:42 +08:00
parent 0e10169a87
commit 1f8d860379
4 changed files with 9 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ namespace ZR.Service.mes.mm.IService
string[] Getfabgopoints();
string AGV_schedule(string start_point, string end_point);
string AGV_schedule(string start_point, string end_point,string agvCode);
string EmergencyStopAgv(string reqCode);
int FinishBatchingTask(string start_point, string end_point, string taskId);

View File

@@ -267,7 +267,7 @@ namespace ZR.Service.mes.mm
/// <param name="start_point"></param>
/// <param name="end_point"></param>
/// <returns></returns>
public string AGV_schedule(string start_point, string end_point)
public string AGV_schedule(string start_point, string end_point,string agvCode= "1743 ")
{
// Context.Updateable<MmAgvLocation>().Where(it => it.Coordinate == start_point).SetColumns(it => it.Status == 0).ExecuteCommand();
// Context.Updateable<MmAgvLocation>().Where(it => it.Coordinate == end_point).SetColumns(it => it.Status == 1).ExecuteCommand();
@@ -277,12 +277,14 @@ namespace ZR.Service.mes.mm
AGVtask_third task = new AGVtask_third();
task.reqCode = SnowFlakeSingle.Instance.NextId().ToString();
task.taskTyp = "F01";
task.agvCode = agvCode;
// MmAgvLocation start_object = Context.Queryable<MmAgvLocation>().Where(it => it.Coordinate == start_point).First();
// MmAgvLocation end_object = Context.Queryable<MmAgvLocation>().Where(it => it.Coordinate == end_point).First();
//判断是否跨楼层
if (end_point == "R1" || start_point == "R1")
{
task.taskTyp = "KLC";
}
task.positionCodePath = new List<AGV_location_third>