|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+package com.zzsmart.qomo.kn.cost.manage.controller;
|
|
|
2
|
+
|
|
|
3
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
4
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
5
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
6
|
+import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPurchaseEvaluate;
|
|
|
7
|
+import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostPurchaseEvaluateService;
|
|
|
8
|
+import io.swagger.annotations.Api;
|
|
|
9
|
+import io.swagger.annotations.ApiOperation;
|
|
|
10
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
11
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
12
|
+import org.jeecg.common.api.vo.Result;
|
|
|
13
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
14
|
+import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
15
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
16
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
17
|
+import org.springframework.web.bind.annotation.*;
|
|
|
18
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
19
|
+
|
|
|
20
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
21
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
22
|
+import java.util.Arrays;
|
|
|
23
|
+
|
|
|
24
|
+/**
|
|
|
25
|
+ * @Description: app_scene_cost_purchase_evaluate
|
|
|
26
|
+ * @Author: jeecg-boot
|
|
|
27
|
+ * @Date: 2024-08-02
|
|
|
28
|
+ * @Version: V1.0
|
|
|
29
|
+ */
|
|
|
30
|
+@Api(tags = "cost-采购合同")
|
|
|
31
|
+@RestController
|
|
|
32
|
+@RequestMapping("//PurchaseEvaluate")
|
|
|
33
|
+@Slf4j
|
|
|
34
|
+public class AppSceneCostPurchaseEvaluateController extends JeecgController<AppSceneCostPurchaseEvaluate, IAppSceneCostPurchaseEvaluateService> {
|
|
|
35
|
+ @Autowired
|
|
|
36
|
+ private IAppSceneCostPurchaseEvaluateService appSceneCostPurchaseEvaluateService;
|
|
|
37
|
+
|
|
|
38
|
+ /**
|
|
|
39
|
+ * 分页列表查询
|
|
|
40
|
+ *
|
|
|
41
|
+ * @param appSceneCostPurchaseEvaluate
|
|
|
42
|
+ * @param pageNo
|
|
|
43
|
+ * @param pageSize
|
|
|
44
|
+ * @param req
|
|
|
45
|
+ * @return
|
|
|
46
|
+ */
|
|
|
47
|
+ //@AutoLog(value = "app_scene_cost_purchase_evaluate-分页列表查询")
|
|
|
48
|
+ @ApiOperation(value = "app_scene_cost_purchase_evaluate-分页列表查询", notes = "app_scene_cost_purchase_evaluate-分页列表查询")
|
|
|
49
|
+ @GetMapping(value = "/list")
|
|
|
50
|
+ public Result<IPage<AppSceneCostPurchaseEvaluate>> queryPageList(AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate,
|
|
|
51
|
+ @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
52
|
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
53
|
+ HttpServletRequest req) {
|
|
|
54
|
+ QueryWrapper<AppSceneCostPurchaseEvaluate> queryWrapper = QueryGenerator.initQueryWrapper(appSceneCostPurchaseEvaluate, req.getParameterMap());
|
|
|
55
|
+ Page<AppSceneCostPurchaseEvaluate> page = new Page<AppSceneCostPurchaseEvaluate>(pageNo, pageSize);
|
|
|
56
|
+ IPage<AppSceneCostPurchaseEvaluate> pageList = appSceneCostPurchaseEvaluateService.page(page, queryWrapper);
|
|
|
57
|
+ return Result.OK(pageList);
|
|
|
58
|
+ }
|
|
|
59
|
+
|
|
|
60
|
+ /**
|
|
|
61
|
+ * 添加
|
|
|
62
|
+ *
|
|
|
63
|
+ * @param appSceneCostPurchaseEvaluate
|
|
|
64
|
+ * @return
|
|
|
65
|
+ */
|
|
|
66
|
+ @AutoLog(value = "app_scene_cost_purchase_evaluate-添加")
|
|
|
67
|
+ @ApiOperation(value = "app_scene_cost_purchase_evaluate-添加", notes = "app_scene_cost_purchase_evaluate-添加")
|
|
|
68
|
+ @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:add")
|
|
|
69
|
+ @PostMapping(value = "/add")
|
|
|
70
|
+ public Result<String> add(@RequestBody AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) {
|
|
|
71
|
+ appSceneCostPurchaseEvaluateService.save(appSceneCostPurchaseEvaluate);
|
|
|
72
|
+ return Result.OK("添加成功!");
|
|
|
73
|
+ }
|
|
|
74
|
+
|
|
|
75
|
+ /**
|
|
|
76
|
+ * 编辑
|
|
|
77
|
+ *
|
|
|
78
|
+ * @param appSceneCostPurchaseEvaluate
|
|
|
79
|
+ * @return
|
|
|
80
|
+ */
|
|
|
81
|
+ @AutoLog(value = "app_scene_cost_purchase_evaluate-编辑")
|
|
|
82
|
+ @ApiOperation(value = "app_scene_cost_purchase_evaluate-编辑", notes = "app_scene_cost_purchase_evaluate-编辑")
|
|
|
83
|
+ @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:edit")
|
|
|
84
|
+ @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
|
|
85
|
+ public Result<String> edit(@RequestBody AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) {
|
|
|
86
|
+ appSceneCostPurchaseEvaluateService.updateById(appSceneCostPurchaseEvaluate);
|
|
|
87
|
+ return Result.OK("编辑成功!");
|
|
|
88
|
+ }
|
|
|
89
|
+
|
|
|
90
|
+ /**
|
|
|
91
|
+ * 通过id删除
|
|
|
92
|
+ *
|
|
|
93
|
+ * @param id
|
|
|
94
|
+ * @return
|
|
|
95
|
+ */
|
|
|
96
|
+ @AutoLog(value = "app_scene_cost_purchase_evaluate-通过id删除")
|
|
|
97
|
+ @ApiOperation(value = "app_scene_cost_purchase_evaluate-通过id删除", notes = "app_scene_cost_purchase_evaluate-通过id删除")
|
|
|
98
|
+ @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:delete")
|
|
|
99
|
+ @DeleteMapping(value = "/delete")
|
|
|
100
|
+ public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
|
|
101
|
+ appSceneCostPurchaseEvaluateService.removeById(id);
|
|
|
102
|
+ return Result.OK("删除成功!");
|
|
|
103
|
+ }
|
|
|
104
|
+//
|
|
|
105
|
+// /**
|
|
|
106
|
+// * 批量删除
|
|
|
107
|
+// *
|
|
|
108
|
+// * @param ids
|
|
|
109
|
+// * @return
|
|
|
110
|
+// */
|
|
|
111
|
+// @AutoLog(value = "app_scene_cost_purchase_evaluate-批量删除")
|
|
|
112
|
+// @ApiOperation(value = "app_scene_cost_purchase_evaluate-批量删除", notes = "app_scene_cost_purchase_evaluate-批量删除")
|
|
|
113
|
+// @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:deleteBatch")
|
|
|
114
|
+// @DeleteMapping(value = "/deleteBatch")
|
|
|
115
|
+// public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
|
|
116
|
+// this.appSceneCostPurchaseEvaluateService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
117
|
+// return Result.OK("批量删除成功!");
|
|
|
118
|
+// }
|
|
|
119
|
+//
|
|
|
120
|
+// /**
|
|
|
121
|
+// * 通过id查询
|
|
|
122
|
+// *
|
|
|
123
|
+// * @param id
|
|
|
124
|
+// * @return
|
|
|
125
|
+// */
|
|
|
126
|
+// //@AutoLog(value = "app_scene_cost_purchase_evaluate-通过id查询")
|
|
|
127
|
+// @ApiOperation(value = "app_scene_cost_purchase_evaluate-通过id查询", notes = "app_scene_cost_purchase_evaluate-通过id查询")
|
|
|
128
|
+// @GetMapping(value = "/queryById")
|
|
|
129
|
+// public Result<AppSceneCostPurchaseEvaluate> queryById(@RequestParam(name = "id", required = true) String id) {
|
|
|
130
|
+// AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate = appSceneCostPurchaseEvaluateService.getById(id);
|
|
|
131
|
+// if (appSceneCostPurchaseEvaluate == null) {
|
|
|
132
|
+// return Result.error("未找到对应数据");
|
|
|
133
|
+// }
|
|
|
134
|
+// return Result.OK(appSceneCostPurchaseEvaluate);
|
|
|
135
|
+// }
|
|
|
136
|
+//
|
|
|
137
|
+// /**
|
|
|
138
|
+// * 导出excel
|
|
|
139
|
+// *
|
|
|
140
|
+// * @param request
|
|
|
141
|
+// * @param appSceneCostPurchaseEvaluate
|
|
|
142
|
+// */
|
|
|
143
|
+// @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:exportXls")
|
|
|
144
|
+// @RequestMapping(value = "/exportXls")
|
|
|
145
|
+// public ModelAndView exportXls(HttpServletRequest request, AppSceneCostPurchaseEvaluate appSceneCostPurchaseEvaluate) {
|
|
|
146
|
+// return super.exportXls(request, appSceneCostPurchaseEvaluate, AppSceneCostPurchaseEvaluate.class, "app_scene_cost_purchase_evaluate");
|
|
|
147
|
+// }
|
|
|
148
|
+//
|
|
|
149
|
+// /**
|
|
|
150
|
+// * 通过excel导入数据
|
|
|
151
|
+// *
|
|
|
152
|
+// * @param request
|
|
|
153
|
+// * @param response
|
|
|
154
|
+// * @return
|
|
|
155
|
+// */
|
|
|
156
|
+// @RequiresPermissions("com.zzsmart.qomo.kn.cost.manage:app_scene_cost_purchase_evaluate:importExcel")
|
|
|
157
|
+// @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
|
|
158
|
+// public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
|
|
159
|
+// return super.importExcel(request, response, AppSceneCostPurchaseEvaluate.class);
|
|
|
160
|
+// }
|
|
|
161
|
+
|
|
|
162
|
+}
|