From 10343cb5deaecc2bf3023317a4c142ba84ec3b72 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期一, 09 十一月 2026 15:30:55 +0800
Subject: [PATCH] feat: 统一档案随访周期 followupPeriod

---
 smartor/src/main/java/com/smartor/domain/PatChildArchiveDetail.java                              |    4 ++++
 smartor/src/main/resources/mapper/smartor/PatChildArchiveDetailMapper.xml                        |    6 ++++++
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatSpecificArchiveGenerateConfig.java |    5 +++++
 sql/pat_child_archive_detail_and_config_add_followup_period_20261109.sql                         |   14 ++++++++++++++
 ruoyi-patarchive/src/main/resources/mapper/patarchive/PatSpecificArchiveGenerateConfigMapper.xml |    6 ++++++
 smartor/src/main/java/com/smartor/service/impl/PatSpecificArchiveGenerateServiceImpl.java        |    2 ++
 6 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatSpecificArchiveGenerateConfig.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatSpecificArchiveGenerateConfig.java
index d6c345f..7b9de9d 100644
--- a/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatSpecificArchiveGenerateConfig.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatSpecificArchiveGenerateConfig.java
@@ -36,6 +36,11 @@
     @ApiModelProperty(value = "妗f绫诲瀷: 濡囩妗f绫诲瀷(1 鏃╁瓡鍏崇埍2 鍥寸粷缁忔湡MHI),鍎跨妗f绫诲瀷(1钀ュ吇鎬х柧鐥� 2瀛︿範鍥伴毦 3楂樺嵄鍎夸笓妗�)")
     private String archiveType;
 
+    /** 闅忚鍛ㄦ湡 */
+    @Excel(name = "闅忚鍛ㄦ湡")
+    @ApiModelProperty(value = "闅忚鍛ㄦ湡")
+    private String followupPeriod;
+
     /** 绉戝Code闆嗗悎(JSON鏍煎紡锛屽 ["D001","D002"]) */
     @ApiModelProperty(value = "绉戝Code闆嗗悎(JSON鏍煎紡锛屽 [\"D001\",\"D002\"])")
     private String deptCodes;
diff --git a/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatSpecificArchiveGenerateConfigMapper.xml b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatSpecificArchiveGenerateConfigMapper.xml
index 278089b..c19e58f 100644
--- a/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatSpecificArchiveGenerateConfigMapper.xml
+++ b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatSpecificArchiveGenerateConfigMapper.xml
@@ -9,6 +9,7 @@
         <result property="deptType" column="dept_type"/>
         <result property="deptCategory" column="dept_category"/>
         <result property="archiveType" column="archive_type"/>
+        <result property="followupPeriod" column="followup_period"/>
         <result property="deptCodes" column="dept_codes"/>
         <result property="icd10Codes" column="icd10_codes"/>
         <result property="remark" column="remark"/>
@@ -26,6 +27,7 @@
                dept_type,
                dept_category,
                archive_type,
+               followup_period,
                dept_codes,
                icd10_codes,
                remark,
@@ -47,6 +49,7 @@
             <if test="deptType != null and deptType != ''">and dept_type = #{deptType}</if>
             <if test="deptCategory != null and deptCategory != ''">and dept_category = #{deptCategory}</if>
             <if test="archiveType != null and archiveType != ''">and archive_type = #{archiveType}</if>
+            <if test="followupPeriod != null and followupPeriod != ''">and followup_period = #{followupPeriod}</if>
             <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
             <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if>
             <if test="params.beginTime != null and params.beginTime != ''">
@@ -77,6 +80,7 @@
             <if test="deptType != null">dept_type,</if>
             <if test="deptCategory != null">dept_category,</if>
             <if test="archiveType != null">archive_type,</if>
+            <if test="followupPeriod != null">followup_period,</if>
             <if test="deptCodes != null">dept_codes,</if>
             <if test="icd10Codes != null">icd10_codes,</if>
             <if test="remark != null">remark,</if>
@@ -92,6 +96,7 @@
             <if test="deptType != null">#{deptType},</if>
             <if test="deptCategory != null">#{deptCategory},</if>
             <if test="archiveType != null">#{archiveType},</if>
