You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
package com.galaxis.rcs;
|
|
|
|
import com.galaxis.rcs.common.entity.AddTaskRequest;
|
|
import com.galaxis.rcs.common.entity.AddTaskResult;
|
|
import com.galaxis.rcs.task.TaskService;
|
|
import com.yvan.logisticsModel.LogisticsRuntime;
|
|
import com.yvan.logisticsModel.LogisticsRuntimeService;
|
|
|
|
/**
|
|
* RCS 对外API调用类
|
|
*/
|
|
public class RCS {
|
|
|
|
static final LogisticsRuntimeService logisticsRuntimeService = new LogisticsRuntimeService();
|
|
|
|
/**
|
|
* 添加任务, 示例
|
|
* <pre>
|
|
* {
|
|
* type: 'carry', // 任务类型
|
|
* agv: 'cl2', // 指定车辆
|
|
* lpn: 'pallet1124', // 托盘ID, 用于校验
|
|
* from: '27', // 起始点位
|
|
* priority: 1, // 优先级
|
|
* from: {
|
|
* item: '27', bay: 0, level: 1, cell: 0 // 起始点位的详细信息
|
|
* },
|
|
* to:{
|
|
* item: '20'
|
|
* }
|
|
* }
|
|
* </pre>
|
|
*/
|
|
public static AddTaskResult addTask(String envCode, AddTaskRequest request) {
|
|
AddTaskResult result = new AddTaskResult();
|
|
|
|
LogisticsRuntime logisticsRuntime = logisticsRuntimeService.findByEnvCode(envCode);
|
|
String bizTaskId = logisticsRuntime.taskService.addBizTask(request);
|
|
result.bizTaskId = bizTaskId;
|
|
|
|
return result;
|
|
}
|
|
|
|
|
|
}
|
|
|