|
@@ -241,12 +241,11 @@
|
|
|
FROM subject t
|
|
|
LEFT JOIN instrument i on t.id_ = i.subject_id_
|
|
|
<where>
|
|
|
- AND t.cbs_subject_id_ is not null
|
|
|
<if test="parentSubjectId != null">
|
|
|
AND t.parent_subject_id_ = #{parentSubjectId}
|
|
|
</if>
|
|
|
<if test="parentSubjectId == null">
|
|
|
- AND t.parent_subject_id_ != 0
|
|
|
+ AND t.parent_subject_id_ != 0 AND t.cbs_subject_id_ is not null
|
|
|
</if>
|
|
|
<if test="delFlag != null">
|
|
|
AND t.del_flag_ = #{delFlag}
|
|
@@ -296,12 +295,11 @@
|
|
|
FROM subject t
|
|
|
LEFT JOIN instrument i on t.id_ = i.subject_id_
|
|
|
<where>
|
|
|
- AND t.cbs_subject_id_ is not null
|
|
|
<if test="parentSubjectId != null">
|
|
|
AND t.parent_subject_id_ = #{parentSubjectId}
|
|
|
</if>
|
|
|
<if test="parentSubjectId == null">
|
|
|
- AND t.parent_subject_id_ != 0
|
|
|
+ AND t.parent_subject_id_ != 0 AND t.cbs_subject_id_ is not null
|
|
|
</if>
|
|
|
<if test="delFlag != null">
|
|
|
AND t.del_flag_ = #{delFlag}
|