| | |
| | | <mapper namespace="com.ltkj.hosp.mapper.TjDiscardInspectionMapper"> |
| | | |
| | | <resultMap type="TjDiscardInspection" id="TjDiscardInspectionResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="deleted" column="deleted"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="tjNum" column="tj_num"/> |
| | | <result property="cusId" column="cus_id"/> |
| | | <result property="cusName" column="cus_name"/> |
| | | <result property="registrationTime" column="registration_time"/> |
| | | <result property="proId" column="pro_id"/> |
| | | <result property="proName" column="pro_name"/> |
| | | <result property="id" column="id"/> |
| | | <result property="deleted" column="deleted"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="tjNum" column="tj_num"/> |
| | | <result property="cusId" column="cus_id"/> |
| | | <result property="cusName" column="cus_name"/> |
| | | <result property="registrationTime" column="registration_time"/> |
| | | <result property="proId" column="pro_id"/> |
| | | <result property="proName" column="pro_name"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTjDiscardInspectionVo"> |
| | | select id, deleted, create_by, create_time, update_by, update_time, tj_num, cus_id, cus_name, registration_time, pro_id, pro_name |
| | | select id, |
| | | deleted, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | tj_num, |
| | | cus_id, |
| | | cus_name, |
| | | registration_time, |
| | | pro_id, |
| | | pro_name |
| | | from tj_discard_inspection |
| | | </sql> |
| | | |
| | | <select id="selectTjDiscardInspectionList" parameterType="TjDiscardInspection" resultMap="TjDiscardInspectionResult"> |
| | | <select id="selectTjDiscardInspectionList" parameterType="TjDiscardInspection" |
| | | resultMap="TjDiscardInspectionResult"> |
| | | <include refid="selectTjDiscardInspectionVo"/> |
| | | <where> |
| | | <if test="tjNum != null and tjNum != ''"> |
| | | and tj_num = #{tjNum} |
| | | </if> |
| | | <if test="cusName != null and cusName != ''"> |
| | | and cus_name like concat('%', #{cusName}, '%') |
| | | </if> |
| | | <if test="registrationTime != null "> |
| | | and registration_time = #{registrationTime} |
| | | </if> |
| | | <if test="proName != null and proName != ''"> |
| | | and pro_name like concat('%', #{proName}, '%') |
| | | </if> |
| | | <if test="tjNum != null and tjNum != ''"> |
| | | and tj_num = #{tjNum} |
| | | </if> |
| | | <if test="cusName != null and cusName != ''"> |
| | | and cus_name like concat('%', #{cusName}, '%') |
| | | </if> |
| | | <if test="registrationTime != null "> |
| | | and registration_time = #{registrationTime} |
| | | </if> |
| | | <if test="proName != null and proName != ''"> |
| | | and pro_name like concat('%', #{proName}, '%') |
| | | </if> |
| | | and deleted=0 |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectTjDiscardInspectionById" parameterType="Long" |
| | | resultMap="TjDiscardInspectionResult"> |
| | | <include refid="selectTjDiscardInspectionVo"/> |
| | | where id = #{id} |
| | | <include refid="selectTjDiscardInspectionVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertTjDiscardInspection" parameterType="TjDiscardInspection"> |
| | | insert into tj_discard_inspection |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id, |
| | | </if> |
| | | <if test="deleted != null">deleted, |
| | | </if> |
| | | <if test="createBy != null">create_by, |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="updateBy != null">update_by, |
| | | </if> |
| | | <if test="updateTime != null">update_time, |
| | | </if> |
| | | <if test="tjNum != null">tj_num, |
| | | </if> |
| | | <if test="cusId != null">cus_id, |
| | | </if> |
| | | <if test="cusName != null">cus_name, |
| | | </if> |
| | | <if test="registrationTime != null">registration_time, |
| | | </if> |
| | | <if test="proId != null">pro_id, |
| | | </if> |
| | | <if test="proName != null">pro_name, |
| | | </if> |
| | | <if test="id != null">id, |
| | | </if> |
| | | <if test="deleted != null">deleted, |
| | | </if> |
| | | <if test="createBy != null">create_by, |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="updateBy != null">update_by, |
| | | </if> |
| | | <if test="updateTime != null">update_time, |
| | | </if> |
| | | <if test="tjNum != null">tj_num, |
| | | </if> |
| | | <if test="cusId != null">cus_id, |
| | | </if> |
| | | <if test="cusName != null">cus_name, |
| | | </if> |
| | | <if test="registrationTime != null">registration_time, |
| | | </if> |
| | | <if test="proId != null">pro_id, |
| | | </if> |
| | | <if test="proName != null">pro_name, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id}, |
| | | </if> |
| | | <if test="deleted != null">#{deleted}, |
| | | </if> |
| | | <if test="createBy != null">#{createBy}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">#{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">#{updateTime}, |
| | | </if> |
| | | <if test="tjNum != null">#{tjNum}, |
| | | </if> |
| | | <if test="cusId != null">#{cusId}, |
| | | </if> |
| | | <if test="cusName != null">#{cusName}, |
| | | </if> |
| | | <if test="registrationTime != null">#{registrationTime}, |
| | | </if> |
| | | <if test="proId != null">#{proId}, |
| | | </if> |
| | | <if test="proName != null">#{proName}, |
| | | </if> |
| | | <if test="id != null">#{id}, |
| | | </if> |
| | | <if test="deleted != null">#{deleted}, |
| | | </if> |
| | | <if test="createBy != null">#{createBy}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">#{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">#{updateTime}, |
| | | </if> |
| | | <if test="tjNum != null">#{tjNum}, |
| | | </if> |
| | | <if test="cusId != null">#{cusId}, |
| | | </if> |
| | | <if test="cusName != null">#{cusName}, |
| | | </if> |
| | | <if test="registrationTime != null">#{registrationTime}, |
| | | </if> |
| | | <if test="proId != null">#{proId}, |
| | | </if> |
| | | <if test="proName != null">#{proName}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateTjDiscardInspection" parameterType="TjDiscardInspection"> |
| | | update tj_discard_inspection |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="deleted != null">deleted = |
| | | #{deleted}, |
| | | </if> |
| | | <if test="createBy != null">create_by = |
| | | #{createBy}, |
| | | </if> |
| | | <if test="createTime != null">create_time = |
| | | #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">update_by = |
| | | #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | <if test="tjNum != null">tj_num = |
| | | #{tjNum}, |
| | | </if> |
| | | <if test="cusId != null">cus_id = |
| | | #{cusId}, |
| | | </if> |
| | | <if test="cusName != null">cus_name = |
| | | #{cusName}, |
| | | </if> |
| | | <if test="registrationTime != null">registration_time = |
| | | #{registrationTime}, |
| | | </if> |
| | | <if test="proId != null">pro_id = |
| | | #{proId}, |
| | | </if> |
| | | <if test="proName != null">pro_name = |
| | | #{proName}, |
| | | </if> |
| | | <if test="deleted != null">deleted = |
| | | #{deleted}, |
| | | </if> |
| | | <if test="createBy != null">create_by = |
| | | #{createBy}, |
| | | </if> |
| | | <if test="createTime != null">create_time = |
| | | #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">update_by = |
| | | #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | <if test="tjNum != null">tj_num = |
| | | #{tjNum}, |
| | | </if> |
| | | <if test="cusId != null">cus_id = |
| | | #{cusId}, |
| | | </if> |
| | | <if test="cusName != null">cus_name = |
| | | #{cusName}, |
| | | </if> |
| | | <if test="registrationTime != null">registration_time = |
| | | #{registrationTime}, |
| | | </if> |
| | | <if test="proId != null">pro_id = |
| | | #{proId}, |
| | | </if> |
| | | <if test="proName != null">pro_name = |
| | | #{proName}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteTjDiscardInspectionById" parameterType="Long"> |
| | | delete |
| | | from tj_discard_inspection where id = #{id} |
| | | from tj_discard_inspection |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteTjDiscardInspectionByIds" parameterType="String"> |