| | |
| | | <mapper namespace="com.smartor.mapper.PatArchiveImportMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.PatArchiveImport" id="PatArchiveImportResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="patientno" column="patientno"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="name" column="name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="age" column="age"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="openid" column="openid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <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="batchName" column="batch_name"/> |
| | | <result property="batchNo" column="batch_no"/> |
| | | <result property="id" column="id"/> |
| | | <result property="patientno" column="patientno"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="name" column="name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="age" column="age"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="openid" column="openid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <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="batchName" column="batch_name"/> |
| | | <result property="batchNo" column="batch_no"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatArchiveImportVo"> |
| | | select id, patientno, pattype, name, sex, idcardno, age, telcode, openid, del_flag, update_by, update_time, create_by, create_time, batch_name, batch_no |
| | | select id, |
| | | patientno, |
| | | pattype, |
| | | name, |
| | | sex, |
| | | idcardno, |
| | | age, |
| | | telcode, |
| | | openid, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | batch_name, |
| | | batch_no |
| | | from pat_archive_import |
| | | </sql> |
| | | |
| | |
| | | resultMap="PatArchiveImportResult"> |
| | | <include refid="selectPatArchiveImportVo"/> |
| | | <where> |
| | | <if test="patientno != null and patientno != ''"> |
| | | and patientno = #{patientno} |
| | | </if> |
| | | <if test="pattype != null and pattype != ''"> |
| | | and pattype = #{pattype} |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and name like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="sex != null "> |
| | | and sex = #{sex} |
| | | </if> |
| | | <if test="idcardno != null and idcardno != ''"> |
| | | and idcardno = #{idcardno} |
| | | </if> |
| | | <if test="age != null "> |
| | | and age = #{age} |
| | | </if> |
| | | <if test="telcode != null and telcode != ''"> |
| | | and telcode = #{telcode} |
| | | </if> |
| | | <if test="openid != null and openid != ''"> |
| | | and openid = #{openid} |
| | | </if> |
| | | <if test="batchName != null and batchName != ''"> |
| | | and batch_name like concat('%', #{batchName}, '%') |
| | | </if> |
| | | <if test="batchNo != null and batchNo != ''"> |
| | | and batch_no = #{batchNo} |
| | | </if> |
| | | <if test="patientno != null and patientno != ''"> |
| | | and patientno = #{patientno} |
| | | </if> |
| | | <if test="pattype != null and pattype != ''"> |
| | | and pattype = #{pattype} |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and name like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="sex != null "> |
| | | and sex = #{sex} |
| | | </if> |
| | | <if test="idcardno != null and idcardno != ''"> |
| | | and idcardno = #{idcardno} |
| | | </if> |
| | | <if test="age != null "> |
| | | and age = #{age} |
| | | </if> |
| | | <if test="telcode != null and telcode != ''"> |
| | | and telcode = #{telcode} |
| | | </if> |
| | | <if test="openid != null and openid != ''"> |
| | | and openid = #{openid} |
| | | </if> |
| | | <if test="batchName != null and batchName != ''"> |
| | | and batch_name like concat('%', #{batchName}, '%') |
| | | </if> |
| | | <if test="batchNo != null and batchNo != ''"> |
| | | and batch_no = #{batchNo} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveImportById" parameterType="Long" |
| | | resultMap="PatArchiveImportResult"> |
| | | <include refid="selectPatArchiveImportVo"/> |
| | | where id = #{id} |
| | | <include refid="selectPatArchiveImportVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatArchiveImport" parameterType="com.smartor.domain.PatArchiveImport" useGeneratedKeys="true" keyProperty="id"> |
| | | <insert id="insertPatArchiveImport" parameterType="com.smartor.domain.PatArchiveImport" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into pat_archive_import |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="patientno != null">patientno, |
| | | </if> |
| | | <if test="pattype != null">pattype, |
| | | </if> |
| | | <if test="name != null">name, |
| | | </if> |
| | | <if test="sex != null">sex, |
| | | </if> |
| | | <if test="idcardno != null">idcardno, |
| | | </if> |
| | | <if test="age != null">age, |
| | | </if> |
| | | <if test="telcode != null">telcode, |
| | | </if> |
| | | <if test="openid != null">openid, |
| | | </if> |
| | | <if test="delFlag != null">del_flag, |
| | | </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="batchName != null">batch_name, |
| | | </if> |
| | | <if test="batchNo != null">batch_no, |
| | | </if> |
| | | <if test="patientno != null">patientno, |
| | | </if> |
| | | <if test="pattype != null">pattype, |
| | | </if> |
| | | <if test="name != null">name, |
| | | </if> |
| | | <if test="sex != null">sex, |
| | | </if> |
| | | <if test="idcardno != null">idcardno, |
| | | </if> |
| | | <if test="age != null">age, |
| | | </if> |
| | | <if test="telcode != null">telcode, |
| | | </if> |
| | | <if test="openid != null">openid, |
| | | </if> |
| | | <if test="delFlag != null">del_flag, |
| | | </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="batchName != null">batch_name, |
| | | </if> |
| | | <if test="batchNo != null">batch_no, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="patientno != null">#{patientno}, |
| | | </if> |
| | | <if test="pattype != null">#{pattype}, |
| | | </if> |
| | | <if test="name != null">#{name}, |
| | | </if> |
| | | <if test="sex != null">#{sex}, |
| | | </if> |
| | | <if test="idcardno != null">#{idcardno}, |
| | | </if> |
| | | <if test="age != null">#{age}, |
| | | </if> |
| | | <if test="telcode != null">#{telcode}, |
| | | </if> |
| | | <if test="openid != null">#{openid}, |
| | | </if> |
| | | <if test="delFlag != null">#{delFlag}, |
| | | </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="batchName != null">#{batchName}, |
| | | </if> |
| | | <if test="batchNo != null">#{batchNo}, |
| | | </if> |
| | | <if test="patientno != null">#{patientno}, |
| | | </if> |
| | | <if test="pattype != null">#{pattype}, |
| | | </if> |
| | | <if test="name != null">#{name}, |
| | | </if> |
| | | <if test="sex != null">#{sex}, |
| | | </if> |
| | | <if test="idcardno != null">#{idcardno}, |
| | | </if> |
| | | <if test="age != null">#{age}, |
| | | </if> |
| | | <if test="telcode != null">#{telcode}, |
| | | </if> |
| | | <if test="openid != null">#{openid}, |
| | | </if> |
| | | <if test="delFlag != null">#{delFlag}, |
| | | </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="batchName != null">#{batchName}, |
| | | </if> |
| | | <if test="batchNo != null">#{batchNo}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatArchiveImport" parameterType="com.smartor.domain.PatArchiveImport"> |
| | | update pat_archive_import |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="patientno != null">patientno = |
| | | #{patientno}, |
| | | </if> |
| | | <if test="pattype != null">pattype = |
| | | #{pattype}, |
| | | </if> |
| | | <if test="name != null">name = |
| | | #{name}, |
| | | </if> |
| | | <if test="sex != null">sex = |
| | | #{sex}, |
| | | </if> |
| | | <if test="idcardno != null">idcardno = |
| | | #{idcardno}, |
| | | </if> |
| | | <if test="age != null">age = |
| | | #{age}, |
| | | </if> |
| | | <if test="telcode != null">telcode = |
| | | #{telcode}, |
| | | </if> |
| | | <if test="openid != null">openid = |
| | | #{openid}, |
| | | </if> |
| | | <if test="delFlag != null">del_flag = |
| | | #{delFlag}, |
| | | </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="batchName != null">batch_name = |
| | | #{batchName}, |
| | | </if> |
| | | <if test="batchNo != null">batch_no = |
| | | #{batchNo}, |
| | | </if> |
| | | <if test="patientno != null">patientno = |
| | | #{patientno}, |
| | | </if> |
| | | <if test="pattype != null">pattype = |
| | | #{pattype}, |
| | | </if> |
| | | <if test="name != null">name = |
| | | #{name}, |
| | | </if> |
| | | <if test="sex != null">sex = |
| | | #{sex}, |
| | | </if> |
| | | <if test="idcardno != null">idcardno = |
| | | #{idcardno}, |
| | | </if> |
| | | <if test="age != null">age = |
| | | #{age}, |
| | | </if> |
| | | <if test="telcode != null">telcode = |
| | | #{telcode}, |
| | | </if> |
| | | <if test="openid != null">openid = |
| | | #{openid}, |
| | | </if> |
| | | <if test="delFlag != null">del_flag = |
| | | #{delFlag}, |
| | | </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="batchName != null">batch_name = |
| | | #{batchName}, |
| | | </if> |
| | | <if test="batchNo != null">batch_no = |
| | | #{batchNo}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatArchiveImportById" parameterType="Long"> |
| | | <update id="deletePatArchiveImportById" parameterType="Long"> |
| | | update pat_archive_import |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id = #{id} |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatArchiveImportByIds" parameterType="String"> |
| | | update pat_archive_import |
| | | <update id="deletePatArchiveImportByIds" parameterType="String"> |
| | | update pat_archive_import |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |