@@ -403,9 +403,14 @@
<if test="serviceId != null and serviceId != ''">
AND service_id = #{serviceId}
</if>
- <if test="sopNo != null and sopNo != ''">
- AND sop_no = #{sopNo}
- </if>
+ <choose>
+ <when test="sopNo != null and sopNo != ''">
+ AND sop_no = #{sopNo}
+ </when>
+ <otherwise>
+ AND sop_no IS NULL
+ </otherwise>
+ </choose>
</where>
</select>
</mapper>