提交 | 用户 | 时间
|
e57a89
|
1 |
package com.jcdm.main.da.opcuaconfig.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.opcuaconfig.domain.DaOpcuaConfig; |
|
10 |
import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; |
|
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 yyt |
|
22 |
* @date 2024-01-23 |
|
23 |
*/ |
|
24 |
@RestController |
|
25 |
@RequestMapping("/da/opcuaconfig") |
|
26 |
public class DaOpcuaConfigController extends BaseController |
|
27 |
{ |
|
28 |
@Autowired |
|
29 |
private IDaOpcuaConfigService daOpcuaConfigService; |
|
30 |
|
|
31 |
/** |
|
32 |
* 查询交互信号配置列表 |
|
33 |
*/ |
|
34 |
@PreAuthorize("@ss.hasPermi('da:opcuaconfig:list')") |
|
35 |
@GetMapping("/list") |
|
36 |
public TableDataInfo list(DaOpcuaConfig daOpcuaConfig) |
|
37 |
{ |
|
38 |
startPage(); |
|
39 |
List<DaOpcuaConfig> list = daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig); |
|
40 |
return getDataTable(list); |
|
41 |
} |
|
42 |
|
|
43 |
/** |
|
44 |
* 导出交互信号配置列表 |
|
45 |
*/ |
|
46 |
@PreAuthorize("@ss.hasPermi('da:opcuaconfig:export')") |
|
47 |
@Log(title = "交互信号配置", businessType = BusinessType.EXPORT) |
|
48 |
@PostMapping("/export") |
|
49 |
public void export(HttpServletResponse response, DaOpcuaConfig daOpcuaConfig) |
|
50 |
{ |
|
51 |
List<DaOpcuaConfig> list = daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig); |
|
52 |
ExcelUtil<DaOpcuaConfig> util = new ExcelUtil<DaOpcuaConfig>(DaOpcuaConfig.class); |
|
53 |
util.exportExcel(response, list, "交互信号配置数据"); |
|
54 |
} |
|
55 |
|
|
56 |
/** |
|
57 |
* 获取交互信号配置详细信息 |
|
58 |
*/ |
|
59 |
@PreAuthorize("@ss.hasPermi('da:opcuaconfig:query')") |
|
60 |
@GetMapping(value = "/{id}") |
|
61 |
public AjaxResult getInfo(@PathVariable("id") Long id) |
|
62 |
{ |
|
63 |
return success(daOpcuaConfigService.selectDaOpcuaConfigById(id)); |
|
64 |
} |
|
65 |
|
|
66 |
/** |
|
67 |
* 新增交互信号配置 |
|
68 |
*/ |
|
69 |
@PreAuthorize("@ss.hasPermi('da:opcuaconfig:add')") |
|
70 |
@Log(title = "交互信号配置", businessType = BusinessType.INSERT) |
|
71 |
@PostMapping |
|
72 |
public AjaxResult add(@RequestBody DaOpcuaConfig daOpcuaConfig) |
|
73 |
{ |
|
74 |
return toAjax(daOpcuaConfigService.insertDaOpcuaConfig(daOpcuaConfig)); |
|
75 |
} |
|
76 |
|
|
77 |
/** |
|
78 |
* 修改交互信号配置 |
|
79 |
*/ |
|
80 |
@PreAuthorize("@ss.hasPermi('da:opcuaconfig:edit')") |
|
81 |
@Log(title = "交互信号配置", businessType = BusinessType.UPDATE) |
|
82 |
@PutMapping |
|
83 |
public AjaxResult edit(@RequestBody DaOpcuaConfig daOpcuaConfig) |
|
84 |
{ |
|
85 |
return toAjax(daOpcuaConfigService.updateDaOpcuaConfig(daOpcuaConfig)); |
|
86 |
} |
|
87 |
|
|
88 |
/** |
|
89 |
* 删除交互信号配置 |
|
90 |
*/ |
|
91 |
@PreAuthorize("@ss.hasPermi('da:opcuaconfig:remove')") |
|
92 |
@Log(title = "交互信号配置", businessType = BusinessType.DELETE) |
|
93 |
@DeleteMapping("/{ids}") |
|
94 |
public AjaxResult remove(@PathVariable Long[] ids) |
|
95 |
{ |
|
96 |
return toAjax(daOpcuaConfigService.deleteDaOpcuaConfigByIds(ids)); |
|
97 |
} |
|
98 |
} |