admin
2024-07-23 01beb5de6b270341bf1ffd7a4319035ebbff31a0
提交 | 用户 | 时间
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     /**
5966d6 45      * 查询设备产品过程参数采集列表
A 46      */
a759f5 47     @PostMapping("/sendIMesData")
A 48     public void sendIMesData(@RequestBody DaParamCollection daParamCollection)
5966d6 49     {
a759f5 50         daParamCollectionService.pushGeelycvMesFeedback(daParamCollection.getSfcCode(),daParamCollection.getLocationCode());
5966d6 51     }
A 52
53     /**
e57a89 54      * 导出设备产品过程参数采集列表
55      */
56     @PreAuthorize("@ss.hasPermi('main:paramCollection:export')")
57     @Log(title = "设备产品过程参数采集", businessType = BusinessType.EXPORT)
58     @PostMapping("/export")
59     public void export(HttpServletResponse response, DaParamCollection daParamCollection)
60     {
61         List<DaParamCollection> list = daParamCollectionService.selectDaParamCollectionList(daParamCollection);
62         ExcelUtil<DaParamCollection> util = new ExcelUtil<DaParamCollection>(DaParamCollection.class);
63         util.exportExcel(response, list, "设备产品过程参数采集数据");
64     }
65
66     /**
67      * 获取设备产品过程参数采集详细信息
68      */
69     @PreAuthorize("@ss.hasPermi('main:paramCollection:query')")
70     @GetMapping(value = "/{id}")
71     public AjaxResult getInfo(@PathVariable("id") Long id)
72     {
73         return success(daParamCollectionService.selectDaParamCollectionById(id));
74     }
75
76     /**
77      * 新增设备产品过程参数采集
78      */
79     @PreAuthorize("@ss.hasPermi('main:paramCollection:add')")
80     @Log(title = "设备产品过程参数采集", businessType = BusinessType.INSERT)
81     @PostMapping
82     public AjaxResult add(@RequestBody DaParamCollection daParamCollection)
83     {
84         daParamCollection.setCreateBy(getUsername());
85         daParamCollection.setCreateTime(DateUtils.getNowDate());
86         return toAjax(daParamCollectionService.insertDaParamCollection(daParamCollection));
87     }
88
89     /**
b64ed2 90      * 基础参数增加
91      */
92     @PostMapping("/addBasicParameters")
93     public void addBasicParameters(@RequestBody DaParamCollection daParamCollection)
94     {
95         daParamCollectionService.addBasicParameters(daParamCollection);
96     }
97
98     /**
4a5f2a 99      * 基础参数增加
A 100      */
101     @PostMapping("/yzAddBasicParameters")
102     public void yzAddBasicParameters(@RequestBody DaParamCollection daParamCollection)
103     {
104         daParamCollectionService.yzAddBasicParameters(daParamCollection);
105     }
106
107     /**
49c784 108      * 拧紧参数增加
109      */
110     @PostMapping("/addTighteningParameters")
111     public void addTighteningParameters(@RequestBody DaParamCollection daParamCollection)
112     {
113         daParamCollectionService.addTighteningParameters(daParamCollection);
114     }
115
116     /**
32483a 117      * 出战时间参数增加
118      */
119     @PostMapping("/saveCampaignTimeParameters")
120     public void saveCampaignTimeParameters(@RequestBody DaParamCollection daParamCollection)
121     {
122         daParamCollectionService.saveCampaignTimeParameters(daParamCollection);
123     }
124
125     /**
1c84ae 126      * 出战时间参数增加
A 127      */
01beb5 128     @PostMapping("/addRepairTighteningData")
A 129     public AjaxResult addRepairTighteningData(@RequestBody DaParamCollection daParamCollection)
130     {
131         return daParamCollectionService.addRepairTighteningData(daParamCollection);
132     }
133
134     /**
135      * 出战时间参数增加
136      */
768498 137     @PostMapping("/preInstallOut")
A 138     public void preInstallOut(@RequestBody DaParamCollection daParamCollection)
139     {
140         daParamCollectionService.preInstallOut(daParamCollection);
141     }
142
143     /**
144      * 出战时间参数增加
145      */
237733 146     @PostMapping("/checkRecordDataDone")
A 147     public AjaxResult checkRecordDataDone(@RequestBody DaParamCollection daParamCollection)
148     {
149         return daParamCollectionService.checkRecordDataDone(daParamCollection);
150     }
151
152     /**
153      * 出战时间参数增加
154      */
1c84ae 155     @PostMapping("/jrmSaveCampaignTimeParameters")
A 156     public void jrmSaveCampaignTimeParameters(@RequestBody DaParamCollection daParamCollection)
157     {
158         daParamCollectionService.jrmSaveCampaignTimeParameters(daParamCollection);
159     }
160
161
162     /**
ddb300 163      * 更换总成号
A 164      */
165     @PostMapping("/replaceAssemblyCode")
166     public void replaceAssemblyCode(@RequestBody DaParamCollection daParamCollection)
167     {
168         daParamCollectionService.replaceAssemblyCode(daParamCollection);
169     }
170
171     /**
8cfe20 172      * 更换总成号
A 173      */
174     @PostMapping("/enterWeighing")
175     public void enterWeighing(@RequestBody DaParamCollection daParamCollection)
176     {
177         daParamCollectionService.enterWeighing(daParamCollection);
178     }
179
180     /**
e57a89 181      * 修改设备产品过程参数采集
182      */
183     @PreAuthorize("@ss.hasPermi('main:paramCollection:edit')")
184     @Log(title = "设备产品过程参数采集", businessType = BusinessType.UPDATE)
185     @PutMapping
186     public AjaxResult edit(@RequestBody DaParamCollection daParamCollection)
187     {
188         daParamCollection.setUpdateBy(getUsername());
189         daParamCollection.setUpdateTime(DateUtils.getNowDate());
190         return toAjax(daParamCollectionService.updateDaParamCollection(daParamCollection));
191     }
192
193     /**
194      * 删除设备产品过程参数采集
195      */
196     @PreAuthorize("@ss.hasPermi('main:paramCollection:remove')")
197     @Log(title = "设备产品过程参数采集", businessType = BusinessType.DELETE)
198     @DeleteMapping("/{ids}")
199     public AjaxResult remove(@PathVariable Long[] ids)
200     {
201         return toAjax(daParamCollectionService.deleteDaParamCollectionByIds(ids));
202     }
49c784 203
e57a89 204 }