From f8f28a9d32113a1c95c8cdc283b8e2e678dfe120 Mon Sep 17 00:00:00 2001 From: wangwei Date: Mon, 10 Mar 2025 17:37:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=8F=E8=AE=AE=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=EF=BC=8C=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dhc/cfg/CfgCharvalConfigController.java | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/dhc/cfg/CfgCharvalConfigController.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/dhc/cfg/CfgCharvalConfigController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/dhc/cfg/CfgCharvalConfigController.java new file mode 100644 index 0000000..4b8c61d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/dhc/cfg/CfgCharvalConfigController.java @@ -0,0 +1,113 @@ +package com.ruoyi.web.controller.dhc.cfg; + +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.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.dhc.domain.CfgCharvalConfig; +import com.ruoyi.dhc.service.ICfgCharvalConfigService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +/** + * 黑电协议基础数据(特性值)Controller + * + * @author ruoyi + * @date 2025-03-10 + */ +@Api(tags = "黑电协议基础数据(特性值)管理") +@RestController +@RequestMapping("/dhc/cfgCharvalConfig") +public class CfgCharvalConfigController extends BaseController +{ + @Autowired + private ICfgCharvalConfigService cfgCharvalConfigService; + + /** + * 查询黑电协议基础数据(特性值)列表 + */ + @ApiOperation("查询黑电协议基础数据(特性值)列表") + @PreAuthorize("@ss.hasPermi('dhc:config:list')") + @GetMapping("/list") + public TableDataInfo list(CfgCharvalConfig cfgCharvalConfig) + { + startPage(); + List list = cfgCharvalConfigService.selectCfgCharvalConfigList(cfgCharvalConfig); + return getDataTable(list); + } + + /** + * 导出黑电协议基础数据(特性值)列表 + */ + @ApiOperation("导出黑电协议基础数据(特性值)列表") + @PreAuthorize("@ss.hasPermi('dhc:config:export')") + @Log(title = "黑电协议基础数据(特性值)", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CfgCharvalConfig cfgCharvalConfig) + { + List list = cfgCharvalConfigService.selectCfgCharvalConfigList(cfgCharvalConfig); + ExcelUtil util = new ExcelUtil(CfgCharvalConfig.class); + util.exportExcel(response, list, "黑电协议基础数据(特性值)数据"); + } + + /** + * 获取黑电协议基础数据(特性值)详细信息 + */ + @ApiOperation("获取黑电协议基础数据(特性值)详细信息") + @PreAuthorize("@ss.hasPermi('dhc:config:query')") + @GetMapping(value = "/{charvalId}") + public AjaxResult getInfo(@PathVariable("charvalId") Long charvalId) + { + return success(cfgCharvalConfigService.selectCfgCharvalConfigByCharvalId(charvalId)); + } + + /** + * 新增黑电协议基础数据(特性值) + */ + @ApiOperation("新增黑电协议基础数据(特性值)") + @PreAuthorize("@ss.hasPermi('dhc:config:add')") + @Log(title = "黑电协议基础数据(特性值)", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody CfgCharvalConfig cfgCharvalConfig) + { + return toAjax(cfgCharvalConfigService.insertCfgCharvalConfig(cfgCharvalConfig)); + } + + /** + * 修改黑电协议基础数据(特性值) + */ + @ApiOperation("修改黑电协议基础数据(特性值)") + @PreAuthorize("@ss.hasPermi('dhc:config:edit')") + @Log(title = "黑电协议基础数据(特性值)", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody CfgCharvalConfig cfgCharvalConfig) + { + return toAjax(cfgCharvalConfigService.updateCfgCharvalConfig(cfgCharvalConfig)); + } + + /** + * 删除黑电协议基础数据(特性值) + */ + @ApiOperation("删除黑电协议基础数据(特性值)") + @PreAuthorize("@ss.hasPermi('dhc:config:remove')") + @Log(title = "黑电协议基础数据(特性值)", businessType = BusinessType.DELETE) + @DeleteMapping("/{charvalIds}") + public AjaxResult remove(@PathVariable Long[] charvalIds) + { + return toAjax(cfgCharvalConfigService.deleteCfgCharvalConfigByCharvalIds(charvalIds)); + } +}