-
admin
2024-05-10 1c84aef7b3d88ce9f2ac5d3173f892a1cd727800
提交 | 用户 | 时间
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     /**
4a5f2a 90      * 基础参数增加
A 91      */
92     @PostMapping("/yzAddBasicParameters")
93     public void yzAddBasicParameters(@RequestBody DaParamCollection daParamCollection)
94     {
95         daParamCollectionService.yzAddBasicParameters(daParamCollection);
96     }
97
98     /**
49c784 99      * 拧紧参数增加
100      */
101     @PostMapping("/addTighteningParameters")
102     public void addTighteningParameters(@RequestBody DaParamCollection daParamCollection)
103     {
104         daParamCollectionService.addTighteningParameters(daParamCollection);
105     }
106
107     /**
32483a 108      * 出战时间参数增加
109      */
110     @PostMapping("/saveCampaignTimeParameters")
111     public void saveCampaignTimeParameters(@RequestBody DaParamCollection daParamCollection)
112     {
113         daParamCollectionService.saveCampaignTimeParameters(daParamCollection);
114     }
115
116     /**
1c84ae 117      * 出战时间参数增加
A 118      */
119     @PostMapping("/jrmSaveCampaignTimeParameters")
120     public void jrmSaveCampaignTimeParameters(@RequestBody DaParamCollection daParamCollection)
121     {
122         daParamCollectionService.jrmSaveCampaignTimeParameters(daParamCollection);
123     }
124
125
126     /**
ddb300 127      * 更换总成号
A 128      */
129     @PostMapping("/replaceAssemblyCode")
130     public void replaceAssemblyCode(@RequestBody DaParamCollection daParamCollection)
131     {
132         daParamCollectionService.replaceAssemblyCode(daParamCollection);
133     }
134
135     /**
e57a89 136      * 修改设备产品过程参数采集
137      */
138     @PreAuthorize("@ss.hasPermi('main:paramCollection:edit')")
139     @Log(title = "设备产品过程参数采集", businessType = BusinessType.UPDATE)
140     @PutMapping
141     public AjaxResult edit(@RequestBody DaParamCollection daParamCollection)
142     {
143         daParamCollection.setUpdateBy(getUsername());
144         daParamCollection.setUpdateTime(DateUtils.getNowDate());
145         return toAjax(daParamCollectionService.updateDaParamCollection(daParamCollection));
146     }
147
148     /**
149      * 删除设备产品过程参数采集
150      */
151     @PreAuthorize("@ss.hasPermi('main:paramCollection:remove')")
152     @Log(title = "设备产品过程参数采集", businessType = BusinessType.DELETE)
153     @DeleteMapping("/{ids}")
154     public AjaxResult remove(@PathVariable Long[] ids)
155     {
156         return toAjax(daParamCollectionService.deleteDaParamCollectionByIds(ids));
157     }
49c784 158
e57a89 159 }