|
@@ -1,14 +1,30 @@
|
|
|
package com.phm.manage.controller;
|
|
|
|
|
|
-import com.phm.manage.service.ISortieParameterService;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import com.phm.manage.domain.dto.DataParameterRequest;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import com.phm.common.annotation.Log;
|
|
|
+import com.phm.common.core.controller.BaseController;
|
|
|
+import com.phm.common.core.domain.AjaxResult;
|
|
|
+import com.phm.common.core.page.TableDataInfo;
|
|
|
+import com.phm.common.enums.BusinessType;
|
|
|
+import com.phm.common.utils.poi.ExcelUtil;
|
|
|
import com.phm.manage.domain.SortieParameter;
|
|
|
import com.phm.manage.domain.common.CommonResult;
|
|
|
+import com.phm.manage.service.ISortieParameterService;
|
|
|
|
|
|
/**
|
|
|
* @Description SortieParameterController
|
|
@@ -17,13 +33,93 @@ import com.phm.manage.domain.common.CommonResult;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/manage/sortieParameter")
|
|
|
-public class SortieParameterController {
|
|
|
+public class SortieParameterController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private ISortieParameterService sortieParameterService;
|
|
|
|
|
|
- @GetMapping(value = "/{id}")
|
|
|
+ @GetMapping(value = "data/{id}")
|
|
|
public CommonResult<String> getSortieData(@PathVariable("id") Long id) {
|
|
|
return CommonResult.success(sortieParameterService.getSortieData(id));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询模型参数信息列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('manage:sortieParameter:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(SortieParameter sortieParameter) {
|
|
|
+ startPage();
|
|
|
+ List<SortieParameter> list = sortieParameterService.selectSortieParameterList(sortieParameter);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出模型参数信息列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('manage:sortieParameter:export')")
|
|
|
+ @Log(title = "模型参数信息", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/export")
|
|
|
+ public void export(HttpServletResponse response, SortieParameter sortieParameter) {
|
|
|
+ List<SortieParameter> list = sortieParameterService.selectSortieParameterList(sortieParameter);
|
|
|
+ ExcelUtil<SortieParameter> util = new ExcelUtil<SortieParameter>(SortieParameter.class);
|
|
|
+ util.exportExcel(response, list, "模型参数信息数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取模型参数信息详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('manage:sortieParameter:query')")
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
+ return success(sortieParameterService.selectSortieParameterById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增模型参数信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('manage:sortieParameter:add')")
|
|
|
+ @Log(title = "模型参数信息", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody SortieParameter sortieParameter) {
|
|
|
+ return toAjax(sortieParameterService.insertSortieParameter(sortieParameter));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改模型参数信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('manage:sortieParameter:edit')")
|
|
|
+ @Log(title = "模型参数信息", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody SortieParameter sortieParameter) {
|
|
|
+ return toAjax(sortieParameterService.updateSortieParameter(sortieParameter));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除模型参数信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('manage:sortieParameter:remove')")
|
|
|
+ @Log(title = "模型参数信息", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
+ return toAjax(sortieParameterService.deleteSortieParameterByIds(ids));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据架次号获取全部数据
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('manage:sortieParameter:query')")
|
|
|
+ @PostMapping("/dataByName")
|
|
|
+ public CommonResult<String> getData(@RequestBody DataParameterRequest request) {
|
|
|
+ return CommonResult.success(sortieParameterService.getSortieDataByName(request));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据架次号获取参数名称
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('manage:sortieParameter:query')")
|
|
|
+ @GetMapping(value = "/dataName/{sortieNumber}")
|
|
|
+ public CommonResult<List<String>> getDataName(@PathVariable("sortieNumber") String sortieNumber) {
|
|
|
+ return CommonResult.success(sortieParameterService.getSortieDataNameByNo(sortieNumber));
|
|
|
+ }
|
|
|
}
|