package com.jcdm.main.da.paramCollectionTemp.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.jcdm.common.annotation.Log; import com.jcdm.common.core.controller.BaseController; import com.jcdm.common.core.domain.AjaxResult; import com.jcdm.common.enums.BusinessType; import com.jcdm.main.da.paramCollectionTemp.domain.DaParamCollectionTemp; import com.jcdm.main.da.paramCollectionTemp.service.IDaParamCollectionTempService; import com.jcdm.common.utils.poi.ExcelUtil; import com.jcdm.common.core.page.TableDataInfo; /** * 设备产品过程参数采集临时表Controller * * @author Yi * @date 2024-06-13 */ @RestController @RequestMapping("/da/paramCollectionTemp") public class DaParamCollectionTempController extends BaseController { @Autowired private IDaParamCollectionTempService daParamCollectionTempService; /** * 查询设备产品过程参数采集临时表列表 */ @PreAuthorize("@ss.hasPermi('da:paramCollectionTemp:list')") @GetMapping("/list") public TableDataInfo list(DaParamCollectionTemp daParamCollectionTemp) { startPage(); List list = daParamCollectionTempService.selectDaParamCollectionTempList(daParamCollectionTemp); return getDataTable(list); } /** * 导出设备产品过程参数采集临时表列表 */ @PreAuthorize("@ss.hasPermi('da:paramCollectionTemp:export')") @Log(title = "设备产品过程参数采集临时表", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, DaParamCollectionTemp daParamCollectionTemp) { List list = daParamCollectionTempService.selectDaParamCollectionTempList(daParamCollectionTemp); ExcelUtil util = new ExcelUtil(DaParamCollectionTemp.class); util.exportExcel(response, list, "设备产品过程参数采集临时表数据"); } /** * 获取设备产品过程参数采集临时表详细信息 */ @PreAuthorize("@ss.hasPermi('da:paramCollectionTemp:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(daParamCollectionTempService.selectDaParamCollectionTempById(id)); } /** * 新增设备产品过程参数采集临时表 */ @PreAuthorize("@ss.hasPermi('da:paramCollectionTemp:add')") @Log(title = "设备产品过程参数采集临时表", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DaParamCollectionTemp daParamCollectionTemp) { return toAjax(daParamCollectionTempService.insertDaParamCollectionTemp(daParamCollectionTemp)); } /** * 修改设备产品过程参数采集临时表 */ @PreAuthorize("@ss.hasPermi('da:paramCollectionTemp:edit')") @Log(title = "设备产品过程参数采集临时表", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody DaParamCollectionTemp daParamCollectionTemp) { return toAjax(daParamCollectionTempService.updateDaParamCollectionTemp(daParamCollectionTemp)); } /** * 删除设备产品过程参数采集临时表 */ @PreAuthorize("@ss.hasPermi('da:paramCollectionTemp:remove')") @Log(title = "设备产品过程参数采集临时表", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(daParamCollectionTempService.deleteDaParamCollectionTempByIds(ids)); } }