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