提交 | 用户 | 时间
|
71e81e
|
1 |
package cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.controller; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; |
|
4 |
import cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.entity.EquipmentMaintainContentPlan; |
|
5 |
import cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.model.params.EquipmentMaintainContentPlanParam; |
|
6 |
import cn.stylefeng.guns.modular.em.equipmentMaintainContentPlan.service.EquipmentMaintainContentPlanService; |
|
7 |
import cn.stylefeng.roses.core.base.controller.BaseController; |
|
8 |
import cn.stylefeng.roses.kernel.model.response.ResponseData; |
|
9 |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
10 |
import org.springframework.beans.factory.annotation.Autowired; |
|
11 |
import org.springframework.stereotype.Controller; |
|
12 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
13 |
import org.springframework.web.bind.annotation.ResponseBody; |
|
14 |
|
|
15 |
import java.util.List; |
|
16 |
|
|
17 |
|
|
18 |
/** |
|
19 |
* 计划保养内容控制器 |
|
20 |
* |
|
21 |
* @author ruimin |
|
22 |
* @Date 2023-02-20 13:25:14 |
|
23 |
*/ |
|
24 |
@Controller |
|
25 |
@RequestMapping("/equipmentMaintainContentPlan") |
|
26 |
public class EquipmentMaintainContentPlanController extends BaseController { |
|
27 |
|
|
28 |
private String PREFIX = "modular/em/equipmentMaintainContentPlan"; |
|
29 |
|
|
30 |
@Autowired |
|
31 |
private EquipmentMaintainContentPlanService equipmentMaintainContentPlanService; |
|
32 |
|
|
33 |
/** |
|
34 |
* 跳转到主页面 |
|
35 |
* |
|
36 |
* @author ruimin |
|
37 |
* @Date 2023-02-20 |
|
38 |
*/ |
|
39 |
@RequestMapping("") |
|
40 |
public String index() { |
|
41 |
return PREFIX + "/equipmentMaintainContentPlan.html"; |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* 新增页面 |
|
46 |
* |
|
47 |
* @author ruimin |
|
48 |
* @Date 2023-02-20 |
|
49 |
*/ |
|
50 |
@RequestMapping("/add") |
|
51 |
public String add() { |
|
52 |
return PREFIX + "/equipmentMaintainContentPlan_add.html"; |
|
53 |
} |
|
54 |
|
|
55 |
/** |
|
56 |
* 编辑页面 |
|
57 |
* |
|
58 |
* @author ruimin |
|
59 |
* @Date 2023-02-20 |
|
60 |
*/ |
|
61 |
@RequestMapping("/edit") |
|
62 |
public String edit() { |
|
63 |
return PREFIX + "/equipmentMaintainContentPlan_edit.html"; |
|
64 |
} |
|
65 |
|
|
66 |
/** |
|
67 |
* 新增接口 |
|
68 |
* |
|
69 |
* @author ruimin |
|
70 |
* @Date 2023-02-20 |
|
71 |
*/ |
|
72 |
@RequestMapping("/addItem") |
|
73 |
@ResponseBody |
|
74 |
public ResponseData addItem(EquipmentMaintainContentPlanParam equipmentMaintainContentPlanParam) { |
|
75 |
this.equipmentMaintainContentPlanService.add(equipmentMaintainContentPlanParam); |
|
76 |
return ResponseData.success(); |
|
77 |
} |
|
78 |
|
|
79 |
/** |
|
80 |
* 编辑接口 |
|
81 |
* |
|
82 |
* @author ruimin |
|
83 |
* @Date 2023-02-20 |
|
84 |
*/ |
|
85 |
@RequestMapping("/editItem") |
|
86 |
@ResponseBody |
|
87 |
public ResponseData editItem(EquipmentMaintainContentPlanParam equipmentMaintainContentPlanParam) { |
|
88 |
this.equipmentMaintainContentPlanService.update(equipmentMaintainContentPlanParam); |
|
89 |
return ResponseData.success(); |
|
90 |
} |
|
91 |
|
|
92 |
/** |
|
93 |
* 删除接口 |
|
94 |
* |
|
95 |
* @author ruimin |
|
96 |
* @Date 2023-02-20 |
|
97 |
*/ |
|
98 |
@RequestMapping("/delete") |
|
99 |
@ResponseBody |
|
100 |
public ResponseData delete(EquipmentMaintainContentPlanParam equipmentMaintainContentPlanParam) { |
|
101 |
this.equipmentMaintainContentPlanService.delete(equipmentMaintainContentPlanParam); |
|
102 |
return ResponseData.success(); |
|
103 |
} |
|
104 |
|
|
105 |
/** |
|
106 |
* 查看详情接口 |
|
107 |
* |
|
108 |
* @author ruimin |
|
109 |
* @Date 2023-02-20 |
|
110 |
*/ |
|
111 |
@RequestMapping("/detail") |
|
112 |
@ResponseBody |
|
113 |
public ResponseData detail(EquipmentMaintainContentPlanParam equipmentMaintainContentPlanParam) { |
|
114 |
EquipmentMaintainContentPlan detail = this.equipmentMaintainContentPlanService.getById(equipmentMaintainContentPlanParam.getId()); |
|
115 |
return ResponseData.success(detail); |
|
116 |
} |
|
117 |
|
|
118 |
@RequestMapping("/detailByMaintainPlanNo") |
|
119 |
@ResponseBody |
|
120 |
public List detailByMaintainPlanNo(EquipmentMaintainContentPlanParam param) { |
|
121 |
EquipmentMaintainContentPlan detail = this.equipmentMaintainContentPlanService.getById(param.getId()); |
|
122 |
List<EquipmentMaintainContentPlan> planNo = equipmentMaintainContentPlanService.list(new QueryWrapper<EquipmentMaintainContentPlan>().eq("plan_no", param.getPlanNo())); |
|
123 |
return planNo; |
|
124 |
} |
|
125 |
|
|
126 |
/** |
|
127 |
* 查询列表 |
|
128 |
* |
|
129 |
* @author ruimin |
|
130 |
* @Date 2023-02-20 |
|
131 |
*/ |
|
132 |
@ResponseBody |
|
133 |
@RequestMapping("/list") |
|
134 |
public LayuiPageInfo list(EquipmentMaintainContentPlanParam equipmentMaintainContentPlanParam) { |
|
135 |
return this.equipmentMaintainContentPlanService.findPageBySpec(equipmentMaintainContentPlanParam); |
|
136 |
} |
|
137 |
|
|
138 |
} |
|
139 |
|
|
140 |
|