|
|
@@ -3609,4 +3609,75 @@
|
|
|
AND iac.createtime <![CDATA[ <= ]]> #{endDate}
|
|
|
and ipi.id IS NOT NULL
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getReceivableExportList" resultType="com.ydtech.modules.order.entity.vo.ReceivableExportVo">
|
|
|
+ SELECT
|
|
|
+ iac.id,
|
|
|
+ io.userid,
|
|
|
+ io.licenseno,
|
|
|
+ io.ins_company,
|
|
|
+ io.product,
|
|
|
+ iac.jqpolicyno,
|
|
|
+ iac.sypolicyno,
|
|
|
+ iac.cross_insurance,
|
|
|
+ iac.jqpremium,
|
|
|
+ iac.sypremium,
|
|
|
+ iac.jypremium,
|
|
|
+ iac.taxamount,
|
|
|
+ iac.agreement_id,
|
|
|
+ iac.docking_person,
|
|
|
+ su.name as operator_name,
|
|
|
+ (ifon.jq_costs_export_proportion + ifon.jq_export_other_costs_proportion) as jq_export_proportion,
|
|
|
+ (ifon.sy_costs_export_proportion + ifon.sy_export_other_costs_proportion) as sy_export_proportion,
|
|
|
+ (ifon.no_costs_export_proportion + ifon.no_export_other_costs_proportion) as jy_export_proportion,
|
|
|
+ (ifon.jq_export_supervise_costs_premiums + ifon.sy_export_supervise_costs_premiums + ifon.no_export_supervise_costs_premiums +
|
|
|
+ ifon.jq_export_other_costs_premiums + ifon.sy_export_other_costs_premiums + ifon.no_export_other_costs_premiums) as settlement,
|
|
|
+ ifon.jq_supervise_costs_proportion,
|
|
|
+ ifon.jq_other_costs_proportion,
|
|
|
+ ifon.jq_supervise_costs_premiums,
|
|
|
+ ifon.jq_other_costs_premiums,
|
|
|
+ ifon.sy_supervise_costs_proportion,
|
|
|
+ ifon.sy_other_costs_proportion,
|
|
|
+ ifon.sy_supervise_costs_premiums,
|
|
|
+ ifon.sy_other_costs_premiums,
|
|
|
+ ifon.no_supervise_costs_proportion,
|
|
|
+ ifon.no_other_costs_proportion,
|
|
|
+ ifon.no_supervise_costs_premiums,
|
|
|
+ ifon.no_other_costs_premiums,
|
|
|
+ case
|
|
|
+ WHEN io.entry_status = 3 THEN '是'
|
|
|
+ ELSE '否'
|
|
|
+ END as is_external,
|
|
|
+ ipi.partner_companies_name,
|
|
|
+ ipi.insured_name,
|
|
|
+ iac.signing_time,
|
|
|
+ ipi.receivable_amount as receivable,
|
|
|
+ case
|
|
|
+ WHEN pa.agreement_type = 2 THEN '保险公司'
|
|
|
+ ELSE '平台公司'
|
|
|
+ END as agreement_type
|
|
|
+
|
|
|
+
|
|
|
+ FROM
|
|
|
+ ins_orders io
|
|
|
+ left join ins_area_company iac ON
|
|
|
+ io.orderno = iac.orderno
|
|
|
+ left join sys_user su ON
|
|
|
+ io.operatorid = su.id
|
|
|
+ left join ins_fee_order_new ifon on
|
|
|
+ ifon.ins_order_no = iac.id
|
|
|
+ left join ins_ply_income ipi on
|
|
|
+ ipi.orderno = iac.id
|
|
|
+ left join ptl_agreement pa on
|
|
|
+ iac.agreement_id = pa.id
|
|
|
+ left join ins_fee_audit ifa on ifa.ins_order_no = iac.id
|
|
|
+ WHERE
|
|
|
+ io.orderstatus = 3
|
|
|
+ and
|
|
|
+ iac.orderstatus = 3
|
|
|
+ and
|
|
|
+ ifa.auditstatus = 1
|
|
|
+ AND iac.createtime BETWEEN #{params.signStartDate}
|
|
|
+ AND #{params.signEndDate};
|
|
|
+ </select>
|
|
|
</mapper>
|