Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bi-report
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data
bi-report
Commits
46b13320
Commit
46b13320
authored
Aug 21, 2020
by
王妍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push code
parent
384e3c97
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
126 additions
and
0 deletions
+126
-0
en-cn.properties
pm/phone_clue_base_data/en-cn.properties
+0
-0
phone_clue_base_data.zip
pm/phone_clue_base_data/job/phone_clue_base_data.zip
+0
-0
step1_1.job
pm/phone_clue_base_data/job/step1_1.job
+4
-0
step1_2.job
pm/phone_clue_base_data/job/step1_2.job
+4
-0
step1_3.job
pm/phone_clue_base_data/job/step1_3.job
+4
-0
step1_4.job
pm/phone_clue_base_data/job/step1_4.job
+4
-0
step1_5.job
pm/phone_clue_base_data/job/step1_5.job
+4
-0
step1_6.job
pm/phone_clue_base_data/job/step1_6.job
+4
-0
step1_7.job
pm/phone_clue_base_data/job/step1_7.job
+4
-0
step2.job
pm/phone_clue_base_data/job/step2.job
+5
-0
phone_base_data.sql
pm/phone_clue_base_data/report/phone_base_data.sql
+93
-0
No files found.
pm/phone_clue_base_data/en-cn.properties
0 → 100644
View file @
46b13320
pm/phone_clue_base_data/job/phone_clue_base_data.zip
0 → 100644
View file @
46b13320
File added
pm/phone_clue_base_data/job/step1_1.job
0 → 100644
View file @
46b13320
#step1_1.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive tl tl_gm_sl_lead_task
\ No newline at end of file
pm/phone_clue_base_data/job/step1_2.job
0 → 100644
View file @
46b13320
#step1_2.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online tl_hdfs_hippo_merchant_view
\ No newline at end of file
pm/phone_clue_base_data/job/step1_3.job
0 → 100644
View file @
46b13320
#step1_3.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive online ml_doctor_relation_dimen_day
\ No newline at end of file
pm/phone_clue_base_data/job/step1_4.job
0 → 100644
View file @
46b13320
#step1_4.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive tl tl_gm_sl_lead_task_phone_binding
\ No newline at end of file
pm/phone_clue_base_data/job/step1_5.job
0 → 100644
View file @
46b13320
#step1_5.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive tl tl_gm_sl_virtual_phone_binding
\ No newline at end of file
pm/phone_clue_base_data/job/step1_6.job
0 → 100644
View file @
46b13320
#step1_6.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive tl tl_gm_sl_ali_virtual_phone_binding
\ No newline at end of file
pm/phone_clue_base_data/job/step1_7.job
0 → 100644
View file @
46b13320
#step1_7.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive tl tl_gm_sl_ali_virtual_phone_call_detail
\ No newline at end of file
pm/phone_clue_base_data/job/step2.job
0 → 100644
View file @
46b13320
#step2.job
type=command
dependencies=step1_1,step1_2,step1_3,step1_4,step1_5,step1_6,step1_7
command=curl -X GET http://localhost:8553/api/report/email/phone_clue_base_data/wangyan@igengmei.com
\ No newline at end of file
pm/phone_clue_base_data/report/phone_base_data.sql
0 → 100644
View file @
46b13320
---电话线索明细数据
SELECT
t1
.
created_time
as
`日期`
,
t1
.
id
as
`线索ID`
,
doc
.
hospital_id
as
`机构ID`
,
doc
.
hospital_name
as
`机构名称`
,
mer
.
merchant_level
as
`商户等级`
,
doc
.
business_group_region_name
`所属大区`
,
doc
.
city_name
`所属城市`
,
doc
.
business_partener_name
`对应商务名`
,
coalesce
(
t3
.
virtual_phone
,
'-'
)
`留电虚拟号`
,
t1
.
created_time
`留电时间`
,
case
when
t5
.
release_time
>
t5
.
start_time
then
'已接通'
when
t5
.
release_time
=
t5
.
start_time
then
'未接通'
when
(
t2
.
lead_task_id
is
null
)
then
'未绑定'
when
t5
.
sub_id
is
null
then
'未联系'
end
as
`沟通状态`
,
coalesce
(
t5
.
call_type
,
'-'
)
as
`拨打状态`
FROM
(
select
id
,
created_time
,
phone_binding_id
,
merchant_id
from
tl
.
tl_gm_sl_lead_task
WHERE
partition_day
=
REGEXP_REPLACE
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
and
source
=
'2'
AND
REGEXP_REPLACE
(
SUBSTR
(
created_time
,
0
,
10
),
'-'
,
''
)
>=
REGEXP_REPLACE
(
date_sub
(
current_date
(),
7
),
'-'
,
''
)
AND
REGEXP_REPLACE
(
SUBSTR
(
created_time
,
0
,
10
),
'-'
,
''
)
<=
REGEXP_REPLACE
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
---AND id ='7268457'
)
t1
LEFT
JOIN
(
SELECT
id
,
merchant_level
FROM
online
.
tl_hdfs_hippo_merchant_view
where
partition_date
=
regexp_replace
(
date_sub
(
current_date
,
1
),
'-'
,
''
)
----AND merchant_id='6329571003697540960'
)
mer
on
mer
.
id
=
t1
.
merchant_id
left
JOIN
(
SELECT
hospital_id
,
merchant_id
,
hospital_name
,
business_group_region_name
,
city_name
,
business_partener_name
FROM
online
.
ml_doctor_relation_dimen_day
WHERE
partition_date
=
REGEXP_REPLACE
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
and
doctor_is_merchant
=
'true'
)
doc
on
doc
.
merchant_id
=
t1
.
merchant_id
left
JOIN
(
SELECT
phone_binding_id
,
lead_task_id
FROM
tl
.
tl_gm_sl_lead_task_phone_binding
WHERE
partition_day
=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
)
t2
on
t1
.
id
=
t2
.
lead_task_id
LEFT
JOIN
(
SELECT
id
,
platform_binding_id
,
virtual_phone
FROM
tl
.
tl_gm_sl_virtual_phone_binding
WHERE
partition_day
=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
)
t3
on
t3
.
id
=
t2
.
phone_binding_id
LEFT
JOIN
(
SELECT
id
,
sub_id
FROM
tl
.
tl_gm_sl_ali_virtual_phone_binding
--阿里记录表
WHERE
partition_day
=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
--AND id in ('2664','2943')
)
t4
on
t4
.
id
=
t3
.
platform_binding_id
left
JOIN
(
SELECT
id
,
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
as
call_date
,
sub_id
,
start_time
,
release_time
,
call_time
,
case
when
call_type
=
'1'
then
'机构拨打'
when
call_type
=
'0'
then
'用户回拨'
end
as
call_type
from
tl
.
tl_gm_sl_ali_virtual_phone_call_detail
WHERE
partition_day
=
REGEXP_REPLACE
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
and
start_time
is
not
null
)
t5
on
t5
.
sub_id
=
t4
.
sub_id
group
by
t1
.
created_time
,
t1
.
id
,
mer
.
merchant_level
,
doc
.
hospital_id
,
doc
.
hospital_name
,
doc
.
business_group_region_name
,
doc
.
city_name
,
doc
.
business_partener_name
,
coalesce
(
t3
.
virtual_phone
,
'-'
)
,
t1
.
created_time
,
case
when
t5
.
release_time
>
t5
.
start_time
then
'已接通'
when
t5
.
release_time
=
t5
.
start_time
then
'未接通'
when
(
t2
.
lead_task_id
is
null
)
then
'未绑定'
when
t5
.
sub_id
is
null
then
'未联系'
end
,
coalesce
(
t5
.
call_type
,
'-'
)
order
by
1
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment