From 9a224d216652ef2d6ff2e0bd01fba69c86a3f277 Mon Sep 17 00:00:00 2001 From: yanzhaofeige <yanzhaofeige@qq.com> Date: Fri, 11 Oct 2024 11:28:55 +0800 Subject: [PATCH] 基础表单更新 --- cpzidc-admin/src/main/java/com/odcc/cpzidc/web/controller/bis/IdcUseTransportController.java | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 104 insertions(+), 0 deletions(-) diff --git a/cpzidc-admin/src/main/java/com/odcc/cpzidc/web/controller/bis/IdcUseTransportController.java b/cpzidc-admin/src/main/java/com/odcc/cpzidc/web/controller/bis/IdcUseTransportController.java new file mode 100644 index 0000000..522f217 --- /dev/null +++ b/cpzidc-admin/src/main/java/com/odcc/cpzidc/web/controller/bis/IdcUseTransportController.java @@ -0,0 +1,104 @@ +package com.odcc.cpzidc.web.controller.bis; + +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.odcc.cpzidc.common.annotation.Log; +import com.odcc.cpzidc.common.core.controller.BaseController; +import com.odcc.cpzidc.common.core.domain.AjaxResult; +import com.odcc.cpzidc.common.enums.BusinessType; +import com.odcc.cpzidc.bis.domain.IdcUseTransport; +import com.odcc.cpzidc.bis.service.IIdcUseTransportService; +import com.odcc.cpzidc.common.utils.poi.ExcelUtil; +import com.odcc.cpzidc.common.core.page.TableDataInfo; + +/** + * 运力指标信息Controller + * + * @author ruoyi + * @date 2024-10-10 + */ +@RestController +@RequestMapping("/bis/useTransport") +public class IdcUseTransportController extends BaseController +{ + @Autowired + private IIdcUseTransportService idcUseTransportService; + + /** + * 查询运力指标信息列表 + */ + @PreAuthorize("@ss.hasPermi('bis:useTransport:list')") + @GetMapping("/list") + public TableDataInfo list(IdcUseTransport idcUseTransport) + { + startPage(); + List<IdcUseTransport> list = idcUseTransportService.selectIdcUseTransportList(idcUseTransport); + return getDataTable(list); + } + + /** + * 导出运力指标信息列表 + */ + @PreAuthorize("@ss.hasPermi('bis:useTransport:export')") + @Log(title = "运力指标信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, IdcUseTransport idcUseTransport) + { + List<IdcUseTransport> list = idcUseTransportService.selectIdcUseTransportList(idcUseTransport); + ExcelUtil<IdcUseTransport> util = new ExcelUtil<IdcUseTransport>(IdcUseTransport.class); + util.exportExcel(response, list, "运力指标信息数据"); + } + + /** + * 获取运力指标信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('bis:useTransport:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(idcUseTransportService.selectIdcUseTransportById(id)); + } + + /** + * 新增运力指标信息 + */ + @PreAuthorize("@ss.hasPermi('bis:useTransport:add')") + @Log(title = "运力指标信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody IdcUseTransport idcUseTransport) + { + return toAjax(idcUseTransportService.insertIdcUseTransport(idcUseTransport)); + } + + /** + * 修改运力指标信息 + */ + @PreAuthorize("@ss.hasPermi('bis:useTransport:edit')") + @Log(title = "运力指标信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody IdcUseTransport idcUseTransport) + { + return toAjax(idcUseTransportService.updateIdcUseTransport(idcUseTransport)); + } + + /** + * 删除运力指标信息 + */ + @PreAuthorize("@ss.hasPermi('bis:useTransport:remove')") + @Log(title = "运力指标信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(idcUseTransportService.deleteIdcUseTransportByIds(ids)); + } +} -- Gitblit v1.9.3