+            <if test="followupPeriod != null">#{followupPeriod},</if>
             <if test="deptCodes != null">#{deptCodes},</if>
             <if test="icd10Codes != null">#{icd10Codes},</if>
             <if test="remark != null">#{remark},</if>
@@ -111,6 +116,7 @@
             <if test="deptType != null">dept_type = #{deptType},</if>
             <if test="deptCategory != null">dept_category = #{deptCategory},</if>
             <if test="archiveType != null">archive_type = #{archiveType},</if>
+            <if test="followupPeriod != null">followup_period = #{followupPeriod},</if>
             <if test="deptCodes != null">dept_codes = #{deptCodes},</if>
             <if test="icd10Codes != null">icd10_codes = #{icd10Codes},</if>
             <if test="remark != null">remark = #{remark},</if>
diff --git a/smartor/src/main/java/com/smartor/domain/PatChildArchiveDetail.java b/smartor/src/main/java/com/smartor/domain/PatChildArchiveDetail.java
index 99606c2..a4fce85 100644
--- a/smartor/src/main/java/com/smartor/domain/PatChildArchiveDetail.java
+++ b/smartor/src/main/java/com/smartor/domain/PatChildArchiveDetail.java
@@ -227,6 +227,10 @@
     @ApiModelProperty(value = "楂樺嵄鍎夸笓妗�-鎷熼殢璁挎椂闂�")
     private Date plannedFollowTime;
 
