cl
2024-02-28 26c51e363815011b09411ae74eb8c5f9d2ea8404
提交 | 用户 | 时间
e57a89 1 package com.jcdm.main.da.collectionParamConf.controller;
2
3 import com.jcdm.common.annotation.Log;
4 import com.jcdm.common.core.controller.BaseController;
5 import com.jcdm.common.core.domain.AjaxResult;
6 import com.jcdm.common.core.page.TableDataInfo;
7 import com.jcdm.common.enums.BusinessType;
8 import com.jcdm.common.utils.poi.ExcelUtil;
9 import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf;
10 import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService;
11 import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.security.access.prepost.PreAuthorize;
13 import org.springframework.web.bind.annotation.*;
14
15 import javax.servlet.http.HttpServletResponse;
16 import java.util.List;
17
18 /**
19  * 采集参数配置Controller
20  * 
21  * @author ruimin
22  * @date 2023-12-25
23  */
24 @RestController
25 @RequestMapping("/da/collectionParamConf")
26 public class DaCollectionParamConfController extends BaseController
27 {
28     @Autowired
29     private IDaCollectionParamConfService daCollectionParamConfService;
30
31     /**
32      * 查询采集参数配置列表
33      */
34     @PreAuthorize("@ss.hasPermi('da:collectionParamConf:list')")
35     @GetMapping("/list")
36     public TableDataInfo list(DaCollectionParamConf daCollectionParamConf)
37     {
38         startPage();
39         List<DaCollectionParamConf> list = daCollectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf);
40         return getDataTable(list);
41     }
42
43     /**
44      * 导出采集参数配置列表
45      */
46     @PreAuthorize("@ss.hasPermi('da:collectionParamConf:export')")
47     @Log(title = "采集参数配置", businessType = BusinessType.EXPORT)
48     @PostMapping("/export")
49     public void export(HttpServletResponse response, DaCollectionParamConf daCollectionParamConf)
50     {
51         List<DaCollectionParamConf> list = daCollectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf);
52         ExcelUtil<DaCollectionParamConf> util = new ExcelUtil<DaCollectionParamConf>(DaCollectionParamConf.class);
53         util.exportExcel(response, list, "采集参数配置数据");
54     }
55
56     /**
57      * 获取采集参数配置详细信息
58      */
59     @PreAuthorize("@ss.hasPermi('da:collectionParamConf:query')")
60     @GetMapping(value = "/{id}")
61     public AjaxResult getInfo(@PathVariable("id") Long id)
62     {
63         return success(daCollectionParamConfService.selectDaCollectionParamConfById(id));
64     }
65
66     /**
67      * 新增采集参数配置
68      */
69     @PreAuthorize("@ss.hasPermi('da:collectionParamConf:add')")
70     @Log(title = "采集参数配置", businessType = BusinessType.INSERT)
71     @PostMapping
72     public AjaxResult add(@RequestBody DaCollectionParamConf daCollectionParamConf)
73     {
74         return toAjax(daCollectionParamConfService.insertDaCollectionParamConf(daCollectionParamConf));
75     }
76
77     /**
78      * 修改采集参数配置
79      */
80     @PreAuthorize("@ss.hasPermi('da:collectionParamConf:edit')")
81     @Log(title = "采集参数配置", businessType = BusinessType.UPDATE)
82     @PutMapping
83     public AjaxResult edit(@RequestBody DaCollectionParamConf daCollectionParamConf)
84     {
85         return toAjax(daCollectionParamConfService.updateDaCollectionParamConf(daCollectionParamConf));
86     }
87
88     /**
89      * 删除采集参数配置
90      */
91     @PreAuthorize("@ss.hasPermi('da:collectionParamConf:remove')")
92     @Log(title = "采集参数配置", businessType = BusinessType.DELETE)
93     @DeleteMapping("/{ids}")
94     public AjaxResult remove(@PathVariable Long[] ids)
95     {
96         return toAjax(daCollectionParamConfService.deleteDaCollectionParamConfByIds(ids));
97     }
98 }