|
@@ -2610,15 +2610,19 @@
|
|
|
a.company_id
|
|
a.company_id
|
|
|
) a
|
|
) a
|
|
|
LEFT JOIN (
|
|
LEFT JOIN (
|
|
|
|
|
+ select
|
|
|
|
|
+ sum( a.invoicAmount ) AS "invoicAmount",
|
|
|
|
|
+ sum( a.noSettHandlingFee ) AS "noSettHandlingFee",
|
|
|
|
|
+ sum( a.settAmount ) AS "settAmount",
|
|
|
|
|
+ a.subPathner AS "subPathner"
|
|
|
|
|
+ from (
|
|
|
SELECT
|
|
SELECT
|
|
|
- sum( a.total_amount ) AS "invoicAmount",
|
|
|
|
|
- sum( a.remaining_amount ) AS "noSettHandlingFee",
|
|
|
|
|
- sum( a.settlement_amount ) AS "settAmount",
|
|
|
|
|
- a.task_id AS "taskId",
|
|
|
|
|
- DATE_FORMAT( a.signing_time, '%Y-%m' ) AS "subSigne",
|
|
|
|
|
- a.partner_companies_id AS "subPathner"
|
|
|
|
|
|
|
+ sum( a.total_amount ) AS "invoicAmount",
|
|
|
|
|
+ sum( a.remaining_amount ) AS "noSettHandlingFee",
|
|
|
|
|
+ sum( a.settlement_amount ) AS "settAmount",
|
|
|
|
|
+ a.partner_companies_id AS "subPathner"
|
|
|
FROM
|
|
FROM
|
|
|
- sys_insurance_handling_settlement_month a
|
|
|
|
|
|
|
+ sys_insurance_handling_settlement_month a
|
|
|
<where>
|
|
<where>
|
|
|
<if test="vo.isNoCar != null and vo.isNoCar !='' ">
|
|
<if test="vo.isNoCar != null and vo.isNoCar !='' ">
|
|
|
and a.is_not_car =#{vo.isNoCar}
|
|
and a.is_not_car =#{vo.isNoCar}
|
|
@@ -2628,9 +2632,10 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
- a.partner_companies_id,
|
|
|
|
|
- DATE_FORMAT( a.signing_time, '%Y-%m' ),
|
|
|
|
|
- a.task_id
|
|
|
|
|
|
|
+ a.partner_companies_id,
|
|
|
|
|
+ DATE_FORMAT( a.signing_time, '%Y-%m' ),
|
|
|
|
|
+ a.task_id
|
|
|
|
|
+ ) a group by a.subPathner
|
|
|
) b ON b.subPathner = a.partnerCompaniesId
|
|
) b ON b.subPathner = a.partnerCompaniesId
|
|
|
LEFT JOIN esm_ins_company eic on eic.id = a.companyId
|
|
LEFT JOIN esm_ins_company eic on eic.id = a.companyId
|
|
|
LEFT JOIN sys_area sa on sa.area_code = a.subPathner
|
|
LEFT JOIN sys_area sa on sa.area_code = a.subPathner
|