+    /** 闅忚鍛ㄦ湡 */
+    @ApiModelProperty(value = "闅忚鍛ㄦ湡")
+    private String followupPeriod;
+
     /** 楂樺嵄鍎夸笓妗�-鐢熼暱鍙戣偛妫�娴� */
     @ApiModelProperty(value = "楂樺嵄鍎夸笓妗�-鐢熼暱鍙戣偛妫�娴�")
     private String hrcGrowthDevelopmentMonitoring;
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 91effdb..d0c7d20 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatSpecificArchiveGenerateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatSpecificArchiveGenerateServiceImpl.java
@@ -178,6 +178,7 @@
                                                            PatSpecificArchiveGenerateConfig config, String campusid) {
         PatMaternityArchiveDetail detail = new PatMaternityArchiveDetail();
         detail.setArchiveType(config.getArchiveType());
+        detail.setFollowupPeriod(config.getFollowupPeriod());
         detail.setSourceType(SOURCE_TYPE_OUTHOSP);
         fillCommonDetail(detail, patMedOuthosp, patArchive, campusid);
         if (patArchive != null) {
@@ -190,6 +191,7 @@
                                                    PatSpecificArchiveGenerateConfig config, String campusid) {
         PatChildArchiveDetail detail = new PatChildArchiveDetail();
         detail.setArchiveType(config.getArchiveType());
+        detail.setFollowupPeriod(config.getFollowupPeriod());
         detail.setSourceType(SOURCE_TYPE_OUTHOSP);
         fillCommonChildDetail(detail, patMedOuthosp, patArchive, campusid);
         detail.setParentPhone(patArchive != null
diff --git a/smartor/src/main/resources/mapper/smartor/PatChildArchiveDetailMapper.xml b/smartor/src/main/resources/mapper/smartor/PatChildArchiveDetailMapper.xml
index d17a477..b2d555a 100644
--- a/smartor/src/main/resources/mapper/smartor/PatChildArchiveDetailMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatChildArchiveDetailMapper.xml
@@ -47,6 +47,7 @@
         <result property="highRiskChildType" column="high_risk_child_type"/>
         <result property="highRiskChildName" column="high_risk_child_name"/>
         <result property="plannedFollowTime" column="planned_follow_time"/>
+        <result property="followupPeriod" column="followup_period"/>
         <result property="hrcGrowthDevelopmentMonitoring" column="hrc_growth_development_monitoring"/>
         <result property="hrcNeurologicalEvaluation" column="hrc_neurological_evaluation"/>
         <result property="hrcInterventionRecords" column="hrc_intervention_records"/>
@@ -107,6 +108,7 @@
                high_risk_child_type,
                high_risk_child_name,
                planned_follow_time,
+               followup_period,
                hrc_growth_development_monitoring,
                hrc_neurological_evaluation,
                hrc_intervention_records,
@@ -132,6 +134,7 @@
             and del_flag = '0'
             <if test="archiveid != null">and archiveid = #{archiveid}</if>
             <if test="archiveType != null and archiveType != ''">and archive_type = #{archiveType}</if>
+            <if test="followupPeriod != null and followupPeriod != ''">and followup_period = #{followupPeriod}</if>
             <if test="sourceType != null and sourceType != ''">and source_type = #{sourceType}</if>
             <if test="outhospno != null and outhospno != ''">and outhospno = #{outhospno}</if>
             <if test="inhospno != null and inhospno != ''">and inhospno = #{inhospno}</if>
@@ -222,6 +225,7 @@
             <if test="highRiskChildType != null">high_risk_child_type,</if>
             <if test="highRiskChildName != null">high_risk_child_name,</if>
             <if test="plannedFollowTime != null">planned_follow_time,</if>
+            <if test="followupPeriod != null">followup_period,</if>
             <if test="hrcGrowthDevelopmentMonitoring != null">hrc_growth_development_monitoring,</if>
             <if test="hrcNeurologicalEvaluation != null">hrc_neurological_evaluation,</if>
             <if test="hrcInterventionRecords != null">hrc_intervention_records,</if>
@@ -280,6 +284,7 @@
             <if test="highRiskChildType != null">#{highRiskChildType},</if>
             <if test="highRiskChildName != null">#{highRiskChildName},</if>
             <if test="plannedFollowTime != null">#{plannedFollowTime},</if>
+            <if test="followupPeriod != null">#{followupPeriod},</if>
             <if test="hrcGrowthDevelopmentMonitoring != null">#{hrcGrowthDevelopmentMonitoring},</if>
             <if test="hrcNeurologicalEvaluation != null">#{hrcNeurologicalEvaluation},</if>
             <if test="hrcInterventionRecords != null">#{hrcInterventionRecords},</if>
@@ -342,6 +347,7 @@
             <if test="highRiskChildType != null">high_risk_child_type = #{highRiskChildType},</if>
             <if test="highRiskChildName != null">high_risk_child_name = #{highRiskChildName},</if>
             <if test="plannedFollowTime != null">planned_follow_time = #{plannedFollowTime},</if>
+            <if test="followupPeriod != null">followup_period = #{followupPeriod},</if>
             <if test="hrcGrowthDevelopmentMonitoring != null">hrc_growth_development_monitoring = #{hrcGrowthDevelopmentMonitoring},</if>
             <if test="hrcNeurologicalEvaluation != null">hrc_neurological_evaluation = #{hrcNeurologicalEvaluation},</if>
             <if test="hrcInterventionRecords != null">hrc_intervention_records = #{hrcInterventionRecords},</if>
diff --git a/sql/pat_child_archive_detail_and_config_add_followup_period_20261109.sql b/sql/pat_child_archive_detail_and_config_add_followup_period_20261109.sql
new file mode 100644
index 0000000..36f05e2
--- /dev/null
+++ b/sql/pat_child_archive_detail_and_config_add_followup_period_20261109.sql
@@ -0,0 +1,14 @@
+-- =============================================================================
+-- 闅忚鍛ㄦ湡缁熶竴瀛楁 followup_period
+-- 娑夊強锛�
+--   1. pat_child_archive_detail锛堝効淇濇。妗堣鎯咃級
+--   2. pat_specific_archive_generate_config锛堜笓绉戞。妗堢敓鎴愰厤缃級
+-- 璇存槑锛氬淇濇。妗堣鎯� pat_maternity_archive_detail 宸叉湁 followup_period锛屾棤闇�閲嶅娣诲姞銆�
+-- date锛�2026-11-09
+-- =============================================================================
+
+ALTER TABLE pat_child_archive_detail
+    ADD COLUMN followup_period varchar(100) NULL COMMENT '闅忚鍛ㄦ湡' AFTER planned_follow_time;
+
+ALTER TABLE pat_specific_archive_generate_config
+    ADD COLUMN followup_period varchar(100) NULL COMMENT '闅忚鍛ㄦ湡' AFTER archive_type;

--
Gitblit v1.9.3