| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.PatMedPhysicalMapper"> |
| | | |
| | | <resultMap type="PatMedPhysical" id="PatMedPhysicalResult"> |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedPhysical" id="PatMedPhysicalResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="serialnum" column="serialnum" /> |
| | | <result property="patid" column="patid" /> |
| | |
| | | <result property="deptid" column="deptid" /> |
| | | <result property="projectid" column="projectid" /> |
| | | <result property="schemetime" column="schemetime" /> |
| | | <result property="patname" column="patname" /> |
| | | <result property="patno" column="patno" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedPhysicalVo"> |
| | | select id, serialnum, patid, drcode, drname, hospitalcode, hospitalname, physicaldate, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, deptcode, deptname, projectname, projectcode, state, schemestatus, generalschemestatus, deptid, projectid, schemetime from pat_med_physical |
| | | select id, serialnum, patid, patname, patno, drcode, drname, hospitalcode, hospitalname, physicaldate, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, deptcode, deptname, projectname, projectcode, state, schemestatus, generalschemestatus, deptid, projectid, schemetime from pat_med_physical |
| | | </sql> |
| | | |
| | | <select id="selectPatMedPhysicalList" parameterType="PatMedPhysical" resultMap="PatMedPhysicalResult"> |
| | | <select id="selectPatMedPhysicalList" parameterType="com.smartor.domain.PatMedPhysical" resultMap="PatMedPhysicalResult"> |
| | | <include refid="selectPatMedPhysicalVo"/> |
| | | <where> |
| | | <where> |
| | | <if test="hospitalname != null and hospitalname != ''"> and hospitalname like concat('%', #{hospitalname}, '%')</if> |
| | | <if test="physicaldate != null "> and physicaldate = #{physicaldate}</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="patno != null and patno != ''"> and patno = #{patno}</if> |
| | | <if test="deptname != null and deptname != ''"> and deptname like concat('%', #{deptname}, '%')</if> |
| | | <if test="patname != null and patname != ''"> and patname like concat('%', #{patname}, '%')</if> |
| | | <if test="projectname != null and projectname != ''"> and projectname like concat('%', #{projectname}, '%')</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatMedPhysicalById" parameterType="Long" resultMap="PatMedPhysicalResult"> |
| | | <include refid="selectPatMedPhysicalVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertPatMedPhysical" parameterType="PatMedPhysical" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into pat_med_physical |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="deptid != null">deptid,</if> |
| | | <if test="projectid != null">projectid,</if> |
| | | <if test="schemetime != null">schemetime,</if> |
| | | <if test="patname != null">patname,</if> |
| | | <if test="patno != null">patno,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | |
| | | <if test="deptid != null">#{deptid},</if> |
| | | <if test="projectid != null">#{projectid},</if> |
| | | <if test="schemetime != null">#{schemetime},</if> |
| | | <if test="patname != null">#{patname},</if> |
| | | <if test="patno != null">#{patno},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="deptid != null">deptid = #{deptid},</if> |
| | | <if test="projectid != null">projectid = #{projectid},</if> |
| | | <if test="schemetime != null">schemetime = #{schemetime},</if> |
| | | <if test="patname != null">patname = #{patname},</if> |
| | | <if test="patno != null">patno = #{patno},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | </delete> |
| | | |
| | | <delete id="deletePatMedPhysicalByIds" parameterType="String"> |
| | | delete from pat_med_physical where id in |
| | | delete from pat_med_physical where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | | </mapper> |