提交 | 用户 | 时间
|
71e81e
|
1 |
package cn.stylefeng.guns.modular.am.materialShortageAlarm.controller; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; |
|
4 |
import cn.stylefeng.guns.modular.am.materialShortageAlarm.entity.MaterialShortageAlarm; |
|
5 |
import cn.stylefeng.guns.modular.am.materialShortageAlarm.model.params.MaterialShortageAlarmParam; |
|
6 |
import cn.stylefeng.guns.modular.am.materialShortageAlarm.service.MaterialShortageAlarmService; |
|
7 |
import cn.stylefeng.roses.core.base.controller.BaseController; |
|
8 |
import cn.stylefeng.roses.kernel.model.response.ResponseData; |
|
9 |
import org.springframework.beans.factory.annotation.Autowired; |
|
10 |
import org.springframework.stereotype.Controller; |
|
11 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
12 |
import org.springframework.web.bind.annotation.ResponseBody; |
|
13 |
|
|
14 |
|
|
15 |
/** |
|
16 |
* 缺料报警控制器11 |
|
17 |
* |
|
18 |
* @author zrm |
|
19 |
* @Date 2023-02-15 14:25:14 |
|
20 |
*/ |
|
21 |
@Controller |
|
22 |
@RequestMapping("/materialShortageAlarm") |
|
23 |
public class MaterialShortageAlarmController extends BaseController { |
|
24 |
|
|
25 |
private String PREFIX = "modular/am/materialShortageAlarm"; |
|
26 |
|
|
27 |
@Autowired |
|
28 |
private MaterialShortageAlarmService materialShortageAlarmService; |
|
29 |
|
|
30 |
/** |
|
31 |
* 跳转到主页面 |
|
32 |
* |
|
33 |
* @author zrm |
|
34 |
* @Date 2023-02-15 |
|
35 |
*/ |
|
36 |
@RequestMapping("") |
|
37 |
public String index() { |
|
38 |
return PREFIX + "/materialShortageAlarm.html"; |
|
39 |
} |
|
40 |
|
|
41 |
/** |
|
42 |
* 新增页面 |
|
43 |
* |
|
44 |
* @author zrm |
|
45 |
* @Date 2023-02-15 |
|
46 |
*/ |
|
47 |
@RequestMapping("/add") |
|
48 |
public String add() { |
|
49 |
return PREFIX + "/materialShortageAlarm_add.html"; |
|
50 |
} |
|
51 |
|
|
52 |
/** |
|
53 |
* 编辑页面 |
|
54 |
* |
|
55 |
* @author zrm |
|
56 |
* @Date 2023-02-15 |
|
57 |
*/ |
|
58 |
@RequestMapping("/edit") |
|
59 |
public String edit() { |
|
60 |
return PREFIX + "/materialShortageAlarm_edit.html"; |
|
61 |
} |
|
62 |
|
|
63 |
/** |
|
64 |
* 新增接口 |
|
65 |
* |
|
66 |
* @author zrm |
|
67 |
* @Date 2023-02-15 |
|
68 |
*/ |
|
69 |
@RequestMapping("/addItem") |
|
70 |
@ResponseBody |
|
71 |
public ResponseData addItem(MaterialShortageAlarmParam materialShortageAlarmParam) { |
|
72 |
this.materialShortageAlarmService.add(materialShortageAlarmParam); |
|
73 |
return ResponseData.success(); |
|
74 |
} |
|
75 |
|
|
76 |
/** |
|
77 |
* 编辑接口 |
|
78 |
* |
|
79 |
* @author zrm |
|
80 |
* @Date 2023-02-15 |
|
81 |
*/ |
|
82 |
@RequestMapping("/editItem") |
|
83 |
@ResponseBody |
|
84 |
public ResponseData editItem(MaterialShortageAlarmParam materialShortageAlarmParam) { |
|
85 |
this.materialShortageAlarmService.update(materialShortageAlarmParam); |
|
86 |
return ResponseData.success(); |
|
87 |
} |
|
88 |
|
|
89 |
/** |
|
90 |
* 删除接口 |
|
91 |
* |
|
92 |
* @author zrm |
|
93 |
* @Date 2023-02-15 |
|
94 |
*/ |
|
95 |
@RequestMapping("/delete") |
|
96 |
@ResponseBody |
|
97 |
public ResponseData delete(MaterialShortageAlarmParam materialShortageAlarmParam) { |
|
98 |
this.materialShortageAlarmService.delete(materialShortageAlarmParam); |
|
99 |
return ResponseData.success(); |
|
100 |
} |
|
101 |
|
|
102 |
/** |
|
103 |
* 查看详情接口 |
|
104 |
* |
|
105 |
* @author zrm |
|
106 |
* @Date 2023-02-15 |
|
107 |
*/ |
|
108 |
@RequestMapping("/detail") |
|
109 |
@ResponseBody |
|
110 |
public ResponseData detail(MaterialShortageAlarmParam materialShortageAlarmParam) { |
|
111 |
MaterialShortageAlarm detail = this.materialShortageAlarmService.getById(materialShortageAlarmParam.getId()); |
|
112 |
return ResponseData.success(detail); |
|
113 |
} |
|
114 |
|
|
115 |
/** |
|
116 |
* 查询列表 |
|
117 |
* |
|
118 |
* @author zrm |
|
119 |
* @Date 2023-02-15 |
|
120 |
*/ |
|
121 |
@ResponseBody |
|
122 |
@RequestMapping("/list") |
|
123 |
public LayuiPageInfo list(MaterialShortageAlarmParam materialShortageAlarmParam) { |
|
124 |
return this.materialShortageAlarmService.findPageBySpec(materialShortageAlarmParam); |
|
125 |
} |
|
126 |
|
|
127 |
} |
|
128 |
|
|
129 |
|