| | |
| | | import com.ruoyi.device.dto.DeviceMaintenancePlanDto; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlan; |
| | | import com.ruoyi.device.pojo.DeviceMaintenancePlanDetails; |
| | | import com.ruoyi.device.service.DeviceMaintenancePlanDetailsService; |
| | | import com.ruoyi.device.service.DeviceMaintenancePlanService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | public class DeviceMaintenancePlanController { |
| | | @Resource |
| | | private DeviceMaintenancePlanService deviceMaintenancePlanService; |
| | | |
| | | @Resource |
| | | private DeviceMaintenancePlanDetailsService deviceMaintenancePlanDetailsService; |
| | | |
| | | /** |
| | | * 分页查询设备保养计划 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 保养计划年份列表(自动删除没有明细的空年份计划) |
| | | */ |
| | | @Operation(summary = "保养计划年份列表") |
| | | @GetMapping("/getPlanYears") |
| | | public Result<List<String>> getPlanYears() { |
| | | return Result.success(deviceMaintenancePlanService.getMaintenancePlanYears()); |
| | | } |
| | | |
| | | /** |
| | | * 设备保养计划详情列表(含到点标红) |
| | | */ |
| | | @Operation(summary = "设备保养计划详情列表") |
| | |
| | | @Operation(summary = "修改设备保养计划详情") |
| | | @PostMapping("/updateMaintenancePlanDetail") |
| | | public Result updateMaintenancePlanDetail(@RequestBody DeviceMaintenancePlanDetails deviceMaintenancePlanDetails) { |
| | | return Result.success(deviceMaintenancePlanDetailsService.updateById(deviceMaintenancePlanDetails)); |
| | | return Result.success(deviceMaintenancePlanService.updateMaintenancePlanDetail(deviceMaintenancePlanDetails)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Operation(summary = "删除设备保养计划详情") |
| | | @DeleteMapping("/delMaintenancePlanDetail") |
| | | public Result delMaintenancePlanDetail(Integer maintenancePlanDetailId) { |
| | | return Result.success(deviceMaintenancePlanDetailsService.removeById(maintenancePlanDetailId)); |
| | | return Result.success(deviceMaintenancePlanService.removeMaintenancePlanDetail(maintenancePlanDetailId)); |
| | | } |
| | | |
| | | /** |