package com.whyc.controller;
|
|
import com.whyc.dto.Response;
|
import com.whyc.dto.WmsPalletDto;
|
import com.whyc.pojo.db_wms.Task;
|
import com.whyc.service.WmsService;
|
import io.swagger.annotations.Api;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
@RestController
|
@Api(tags = "WMS接口")
|
@RequestMapping("wms")
|
public class InterfaceWmsController {
|
|
@Autowired
|
private WmsService service;
|
|
/**
|
* 获取所有库位数据
|
* API:/api/Wms_material/get_all
|
* @return
|
*/
|
@GetMapping("getMaterialList")
|
public Response getMaterialList(){
|
|
return service.getMaterialList();
|
}
|
|
/**
|
* 下发任务
|
* API:/api/Wms_pallet/WmsOutTask
|
* See Also: {com.whyc.dto.WmsPalletDto} WmsPalletDto
|
* des Int 是 任务类型 1 =出库、2=测电压、3=活化
|
*/
|
@PostMapping("sendTask")
|
public Response sendTask(@RequestBody WmsPalletDto palletDto){
|
|
return service.sendTask(palletDto);
|
}
|
|
/**
|
* 任务状态上报接口
|
* TODO 待现场确认含义 API名称 上层系统提供
|
*/
|
|
|
/**
|
* 获取所有库位数据
|
* API:/api/wms_location/get_all
|
*/
|
@GetMapping("getLocationList")
|
public Response getLocationList(){
|
|
return service.getLocationList();
|
}
|
|
@GetMapping("getPalletList")
|
public Response getPalletList(){
|
|
return service.getPalletList();
|
}
|
|
/**
|
* 提供给第三方的接口,用于接收任务状态
|
* @param task
|
* @return
|
*/
|
@PostMapping("sendTaskStatus")
|
public Response sendTaskStatus(@RequestBody Task task){
|
return service.sendTaskStatus(task);
|
}
|
|
}
|