提交 | 用户 | 时间
|
0ca254
|
1 |
package com.jcdm.main.da.paramCollection.controller; |
A |
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 |
@PostMapping("/sendIMesData") |
|
48 |
public void sendIMesData(@RequestBody DaParamCollection daParamCollection) |
|
49 |
{ |
|
50 |
daParamCollectionService.pushGeelycvMesFeedback(daParamCollection.getSfcCode(),daParamCollection.getLocationCode()); |
|
51 |
} |
|
52 |
|
|
53 |
/** |
|
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 |
/** |
|
90 |
* 基础参数增加 |
|
91 |
*/ |
|
92 |
@PostMapping("/addBasicParameters") |
|
93 |
public void addBasicParameters(@RequestBody DaParamCollection daParamCollection) |
|
94 |
{ |
|
95 |
daParamCollectionService.addBasicParameters(daParamCollection); |
|
96 |
} |
|
97 |
|
|
98 |
/** |
|
99 |
* 基础参数增加 |
|
100 |
*/ |
|
101 |
@PostMapping("/yzAddBasicParameters") |
|
102 |
public void yzAddBasicParameters(@RequestBody DaParamCollection daParamCollection) |
|
103 |
{ |
|
104 |
daParamCollectionService.yzAddBasicParameters(daParamCollection); |
|
105 |
} |
|
106 |
|
|
107 |
/** |
|
108 |
* 拧紧参数增加 |
|
109 |
*/ |
|
110 |
@PostMapping("/addTighteningParameters") |
|
111 |
public void addTighteningParameters(@RequestBody DaParamCollection daParamCollection) |
|
112 |
{ |
|
113 |
daParamCollectionService.addTighteningParameters(daParamCollection); |
|
114 |
} |
|
115 |
|
|
116 |
/** |
|
117 |
* 出战时间参数增加 |
|
118 |
*/ |
|
119 |
@PostMapping("/saveCampaignTimeParameters") |
|
120 |
public void saveCampaignTimeParameters(@RequestBody DaParamCollection daParamCollection) |
|
121 |
{ |
|
122 |
daParamCollectionService.saveCampaignTimeParameters(daParamCollection); |
|
123 |
} |
|
124 |
|
|
125 |
/** |
|
126 |
* 出战时间参数增加 |
|
127 |
*/ |
|
128 |
@PostMapping("/preInstallOut") |
|
129 |
public void preInstallOut(@RequestBody DaParamCollection daParamCollection) |
|
130 |
{ |
|
131 |
daParamCollectionService.preInstallOut(daParamCollection); |
|
132 |
} |
|
133 |
|
|
134 |
/** |
|
135 |
* 出战时间参数增加 |
|
136 |
*/ |
|
137 |
@PostMapping("/checkRecordDataDone") |
|
138 |
public AjaxResult checkRecordDataDone(@RequestBody DaParamCollection daParamCollection) |
|
139 |
{ |
|
140 |
return daParamCollectionService.checkRecordDataDone(daParamCollection); |
|
141 |
} |
|
142 |
|
|
143 |
/** |
|
144 |
* 出战时间参数增加 |
|
145 |
*/ |
|
146 |
@PostMapping("/jrmSaveCampaignTimeParameters") |
|
147 |
public void jrmSaveCampaignTimeParameters(@RequestBody DaParamCollection daParamCollection) |
|
148 |
{ |
|
149 |
daParamCollectionService.jrmSaveCampaignTimeParameters(daParamCollection); |
|
150 |
} |
|
151 |
|
|
152 |
|
|
153 |
/** |
|
154 |
* 更换总成号 |
|
155 |
*/ |
|
156 |
@PostMapping("/replaceAssemblyCode") |
|
157 |
public void replaceAssemblyCode(@RequestBody DaParamCollection daParamCollection) |
|
158 |
{ |
|
159 |
daParamCollectionService.replaceAssemblyCode(daParamCollection); |
|
160 |
} |
|
161 |
|
|
162 |
/** |
|
163 |
* 更换总成号 |
|
164 |
*/ |
|
165 |
@PostMapping("/enterWeighing") |
|
166 |
public void enterWeighing(@RequestBody DaParamCollection daParamCollection) |
|
167 |
{ |
|
168 |
daParamCollectionService.enterWeighing(daParamCollection); |
|
169 |
} |
|
170 |
|
|
171 |
/** |
|
172 |
* 修改设备产品过程参数采集 |
|
173 |
*/ |
|
174 |
@PreAuthorize("@ss.hasPermi('main:paramCollection:edit')") |
|
175 |
@Log(title = "设备产品过程参数采集", businessType = BusinessType.UPDATE) |
|
176 |
@PutMapping |
|
177 |
public AjaxResult edit(@RequestBody DaParamCollection daParamCollection) |
|
178 |
{ |
|
179 |
daParamCollection.setUpdateBy(getUsername()); |
|
180 |
daParamCollection.setUpdateTime(DateUtils.getNowDate()); |
|
181 |
return toAjax(daParamCollectionService.updateDaParamCollection(daParamCollection)); |
|
182 |
} |
|
183 |
|
|
184 |
/** |
|
185 |
* 删除设备产品过程参数采集 |
|
186 |
*/ |
|
187 |
@PreAuthorize("@ss.hasPermi('main:paramCollection:remove')") |
|
188 |
@Log(title = "设备产品过程参数采集", businessType = BusinessType.DELETE) |
|
189 |
@DeleteMapping("/{ids}") |
|
190 |
public AjaxResult remove(@PathVariable Long[] ids) |
|
191 |
{ |
|
192 |
return toAjax(daParamCollectionService.deleteDaParamCollectionByIds(ids)); |
|
193 |
} |
|
194 |
|
|
195 |
} |