xiaochan преди 5 месеца
родител
ревизия
47eacba80f

+ 10 - 1
src/main/java/thyyxxk/webserver/dao/his/hutoolcache/HutoolCacheDao.java

@@ -8,8 +8,11 @@ import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import thyyxxk.webserver.entity.dictionary.CodeName;
+import thyyxxk.webserver.entity.dictionary.ZdUnitCode;
 import thyyxxk.webserver.entity.login.UserInfo;
+import thyyxxk.webserver.entity.settings.IntergrationMenu;
 import thyyxxk.webserver.entity.settings.IntergrationPlatformRoleMenu;
+import thyyxxk.webserver.service.hutoolcache.DeptCache;
 
 import java.util.List;
 
@@ -105,7 +108,7 @@ public interface HutoolCacheDao {
 
     @Select("select RTRIM(code) " +
             "from zd_unit_code " +
-            "where ${ew.sqlSegment}" +
+            "where ${ew.sqlSegment} " +
             "and isnull(del_flag, 0) = 0")
     List<String> selectChildDeptByCodeList(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
 
@@ -115,4 +118,10 @@ public interface HutoolCacheDao {
 
     @Select("select rtrim(code_rs) from a_employee_mi where code=#{code}")
     String selectCodeRs(String code);
+
+    @Select("select code,rtrim(name) as name,py_code  from zd_unit_code where code = #{code}")
+    DeptCache.Dept selectZdUnitCode(String code);
+
+    @Select("select * from t_intergration_menu order by type , sort  ")
+    List<IntergrationMenu> getAll();
 }

+ 1 - 1
src/main/java/thyyxxk/webserver/service/LoginService.java

@@ -87,7 +87,7 @@ public class LoginService {
         }
         tempUserInfo = userCache.get(tempUserInfo.getCode());
         userInfo.setDeptName(deptCache.get(userInfo.getDeptCode()).getName());
-        Set<String> deptList = getDept(true, userInfo);
+        Set<String> deptList = publicServer.getDept(true, userInfo);
         if (!deptList.isEmpty()) {
             Map<String, String> tempMap = new HashMap<>(deptList.size());
             deptList.forEach(item -> {

+ 1 - 1
src/main/java/thyyxxk/webserver/service/PublicServer.java

@@ -404,7 +404,7 @@ public class PublicServer {
     }
 
     @NotNull
-    private Set<String> getDept(boolean needPartTimeDept, UserInfo userInfo) {
+    public Set<String> getDept(boolean needPartTimeDept, UserInfo userInfo) {
         return redisLikeService.getDept(needPartTimeDept, userInfo);
     }
 

+ 28 - 16
src/main/java/thyyxxk/webserver/service/ca/CaServer.java

@@ -1,6 +1,7 @@
 package thyyxxk.webserver.service.ca;
 
 import cn.hutool.core.codec.Base64;
+import cn.hutool.core.convert.Convert;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.IdcardUtil;
@@ -30,7 +31,7 @@ import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.ca.*;
 import thyyxxk.webserver.entity.login.UserInfo;
 import thyyxxk.webserver.entity.zhuyuanyisheng.emr.EmrPatientData;
-import thyyxxk.webserver.service.hutoolcache.RedisServer;
+import thyyxxk.webserver.service.hutoolcache.CaCache;
 import thyyxxk.webserver.service.hutoolcache.RedisLikeService;
 import thyyxxk.webserver.service.zhuyuanyisheng.emr.EmrServer;
 import thyyxxk.webserver.utils.ResultVoUtil;
@@ -48,23 +49,28 @@ public class CaServer implements Assertion {
     private final CaData caData;
     private final String SUCCRSS = "success";
     private final RedisLikeService redisLikeService;
-    private final RedisServer redisServer;
     private final EmrPatientDao emrPatientDao;
     private final String archivePath;
     private final static String privateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKAc+jzqVKHsjNdyuDGL7u6zZR55j87l+0GGT4/yEV+K8ZtL1GoIgOD6vv6eEg2iOwl6Wh6hq8XR4cIyzVyvMZ35dIw3oGN89ObtuCha7gLOmWYUIGVnkUBkLFeIdwe4F8bq1q15o7azsTVekSyNJf/wnxWMp8ibtvO41T8DIzZPAgMBAAECgYAeeLVVD4Gw2VyKij4sy8Var1CQxrDMPu+c7ktJCVguFzrZA8r2rQyeBIqB2aJ07smOibcJ+lm/Ca0N8O4tc/gcm4g/JsjBALFUmqyCkLQpRyIbz8V9uAmrLcchT74GS727Uv4KVTmQNDZTPIDdSZWSJ8S+WKmj8q3wUF1HLF1eXQJBAOC7D6xIB2XNS6Voa7C7m8aeg53lfcDUVJ6m0YFdvMbsU2cnlxnCSX1OsghFuVQLKcGeN+aXiTEileb3pAl2RC0CQQC2ZDtDb+1OmLmRNugp29Pmm8MM8KpktfqiBFi92Q747XwEeMgLi3qetq1wDT4dgvyURs2McsbF7diVtFv7DMXrAkAoYzXj3mYF86k+ps+DyZOrVF2PCOlauE4k3RIVz8TXcy1iAolzRalzbastNWqjIgZ1F3wwYtdzDyYlhifi03BZAkEArkgidPMbwDGhiAf+WhkrZz1JaTECsM9PGcergGVLsENFcQR0qstxtPz7x4lv5EVI0urA+Man93OptIsuJTr0VwJAd86EbHyOn5Lah7ptPGsmsqkrdMZcJ3chRj6pDtvb0A2lhaJfDRxmAiWCnviPhTApH6/1WRzBqc1ZTymyRTF9kA==";
     private final static String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgHPo86lSh7IzXcrgxi+7us2UeeY/O5ftBhk+P8hFfivGbS9RqCIDg+r7+nhINojsJeloeoavF0eHCMs1crzGd+XSMN6BjfPTm7bgoWu4CzplmFCBlZ5FAZCxXiHcHuBfG6tateaO2s7E1XpEsjSX/8J8VjKfIm7bzuNU/AyM2TwIDAQAB";
+    private final CaCache cache;
+
     RSA idCardRsa = new RSA(privateKey, publicKey);
 
     private String getRedisKey(String documentId) {
         return "ca-emr-" + documentId;
     }
 
-    public CaServer(CaData caData, RedisLikeService redisLikeService, RedisServer redisServer, EmrPatientDao emrPatientDao, ArchiveConfig archive) {
+    public CaServer(CaData caData,
+                    RedisLikeService redisLikeService,
+                    EmrPatientDao emrPatientDao,
+                    ArchiveConfig archive,
+                    CaCache cache) {
         this.caData = caData;
         this.redisLikeService = redisLikeService;
-        this.redisServer = redisServer;
         this.emrPatientDao = emrPatientDao;
         archivePath = archive.getPath() + "/emr";
+        this.cache = cache;
     }
 
     public List<CaReturn.CaData> sendBatchByCode(CaSignClass.Send send) {
@@ -278,11 +284,16 @@ public class CaServer implements Assertion {
             item.setIdCard(idCardRsa.decryptStr(item.getIdCard(), KeyType.PrivateKey));
         });
         String redisKey = getRedisKey(moreEventSign.getDocumentId());
-        String redisData = redisServer.getData(redisKey, () -> null);
+
+
+        String redisData = Convert.toStr(cache.get(redisKey), null);
+
         if (redisData != null) {
             cancelSignature(redisData);
         }
-        redisServer.delData(redisKey);
+
+        cache.del(redisKey);
+
         String uuid = IdUtil.simpleUUID();
         JSONObject data = getMoreEventSignData(moreEventSign, uuid);
         String execute = Forest.post(caData.getHBoardSign().getUrl() + "/mobile/hBoardSign")
@@ -294,7 +305,7 @@ public class CaServer implements Assertion {
         String decode = URLUtil.decode(msg);
         log.info("返回值:{},\n错误信息:{}", execute, decode);
         if (rst.getInt("ret_code") == 0) {
-            redisServer.setData(redisKey, uuid, 30);
+            cache.setData(redisKey, uuid);
             return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_EL_MESSAGE, "发送成功。");
         } else {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请联系管理员" + decode);
@@ -456,8 +467,8 @@ public class CaServer implements Assertion {
                 .execute(String.class);
 
         redisData.setUuid(value.getUuid());
+        cache.put("ca-emr-" + value.getDocumentId(), redisData);
 
-        redisServer.setData("ca-emr-" + value.getDocumentId(), redisData, 30);
         return getStringResultVo(execute, caDocumentId, value.getUuid());
     }
 
@@ -467,10 +478,10 @@ public class CaServer implements Assertion {
         // 如果 uuid 是空的就是第一次
         if (StrUtil.isBlank(value.getUuid())) {
             value.setUuid(IdUtil.simpleUUID());
-            redisServer.delData(redisKey);
+            cache.del(redisKey);
             redisData.setPdf(EmrServer.getPdfBase(value.getDocumentId()));
         } else {
-            redisData = redisServer.getData(redisKey);
+            redisData = (CaSignClass.H5EventSignRedis) cache.get(redisKey);
             if (redisData == null) {
                 throw new BizException(ExceptionEnum.LOGICAL_ERROR, "签名超时请重新签名。");
             }
@@ -530,7 +541,7 @@ public class CaServer implements Assertion {
         }
         JSONObject rst = res.getData();
         String key = getRedisKey(documentId);
-        CaSignClass.H5EventSignRedis redisData = redisServer.getData(key);
+        CaSignClass.H5EventSignRedis redisData = (CaSignClass.H5EventSignRedis) cache.get(key);
         if (redisData == null) {
             throw new BizException(ExceptionEnum.LOGICAL_ERROR, "签名错误,文书不存在。");
         }
@@ -550,7 +561,7 @@ public class CaServer implements Assertion {
             redisData.setData(new ArrayList<>());
         }
         redisData.getData().add(saveData);
-        redisServer.setData(key, redisData, 30);
+        cache.setData(key, redisData);
         return ResultVoUtil.success(true);
     }
 
@@ -561,7 +572,7 @@ public class CaServer implements Assertion {
     public void completeQrCode(String documentId) {
         EmrPatientData data = emrPatientDao.selectById(documentId);
         String redisKey = getRedisKey(documentId);
-        CaSignClass.H5EventSignRedis redisServerData = redisServer.getData(redisKey);
+        CaSignClass.H5EventSignRedis redisServerData = (CaSignClass.H5EventSignRedis) cache.get(redisKey);
         CaSignClass.Upload upload = CaSignClass.Upload.builder()
                 .file(redisServerData.getPdf())
                 .fileName(documentId)
@@ -578,7 +589,7 @@ public class CaServer implements Assertion {
                 .archivePath(path)
                 .build();
         emrPatientDao.updateById(build);
-        redisServer.delData(redisKey);
+        cache.del(redisKey);
     }
 
     public void cancelSignature(String id) {
@@ -607,7 +618,8 @@ public class CaServer implements Assertion {
         log.info("回调:{},数据:{}", document, data);
         EmrPatientData emrData = emrPatientDao.selectById(document);
         String redisKey = getRedisKey(document);
-        String redisData = redisServer.getData(redisKey, () -> null);
+        String redisData = (String) cache.getDefaultValue(redisKey, null);
+
         if (emrData == null || redisData == null) {
             return R(-1, "病历文档不存在");
         }
@@ -630,7 +642,7 @@ public class CaServer implements Assertion {
                 .signComplete(true)
                 .archivePath(path)
                 .build();
-        redisServer.delData(redisKey);
+        cache.del(redisKey);
         emrPatientDao.updateById(update);
         return R(1, "success");
     }

+ 49 - 0
src/main/java/thyyxxk/webserver/service/hutoolcache/CaCache.java

@@ -0,0 +1,49 @@
+package thyyxxk.webserver.service.hutoolcache;
+
+import cn.hutool.cache.CacheUtil;
+import cn.hutool.cache.impl.TimedCache;
+import cn.hutool.core.date.DateUnit;
+import org.springframework.stereotype.Component;
+
+import java.util.Collections;
+import java.util.List;
+
+@Component
+public class CaCache implements HutoolCacheInterface<Object> {
+
+    // 默认 60 分钟过期
+    TimedCache<String, Object> timedCache = CacheUtil.newTimedCache(DateUnit.MINUTE.getMillis() * 30);
+
+    @Override
+    public void del(String key) {
+        timedCache.remove(key);
+    }
+
+    public void put(String key, Object value) {
+        if (value == null) {
+            return;
+        }
+        timedCache.put(key, value);
+    }
+
+    public void setData(String key, Object value) {
+        this.put(key, value);
+    }
+
+    public Object get(String key) {
+        return timedCache.get(key);
+    }
+
+    public Object getDefaultValue(String key, Object defaultValue) {
+        if (timedCache.get(key) != null) {
+            return timedCache.get(key);
+        }
+        put(key, defaultValue);
+        return defaultValue;
+    }
+
+    @Override
+    public List<Object> getAll() {
+        return Collections.emptyList();
+    }
+}

+ 36 - 8
src/main/java/thyyxxk/webserver/service/hutoolcache/DeptCache.java

@@ -2,16 +2,27 @@ package thyyxxk.webserver.service.hutoolcache;
 
 import cn.hutool.cache.Cache;
 import cn.hutool.cache.CacheUtil;
+import lombok.Data;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import thyyxxk.webserver.dao.his.hutoolcache.HutoolCacheDao;
 import thyyxxk.webserver.entity.dictionary.ZdUnitCode;
 
+import java.util.Collections;
+import java.util.List;
+
 @Service
-public class DeptCache implements HutoolCacheInterface<ZdUnitCode> {
+public class DeptCache implements HutoolCacheInterface<DeptCache.Dept> {
     private final HutoolCacheDao dao;
     private static final int DEPT_CACHE_SIZE = 128;
-    Cache<String, ZdUnitCode> cache = CacheUtil.newLFUCache(DEPT_CACHE_SIZE);
+    Cache<String, Dept> cache = CacheUtil.newLFUCache(DEPT_CACHE_SIZE);
+
+    @Data
+    public static class Dept {
+        private String code;
+        private String name;
+        private String pyCode;
+    }
 
     @Autowired
     public DeptCache(HutoolCacheDao dao) {
@@ -19,16 +30,18 @@ public class DeptCache implements HutoolCacheInterface<ZdUnitCode> {
     }
 
     @Override
-    public void put(String key, ZdUnitCode value) {
-        cache.put(key, value);
+    public void put(String key, Dept value) {
+        if (value != null) {
+            cache.put(key, value);
+        }
     }
 
     @Override
-    public ZdUnitCode get(String key) {
-        ZdUnitCode dept = cache.get(key);
+    public Dept get(String key) {
+        Dept dept = cache.get(key);
         if (dept == null) {
             dept = dbInfo(key);
-            cache.put(key, dept);
+            put(key, dept);
         }
         return dept;
     }
@@ -38,7 +51,22 @@ public class DeptCache implements HutoolCacheInterface<ZdUnitCode> {
         cache.remove(key);
     }
 
-    public ZdUnitCode dbInfo(String key) {
+    public Dept dbInfo(String key) {
+        return dao.selectZdUnitCode(key);
+    }
+
+    @Override
+    public List<Dept> getAll() {
         return null;
     }
+
+    @Override
+    public void refreshCache(String key) {
+
+    }
+
+    @Override
+    public String getName() {
+        return "";
+    }
 }

+ 26 - 3
src/main/java/thyyxxk/webserver/service/hutoolcache/HutoolCacheInterface.java

@@ -1,11 +1,34 @@
 package thyyxxk.webserver.service.hutoolcache;
 
+import java.util.List;
+
 public interface HutoolCacheInterface<T> {
 
-    void put(String key, T value);
+    default void put(String key, T value) {
+
+    }
+
+    default T get(String key) {
+        return null;
+    }
+
+
+    default void del(String key) {
+
+    }
+
+    default void del() {
+
+    }
+
+    List<T> getAll();
+
+    default void refreshCache(String key) {
 
-    T get(String key);
+    }
 
-    void del(String key);
+    default String getName() {
+        return null;
+    }
 }
 

+ 42 - 0
src/main/java/thyyxxk/webserver/service/hutoolcache/MenuCache.java

@@ -0,0 +1,42 @@
+package thyyxxk.webserver.service.hutoolcache;
+
+import org.springframework.stereotype.Component;
+import thyyxxk.webserver.dao.his.hutoolcache.HutoolCacheDao;
+import thyyxxk.webserver.entity.settings.IntergrationMenu;
+
+import java.util.List;
+
+@Component
+public class MenuCache implements HutoolCacheInterface<IntergrationMenu> {
+
+    private final HutoolCacheDao dao;
+
+    private List<IntergrationMenu> menuList;
+
+    public MenuCache(HutoolCacheDao dao) {
+        this.dao = dao;
+    }
+
+    @Override
+    public void put() {
+        menuList = dao.getAll();
+    }
+
+    @Override
+    public List<IntergrationMenu> getAll() {
+        if (menuList == null) {
+            put();
+        }
+        return menuList;
+    }
+
+    @Override
+    public void refreshCache(String key) {
+        put();
+    }
+
+    @Override
+    public String getName() {
+        return "菜单";
+    }
+}

+ 38 - 0
src/main/java/thyyxxk/webserver/service/hutoolcache/PublicCache.java

@@ -0,0 +1,38 @@
+package thyyxxk.webserver.service.hutoolcache;
+
+import cn.hutool.cache.Cache;
+import cn.hutool.cache.CacheUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Function;
+
+@Component
+public class PublicCache implements HutoolCacheInterface<Object> {
+
+    Cache<String, Object> publicCache = CacheUtil.newLFUCache(200);
+
+
+    public <T> getValue(String key, Function<String, T> function) {
+        Object value = publicCache.get(key);
+        if (value == null) {
+            value = function.apply(key);
+        }
+    }
+
+    @Override
+    public void put(String key, Object value) {
+
+
+    }
+
+    @Override
+    public List<Object> getAll() {
+        List<Object> all = new ArrayList<>();
+        publicCache.cacheObjIterator().forEachRemaining(item -> {
+            all.add(item.getValue());
+        });
+        return all;
+    }
+}

+ 4 - 0
src/main/java/thyyxxk/webserver/service/hutoolcache/UserCache.java

@@ -7,6 +7,9 @@ import org.springframework.stereotype.Service;
 import thyyxxk.webserver.dao.his.hutoolcache.HutoolCacheDao;
 import thyyxxk.webserver.entity.login.UserInfo;
 
+import java.util.Collections;
+import java.util.List;
+
 @Service
 public class UserCache implements HutoolCacheInterface<UserInfo> {
     private final HutoolCacheDao dao;
@@ -38,6 +41,7 @@ public class UserCache implements HutoolCacheInterface<UserInfo> {
         cache.remove(key);
     }
 
+
     private UserInfo dbInfo(String code) {
         UserInfo userInfo = dao.selectUserInfo(code);
         if (null == userInfo) {

+ 7 - 18
src/main/java/thyyxxk/webserver/service/settings/MenuSettingsService.java

@@ -2,7 +2,6 @@ package thyyxxk.webserver.service.settings;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.dao.his.settings.MenuSettingsDao;
@@ -10,9 +9,8 @@ import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.login.UserInfo;
 import thyyxxk.webserver.entity.settings.IntergrationMenu;
 import thyyxxk.webserver.entity.settings.IntergrationPlatformRoleMenu;
-import thyyxxk.webserver.service.hutoolcache.RedisServer;
+import thyyxxk.webserver.service.hutoolcache.MenuCache;
 import thyyxxk.webserver.service.hutoolcache.RedisLikeService;
-import thyyxxk.webserver.utils.DynamicDataUtil;
 import thyyxxk.webserver.utils.ResultVoUtil;
 import thyyxxk.webserver.utils.TokenUtil;
 import thyyxxk.webserver.utils.TreeUtil;
@@ -24,28 +22,19 @@ import java.util.stream.Collectors;
 @Slf4j
 public class MenuSettingsService {
     private final MenuSettingsDao dao;
-    private final RedisServer redisServer;
     private final RedisLikeService redisLikeService;
-
-    @Value("${spring.redis.host}")
-    private String redisUrl = "";
-
-    @Value("${spring.datasource.dynamic.primary}")
-    private String currentDbName = "";
+    private final MenuCache menuCache;
 
     public MenuSettingsService(MenuSettingsDao dao,
-                               RedisServer redisServer,
-                               RedisLikeService redisLikeService) {
+                               RedisLikeService redisLikeService,
+                               MenuCache menuCache) {
         this.dao = dao;
-        this.redisServer = redisServer;
         this.redisLikeService = redisLikeService;
+        this.menuCache = menuCache;
     }
 
     public void menuPushRedis() {
-        String redisProdUrl = "172.16.32.167";
-        String dbName = redisProdUrl.equals(redisUrl) ? "his" : currentDbName;
-        List<IntergrationMenu> list = DynamicDataUtil.db(dbName, dao::getAll);
-        redisServer.setData("IntergrationPlatformMenu", list);
+        menuCache.put();
     }
 
     public List<IntergrationMenu> getMenuSettings() {
@@ -106,7 +95,7 @@ public class MenuSettingsService {
 
     private List<IntergrationMenu> getRedisMenuByCode(String code) {
         UserInfo userInfo = redisLikeService.getUserInfoByCode(code);
-        List<IntergrationMenu> menuList = redisServer.getData("IntergrationPlatformMenu", dao::getAll);
+        List<IntergrationMenu> menuList = menuCache.getAll();
         if (userInfo.getRoles().contains(1)) {
             return menuList;
         }

+ 1 - 3
src/main/java/thyyxxk/webserver/service/settings/SettingsService.java

@@ -51,19 +51,17 @@ public class SettingsService {
     private final PublicServer publicServer;
     private final RedisLikeService redis;
     private final WebSocketService socketService;
-    private final RedisServer redisServer;
 
     @Value("${is-prod}")
     private boolean isProd;
 
     @Autowired
-    public SettingsService(SettingsDao dao, CorpWxSrvc srvc, PublicServer publicServer, RedisLikeService redis, WebSocketService socketService, RedisServer redisServer) {
+    public SettingsService(SettingsDao dao, CorpWxSrvc srvc, PublicServer publicServer, RedisLikeService redis, WebSocketService socketService) {
         this.dao = dao;
         this.srvc = srvc;
         this.publicServer = publicServer;
         this.redis = redis;
         this.socketService = socketService;
-        this.redisServer = redisServer;
     }
 
     public ResultVo<UserInfo> getUserInfo() {

+ 7 - 8
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/emr/EmrControlRuleSever.java

@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.jetbrains.annotations.NotNull;
 import org.springframework.stereotype.Service;
@@ -19,6 +20,7 @@ import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.zhuyuanyisheng.emr.EmrLimitUnlock;
 import thyyxxk.webserver.entity.zhuyuanyisheng.emrcontrolrule.*;
 import thyyxxk.webserver.service.PublicServer;
+import thyyxxk.webserver.service.hutoolcache.PublicCache;
 import thyyxxk.webserver.service.hutoolcache.RedisServer;
 import thyyxxk.webserver.service.jcptmobile.JcptMobileService;
 import thyyxxk.webserver.utils.*;
@@ -31,6 +33,7 @@ import java.util.*;
  */
 @Service
 @Slf4j
+@RequiredArgsConstructor
 public class EmrControlRuleSever {
 
     private final EmrControlDao dao;
@@ -38,14 +41,7 @@ public class EmrControlRuleSever {
     private final RedisServer server;
     private final JcptMobileService mobileService;
     private final Other other;
-
-    public EmrControlRuleSever(EmrControlDao dao, PublicServer publicServer, RedisServer server, JcptMobileService mobileService, Other other) {
-        this.dao = dao;
-        this.publicServer = publicServer;
-        this.server = server;
-        this.mobileService = mobileService;
-        this.other = other;
-    }
+    private final PublicCache publicCache;
 
 
     @Transactional(rollbackFor = Exception.class)
@@ -72,6 +68,9 @@ public class EmrControlRuleSever {
     }
 
     public void sendWxMessage(EmrLimitUnlock param) {
+
+
+
         String data = server.getData("yiwuburenyuanbianma", () -> {
             List<String> yiWuBuUser = dao.getYiWuBuUser();
             return String.join("|", yiWuBuUser);