懒羊羊
2024-01-08 49ac5ceb9f6b2e065e5d1c61aad2de63399304e1
提交 | 用户 | 时间
b79f97 1 package com.jcdm.main.sc.stationConf.controller;
H 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.sc.stationConf.domain.ScStationConf;
20 import com.jcdm.main.sc.stationConf.service.IScStationConfService;
21 import com.jcdm.common.utils.poi.ExcelUtil;
22 import com.jcdm.common.core.page.TableDataInfo;
23
24 /**
25  * 工位终端配置Controller
26  * 
27  * @author Yi
28  * @date 2024-01-06
29  */
30 @RestController
31 @RequestMapping("/sc/stationConf")
32 public class ScStationConfController extends BaseController
33 {
34     @Autowired
35     private IScStationConfService scStationConfService;
36
37     /**
38      * 查询工位终端配置列表
39      */
40     @PreAuthorize("@ss.hasPermi('sc:stationConf:list')")
41     @GetMapping("/list")
42     public TableDataInfo list(ScStationConf scStationConf)
43     {
44         startPage();
45         List<ScStationConf> list = scStationConfService.selectScStationConfList(scStationConf);
46         return getDataTable(list);
47     }
48
49     /**
50      * 导出工位终端配置列表
51      */
52     @PreAuthorize("@ss.hasPermi('sc:stationConf:export')")
53     @Log(title = "工位终端配置", businessType = BusinessType.EXPORT)
54     @PostMapping("/export")
55     public void export(HttpServletResponse response, ScStationConf scStationConf)
56     {
57         List<ScStationConf> list = scStationConfService.selectScStationConfList(scStationConf);
58         ExcelUtil<ScStationConf> util = new ExcelUtil<ScStationConf>(ScStationConf.class);
59         util.exportExcel(response, list, "工位终端配置数据");
60     }
61
62     /**
63      * 获取工位终端配置详细信息
64      */
65     @PreAuthorize("@ss.hasPermi('sc:stationConf:query')")
66     @GetMapping(value = "/{id}")
67     public AjaxResult getInfo(@PathVariable("id") Long id)
68     {
69         return success(scStationConfService.selectScStationConfById(id));
70     }
71
72     /**
73      * 新增工位终端配置
74      */
75     @PreAuthorize("@ss.hasPermi('sc:stationConf:add')")
76     @Log(title = "工位终端配置", businessType = BusinessType.INSERT)
77     @PostMapping
78     public AjaxResult add(@RequestBody ScStationConf scStationConf)
79     {
80         return toAjax(scStationConfService.insertScStationConf(scStationConf));
81     }
82
83     /**
84      * 修改工位终端配置
85      */
86     @PreAuthorize("@ss.hasPermi('sc:stationConf:edit')")
87     @Log(title = "工位终端配置", businessType = BusinessType.UPDATE)
88     @PutMapping
89     public AjaxResult edit(@RequestBody ScStationConf scStationConf)
90     {
91         return toAjax(scStationConfService.updateScStationConf(scStationConf));
92     }
93
94     /**
95      * 删除工位终端配置
96      */
97     @PreAuthorize("@ss.hasPermi('sc:stationConf:remove')")
98     @Log(title = "工位终端配置", businessType = BusinessType.DELETE)
99     @DeleteMapping("/{ids}")
100     public AjaxResult remove(@PathVariable Long[] ids)
101     {
102         return toAjax(scStationConfService.deleteScStationConfByIds(ids));
103     }
49ac5c 104
105     /**
106      * 获取工位终端配置详细信息
107      */
108     @GetMapping(value = "/getIpv4")
109     public AjaxResult getIpv4()
110     {
111         return success(scStationConfService.getIpv4());
112     }
113
b79f97 114 }