From d9281d43e27ab6c510d390ddb26eaffc8ccc1add Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 11 十一月 2026 14:04:52 +0800
Subject: [PATCH] 妇幼-补充住院随访档案生成日志、完成事件及自检文件

---
 smartor/src/main/resources/mapper/smartor/PatChildArchiveMapper.xml |   72 +++++++++++++++++++++++++++++++++---
 1 files changed, 66 insertions(+), 6 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/PatChildArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatChildArchiveMapper.xml
index 4092c18..1e8dbc2 100644
--- a/smartor/src/main/resources/mapper/smartor/PatChildArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatChildArchiveMapper.xml
@@ -7,6 +7,10 @@
     <resultMap type="com.smartor.domain.PatChildArchive" id="PatChildArchiveResult">
         <result property="id" column="id"/>
         <result property="archiveType" column="archive_type"/>
+        <result property="sourceType" column="source_type"/>
+        <result property="sourceBizId" column="source_biz_id"/>
+        <result property="sourceBizNo" column="source_biz_no"/>
+        <result property="sourceSubId" column="source_sub_id"/>
         <result property="outhospno" column="outhospno"/>
         <result property="inhospno" column="inhospno"/>
         <result property="serialnum" column="serialnum"/>
@@ -19,7 +23,6 @@
         <result property="diagTime" column="diag_time"/>
         <result property="archiveTime" column="archive_time"/>
         <result property="plannedFollowTime" column="planned_follow_time"/>
-        <result property="followupCycleTimes" column="followup_cycle_times"/>
         <result property="sex" column="sex"/>
         <result property="doctorCode" column="doctor_code"/>
         <result property="doctorName" column="doctor_name"/>
@@ -31,7 +34,14 @@
         <result property="wardname" column="wardname"/>
         <result property="icd10code" column="icd10code"/>
         <result property="diagname" column="diagname"/>
+        <result property="appointmentSituation" column="appointment_situation"/>
         <result property="closeStatus" column="close_status"/>
+        <result property="nutritionIcd10Code" column="nutrition_icd10_code"/>
+        <result property="nutritionDiagName" column="nutrition_diag_name"/>
+        <result property="gestationalWeek" column="gestational_week"/>
+        <result property="birthWeight" column="birth_weight"/>
+        <result property="highRiskChildType" column="high_risk_child_type"/>
+        <result property="highRiskChildName" column="high_risk_child_name"/>
         <result property="registerUser" column="register_user"/>
         <result property="remark" column="remark"/>
         <result property="orgid" column="orgid"/>
@@ -46,6 +56,10 @@
     <sql id="selectPatChildArchiveVo">
         select id,
                archive_type,
+               source_type,
+               source_biz_id,
+               source_biz_no,
+               source_sub_id,
                outhospno,
                inhospno,
                serialnum,
@@ -58,7 +72,6 @@
                diag_time,
                archive_time,
                planned_follow_time,
-               followup_cycle_times,
                sex,
                doctor_code,
                doctor_name,
@@ -70,7 +83,14 @@
                wardname,
                icd10code,
                diagname,
+               appointment_situation,
                close_status,
+               nutrition_icd10_code,
+               nutrition_diag_name,
+               gestational_week,
+               birth_weight,
+               high_risk_child_type,
+               high_risk_child_name,
                register_user,
                remark,
                orgid,
@@ -89,6 +109,10 @@
         where 1=1
             and del_flag = '0'
             <if test="archiveType != null and archiveType != ''">and archive_type = #{archiveType}</if>
+            <if test="sourceType != null and sourceType != ''">and source_type = #{sourceType}</if>
+            <if test="sourceBizId != null">and source_biz_id = #{sourceBizId}</if>
+            <if test="sourceBizNo != null and sourceBizNo != ''">and source_biz_no = #{sourceBizNo}</if>
+            <if test="sourceSubId != null">and source_sub_id = #{sourceSubId}</if>
             <if test="outhospno != null and outhospno != ''">and outhospno = #{outhospno}</if>
             <if test="inhospno != null and inhospno != ''">and inhospno = #{inhospno}</if>
             <if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if>
@@ -100,7 +124,6 @@
             <if test="phone != null and phone != ''">and phone = #{phone}</if>
             <if test="diagTime != null">and diag_time = #{diagTime}</if>
             <if test="plannedFollowTime != null">and planned_follow_time = #{plannedFollowTime}</if>
