提交 | 用户 | 时间
|
71e81e
|
1 |
package cn.stylefeng.guns.modular.cm.paramCollection.controller; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; |
|
4 |
import cn.stylefeng.guns.modular.cm.paramCollection.entity.ParamCollection; |
|
5 |
import cn.stylefeng.guns.modular.cm.paramCollection.model.params.ParamCollectionParam; |
|
6 |
import cn.stylefeng.guns.modular.cm.paramCollection.model.result.ParamCollectionResult; |
|
7 |
import cn.stylefeng.guns.modular.cm.paramCollection.service.ParamCollectionService; |
|
8 |
import cn.stylefeng.guns.modular.cm.passingStationCollection.model.params.PassingStationCollectionParam; |
|
9 |
import cn.stylefeng.guns.modular.cm.passingStationCollection.model.result.PassingStationCollectionResult; |
|
10 |
import cn.stylefeng.roses.core.base.controller.BaseController; |
|
11 |
import cn.stylefeng.roses.kernel.model.response.ResponseData; |
|
12 |
import org.springframework.beans.factory.annotation.Autowired; |
|
13 |
import org.springframework.stereotype.Controller; |
|
14 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
15 |
import org.springframework.web.bind.annotation.ResponseBody; |
|
16 |
|
|
17 |
import java.util.List; |
|
18 |
|
|
19 |
|
|
20 |
/** |
|
21 |
* 设备产品过程参数采集控制器 |
|
22 |
* test |
|
23 |
* @author zrm |
|
24 |
* @Date 2023-02-11 09:53:17 |
|
25 |
*/ |
|
26 |
@Controller |
|
27 |
@RequestMapping("/paramCollection") |
|
28 |
public class ParamCollectionController extends BaseController { |
|
29 |
|
|
30 |
private String PREFIX = "modular/cm/paramCollection"; |
|
31 |
|
|
32 |
@Autowired |
|
33 |
private ParamCollectionService paramCollectionService; |
|
34 |
|
|
35 |
/** |
|
36 |
* 跳转到主页面 |
|
37 |
* |
|
38 |
* @author zrm |
|
39 |
* @Date 2023-02-11 |
|
40 |
*/ |
|
41 |
@RequestMapping("") |
|
42 |
public String index() { |
|
43 |
return PREFIX + "/paramCollection.html"; |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* 新增页面 |
|
48 |
* |
|
49 |
* @author zrm |
|
50 |
* @Date 2023-02-11 |
|
51 |
*/ |
|
52 |
@RequestMapping("/add") |
|
53 |
public String add() { |
|
54 |
return PREFIX + "/paramCollection_add.html"; |
|
55 |
} |
|
56 |
|
|
57 |
/** |
|
58 |
* 编辑页面 |
|
59 |
* |
|
60 |
* @author zrm |
|
61 |
* @Date 2023-02-11 |
|
62 |
*/ |
|
63 |
@RequestMapping("/edit") |
|
64 |
public String edit() { |
|
65 |
return PREFIX + "/paramCollection_edit.html"; |
|
66 |
} |
|
67 |
|
|
68 |
/** |
|
69 |
* 新增接口 |
|
70 |
* |
|
71 |
* @author zrm |
|
72 |
* @Date 2023-02-11 |
|
73 |
*/ |
|
74 |
@RequestMapping("/addItem") |
|
75 |
@ResponseBody |
|
76 |
public ResponseData addItem(ParamCollectionParam paramCollectionParam) { |
|
77 |
this.paramCollectionService.add(paramCollectionParam); |
|
78 |
return ResponseData.success(); |
|
79 |
} |
|
80 |
|
|
81 |
/** |
|
82 |
* 编辑接口 |
|
83 |
* |
|
84 |
* @author zrm |
|
85 |
* @Date 2023-02-11 |
|
86 |
*/ |
|
87 |
@RequestMapping("/editItem") |
|
88 |
@ResponseBody |
|
89 |
public ResponseData editItem(ParamCollectionParam paramCollectionParam) { |
|
90 |
this.paramCollectionService.update(paramCollectionParam); |
|
91 |
return ResponseData.success(); |
|
92 |
} |
|
93 |
|
|
94 |
/** |
|
95 |
* 导出excel |
|
96 |
* |
|
97 |
* @author cl |
|
98 |
* @Date 2022-10-28 |
|
99 |
*/ |
|
100 |
@RequestMapping("/exportTable") |
|
101 |
@ResponseBody |
|
102 |
public ResponseData exportTable(ParamCollectionParam paramCollectionParam) { |
|
103 |
List<ParamCollectionResult> list = paramCollectionService.exportTable(paramCollectionParam); |
|
104 |
return ResponseData.success(list); |
|
105 |
} |
|
106 |
|
|
107 |
/** |
|
108 |
* 删除接口 |
|
109 |
* |
|
110 |
* @author zrm |
|
111 |
* @Date 2023-02-11 |
|
112 |
*/ |
|
113 |
@RequestMapping("/delete") |
|
114 |
@ResponseBody |
|
115 |
public ResponseData delete(ParamCollectionParam paramCollectionParam) { |
|
116 |
this.paramCollectionService.delete(paramCollectionParam); |
|
117 |
return ResponseData.success(); |
|
118 |
} |
|
119 |
|
|
120 |
/** |
|
121 |
* 查看详情接口 |
|
122 |
* |
|
123 |
* @author zrm |
|
124 |
* @Date 2023-02-11 |
|
125 |
*/ |
|
126 |
@RequestMapping("/detail") |
|
127 |
@ResponseBody |
|
128 |
public ResponseData detail(ParamCollectionParam paramCollectionParam) { |
|
129 |
ParamCollection detail = this.paramCollectionService.getById(paramCollectionParam.getId()); |
|
130 |
return ResponseData.success(detail); |
|
131 |
} |
|
132 |
|
|
133 |
/** |
|
134 |
* 查询列表 |
|
135 |
* |
|
136 |
* @author zrm |
|
137 |
* @Date 2023-02-11 |
|
138 |
*/ |
|
139 |
@ResponseBody |
|
140 |
@RequestMapping("/list") |
|
141 |
public LayuiPageInfo list(ParamCollectionParam paramCollectionParam) { |
|
142 |
return this.paramCollectionService.findPageBySpec(paramCollectionParam); |
|
143 |
} |
|
144 |
|
|
145 |
} |
|
146 |
|
|
147 |
|