冻精冻胚的非空校验,模糊查询,唯一性校验

This commit is contained in:
zyh
2025-12-08 19:08:39 +08:00
parent 68cc26d239
commit a49a4a0359
4 changed files with 61 additions and 35 deletions

View File

@@ -59,8 +59,10 @@
<if test="code != null and code != ''">and code like concat('%', #{code}, '%')</if>
<if test="grade != null and grade != ''">and grade = #{grade}</if>
<if test="status != null and status != ''">and status = #{status}</if>
<if test="tech != null and tech != ''">and tech = #{tech}</if>
<if test="outDate != null "> and out_date = #{outDate}</if>
<if test="tech != null and tech != ''">
AND tech LIKE CONCAT('%', #{tech}, '%')
</if>
<if test="outDate != null ">and out_date = #{outDate}</if>
<if test="params.beginFreezeDate != null and params.endFreezeDate != null">
and freeze_date between #{params.beginFreezeDate} and #{params.endFreezeDate}
</if>
@@ -164,23 +166,26 @@
</delete>
<select id="selectFlushByEwe" resultType="map">
SELECT grade_a gradeA,
grade_b gradeB,
grade_c gradeC,
grade_d gradeD,
cell_2_4 cell24,
cell_8 cell8,
donor_male_no ramId
SELECT grade_a gradeA,
grade_b gradeB,
grade_c gradeC,
grade_d gradeD,
cell_2_4 cell24,
cell_8 cell8,
donor_male_no ramId
FROM sc_embryo_flush
WHERE donor_female_no = #{eweNo}
ORDER BY flush_time DESC
LIMIT 1
ORDER BY flush_time DESC LIMIT 1
</select>
<update id="updateDiscard" parameterType="DdFe">
UPDATE dd_fe
SET status = #{status},
SET status = #{status},
discard_txt = #{discardTxt}
WHERE id = #{id}
</update>
<select id="existsByCode" resultType="int">
SELECT COUNT(*) FROM dd_fe WHERE code = #{code}
</select>
</mapper>