Commit ad237db7 by yao.xiao

修改缴费年限

parent 8394444a
......@@ -28,39 +28,39 @@
parameterType="com.yd.dal.entity.agms.fortune.CommissionPayoutStatusQueryInfo"
resultType="com.yd.dal.entity.agms.fortune.CommissionPayoutStatus">
select f.id fortuneId,
date_format(f.commission_payout_at, '%Y-%m') commissionPayoutYearmonth,
i.name insurerName,
if(o.config_level = 2,p.name,pp.name) productName,
o.policy_no policyNo,
if(o.payment_term IS NOT NULL ,CONCAT(o.payment_term,o.payment_term_unit),(SELECT e.element_text from ag_po_order_life_product_elements e where o.id = e.order_id and e.factor_code like 'f_pay_term' LIMIT 1)) paymentTermUnit,
if(o.cover_term IS NOT NULL ,CONCAT(o.cover_term,o.cover_term_type) ,(SELECT e.element_text from ag_po_order_life_product_elements e where o.id = e.order_id and e.factor_code like 'f_coverage_term' LIMIT 1)) coverTermType,
o.order_price orderPrice,
pra.name practitionerName,
dept.name insurerBranchDeptName,
sub.name subordinateSystemName,
f.practitioner_level practitionerLevel,
f.commission_amount commissionAmount,
f.commission_type commissionType,
f.referral_rate referralRate,
f.referral_amount referralAmount,
op.drop_option_name commissionPayoutStatus,
pb.payout_yearmonth monthPeriod
date_format(f.commission_payout_at, '%Y-%m') commissionPayoutYearmonth,
i.name insurerName,
if(o.config_level = 2,p.name,pp.name) productName,
o.policy_no policyNo,
if(o.payment_term IS NOT NULL ,CONCAT(o.payment_term,(case o.payment_term_unit when 'Y' then '年' when 'M' then '月' else '日' END ) ),(SELECT e.element_text from ag_po_order_life_product_elements e where o.id = e.order_id and e.factor_code like 'f_pay_term' LIMIT 1)) paymentTermUnit,
if(o.cover_term IS NOT NULL ,o.cover_term_type ,(SELECT e.element_text from ag_po_order_life_product_elements e where o.id = e.order_id and e.factor_code like 'f_coverage_term' LIMIT 1)) coverTermType,
o.order_price orderPrice,
pra.name practitionerName,
dept.name insurerBranchDeptName,
sub.name subordinateSystemName,
f.practitioner_level practitionerLevel,
f.commission_amount commissionAmount,
f.commission_type commissionType,
f.referral_rate referralRate,
f.referral_amount referralAmount,
op.drop_option_name commissionPayoutStatus,
pb.payout_yearmonth monthPeriod
from ag_acl_customer_fortune f
LEFT JOIN ag_po_order o
LEFT JOIN ag_acl_insurer i ON i.id = o.insurer_id
LEFT JOIN ag_product p ON p.id = o.product_id
LEFT JOIN ag_product_plan pp ON pp.id = o.plan_id
ON o.id = f.order_id
LEFT JOIN ag_acl_practitioner pra
LEFT JOIN ag_acl_insurer_branch_dept dept ON pra.dept_id = dept.id
LEFT JOIN ag_acl_practitioner_subordinate_system sub ON sub.id = pra.subordinate_system_id
ON pra.customer_id = f.customer_id
LEFT JOIN ag_acl_customer_fortune_payout_batch pb ON pb.id = f.payout_batch_id
LEFT JOIN ag_md_drop_options op
LEFT JOIN ag_md_drop_master mas ON mas.id = op.drop_master_id
ON op.drop_option_code = f.commission_payout_status
LEFT JOIN ag_po_order o
LEFT JOIN ag_acl_insurer i ON i.id = o.insurer_id
LEFT JOIN ag_product p ON p.id = o.product_id
LEFT JOIN ag_product_plan pp ON pp.id = o.plan_id
ON o.id = f.order_id
LEFT JOIN ag_acl_practitioner pra
LEFT JOIN ag_acl_insurer_branch_dept dept ON pra.dept_id = dept.id
LEFT JOIN ag_acl_practitioner_subordinate_system sub ON sub.id = pra.subordinate_system_id
ON pra.customer_id = f.customer_id
LEFT JOIN ag_acl_customer_fortune_payout_batch pb ON pb.id = f.payout_batch_id
LEFT JOIN ag_md_drop_options op
LEFT JOIN ag_md_drop_master mas ON mas.id = op.drop_master_id
ON op.drop_option_code = f.commission_payout_status
where o.commission_check_status = 2
AND mas.drop_code like 'Commission_Payout_Status'
AND mas.drop_code like 'Commission_Payout_Status'
<if test="item.insurerId != null">
AND i.id = #{item.insurerId,jdbcType=BIGINT}
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment