zxl
4 天以前 c83101eb62f5d4906b9c01ceea6b21a37f9e84d8
ycl-server/src/main/java/com/ycl/platform/controller/ReportController.java
@@ -8,12 +8,14 @@
import com.ycl.system.Result;
import com.ycl.system.domain.group.Add;
import com.ycl.system.domain.group.Update;
import com.ycl.utils.StringUtils;
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 lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -26,6 +28,7 @@
 * @author xp
 * @since 2024-03-19
 */
@Slf4j
@Validated
@RequiredArgsConstructor
@Api(value = "报备", tags = "报备管理")
@@ -124,7 +127,19 @@
    public void export(HttpServletResponse response, ReportQuery query)
    {
        List<ReportVO> list = reportService.export(query);
        for (ReportVO reportVO : list){
            if(StringUtils.isBlank(reportVO.getReportContent()) ||"null".equals(reportVO.getReportContent()) ){
                reportVO.setReportContent("暂无");
            }
        }
        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);
    }
}