-            <if test="followupCycleTimes != null and followupCycleTimes != ''">and followup_cycle_times = #{followupCycleTimes}</if>
             <if test="sex != null">and sex = #{sex}</if>
             <if test="doctorCode != null and doctorCode != ''">and doctor_code = #{doctorCode}</if>
             <if test="doctorName != null and doctorName != ''">and doctor_name like concat('%', #{doctorName}, '%')</if>
@@ -112,7 +135,13 @@
             <if test="wardname != null and wardname != ''">and wardname like concat('%', #{wardname}, '%')</if>
             <if test="icd10code != null and icd10code != ''">and icd10code = #{icd10code}</if>
             <if test="diagname != null and diagname != ''">and diagname like concat('%', #{diagname}, '%')</if>
+            <if test="nutritionIcd10Code != null and nutritionIcd10Code != ''">and nutrition_icd10_code = #{nutritionIcd10Code}</if>
+            <if test="nutritionDiagName != null and nutritionDiagName != ''">and nutrition_diag_name like concat('%', #{nutritionDiagName}, '%')</if>
+            <if test="highRiskChildType != null and highRiskChildType != ''">and high_risk_child_type = #{highRiskChildType}</if>
+            <if test="highRiskChildName != null and highRiskChildName != ''">and high_risk_child_name like concat('%', #{highRiskChildName}, '%')</if>
             <if test="closeStatus != null and closeStatus != ''">and close_status = #{closeStatus}</if>
+            <if test="gestationalWeek != null">and gestational_week = #{gestationalWeek}</if>
+            <if test="birthWeight != null">and birth_weight = #{birthWeight}</if>
             <if test="registerUser != null and registerUser != ''">and register_user = #{registerUser}</if>
             <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
             <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if>
@@ -127,6 +156,7 @@
     <select id="selectPatChildArchiveById" parameterType="Long" resultMap="PatChildArchiveResult">
         <include refid="selectPatChildArchiveVo"/>
         where id = #{id}
+        and del_flag = '0'
     </select>
 
     <insert id="insertPatChildArchive" parameterType="com.smartor.domain.PatChildArchive"
@@ -134,6 +164,10 @@
         insert into pat_child_archive
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="archiveType != null">archive_type,</if>
+            <if test="sourceType != null">source_type,</if>
+            <if test="sourceBizId != null">source_biz_id,</if>
+            <if test="sourceBizNo != null">source_biz_no,</if>
+            <if test="sourceSubId != null">source_sub_id,</if>
             <if test="outhospno != null">outhospno,</if>
             <if test="inhospno != null">inhospno,</if>
             <if test="serialnum != null">serialnum,</if>
@@ -146,7 +180,6 @@
             <if test="diagTime != null">diag_time,</if>
             <if test="archiveTime != null">archive_time,</if>
             <if test="plannedFollowTime != null">planned_follow_time,</if>
-            <if test="followupCycleTimes != null">followup_cycle_times,</if>
             <if test="sex != null">sex,</if>
             <if test="doctorCode != null">doctor_code,</if>
             <if test="doctorName != null">doctor_name,</if>
@@ -158,7 +191,14 @@
             <if test="wardname != null">wardname,</if>
             <if test="icd10code != null">icd10code,</if>
             <if test="diagname != null">diagname,</if>
+            <if test="appointmentSituation != null">appointment_situation,</if>
             <if test="closeStatus != null">close_status,</if>
+            <if test="nutritionIcd10Code != null">nutrition_icd10_code,</if>
+            <if test="nutritionDiagName != null">nutrition_diag_name,</if>
+            <if test="gestationalWeek != null">gestational_week,</if>
+            <if test="birthWeight != null">birth_weight,</if>
+            <if test="highRiskChildType != null">high_risk_child_type,</if>
+            <if test="highRiskChildName != null">high_risk_child_name,</if>
             <if test="registerUser != null">register_user,</if>
             <if test="remark != null">remark,</if>
             <if test="orgid != null">orgid,</if>
@@ -171,6 +211,10 @@
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="archiveType != null">#{archiveType},</if>
+            <if test="sourceType != null">#{sourceType},</if>
+            <if test="sourceBizId != null">#{sourceBizId},</if>
+            <if test="sourceBizNo != null">#{sourceBizNo},</if>
+            <if test="sourceSubId != null">#{sourceSubId},</if>
             <if test="outhospno != null">#{outhospno},</if>
             <if test="inhospno != null">#{inhospno},</if>
             <if test="serialnum != null">#{serialnum},</if>
@@ -183,7 +227,6 @@
             <if test="diagTime != null">#{diagTime},</if>
             <if test="archiveTime != null">#{archiveTime},</if>
             <if test="plannedFollowTime != null">#{plannedFollowTime},</if>
-            <if test="followupCycleTimes != null">#{followupCycleTimes},</if>
             <if test="sex != null">#{sex},</if>
             <if test="doctorCode != null">#{doctorCode},</if>
             <if test="doctorName != null">#{doctorName},</if>
@@ -195,7 +238,14 @@
             <if test="wardname != null">#{wardname},</if>
             <if test="icd10code != null">#{icd10code},</if>
             <if test="diagname != null">#{diagname},</if>
+            <if test="appointmentSituation != null">#{appointmentSituation},</if>
             <if test="closeStatus != null">#{closeStatus},</if>
+            <if test="nutritionIcd10Code != null">#{nutritionIcd10Code},</if>
+            <if test="nutritionDiagName != null">#{nutritionDiagName},</if>
+            <if test="gestationalWeek != null">#{gestationalWeek},</if>
+            <if test="birthWeight != null">#{birthWeight},</if>
+            <if test="highRiskChildType != null">#{highRiskChildType},</if>
+            <if test="highRiskChildName != null">#{highRiskChildName},</if>
             <if test="registerUser != null">#{registerUser},</if>
             <if test="remark != null">#{remark},</if>
             <if test="orgid != null">#{orgid},</if>
@@ -212,6 +262,10 @@
         update pat_child_archive
         <trim prefix="SET" suffixOverrides=",">
             <if test="archiveType != null">archive_type = #{archiveType},</if>
+            <if test="sourceType != null">source_type = #{sourceType},</if>
+            <if test="sourceBizId != null">source_biz_id = #{sourceBizId},</if>
+            <if test="sourceBizNo != null">source_biz_no = #{sourceBizNo},</if>
+            <if test="sourceSubId != null">source_sub_id = #{sourceSubId},</if>
             <if test="outhospno != null">outhospno = #{outhospno},</if>
             <if test="inhospno != null">inhospno = #{inhospno},</if>
             <if test="serialnum != null">serialnum = #{serialnum},</if>
@@ -224,7 +278,6 @@
             <if test="diagTime != null">diag_time = #{diagTime},</if>
             <if test="archiveTime != null">archive_time = #{archiveTime},</if>
             <if test="plannedFollowTime != null">planned_follow_time = #{plannedFollowTime},</if>
-            <if test="followupCycleTimes != null">followup_cycle_times = #{followupCycleTimes},</if>
             <if test="sex != null">sex = #{sex},</if>
             <if test="doctorCode != null">doctor_code = #{doctorCode},</if>
             <if test="doctorName != null">doctor_name = #{doctorName},</if>
@@ -236,7 +289,14 @@
             <if test="wardname != null">wardname = #{wardname},</if>
             <if test="icd10code != null">icd10code = #{icd10code},</if>
             <if test="diagname != null">diagname = #{diagname},</if>
+            <if test="appointmentSituation != null">appointment_situation = #{appointmentSituation},</if>
             <if test="closeStatus != null">close_status = #{closeStatus},</if>
+            <if test="nutritionIcd10Code != null">nutrition_icd10_code = #{nutritionIcd10Code},</if>
+            <if test="nutritionDiagName != null">nutrition_diag_name = #{nutritionDiagName},</if>
+            <if test="gestationalWeek != null">gestational_week = #{gestationalWeek},</if>
+            <if test="birthWeight != null">birth_weight = #{birthWeight},</if>
+            <if test="highRiskChildType != null">high_risk_child_type = #{highRiskChildType},</if>
+            <if test="highRiskChildName != null">high_risk_child_name = #{highRiskChildName},</if>
             <if test="registerUser != null">register_user = #{registerUser},</if>
             <if test="remark != null">remark = #{remark},</if>
             <if test="orgid != null">orgid = #{orgid},</if>

--
Gitblit v1.9.3