| | |
| | | package com.mes.storagetask.controller;
|
| | |
|
| | | import com.mes.shelfrack.entity.request.RawUsageAndShelfRack;
|
| | | import com.mes.storagetask.entity.request.StorageTaskRequest;
|
| | | import com.mes.utils.Result;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | |
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/findTasks")
|
| | | public Result findLatestTasks() {
|
| | | List<Map<String, Object>> result = storageTaskService.Tasks();
|
| | | List<StorageTaskRequest> result = storageTaskService.Tasks();
|
| | | return Result.success(result);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | @ApiOperation(value = "任务操作", notes = "任务操作")
|
| | | @PostMapping("/taskUpdate")
|
| | | public Result taskUpdate(@RequestBody Map<String, Object> storageTaskMap) {
|
| | |
|
| | | StorageTask task = new StorageTask();
|
| | | task.setType((String) storageTaskMap.get("Type")); // 假设Type是存储在Map中的一个键
|
| | | task.setId((int) storageTaskMap.get("id"));
|
| | | storageTaskService.taskUpdate(task);
|
| | | return Result.success();
|
| | | }
|
| | |
|
| | |
|
| | | } |