123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- package com.phm.web.controller;
- import java.util.List;
- import javax.servlet.http.HttpServletResponse;
- import org.springframework.security.access.prepost.PreAuthorize;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.PutMapping;
- import org.springframework.web.bind.annotation.DeleteMapping;
- import org.springframework.web.bind.annotation.PathVariable;
- 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.enums.BusinessType;
- import com.phm.web.domain.DeriveParameter;
- import com.phm.web.service.IDeriveParameterService;
- import com.phm.common.utils.poi.ExcelUtil;
- import com.phm.common.core.page.TableDataInfo;
- /**
- * 衍生参数信息Controller
- *
- * @author phm
- * @date 2023-08-22
- */
- @RestController
- @RequestMapping("/manage/deriveParameter")
- public class DeriveParameterController extends BaseController {
- @Autowired
- private IDeriveParameterService deriveParameterService;
- /**
- * 查询衍生参数信息列表
- */
- @PreAuthorize("@ss.hasPermi('manage:deriveParameter:list')")
- @GetMapping("/list")
- public TableDataInfo list(DeriveParameter deriveParameter) {
- startPage();
- List<DeriveParameter> list = deriveParameterService.selectDeriveParameterList(deriveParameter);
- return getDataTable(list);
- }
- /**
- * 导出衍生参数信息列表
- */
- @PreAuthorize("@ss.hasPermi('manage:deriveParameter:export')")
- @Log(title = "衍生参数信息", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, DeriveParameter deriveParameter) {
- List<DeriveParameter> list = deriveParameterService.selectDeriveParameterList(deriveParameter);
- ExcelUtil<DeriveParameter> util = new ExcelUtil<DeriveParameter>(DeriveParameter.class);
- util.exportExcel(response, list, "衍生参数信息数据");
- }
- /**
- * 获取衍生参数信息详细信息
- */
- @PreAuthorize("@ss.hasPermi('manage:deriveParameter:query')")
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id) {
- return success(deriveParameterService.selectDeriveParameterById(id));
- }
- /**
- * 新增衍生参数信息
- */
- @PreAuthorize("@ss.hasPermi('manage:deriveParameter:add')")
- @Log(title = "衍生参数信息", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody DeriveParameter deriveParameter) {
- return toAjax(deriveParameterService.insertDeriveParameter(deriveParameter));
- }
- /**
- * 修改衍生参数信息
- */
- @PreAuthorize("@ss.hasPermi('manage:deriveParameter:edit')")
- @Log(title = "衍生参数信息", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody DeriveParameter deriveParameter) {
- return toAjax(deriveParameterService.updateDeriveParameter(deriveParameter));
- }
- /**
- * 删除衍生参数信息
- */
- @PreAuthorize("@ss.hasPermi('manage:deriveParameter:remove')")
- @Log(title = "衍生参数信息", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids) {
- return toAjax(deriveParameterService.deleteDeriveParameterByIds(ids));
- }
- }
|