feat: ACS 请求controller模板

This commit is contained in:
2026-08-05 19:59:27 +08:00
parent 9b0da46c0d
commit 9fb6a17551
4 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
package cn.code.nl.module.wms.controller.acs;
import cn.code.nl.framework.common.pojo.CommonResult;
import cn.code.nl.module.wms.controller.acs.vo.AcsApplyInboundReqVO;
import cn.code.nl.module.wms.controller.acs.vo.AcsApplyInboundRespVO;
import cn.code.nl.module.wms.controller.acs.vo.AcsCallTaskReqVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.security.PermitAll;
import jakarta.validation.Valid;
import org.springframework.validation.annotation.Validated;
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.RestController;
import static cn.code.nl.framework.common.pojo.CommonResult.success;
/**
*
* @Author: liyongde
* @Date: 2026/8/5 9:30
*/
@Tag(name = "ACS - 呼叫任务控制类")
@RestController
@RequestMapping("/acs/call")
@Validated
public class CallTaskController {
@PostMapping("/inbound/apply")
@Operation(summary = "请求入库")
@PermitAll
public CommonResult<AcsApplyInboundRespVO> applyInboundTask(@Valid @RequestBody AcsApplyInboundReqVO acsApplyInboundReqVO) {
// todo: 业务待衔接
return success(AcsApplyInboundRespVO.builder().deviceCode(acsApplyInboundReqVO.getDeviceCode()).build());
}
// 返回值待定
@PostMapping("/empty-pallet-stack")
@Operation(summary = "呼叫空托盘垛")
@PermitAll
public CommonResult<Boolean> callEmptyPalletStack(@Valid @RequestBody AcsCallTaskReqVO acsApplyInboundReqVO) {
// todo: 业务待衔接
return success(true);
}
}

View File

@@ -0,0 +1,30 @@
package cn.code.nl.module.wms.controller.acs.vo;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
/**
* acs请求入库任务
* 6-申请空拖盘入库7-申请空木箱入库8-申请退货入库9-申请成品入库
* @Author: liyongde
* @Date: 2026/8/4 9:52
*/
@Data
public class AcsApplyInboundReqVO {
/**
* 类型6-申请空拖盘入库7-申请空木箱入库8-申请退货入库9-申请成品入库
*/
@NotEmpty(message = "入库请求类型不能为空")
private String type;
/**
* 设备号(请求点位)
*/
@NotEmpty(message = "入库请求设备号不能为空")
private String deviceCode;
/**
* 参数,不同设备不同入参
*/
private Object data;
}

View File

@@ -0,0 +1,18 @@
package cn.code.nl.module.wms.controller.acs.vo;
import lombok.Builder;
import lombok.Data;
/**
* 入库响应实体
* @Author: liyongde
* @Date: 2026/8/4 9:56
*/
@Data
@Builder
public class AcsApplyInboundRespVO {
/**
* 设备号
*/
private String deviceCode;
}

View File

@@ -0,0 +1,16 @@
package cn.code.nl.module.wms.controller.acs.vo;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
/**
*
* @Author: liyongde
* @Date: 2026/8/5 9:32
*/
@Data
public class AcsCallTaskReqVO {
@NotEmpty(message = "设备号不能为空")
private String deviceCode;
}