|
|
|
|
@ -73,10 +73,17 @@ public class TaskCreateService
|
|
|
|
|
int startBuilding, int startFloor, string startLocation,
|
|
|
|
|
int endBuilding, int endFloor, string endLocation,
|
|
|
|
|
int taskType, int taskCategory,
|
|
|
|
|
string palletBarcode, string materialCode)
|
|
|
|
|
string palletBarcode, string materialCode,
|
|
|
|
|
bool manualPutIn = false, bool manualTakeOut = false)
|
|
|
|
|
{
|
|
|
|
|
var startPoint = PosCode(startBuilding, startFloor, startLocation);
|
|
|
|
|
var endPoint = PosCode(endBuilding, endFloor, endLocation);
|
|
|
|
|
// 手动放入: 起始位置替换为提升机接驳位
|
|
|
|
|
// 手动取出: 目标位置替换为提升机接驳位
|
|
|
|
|
var startPoint = manualPutIn
|
|
|
|
|
? HoistPoint(startBuilding, startFloor)
|
|
|
|
|
: PosCode(startBuilding, startFloor, startLocation);
|
|
|
|
|
var endPoint = manualTakeOut
|
|
|
|
|
? HoistPoint(endBuilding, endFloor)
|
|
|
|
|
: PosCode(endBuilding, endFloor, endLocation);
|
|
|
|
|
|
|
|
|
|
_logger.Info($"创建任务 - {startPoint} ({startBuilding}#_{startFloor}F) → {endPoint} ({endBuilding}#_{endFloor}F)");
|
|
|
|
|
|
|
|
|
|
@ -112,8 +119,12 @@ public class TaskCreateService
|
|
|
|
|
var hoistEntry = HoistPoint(b1, f1);
|
|
|
|
|
var hoistExit = HoistPoint(b2, f2);
|
|
|
|
|
|
|
|
|
|
// 手动放入时已在提升机口,无需 AGV 段
|
|
|
|
|
if (currentPos != hoistEntry)
|
|
|
|
|
{
|
|
|
|
|
details.Add(NewDetail(taskCode, palletBarcode, materialCode,
|
|
|
|
|
taskType, taskCategory, seq++, currentPos, hoistEntry, deviceType: 1));
|
|
|
|
|
}
|
|
|
|
|
details.Add(NewDetail(taskCode, palletBarcode, materialCode,
|
|
|
|
|
taskType, taskCategory, seq++, hoistEntry, hoistExit, deviceType: 2));
|
|
|
|
|
|
|
|
|
|
@ -121,7 +132,7 @@ public class TaskCreateService
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Step 3: 最终 AGV 送达终点(同栋同层时直接一条 AGV)
|
|
|
|
|
// Step 3: 最终 AGV 送达终点(同栋同层时直接一条 AGV;手动取出时终点=提升机口,已到达则跳过)
|
|
|
|
|
if (details.Count == 0 || currentPos != endPoint)
|
|
|
|
|
{
|
|
|
|
|
details.Add(NewDetail(taskCode, palletBarcode, materialCode,
|
|
|
|
|
|