|
@@ -202,7 +202,7 @@
|
|
|
WHERE
|
|
WHERE
|
|
|
a.user_id = #{userId}
|
|
a.user_id = #{userId}
|
|
|
and ins.orderstatus ='3'
|
|
and ins.orderstatus ='3'
|
|
|
- and a.ins_order_no not in (select ins_order_no from ins_fee_audit)
|
|
|
|
|
|
|
+ and NOT EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getSumWillAmount" resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
<select id="getSumWillAmount" resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
@@ -225,7 +225,7 @@
|
|
|
a.user_id = #{userId}
|
|
a.user_id = #{userId}
|
|
|
</if>
|
|
</if>
|
|
|
and ins.orderstatus ='3'
|
|
and ins.orderstatus ='3'
|
|
|
- and a.ins_order_no not in (select ins_order_no from ins_fee_audit)
|
|
|
|
|
|
|
+ and NOT EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
|
AND DATE_FORMAT(ins.signing_time, '%Y-%m' ) = #{timeFiltering}
|
|
AND DATE_FORMAT(ins.signing_time, '%Y-%m' ) = #{timeFiltering}
|
|
|
</if>
|
|
</if>
|
|
@@ -268,7 +268,7 @@
|
|
|
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
|
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
|
<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 fee where fee.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}
|
|
@@ -292,7 +292,7 @@
|
|
|
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
|
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
|
<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 fee where fee.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}
|
|
@@ -316,7 +316,7 @@
|
|
|
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
|
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
|
<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 fee where fee.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}
|
|
@@ -382,7 +382,7 @@
|
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test='type == "1"'>
|
|
<when test='type == "1"'>
|
|
|
- AND DATE_FORMAT(iac.signing_time, '%Y-%m' ) = #{timeFiltering}
|
|
|
|
|
|
|
+ AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d' ) = #{timeFiltering}
|
|
|
</when>
|
|
</when>
|
|
|
<otherwise>
|
|
<otherwise>
|
|
|
AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d' ) = #{timeFiltering}
|
|
AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d' ) = #{timeFiltering}
|
|
@@ -419,10 +419,10 @@
|
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test='type == "1"'>
|
|
<when test='type == "1"'>
|
|
|
- AND DATE_FORMAT(iac.signing_time, '%Y-%m' ) = #{timeFiltering}
|
|
|
|
|
|
|
+ AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d' ) = #{timeFiltering}
|
|
|
</when>
|
|
</when>
|
|
|
<otherwise>
|
|
<otherwise>
|
|
|
- AND DATE_FORMAT(iac.signing_time, '%Y-%m' ) = #{timeFiltering}
|
|
|
|
|
|
|
+ AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d' ) = #{timeFiltering}
|
|
|
</otherwise>
|
|
</otherwise>
|
|
|
</choose>
|
|
</choose>
|
|
|
</if>
|
|
</if>
|
|
@@ -456,10 +456,10 @@
|
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test='type == "1"'>
|
|
<when test='type == "1"'>
|
|
|
- AND DATE_FORMAT(iac.signing_time, '%Y-%m' ) = #{timeFiltering}
|
|
|
|
|
|
|
+ AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d' ) = #{timeFiltering}
|
|
|
</when>
|
|
</when>
|
|
|
<otherwise>
|
|
<otherwise>
|
|
|
- AND DATE_FORMAT(iac.signing_time, '%Y-%m' ) = #{timeFiltering}
|
|
|
|
|
|
|
+ AND DATE_FORMAT(iac.signing_time, '%Y-%m-%d' ) = #{timeFiltering}
|
|
|
</otherwise>
|
|
</otherwise>
|
|
|
</choose>
|
|
</choose>
|
|
|
</if>
|
|
</if>
|
|
@@ -495,10 +495,10 @@
|
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test='type == "1"'>
|
|
<when test='type == "1"'>
|
|
|
- AND DATE_FORMAT(ins.signing_time, '%Y-%m' ) = #{timeFiltering}
|
|
|
|
|
|
|
+ AND DATE_FORMAT(ins.signing_time, '%Y-%m-%d' ) = #{timeFiltering}
|
|
|
</when>
|
|
</when>
|
|
|
<otherwise>
|
|
<otherwise>
|
|
|
- AND DATE_FORMAT(ins.signing_time, '%Y-%m' ) = #{timeFiltering}
|
|
|
|
|
|
|
+ AND DATE_FORMAT(ins.signing_time, '%Y-%m-%d' ) = #{timeFiltering}
|
|
|
</otherwise>
|
|
</otherwise>
|
|
|
</choose>
|
|
</choose>
|
|
|
</if>
|
|
</if>
|