blood/blood_bus/src/main/resources/mapper/XkSampleInfoMapper.xml

94 lines
5.1 KiB
XML
Raw Normal View History

<?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.czblood.bus.mapper.XkSampleInfoMapper">
<insert id="insert">
insert into xk_sample_info(
2026-07-29 16:31:13 +08:00
<if test="purpose != null ">purpose,</if>
<if test="dept != null ">dept,</if>
<if test="relate_ApplyNo != null ">Relate_ApplyNo,</if>
<if test="blood_Type != null ">Blood_Type,</if>
<if test="rh_Blood_Type != null ">Rh_Blood_Type,</if>
<if test="sample_Name != null ">Sample_Name,</if>
<if test="sex != null ">Sex,</if>
<if test="age != null ">Age,</if>
<if test="birthday != null ">Birthday,</if>
<if test="pick_Nurse != null ">Pick_Nurse,</if>
<if test="pick_Date != null ">Pick_Date,</if>
<if test="send_Nurse != null ">Send_Nurse,</if>
<if test="send_Date != null ">Send_Date,</if>
<if test="takeOver_Man != null ">TakeOver_Man,</if>
<if test="takeOver_Date != null ">TakeOver_Date,</if>
<if test="overdue_Flag != null ">Overdue_Flag,</if>
<if test="exp1 != null ">Exp1,</if>
<if test="exp2 != null ">Exp2,</if>
<if test="sample_status != null ">sample_status,</if>
<if test="discard_person != null ">discard_person,</if>
<if test="discard_date != null ">discard_date,</if>
<if test="discard_reason != null ">discard_reason,</if>
<if test="senddate != null ">senddate,</if>
<if test="sendperson != null ">sendperson,</if>
<if test="createtime != null ">createtime,</if>
Sample_No
)values(
2026-07-29 16:31:13 +08:00
<if test="purpose != null ">#{purpose},</if>
<if test="dept != null ">#{dept},</if>
<if test="relate_ApplyNo != null ">#{relate_ApplyNo},</if>
<if test="blood_Type != null ">#{blood_Type},</if>
<if test="rh_Blood_Type != null ">#{rh_Blood_Type},</if>
<if test="sample_Name != null ">#{sample_Name},</if>
<if test="sex != null ">#{sex},</if>
<if test="age != null ">#{age},</if>
<if test="birthday != null ">#{birthday},</if>
<if test="pick_Nurse != null ">#{pick_Nurse},</if>
<if test="pick_Date != null ">#{pick_Date},</if>
<if test="send_Nurse != null ">#{send_Nurse},</if>
<if test="send_Date != null ">#{send_Date},</if>
<if test="takeOver_Man != null ">#{takeOver_Man},</if>
<if test="takeOver_Date != null ">#{takeOver_Date},</if>
<if test="overdue_Flag != null ">#{overdue_Flag},</if>
<if test="exp1 != null ">#{exp1},</if>
<if test="exp2 != null ">#{exp2},</if>
<if test="sample_status != null ">#{sample_status},</if>
<if test="discard_person != null ">#{discard_person},</if>
<if test="discard_date != null ">#{discard_date},</if>
<if test="discard_reason != null ">#{discard_reason},</if>
<if test="senddate != null ">#{senddate},</if>
<if test="sendperson != null ">#{sendperson},</if>
<if test="createtime != null ">#{createtime},</if>
2026-07-29 16:31:13 +08:00
#{sample_No})
</insert>
2026-07-29 16:31:13 +08:00
<update id="update">
update xk_sample_info set
<if test="purpose != null ">purpose = #{purpose},</if>
<if test="dept != null ">dept = #{dept},</if>
<if test="relate_ApplyNo != null ">relate_ApplyNo = #{relate_ApplyNo},</if>
<if test="blood_Type != null ">blood_Type = #{blood_Type},</if>
<if test="rh_Blood_Type != null ">rh_Blood_Type = #{rh_Blood_Type},</if>
<if test="sample_Name != null ">sample_Name = #{sample_Name},</if>
<if test="sex != null ">sex = #{sex},</if>
<if test="age != null ">age = #{age},</if>
<if test="birthday != null ">birthday = #{birthday},</if>
<if test="pick_Nurse != null ">pick_Nurse = #{pick_Nurse},</if>
<if test="pick_Date != null ">pick_Date = #{pick_Date},</if>
<if test="send_Nurse != null ">send_Nurse = #{send_Nurse},</if>
<if test="send_Date != null ">send_Date = #{send_Date},</if>
<if test="takeOver_Man != null ">takeOver_Man = #{takeOver_Man},</if>
<if test="takeOver_Date != null ">takeOver_Date = #{takeOver_Date},</if>
<if test="overdue_Flag != null ">overdue_Flag = #{overdue_Flag},</if>
<if test="exp1 != null ">exp1 = #{exp1},</if>
<if test="exp2 != null ">exp2 = #{exp2},</if>
<if test="sample_status != null ">sample_status = #{sample_status},</if>
<if test="discard_person != null ">discard_person = #{discard_person},</if>
<if test="discard_date != null ">discard_date = #{discard_date},</if>
<if test="discard_reason != null ">discard_reason = #{discard_reason},</if>
<if test="senddate != null ">senddate = #{senddate},</if>
<if test="sendperson != null ">sendperson = #{sendperson},</if>
<if test="createtime != null ">createtime = #{createtime},</if>
Sample_No = #{sample_no}
where Sample_No = #{sample_no}
</update>
<select id="queryOne" resultType="com.czblood.bus.pojo.XkSampleInfo">
select * from xk_sample_info where Sample_No = #{Sample_No}
</select>
</mapper>