zjh
2023-10-18 20072a656c2698e98064d80b62e8e45041d447da
ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictSfxmController.java
@@ -1,13 +1,12 @@
package com.ltkj.web.controller.system;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.extra.pinyin.PinyinUtil;
import com.ltkj.framework.config.MatchUtils;
import com.ltkj.hosp.domain.DictHosp;
import com.ltkj.hosp.domain.DictSfxm;
import com.ltkj.hosp.domain.TjCustomer;
@@ -45,11 +44,16 @@
    /**
     * 查询收费项目列表
     */
    @PreAuthorize("@ss.hasPermi('system:sfxm:list')")
//    @PreAuthorize("@ss.hasPermi('system:sfxm:list')")
    @GetMapping("/list")
    @ApiOperation(value = "查询")
    public TableDataInfo list(DictSfxm dictSfxm) {
        startPage();
        String pym = dictSfxm.getPym();
        if(null !=pym && !"".equals(pym)) {
            pym=dictSfxm.getPym().toUpperCase(Locale.ROOT);
            dictSfxm.setPym(pym);
        }
        List<DictSfxm> list = dictSfxmService.selectDictSfxmList(dictSfxm);
        if (null != list && list.size() > 0) {
            for (DictSfxm sfxm : list) {
@@ -65,7 +69,7 @@
    /**
     * 导出收费项目列表
     */
    @PreAuthorize("@ss.hasPermi('system:sfxm:export')")
//    @PreAuthorize("@ss.hasPermi('system:sfxm:export')")
    @Log(title = "收费项目", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    @ApiOperation(value = "导出")
@@ -78,7 +82,7 @@
    /**
     * 获取收费项目详细信息
     */
    @PreAuthorize("@ss.hasPermi('system:sfxm:query')")
//    @PreAuthorize("@ss.hasPermi('system:sfxm:query')")
    @GetMapping(value = "/{id}")
    @ApiOperation(value = "详情信息")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
@@ -88,18 +92,20 @@
    /**
     * 新增收费项目
     */
    @PreAuthorize("@ss.hasPermi('system:sfxm:add')")
//    @PreAuthorize("@ss.hasPermi('system:sfxm:add')")
    @Log(title = "收费项目", businessType = BusinessType.INSERT)
    @PostMapping
    @ApiOperation(value = "新增")
    public AjaxResult add(@RequestBody DictSfxm dictSfxm) {
        dictSfxm.setWbm(MatchUtils.toWubi(dictSfxm.getXmmc()));
        dictSfxm.setPym(PinyinUtil.getFirstLetter(dictSfxm.getXmmc(),"").toUpperCase(Locale.ROOT));
        return toAjax(dictSfxmService.insertDictSfxm(dictSfxm));
    }
    /**
     * 修改收费项目
     */
    @PreAuthorize("@ss.hasPermi('system:sfxm:edit')")
//    @PreAuthorize("@ss.hasPermi('system:sfxm:edit')")
    @Log(title = "收费项目", businessType = BusinessType.UPDATE)
    @PutMapping
    @ApiOperation(value = "修改")
@@ -110,7 +116,7 @@
    /**
     * 删除收费项目
     */
    @PreAuthorize("@ss.hasPermi('system:sfxm:remove')")
//    @PreAuthorize("@ss.hasPermi('system:sfxm:remove')")
    @Log(title = "收费项目", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "删除")