From 2356e2b48faa185026fa777b7e218ab5a7c99114 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期二, 24 十一月 2026 10:43:08 +0800
Subject: [PATCH] 【丽水】妇幼随访发送

---
 smartor/src/main/java/com/smartor/service/impl/PatSpecificArchiveGenerateServiceImpl.java |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/smartor/src/main/java/com/smartor/service/impl/PatSpecificArchiveGenerateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatSpecificArchiveGenerateServiceImpl.java
index ee787a2..904b49e 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatSpecificArchiveGenerateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatSpecificArchiveGenerateServiceImpl.java
@@ -166,12 +166,14 @@
                 if (SpecificArchiveConstants.DEPT_CATEGORY_GYNECOLOGY.equals(deptCategory)) {
                     PatMaternityArchiveDetail detail =
                             buildMaternityDetail(patMedOuthosp, targetArchive, config, campusid);
-                    patMaternityArchiveService.insertOrUpdateMaternityArchive(detail);
+                    // 鎺ヨ瘖瀹屾垚鑷姩寤烘。锛氬彧寤鸿崏绋匡紝绛変汉宸ヤ繚瀛樻。妗堝悗鍐嶇敓鎴愰殢璁胯鍒�
+                    patMaternityArchiveService.insertOrUpdateMaternityArchive(detail, false);
                     generatedCount++;
                 } else if (SpecificArchiveConstants.DEPT_CATEGORY_PEDIATRICS.equals(deptCategory)) {
                     PatChildArchiveDetail detail =
                             buildChildDetail(patMedOuthosp, targetArchive, config, campusid);
-                    patChildArchiveService.insertOrUpdateChildArchive(detail);
+                    // 鎺ヨ瘖瀹屾垚鑷姩寤烘。锛氬彧寤鸿崏绋匡紝绛変汉宸ヤ繚瀛樻。妗堝悗鍐嶇敓鎴愰殢璁胯鍒�
+                    patChildArchiveService.insertOrUpdateChildArchive(detail, false);
                     generatedCount++;
                 } else {
                     log.warn("鐢熸垚涓撶妗f璺宠繃锛氭湭鐭ラ儴闂ㄥ垎绫伙紝configId={}锛宒eptCategory={}",
@@ -329,10 +331,12 @@
                 Long archiveId;
                 if (SpecificArchiveConstants.DEPT_CATEGORY_GYNECOLOGY.equals(deptCategory)) {
                     PatMaternityArchiveDetail detail = buildInhospMaternityDetail(context, config);
-                    archiveId = (long) patMaternityArchiveService.insertOrUpdateMaternityArchive(detail);
+                    // 浣忛櫌闅忚瀹屾垚鑷姩寤烘。锛氬彧寤鸿崏绋匡紝绛変汉宸ヤ繚瀛樻。妗堝悗鍐嶇敓鎴愰殢璁胯鍒�
+                    archiveId = (long) patMaternityArchiveService.insertOrUpdateMaternityArchive(detail, false);
                 } else if (SpecificArchiveConstants.DEPT_CATEGORY_PEDIATRICS.equals(deptCategory)) {
                     PatChildArchiveDetail detail = buildInhospChildDetail(context, config);
-                    archiveId = (long) patChildArchiveService.insertOrUpdateChildArchive(detail);
+                    // 浣忛櫌闅忚瀹屾垚鑷姩寤烘。锛氬彧寤鸿崏绋匡紝绛変汉宸ヤ繚瀛樻。妗堝悗鍐嶇敓鎴愰殢璁胯鍒�
+                    archiveId = (long) patChildArchiveService.insertOrUpdateChildArchive(detail, false);
                 } else {
                     log.warn("浣忛櫌闅忚鐢熸垚涓撶妗f璺宠繃锛氭湭鐭ラ儴闂ㄥ垎绫伙紝configId={}锛宒eptCategory={}",
                             config.getId(), deptCategory);
@@ -489,6 +493,7 @@
         PatMaternityArchiveDetail detail = new PatMaternityArchiveDetail();
         detail.setArchiveType(config.getArchiveType());
         detail.setFollowupPeriod(config.getFollowupPeriod());
+        detail.setPlannedFollowTime(patMedOuthosp.getFudate());
         detail.setSourceType(SpecificArchiveConstants.SOURCE_TYPE_OUTHOSP);
         detail.setSourceBizId(patMedOuthosp.getId());
         detail.setSourceBizNo(patMedOuthosp.getOuthospno());
@@ -504,6 +509,7 @@
         PatChildArchiveDetail detail = new PatChildArchiveDetail();
         detail.setArchiveType(config.getArchiveType());
         detail.setFollowupPeriod(config.getFollowupPeriod());
+        detail.setPlannedFollowTime(patMedOuthosp.getFudate());
         detail.setSourceType(SpecificArchiveConstants.SOURCE_TYPE_OUTHOSP);
         detail.setSourceBizId(patMedOuthosp.getId());
         detail.setSourceBizNo(patMedOuthosp.getOuthospno());
@@ -527,6 +533,7 @@
         PatMaternityArchiveDetail detail = new PatMaternityArchiveDetail();
         detail.setArchiveType(config.getArchiveType());
         detail.setFollowupPeriod(config.getFollowupPeriod());
+        detail.setPlannedFollowTime(context.inhosp == null ? null : context.inhosp.getFudate());
         detail.setSourceType(SpecificArchiveConstants.SOURCE_TYPE_INHOSP_FOLLOWUP);
         detail.setSourceBizId(inInhospid(context));
         detail.setSourceBizNo(inInhospno(context));
@@ -574,6 +581,7 @@
         PatChildArchiveDetail detail = new PatChildArchiveDetail();
         detail.setArchiveType(config.getArchiveType());
         detail.setFollowupPeriod(config.getFollowupPeriod());
+        detail.setPlannedFollowTime(context.inhosp == null ? null : context.inhosp.getFudate());
         detail.setSourceType(SpecificArchiveConstants.SOURCE_TYPE_INHOSP_FOLLOWUP);
         detail.setSourceBizId(inInhospid(context));
         detail.setSourceBizNo(inInhospno(context));

--
Gitblit v1.9.3