|
@@ -2,7 +2,6 @@ package thyyxxk.webserver.service.ca;
|
|
|
|
|
|
import cn.hutool.core.codec.Base64;
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
-import cn.hutool.core.io.file.FileNameUtil;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.IdcardUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
@@ -18,7 +17,6 @@ import com.dtflys.forest.logging.LogConfiguration;
|
|
|
import com.dtflys.forest.utils.ForestDataType;
|
|
|
import lombok.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.ibatis.annotations.Update;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import thyyxxk.webserver.config.Assertion;
|
|
@@ -40,12 +38,10 @@ import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
-import java.nio.charset.Charset;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
-import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@Slf4j
|
|
|
@Service
|
|
@@ -96,9 +92,10 @@ public class CaServer implements Assertion {
|
|
|
String timeStamp = generateTimestampByInData(msg);
|
|
|
push.getData().setTimeStamp(timeStamp);
|
|
|
push.getData().setBizSn(send.getBizSn());
|
|
|
- push.getData().setSignature("http://172.16.32.167:8077/doctorSignatureImage/" + send.getId() + ".png");
|
|
|
+ push.getData().setSignature("/doctorSignatureImage/" + send.getId() + ".png");
|
|
|
push.getData().setName(userInfoByCode.getName());
|
|
|
push.getData().setMsg(msg);
|
|
|
+ push.getData().setCode(send.getId());
|
|
|
return push.getData();
|
|
|
}
|
|
|
|
|
@@ -262,7 +259,7 @@ public class CaServer implements Assertion {
|
|
|
// if (emrData == null || emrData.getDelFlag() == 1) {
|
|
|
// throw new BizException(ExceptionEnum.LOGICAL_ERROR, "病历已被删除。");
|
|
|
// }
|
|
|
- isTrueErr(emrData.getSignComplete(), "扫码流程已完成请勿重复点击");
|
|
|
+ isTrueErr(emrData.getSignComplete(), "签名流程已完成请勿重复点击");
|
|
|
if (emrData.getSignType() != null && !Objects.equals(type.getCode(), emrData.getSignType())) {
|
|
|
throw new BizException(ExceptionEnum.LOGICAL_ERROR, "请使用上次选择的方式完成CA流程中途不得修改。");
|
|
|
} else {
|
|
@@ -569,7 +566,8 @@ public class CaServer implements Assertion {
|
|
|
*/
|
|
|
public void completeQrCode(String documentId) {
|
|
|
EmrPatientData data = emrPatientDao.selectById(documentId);
|
|
|
- CaSignClass.H5EventSignRedis redisServerData = redisServer.getData(getRedisKey(documentId));
|
|
|
+ String redisKey = getRedisKey(documentId);
|
|
|
+ CaSignClass.H5EventSignRedis redisServerData = redisServer.getData(redisKey);
|
|
|
CaSignClass.Upload upload = CaSignClass.Upload.builder()
|
|
|
.file(redisServerData.getPdf())
|
|
|
.fileName(documentId)
|
|
@@ -586,6 +584,7 @@ public class CaServer implements Assertion {
|
|
|
.archivePath(path)
|
|
|
.build();
|
|
|
emrPatientDao.updateById(build);
|
|
|
+ redisServer.delData(redisKey);
|
|
|
}
|
|
|
|
|
|
public void cancelSignature(String id) {
|