|
|
|
@ -24,9 +24,9 @@
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertExtend">
|
|
|
|
|
INSERT INTO `docus_medicalrecord`.`t_basic_extend`
|
|
|
|
|
(`patient_id`,`ward_code`,`ward_name`)
|
|
|
|
|
(`patient_id`,`ward_code`,`ward_name`,`sdry_index`)
|
|
|
|
|
VALUES
|
|
|
|
|
(#{tBasicExtend.patientId},#{tBasicExtend.wardCode},#{tBasicExtend.wardName})
|
|
|
|
|
(#{tBasicExtend.patientId},#{tBasicExtend.wardCode},#{tBasicExtend.wardName},#{tBasicExtend.sdryIndex})
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="update">
|
|
|
|
@ -86,16 +86,14 @@
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="updateExtend">
|
|
|
|
|
UPDATE `docus_medicalrecord`.`t_basic_extend`
|
|
|
|
|
<set>
|
|
|
|
|
<if test="tBasicExtend.wardCode !=null ">
|
|
|
|
|
`ward_code`=#{tBasicExtend.wardCode},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="tBasicExtend.wardName !=null ">
|
|
|
|
|
`ward_name`=#{tBasicExtend.wardName},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
WHERE `patient_id`=#{tBasicExtend.patientId};
|
|
|
|
|
INSERT INTO `docus_medicalrecord`.`t_basic_extend`
|
|
|
|
|
(`patient_id`,`ward_code`,`ward_name`,`sdry_index`)
|
|
|
|
|
VALUES
|
|
|
|
|
(#{tBasicExtend.patientId},#{tBasicExtend.wardCode},#{tBasicExtend.wardName},#{tBasicExtend.sdryIndex})
|
|
|
|
|
on DUPLICATE KEY UPDATE
|
|
|
|
|
`ward_code`=#{tBasicExtend.wardCode},
|
|
|
|
|
`ward_name`=#{tBasicExtend.wardName},
|
|
|
|
|
`sdry_index`=#{tBasicExtend.sdryIndex}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<select id="selectOne" resultType="java.lang.Integer">
|
|
|
|
|