admin
2024-01-08 22f70cc8b2ba603e82bba058db320dced48f9470
提交 | 用户 | 时间
71e81e 1 package cn.stylefeng.guns.modular.rm.recipeManage.controller;
2
3 import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
4 import cn.stylefeng.guns.modular.rm.recipeManage.entity.RecipeManage;
5 import cn.stylefeng.guns.modular.rm.recipeManage.model.params.RecipeManageParam;
6 import cn.stylefeng.guns.modular.rm.recipeManage.service.RecipeManageService;
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  * 配方管理控制器
17  *
18  * @author ruimin
19  * @Date 2023-08-04 14:00:46
20  */
21 @Controller
22 @RequestMapping("/recipeManage")
23 public class RecipeManageController extends BaseController {
24
25     private String PREFIX = "modular/rm/recipeManage";
26
27     @Autowired
28     private RecipeManageService recipeManageService;
29
30     /**
31      * 跳转到主页面
32      *
33      * @author ruimin
34      * @Date 2023-08-04
35      */
36     @RequestMapping("")
37     public String index() {
38         return PREFIX + "/recipeManage.html";
39     }
40
41     /**
42      * 新增页面
43      *
44      * @author ruimin
45      * @Date 2023-08-04
46      */
47     @RequestMapping("/add")
48     public String add() {
49         return PREFIX + "/recipeManage_add.html";
50     }
51
52     /**
53      * 编辑页面
54      *
55      * @author ruimin
56      * @Date 2023-08-04
57      */
58     @RequestMapping("/edit")
59     public String edit() {
60         return PREFIX + "/recipeManage_edit.html";
61     }
62
63     /**
64      * 新增接口
65      *
66      * @author ruimin
67      * @Date 2023-08-04
68      */
69     @RequestMapping("/addItem")
70     @ResponseBody
71     public ResponseData addItem(RecipeManageParam recipeManageParam) {
72         this.recipeManageService.add(recipeManageParam);
73         return ResponseData.success();
74     }
75
76     /**
77      * 编辑接口
78      *
79      * @author ruimin
80      * @Date 2023-08-04
81      */
82     @RequestMapping("/editItem")
83     @ResponseBody
84     public ResponseData editItem(RecipeManageParam recipeManageParam) {
85         this.recipeManageService.update(recipeManageParam);
86         return ResponseData.success();
87     }
88
89     /**
90      * 看板编辑
91      *
92      * @author ruimin
93      * @Date 2023-08-04
94      */
95     @RequestMapping("/editItemView")
96     @ResponseBody
97     public ResponseData editItemView(RecipeManageParam recipeManage) {
98         String str = recipeManageService.editItemView(recipeManage);
99         return ResponseData.success(str);
100     }
101
102     /**
103      * 删除接口
104      *
105      * @author ruimin
106      * @Date 2023-08-04
107      */
108     @RequestMapping("/delete")
109     @ResponseBody
110     public ResponseData delete(RecipeManageParam recipeManageParam) {
111         this.recipeManageService.delete(recipeManageParam);
112         return ResponseData.success();
113     }
114
115     /**
116      * 查看详情接口
117      *
118      * @author ruimin
119      * @Date 2023-08-04
120      */
121     @RequestMapping("/detail")
122     @ResponseBody
123     public ResponseData detail(RecipeManageParam recipeManageParam) {
124         RecipeManage detail = this.recipeManageService.getById(recipeManageParam.getId());
125         return ResponseData.success(detail);
126     }
127
128     /**
129      * 查询列表
130      *
131      * @author ruimin
132      * @Date 2023-08-04
133      */
134     @ResponseBody
135     @RequestMapping("/list")
136     public LayuiPageInfo list(RecipeManageParam recipeManageParam) {
137         return this.recipeManageService.findPageBySpec(recipeManageParam);
138     }
139
140     /**
141      * 看板列表
142      *
143      * @author ruimin
144      * @Date 2023-08-04
145      */
146     @ResponseBody
147     @RequestMapping("/viewList")
148     public LayuiPageInfo viewList(RecipeManageParam recipeManageParam) {
149         return this.recipeManageService.viewList(recipeManageParam);
150     }
151
152     /**
153      * 完成
154      *
155      * @author ruimin
156      * @Date 2023-08-04
157      */
158     @ResponseBody
159     @RequestMapping("/finish")
160     public ResponseData finish(RecipeManageParam recipeManageParam) {
161         Integer finish = recipeManageService.finish(recipeManageParam);
162         return ResponseData.success(finish);
163     }
164
165     /**
166      * 完成
167      *
168      * @author ruimin
169      * @Date 2023-08-04
170      */
171     @ResponseBody
172     @RequestMapping("/heavyLoad")
173     public void heavyLoad(RecipeManageParam recipeManageParam) {
174         recipeManageService.heavyLoad(recipeManageParam);
175     }
176
177     /**
178      * 删除单行
179      *
180      * @author ruimin
181      * @Date 2023-08-04
182      */
183     @ResponseBody
184     @RequestMapping("/singleRowDelete")
185     public void singleRowDelete(RecipeManageParam recipeManageParam) {
186         recipeManageService.singleRowDelete(recipeManageParam);
187     }
188
189
190 }
191
192