-
admin
2024-04-25 5316c506119ad056a5640650e5e79babe4194d38
提交 | 用户 | 时间
e57a89 1 package com.jcdm.main.da.paramCollection.controller;
2
3 import com.jcdm.common.annotation.Log;
4 import com.jcdm.common.core.controller.BaseController;
5 import com.jcdm.common.core.domain.AjaxResult;
6 import com.jcdm.common.core.page.TableDataInfo;
7 import com.jcdm.common.enums.BusinessType;
8 import com.jcdm.common.utils.DateUtils;
9 import com.jcdm.common.utils.poi.ExcelUtil;
10 import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
11 import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
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;
18
19 /**
20  * 设备产品过程参数采集Controller
21  * 
22  * @author yyt
23  * @date 2023-12-13
24  */
25 @RestController
26 @RequestMapping("/main/paramCollection")
27 public class DaParamCollectionController extends BaseController
28 {
29     @Autowired
30     private IDaParamCollectionService daParamCollectionService;
31
32     /**
33      * 查询设备产品过程参数采集列表
34      */
35     @PreAuthorize("@ss.hasPermi('main:paramCollection:list')")
36     @GetMapping("/list")
37     public TableDataInfo list(DaParamCollection daParamCollection)
38     {
39         startPage();
40         List<DaParamCollection> list = daParamCollectionService.selectDaParamCollectionList(daParamCollection);
41         return getDataTable(list);
42     }
43
44     /**
45      * 导出设备产品过程参数采集列表
46      */
47     @PreAuthorize("@ss.hasPermi('main:paramCollection:export')")
48     @Log(title = "设备产品过程参数采集", businessType = BusinessType.EXPORT)
49     @PostMapping("/export")
50     public void export(HttpServletResponse response, DaParamCollection daParamCollection)
51     {
52         List<DaParamCollection> list = daParamCollectionService.selectDaParamCollectionList(daParamCollection);
53         ExcelUtil<DaParamCollection> util = new ExcelUtil<DaParamCollection>(DaParamCollection.class);
54         util.exportExcel(response, list, "设备产品过程参数采集数据");
55     }
56
57     /**
58      * 获取设备产品过程参数采集详细信息
59      */
60     @PreAuthorize("@ss.hasPermi('main:paramCollection:query')")
61     @GetMapping(value = "/{id}")
62     public AjaxResult getInfo(@PathVariable("id") Long id)
63     {
64         return success(daParamCollectionService.selectDaParamCollectionById(id));
65     }
66
67     /**
68      * 新增设备产品过程参数采集
69      */
70     @PreAuthorize("@ss.hasPermi('main:paramCollection:add')")
71     @Log(title = "设备产品过程参数采集", businessType = BusinessType.INSERT)
72     @PostMapping
73     public AjaxResult add(@RequestBody DaParamCollection daParamCollection)
74     {
75         daParamCollection.setCreateBy(getUsername());
76         daParamCollection.setCreateTime(DateUtils.getNowDate());
77         return toAjax(daParamCollectionService.insertDaParamCollection(daParamCollection));
78     }
79
80     /**
b64ed2 81      * 基础参数增加
82      */
83     @PostMapping("/addBasicParameters")
84     public void addBasicParameters(@RequestBody DaParamCollection daParamCollection)
85     {
86         daParamCollectionService.addBasicParameters(daParamCollection);
87     }
88
89     /**
49c784 90      * 拧紧参数增加
91      */
92     @PostMapping("/addTighteningParameters")
93     public void addTighteningParameters(@RequestBody DaParamCollection daParamCollection)
94     {
95         daParamCollectionService.addTighteningParameters(daParamCollection);
96     }
97
98     /**
32483a 99      * 出战时间参数增加
100      */
101     @PostMapping("/saveCampaignTimeParameters")
102     public void saveCampaignTimeParameters(@RequestBody DaParamCollection daParamCollection)
103     {
104         daParamCollectionService.saveCampaignTimeParameters(daParamCollection);
105     }
106
107     /**
ddb300 108      * 更换总成号
A 109      */
110     @PostMapping("/replaceAssemblyCode")
111     public void replaceAssemblyCode(@RequestBody DaParamCollection daParamCollection)
112     {
113         daParamCollectionService.replaceAssemblyCode(daParamCollection);
114     }
115
116     /**
e57a89 117      * 修改设备产品过程参数采集
118      */
119     @PreAuthorize("@ss.hasPermi('main:paramCollection:edit')")
120     @Log(title = "设备产品过程参数采集", businessType = BusinessType.UPDATE)
121     @PutMapping
122     public AjaxResult edit(@RequestBody DaParamCollection daParamCollection)
123     {
124         daParamCollection.setUpdateBy(getUsername());
125         daParamCollection.setUpdateTime(DateUtils.getNowDate());
126         return toAjax(daParamCollectionService.updateDaParamCollection(daParamCollection));
127     }
128
129     /**
130      * 删除设备产品过程参数采集
131      */
132     @PreAuthorize("@ss.hasPermi('main:paramCollection:remove')")
133     @Log(title = "设备产品过程参数采集", businessType = BusinessType.DELETE)
134     @DeleteMapping("/{ids}")
135     public AjaxResult remove(@PathVariable Long[] ids)
136     {
137         return toAjax(daParamCollectionService.deleteDaParamCollectionByIds(ids));
138     }
49c784 139
e57a89 140 }