md
This commit is contained in:
parent
f4e985c943
commit
9c511806a9
@ -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: <p> 费用类型 控制器 </p>
|
||||||
|
*/
|
||||||
|
|
||||||
|
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<EmisFeeType> 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<EmisFeeType> list = emisFeeTypeService.selectEmisFeeTypeList(emisFeeType);
|
||||||
|
ExcelUtil<EmisFeeType> util = new ExcelUtil<EmisFeeType>(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));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user