From 673757e7a669769041a54ef6471b4d8d250e3416 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期二, 28 七月 2026 18:23:52 +0800
Subject: [PATCH] 【丽水】JZ_MZ_WanChengJZ 就诊信息同步生成随访任务
---
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java | 42 +++++++++++++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 11 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 0e8068a..04e91f6 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -1,8 +1,6 @@
package com.smartor.service.impl;
import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.json.JSON;
-import cn.hutool.json.JSONUtil;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.ruoyi.common.core.domain.entity.SysDept;
@@ -10,8 +8,6 @@
import com.ruoyi.common.core.domain.entity.SysUserDept;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.base.BaseException;
-import com.ruoyi.common.utils.AesUtils;
-import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpUtils;
@@ -21,7 +17,6 @@
import com.smartor.service.IPatMedOuthospService;
import com.smartor.service.IServiceExternalService;
import lombok.extern.slf4j.Slf4j;
-import netscape.javascript.JSObject;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -30,8 +25,6 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
@@ -435,6 +428,7 @@
Map yeWuXX = (Map) dataMap.get("YeWuXX");
Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null;
Map<String, Object> RuKeXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("RuKeXX") : null;
+ Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null;
List<HashMap<String, Object>> epai = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) BingRenXX.get("DiZhiXXList") : null;
@@ -445,8 +439,6 @@
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);
@@ -517,13 +509,20 @@
Map yeWuXX = (Map) dataMap.get("YeWuXX");
Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null;
Map<String, Object> ChuYuanJL = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("ChuYuanJL") : null;
+ Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null;
List<HashMap<String, Object>> epai = ObjectUtils.isNotEmpty(BingRenXX) ? (List<HashMap<String, Object>>) BingRenXX.get("DiZhiXXList") : null;
List<HashMap<String, Object>> epli = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("LianXiRList") : null;
Map<String, Object> SuiFangJH = ObjectUtils.isNotEmpty(ChuYuanJL) ? (Map<String, Object>) ChuYuanJL.get("SuiFangJH") : null;
-
ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true);
ExternalInHospPatientAddrInfo externalInHospPatientAddrInfo = null;
ExternalInHospPatientLiaisonInfo externalInHospPatientLiaisonInfo = null;
+
+ //灏辫瘖淇℃伅
+ ExternalInDeptPatientInfo externalJZInfo = BeanUtil.mapToBean(JiuZhenXX, ExternalInDeptPatientInfo.class, true);
+ if(ObjectUtils.isNotEmpty(externalJZInfo)){
+ externalInHospPatientInfo.setJingGuanYSID(externalJZInfo.getJingGuanYSID());
+ externalInHospPatientInfo.setJingGuanYSXM(externalJZInfo.getJingGuanYSXM());
+ }
List<ExternalInHospPatientAddrInfo> epai2 = null;
//姝讳骸鏍囪
Boolean deathFlag = false;
@@ -582,7 +581,6 @@
String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid());
patMedInhosp1.setTagname(tagname);
}
- Map<String, Object> JiuZhenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("JiuZhenXX") : null;
PatMedInhosp patMedInhosp1 = new PatMedInhosp();
if (CollectionUtils.isNotEmpty(patMedInhospList)) patMedInhosp1 = patMedInhospList.get(0);
patMedInhosp1.setSchemestatus(2L);
@@ -599,6 +597,9 @@
patMedInhosp1.setNurseName(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSXM")) ? JiuZhenXX.get("ZeRenHSXM").toString() : null);
patMedInhosp1.setNurseId(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSID")) ? JiuZhenXX.get("ZeRenHSID").toString() : null);
patMedInhosp1.setBedNo(ObjectUtils.isNotEmpty(JiuZhenXX.get("DangQianCWMC")) ? JiuZhenXX.get("DangQianCWMC").toString() : null);
+
+ patMedInhosp1.setManagementDoctorCode(ObjectUtils.isNotEmpty(JiuZhenXX.get("JingGuanYSID")) ? JiuZhenXX.get("JingGuanYSID").toString() : null);
+ patMedInhosp1.setManagementDoctor(ObjectUtils.isNotEmpty(JiuZhenXX.get("JingGuanYSXM")) ? JiuZhenXX.get("JingGuanYSXM").toString() : null);
//绂婚櫌鏂瑰紡浠g爜 1-鍖荤灘绂婚櫌 2-鍖诲槺杞櫌 3-鍖诲槺杞ぞ鍖哄崼鐢熸湇鍔℃満鏋�/涔¢晣鍗敓闄�
// 4-闈炲尰鍢辩闄� 5-姝讳骸 9-鍏朵粬 10-浠嬪叆瀹� 20-鎵嬫湳瀹�
@@ -982,6 +983,9 @@
patMedInhosp1.setNurseName(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSXM")) ? JiuZhenXX.get("ZeRenHSXM").toString() : null);
patMedInhosp1.setNurseId(ObjectUtils.isNotEmpty(JiuZhenXX.get("ZeRenHSID")) ? JiuZhenXX.get("ZeRenHSID").toString() : null);
patMedInhosp1.setBedNo(ObjectUtils.isNotEmpty(JiuZhenXX.get("DangQianCWMC")) ? JiuZhenXX.get("DangQianCWMC").toString() : null);
+
+ patMedInhosp1.setManagementDoctorCode(ObjectUtils.isNotEmpty(JiuZhenXX.get("JingGuanYSID")) ? JiuZhenXX.get("JingGuanYSID").toString() : null);
+ patMedInhosp1.setManagementDoctor(ObjectUtils.isNotEmpty(JiuZhenXX.get("JingGuanYSXM")) ? JiuZhenXX.get("JingGuanYSXM").toString() : null);
}
patMedInhosp1.setUpdateTime(new Date());
patMedInhosp1.setTelcode(patArchive.getTelcode());
@@ -1200,12 +1204,23 @@
patMedOuthosp.setFuflag("1");
}
}
+ Integer visitTimeNum = null;
+ String visitTimeUnit = "澶�";
for (ExternalWZInfo externalWZInfo : ExternalWZInfoList) {
if (externalWZInfo.getWenZhenLXMC().equals("鐜扮梾鍙�")) {
patMedOuthosp.setHpi(externalWZInfo.getNeiRong());
}
if (externalWZInfo.getWenZhenLXMC().equals("涓昏瘔")) {
patMedOuthosp.setMainsuit(externalWZInfo.getNeiRong());
+ }
+ if (externalWZInfo.getWenZhenLXMC().equals("闅忚澶╂暟")) {
+ String visitTimeNumStr = externalWZInfo.getNeiRong();
+ if(StringUtils.isNotEmpty(visitTimeNumStr) && visitTimeNumStr.matches("^-?\\d+$")){
+ visitTimeNum = Integer.parseInt(visitTimeNumStr);
+ }
+ }
+ if (externalWZInfo.getWenZhenLXMC().equals("闅忚澶╂暟鍗曚綅")) {
+ visitTimeUnit = externalWZInfo.getNeiRong();
}
}
int i = 0;
@@ -1227,6 +1242,11 @@
i = patMedOuthospService.insertPatMedOuthosp(patMedOuthosp);
}
+ Date adminDate = externalJZInfo.getJiuZhenRQ();
+ //瀹屾垚鎺ヨ瘖 宸茬粡瀹屾垚浠诲姟鍐嶆闅忚
+ if(ObjectUtils.isNotEmpty(visitTimeNum) && ObjectUtils.isNotEmpty(adminDate)){
+ patMedOuthospService.followUpAgainByPatMedOuthosp(patMedOuthosp, adminDate, visitTimeNum);
+ }
if (i > 0) {
return true;
--
Gitblit v1.9.3