提交 | 用户 | 时间
|
e57a89
|
1 |
package com.jcdm.main.bs.processes.controller; |
懒 |
2 |
|
|
3 |
import java.util.List; |
|
4 |
import javax.servlet.http.HttpServletResponse; |
|
5 |
|
|
6 |
import com.jcdm.main.bs.processes.domain.BsProcessesInfo; |
|
7 |
import com.jcdm.main.bs.processes.service.IBsProcessesInfoService; |
|
8 |
import org.springframework.security.access.prepost.PreAuthorize; |
|
9 |
import org.springframework.beans.factory.annotation.Autowired; |
|
10 |
import org.springframework.web.bind.annotation.GetMapping; |
|
11 |
import org.springframework.web.bind.annotation.PostMapping; |
|
12 |
import org.springframework.web.bind.annotation.PutMapping; |
|
13 |
import org.springframework.web.bind.annotation.DeleteMapping; |
|
14 |
import org.springframework.web.bind.annotation.PathVariable; |
|
15 |
import org.springframework.web.bind.annotation.RequestBody; |
|
16 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
17 |
import org.springframework.web.bind.annotation.RestController; |
|
18 |
import com.jcdm.common.annotation.Log; |
|
19 |
import com.jcdm.common.core.controller.BaseController; |
|
20 |
import com.jcdm.common.core.domain.AjaxResult; |
|
21 |
import com.jcdm.common.enums.BusinessType; |
|
22 |
import com.jcdm.common.utils.poi.ExcelUtil; |
|
23 |
import com.jcdm.common.core.page.TableDataInfo; |
|
24 |
|
|
25 |
/** |
|
26 |
* 工序信息Controller |
|
27 |
* |
|
28 |
* @author ruimin |
|
29 |
* @date 2023-12-09 |
|
30 |
*/ |
|
31 |
@RestController |
|
32 |
@RequestMapping("/bs/processes") |
|
33 |
public class BsProcessesInfoController extends BaseController |
|
34 |
{ |
|
35 |
@Autowired |
|
36 |
private IBsProcessesInfoService bsProcessesInfoService; |
|
37 |
|
|
38 |
/** |
|
39 |
* 查询工序信息列表 |
|
40 |
*/ |
|
41 |
@PreAuthorize("@ss.hasPermi('bs:processes:list')") |
|
42 |
@GetMapping("/list") |
|
43 |
public TableDataInfo list(BsProcessesInfo bsProcessesInfo) |
|
44 |
{ |
|
45 |
startPage(); |
|
46 |
List<BsProcessesInfo> list = bsProcessesInfoService.selectBsProcessesInfoList(bsProcessesInfo); |
|
47 |
return getDataTable(list); |
|
48 |
} |
|
49 |
|
5316c5
|
50 |
@GetMapping("/noList") |
A |
51 |
public TableDataInfo noList() |
|
52 |
{ |
|
53 |
List<BsProcessesInfo> list = bsProcessesInfoService.list(); |
|
54 |
return getDataTable(list); |
|
55 |
} |
|
56 |
|
e57a89
|
57 |
/** |
懒 |
58 |
* 导出工序信息列表 |
|
59 |
*/ |
|
60 |
@PreAuthorize("@ss.hasPermi('bs:processes:export')") |
|
61 |
@Log(title = "工序信息", businessType = BusinessType.EXPORT) |
|
62 |
@PostMapping("/export") |
|
63 |
public void export(HttpServletResponse response, BsProcessesInfo bsProcessesInfo) |
|
64 |
{ |
|
65 |
List<BsProcessesInfo> list = bsProcessesInfoService.selectBsProcessesInfoList(bsProcessesInfo); |
|
66 |
ExcelUtil<BsProcessesInfo> util = new ExcelUtil<BsProcessesInfo>(BsProcessesInfo.class); |
|
67 |
util.exportExcel(response, list, "工序信息数据"); |
|
68 |
} |
|
69 |
|
|
70 |
/** |
|
71 |
* 获取工序信息详细信息 |
|
72 |
*/ |
|
73 |
@PreAuthorize("@ss.hasPermi('bs:processes:query')") |
|
74 |
@GetMapping(value = "/{id}") |
|
75 |
public AjaxResult getInfo(@PathVariable("id") Long id) |
|
76 |
{ |
|
77 |
return success(bsProcessesInfoService.selectBsProcessesInfoById(id)); |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* 新增工序信息 |
|
82 |
*/ |
|
83 |
@PreAuthorize("@ss.hasPermi('bs:processes:add')") |
|
84 |
@Log(title = "工序信息", businessType = BusinessType.INSERT) |
|
85 |
@PostMapping |
|
86 |
public AjaxResult add(@RequestBody BsProcessesInfo bsProcessesInfo) |
|
87 |
{ |
|
88 |
return toAjax(bsProcessesInfoService.insertBsProcessesInfo(bsProcessesInfo)); |
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
92 |
* 修改工序信息 |
|
93 |
*/ |
|
94 |
@PreAuthorize("@ss.hasPermi('bs:processes:edit')") |
|
95 |
@Log(title = "工序信息", businessType = BusinessType.UPDATE) |
|
96 |
@PutMapping |
|
97 |
public AjaxResult edit(@RequestBody BsProcessesInfo bsProcessesInfo) |
|
98 |
{ |
|
99 |
return toAjax(bsProcessesInfoService.updateBsProcessesInfo(bsProcessesInfo)); |
|
100 |
} |
|
101 |
|
|
102 |
/** |
|
103 |
* 删除工序信息 |
|
104 |
*/ |
|
105 |
@PreAuthorize("@ss.hasPermi('bs:processes:remove')") |
|
106 |
@Log(title = "工序信息", businessType = BusinessType.DELETE) |
|
107 |
@DeleteMapping("/{ids}") |
|
108 |
public AjaxResult remove(@PathVariable Long[] ids) |
|
109 |
{ |
|
110 |
return toAjax(bsProcessesInfoService.deleteBsProcessesInfoByIds(ids)); |
|
111 |
} |
|
112 |
} |