提交 | 用户 | 时间
|
71e81e
|
1 |
package cn.stylefeng.guns.modular.kb.scrapBoard; |
懒 |
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.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 |
import javax.servlet.http.HttpServletRequest; |
|
15 |
|
|
16 |
/** |
|
17 |
* 物料登记看板控制器1 |
|
18 |
* |
|
19 |
* @author cl |
|
20 |
* @Date 2022-10-27 15:50:56 |
|
21 |
*/ |
|
22 |
@Controller |
|
23 |
@RequestMapping("/scrapBoard") |
|
24 |
public class scrapBoardController extends BaseController { |
|
25 |
|
|
26 |
private String PREFIX = "modular/kb/scrapBoard"; |
|
27 |
@Autowired |
|
28 |
private KanbanConfService kanbanConfService; |
|
29 |
/** |
|
30 |
* 跳转到主页面 |
|
31 |
* |
|
32 |
* @author cl |
|
33 |
* @Date 2022-10-27 |
|
34 |
*/ |
|
35 |
@RequestMapping("") |
|
36 |
public String index() { |
|
37 |
return PREFIX + "/scrapBoard.html"; |
|
38 |
} |
|
39 |
|
|
40 |
/** |
|
41 |
* 新增看板配置页面 |
|
42 |
* |
|
43 |
* @author cl |
|
44 |
* @Date 2022-10-31 |
|
45 |
*/ |
|
46 |
@RequestMapping("/add") |
|
47 |
public String add() { |
|
48 |
return PREFIX + "/kanbanConf_add.html"; |
|
49 |
} |
|
50 |
|
|
51 |
/** |
|
52 |
* 编辑页面 |
|
53 |
* |
|
54 |
* @author cl |
|
55 |
* @Date 2022-10-31 |
|
56 |
*/ |
|
57 |
@RequestMapping("/edit") |
|
58 |
public String edit() { |
|
59 |
return PREFIX + "/kanbanConf_edit.html"; |
|
60 |
} |
|
61 |
|
|
62 |
@RequestMapping("/orderEdit") |
|
63 |
public String orderEdit() { |
|
64 |
return PREFIX + "/kanbanConf_orderEdit.html"; |
|
65 |
} |
|
66 |
|
|
67 |
/** |
|
68 |
* 新增接口 |
|
69 |
* |
|
70 |
* @author cl |
|
71 |
* @Date 2022-10-31 |
|
72 |
*/ |
|
73 |
@RequestMapping("/addKanBanConfItem") |
|
74 |
@ResponseBody |
|
75 |
public ResponseData addItem(KanbanConfParam kanbanConfParam, HttpServletRequest request) { |
|
76 |
String realIp = IPUtil.getRealIp(request); |
|
77 |
kanbanConfParam.setIpAddress(realIp); |
|
78 |
kanbanConfParam.setWarehouseCode(kanbanConfParam.getScrapReason()); |
|
79 |
kanbanConfParam.setWarehouseName(kanbanConfParam.getScrapCategory()); |
|
80 |
this.kanbanConfService.add(kanbanConfParam); |
|
81 |
return ResponseData.success(); |
|
82 |
} |
|
83 |
|
|
84 |
/** |
|
85 |
* 编辑接口 |
|
86 |
* |
|
87 |
* @author cl |
|
88 |
* @Date 2022-10-31 |
|
89 |
*/ |
|
90 |
@RequestMapping("/editKanBanConfItem") |
|
91 |
@ResponseBody |
|
92 |
public ResponseData editItem(KanbanConfParam kanbanConfParam) { |
|
93 |
this.kanbanConfService.update(kanbanConfParam); |
|
94 |
return ResponseData.success(); |
|
95 |
} |
|
96 |
|
|
97 |
/** |
|
98 |
* 查询列表 |
|
99 |
* |
|
100 |
* @author cl |
|
101 |
* @Date 2022-10-31 |
|
102 |
*/ |
|
103 |
@ResponseBody |
|
104 |
@RequestMapping("/qryKBConflist") |
|
105 |
public LayuiPageInfo list(KanbanConfParam kanbanConfParam, HttpServletRequest request) { |
|
106 |
String realIp = IPUtil.getRealIp(request); |
|
107 |
kanbanConfParam.setIpAddress(realIp); |
|
108 |
|
|
109 |
return this.kanbanConfService.findPageBySpec(kanbanConfParam); |
|
110 |
} |
|
111 |
} |