From 0939e5e15e26848dfe73512e321862132e4f071f Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期四, 08 十月 2026 16:41:42 +0800
Subject: [PATCH] 【丽水】妇幼档案

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMaternityChildArchiveController.java |  106 +++++++++
 smartor/src/main/java/com/smartor/service/impl/PatMaternityChildArchiveServiceImpl.java            |   97 ++++++++
 smartor/src/main/java/com/smartor/service/IPatMaternityChildArchiveService.java                    |   62 +++++
 smartor/src/main/resources/mapper/smartor/PatMaternityChildArchiveMapper.xml                       |  321 +++++++++++++++++++++++++++++
 smartor/src/main/java/com/smartor/mapper/PatMaternityChildArchiveMapper.java                       |   64 +++++
 5 files changed, 650 insertions(+), 0 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMaternityChildArchiveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMaternityChildArchiveController.java
new file mode 100644
index 0000000..24d6533
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMaternityChildArchiveController.java
@@ -0,0 +1,106 @@
+package com.ruoyi.web.controller.smartor;
+
+import com.ruoyi.common.annotation.AddOrgId;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.PageUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.smartor.domain.PatMaternityChildArchive;
+import com.smartor.service.IPatMaternityChildArchiveService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 濡囧辜妗fController
+ *
+ * @author ruoyi
+ * @date 2026-10-08
+ */
+@Api(description = "濡囧辜妗f")
+@RestController
+@RequestMapping("/smartor/maternityChildArchive")
+public class PatMaternityChildArchiveController extends BaseController {
+    @Autowired
+    private IPatMaternityChildArchiveService patMaternityChildArchiveService;
+
+    /**
+     * 鏌ヨ濡囧辜妗f鍒楄〃
+     */
+    @ApiOperation("鏌ヨ濡囧辜妗f鍒楄〃")
+    //@PreAuthorize("@ss.hasPermi('system:maternityChildArchive:list')")
+    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
+    @PostMapping("/selectPatMaternityChildArchiveList")
+    public TableDataInfo selectPatMaternityChildArchiveList(@RequestBody PatMaternityChildArchive patMaternityChildArchive) {
+        PageUtils.startPageByPost(patMaternityChildArchive.getPageNum(), patMaternityChildArchive.getPageSize());
+        List<PatMaternityChildArchive> list = patMaternityChildArchiveService.selectPatMaternityChildArchiveList(patMaternityChildArchive);
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭濡囧辜妗f鍒楄〃
+     */
+    @ApiOperation("瀵煎嚭濡囧辜妗f鍒楄〃")
+    //@PreAuthorize("@ss.hasPermi('system:maternityChildArchive:export')")
+    @Log(title = "濡囧辜妗f", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, PatMaternityChildArchive patMaternityChildArchive) {
+        List<PatMaternityChildArchive> list = patMaternityChildArchiveService.selectPatMaternityChildArchiveList(patMaternityChildArchive);
+        ExcelUtil<PatMaternityChildArchive> util = new ExcelUtil<PatMaternityChildArchive>(PatMaternityChildArchive.class);
+        util.exportExcel(response, list, "濡囧辜妗f鏁版嵁");
+    }
+
+    /**
+     * 鑾峰彇濡囧辜妗f璇︾粏淇℃伅
+     */
+    @ApiOperation("鑾峰彇濡囧辜妗f璇︾粏淇℃伅")
+    //@PreAuthorize("@ss.hasPermi('system:maternityChildArchive:query')")
+    @GetMapping(value = "/getInfo/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(patMaternityChildArchiveService.selectPatMaternityChildArchiveById(id));
+    }
+
+    /**
+     * 鏂板濡囧辜妗f
+     */
+    @ApiOperation("鏂板濡囧辜妗f")
+    //@PreAuthorize("@ss.hasPermi('system:maternityChildArchive:add')")
+    @Log(title = "濡囧辜妗f", businessType = BusinessType.INSERT)
+    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody PatMaternityChildArchive patMaternityChildArchive) {
+        SysUser user = getLoginUser().getUser();
+        patMaternityChildArchive.setOrgid(user.getOrgid());
+        return toAjax(patMaternityChildArchiveService.insertPatMaternityChildArchive(patMaternityChildArchive));
+    }
+
+    /**
+     * 淇敼濡囧辜妗f
+     */
+    @ApiOperation("淇敼濡囧辜妗f")
+    //@PreAuthorize("@ss.hasPermi('system:maternityChildArchive:edit')")
+    @Log(title = "濡囧辜妗f", businessType = BusinessType.UPDATE)
+    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
+    @PostMapping("/edit")
+    public AjaxResult edit(@RequestBody PatMaternityChildArchive patMaternityChildArchive) {
+        return toAjax(patMaternityChildArchiveService.updatePatMaternityChildArchive(patMaternityChildArchive));
+    }
+
+    /**
+     * 鍒犻櫎濡囧辜妗f
+     */
+    @ApiOperation("鍒犻櫎濡囧辜妗f")
+    //@PreAuthorize("@ss.hasPermi('system:maternityChildArchive:remove')")
+    @GetMapping("/remove/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(patMaternityChildArchiveService.deletePatMaternityChildArchiveByIds(ids));
+    }
+}
diff --git a/smartor/src/main/java/com/smartor/mapper/PatMaternityChildArchiveMapper.java b/smartor/src/main/java/com/smartor/mapper/PatMaternityChildArchiveMapper.java
new file mode 100644
index 0000000..4856bb9
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/PatMaternityChildArchiveMapper.java
@@ -0,0 +1,64 @@
+package com.smartor.mapper;
+
+import com.smartor.domain.PatMaternityChildArchive;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 濡囧辜妗fMapper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2026-10-08
+ */
+@Mapper
+public interface PatMaternityChildArchiveMapper
+{
+    /**
+     * 鏌ヨ濡囧辜妗f
+     *
+     * @param id 濡囧辜妗f涓婚敭
+     * @return 濡囧辜妗f
+     */
+    public PatMaternityChildArchive selectPatMaternityChildArchiveById(Long id);
+
+    /**
+     * 鏌ヨ濡囧辜妗f鍒楄〃
+     *
+     * @param patMaternityChildArchive 濡囧辜妗f
+     * @return 濡囧辜妗f闆嗗悎
+     */
+    public List<PatMaternityChildArchive> selectPatMaternityChildArchiveList(PatMaternityChildArchive patMaternityChildArchive);
+
+    /**
+     * 鏂板濡囧辜妗f
+     *
+     * @param patMaternityChildArchive 濡囧辜妗f
+     * @return 缁撴灉
+     */
+    public int insertPatMaternityChildArchive(PatMaternityChildArchive patMaternityChildArchive);
+
+    /**
+     * 淇敼濡囧辜妗f
+     *
+     * @param patMaternityChildArchive 濡囧辜妗f
+     * @return 缁撴灉
+     */
+    public int updatePatMaternityChildArchive(PatMaternityChildArchive patMaternityChildArchive);
+
+    /**
+     * 鍒犻櫎濡囧辜妗f
+     *
+     * @param id 濡囧辜妗f涓婚敭
+     * @return 缁撴灉
+     */
+    public int deletePatMaternityChildArchiveById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎濡囧辜妗f
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deletePatMaternityChildArchiveByIds(Long[] ids);
+}
diff --git a/smartor/src/main/java/com/smartor/service/IPatMaternityChildArchiveService.java b/smartor/src/main/java/com/smartor/service/IPatMaternityChildArchiveService.java
new file mode 100644
index 0000000..3c8a208
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/IPatMaternityChildArchiveService.java
@@ -0,0 +1,62 @@
+package com.smartor.service;
+
+import com.smartor.domain.PatMaternityChildArchive;
+
+import java.util.List;
+
+/**
+ * 濡囧辜妗fService鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2026-10-08
+ */
+public interface IPatMaternityChildArchiveService
+{
+    /**
+     * 鏌ヨ濡囧辜妗f
+     *
+     * @param id 濡囧辜妗f涓婚敭
+     * @return 濡囧辜妗f
+     */
+    public PatMaternityChildArchive selectPatMaternityChildArchiveById(Long id);
+
+    /**
+     * 鏌ヨ濡囧辜妗f鍒楄〃
+     *
+     * @param patMaternityChildArchive 濡囧辜妗f
+     * @return 濡囧辜妗f闆嗗悎
+     */
+    public List<PatMaternityChildArchive> selectPatMaternityChildArchiveList(PatMaternityChildArchive patMaternityChildArchive);
+
+    /**
+     * 鏂板濡囧辜妗f
+     *
+     * @param patMaternityChildArchive 濡囧辜妗f
+     * @return 缁撴灉
+     */
+    public int insertPatMaternityChildArchive(PatMaternityChildArchive patMaternityChildArchive);
+
+    /**
+     * 淇敼濡囧辜妗f
+     *
+     * @param patMaternityChildArchive 濡囧辜妗f
+     * @return 缁撴灉
+     */
+    public int updatePatMaternityChildArchive(PatMaternityChildArchive patMaternityChildArchive);
+
+    /**
+     * 鎵归噺鍒犻櫎濡囧辜妗f
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑濡囧辜妗f涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deletePatMaternityChildArchiveByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎濡囧辜妗f淇℃伅
+     *
+     * @param id 濡囧辜妗f涓婚敭
+     * @return 缁撴灉
+     */
+    public int deletePatMaternityChildArchiveById(Long id);
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMaternityChildArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMaternityChildArchiveServiceImpl.java
new file mode 100644
index 0000000..e5427ea
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMaternityChildArchiveServiceImpl.java
@@ -0,0 +1,97 @@
+package com.smartor.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.smartor.domain.PatMaternityChildArchive;
+import com.smartor.mapper.PatMaternityChildArchiveMapper;
+import com.smartor.service.IPatMaternityChildArchiveService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 濡囧辜妗fService涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2026-10-08
+ */
+@Service
+public class PatMaternityChildArchiveServiceImpl implements IPatMaternityChildArchiveService
+{
+    @Autowired
+    private PatMaternityChildArchiveMapper patMaternityChildArchiveMapper;
+
+    /**
+     * 鏌ヨ濡囧辜妗f
+     *
+     * @param id 濡囧辜妗f涓婚敭
+     * @return 濡囧辜妗f
+     */
+    @Override
+    public PatMaternityChildArchive selectPatMaternityChildArchiveById(Long id)
+    {
+        return patMaternityChildArchiveMapper.selectPatMaternityChildArchiveById(id);
+    }
+
+    /**
+     * 鏌ヨ濡囧辜妗f鍒楄〃
+     *
+     * @param patMaternityChildArchive 濡囧辜妗f
+     * @return 濡囧辜妗f
+     */
+    @Override
+    public List<PatMaternityChildArchive> selectPatMaternityChildArchiveList(PatMaternityChildArchive patMaternityChildArchive)
+    {
+        return patMaternityChildArchiveMapper.selectPatMaternityChildArchiveList(patMaternityChildArchive);
+    }
+
+    /**
+     * 鏂板濡囧辜妗f
+     *
+     * @param patMaternityChildArchive 濡囧辜妗f
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertPatMaternityChildArchive(PatMaternityChildArchive patMaternityChildArchive)
+    {
+        patMaternityChildArchive.setCreateTime(DateUtils.getNowDate());
+        return patMaternityChildArchiveMapper.insertPatMaternityChildArchive(patMaternityChildArchive);
+    }
+
+    /**
+     * 淇敼濡囧辜妗f
+     *
+     * @param patMaternityChildArchive 濡囧辜妗f
+     * @return 缁撴灉
+     */
+    @Override
+    public int updatePatMaternityChildArchive(PatMaternityChildArchive patMaternityChildArchive)
+    {
+        patMaternityChildArchive.setUpdateTime(DateUtils.getNowDate());
+        return patMaternityChildArchiveMapper.updatePatMaternityChildArchive(patMaternityChildArchive);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎濡囧辜妗f
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑濡囧辜妗f涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deletePatMaternityChildArchiveByIds(Long[] ids)
+    {
+        return patMaternityChildArchiveMapper.deletePatMaternityChildArchiveByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎濡囧辜妗f淇℃伅
+     *
+     * @param id 濡囧辜妗f涓婚敭
+     * @return 缁撴灉
+     */
+    @Override
+    public int deletePatMaternityChildArchiveById(Long id)
+    {
+        return patMaternityChildArchiveMapper.deletePatMaternityChildArchiveById(id);
+    }
+}
diff --git a/smartor/src/main/resources/mapper/smartor/PatMaternityChildArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMaternityChildArchiveMapper.xml
new file mode 100644
index 0000000..8d915e9
--- /dev/null
+++ b/smartor/src/main/resources/mapper/smartor/PatMaternityChildArchiveMapper.xml
@@ -0,0 +1,321 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.smartor.mapper.PatMaternityChildArchiveMapper">
+
+    <resultMap type="com.smartor.domain.PatMaternityChildArchive" id="PatMaternityChildArchiveResult">
+        <result property="id" column="id"/>
+        <result property="type" column="type"/>
+        <result property="archiveType" column="archive_type"/>
+        <result property="outhospno" column="outhospno"/>
+        <result property="inhospno" column="inhospno"/>
+        <result property="serialnum" column="serialnum"/>
+        <result property="patid" column="patid"/>
+        <result property="patname" column="patname"/>
+        <result property="parentname" column="parentname"/>
+        <result property="birthdate" column="birthdate"/>
+        <result property="idcardno" column="idcardno"/>
+        <result property="phone" column="phone"/>
+        <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"/>
+        <result property="managementDoctorCode" column="management_doctor_code"/>
+        <result property="managementDoctorName" column="management_doctor_name"/>
+        <result property="deptcode" column="deptcode"/>
+        <result property="deptname" column="deptname"/>
+        <result property="wardcode" column="wardcode"/>
+        <result property="wardname" column="wardname"/>
+        <result property="icd10code" column="icd10code"/>
+        <result property="diagname" column="diagname"/>
+        <result property="pregnancySituation" column="pregnancy_situation"/>
+        <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"/>
+        <result property="campusid" column="campusid"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+
+    <sql id="selectPatMaternityChildArchiveVo">
+        select id,
+               type,
+               archive_type,
+               outhospno,
+               inhospno,
+               serialnum,
+               patid,
+               patname,
+               parentname,
+               birthdate,
+               idcardno,
+               phone,
+               diag_time,
+               archive_time,
+               planned_follow_time,
+               followup_cycle_times,
+               sex,
+               doctor_code,
+               doctor_name,
+               management_doctor_code,
+               management_doctor_name,
+               deptcode,
+               deptname,
+               wardcode,
+               wardname,
+               icd10code,
+               diagname,
+               pregnancy_situation,
+               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,
+               campusid,
+               update_by,
+               update_time,
+               create_by,
+               create_time,
+               del_flag
+        from pat_maternity_child_archive
+    </sql>
+
+    <select id="selectPatMaternityChildArchiveList" parameterType="com.smartor.domain.PatMaternityChildArchive"
+            resultMap="PatMaternityChildArchiveResult">
+        <include refid="selectPatMaternityChildArchiveVo"/>
+        where 1=1
+            and del_flag = '0'
+            <if test="type != null and type != ''">and type = #{type}</if>
+            <if test="archiveType != null and archiveType != ''">and archive_type = #{archiveType}</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>
+            <if test="patid != null">and patid = #{patid}</if>
+            <if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if>
+            <if test="parentname != null and parentname != ''">and parentname like concat('%', #{parentname}, '%')</if>
+            <if test="birthdate != null">and birthdate = #{birthdate}</if>
+            <if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if>
+            <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>
+            <if test="managementDoctorCode != null and managementDoctorCode != ''">and management_doctor_code = #{managementDoctorCode}</if>
+            <if test="managementDoctorName != null and managementDoctorName != ''">and management_doctor_name like concat('%', #{managementDoctorName}, '%')</if>
+            <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if>
+            <if test="deptname != null and deptname != ''">and deptname like concat('%', #{deptname}, '%')</if>
+            <if test="wardcode != null and wardcode != ''">and wardcode = #{wardcode}</if>
+            <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="pregnancySituation != null and pregnancySituation != ''">and pregnancy_situation = #{pregnancySituation}</if>
+            <if test="appointmentSituation != null and appointmentSituation != ''">and appointment_situation = #{appointmentSituation}</if>
+            <if test="closeStatus != null and closeStatus != ''">and close_status = #{closeStatus}</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="gestationalWeek != null">and gestational_week = #{gestationalWeek}</if>
+            <if test="birthWeight != null">and birth_weight = #{birthWeight}</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="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>
+            <if test="params.beginTime != null and params.beginTime != ''">
+                and date_format(archive_time, '%y%m%d') &gt;= date_format(#{params.beginTime}, '%y%m%d')
+            </if>
+            <if test="params.endTime != null and params.endTime != ''">
+                and date_format(archive_time, '%y%m%d') &lt;= date_format(#{params.endTime}, '%y%m%d')
+            </if>
+    </select>
+
+    <select id="selectPatMaternityChildArchiveById" parameterType="Long" resultMap="PatMaternityChildArchiveResult">
+        <include refid="selectPatMaternityChildArchiveVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertPatMaternityChildArchive" parameterType="com.smartor.domain.PatMaternityChildArchive"
+            useGeneratedKeys="true" keyProperty="id">
+        insert into pat_maternity_child_archive
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="type != null">type,</if>
+            <if test="archiveType != null">archive_type,</if>
+            <if test="outhospno != null">outhospno,</if>
+            <if test="inhospno != null">inhospno,</if>
+            <if test="serialnum != null">serialnum,</if>
+            <if test="patid != null">patid,</if>
+            <if test="patname != null">patname,</if>
+            <if test="parentname != null">parentname,</if>
+            <if test="birthdate != null">birthdate,</if>
+            <if test="idcardno != null">idcardno,</if>
+            <if test="phone != null">phone,</if>
+            <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>
+            <if test="managementDoctorCode != null">management_doctor_code,</if>
+            <if test="managementDoctorName != null">management_doctor_name,</if>
+            <if test="deptcode != null">deptcode,</if>
+            <if test="deptname != null">deptname,</if>
+            <if test="wardcode != null">wardcode,</if>
+            <if test="wardname != null">wardname,</if>
+            <if test="icd10code != null">icd10code,</if>
+            <if test="diagname != null">diagname,</if>
+            <if test="pregnancySituation != null">pregnancy_situation,</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>
+            <if test="campusid != null">campusid,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="delFlag != null and delFlag != ''">del_flag,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="type != null">#{type},</if>
+            <if test="archiveType != null">#{archiveType},</if>
+            <if test="outhospno != null">#{outhospno},</if>
+            <if test="inhospno != null">#{inhospno},</if>
+            <if test="serialnum != null">#{serialnum},</if>
+            <if test="patid != null">#{patid},</if>
+            <if test="patname != null">#{patname},</if>
+            <if test="parentname != null">#{parentname},</if>
+            <if test="birthdate != null">#{birthdate},</if>
+            <if test="idcardno != null">#{idcardno},</if>
+            <if test="phone != null">#{phone},</if>
+            <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>
+            <if test="managementDoctorCode != null">#{managementDoctorCode},</if>
+            <if test="managementDoctorName != null">#{managementDoctorName},</if>
+            <if test="deptcode != null">#{deptcode},</if>
+            <if test="deptname != null">#{deptname},</if>
+            <if test="wardcode != null">#{wardcode},</if>
+            <if test="wardname != null">#{wardname},</if>
+            <if test="icd10code != null">#{icd10code},</if>
+            <if test="diagname != null">#{diagname},</if>
+            <if test="pregnancySituation != null">#{pregnancySituation},</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>
+            <if test="campusid != null">#{campusid},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
+        </trim>
+    </insert>
+
+    <update id="updatePatMaternityChildArchive" parameterType="com.smartor.domain.PatMaternityChildArchive">
+        update pat_maternity_child_archive
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null">type = #{type},</if>
+            <if test="archiveType != null">archive_type = #{archiveType},</if>
+            <if test="outhospno != null">outhospno = #{outhospno},</if>
+            <if test="inhospno != null">inhospno = #{inhospno},</if>
+            <if test="serialnum != null">serialnum = #{serialnum},</if>
+            <if test="patid != null">patid = #{patid},</if>
+            <if test="patname != null">patname = #{patname},</if>
+            <if test="parentname != null">parentname = #{parentname},</if>
+            <if test="birthdate != null">birthdate = #{birthdate},</if>
+            <if test="idcardno != null">idcardno = #{idcardno},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <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>
+            <if test="managementDoctorCode != null">management_doctor_code = #{managementDoctorCode},</if>
+            <if test="managementDoctorName != null">management_doctor_name = #{managementDoctorName},</if>
+            <if test="deptcode != null">deptcode = #{deptcode},</if>
+            <if test="deptname != null">deptname = #{deptname},</if>
+            <if test="wardcode != null">wardcode = #{wardcode},</if>
+            <if test="wardname != null">wardname = #{wardname},</if>
+            <if test="icd10code != null">icd10code = #{icd10code},</if>
+            <if test="diagname != null">diagname = #{diagname},</if>
+            <if test="pregnancySituation != null">pregnancy_situation = #{pregnancySituation},</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>
+            <if test="campusid != null">campusid = #{campusid},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deletePatMaternityChildArchiveById" parameterType="Long">
+        update pat_maternity_child_archive
+        <trim prefix="SET" suffixOverrides=",">
+            del_flag = '1'
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deletePatMaternityChildArchiveByIds" parameterType="String">
+        update pat_maternity_child_archive set del_flag = '1' where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+</mapper>

--
Gitblit v1.9.3