From 5d84bf188f33ff2b50a0a488ea8432365cf8d1f3 Mon Sep 17 00:00:00 2001 From: lijiarao Date: Mon, 25 Mar 2024 17:23:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=2082978=20=E4=BC=9A=E8=AE=AE=E6=89=93?= =?UTF-8?q?=E5=8C=85=E7=BB=9F=E8=AE=A1--=E5=9B=BD=E9=99=85=E7=A0=94?= =?UTF-8?q?=E8=AE=A8=E4=BC=9A=E4=BB=8E=E4=B8=80=E4=B8=AA=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=88=90=E4=B8=A4=E4=B8=AA=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E5=90=8E--=E4=BC=9A=E8=AE=AE=E9=87=91=E9=A2=9DA=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/统计视图(新).sql | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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