cl
2024-01-19 e0fac38b26845f25de479783e0c76cf12a5311e0
提交 | 用户 | 时间
71e81e 1 package cn.stylefeng.guns.modular.kb.lineFeedingView;
2
3 import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
4 import cn.stylefeng.guns.modular.kb.utils.IPUtil;
5 import cn.stylefeng.guns.modular.sc.kanbanConf.model.params.KanbanConfParam;
6 import cn.stylefeng.guns.modular.sc.kanbanConf.service.KanbanConfService;
7 import cn.stylefeng.roses.kernel.model.response.ResponseData;
8 import org.springframework.beans.factory.annotation.Autowired;
9 import org.springframework.stereotype.Controller;
10 import org.springframework.web.bind.annotation.RequestMapping;
11 import org.springframework.web.bind.annotation.ResponseBody;
12
13 import javax.servlet.http.HttpServletRequest;
14
15 @Controller
16 @RequestMapping("/lineFeedingView")
17 public class lineFeedingViewController {
18     private String PREFIX = "modular/kb/lineFeedingView";
19     @Autowired
20     private KanbanConfService kanbanConfService;
21     /**
22      * 跳转到主页面
23      *
24      * @author cl
25      * @Date 2022-10-27
26      */
27     @RequestMapping("")
28     public String index() {
29         return PREFIX + "/lineFeedingView.html";
30     }
31
32     /**
33      * 跳转到主页面
34      *
35      * @author cl
36      * @Date 2022-10-27
37      */
38     @RequestMapping("/recipeManageView")
39     public String recipeManageView() {
40         return PREFIX + "/recipeManageView.html";
41     }
42
43     /**
44      * 新增看板配置页面
45      *
46      * @author cl
47      * @Date 2022-10-31
48      */
49     @RequestMapping("/add")
50     public String add() {
51         return PREFIX + "/kanbanConf_add.html";
52     }
53
54     /**
55      * 编辑页面
56      *
57      * @author cl
58      * @Date 2022-10-31
59      */
60     @RequestMapping("/edit")
61     public String edit() {
62         return PREFIX + "/kanbanConf_edit.html";
63     }
64
65     @RequestMapping("/orderEdit")
66     public String orderEdit() {
67         return PREFIX + "/kanbanConf_orderEdit.html";
68     }
69
70     /**
71      * 新增接口
72      *
73      * @author cl
74      * @Date 2022-10-31
75      */
76     @RequestMapping("/addKanBanConfItem")
77     @ResponseBody
78     public ResponseData addItem(KanbanConfParam kanbanConfParam, HttpServletRequest request) {
79         String realIp = IPUtil.getRealIp(request);
80         kanbanConfParam.setIpAddress(realIp);
81
82         this.kanbanConfService.add(kanbanConfParam);
83         return ResponseData.success();
84     }
85
86     /**
87      * 编辑接口
88      *
89      * @author cl
90      * @Date 2022-10-31
91      */
92     @RequestMapping("/editKanBanConfItem")
93     @ResponseBody
94     public ResponseData editItem(KanbanConfParam kanbanConfParam) {
95         this.kanbanConfService.update(kanbanConfParam);
96         return ResponseData.success();
97     }
98
99     /**
100      * 查询列表
101      *
102      * @author cl
103      * @Date 2022-10-31
104      */
105     @ResponseBody
106     @RequestMapping("/qryKBConflist")
107     public LayuiPageInfo list(KanbanConfParam kanbanConfParam, HttpServletRequest request) {
108         String realIp = IPUtil.getRealIp(request);
109         kanbanConfParam.setIpAddress(realIp);
110
111         return this.kanbanConfService.findPageBySpec(kanbanConfParam);
112     }
113 }