提交 | 用户 | 时间
|
fd2207
|
1 |
package com.jcdm.main.da.paramCollection.controller; |
懒 |
2 |
|
|
3 |
import java.util.List; |
|
4 |
import javax.servlet.http.HttpServletResponse; |
|
5 |
|
|
6 |
import com.jcdm.common.utils.DateUtils; |
|
7 |
import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
|
8 |
import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
|
9 |
import org.springframework.security.access.prepost.PreAuthorize; |
|
10 |
import org.springframework.beans.factory.annotation.Autowired; |
|
11 |
import org.springframework.web.bind.annotation.GetMapping; |
|
12 |
import org.springframework.web.bind.annotation.PostMapping; |
|
13 |
import org.springframework.web.bind.annotation.PutMapping; |
|
14 |
import org.springframework.web.bind.annotation.DeleteMapping; |
|
15 |
import org.springframework.web.bind.annotation.PathVariable; |
|
16 |
import org.springframework.web.bind.annotation.RequestBody; |
|
17 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
18 |
import org.springframework.web.bind.annotation.RestController; |
|
19 |
import com.jcdm.common.annotation.Log; |
|
20 |
import com.jcdm.common.core.controller.BaseController; |
|
21 |
import com.jcdm.common.core.domain.AjaxResult; |
|
22 |
import com.jcdm.common.enums.BusinessType; |
|
23 |
import com.jcdm.common.utils.poi.ExcelUtil; |
|
24 |
import com.jcdm.common.core.page.TableDataInfo; |
|
25 |
|
|
26 |
/** |
|
27 |
* 设备产品过程参数采集Controller |
|
28 |
* |
|
29 |
* @author yyt |
|
30 |
* @date 2023-12-13 |
|
31 |
*/ |
|
32 |
@RestController |
|
33 |
@RequestMapping("/main/paramCollection") |
|
34 |
public class DaParamCollectionController extends BaseController |
|
35 |
{ |
|
36 |
@Autowired |
|
37 |
private IDaParamCollectionService daParamCollectionService; |
|
38 |
|
|
39 |
/** |
|
40 |
* 查询设备产品过程参数采集列表 |
|
41 |
*/ |
|
42 |
@PreAuthorize("@ss.hasPermi('main:paramCollection:list')") |
|
43 |
@GetMapping("/list") |
|
44 |
public TableDataInfo list(DaParamCollection daParamCollection) |
|
45 |
{ |
|
46 |
startPage(); |
|
47 |
List<DaParamCollection> list = daParamCollectionService.selectDaParamCollectionList(daParamCollection); |
|
48 |
return getDataTable(list); |
|
49 |
} |
|
50 |
|
|
51 |
/** |
|
52 |
* 导出设备产品过程参数采集列表 |
|
53 |
*/ |
|
54 |
@PreAuthorize("@ss.hasPermi('main:paramCollection:export')") |
|
55 |
@Log(title = "设备产品过程参数采集", businessType = BusinessType.EXPORT) |
|
56 |
@PostMapping("/export") |
|
57 |
public void export(HttpServletResponse response, DaParamCollection daParamCollection) |
|
58 |
{ |
|
59 |
List<DaParamCollection> list = daParamCollectionService.selectDaParamCollectionList(daParamCollection); |
|
60 |
ExcelUtil<DaParamCollection> util = new ExcelUtil<DaParamCollection>(DaParamCollection.class); |
|
61 |
util.exportExcel(response, list, "设备产品过程参数采集数据"); |
|
62 |
} |
|
63 |
|
|
64 |
/** |
|
65 |
* 获取设备产品过程参数采集详细信息 |
|
66 |
*/ |
|
67 |
@PreAuthorize("@ss.hasPermi('main:paramCollection:query')") |
|
68 |
@GetMapping(value = "/{id}") |
|
69 |
public AjaxResult getInfo(@PathVariable("id") Long id) |
|
70 |
{ |
|
71 |
return success(daParamCollectionService.selectDaParamCollectionById(id)); |
|
72 |
} |
|
73 |
|
|
74 |
/** |
|
75 |
* 新增设备产品过程参数采集 |
|
76 |
*/ |
|
77 |
@PreAuthorize("@ss.hasPermi('main:paramCollection:add')") |
|
78 |
@Log(title = "设备产品过程参数采集", businessType = BusinessType.INSERT) |
|
79 |
@PostMapping |
|
80 |
public AjaxResult add(@RequestBody DaParamCollection daParamCollection) |
|
81 |
{ |
|
82 |
daParamCollection.setCreateBy(getUsername()); |
|
83 |
daParamCollection.setCreateTime(DateUtils.getNowDate()); |
|
84 |
return toAjax(daParamCollectionService.insertDaParamCollection(daParamCollection)); |
|
85 |
} |
|
86 |
|
|
87 |
/** |
|
88 |
* 修改设备产品过程参数采集 |
|
89 |
*/ |
|
90 |
@PreAuthorize("@ss.hasPermi('main:paramCollection:edit')") |
|
91 |
@Log(title = "设备产品过程参数采集", businessType = BusinessType.UPDATE) |
|
92 |
@PutMapping |
|
93 |
public AjaxResult edit(@RequestBody DaParamCollection daParamCollection) |
|
94 |
{ |
|
95 |
daParamCollection.setUpdateBy(getUsername()); |
|
96 |
daParamCollection.setUpdateTime(DateUtils.getNowDate()); |
|
97 |
return toAjax(daParamCollectionService.updateDaParamCollection(daParamCollection)); |
|
98 |
} |
|
99 |
|
|
100 |
/** |
|
101 |
* 删除设备产品过程参数采集 |
|
102 |
*/ |
|
103 |
@PreAuthorize("@ss.hasPermi('main:paramCollection:remove')") |
|
104 |
@Log(title = "设备产品过程参数采集", businessType = BusinessType.DELETE) |
|
105 |
@DeleteMapping("/{ids}") |
|
106 |
public AjaxResult remove(@PathVariable Long[] ids) |
|
107 |
{ |
|
108 |
return toAjax(daParamCollectionService.deleteDaParamCollectionByIds(ids)); |
|
109 |
} |
|
110 |
} |