xiaochan 2 months ago
parent
commit
ced6208b48

+ 1 - 0
.gitignore

@@ -6,3 +6,4 @@ src/test
 *.zip
 *.zip
 sql
 sql
 src/main/java/thyyxxk/webserver/service/xctest/xctest.java
 src/main/java/thyyxxk/webserver/service/xctest/xctest.java
+cache

+ 3 - 0
src/main/java/thyyxxk/webserver/config/envionment/ArchiveConfig.java

@@ -23,4 +23,7 @@ public class ArchiveConfig {
      * 因为 归档服务器也是在同样的服务器中所以,本机就可以了
      * 因为 归档服务器也是在同样的服务器中所以,本机就可以了
      */
      */
     private String archiveUrl = "http://localhost:20921/thyy/api/archive";
     private String archiveUrl = "http://localhost:20921/thyy/api/archive";
+
+
+    private String emrArchiveUrl = "";
 }
 }

+ 0 - 1
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/ShouShuShenQingDao.java

@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import org.apache.ibatis.annotations.*;
 import org.apache.ibatis.annotations.*;
-import org.aspectj.apache.bcel.classfile.Code;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.dictionary.CodeName;
 import thyyxxk.webserver.entity.dictionary.CodeName;
 import thyyxxk.webserver.entity.zhuyuanyisheng.shoushu.OpRecord;
 import thyyxxk.webserver.entity.zhuyuanyisheng.shoushu.OpRecord;

+ 4 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/yizhuluru/XinZhenYiZhu.java

@@ -1,7 +1,9 @@
 package thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru;
 package thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru;
 
 
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.date.DateUtil;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 import thyyxxk.webserver.service.PublicServer;
 import thyyxxk.webserver.service.PublicServer;
 
 
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.NotNull;
@@ -136,6 +138,8 @@ public class XinZhenYiZhu {
     /**
     /**
      * 出生日期
      * 出生日期
      */
      */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
     private Date birthDate;
     private Date birthDate;
 
 
     /**
     /**

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

@@ -631,7 +631,7 @@ public class CaServer implements Assertion {
         log.info("回调:{},数据:{}", document, data);
         log.info("回调:{},数据:{}", document, data);
         EmrPatientData emrData = emrPatientDao.selectById(document);
         EmrPatientData emrData = emrPatientDao.selectById(document);
         String redisKey = getRedisKey(document);
         String redisKey = getRedisKey(document);
-        String redisData = (String) cache.getDefaultValue(redisKey, null);
+        String redisData = cache.get(redisKey);
 
 
         if (emrData == null || redisData == null) {
         if (emrData == null || redisData == null) {
             return R(-1, "病历文档不存在");
             return R(-1, "病历文档不存在");

+ 4 - 13
src/main/java/thyyxxk/webserver/service/hutoolcache/CaCache.java

@@ -4,7 +4,6 @@ import cn.hutool.cache.CacheUtil;
 import cn.hutool.cache.impl.TimedCache;
 import cn.hutool.cache.impl.TimedCache;
 import cn.hutool.core.date.DateUnit;
 import cn.hutool.core.date.DateUnit;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.io.FileUtil;
-import cn.hutool.json.JSONUtil;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 
 
 import java.io.File;
 import java.io.File;
@@ -19,7 +18,8 @@ public class CaCache implements HutoolCacheInterface<String> {
 
 
     @Override
     @Override
     public void del(String key) {
     public void del(String key) {
-        cache.remove(key);
+        String path = PATH + key + ".txt";
+        FileUtil.del(path);
     }
     }
 
 
     @Override
     @Override
@@ -28,7 +28,6 @@ public class CaCache implements HutoolCacheInterface<String> {
             return;
             return;
         }
         }
         FileUtil.writeUtf8String(value, PATH + key + ".txt");
         FileUtil.writeUtf8String(value, PATH + key + ".txt");
-        cache.put(key, value);
     }
     }
 
 
     public void setData(String key, String value) {
     public void setData(String key, String value) {
@@ -37,16 +36,8 @@ public class CaCache implements HutoolCacheInterface<String> {
 
 
     @Override
     @Override
     public String get(String key) {
     public String get(String key) {
-        throw new RuntimeException("请使用 getToBen");
-//        return cache.get(key);
-    }
-
-    public String getDefaultValue(String key, String defaultValue) {
-        if (cache.get(key) != null) {
-            return cache.get(key);
-        }
-        put(key, defaultValue);
-        return defaultValue;
+        String path = PATH + key + ".txt";
+        return FileUtil.readUtf8String(path);
     }
     }
 
 
     @Override
     @Override

+ 0 - 1
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/JianYanJianChaShenQingService.java

@@ -447,7 +447,6 @@ public class JianYanJianChaShenQingService {
             }
             }
 
 
             if (itemInfo == null || itemInfo.isEmpty()) {
             if (itemInfo == null || itemInfo.isEmpty()) {
-                cuoWuXinXi.append(baoCunCuoWuXinXi(i, "项目明细为空请刷新页面。"));
                 continue;
                 continue;
             }
             }
 
 

+ 2 - 1
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/emr/EmrServer.java

@@ -22,8 +22,8 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.client.RestTemplate;
 import thyyxxk.webserver.config.envionment.ApiUrl;
 import thyyxxk.webserver.config.envionment.ApiUrl;
+import thyyxxk.webserver.config.envionment.ArchiveConfig;
 import thyyxxk.webserver.config.envionment.SystemConfig;
 import thyyxxk.webserver.config.envionment.SystemConfig;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.Capacity;
 import thyyxxk.webserver.constants.Capacity;
@@ -66,6 +66,7 @@ public class EmrServer {
     private final LoginDao loginDao;
     private final LoginDao loginDao;
     private final ExtraCache extraCache;
     private final ExtraCache extraCache;
     private final UserCache userCache;
     private final UserCache userCache;
+    private final ArchiveConfig archiveConfig;
 
 
     private static String emrToken = null;
     private static String emrToken = null;
     private static String EMR_URL;
     private static String EMR_URL;