diff --git a/db/统计视图(新).sql b/db/统计视图(新).sql index 0392983e..e30e8e0b 100644 --- a/db/统计视图(新).sql +++ b/db/统计视图(新).sql @@ -882,8 +882,16 @@ SELECT p1.confirm_amount AS confirm_amount, p1.invoice_amount AS billMoney, p1.paid_amount AS comeAllMoney, - ifnull(p2.meeting_costs,p2.meeting_costs_two_topic) meeting_costs_a, - ifnull(p2.meeting_costs_vip,p2.meeting_costs_three_topic) meeting_costs_b, + case + when p2.is_wasic = 1 + then p2.meeting_costs_two_topic + else p2.meeting_costs + end meeting_costs_a, + case + when p2.is_wasic = 1 + then p2.meeting_costs_three_topic + else p2.meeting_costs_vip + end meeting_costs_b, p2.meeting_name, p2.meeting_type, ( SELECT DATE_FORMAT( payment_date, '%Y' ) FROM pay_confirm_payment_record p3 WHERE p3.project_id = p1.id LIMIT 1 ) AS payment_year