From 20072a656c2698e98064d80b62e8e45041d447da Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期三, 18 十月 2023 11:10:11 +0800
Subject: [PATCH] zjh 2023/10/18--1

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictSfxmController.java |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictSfxmController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictSfxmController.java
index c403e5c..2d63f33 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictSfxmController.java
+++ b/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 = "鍒犻櫎")

--
Gitblit v1.8.0