| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.dto.DeviceMaintenanceBatchCompleteDto; |
| | | import com.ruoyi.device.dto.DeviceMaintenanceDto; |
| | | import com.ruoyi.device.pojo.DeviceLedger; |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | |
| | | deviceMaintenanceService.export(response, ids); |
| | | } |
| | | |
| | | @PostMapping("/batchComplete") |
| | | @Operation(summary = "一键保养完成") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult batchComplete(@RequestBody DeviceMaintenanceBatchCompleteDto dto) { |
| | | return deviceMaintenanceService.batchComplete(dto); |
| | | } |
| | | |
| | | @PutMapping("/complete/{id}") |
| | | @Operation(summary = "保养完成") |
| | | public AjaxResult complete(@PathVariable Long id) { |
| | | return deviceMaintenanceService.complete(id); |
| | | } |
| | | |
| | | @PutMapping("/batchComplete") |
| | | @Operation(summary = "一键保养完成") |
| | | public AjaxResult batchComplete(String dateStr) { |
| | | return deviceMaintenanceService.batchComplete(dateStr); |
| | | } |
| | | |
| | | } |