From 9a224d216652ef2d6ff2e0bd01fba69c86a3f277 Mon Sep 17 00:00:00 2001 From: yanzhaofeige <yanzhaofeige@qq.com> Date: Fri, 11 Oct 2024 11:28:55 +0800 Subject: [PATCH] 基础表单更新 --- cpzidc-admin/src/main/java/com/odcc/cpzidc/web/controller/bis/IdcUseBaseController.java | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 104 insertions(+), 0 deletions(-) diff --git a/cpzidc-admin/src/main/java/com/odcc/cpzidc/web/controller/bis/IdcUseBaseController.java b/cpzidc-admin/src/main/java/com/odcc/cpzidc/web/controller/bis/IdcUseBaseController.java new file mode 100644 index 0000000..8b53e82 --- /dev/null +++ b/cpzidc-admin/src/main/java/com/odcc/cpzidc/web/controller/bis/IdcUseBaseController.java @@ -0,0 +1,104 @@ +package com.odcc.cpzidc.web.controller.bis; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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.odcc.cpzidc.common.annotation.Log; +import com.odcc.cpzidc.common.core.controller.BaseController; +import com.odcc.cpzidc.common.core.domain.AjaxResult; +import com.odcc.cpzidc.common.enums.BusinessType; +import com.odcc.cpzidc.bis.domain.IdcUseBase; +import com.odcc.cpzidc.bis.service.IIdcUseBaseService; +import com.odcc.cpzidc.common.utils.poi.ExcelUtil; +import com.odcc.cpzidc.common.core.page.TableDataInfo; + +/** + * 在用数据中心Controller + * + * @author ruoyi + * @date 2024-10-10 + */ +@RestController +@RequestMapping("/bis/useBase") +public class IdcUseBaseController extends BaseController +{ + @Autowired + private IIdcUseBaseService idcUseBaseService; + + /** + * 查询在用数据中心列表 + */ + @PreAuthorize("@ss.hasPermi('bis:useBase:list')") + @GetMapping("/list") + public TableDataInfo list(IdcUseBase idcUseBase) + { + startPage(); + List<IdcUseBase> list = idcUseBaseService.selectIdcUseBaseList(idcUseBase); + return getDataTable(list); + } + + /** + * 导出在用数据中心列表 + */ + @PreAuthorize("@ss.hasPermi('bis:useBase:export')") + @Log(title = "在用数据中心", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, IdcUseBase idcUseBase) + { + List<IdcUseBase> list = idcUseBaseService.selectIdcUseBaseList(idcUseBase); + ExcelUtil<IdcUseBase> util = new ExcelUtil<IdcUseBase>(IdcUseBase.class); + util.exportExcel(response, list, "在用数据中心数据"); + } + + /** + * 获取在用数据中心详细信息 + */ + @PreAuthorize("@ss.hasPermi('bis:useBase:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(idcUseBaseService.selectIdcUseBaseById(id)); + } + + /** + * 新增在用数据中心 + */ + @PreAuthorize("@ss.hasPermi('bis:useBase:add')") + @Log(title = "在用数据中心", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody IdcUseBase idcUseBase) + { + return toAjax(idcUseBaseService.insertIdcUseBase(idcUseBase)); + } + + /** + * 修改在用数据中心 + */ + @PreAuthorize("@ss.hasPermi('bis:useBase:edit')") + @Log(title = "在用数据中心", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody IdcUseBase idcUseBase) + { + return toAjax(idcUseBaseService.updateIdcUseBase(idcUseBase)); + } + + /** + * 删除在用数据中心 + */ + @PreAuthorize("@ss.hasPermi('bis:useBase:remove')") + @Log(title = "在用数据中心", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(idcUseBaseService.deleteIdcUseBaseByIds(ids)); + } +} -- Gitblit v1.9.3