From 4d46005b4a4d127a1bd884efe7dfbb907338b1a0 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期五, 19 九月 2025 15:11:19 +0800
Subject: [PATCH] 丽水获取token 输出日志
---
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java | 57 +++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
index b92d0c0..178feb8 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -24,10 +24,7 @@
import java.time.Period;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.stream.Collectors;
/**
@@ -286,6 +283,8 @@
externalInHospPatientInfo.setZhuZhiYSID(externalInDeptPatientInfo.getZhuZhiYSID());
externalInHospPatientInfo.setZhuZhiYSXM(externalInDeptPatientInfo.getZhuZhiYSXM());
externalInHospPatientInfo.setRuYuanSJ(externalInDeptPatientInfo.getRuYuanSJ());
+ externalInHospPatientInfo.setJingGuanYSID(externalInDeptPatientInfo.getJingGuanYSID());
+ externalInHospPatientInfo.setJingGuanYSXM(externalInDeptPatientInfo.getJingGuanYSXM());
externalInHospPatientInfo.setLianXiDH(ObjectUtils.isNotEmpty(BingRenXX.get("LianXiDH")) ? BingRenXX.get("LianXiDH").toString() : null);
externalInHospPatientInfo.setDangQianCWID(ObjectUtils.isNotEmpty(BingRenXX.get("DangQianCWID")) ? BingRenXX.get("DangQianCWID").toString() : null);
externalInHospPatientInfo.setDangQianCWMC(ObjectUtils.isNotEmpty(BingRenXX.get("DangQianCWMC")) ? BingRenXX.get("DangQianCWMC").toString() : null);
@@ -583,7 +582,8 @@
}
}
try {
- patMedInhosp1.setFudate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(SuiFangJH.get("SuiFangRQ").toString()));
+ if (!Objects.isNull(SuiFangJH.get("SuiFangRQ")))
+ patMedInhosp1.setFudate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(SuiFangJH.get("SuiFangRQ").toString()));
} catch (ParseException e) {
e.printStackTrace();
}
@@ -891,6 +891,19 @@
patMedOuthosp.setOuthospno(externalInHospPatientInfo.getBingAnHao());
patMedOuthosp.setSerialnum(externalInHospPatientInfo.getJiuZhenYWID());
List<PatMedOuthosp> patMedOuthosps = patMedOuthospMapper.selectPatMedOuthospList(patMedOuthosp);
+ for (PatMedOuthosp patMedOuthosp1 : patMedOuthosps) {
+ PatArchive pa = patArchiveMapper.selectPatArchiveByPatid(patMedOuthosp1.getPatid());
+ if (patArchive.getBirthdate() != null) {
+ Map<String, String> map = calculateAge(pa.getBirthdate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now());
+ pa.setAge(ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null);
+ pa.setAgeUnit(map.get("ageUnit"));
+ pa.setAge2(ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null);
+ pa.setAgeUnit2(map.get("ageUnit2"));
+ patMedOuthosp1.setAge(pa.getAge() + pa.getAgeUnit() + pa.getAge2() + pa.getAgeUnit2());
+ patMedOuthosp1.setTelcode(patArchive.getTelcode());
+ patMedOuthosp1.setIdcardno(patArchive.getIdcardno());
+ }
+ }
patMedOuthosp.setPatid(patArchive.getId());
patMedOuthosp.setPatno(externalInHospPatientInfo.getBingAnHao());
@@ -902,6 +915,7 @@
patMedOuthosp.setAdmitdate(externalJZInfo.getJiuZhenRQ());
patMedOuthosp.setOrgid(FaSongJGID);
patMedOuthosp.setHospitalname(FaSongJGMC);
+ patMedOuthosp.setIdcardno(patArchive.getIdcardno());
//杩欎釜闇�瑕佺瓑HIS閭h竟鍛婅瘔鍙栧摢涓瓧娈碉紝鐜板湪杩樻槸涓嶅鐨�
patMedOuthosp.setFudate(externalJZInfo.getSfrq());
@@ -942,21 +956,22 @@
i = patMedOuthospMapper.insertPatMedOuthosp(patMedOuthosp);
}
- //鍏堥�氳繃韬唤璇佸拰绉戝鏌ヨ璇ユ偅鑰呮槸鍚︽湁闇�瑕侀殢璁跨殑(鏅畞鎻愬嚭鏉ョ殑)
- if (patMedOuthosp.getOrgid().equals("47255004333112711A1001")) {
- ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO();
- serviceSubtaskVO.setSfzh(patMedOuthosp.getIdcardno());
- serviceSubtaskVO.setDeptcode(patMedOuthosp.getDeptcode());
- serviceSubtaskVO.setSendstate(2L);
- List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO);
- if (CollectionUtils.isNotEmpty(serviceSubtaskList)) {
- for (ServiceSubtask serviceSubtask : serviceSubtaskList) {
- serviceSubtask.setSendstate(6L);
- serviceSubtask.setRemark("鎮h�呭凡缁忓洖鏉ュ璇�");
- serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
- }
- }
- }
+// //鍏堥�氳繃韬唤璇佸拰绉戝鏌ヨ璇ユ偅鑰呮槸鍚︽湁闇�瑕侀殢璁跨殑(鏅畞鎻愬嚭鏉ョ殑)
+// if (patMedOuthosp.getOrgid().equals("47255004333112711A1001") && StringUtils.isNotEmpty(patMedOuthosp.getIdcardno()) && StringUtils.isNotEmpty(patMedOuthosp.getDeptcode())) {
+// ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO();
+// serviceSubtaskVO.setSfzh(patMedOuthosp.getIdcardno());
+// serviceSubtaskVO.setDeptcode(patMedOuthosp.getDeptcode());
+// serviceSubtaskVO.setSendstate(2L);
+// List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO);
+// if (CollectionUtils.isNotEmpty(serviceSubtaskList)) {
+// for (ServiceSubtask serviceSubtask : serviceSubtaskList) {
+// serviceSubtask.setSendstate(6L);
+// serviceSubtask.setRemark("鎮h�呭凡缁忓洖鏉ュ璇�");
+// serviceSubtask.setUpdateTime(new Date());
+// serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
+// }
+// }
+// }
if (i > 0) {
return true;
@@ -1363,6 +1378,8 @@
patMedInhosp.setDrcode(externalInHospPatientInfo.getZhuZhiYSID());
patMedInhosp.setNurseId(externalInHospPatientInfo.getZeRenHSID());
patMedInhosp.setNurseName(externalInHospPatientInfo.getZeRenHSXM());
+ patMedInhosp.setManagementDoctor(externalInHospPatientInfo.getJingGuanYSXM());
+ patMedInhosp.setManagementDoctorCode(externalInHospPatientInfo.getJingGuanYSID());
}
if (ObjectUtils.isNotEmpty(externalInHospPatientDiagnoseInfo)) {
// patMedInhosp.setIcd10code(StringUtils.isNotEmpty(patMedInhosp.getIcd10code()) ? patMedInhosp.getIcd10code() + "," + externalInHospPatientDiagnoseInfo.getZhenDuanID() : externalInHospPatientDiagnoseInfo.getZhenDuanID());
--
Gitblit v1.9.3