123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- package com.onemap.system.controller;
- import java.util.List;
- import java.io.IOException;
- import javax.servlet.http.HttpServletResponse;
- 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.onemap.common.log.annotation.Log;
- import com.onemap.common.log.enums.BusinessType;
- import com.onemap.common.security.annotation.RequiresPermissions;
- import com.onemap.system.domain.TCgglScmx;
- import com.onemap.system.service.ITCgglScmxService;
- import com.onemap.common.core.web.controller.BaseController;
- import com.onemap.common.core.web.domain.AjaxResult;
- import com.onemap.common.core.utils.poi.ExcelUtil;
- import com.onemap.common.core.web.page.TableDataInfo;
- /**
- * 规划成果审查模型配置Controller
- *
- * @author siwei
- * @date 2025-02-07
- */
- @RestController
- @RequestMapping("/scmx")
- public class TCgglScmxController extends BaseController
- {
- @Autowired
- private ITCgglScmxService tCgglScmxService;
- /**
- * 查询规划成果审查模型配置列表
- */
- @RequiresPermissions("system:scmx:list")
- @GetMapping("/list")
- public TableDataInfo list(TCgglScmx tCgglScmx)
- {
- startPage();
- List<TCgglScmx> list = tCgglScmxService.selectTCgglScmxList(tCgglScmx);
- return getDataTable(list);
- }
- /**
- * 导出规划成果审查模型配置列表
- */
- @RequiresPermissions("system:scmx:export")
- @Log(title = "规划成果审查模型配置", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, TCgglScmx tCgglScmx)
- {
- List<TCgglScmx> list = tCgglScmxService.selectTCgglScmxList(tCgglScmx);
- ExcelUtil<TCgglScmx> util = new ExcelUtil<TCgglScmx>(TCgglScmx.class);
- util.exportExcel(response, list, "规划成果审查模型配置数据");
- }
- /**
- * 获取规划成果审查模型配置详细信息
- */
- @RequiresPermissions("system:scmx:query")
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") String id)
- {
- return success(tCgglScmxService.selectTCgglScmxById(id));
- }
- /**
- * 新增规划成果审查模型配置
- */
- @RequiresPermissions("system:scmx:add")
- @Log(title = "规划成果审查模型配置", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody TCgglScmx tCgglScmx)
- {
- return toAjax(tCgglScmxService.insertTCgglScmx(tCgglScmx));
- }
- /**
- * 修改规划成果审查模型配置
- */
- @RequiresPermissions("system:scmx:edit")
- @Log(title = "规划成果审查模型配置", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody TCgglScmx tCgglScmx)
- {
- return toAjax(tCgglScmxService.updateTCgglScmx(tCgglScmx));
- }
- /**
- * 删除规划成果审查模型配置
- */
- @RequiresPermissions("system:scmx:remove")
- @Log(title = "规划成果审查模型配置", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable String[] ids)
- {
- return toAjax(tCgglScmxService.deleteTCgglScmxByIds(ids));
- }
- }
|