add:第一版测试版本。
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package org.nl.api.schedule.map.api;
|
||||
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import org.nl.response.WebResponse;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/12/13
|
||||
*/
|
||||
public interface ScheduleMapAPI {
|
||||
|
||||
HttpResponse queryCurrentMapPointInfo();
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.nl.api.schedule.setting.api;
|
||||
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import org.nl.api.schedule.setting.core.ScheduleAPISettingChargeParam;
|
||||
import org.nl.api.schedule.setting.core.ScheduleAPISettingSpeedParam;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/12/8
|
||||
*/
|
||||
public interface ScheduleSettingAPI {
|
||||
|
||||
/**
|
||||
* 设置配送速度
|
||||
* @param scheduleAPISettingSpeedParam
|
||||
* @return HttpResponse
|
||||
*/
|
||||
HttpResponse settingSpeed(ScheduleAPISettingSpeedParam scheduleAPISettingSpeedParam);
|
||||
|
||||
/**
|
||||
* 充电设置
|
||||
* @param scheduleAPISettingChargeParam
|
||||
* @return HttpResponse
|
||||
*/
|
||||
HttpResponse settingCharge(ScheduleAPISettingChargeParam scheduleAPISettingChargeParam);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.nl.api.schedule.setting.core;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/12/8
|
||||
*/
|
||||
@Data
|
||||
public class ScheduleAPISettingChargeParam {
|
||||
|
||||
/**
|
||||
* 强制充电阈值,低于该电量完成当前任务后立刻充电
|
||||
*/
|
||||
private Integer forceChargeThreshold;
|
||||
|
||||
/**
|
||||
* 自由充电阈值,低于该电量空闲时主动充电
|
||||
*/
|
||||
private Integer freeChargeThreshold;
|
||||
|
||||
/**
|
||||
* 可接任务阈值,充电时电量高于该值即可接单
|
||||
*/
|
||||
private Integer usableForTaskThreshold;
|
||||
|
||||
/**
|
||||
* 充电上限,电量高于该值后停止充电
|
||||
*/
|
||||
private Integer chargingUpperLimit;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.nl.api.schedule.setting.core;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/12/8
|
||||
*/
|
||||
@Data
|
||||
public class ScheduleAPISettingSpeedParam {
|
||||
|
||||
/**
|
||||
* 速度,单位m/s
|
||||
*/
|
||||
@NotBlank(message = "速度不能为空")
|
||||
private Integer customSpeed;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package org.nl.api.schedule.task.api;
|
||||
|
||||
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.api.schedule.task.core.ScheduleAPICreateOneClickTaskParam;
|
||||
import org.nl.api.schedule.task.core.ScheduleAPICreateTaskParam;
|
||||
|
||||
/**
|
||||
* 调度任务API
|
||||
*
|
||||
* @author dsh
|
||||
* 2025/12/1
|
||||
*/
|
||||
public interface ScheduleTaskAPI {
|
||||
|
||||
/**
|
||||
* 创建调度任务
|
||||
* @param scheduleAPICreateTaskParam
|
||||
* @return
|
||||
*/
|
||||
HttpResponse createTask(ScheduleAPICreateTaskParam scheduleAPICreateTaskParam);
|
||||
|
||||
/**
|
||||
* 取消调度任务
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
HttpResponse cancelTask(String taskId);
|
||||
|
||||
/**
|
||||
* 根据任务号获取任务信息
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
HttpResponse queryTaskStatusByTaskId(String taskId);
|
||||
|
||||
/**
|
||||
* 暂停调度任务
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
HttpResponse pauseTask(String taskId);
|
||||
|
||||
/**
|
||||
* 恢复调度任务
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
HttpResponse resumeTask(String taskId);
|
||||
|
||||
/**
|
||||
* 生成一键任务
|
||||
* @param scheduleAPICreateOneClickTaskParam
|
||||
* @return
|
||||
*/
|
||||
HttpResponse oneClickOperationTask(ScheduleAPICreateOneClickTaskParam scheduleAPICreateOneClickTaskParam);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.nl.api.schedule.task.core;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/12/13
|
||||
*/
|
||||
@Data
|
||||
public class ScheduleAPICreateOneClickTaskParam {
|
||||
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@NotBlank(message = "调度任务号不能为空")
|
||||
private String task_code;
|
||||
|
||||
/**
|
||||
* 一键任务类型
|
||||
*/
|
||||
@NotBlank(message = "调度一键任务类型不能为空")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 车号
|
||||
*/
|
||||
@NotBlank(message = "车号不能为空")
|
||||
private String vehicle_number;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.nl.api.schedule.task.core;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/12/2
|
||||
*/
|
||||
@Data
|
||||
public class ScheduleAPICreateTaskParam {
|
||||
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
/**
|
||||
* 目标点
|
||||
*/
|
||||
private String destinations;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 任务优先级 (1-10数字越低优先级越高)
|
||||
*/
|
||||
private String priority;
|
||||
|
||||
/**
|
||||
* 指定车号
|
||||
*/
|
||||
private String vehicle_number;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.api.setting.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/12/13
|
||||
*/
|
||||
public interface SettingAPI {
|
||||
|
||||
/**
|
||||
* 根据设置编号查询设置参数是否启用
|
||||
* @return
|
||||
*/
|
||||
JSONObject querySttingParamIsActiveByCode(String setting_code);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.nl.api.task.api;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/12/11
|
||||
*/
|
||||
public interface TaskAPI {
|
||||
|
||||
/**
|
||||
* 根据车号获取当前车俩正在执行的任务
|
||||
* @param vehicleNumber
|
||||
* @return
|
||||
*/
|
||||
Object queryCurrentTaskByVehicleNumber(String vehicleNumber);
|
||||
|
||||
/**
|
||||
* 根据任务号修改任务上报状态和等待时间
|
||||
* @param taskCode
|
||||
* @param newReportStatus
|
||||
* @return
|
||||
*/
|
||||
boolean updateTaskReportStatusByCode(String taskCode,String newReportStatus,String waiting_time);
|
||||
|
||||
/**
|
||||
* 查询当前任务上报状态阶段
|
||||
* @param taskCode
|
||||
* @param vehicleNumber
|
||||
* @return
|
||||
*/
|
||||
String taskOperationConfirm(String taskCode,String vehicleNumber);
|
||||
}
|
||||
Reference in New Issue
Block a user