| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.pojo.MaintenanceTask; |
| | | import com.ruoyi.device.service.MaintenanceItemService; |
| | | 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.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | 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 io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | 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 |
| | | */ |
| | | @Tag(name = "设备保养定时任务管理") |
| | | @RestController |
| | | @RequestMapping("/deviceMaintenanceTask") |
| | | @RequiredArgsConstructor |
| | | @AllArgsConstructor |
| | | public class MaintenanceTaskController extends BaseController { |
| | | |
| | | private final MaintenanceTaskService maintenanceTaskService; |
| | | private final MaintenanceItemService maintenanceItemService; |
| | | |
| | | private MaintenanceTaskService maintenanceTaskService; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "设备保养定时任务列表") |
| | | public AjaxResult listPage(Page page, MaintenanceTask maintenanceTask) { |
| | | return maintenanceTaskService.listPage(page, maintenanceTask); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/add") |
| | | @Operation(summary = "添加设备保养定时任务") |
| | |
| | | return maintenanceTaskService.delete(ids); |
| | | } |
| | | |
| | | @GetMapping("/items") |
| | | @Operation(summary = "启用的设备保养项目") |
| | | public AjaxResult items() { |
| | | return AjaxResult.success(maintenanceItemService.listActive()); |
| | | } |
| | | |
| | | } |