|
@@ -199,10 +199,11 @@
|
|
|
<select id="getByUserIdAndOrderStatusAndNoCheck" resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
<select id="getByUserIdAndOrderStatusAndNoCheck" resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
|
select a.* from
|
|
select a.* from
|
|
|
ins_fee_order_new a left join ins_area_company ins on a.ins_order_no=ins.id
|
|
ins_fee_order_new a left join ins_area_company ins on a.ins_order_no=ins.id
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
WHERE
|
|
WHERE
|
|
|
a.user_id = #{userId}
|
|
a.user_id = #{userId}
|
|
|
and ins.orderstatus ='3'
|
|
and ins.orderstatus ='3'
|
|
|
- and NOT EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
|
|
|
|
+ and iff.auditstatus=0
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getSumWillAmount" resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
<select id="getSumWillAmount" resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
@@ -220,12 +221,13 @@
|
|
|
from
|
|
from
|
|
|
ins_fee_order_new a left join ins_area_company ins on a.ins_order_no=ins.id
|
|
ins_fee_order_new a left join ins_area_company ins on a.ins_order_no=ins.id
|
|
|
left join ins_orders o ON o.orderno=ins.orderno
|
|
left join ins_orders o ON o.orderno=ins.orderno
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
<if test="userId !=null and userId !=''">
|
|
<if test="userId !=null and userId !=''">
|
|
|
a.user_id = #{userId}
|
|
a.user_id = #{userId}
|
|
|
</if>
|
|
</if>
|
|
|
and ins.orderstatus ='3'
|
|
and ins.orderstatus ='3'
|
|
|
- and NOT EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
|
|
|
|
+ and iff.auditstatus=0
|
|
|
<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>
|
|
@@ -267,8 +269,9 @@
|
|
|
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
|
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
- NOT EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
|
|
|
|
+ iff.auditstatus=0
|
|
|
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}
|
|
@@ -291,8 +294,9 @@
|
|
|
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
|
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
- NOT EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
|
|
|
|
+ iff.auditstatus=0
|
|
|
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}
|
|
@@ -315,8 +319,9 @@
|
|
|
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
|
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
- NOT EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
|
|
|
|
+ iff.auditstatus=0
|
|
|
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}
|
|
@@ -326,17 +331,27 @@
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getByUserIdAndOrderStatusAndNoCheckType"
|
|
<select id="getByUserIdAndOrderStatusAndNoCheckType"
|
|
|
resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
|
- select a.* from
|
|
|
|
|
|
|
+ select
|
|
|
|
|
+ a.jq_export_supervise_costs_premiums as "jqExportSuperviseCostsPremiums",
|
|
|
|
|
+ a.sy_export_supervise_costs_premiums as "syExportSuperviseCostsPremiums",
|
|
|
|
|
+ a.no_export_supervise_costs_premiums as "noExportSuperviseCostsPremiums",
|
|
|
|
|
+ a.jq_export_other_costs_premiums as "jqExportOtherCostsPremiums",
|
|
|
|
|
+ a.sy_export_other_costs_premiums as "syExportOtherCostsPremiums",
|
|
|
|
|
+ a.no_export_other_costs_premiums as "noExportOtherCostsPremiums"
|
|
|
|
|
+ from
|
|
|
ins_fee_order_new a left join ins_area_company ins on a.ins_order_no=ins.id
|
|
ins_fee_order_new a left join ins_area_company ins on a.ins_order_no=ins.id
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
WHERE
|
|
WHERE
|
|
|
a.user_id = #{userId}
|
|
a.user_id = #{userId}
|
|
|
and ins.orderstatus ='3'
|
|
and ins.orderstatus ='3'
|
|
|
- and a.ins_order_no
|
|
|
|
|
- <if test="type=='1'">
|
|
|
|
|
- not
|
|
|
|
|
- </if>
|
|
|
|
|
- in
|
|
|
|
|
- (select ins_order_no from ins_fee_audit)
|
|
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test='type == "1"'>
|
|
|
|
|
+ and iff.auditstatus=0
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ and iff.auditstatus=1
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getSumWillAmountGeneralizationNew"
|
|
<select id="getSumWillAmountGeneralizationNew"
|
|
|
resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
|
|
@@ -370,11 +385,16 @@
|
|
|
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
|
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
- <if test='type == "1"'>
|
|
|
|
|
- NOT
|
|
|
|
|
- </if>
|
|
|
|
|
- EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test='type == "1"'>
|
|
|
|
|
+ iff.auditstatus=0
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ iff.auditstatus=1
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
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}
|
|
@@ -407,11 +427,16 @@
|
|
|
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
|
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
- <if test='type == "1"'>
|
|
|
|
|
- NOT
|
|
|
|
|
- </if>
|
|
|
|
|
- EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test='type == "1"'>
|
|
|
|
|
+ iff.auditstatus=0
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ iff.auditstatus=1
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
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}
|
|
@@ -444,11 +469,16 @@
|
|
|
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
|
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
left join ins_orders o ON o.orderno=iac.orderno
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
- <if test='type == "1"'>
|
|
|
|
|
- NOT
|
|
|
|
|
- </if>
|
|
|
|
|
- EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test='type == "1"'>
|
|
|
|
|
+ iff.auditstatus=0
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ iff.auditstatus=1
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
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}
|
|
@@ -482,16 +512,20 @@
|
|
|
from
|
|
from
|
|
|
ins_fee_order_new a left join ins_area_company ins on a.ins_order_no=ins.id
|
|
ins_fee_order_new a left join ins_area_company ins on a.ins_order_no=ins.id
|
|
|
left join ins_orders o ON o.orderno=ins.orderno
|
|
left join ins_orders o ON o.orderno=ins.orderno
|
|
|
|
|
+ left join ins_fee_audit iff on a.ins_order_no=iff.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
<if test="userId !=null and userId !=''">
|
|
<if test="userId !=null and userId !=''">
|
|
|
a.user_id = #{userId}
|
|
a.user_id = #{userId}
|
|
|
</if>
|
|
</if>
|
|
|
and ins.orderstatus ='3'
|
|
and ins.orderstatus ='3'
|
|
|
- and
|
|
|
|
|
- <if test='type == "1"'>
|
|
|
|
|
- NOT
|
|
|
|
|
- </if>
|
|
|
|
|
- EXISTS (SELECT ins_order_no FROM ins_fee_audit fee where fee.ins_order_no =a.ins_order_no)
|
|
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test='type == "1"'>
|
|
|
|
|
+ and iff.auditstatus=0
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ and iff.auditstatus=1
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
<if test="timeFiltering!= null and timeFiltering !=''">
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test='type == "1"'>
|
|
<when test='type == "1"'>
|