| | |
| | | <resultMap type="com.smartor.domain.PatMaternityArchive" id="PatMaternityArchiveResult"> |
| | | <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"/> |
| | |
| | | <sql id="selectPatMaternityArchiveVo"> |
| | | select id, |
| | | archive_type, |
| | | source_type, |
| | | source_biz_id, |
| | | source_biz_no, |
| | | source_sub_id, |
| | | outhospno, |
| | | inhospno, |
| | | serialnum, |
| | |
| | | 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> |
| | |
| | | <select id="selectPatMaternityArchiveById" parameterType="Long" resultMap="PatMaternityArchiveResult"> |
| | | <include refid="selectPatMaternityArchiveVo"/> |
| | | where id = #{id} |
| | | and del_flag = '0' |
| | | </select> |
| | | |
| | | <insert id="insertPatMaternityArchive" parameterType="com.smartor.domain.PatMaternityArchive" |
| | |
| | | insert into pat_maternity_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> |
| | |
| | | </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> |
| | |
| | | update pat_maternity_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> |