From bebb8f4a668c79cd1fc536aeb4a3821115ac15c1 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 29 七月 2026 15:09:09 +0800
Subject: [PATCH] 【丽水】宣教超链接跳转调整
---
smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java | 71 +++++++++++++++++++++++++++++++++++
1 files changed, 70 insertions(+), 1 deletions(-)
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
index 36ffd80..74c33b8 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
@@ -76,6 +76,11 @@
PatMedOuthospQueryReq patMedOuthospQueryReq = DtoConversionUtils.sourceToTarget(patMedOuthosp, PatMedOuthospQueryReq.class);
patMedOuthospQueryReq.setBeginAdmitdate(patMedOuthosp.getBeginTime());
patMedOuthospQueryReq.setEndAdmitdate(patMedOuthosp.getEndTime());
+ if(!CollectionUtils.isEmpty(patMedOuthosp.getDeptcodes())) {
+ String result = String.join(",", patMedOuthosp.getDeptcodes());
+ patMedOuthospQueryReq.setDeptcode(result);
+ }
+
List<PatMedOuthosp> patMedOuthospQueryResps = patMedOuthospMapper.callSpQueryOuthosp(patMedOuthospQueryReq);
if (patMedOuthosp.getPageNum() != null) {
for (PatMedOuthosp patMedOuthosp1 : patMedOuthospQueryResps) {
@@ -334,6 +339,7 @@
public Integer dealOutpatientInfo() {
PatMedOuthosp patMedOuthosp = new PatMedOuthosp();
patMedOuthosp.setDiagcheckFlag("0");
+ patMedOuthosp.setFuflag("1");
List<PatMedOuthosp> patMedOuthosps = selectPatMedOuthospList(patMedOuthosp);
for (PatMedOuthosp patMedOuthosp1 : patMedOuthosps) {
PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedOuthosp1.getPatid());
@@ -469,7 +475,8 @@
}
//灏佽serviceSubtask
- private ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedOuthosp patMedOuthosp, PatArchive patArchive) {
+ @Override
+ public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedOuthosp patMedOuthosp, PatArchive patArchive) {
ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class);
serviceSubtask.setTaskid(serviceTask.getTaskid());
if (StringUtils.isNotEmpty(serviceTask.getLibtemplateid()))
@@ -524,6 +531,68 @@
return serviceSubtask;
}
+ /**
+ *
+ * @param patMedOuthosp
+ * @return
+ */
+ @Override
+ public Integer followUpAgainByPatMedOuthosp(PatMedOuthosp patMedOuthosp,Date adminDate, Integer visitTimeNum){
+ int hoursToAdd = visitTimeNum * 24;
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(adminDate);
+ calendar.add(Calendar.HOUR_OF_DAY, hoursToAdd);
+ Date newDate = calendar.getTime();
+
+ Integer i = 0;
+ String deptcode = patMedOuthosp.getDeptcode();
+ Long patid = patMedOuthosp.getPatid();
+ //鏌ョ湅鏈夋棤杩涜涓殑浠诲姟
+ ServiceSubtaskEntity serviceSubtaskEntity0 = new ServiceSubtaskEntity();
+ serviceSubtaskEntity0.setOrgid(patMedOuthosp.getOrgid());
+ serviceSubtaskEntity0.setSendstates(new ArrayList<>(Arrays.asList(1L, 2L, 3L, 7L)));
+ serviceSubtaskEntity0.setPatid(patid);
+ serviceSubtaskEntity0.setDeptcode(deptcode);
+ serviceSubtaskEntity0.setSort(0);
+ List<ServiceSubtask> serviceSubtaskList0 = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskEntity0);
+ if(!CollectionUtils.isEmpty(serviceSubtaskList0)){
+ ServiceSubtask serviceSubtask0 = serviceSubtaskList0.get(0);
+ serviceSubtask0.setSendstate(6L);
+ serviceSubtask0.setUpdateTime(new Date());
+ serviceSubtask0.setFinishtime(adminDate);
+ serviceSubtaskMapper.updateServiceSubtask(serviceSubtask0);
+
+ ServiceSubtask serviceSubtask1 = serviceSubtaskList0.get(0);
+ serviceSubtask1.setSendstate(2L);
+ serviceSubtask1.setCreateTime(new Date());
+ serviceSubtask1.setUpdateTime(new Date());
+
+ serviceSubtask1.setVisitTime(newDate);
+ serviceSubtask1.setLongSendTime(newDate);
+ i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask1);
+ }else {
+ //鏌ョ湅宸插畬鎴愮殑浠诲姟
+// ServiceSubtaskEntity serviceSubtaskEntity = new ServiceSubtaskEntity();
+// serviceSubtaskEntity0.setOrgid(patMedOuthosp.getOrgid());
+// serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(6L)));
+// serviceSubtaskEntity.setPatid(patid);
+// serviceSubtaskEntity.setDeptcode(deptcode);
+// serviceSubtaskEntity.setSort(0);
+// List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskEntity);
+// if(!CollectionUtils.isEmpty(serviceSubtaskList)){
+// ServiceSubtask serviceSubtask = serviceSubtaskList.get(0);
+// serviceSubtask.setSendstate(2L);
+// serviceSubtask.setCreateTime(new Date());
+// serviceSubtask.setUpdateTime(new Date());
+//
+// serviceSubtask.setVisitTime(newDate);
+// serviceSubtask.setLongSendTime(newDate);
+// i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
+// }
+ }
+ return i;
+ }
+
private Date addDays(Date date, Integer days) {
if (days == null) {
days = 1;
--
Gitblit v1.9.3