From 12d06ed5fcd6921d9d72ec1b34e053c773ebf077 Mon Sep 17 00:00:00 2001 From: jack <jack.su@pollex.com.tw> Date: 星期二, 01 八月 2023 11:52:01 +0800 Subject: [PATCH] [ADD] 後台預約單報表新增顧問性別和年資的欄位, todo: 169492 --- pamapi/src/doc/sql/20230727_j.sql | 39 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 36 insertions(+), 3 deletions(-) diff --git a/pamapi/src/doc/sql/20230727_j.sql b/pamapi/src/doc/sql/20230727_j.sql index 014c1b6..de5b103 100644 --- a/pamapi/src/doc/sql/20230727_j.sql +++ b/pamapi/src/doc/sql/20230727_j.sql @@ -27,9 +27,6 @@ - --- public.appointment_customer_consultant_view source - -- public.appointment_customer_consultant_view source CREATE OR REPLACE VIEW omo.appointment_customer_consultant_view @@ -59,4 +56,40 @@ appointment.consultation_method as consultation_method FROM appointment LEFT JOIN consultant ON appointment.agent_no::text = consultant.agent_no::text + LEFT JOIN customer ON appointment.customer_id = customer.id; + + + + +-- public.appointment_customer_consultant_view source , �憓onsultant_gender��onsultant_entry_date甈�� + +CREATE OR REPLACE VIEW public.appointment_customer_consultant_view +AS SELECT appointment.id AS appointment_id, + appointment.phone, + appointment.email, + appointment.contact_type, + appointment.gender, + appointment.age, + appointment.job, + appointment.requirement, + appointment.communicate_status, + appointment.hope_contact_time, + appointment.other_requirement, + appointment.appointment_date, + appointment.last_modified_date, + appointment.agent_no, + appointment.consultant_view_time, + appointment.consultant_read_time, + appointment.contact_time, + appointment.status, + consultant.name AS consultant_name, + consultant.phone_number AS consultant_phone_number, + consultant.email AS consultant_email, + consultant.role AS consultant_role, + customer.name AS customer_name, + appointment.consultation_method, + consultant.gender as consultant_gender, + consultant.entry_date as consultant_entry_date + FROM appointment + LEFT JOIN consultant ON appointment.agent_no::text = consultant.agent_no::text LEFT JOIN customer ON appointment.customer_id = customer.id; \ No newline at end of file -- Gitblit v1.8.0