|
@@ -360,7 +360,7 @@
|
|
|
ins_fee_order_new a
|
|
ins_fee_order_new a
|
|
|
LEFT JOIN ins_area_company iac ON iac.id = a.ins_order_no
|
|
LEFT JOIN ins_area_company iac ON iac.id = a.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
- a.ins_order_no NOT IN ( SELECT ins_order_no FROM ins_fee_audit )
|
|
|
|
|
|
|
+ NOT EXISTS ( SELECT ins_order_no FROM ins_fee_audit AS b WHERE b.ins_order_no = a.ins_order_no )
|
|
|
and iac.orderstatus = '3'
|
|
and iac.orderstatus = '3'
|
|
|
<if test="userId!=null and userId!= ''">
|
|
<if test="userId!=null and userId!= ''">
|
|
|
AND a.first_level_user_id = #{userId}
|
|
AND a.first_level_user_id = #{userId}
|
|
@@ -376,7 +376,7 @@
|
|
|
ins_fee_order_new a
|
|
ins_fee_order_new a
|
|
|
LEFT JOIN ins_area_company iac ON iac.id = a.ins_order_no
|
|
LEFT JOIN ins_area_company iac ON iac.id = a.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
- a.ins_order_no NOT IN ( SELECT ins_order_no FROM ins_fee_audit )
|
|
|
|
|
|
|
+ NOT EXISTS ( SELECT ins_order_no FROM ins_fee_audit AS b WHERE b.ins_order_no = a.ins_order_no )
|
|
|
and iac.orderstatus = '3'
|
|
and iac.orderstatus = '3'
|
|
|
<if test="userId!=null and userId!= ''">
|
|
<if test="userId!=null and userId!= ''">
|
|
|
AND a.three_level_user_id = #{userId}
|
|
AND a.three_level_user_id = #{userId}
|
|
@@ -392,7 +392,7 @@
|
|
|
ins_fee_order_new a
|
|
ins_fee_order_new a
|
|
|
LEFT JOIN ins_area_company iac ON iac.id = a.ins_order_no
|
|
LEFT JOIN ins_area_company iac ON iac.id = a.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
- a.ins_order_no NOT IN ( SELECT ins_order_no FROM ins_fee_audit )
|
|
|
|
|
|
|
+ NOT EXISTS ( SELECT ins_order_no FROM ins_fee_audit AS b WHERE b.ins_order_no = a.ins_order_no )
|
|
|
and iac.orderstatus = '3'
|
|
and iac.orderstatus = '3'
|
|
|
<if test="userId!=null and userId!= ''">
|
|
<if test="userId!=null and userId!= ''">
|
|
|
AND a.two_level_user_id = #{userId}
|
|
AND a.two_level_user_id = #{userId}
|
|
@@ -411,12 +411,7 @@
|
|
|
ins_fee_order_new a
|
|
ins_fee_order_new a
|
|
|
LEFT JOIN ins_area_company iac on iac.id=a.ins_order_no
|
|
LEFT JOIN ins_area_company iac on iac.id=a.ins_order_no
|
|
|
WHERE
|
|
WHERE
|
|
|
- a.ins_order_no NOT IN (
|
|
|
|
|
- SELECT
|
|
|
|
|
- ins_order_no
|
|
|
|
|
- FROM
|
|
|
|
|
- ins_fee_audit
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ NOT EXISTS ( SELECT ins_order_no FROM ins_fee_audit AS b WHERE b.ins_order_no = a.ins_order_no )
|
|
|
AND iac.orderstatus =3
|
|
AND iac.orderstatus =3
|
|
|
<if test="firstUserId != null and firstUserId != ''">
|
|
<if test="firstUserId != null and firstUserId != ''">
|
|
|
AND a.first_level_user_id = #{firstUserId}
|
|
AND a.first_level_user_id = #{firstUserId}
|