package com.mes.opctask.controller;
|
|
import com.mes.opctask.service.EdgStorageDeviceTaskService;
|
import com.mes.utils.Result;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
|
/**
|
* @Author : zhoush
|
* @Date: 2024/10/24 15:35
|
* @Description:
|
*/
|
@Api(tags = "卧式理片笼任务")
|
@RestController
|
@RequestMapping("edgStorageDeviceTask")
|
public class EdgStorageDeviceController {
|
|
/**
|
* 服务对象
|
*/
|
@Resource
|
private EdgStorageDeviceTaskService edgStorageDeviceTaskService;
|
|
@ApiOperation(value = "重置任务:按照设备id重置任务")
|
@PostMapping("/resetTask")
|
public Result<Boolean> resetTask(Integer deviceId) {
|
Boolean flag = edgStorageDeviceTaskService.resetTask(deviceId);
|
if (flag) {
|
return Result.build(200, "重置成功", flag);
|
} else {
|
return Result.build(200, "无任务,无需重置", flag);
|
}
|
}
|
}
|