-
admin
2024-05-28 2377332554103dcbc54fff45777ef1c67cf0fb0e
提交 | 用户 | 时间
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      */
47     @GetMapping("/testput")
48     public void testput()
49     {
237733 50         daParamCollectionService.pushGeelycvMesFeedback("0RSPB001139E3AE5B0000054","OP240");
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      */
237733 128     @PostMapping("/checkRecordDataDone")
A 129     public AjaxResult checkRecordDataDone(@RequestBody DaParamCollection daParamCollection)
130     {
131         return daParamCollectionService.checkRecordDataDone(daParamCollection);
132     }
133
134     /**
135      * 出战时间参数增加
136      */
1c84ae 137     @PostMapping("/jrmSaveCampaignTimeParameters")
A 138     public void jrmSaveCampaignTimeParameters(@RequestBody DaParamCollection daParamCollection)
139     {
140         daParamCollectionService.jrmSaveCampaignTimeParameters(daParamCollection);
141     }
142
143
144     /**
ddb300 145      * 更换总成号
A 146      */
147     @PostMapping("/replaceAssemblyCode")
148     public void replaceAssemblyCode(@RequestBody DaParamCollection daParamCollection)
149     {
150         daParamCollectionService.replaceAssemblyCode(daParamCollection);
151     }
152
153     /**
e57a89 154      * 修改设备产品过程参数采集
155      */
156     @PreAuthorize("@ss.hasPermi('main:paramCollection:edit')")
157     @Log(title = "设备产品过程参数采集", businessType = BusinessType.UPDATE)
158     @PutMapping
159     public AjaxResult edit(@RequestBody DaParamCollection daParamCollection)
160     {
161         daParamCollection.setUpdateBy(getUsername());
162         daParamCollection.setUpdateTime(DateUtils.getNowDate());
163         return toAjax(daParamCollectionService.updateDaParamCollection(daParamCollection));
164     }
165
166     /**
167      * 删除设备产品过程参数采集
168      */
169     @PreAuthorize("@ss.hasPermi('main:paramCollection:remove')")
170     @Log(title = "设备产品过程参数采集", businessType = BusinessType.DELETE)
171     @DeleteMapping("/{ids}")
172     public AjaxResult remove(@PathVariable Long[] ids)
173     {
174         return toAjax(daParamCollectionService.deleteDaParamCollectionByIds(ids));
175     }
49c784 176
e57a89 177 }