package com.ruoyi.device.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.device.pojo.DeviceMaintenance; import com.ruoyi.device.pojo.MaintenanceTask; import com.ruoyi.device.service.MaintenanceTaskService; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * @author :yys * @date : 2025/12/22 14:58 */ @Api(tags = "设备保养定时任务管理") @RestController @RequestMapping("/deviceMaintenanceTask") public class MaintenanceTaskController extends BaseController { @Autowired private MaintenanceTaskService maintenanceTaskService; @GetMapping("/listPage") @ApiOperation(value = "设备保养定时任务列表") public AjaxResult listPage(Page page, MaintenanceTask maintenanceTask) { return maintenanceTaskService.listPage(page,maintenanceTask); } @PostMapping("/add") @ApiOperation(value = "添加设备保养定时任务") @Log(title = "设备保养定时任务", businessType = BusinessType.INSERT) public AjaxResult add(@RequestBody MaintenanceTask maintenanceTask) { return maintenanceTaskService.add(maintenanceTask); } @PostMapping("/update") @ApiOperation(value = "修改设备保养定时任务") @Log(title = "设备保养定时任务", businessType = BusinessType.UPDATE) public AjaxResult update(@RequestBody MaintenanceTask maintenanceTask) { return maintenanceTaskService.updateByMaintenanceTaskId(maintenanceTask); } @DeleteMapping("/delete") @ApiOperation(value = "删除设备保养定时任务") @Log(title = "设备保养定时任务", businessType = BusinessType.DELETE) public AjaxResult delete(@RequestBody List ids) { return maintenanceTaskService.delete(ids); } }