package com.jjt.biz.controller; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.jjt.common.annotation.Log; import com.jjt.common.core.controller.BaseController; import com.jjt.common.core.domain.AjaxResult; import com.jjt.common.enums.BusinessType; import com.jjt.biz.domain.BizInspection; import com.jjt.biz.service.IBizInspectionService; import com.jjt.common.utils.poi.ExcelUtil; import com.jjt.common.core.page.TableDataInfo; /** * 业务模型健康度巡检Controller * * @author jjt * @date 2024-08-26 */ @Api(tags="业务模型健康度巡检") @RestController @RequestMapping("/hl/inspection") public class BizInspectionController extends BaseController { @Resource private IBizInspectionService bizInspectionService; /** * 查询业务模型健康度巡检列表 */ @ApiOperation("查询业务模型健康度巡检列表") @PreAuthorize("@ss.hasPermi('hl:inspection:list')") @GetMapping("/list") public TableDataInfo list(BizInspection bizInspection) { startPage(); List list = bizInspectionService.selectBizInspectionList(bizInspection); return getDataTable(list); } /** * 导出业务模型健康度巡检列表 */ @ApiOperation("导出业务模型健康度巡检列表") @PreAuthorize("@ss.hasPermi('hl:inspection:export')") @Log(title = "业务模型健康度巡检", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, BizInspection bizInspection) { List list = bizInspectionService.selectBizInspectionList(bizInspection); ExcelUtil util = new ExcelUtil(BizInspection.class); util.exportExcel(response, list, "业务模型健康度巡检数据"); } /** * 获取业务模型健康度巡检详细信息 */ @ApiOperation("获取业务模型健康度巡检详细信息") @PreAuthorize("@ss.hasPermi('hl:inspection:query')") @GetMapping(value = "/{inspectionId}") public AjaxResult getInfo(@PathVariable("inspectionId") Long inspectionId) { return success(bizInspectionService.selectBizInspectionByInspectionId(inspectionId)); } /** * 新增业务模型健康度巡检 */ @ApiOperation("新增业务模型健康度巡检") @PreAuthorize("@ss.hasPermi('hl:inspection:add')") @Log(title = "业务模型健康度巡检", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody BizInspection bizInspection) { return toAjax(bizInspectionService.insertBizInspection(bizInspection)); } /** * 修改业务模型健康度巡检 */ @ApiOperation("修改业务模型健康度巡检") @PreAuthorize("@ss.hasPermi('hl:inspection:edit')") @Log(title = "业务模型健康度巡检", businessType = BusinessType.UPDATE) @PostMapping("/edit") public AjaxResult edit(@RequestBody BizInspection bizInspection) { return toAjax(bizInspectionService.updateBizInspection(bizInspection)); } /** * 删除业务模型健康度巡检 */ @ApiOperation("删除业务模型健康度巡检") @PreAuthorize("@ss.hasPermi('hl:inspection:remove')") @Log(title = "业务模型健康度巡检", businessType = BusinessType.DELETE) @GetMapping("/del/{inspectionIds}") public AjaxResult remove(@PathVariable Long[] inspectionIds) { return toAjax(bizInspectionService.deleteBizInspectionByInspectionIds(inspectionIds)); } }