春风项目四线(合箱线、总装线)
wujian
2024-04-27 f4cb4dab73beecc4c03a52f8d971e007c9c287f9
提交 | 用户 | 时间
9e6d86 1 package com.jcdm.main.bs.technologyRouteChild.controller;
fd2207 2
3 import com.jcdm.common.annotation.Log;
4 import com.jcdm.common.core.controller.BaseController;
5 import com.jcdm.common.core.domain.AjaxResult;
2b59de 6 import com.jcdm.common.core.domain.R;
fd2207 7 import com.jcdm.common.core.page.TableDataInfo;
9e6d86 8 import com.jcdm.common.enums.BusinessType;
W 9 import com.jcdm.common.utils.poi.ExcelUtil;
10 import com.jcdm.main.bs.domain.BsTechnologyRouteChildInfo;
11 import com.jcdm.main.bs.technologyRouteChild.service.IBsTechnologyRouteChildInfoService;
12 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.security.access.prepost.PreAuthorize;
14 import org.springframework.web.bind.annotation.*;
15
16 import javax.servlet.http.HttpServletResponse;
17 import java.util.List;
fd2207 18
19 /**
20  * 工艺路线子信息Controller
21  * 
22  * @author ruimin
23  * @date 2023-12-09
24  */
25 @RestController
26 @RequestMapping("/bs/technologyRouteChild")
27 public class BsTechnologyRouteChildInfoController extends BaseController
28 {
29     @Autowired
30     private IBsTechnologyRouteChildInfoService bsTechnologyRouteChildInfoService;
31
32     /**
33      * 查询工艺路线子信息列表
34      */
35     @PreAuthorize("@ss.hasPermi('bs:technologyRouteChild:list')")
36     @GetMapping("/list")
37     public TableDataInfo list(BsTechnologyRouteChildInfo bsTechnologyRouteChildInfo)
38     {
39         startPage();
40         List<BsTechnologyRouteChildInfo> list = bsTechnologyRouteChildInfoService.selectBsTechnologyRouteChildInfoList(bsTechnologyRouteChildInfo);
41         return getDataTable(list);
42     }
43
44     /**
45      * 导出工艺路线子信息列表
46      */
47     @PreAuthorize("@ss.hasPermi('bs:technologyRouteChild:export')")
48     @Log(title = "工艺路线子信息", businessType = BusinessType.EXPORT)
49     @PostMapping("/export")
50     public void export(HttpServletResponse response, BsTechnologyRouteChildInfo bsTechnologyRouteChildInfo)
51     {
52         List<BsTechnologyRouteChildInfo> list = bsTechnologyRouteChildInfoService.selectBsTechnologyRouteChildInfoList(bsTechnologyRouteChildInfo);
53         ExcelUtil<BsTechnologyRouteChildInfo> util = new ExcelUtil<BsTechnologyRouteChildInfo>(BsTechnologyRouteChildInfo.class);
54         util.exportExcel(response, list, "工艺路线子信息数据");
55     }
56
57     /**
58      * 获取工艺路线子信息详细信息
59      */
60     @PreAuthorize("@ss.hasPermi('bs:technologyRouteChild:query')")
61     @GetMapping(value = "/{id}")
62     public AjaxResult getInfo(@PathVariable("id") Long id)
63     {
64         return success(bsTechnologyRouteChildInfoService.selectBsTechnologyRouteChildInfoById(id));
65     }
66
67     /**
68      * 新增工艺路线子信息
69      */
70     @PreAuthorize("@ss.hasPermi('bs:technologyRouteChild:add')")
71     @Log(title = "工艺路线子信息", businessType = BusinessType.INSERT)
72     @PostMapping
73     public AjaxResult add(@RequestBody BsTechnologyRouteChildInfo bsTechnologyRouteChildInfo)
74     {
75         return toAjax(bsTechnologyRouteChildInfoService.insertBsTechnologyRouteChildInfo(bsTechnologyRouteChildInfo));
76     }
77
78     /**
79      * 修改工艺路线子信息
80      */
81     @PreAuthorize("@ss.hasPermi('bs:technologyRouteChild:edit')")
82     @Log(title = "工艺路线子信息", businessType = BusinessType.UPDATE)
83     @PutMapping
84     public AjaxResult edit(@RequestBody BsTechnologyRouteChildInfo bsTechnologyRouteChildInfo)
85     {
86         return toAjax(bsTechnologyRouteChildInfoService.updateBsTechnologyRouteChildInfo(bsTechnologyRouteChildInfo));
87     }
88
89     /**
90      * 删除工艺路线子信息
91      */
92     @PreAuthorize("@ss.hasPermi('bs:technologyRouteChild:remove')")
93     @Log(title = "工艺路线子信息", businessType = BusinessType.DELETE)
94     @DeleteMapping("/{ids}")
95     public AjaxResult remove(@PathVariable Long[] ids)
96     {
97         return toAjax(bsTechnologyRouteChildInfoService.deleteBsTechnologyRouteChildInfoByIds(ids));
98     }
2b59de 99
W 100     @GetMapping("/ttest")
101     public R Test(){
102         String code = "191S";
103         List<BsTechnologyRouteChildInfo> bsTechnologyRouteChildInfos = bsTechnologyRouteChildInfoService.selectAllTechnologyRouteByProductCode(code);
104         return R.ok(bsTechnologyRouteChildInfos);
105     }
fd2207 106 }