From 9c511806a9ab762a1108330cd74cd7cc4bd36bb8 Mon Sep 17 00:00:00 2001 From: linfso Date: Sat, 13 Jan 2024 00:54:09 +0800 Subject: [PATCH] md --- .../erp/web/emis/EmisFeeTypeController.java | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisFeeTypeController.java diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisFeeTypeController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisFeeTypeController.java new file mode 100644 index 000000000..fe567673f --- /dev/null +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisFeeTypeController.java @@ -0,0 +1,118 @@ + +/** + * @Project: emis + * @Title: EmisFeeTypeController.java + * @author linfso + * @date 2024-01-12 10:12:04 + * @Copyright: ShangHai Duta 2022 All rights reserved. + * @version v1.0 + * @Description:

费用类型 控制器

+ */ + +package com.xdadan.erp.web.emis; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +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.xdadan.erp.common.annotation.Log; +import com.xdadan.erp.common.core.controller.BaseController; +import com.xdadan.erp.common.core.domain.AjaxResult; +import com.xdadan.erp.common.core.page.TableDataInfo; +import com.xdadan.erp.common.enums.BusinessType; +import com.xdadan.erp.common.utils.StringUtils; +import com.xdadan.erp.common.utils.poi.ExcelUtil; + +import com.xdadan.erp.emis.domain.EmisFeeType; +import com.xdadan.erp.emis.service.IEmisFeeTypeService; + +/** + * 费用类型Controller + * + * @author linfso + * @date 2024-01-12 10:12:04 + */ +@RestController +@RequestMapping("/emis/emisFeeType") +public class EmisFeeTypeController extends BaseController +{ + @Autowired + private IEmisFeeTypeService emisFeeTypeService; + + /** + * 查询费用类型列表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisFeeType:list')") + @GetMapping("/list") + public TableDataInfo list(EmisFeeType emisFeeType) + { + startPage(); + List list = emisFeeTypeService.selectEmisFeeTypeList(emisFeeType); + return getDataTable(list); + } + + /** + * 导出费用类型列表 + */ + @PreAuthorize("@ss.hasPermi('emis:emisFeeType:export')") + @Log(title = "费用类型", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EmisFeeType emisFeeType) + { + List list = emisFeeTypeService.selectEmisFeeTypeList(emisFeeType); + ExcelUtil util = new ExcelUtil(EmisFeeType.class); + util.exportExcel(response, list, "费用类型数据"); + } + + /** + * 获取费用类型详细信息 + */ + @PreAuthorize("@ss.hasPermi('emis:emisFeeType:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(emisFeeTypeService.selectEmisFeeTypeById(id)); + } + + /** + * 新增费用类型 + */ + @PreAuthorize("@ss.hasPermi('emis:emisFeeType:add')") + @Log(title = "费用类型", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EmisFeeType emisFeeType) + { + return toAjax(emisFeeTypeService.insertEmisFeeType(emisFeeType)); + } + + /** + * 修改费用类型 + */ + @PreAuthorize("@ss.hasPermi('emis:emisFeeType:edit')") + @Log(title = "费用类型", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EmisFeeType emisFeeType) + { + return toAjax(emisFeeTypeService.updateEmisFeeType(emisFeeType)); + } + + /** + * 删除费用类型 + */ + @PreAuthorize("@ss.hasPermi('emis:emisFeeType:remove')") + @Log(title = "费用类型", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(emisFeeTypeService.deleteEmisFeeTypeByIds(ids)); + } +}