| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.platform.domain.entity.Report; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.vo.ReportVO; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.platform.service.ReportService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.form.ReportAuditingForm; |
| | | import com.ycl.platform.domain.form.ReportForm; |
| | | import com.ycl.platform.domain.query.ReportQuery; |
| | | import com.ycl.platform.domain.vo.ReportVO; |
| | | import com.ycl.platform.service.ReportService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 报备 前端控制器 |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:report:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) ReportForm form) { |
| | | return reportService.add(form); |
| | | } |
| | | |
| | | @PostMapping("/import") |
| | | @ApiOperation(value = "导入", notes = "导入") |
| | | @PreAuthorize("@ss.hasPermi('system:report:add')") |
| | | public Result importData(ReportForm form) { |
| | | return reportService.importData(form); |
| | | } |
| | | |
| | | @GetMapping("/getTogether/{pid}") |
| | | @ApiOperation(value = "获取同一批次的报备", notes = "获取同一批次的报备") |
| | | public Result getTogether(@PathVariable("pid") String pid) { |
| | | return reportService.getTogether(pid); |
| | | } |
| | | |
| | | @PostMapping("/importTemplate") |
| | | @ApiOperation(value = "导入模板", notes = "导入模板") |
| | | @PreAuthorize("@ss.hasPermi('system:report:add')") |
| | | public void importTemplate(HttpServletResponse response) { |
| | | reportService.importTemplate(response); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | return reportService.all(); |
| | | } |
| | | |
| | | @GetMapping("/auditing/record/{id}") |
| | | @ApiOperation(value = "审核记录", notes = "审核记录") |
| | | @PreAuthorize("@ss.hasPermi('system:report:record')") |
| | | public Result auditingRecord(@PathVariable("id") Integer id) { |
| | | return reportService.auditingRecord(id); |
| | | } |
| | | |
| | | @PostMapping("/auditing") |
| | | @ApiOperation(value = "审核", notes = "审核") |
| | | @PreAuthorize("@ss.hasPermi('system:report:auditing')") |
| | | public Result auditing(@RequestBody @Validated ReportAuditingForm form) { |
| | | return reportService.auditing(form); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | @ApiOperation(value = "导出", notes = "导出") |
| | | @PreAuthorize("@ss.hasPermi('system:report:export')") |
| | |
| | | ExcelUtil<ReportVO> util = new ExcelUtil<>(ReportVO.class); |
| | | util.exportExcel(response, list, "运维单位"); |
| | | } |
| | | |
| | | @GetMapping("/list/{gb}") |
| | | @ApiOperation(value = "根据国标码查报备", notes = "根据国标码查报备") |
| | | public Result getListByGb(@PathVariable("gb") String gb) |
| | | { |
| | | return reportService.getListByGb(gb); |
| | | } |
| | | } |