1 changed files with 113 additions and 0 deletions
@ -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<CfgCharvalConfig> 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<CfgCharvalConfig> list = cfgCharvalConfigService.selectCfgCharvalConfigList(cfgCharvalConfig); |
||||||
|
ExcelUtil<CfgCharvalConfig> util = new ExcelUtil<CfgCharvalConfig>(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)); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue