parent
f56821459a
commit
b51194fc7c
4 changed files with 108 additions and 3 deletions
@ -0,0 +1,50 @@ |
|||||||
|
package org.springblade.desk.logistics.pojo.entity; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
@Data |
||||||
|
@Schema(description = "箱绑定接收") |
||||||
|
public class AGVCallBack { |
||||||
|
/** |
||||||
|
* 请求编号,每个请求都要一个唯一 |
||||||
|
* 编号, 同一个请求重复提交, 使 |
||||||
|
* 用同一编号 |
||||||
|
*/ |
||||||
|
private String reqCode; |
||||||
|
/** |
||||||
|
* 请求时间戳,格式: “yyyy-MM-dd |
||||||
|
* HH:mm:ss” |
||||||
|
*/ |
||||||
|
private String reqTime; |
||||||
|
/** |
||||||
|
当前位置编号 |
||||||
|
任务开始:该位置为任务起点 |
||||||
|
走出储位:该位置为任务起点 |
||||||
|
任务单取消:该位置为工作位编号 |
||||||
|
任务结束:该位置为任务终点 |
||||||
|
取放申请:取放料箱的点 |
||||||
|
*/ |
||||||
|
private String currentPositionCode; |
||||||
|
/** |
||||||
|
方法名, 可使用任务类型做为方法 |
||||||
|
名 |
||||||
|
由 RCS-2000 任务模板配置后并告 |
||||||
|
知上层系统 |
||||||
|
默认使用方式: |
||||||
|
start : 任务开始 |
||||||
|
outbin : 走出储位 |
||||||
|
end : 任务结束 |
||||||
|
cancel : 任务单取消 |
||||||
|
apply:CTU 料箱取放申请 |
||||||
|
*/ |
||||||
|
private String method; |
||||||
|
/** |
||||||
|
AGV 编号(同 agvCode ) |
||||||
|
*/ |
||||||
|
private String robotCode; |
||||||
|
/** |
||||||
|
当前任务单号 |
||||||
|
*/ |
||||||
|
private String taskCode; |
||||||
|
} |
||||||
@ -1,19 +1,48 @@ |
|||||||
package org.springblade.desk.logistics.controller; |
package org.springblade.desk.logistics.controller; |
||||||
|
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||||
import io.swagger.v3.oas.annotations.tags.Tag; |
import io.swagger.v3.oas.annotations.tags.Tag; |
||||||
import lombok.AllArgsConstructor; |
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.desk.logistics.pojo.entity.AGVCallBack; |
||||||
|
import org.springblade.desk.logistics.service.IOrderBoxService; |
||||||
|
import org.springblade.desk.logistics.service.ITaskExecuteRecordService; |
||||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||||
import org.springframework.web.bind.annotation.RequestMapping; |
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
import org.springframework.web.bind.annotation.RestController; |
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
/** |
/** |
||||||
* 订单箱子 控制器 |
* agv小车 控制器 |
||||||
* |
* |
||||||
* @author BladeX |
* @author BladeX |
||||||
* @since 2026-03-03 |
* @since 2026-03-03 |
||||||
*/ |
*/ |
||||||
@RestController |
@RestController |
||||||
@AllArgsConstructor |
@AllArgsConstructor |
||||||
@RequestMapping("/order") |
@RequestMapping("/agv") |
||||||
@Tag(name = "订单箱子", description = "订单箱子称重接口") |
@Tag(name = "agv小车接口", description = "agv小车对接接口") |
||||||
public class AGVDockingController { |
public class AGVDockingController { |
||||||
|
|
||||||
|
private final ITaskExecuteRecordService iTaskExecuteRecordService; |
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/agvCallbackService/agvCallback") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@Operation( |
||||||
|
summary = "agv小车回调接口", |
||||||
|
description = "AGV小车回调接口" |
||||||
|
) |
||||||
|
public R agvCallback(@RequestBody AGVCallBack agvCallBack ){ |
||||||
|
// 1.参数合法性校验
|
||||||
|
if (agvCallBack == null || agvCallBack.getTaskCode().trim().isEmpty()) { |
||||||
|
return R.fail("任务单号不能为空"); |
||||||
|
} |
||||||
|
if (agvCallBack == null || agvCallBack.getMethod() .trim().isEmpty()) { |
||||||
|
return R.fail("AGV小车当前状态不能为空"); |
||||||
|
} |
||||||
|
return iTaskExecuteRecordService.agvCallback(agvCallBack); |
||||||
|
} |
||||||
|
|
||||||
} |
} |
||||||
|
|||||||
Loading…
Reference in new issue