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