|
|
|
|
@ -85,6 +85,8 @@ public class TaskCreateService
|
|
|
|
|
? HoistPoint(endBuilding, endFloor)
|
|
|
|
|
: PosCode(endBuilding, endFloor, endLocation);
|
|
|
|
|
|
|
|
|
|
var executionMode = manualPutIn ? 1 : 0;
|
|
|
|
|
|
|
|
|
|
_logger.Info($"创建任务 - {startPoint} ({startBuilding}#_{startFloor}F) → {endPoint} ({endBuilding}#_{endFloor}F)");
|
|
|
|
|
|
|
|
|
|
// Step 1: BFS 找最短路径(节点序列)
|
|
|
|
|
@ -109,7 +111,7 @@ public class TaskCreateService
|
|
|
|
|
{
|
|
|
|
|
// 13↔14: 廊桥交接 — 13# AGV 送到廊桥,等待 14# AGV
|
|
|
|
|
details.Add(NewDetail(taskCode, palletBarcode, materialCode,
|
|
|
|
|
taskType, taskCategory, seq++, currentPos, "BRIDGE_13_14", deviceType: 1));
|
|
|
|
|
taskType, taskCategory, seq++, currentPos, "BRIDGE_13_14", deviceType: 1, executionMode));
|
|
|
|
|
currentPos = "BRIDGE_13_14";
|
|
|
|
|
}
|
|
|
|
|
// 14↔15: 14# AGV 可直接驶入 15#,不生成过渡段,由下一步直达
|
|
|
|
|
@ -123,10 +125,10 @@ public class TaskCreateService
|
|
|
|
|
if (currentPos != hoistEntry)
|
|
|
|
|
{
|
|
|
|
|
details.Add(NewDetail(taskCode, palletBarcode, materialCode,
|
|
|
|
|
taskType, taskCategory, seq++, currentPos, hoistEntry, deviceType: 1));
|
|
|
|
|
taskType, taskCategory, seq++, currentPos, hoistEntry, deviceType: 1, executionMode));
|
|
|
|
|
}
|
|
|
|
|
details.Add(NewDetail(taskCode, palletBarcode, materialCode,
|
|
|
|
|
taskType, taskCategory, seq++, hoistEntry, hoistExit, deviceType: 2));
|
|
|
|
|
taskType, taskCategory, seq++, hoistEntry, hoistExit, deviceType: 2, executionMode));
|
|
|
|
|
|
|
|
|
|
currentPos = hoistExit;
|
|
|
|
|
}
|
|
|
|
|
@ -136,7 +138,7 @@ public class TaskCreateService
|
|
|
|
|
if (details.Count == 0 || currentPos != endPoint)
|
|
|
|
|
{
|
|
|
|
|
details.Add(NewDetail(taskCode, palletBarcode, materialCode,
|
|
|
|
|
taskType, taskCategory, seq, currentPos, endPoint, deviceType: 1));
|
|
|
|
|
taskType, taskCategory, seq, currentPos, endPoint, deviceType: 1, executionMode));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_logger.Info($"生成 {details.Count} 条明细");
|
|
|
|
|
@ -153,6 +155,7 @@ public class TaskCreateService
|
|
|
|
|
materialCode = materialCode,
|
|
|
|
|
taskSteps = details.Count,
|
|
|
|
|
taskDetails = details,
|
|
|
|
|
executionMode = executionMode,
|
|
|
|
|
isFlag = 1
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
@ -220,7 +223,7 @@ public class TaskCreateService
|
|
|
|
|
private static LiveTaskDetail NewDetail(
|
|
|
|
|
string taskCode, string palletBarcode, string materialCode,
|
|
|
|
|
int taskType, int taskCategory, int seq,
|
|
|
|
|
string startPoint, string endPoint, int deviceType) =>
|
|
|
|
|
string startPoint, string endPoint, int deviceType, int executionMode) =>
|
|
|
|
|
new()
|
|
|
|
|
{
|
|
|
|
|
taskCode = taskCode,
|
|
|
|
|
@ -230,6 +233,7 @@ public class TaskCreateService
|
|
|
|
|
startPoint = startPoint,
|
|
|
|
|
endPoint = endPoint,
|
|
|
|
|
deviceType = deviceType,
|
|
|
|
|
executionMode = executionMode,
|
|
|
|
|
taskType = taskType,
|
|
|
|
|
taskCategory = taskCategory,
|
|
|
|
|
taskStatus = 1,
|
|
|
|
|
|