提交 | 用户 | 时间
|
523903
|
1 |
package com.jcdm.main.em.inspectionPlanItemsProject.controller; |
懒 |
2 |
|
|
3 |
import java.util.List; |
|
4 |
import javax.servlet.http.HttpServletResponse; |
e20d73
|
5 |
|
1e39c5
|
6 |
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
e20d73
|
7 |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
懒 |
8 |
import org.aspectj.weaver.loadtime.Aj; |
523903
|
9 |
import org.springframework.security.access.prepost.PreAuthorize; |
懒 |
10 |
import org.springframework.beans.factory.annotation.Autowired; |
e20d73
|
11 |
import org.springframework.web.bind.annotation.*; |
523903
|
12 |
import com.jcdm.common.annotation.Log; |
懒 |
13 |
import com.jcdm.common.core.controller.BaseController; |
|
14 |
import com.jcdm.common.core.domain.AjaxResult; |
|
15 |
import com.jcdm.common.enums.BusinessType; |
|
16 |
import com.jcdm.main.em.inspectionPlanItemsProject.domain.EmInspectionPlanItemsProject; |
|
17 |
import com.jcdm.main.em.inspectionPlanItemsProject.service.IEmInspectionPlanItemsProjectService; |
|
18 |
import com.jcdm.common.utils.poi.ExcelUtil; |
|
19 |
import com.jcdm.common.core.page.TableDataInfo; |
|
20 |
|
|
21 |
/** |
|
22 |
* 点检任务-项目Controller |
|
23 |
* |
|
24 |
* @author Yi |
|
25 |
* @date 2024-03-23 |
|
26 |
*/ |
|
27 |
@RestController |
|
28 |
@RequestMapping("/em/inspectionPlanItemsProject") |
|
29 |
public class EmInspectionPlanItemsProjectController extends BaseController |
|
30 |
{ |
|
31 |
@Autowired |
|
32 |
private IEmInspectionPlanItemsProjectService emInspectionPlanItemsProjectService; |
|
33 |
|
1e39c5
|
34 |
@GetMapping("/findPlanItemsProjectByPlanId") |
W |
35 |
public AjaxResult list2(EmInspectionPlanItemsProject emInspectionPlanItemsProject) |
e20d73
|
36 |
{ |
1e39c5
|
37 |
List<EmInspectionPlanItemsProject> planTaskIdList = emInspectionPlanItemsProjectService |
W |
38 |
.list(new LambdaQueryWrapper<EmInspectionPlanItemsProject>() |
|
39 |
.eq(EmInspectionPlanItemsProject::getPlanTaskId,emInspectionPlanItemsProject.getPlanTaskId())); |
e20d73
|
40 |
return AjaxResult.success(planTaskIdList); |
懒 |
41 |
} |
|
42 |
|
523903
|
43 |
/** |
懒 |
44 |
* 查询点检任务-项目列表 |
|
45 |
*/ |
|
46 |
@PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:list')") |
|
47 |
@GetMapping("/list") |
|
48 |
public TableDataInfo list(EmInspectionPlanItemsProject emInspectionPlanItemsProject) |
|
49 |
{ |
|
50 |
startPage(); |
|
51 |
List<EmInspectionPlanItemsProject> list = emInspectionPlanItemsProjectService.selectEmInspectionPlanItemsProjectList(emInspectionPlanItemsProject); |
|
52 |
return getDataTable(list); |
|
53 |
} |
|
54 |
|
|
55 |
/** |
|
56 |
* 导出点检任务-项目列表 |
|
57 |
*/ |
|
58 |
@PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:export')") |
|
59 |
@Log(title = "点检任务-项目", businessType = BusinessType.EXPORT) |
|
60 |
@PostMapping("/export") |
|
61 |
public void export(HttpServletResponse response, EmInspectionPlanItemsProject emInspectionPlanItemsProject) |
|
62 |
{ |
|
63 |
List<EmInspectionPlanItemsProject> list = emInspectionPlanItemsProjectService.selectEmInspectionPlanItemsProjectList(emInspectionPlanItemsProject); |
|
64 |
ExcelUtil<EmInspectionPlanItemsProject> util = new ExcelUtil<EmInspectionPlanItemsProject>(EmInspectionPlanItemsProject.class); |
|
65 |
util.exportExcel(response, list, "点检任务-项目数据"); |
|
66 |
} |
|
67 |
|
|
68 |
/** |
|
69 |
* 获取点检任务-项目详细信息 |
|
70 |
*/ |
|
71 |
@PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:query')") |
|
72 |
@GetMapping(value = "/{id}") |
|
73 |
public AjaxResult getInfo(@PathVariable("id") Long id) |
|
74 |
{ |
|
75 |
return success(emInspectionPlanItemsProjectService.selectEmInspectionPlanItemsProjectById(id)); |
|
76 |
} |
|
77 |
|
|
78 |
/** |
|
79 |
* 新增点检任务-项目 |
|
80 |
*/ |
|
81 |
@PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:add')") |
|
82 |
@Log(title = "点检任务-项目", businessType = BusinessType.INSERT) |
|
83 |
@PostMapping |
|
84 |
public AjaxResult add(@RequestBody EmInspectionPlanItemsProject emInspectionPlanItemsProject) |
|
85 |
{ |
|
86 |
return toAjax(emInspectionPlanItemsProjectService.insertEmInspectionPlanItemsProject(emInspectionPlanItemsProject)); |
|
87 |
} |
|
88 |
|
|
89 |
/** |
|
90 |
* 修改点检任务-项目 |
|
91 |
*/ |
|
92 |
@PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:edit')") |
|
93 |
@Log(title = "点检任务-项目", businessType = BusinessType.UPDATE) |
|
94 |
@PutMapping |
|
95 |
public AjaxResult edit(@RequestBody EmInspectionPlanItemsProject emInspectionPlanItemsProject) |
|
96 |
{ |
|
97 |
return toAjax(emInspectionPlanItemsProjectService.updateEmInspectionPlanItemsProject(emInspectionPlanItemsProject)); |
|
98 |
} |
|
99 |
|
|
100 |
/** |
|
101 |
* 删除点检任务-项目 |
|
102 |
*/ |
|
103 |
@PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:remove')") |
|
104 |
@Log(title = "点检任务-项目", businessType = BusinessType.DELETE) |
|
105 |
@DeleteMapping("/{ids}") |
|
106 |
public AjaxResult remove(@PathVariable Long[] ids) |
|
107 |
{ |
|
108 |
return toAjax(emInspectionPlanItemsProjectService.deleteEmInspectionPlanItemsProjectByIds(ids)); |
|
109 |
} |
|
110 |
} |