|
@@ -1066,19 +1066,23 @@
|
|
|
io.userid AS "userId",
|
|
io.userid AS "userId",
|
|
|
sd.parent_id as "deptId",
|
|
sd.parent_id as "deptId",
|
|
|
sd.management_source as "managementSource",
|
|
sd.management_source as "managementSource",
|
|
|
- COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) AS qutationCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ) AS underwritingCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 4 THEN 1 END ) AS underwritingReturn,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ) / COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) AS "passingRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) / COUNT( iac.orderstatus ) AS "closeRate",
|
|
|
|
|
- (COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) + COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ))/ COUNT( iac.orderstatus ) AS "contributionRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) / COUNT( iac.orderstatus ) AS "quotationRate",
|
|
|
|
|
- COUNT(CASE WHEN io.order_source = 0 and iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END) as "pcOrderSource",
|
|
|
|
|
- COUNT(CASE WHEN io.order_source = 1 and iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END) as "appOrderSource",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in( 1 , 2 , 3 ,4) THEN 1 END ) AS "auditOrder"
|
|
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) AS qutationCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status ='2' THEN 1 END ) AS underwritingCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) AS qutationInsureCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '4' THEN 1 END ) AS underwritingReturn,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status ='2' THEN 1 END ) / COUNT( CASE WHEN iot.order_status ='0' THEN 1 END ) AS "passingRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) / COUNT( CASE WHEN iot.order_status in ('0','1','2','3','4') THEN 1 END ) AS "closeRate",
|
|
|
|
|
+ (COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) + COUNT( CASE WHEN iot.order_status = '2' THEN 1 END ))/ COUNT(CASE WHEN iot.order_status in ('0','1','2','3','4') THEN 1 END) AS "contributionRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) / COUNT(CASE WHEN iot.order_status in ('0','1','2','3','4') THEN 1 END ) AS "quotationRate",
|
|
|
|
|
+ COUNT(CASE WHEN io.order_source = 0 and iot.order_status ='0' THEN 1 END) as "pcOrderSource",
|
|
|
|
|
+ COUNT(CASE WHEN io.order_source = 1 and iot.order_status ='0' THEN 1 END) as "appOrderSource",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '1' THEN 1 END ) AS "auditOrder"
|
|
|
FROM
|
|
FROM
|
|
|
- ins_area_company iac
|
|
|
|
|
|
|
+ (
|
|
|
|
|
+ select iot.suborder,iot.order_status from `ins_orders_track` iot
|
|
|
|
|
+ GROUP BY iot.suborder ,iot.order_status
|
|
|
|
|
+ ) iot
|
|
|
|
|
+ left join ins_area_company iac ON iac.id = iot.suborder
|
|
|
LEFT JOIN ins_orders io ON io.orderno = iac.orderno
|
|
LEFT JOIN ins_orders io ON io.orderno = iac.orderno
|
|
|
LEFT JOIN sys_dept sd ON sd.id = io.deptid
|
|
LEFT JOIN sys_dept sd ON sd.id = io.deptid
|
|
|
<where>
|
|
<where>
|
|
@@ -1172,19 +1176,24 @@
|
|
|
io.userid AS "userId",
|
|
io.userid AS "userId",
|
|
|
sd.parent_id as "deptId",
|
|
sd.parent_id as "deptId",
|
|
|
sd.management_source as "managementSource",
|
|
sd.management_source as "managementSource",
|
|
|
- COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) AS qutationCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ) AS underwritingCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 4 THEN 1 END ) AS underwritingReturn,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ) / COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) AS "passingRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) / COUNT( iac.orderstatus ) AS "closeRate",
|
|
|
|
|
- (COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) + COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ))/ COUNT( iac.orderstatus ) AS "contributionRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) / COUNT( iac.orderstatus ) AS "quotationRate",
|
|
|
|
|
- COUNT(CASE WHEN io.order_source = 0 and iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END) as "pcOrderSource",
|
|
|
|
|
- COUNT(CASE WHEN io.order_source = 1 and iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END) as "appOrderSource",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in( 1 , 2 , 3 ,4) THEN 1 END ) AS "auditOrder"
|
|
|
|
|
|
|
+
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) AS qutationCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status ='2' THEN 1 END ) AS underwritingCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) AS qutationInsureCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '4' THEN 1 END ) AS underwritingReturn,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '2' THEN 1 END ) / COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) AS "passingRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) / COUNT( CASE WHEN iot.order_status in ('0','1','2','3','4') THEN 1 END) AS "closeRate",
|
|
|
|
|
+ (COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) + COUNT( CASE WHEN iot.order_status = '2' THEN 1 END ))/ COUNT(CASE WHEN iot.order_status in ('0','1','2','3','4') THEN 1 END) AS "contributionRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status ='0' THEN 1 END ) / COUNT(CASE WHEN iot.order_status in ('0','1','2','3','4') THEN 1 END ) AS "quotationRate",
|
|
|
|
|
+ COUNT(CASE WHEN io.order_source = 0 and iot.order_status = '0' THEN 1 END) as "pcOrderSource",
|
|
|
|
|
+ COUNT(CASE WHEN io.order_source = 1 and iot.order_status = '0' THEN 1 END) as "appOrderSource",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status ='1' THEN 1 END ) AS "auditOrder"
|
|
|
FROM
|
|
FROM
|
|
|
- ins_area_company iac
|
|
|
|
|
|
|
+ (
|
|
|
|
|
+ select iot.suborder,iot.order_status from `ins_orders_track` iot
|
|
|
|
|
+ GROUP BY iot.suborder ,iot.order_status
|
|
|
|
|
+ ) iot
|
|
|
|
|
+ left join ins_area_company iac ON iac.id = iot.suborder
|
|
|
LEFT JOIN ins_orders io ON io.orderno = iac.orderno
|
|
LEFT JOIN ins_orders io ON io.orderno = iac.orderno
|
|
|
LEFT JOIN sys_dept sd ON sd.id = io.deptid
|
|
LEFT JOIN sys_dept sd ON sd.id = io.deptid
|
|
|
<where>
|
|
<where>
|
|
@@ -1414,7 +1423,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="insuranceCompanyQueryPage" resultType="com.ydtech.modules.admin.model.dto.TaskStatisticsDto">
|
|
<select id="insuranceCompanyQueryPage" resultType="com.ydtech.modules.admin.model.dto.TaskStatisticsDto">
|
|
|
- SELECT
|
|
|
|
|
|
|
+ select
|
|
|
a.*,
|
|
a.*,
|
|
|
( SELECT eic.namesimple FROM esm_ins_company eic WHERE eic.id = a.partner_companies_id ) AS "partnerCompaniesName"
|
|
( SELECT eic.namesimple FROM esm_ins_company eic WHERE eic.id = a.partner_companies_id ) AS "partnerCompaniesName"
|
|
|
FROM
|
|
FROM
|
|
@@ -1423,18 +1432,21 @@
|
|
|
pa.insurance_company_id,
|
|
pa.insurance_company_id,
|
|
|
pa.partner_companies_id,
|
|
pa.partner_companies_id,
|
|
|
pa.insurance_company AS "insuranceCompanyName",
|
|
pa.insurance_company AS "insuranceCompanyName",
|
|
|
- COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) AS qutationCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in( 1 , 2 , 3 ,4) THEN 1 END ) AS "auditOrder",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ) AS underwritingCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 4 THEN 1 END ) AS underwritingReturn,
|
|
|
|
|
-
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ) / COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) AS "passingRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) / COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) AS "closeRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) / COUNT( iac.orderstatus ) AS "contributionRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 0 THEN 1 END ) / COUNT( iac.orderstatus ) AS "quotationRate"
|
|
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) AS qutationCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '1' THEN 1 END ) AS "auditOrder",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '2' THEN 1 END ) AS underwritingCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) AS qutationInsureCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '4' THEN 1 END ) AS underwritingReturn,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status ='2' THEN 1 END ) / COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) AS "passingRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) / COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) AS "closeRate",
|
|
|
|
|
+ (COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) + COUNT( CASE WHEN iot.order_status = '2' THEN 1 END )) / COUNT( iot.order_status ) AS "contributionRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) / COUNT( iot.order_status ) AS "quotationRate"
|
|
|
FROM
|
|
FROM
|
|
|
- ins_area_company iac
|
|
|
|
|
|
|
+ (
|
|
|
|
|
+ select iot.suborder,iot.order_status from `ins_orders_track` iot
|
|
|
|
|
+ GROUP BY iot.suborder ,iot.order_status
|
|
|
|
|
+ ) iot
|
|
|
|
|
+ LEFT JOIN ins_area_company iac ON iac.id = iot.suborder
|
|
|
LEFT JOIN ins_fee_audit ifa ON ifa.ins_order_no = iac.id
|
|
LEFT JOIN ins_fee_audit ifa ON ifa.ins_order_no = iac.id
|
|
|
LEFT JOIN ptl_agreement pa ON pa.id = iac.agreement_id
|
|
LEFT JOIN ptl_agreement pa ON pa.id = iac.agreement_id
|
|
|
LEFT JOIN ins_orders io ON io.orderno = iac.orderno
|
|
LEFT JOIN ins_orders io ON io.orderno = iac.orderno
|
|
@@ -1552,17 +1564,21 @@
|
|
|
suLeader.name as "leaderName",
|
|
suLeader.name as "leaderName",
|
|
|
suLeader.mobile as "leaderMobile",
|
|
suLeader.mobile as "leaderMobile",
|
|
|
sd.management_source as "managementSource",
|
|
sd.management_source as "managementSource",
|
|
|
- COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) AS qutationCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ) AS underwritingCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) AS qutationInsureCount,
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 4 THEN 1 END ) AS underwritingReturn,
|
|
|
|
|
- (COUNT( CASE WHEN iac.orderstatus in (2,3) THEN 1 END ) +COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END )) / COUNT(iac.orderstatus) as "passingRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) / COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) as "closeRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END ) / COUNT(iac.orderstatus) as "contributionRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in ( 0 ,1 , 2 , 3 ,4) THEN 1 END ) / COUNT(iac.orderstatus) as "quotationRate",
|
|
|
|
|
- COUNT( CASE WHEN iac.orderstatus in( 1 , 2 , 3 ,4) THEN 1 END ) as "auditOrder"
|
|
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) AS qutationCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '2' THEN 1 END ) AS underwritingCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) AS qutationInsureCount,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '4' THEN 1 END ) AS underwritingReturn,
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '2' THEN 1 END ) / COUNT( CASE WHEN iot.order_status in ('0','1','2','3','4') THEN 1 END ) as "passingRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) / COUNT( CASE WHEN iot.order_status ='0' THEN 1 END ) as "closeRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '3' THEN 1 END ) / COUNT( CASE WHEN iot.order_status in ('0','1','2','3','4') THEN 1 END ) as "contributionRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '0' THEN 1 END ) / COUNT( CASE WHEN iot.order_status in ('0','1','2','3','4') THEN 1 END ) as "quotationRate",
|
|
|
|
|
+ COUNT( CASE WHEN iot.order_status = '1' THEN 1 END ) as "auditOrder"
|
|
|
FROM
|
|
FROM
|
|
|
- ins_area_company iac
|
|
|
|
|
|
|
+ (
|
|
|
|
|
+ select iot.suborder,iot.order_status from `ins_orders_track` iot
|
|
|
|
|
+ GROUP BY iot.suborder ,iot.order_status
|
|
|
|
|
+ ) iot
|
|
|
|
|
+ LEFT JOIN ins_area_company iac ON iac.id = iot.suborder
|
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
|
left join sys_dept sd on sd.id=io.deptid
|
|
left join sys_dept sd on sd.id=io.deptid
|
|
|
left join sys_user su on su.id=io.userid
|
|
left join sys_user su on su.id=io.userid
|
|
@@ -3159,9 +3175,9 @@
|
|
|
SELECT
|
|
SELECT
|
|
|
iac.id as orderno,
|
|
iac.id as orderno,
|
|
|
io.quoteno,
|
|
io.quoteno,
|
|
|
- io.orderstatus,
|
|
|
|
|
- io.company_id,
|
|
|
|
|
- io.ins_company,
|
|
|
|
|
|
|
+ iac.orderstatus,
|
|
|
|
|
+ iac.company_id,
|
|
|
|
|
+ iac.inscompany,
|
|
|
io.carinfo,
|
|
io.carinfo,
|
|
|
io.userid,
|
|
io.userid,
|
|
|
io.username,
|
|
io.username,
|
|
@@ -3221,7 +3237,7 @@
|
|
|
AND json_extract(io.insureinfo, '$.name') = #{params.insuredName}
|
|
AND json_extract(io.insureinfo, '$.name') = #{params.insuredName}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="params.companyId != null and params.companyId != ''">
|
|
<if test="params.companyId != null and params.companyId != ''">
|
|
|
- AND io.company_id = #{params.companyId}
|
|
|
|
|
|
|
+ AND iac.company_id = #{params.companyId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="params.engineNo != null and params.engineNo != ''">
|
|
<if test="params.engineNo != null and params.engineNo != ''">
|
|
|
and JSON_EXTRACT( io.carinfo, '$.engineNo' ) = #{params.engineNo}
|
|
and JSON_EXTRACT( io.carinfo, '$.engineNo' ) = #{params.engineNo}
|
|
@@ -3294,10 +3310,10 @@
|
|
|
|
|
|
|
|
<select id="getExpectNetProfit" resultType="com.ydtech.modules.order.entity.InsAreaCompany">
|
|
<select id="getExpectNetProfit" resultType="com.ydtech.modules.order.entity.InsAreaCompany">
|
|
|
select
|
|
select
|
|
|
- sum(IFNULL(ifon.jq_costs_premiums,0) + IFNULL(ifon.sy_costs_premiums,0) + IFNULL (ifon.no_costs_premiums,0)) as "entranceAllFee",
|
|
|
|
|
- sum(IFNULL(jq_export_other_costs_premiums,0) + IFNULL(jq_export_supervise_costs_premiums,0) +IFNULL(sy_export_other_costs_premiums,0) +IFNULL(sy_export_supervise_costs_premiums,0)
|
|
|
|
|
- +IFNULL(no_export_supervise_costs_premiums,0)+IFNULL(no_export_supervise_costs_premiums,0) ) as "exportAllFee",
|
|
|
|
|
- sum(IFNULL(b.distributionAmount,0)) as "distributionAmount"
|
|
|
|
|
|
|
+ ROUND(sum(IFNULL(ifon.jq_costs_premiums,0) + IFNULL(ifon.sy_costs_premiums,0) + IFNULL (ifon.no_costs_premiums,0)),2) as "entranceAllFee",
|
|
|
|
|
+ ROUND(sum(IFNULL(jq_export_other_costs_premiums,0) + IFNULL(jq_export_supervise_costs_premiums,0) +IFNULL(sy_export_other_costs_premiums,0) +IFNULL(sy_export_supervise_costs_premiums,0)
|
|
|
|
|
+ +IFNULL(no_export_supervise_costs_premiums,0)+IFNULL(no_export_supervise_costs_premiums,0) ),2) as "exportAllFee",
|
|
|
|
|
+ ROUND(sum(IFNULL(b.distributionAmount,0)),2) as "distributionAmount"
|
|
|
from ins_area_company iac
|
|
from ins_area_company iac
|
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
|
LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
|
|
LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
|
|
@@ -3312,8 +3328,9 @@
|
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
|
LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
|
|
LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
|
|
+ iac.orderstatus = 3
|
|
|
<if test="vo.userId !=null and vo.userId !=''">
|
|
<if test="vo.userId !=null and vo.userId !=''">
|
|
|
- ifon.first_level_user_id =#{vo.userId}
|
|
|
|
|
|
|
+ AND ifon.first_level_user_id =#{vo.userId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="vo.ids != null and vo.ids.size()>0 ">
|
|
<if test="vo.ids != null and vo.ids.size()>0 ">
|
|
|
AND ifon.first_level_user_id IN
|
|
AND ifon.first_level_user_id IN
|
|
@@ -3335,8 +3352,9 @@
|
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
|
LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
|
|
LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
|
|
+ iac.orderstatus = 3
|
|
|
<if test="vo.userId !=null and vo.userId !=''">
|
|
<if test="vo.userId !=null and vo.userId !=''">
|
|
|
- ifon.two_level_user_id =#{vo.userId}
|
|
|
|
|
|
|
+ AND ifon.two_level_user_id =#{vo.userId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="vo.ids != null and vo.ids.size()>0 ">
|
|
<if test="vo.ids != null and vo.ids.size()>0 ">
|
|
|
AND ifon.two_level_user_id IN
|
|
AND ifon.two_level_user_id IN
|
|
@@ -3359,8 +3377,9 @@
|
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
left join ins_orders io on io.orderno = iac.orderno
|
|
|
LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
|
|
LEFT JOIN ins_fee_order_new ifon ON iac.id = ifon.ins_order_no
|
|
|
<where>
|
|
<where>
|
|
|
|
|
+ iac.orderstatus = 3
|
|
|
<if test="vo.userId !=null and vo.userId !=''">
|
|
<if test="vo.userId !=null and vo.userId !=''">
|
|
|
- ifon.three_level_user_id =#{vo.userId}
|
|
|
|
|
|
|
+ AND ifon.three_level_user_id =#{vo.userId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="vo.ids != null and vo.ids.size()>0 ">
|
|
<if test="vo.ids != null and vo.ids.size()>0 ">
|
|
|
AND ifon.three_level_user_id IN
|
|
AND ifon.three_level_user_id IN
|
|
@@ -3376,8 +3395,9 @@
|
|
|
) c on c.threeLevelUserId = a.firstLevelUserId
|
|
) c on c.threeLevelUserId = a.firstLevelUserId
|
|
|
) b on b.firstLevelUserId =iac.leader_id
|
|
) b on b.firstLevelUserId =iac.leader_id
|
|
|
<where>
|
|
<where>
|
|
|
|
|
+ iac.orderstatus = 3
|
|
|
<if test="vo.userId !=null and vo.userId !=''">
|
|
<if test="vo.userId !=null and vo.userId !=''">
|
|
|
- io.userid =#{vo.userId}
|
|
|
|
|
|
|
+ AND io.userid =#{vo.userId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="vo.ids != null and vo.ids.size()>0 ">
|
|
<if test="vo.ids != null and vo.ids.size()>0 ">
|
|
|
AND io.userid IN
|
|
AND io.userid IN
|