|
@@ -21,11 +21,11 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import thyyxxk.webserver.config.Assertion;
|
|
|
-import thyyxxk.webserver.config.envionment.ArchiveConfig;
|
|
|
import thyyxxk.webserver.config.envionment.CaData;
|
|
|
import thyyxxk.webserver.config.exception.BizException;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.webserver.constants.YesOrNo;
|
|
|
+import thyyxxk.webserver.dao.his.ca.PatientIdCardTypeDao;
|
|
|
import thyyxxk.webserver.dao.his.zhuyuanyisheng.emr.EmrPatientDao;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.ca.*;
|
|
@@ -62,24 +62,17 @@ public class CaServer implements Assertion {
|
|
|
|
|
|
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, PatientIdCardTypeDao patientIdCardTypeDao) {
|
|
|
- public CaServer(CaData caData,
|
|
|
- EmrPatientDao emrPatientDao,
|
|
|
- ArchiveConfig archive,
|
|
|
- CaCache cache,
|
|
|
- UserCache userCache) {
|
|
|
+ public CaServer(CaData caData, EmrPatientDao emrPatientDao, String archivePath, CaCache cache, UserCache userCache, PatientIdCardTypeDao patientIdCardTypeDao) {
|
|
|
this.caData = caData;
|
|
|
- this.redisLikeService = redisLikeService;
|
|
|
- this.redisServer = redisServer;
|
|
|
this.emrPatientDao = emrPatientDao;
|
|
|
- archivePath = archive.getPath() + "/emr";
|
|
|
- this.patientIdCardTypeDao = patientIdCardTypeDao;
|
|
|
+ this.archivePath = archivePath;
|
|
|
this.cache = cache;
|
|
|
this.userCache = userCache;
|
|
|
+ this.patientIdCardTypeDao = patientIdCardTypeDao;
|
|
|
+ }
|
|
|
+
|
|
|
+ private String getRedisKey(String documentId) {
|
|
|
+ return "ca-emr-" + documentId;
|
|
|
}
|
|
|
|
|
|
public List<CaReturn.CaData> sendBatchByCode(CaSignClass.Send send) {
|
|
@@ -92,7 +85,7 @@ public class CaServer implements Assertion {
|
|
|
}
|
|
|
|
|
|
public CaReturn.CaData sendByCode(CaSignClass.Send send) {
|
|
|
- UserInfo userInfoByCode = redisLikeService.getUserInfoByCode(send.getId());
|
|
|
+ UserInfo userInfoByCode = userCache.get(send.getId());
|
|
|
send.setBizSn(IdUtil.simpleUUID());
|
|
|
String msg = CaUtils.GetSHA256FormString(send.getMsg());
|
|
|
CaReturn push = push(send, msg);
|
|
@@ -476,8 +469,7 @@ public class CaServer implements Assertion {
|
|
|
.execute(String.class);
|
|
|
|
|
|
redisData.setUuid(value.getUuid());
|
|
|
-
|
|
|
- redisServer.setData("ca-emr-" + value.getDocumentId(), redisData, 30);
|
|
|
+ cache.put("ca-emr-" + value.getDocumentId(), redisData);
|
|
|
return getStringResultVo(execute, caDocumentId, value.getUuid());
|
|
|
}
|
|
|
|
|
@@ -768,8 +760,6 @@ public class CaServer implements Assertion {
|
|
|
item.setPatNo(data.getPatNo());
|
|
|
patientIdCardTypeDao.updateById(item);
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_EL_NOTIFICATION);
|
|
|
}
|
|
|
|