| | |
| | | import com.ruoyi.inspectiontask.service.InspectionTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @Api(tags = "巡检任务记录") |
| | | @RequestMapping("/inspectionTask") |
| | | @AllArgsConstructor |
| | | public class InspectionTaskController extends BaseController { |
| | | |
| | | @Autowired |
| | | private InspectionTaskService inspectionTaskService; |
| | | |
| | | /** |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperation("巡检任务表表查询") |
| | | public R<IPage<InspectionTaskDto>> list(Page<InspectionTask> page, InspectionTaskDto inspectionTaskDto) { |
| | | IPage<InspectionTaskDto> list = inspectionTaskService.selectInspectionTaskList(page,inspectionTaskDto); |
| | | IPage<InspectionTaskDto> list = inspectionTaskService.selectInspectionTaskList(page, inspectionTaskDto); |
| | | return R.ok(list); |
| | | } |
| | | |
| | |
| | | @PostMapping("/export") |
| | | @ApiOperation(value = "导出定时任务记录") |
| | | public void export(HttpServletResponse response) { |
| | | Page page = new Page<>(-1,-1); |
| | | Page page = new Page<>(-1, -1); |
| | | InspectionTaskDto timingTask = new InspectionTaskDto(); |
| | | IPage<InspectionTaskDto> list = inspectionTaskService.selectInspectionTaskList(page,timingTask); |
| | | IPage<InspectionTaskDto> list = inspectionTaskService.selectInspectionTaskList(page, timingTask); |
| | | ExcelUtil<InspectionTaskDto> util = new ExcelUtil<>(InspectionTaskDto.class); |
| | | util.exportExcel(response, list.getRecords(), "导出定时任务记录"); |
| | | } |