Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dataquality_doc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王东
dataquality_doc
Commits
73222504
Commit
73222504
authored
Dec 20, 2022
by
王东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标计算承保字段调整
parent
d6e5f2e0
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
166 additions
and
212 deletions
+166
-212
ODS/数据同步/ODS_REGIST.sql
ODS/数据同步/ODS_REGIST.sql
+15
-15
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_归属人员和大单.sql
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_归属人员和大单.sql
+106
-0
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_承保合并.sql
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_承保合并.sql
+0
-0
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_承保新增.sql
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_承保新增.sql
+0
-0
tmp.json
tmp.json
+45
-197
No files found.
ODS/数据同步/ODS_REGIST.sql
View file @
73222504
...
@@ -8,17 +8,17 @@ from ODS.SOURCE_KAFKA_REGIST_PRD.REGIST s1 -- topic ClaimCase
...
@@ -8,17 +8,17 @@ from ODS.SOURCE_KAFKA_REGIST_PRD.REGIST s1 -- topic ClaimCase
;
;
--
-- 记录消费数据总量
-- -- 记录消费数据总量
insert
into
ODS
.
ODS_REDIS
.
SET_VARCHAR
-- insert into ODS.ODS_REDIS.SET_VARCHAR
select
-- select
CONCAT
(
'MQ_REGIST/'
,
LEFT
(
DataAccRegistUDF
(
date_time
,
'get'
),
10
))
as
`key`
,
-- CONCAT('MQ_REGIST/', LEFT(DataAccRegistUDF( date_time,'get'),10)) as `key` ,
DataAccRegistUDF
(
date_time
,
'get'
)
as
val
-- DataAccRegistUDF( date_time,'get') as val
from
(
-- from (
select
-- select
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyy-MM-dd HH:mm:ss'
)
as
date_time
-- 批单累加器 yyyy-MM-dd:num
-- DATE_FORMAT(LOCALTIMESTAMP,'yyyy-MM-dd HH:mm:ss') as date_time -- 批单累加器 yyyy-MM-dd:num
from
ODS
.
SOURCE_KAFKA_REGIST_PRD
.
REGIST
-- from ODS.SOURCE_KAFKA_REGIST_PRD.REGIST
-- 在select与where条件中同时调用该参数 acc,会执行两次UDF函数 ,所以通过定义函数记录该参数 DataAccEndorLogUDF
-- -- 在select与where条件中同时调用该参数 acc,会执行两次UDF函数 ,所以通过定义函数记录该参数 DataAccEndorLogUDF
where
LEFT
(
DataAccRegistUDF
(
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyy-MM-dd HH:mm:ss'
),
'set'
),
10
)
<>
'xxxx-xx-xx'
-- 将该参数保留
-- where LEFT(DataAccRegistUDF( DATE_FORMAT(LOCALTIMESTAMP,'yyyy-MM-dd HH:mm:ss'),'set'),10) <> 'xxxx-xx-xx' -- 将该参数保留
)
s1
-- ) s1
;
-- ;
\ No newline at end of file
\ No newline at end of file
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_归属人员和大单.sql
View file @
73222504
...
@@ -259,6 +259,58 @@ from (
...
@@ -259,6 +259,58 @@ from (
;
;
-- 县支
insert
into
ZB_DM
.
ZB_DM_REDIS
.
SET_VARCHAR
select
CONCAT
(
'bigcteambd/'
,
s1
.
`uwConclueDate`
,
'/'
,
s1
.
`group_com`
)
as
`key`
,
topNUDF
(
CONCAT
(
'bigcteambd/'
,
s1
.
`uwConclueDate`
,
'/'
,
s1
.
`group_com`
)
,
`cost`
,
concat
(
'com'
,
':'
,
`com`
,
','
,
'comname'
,
':'
,
`comname`
,
','
,
'city'
,
':'
,
`city`
,
','
,
'cityname'
,
':'
,
`cityname`
,
','
,
'country'
,
':'
,
`country`
,
','
,
'countryname'
,
':'
,
`countryname`
,
','
,
'team'
,
':'
,
`team`
,
','
,
'teamname'
,
':'
,
`teamname`
,
','
,
'risk'
,
':'
,
`risk`
,
','
,
'riskname'
,
':'
,
`riskname`
,
','
,
'chnl'
,
':'
,
`chnl`
,
','
,
'chnlname'
,
':'
,
`chnlname`
,
','
,
'cost'
,
':'
,
`cost`
,
','
,
'no'
,
':'
,
`no`
)
,
20
,
s1
.
`uwConclueDate`
)
as
`val`
from
(
select
d1
.
`uwConclueDate`
as
`uwConclueDate`
,
d1
.
`LEVEL3COMCODE`
as
`group_com`
,
d1
.
`LEVEL1COMCODE`
as
`com`
,
d1
.
`LEVEL1COMDESC`
as
`comname`
,
d1
.
`LEVEL2COMCODE`
as
`city`
,
d1
.
`LEVEL2COMDESC`
as
`cityname`
,
d1
.
`LEVEL3COMCODE`
as
`country`
,
d1
.
`LEVEL3COMDESC`
as
`countryname`
,
d1
.
`LEVEL4COMCODE`
as
`team`
,
d1
.
`LEVEL4COMDESC`
as
`teamname`
,
d1
.
`risk`
as
`risk`
,
d1
.
`riskname`
as
`riskname`
,
d1
.
`chnl`
as
`chnl`
,
d1
.
`chnlname`
as
`chnlname`
,
cast
(
d1
.
`cost`
as
varchar
)
as
`cost`
,
d1
.
`no`
as
`no`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
d1
where
d1
.
`COMNAME`
is
not
null
and
d1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
d1
.
risk
,
2
)
=
'05'
)
s1
;
-- ZB_DM_FCXCBDD ZB_DM_非车险承保大单
-- ZB_DM_FCXCBDD ZB_DM_非车险承保大单
-- bigfcbd/日期
-- bigfcbd/日期
...
@@ -395,4 +447,57 @@ from (
...
@@ -395,4 +447,57 @@ from (
and
left
(
d1
.
risk
,
2
)
<>
'05'
and
left
(
d1
.
risk
,
2
)
<>
'05'
)
s1
)
s1
;
-- 县支
insert
into
ZB_DM
.
ZB_DM_REDIS
.
SET_VARCHAR
select
CONCAT
(
'bigfcteambd/'
,
s1
.
`uwConclueDate`
,
'/'
,
s1
.
`group_com`
)
as
`key`
,
topNUDF
(
CONCAT
(
'bigfcteambd/'
,
s1
.
`uwConclueDate`
,
'/'
,
s1
.
`group_com`
)
,
`cost`
,
concat
(
'com'
,
':'
,
`com`
,
','
,
'comname'
,
':'
,
`comname`
,
','
,
'city'
,
':'
,
`city`
,
','
,
'cityname'
,
':'
,
`cityname`
,
','
,
'country'
,
':'
,
`country`
,
','
,
'countryname'
,
':'
,
`countryname`
,
','
,
'team'
,
':'
,
`team`
,
','
,
'teamname'
,
':'
,
`teamname`
,
','
,
'risk'
,
':'
,
`risk`
,
','
,
'riskname'
,
':'
,
`riskname`
,
','
,
'chnl'
,
':'
,
`chnl`
,
','
,
'chnlname'
,
':'
,
`chnlname`
,
','
,
'cost'
,
':'
,
`cost`
,
','
,
'no'
,
':'
,
`no`
)
,
20
,
s1
.
`uwConclueDate`
)
as
`val`
from
(
select
d1
.
`uwConclueDate`
as
`uwConclueDate`
,
d1
.
`LEVEL3COMCODE`
as
`group_com`
,
d1
.
`LEVEL1COMCODE`
as
`com`
,
d1
.
`LEVEL1COMDESC`
as
`comname`
,
d1
.
`LEVEL2COMCODE`
as
`city`
,
d1
.
`LEVEL2COMDESC`
as
`cityname`
,
d1
.
`LEVEL3COMCODE`
as
`country`
,
d1
.
`LEVEL3COMDESC`
as
`countryname`
,
d1
.
`LEVEL4COMCODE`
as
`team`
,
d1
.
`LEVEL4COMDESC`
as
`teamname`
,
d1
.
`risk`
as
`risk`
,
d1
.
`riskname`
as
`riskname`
,
d1
.
`chnl`
as
`chnl`
,
d1
.
`chnlname`
as
`chnlname`
,
cast
(
d1
.
`cost`
as
varchar
)
as
`cost`
,
d1
.
`no`
as
`no`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
d1
where
d1
.
`COMNAME`
is
not
null
and
d1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
d1
.
risk
,
2
)
<>
'05'
)
s1
;
;
\ No newline at end of file
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_承保合并.sql
View file @
73222504
This diff is collapsed.
Click to expand it.
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_承保新增.sql
0 → 100644
View file @
73222504
This diff is collapsed.
Click to expand it.
tmp.json
View file @
73222504
[
[
{
{
"com"
:
"44030000"
,
"com"
:
"52000000"
,
"no"
:
"6605212022440314004622"
,
"country"
:
"52017000"
,
"riskname"
:
"0521-机动车综合商业险"
,
"no"
:
"6627022022520170001908"
,
"cost"
:
"72696.8600"
,
"cost"
:
"283.0300"
,
"chnlname"
:
"个代"
,
"city"
:
"52019900"
,
"comname"
:
"深圳分公司"
,
"cityname"
:
"贵阳市中心支公司"
,
"risk"
:
"0521"
,
"countryname"
:
"贵阳市观山湖区支公司"
,
"chnl"
:
"08"
"comname"
:
"贵州分公司"
,
},
"team"
:
"5201703002"
,
{
"chnl"
:
"03"
,
"com"
:
"31000000"
,
"riskname"
:
"27020004-机动车驾乘人员团体意外伤害保险"
,
"no"
:
"6605212022310110020835"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"51719.4900"
,
"chnlname"
:
"网销"
,
"comname"
:
"上海分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"15"
},
{
"com"
:
"44030000"
,
"no"
:
"6605312022440311000668"
,
"riskname"
:
"0531-新能源汽车商业保险"
,
"cost"
:
"45809.1100"
,
"chnlname"
:
"个代"
,
"comname"
:
"深圳分公司"
,
"risk"
:
"0531"
,
"chnl"
:
"08"
},
{
"com"
:
"31000000"
,
"no"
:
"6605212022310061001503"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"45086.0600"
,
"chnlname"
:
"车行"
,
"comname"
:
"上海分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"06"
},
{
"com"
:
"34000000"
,
"no"
:
"6605212022340322008660"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"44089.2800"
,
"chnlname"
:
"互动"
,
"comname"
:
"安徽省分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"03"
},
{
"com"
:
"34000000"
,
"no"
:
"6605212022340322008661"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"44089.2800"
,
"chnlname"
:
"互动"
,
"comname"
:
"安徽省分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"03"
},
{
"com"
:
"44030000"
,
"no"
:
"6605212022440311007664"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"43329.1400"
,
"chnlname"
:
"个代"
,
"comname"
:
"深圳分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"08"
},
{
"com"
:
"34000000"
,
"no"
:
"6605212022341125005814"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"39408.0000"
,
"chnlname"
:
"个代"
,
"comname"
:
"安徽省分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"08"
},
{
"com"
:
"31000000"
,
"no"
:
"6605312022310105008999"
,
"riskname"
:
"0531-新能源汽车商业保险"
,
"cost"
:
"37797.9400"
,
"chnlname"
:
"车行"
,
"comname"
:
"上海分公司"
,
"risk"
:
"0531"
,
"chnl"
:
"06"
},
{
"com"
:
"31000000"
,
"no"
:
"6605312022310083001041"
,
"riskname"
:
"0531-新能源汽车商业保险"
,
"cost"
:
"36859.2300"
,
"chnlname"
:
"车行"
,
"comname"
:
"上海分公司"
,
"risk"
:
"0531"
,
"chnl"
:
"06"
},
{
"com"
:
"31000000"
,
"no"
:
"6605212022310083012898"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"34986.8700"
,
"chnlname"
:
"车行"
,
"comname"
:
"上海分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"06"
},
{
"com"
:
"44000000"
,
"no"
:
"6605212022440112002883"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"34540.2400"
,
"chnlname"
:
"银保"
,
"comname"
:
"广东省分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"07"
},
{
"com"
:
"13000000"
,
"no"
:
"6605212022130461003029"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"32326.3500"
,
"chnlname"
:
"个代"
,
"comname"
:
"河北省分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"08"
},
{
"com"
:
"13000000"
,
"no"
:
"6605212022130461003028"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"32326.3500"
,
"chnlname"
:
"个代"
,
"comname"
:
"河北省分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"08"
},
{
"com"
:
"37000000"
,
"no"
:
"6605212022370725006713"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"31857.2300"
,
"chnlname"
:
"互动"
,
"comname"
:
"山东省分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"03"
},
{
"com"
:
"34000000"
,
"no"
:
"6605212022340322008648"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"31852.4000"
,
"chnlname"
:
"互动"
,
"comname"
:
"安徽省分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"03"
},
{
"com"
:
"37000000"
,
"no"
:
"6605212022371524003793"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"31580.9300"
,
"chnlname"
:
"个代"
,
"comname"
:
"山东省分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"08"
},
{
"com"
:
"35000000"
,
"no"
:
"6605212022350195000840"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"30649.7100"
,
"chnlname"
:
"个代"
,
"comname"
:
"福建分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"08"
},
{
"com"
:
"23000000"
,
"no"
:
"6605212022230399004261"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"30518.9100"
,
"chnlname"
:
"银保"
,
"comname"
:
"黑龙江分公司"
,
"risk"
:
"0521"
,
"chnl"
:
"07"
},
{
"com"
:
"34000000"
,
"no"
:
"6605212022341250006855"
,
"riskname"
:
"0521-机动车综合商业险"
,
"cost"
:
"30289.1500"
,
"chnlname"
:
"互动"
,
"chnlname"
:
"互动"
,
"comname"
:
"安徽省分公司"
,
"risk"
:
"27020004"
,
"risk"
:
"0521"
,
"teamname"
:
"贵阳市观山湖区支公司互动渠道收展一部"
"chnl"
:
"03"
},
{
"com"
:
"52000000"
,
"country"
:
"52017000"
,
"no"
:
"6602972022520170000032"
,
"cost"
:
"9.4400"
,
"city"
:
"52019900"
,
"cityname"
:
"贵阳市中心支公司"
,
"countryname"
:
"贵阳市观山湖区支公司"
,
"comname"
:
"贵州分公司"
,
"team"
:
"5201700001"
,
"chnl"
:
"12"
,
"riskname"
:
"02970002-家用燃气综合保险(B)"
,
"chnlname"
:
"政保"
,
"risk"
:
"02970002"
,
"teamname"
:
"贵阳市观山湖区支公司政保团队"
},
{
"com"
:
"52000000"
,
"country"
:
"52017000"
,
"no"
:
"6602972022520170000033"
,
"cost"
:
"9.4400"
,
"city"
:
"52019900"
,
"cityname"
:
"贵阳市中心支公司"
,
"countryname"
:
"贵阳市观山湖区支公司"
,
"comname"
:
"贵州分公司"
,
"team"
:
"5201700001"
,
"chnl"
:
"12"
,
"riskname"
:
"02970002-家用燃气综合保险(B)"
,
"chnlname"
:
"政保"
,
"risk"
:
"02970002"
,
"teamname"
:
"贵阳市观山湖区支公司政保团队"
}
}
]
]
\ 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