报表名称:前线销售人力表
模型名称:epcissasemployeeanalyzenew
维度:统计时间 机构 渠道 年龄区间 学历 司龄区间 人员类别 新报表新增 : 保费区间 险种 客户规模 客户类型 个人赔付率区间
指标:月初在职人力 月末在职人力 新入司人力 离司人力 净增人力
模块:epcissas模块
刷新频度:月度刷新,
对应BA:龚平 潘强 621595
配置库脚本:
epcissasemployeeanalyzenew9558 EpcisSasGroupBefore M 010300 6 2015-07-01 03:02:46
epcissasemployeeanalyzenew9558 EpcisSasGroup M 010300 6 2015-07-01 03:04:36
epcissasemployeeanalyzenew9558 EpcisSasEmployeeLevelDim M 010300 6 2015-07-01 03:06:06
epcissasemployeeanalyzenew9558 EpcisSasEmployeeFact01 M 010300 6 2015-07-01 03:24:12
EpcisSasEmployeeDealMon 158735 2015-07-01 03:06:d 2015-07-01 03:09:19 10.31.32.11 OK 3 07-01
依赖关系
EpcisSasEmployeeFact01
EpcisSasEmployeeChange4,EpcisSasGroup
EpcisSasEmployeeLevelDim
EpcisSasGroup
EpcisSasEmployeeChange4依次依赖下面JOB
EpcisSasEmployeeChange3
EpcisSasEmployeeChange2
EpcisSasEmployeeChange1
EpcisSasGroupFact,EpcisAlarmDeptMapUp
EpcisSasEmployeeFact
EpcisSasEmployeeDealMon
select A.task_name, A.task_status, A.RUN_TIME, a.dep
from etl_task_config a
where a.task_name in (‘EpcisSasGroupBefore‘,
‘EpcisSasGroup‘,
‘EpcisSasEmployeeLevelDim‘,
‘EpcisSasEmployeeFact01‘);
SELECT A.TASK_NAME,
SUBSTR(A.PARAMETERS_LIST,
INSTR(A.PARAMETERS_LIST, ‘IncStart=‘) + 9,
8),
A.RUN_LOG_DESC,
A.START_TIME,
A.END_TIME,
A.ROW_NUM
FROM ETL_TASK_RUN_LOG A --输出到结果表的数据是7752265
WHERE A.TASK_NAME IN
(‘EpcisSasGroupBefore‘,
‘EpcisSasGroup‘,
‘EpcisSasEmployeeLevelDim‘,
‘EpcisSasEmployeeFact01‘)
--and a.run_log_desc = ‘OK‘
AND A.START_TIME > DATE ‘2015-04-01‘
--模型
select * from config_mdl a where a.mdl_name=‘epcissasemployeeanalyzenew‘
--fm取数对报表指标数据 EpcisSasemployeeOnJob
select T1."CALC_MONTH" as c1,
(to_date(T1."CALC_MONTH",‘YYYYMM‘)) as c2,
T1."EMPLOYEE_TYPE" as c3,
T1."BIRTHDAY" as c4,
T1."SEX" as c5,
decode( T1."SEX", ‘M‘, ‘男‘, ‘女‘ ) as c6,
T1."EDUCATION_CODE" as c7,
T1."ENTER_DATE" as c8,
T1."GROUP_CODE" as c9,
T1."REGULAR_DATE" as c10,
T1."LEAVE_DATE" as c11,
T1."IS_AGENT" as c12,
T1."DUTY_CODE" as c13,
decode( T1."LEVEL_CODE", ‘000‘, ‘999‘, T1."LEVEL_CODE" ) as c14,
T1."AGE_SEGMENT" as c15,
T1."ENTER_COM_SEGMENT" as c16,
T1."EMPLOYEE_CHANNEL" as c17,
T1."CHANNEL_DUTY" as c18,
DECODE(nvl(T1."VERSION_FLAG",‘0‘),‘N‘,‘已改革‘,‘0‘,‘未改革‘) as c19,
T1."ON_JOB_MANPOWER" as c20, --月末在职人力
T1."NEW_NENTER_MANPOWER" as c21, --新入司人力
T1."LEAVE_COM_MANPOWER" as c22 --离司人力
from "POLAPDATA"."EPCIS_SAS_EMPLOYEE_FACT_01" T1
--涉及结果表
EPCIS_SAS_GROUP
EPCIS_SAS_EMPLOYEE_FACT_01
EPCIS_SAS_EMPLOYEE_LEVEL_DIM
BEGIN
POLAPDATA_TRUNCATE_PROCEDURE(‘EPCIS_SAS_GROUP‘);
POLAPDATA_TRUNCATE_PROCEDURE(‘EPCIS_SAS_EMPLOYEE_FACT_01‘);
POLAPDATA_TRUNCATE_PROCEDURE(‘EPCIS_SAS_EMPLOYEE_LEVEL_DIM‘);
END;
EpcisSasGroup job数sql
SELECT
GROUP_CODE, GROUP_NAME, GROUP_TYPE, GROUP_REMARK, DEPARTMENT_CODE, START_DATE, ABANDON_DATE, LAST_UPDATE_DATE, LAST_UPDATE_BY, CREATION_DATE, CREATION_BY, URBAN, GROUP_CHANNEL, SALE_TYPE
FROM
epcisbase.sas_group
EpcisSasEmployeeLevelDim job取数sql --EPCIS_SAS_EMPLOYEE_LEVEL_DIM
select view_employee_level.code as level_code,
view_employee_level.name as level_name,
view_employee_level.is_manager
from view_employee_level
where view_employee_level.name not like ‘E76%‘
EpcisSasEmployeeFact01 job取数sql LEVEL_CODE 是主键 ---EPCIS_SAS_EMPLOYEE_FACT_01
SELECT EPCIS_SAS_EMPLOYEE_DEAL_MON.CALC_MONTH,
EPCIS_SAS_EMPLOYEE_DEAL_MON.EMPLOYEE_CODE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.EMPLOYEE_NAME,
EPCIS_SAS_EMPLOYEE_DEAL_MON.EMPLOYEE_TYPE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.BIRTHDAY,
EPCIS_SAS_EMPLOYEE_DEAL_MON.SEX,
EPCIS_SAS_EMPLOYEE_DEAL_MON.EDUCATION_CODE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.ENTER_DATE,
T.DEPARTMENT_CODE AS DEPARTMENT_CODE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.GROUP_CODE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.REGULAR_DATE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.LEAVE_DATE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.IS_AGENT,
EPCIS_SAS_EMPLOYEE_DEAL_MON.DUTY_CODE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.LEVEL_FLAG,
EPCIS_SAS_EMPLOYEE_DEAL_MON.PRE_LEVEL_FLAG,
EPCIS_SAS_EMPLOYEE_DEAL_MON.YEAR_BEGIN_LEVEL_FLAG,
EPCIS_SAS_EMPLOYEE_DEAL_MON.LEVEL_CODE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.PRE_LEVEL_CODE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.YEAR_BEGIN_LEVEL_CODE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.NEW_ENTER_FLAG,
EPCIS_SAS_EMPLOYEE_DEAL_MON.AGE,
EPCIS_SAS_EMPLOYEE_DEAL_MON.ENTER_COMPANY_MONTHS,
to_char((SELECT B.SEGMENT_ID
FROM EPCIS_SAS_RANK_SEGMENT_DIM B
WHERE EPCIS_SAS_EMPLOYEE_DEAL_MON.AGE >= B.SEGMENT_FROM
AND EPCIS_SAS_EMPLOYEE_DEAL_MON.AGE <= B.SEGMENT_TO
AND B.SEGMENT_FLAG = ‘1‘ --年龄区间
and rownum = 1)) AS AGE_SEGMENT,
to_char((SELECT C.SEGMENT_ID
FROM EPCIS_SAS_RANK_SEGMENT_DIM C
WHERE EPCIS_SAS_EMPLOYEE_DEAL_MON.Enter_Company_Months >=
C.SEGMENT_FROM
AND EPCIS_SAS_EMPLOYEE_DEAL_MON.Enter_Company_Months <=
C.SEGMENT_TO
AND C.SEGMENT_FLAG = ‘2‘ --司龄区间
and rownum = 1)) AS ENTER_COM_SEGMENT,
--在职人力
to_char(CASE
WHEN EPCIS_SAS_EMPLOYEE_DEAL_MON.NEW_ENTER_FLAG IN (0, 1) /*AND
EPCIS_SAS_EMPLOYEE_DEAL_MON.LEVEL_FLAG IN (‘A‘, ‘V‘) AND
NVL(EPCIS_SAS_EMPLOYEE_DEAL_MON.IS_AGENT, ‘#‘) NOT IN
(‘L‘, ‘Y‘, ‘I‘)*/ THEN
1
ELSE
0
END) AS ON_JOB_MANPOWER,
--新入司人力
to_char(CASE
WHEN EPCIS_SAS_EMPLOYEE_DEAL_MON.NEW_ENTER_FLAG = 1/* AND
EPCIS_SAS_EMPLOYEE_DEAL_MON.LEVEL_FLAG IN (‘A‘, ‘V‘) */THEN
1
ELSE
0
END) AS NEW_NENTER_MANPOWER,
--离司人力
to_char(CASE
WHEN /*EPCIS_SAS_EMPLOYEE_DEAL_MON.LEVEL_FLAG IN (‘A‘, ‘V‘) AND*/
EPCIS_SAS_EMPLOYEE_DEAL_MON.NEW_ENTER_FLAG = 2 /*AND
EPCIS_SAS_EMPLOYEE_DEAL_MON.IS_AGENT = ‘L‘*/ THEN
1
ELSE
0
END) AS LEAVE_COM_MANPOWER,
EPCIS_SAS_EMPLOYEE_DEAL_MON.CHANNEL_DUTY,
EPCIS_SAS_EMPLOYEE_DEAL_MON.VERSION_FLAG,
EPCIS_SAS_EMPLOYEE_DEAL_MON.EMPLOYEE_CHANNEL,
‘0‘ as collect
FROM EPCIS_SAS_EMPLOYEE_DEAL_MON, EPCIS_SAS_GROUP T
WHERE EPCIS_SAS_EMPLOYEE_DEAL_MON.CALC_MONTH = SUBSTR(‘#IncStart#‘, 1, 6)
AND EPCIS_SAS_EMPLOYEE_DEAL_MON.GROUP_CODE = T.GROUP_CODE
and EPCIS_SAS_EMPLOYEE_DEAL_MON.Hr_Code is not null
--EPCIS_SAS_EMPLOYEE_DEAL_MON 对应任务EpcisSasEmployeeDealMon
SELECT SUBSTR(‘#IncStart#‘, 1, 6) AS CALC_MONTH,
EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE,
EPCIS_SAS_EMPLOYEE.EMPLOYEE_NAME,
EPCIS_SAS_EMPLOYEE.EMPLOYEE_TYPE,
EPCIS_SAS_EMPLOYEE.BIRTHDAY,
EPCIS_SAS_EMPLOYEE.SEX,
EPCIS_SAS_EMPLOYEE.NATION_CODE,
EPCIS_SAS_EMPLOYEE.EDUCATION_CODE,
EPCIS_SAS_EMPLOYEE.MARRIAGE_CODE,
EPCIS_SAS_EMPLOYEE.CERTIFICATE_TYPE,
EPCIS_SAS_EMPLOYEE.CERTIFICATE_NO,
EPCIS_SAS_EMPLOYEE.RESIDENCE,
EPCIS_SAS_EMPLOYEE.GRANT_NAME,
EPCIS_SAS_EMPLOYEE.GRANT_CERTIFICATE_TYPE,
EPCIS_SAS_EMPLOYEE.GRANT_CERTIFICATE_NO,
EPCIS_SAS_EMPLOYEE.ENTER_DATE,
EPCIS_SAS_EMPLOYEE.DEPARTMENT_CODE,
nvl( (SELECT GR.GROUP_CODE
FROM EPCIS_SAS_EMP_GROUP_HISTORY GR
WHERE GR.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND GR.START_DATE <= TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘)
AND NVL(GR.END_DATE, TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) - 1
AND ROWNUM = 1),(SELECT GR.GROUP_CODE
FROM EPCIS_SAS_EMP_GROUP_HISTORY GR
WHERE GR.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND GR.START_DATE >= TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘)
AND GR.START_DATE <=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) - 1
AND NVL(GR.END_DATE, TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) - 1
AND ROWNUM = 1)) AS GROUP_CODE,
EPCIS_SAS_EMPLOYEE.EMPLOYEE_ENGLISH_NAME,
EPCIS_SAS_EMPLOYEE.MAJOR_CODE,
EPCIS_SAS_EMPLOYEE.TITLE_CODE,
EPCIS_SAS_EMPLOYEE.HOBBY,
EPCIS_SAS_EMPLOYEE.BLOOD_TYPE,
EPCIS_SAS_EMPLOYEE.PARTY_TYPE,
EPCIS_SAS_EMPLOYEE.HOME_ADDRESS,
EPCIS_SAS_EMPLOYEE.ZIP_CODE,
EPCIS_SAS_EMPLOYEE.TEL,
EPCIS_SAS_EMPLOYEE.GRANT_ADDRESS,
EPCIS_SAS_EMPLOYEE.REGULAR_DATE,
EPCIS_SAS_EMPLOYEE.LEAVE_DATE,
EPCIS_SAS_EMPLOYEE.EMPLOYEE_DOCUMENT,
EPCIS_SAS_EMPLOYEE.REMARK,
EPCIS_SAS_EMPLOYEE.PASSWORD,
EPCIS_SAS_EMPLOYEE.PASSWORD_MARK,
EPCIS_SAS_EMPLOYEE.ROW_ID,
EPCIS_SAS_EMPLOYEE.LAST_UPDATE_DATE,
EPCIS_SAS_EMPLOYEE.LAST_UPDATE_BY,
EPCIS_SAS_EMPLOYEE.CREATION_DATE,
EPCIS_SAS_EMPLOYEE.CREATION_BY,
EPCIS_SAS_EMPLOYEE.SALARY_COUNT_TYPE,
EPCIS_SAS_EMPLOYEE.AGENT_CODE,
EPCIS_SAS_EMPLOYEE.IS_AGENT,
EPCIS_SAS_EMPLOYEE.TYPE,
EPCIS_SAS_EMPLOYEE.SUCCESSOR,
EPCIS_SAS_EMPLOYEE.PCIS_DEPTCDE,
EPCIS_SAS_EMPLOYEE.DUTY_CODE,
EPCIS_SAS_EMPLOYEE.HR_CODE,
EPCIS_SAS_EMPLOYEE.ISDUNNER,
EPCIS_SAS_EMPLOYEE.PARTTIME_CROSSSALE_FLAG,
EPCIS_SAS_EMPLOYEE.PARTTIME_CHANNEL_FLAG,
EPCIS_SAS_EMPLOYEE.USE_FLAG,
EPCIS_SAS_EMPLOYEE.LAST_GROUP_CODE,
--当月职级类型
NVL((SELECT A.FLAG
FROM EPCIS_SAS_LEVEL_HISTORY A
WHERE A.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND A.START_DATE <= TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘)
AND NVL(A.END_DATE, TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) - 1
AND ROWNUM = 1),
‘99‘) AS LEVEL_FLAG,
--上月职级类型
NVL((SELECT A.FLAG
FROM EPCIS_SAS_LEVEL_HISTORY A
WHERE A.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND A.START_DATE <=
ADD_MONTHS(TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘), -1)
AND NVL(A.END_DATE, TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
ADD_MONTHS(TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘), -1) - 1
AND ROWNUM = 1),
‘99‘) AS PRE_LEVEL_FLAG,
--年初级别类型
NVL((SELECT A.FLAG
FROM EPCIS_SAS_LEVEL_HISTORY A
WHERE A.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND A.START_DATE <=
TRUNC(TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘), ‘YY‘)
AND NVL(A.END_DATE,
LAST_DAY(TRUNC(TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘), ‘YY‘))) >=
LAST_DAY(TRUNC(TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘), ‘YY‘))
AND ROWNUM = 1),
‘99‘) AS YEAR_BEGIN_LEVEL_FLAG,
--当月职级代码
NVL((SELECT A.LEVEL_CODE
FROM EPCIS_SAS_LEVEL_HISTORY A
WHERE A.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND A.START_DATE <= TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘)
AND NVL(A.END_DATE, TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) - 1
AND ROWNUM = 1),
‘999‘) AS LEVEL_CODE,
--上月职级代码
NVL((SELECT A.LEVEL_CODE
FROM EPCIS_SAS_LEVEL_HISTORY A
WHERE A.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND A.START_DATE <=
ADD_MONTHS(TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘), -1)
AND NVL(A.END_DATE, TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
ADD_MONTHS(TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘), -1) - 1
AND ROWNUM = 1),
‘999‘) AS PRE_LEVEL_CODE,
--年初级别代码
NVL((SELECT A.LEVEL_CODE
FROM EPCIS_SAS_LEVEL_HISTORY A
WHERE A.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND A.START_DATE <=
TRUNC(TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘), ‘YY‘)
AND NVL(A.END_DATE,
LAST_DAY(TRUNC(TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘), ‘YY‘))) >=
LAST_DAY(TRUNC(TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘), ‘YY‘))
AND ROWNUM = 1),
‘999‘) AS YEAR_BEGIN_LEVEL_CODE,
--入司标志 0--在职老员工,1--新员工,2-当月离职,3--当月之前离职,4-异常
TO_CHAR(CASE
WHEN EPCIS_SAS_EMPLOYEE.ENTER_DATE <
TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘) AND
NVL(EPCIS_SAS_EMPLOYEE.LEAVE_DATE,
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) THEN
0
WHEN TO_CHAR(EPCIS_SAS_EMPLOYEE.ENTER_DATE, ‘YYYYMM‘) =
SUBSTR(‘#IncStart#‘, 1, 6) AND
NVL(EPCIS_SAS_EMPLOYEE.LEAVE_DATE,
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) THEN
1
WHEN TO_CHAR(EPCIS_SAS_EMPLOYEE.LEAVE_DATE, ‘YYYYMM‘) =
SUBSTR(‘#IncStart#‘, 1, 6) AND EPCIS_SAS_EMPLOYEE.ENTER_DATE <
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) THEN
2
WHEN EPCIS_SAS_EMPLOYEE.LEAVE_DATE <
TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘) AND
EPCIS_SAS_EMPLOYEE.ENTER_DATE <
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) THEN
3
ELSE
4
END) AS NEW_ENTER_FLAG,
TO_CHAR(TO_NUMBER(SUBSTR(‘#IncStart#‘, 1, 4)) -
TO_NUMBER(TO_CHAR(EPCIS_SAS_EMPLOYEE.BIRTHDAY, ‘YYYY‘))) AS AGE,
TO_CHAR((SUBSTR(‘#IncStart#‘, 1, 4) -
TO_CHAR(EPCIS_SAS_EMPLOYEE.ENTER_DATE, ‘YYYY‘)) * 12 +
(SUBSTR(‘#IncStart#‘, 5, 2) - TO_CHAR(ENTER_DATE, ‘MM‘))) AS ENTER_COMPANY_MONTHS,
--当月人员渠道
NVL((SELECT A.CHANNEL_TYPE
FROM EPCIS_SAS_LEVEL_HISTORY A
WHERE A.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND A.START_DATE <= TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘)
AND NVL(A.END_DATE, TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) - 1
AND ROWNUM = 1),
EPCIS_SAS_EMPLOYEE.EMPLOYEE_CHANNEL) AS EMPLOYEE_CHANNEL,
--当月人员类别
NVL((SELECT A.CHANNEL_DUTY
FROM EPCIS_SAS_LEVEL_HISTORY A
WHERE A.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND A.START_DATE <= TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘)
AND NVL(A.END_DATE, TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) - 1
AND ROWNUM = 1),
EPCIS_SAS_EMPLOYEE.CHANNEL_DUTY) AS CHANNEL_DUTY,
--当月人员是否改革
NVL((SELECT DECODE(NVL(A.CHANNEL_TYPE, ‘AA‘), ‘AA‘, ‘0‘, ‘N‘)
FROM EPCIS_SAS_LEVEL_HISTORY A
WHERE A.EMPLOYEE_CODE = EPCIS_SAS_EMPLOYEE.EMPLOYEE_CODE
AND A.START_DATE <= TO_DATE(‘#IncStart#‘, ‘YYYYMMDD‘)
AND NVL(A.END_DATE, TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘)) >=
TO_DATE(‘#IncEnd#‘, ‘YYYYMMDD‘) - 1
AND ROWNUM = 1),
EPCIS_SAS_EMPLOYEE.VERSION_FLAG) AS VERSION_FLAG,
EPCIS_SAS_EMPLOYEE.PROPORTY_USE_FLAG,
EPCIS_SAS_EMPLOYEE.ACCIDENT_USE_FLAG
/*EPCIS_SAS_EMPLOYEE.EMPLOYEE_CHANNEL,
EPCIS_SAS_EMPLOYEE.CHANNEL_DUTY,
EPCIS_SAS_EMPLOYEE.VERSION_FLAG*/
FROM EPCIS_SAS_EMPLOYEE
EPCIS_SAS_EMPLOYEE --表的取数sql
SELECT EMPLOYEE_CODE,
EMPLOYEE_NAME,
EMPLOYEE_TYPE,
BIRTHDAY,
SEX,
NATION_CODE,
EDUCATION_CODE,
MARRIAGE_CODE,
CERTIFICATE_TYPE,
CERTIFICATE_NO,
RESIDENCE,
GRANT_NAME,
GRANT_CERTIFICATE_TYPE,
GRANT_CERTIFICATE_NO,
ENTER_DATE,
DEPARTMENT_CODE,
EMPLOYEE_ENGLISH_NAME,
MAJOR_CODE,
TITLE_CODE,
HOBBY,
BLOOD_TYPE,
PARTY_TYPE,
HOME_ADDRESS,
ZIP_CODE,
TEL,
GRANT_ADDRESS,
REGULAR_DATE,
LEAVE_DATE,
EMPLOYEE_DOCUMENT,
REMARK,
PASSWORD,
PASSWORD_MARK,
ROW_ID,
LAST_UPDATE_DATE,
LAST_UPDATE_BY,
CREATION_DATE,
CREATION_BY,
SALARY_COUNT_TYPE,
AGENT_CODE,
IS_AGENT,
TYPE,
SUCCESSOR,
PCIS_DEPTCDE,
DUTY AS DUTY_CODE,
HR_CODE,
ISDUNNER,
PARTTIME_CROSSSALE_FLAG,
PARTTIME_CHANNEL_FLAG,
USE_FLAG,
LAST_GROUP_CODE,
PROPORTY_USE_FLAG,
ACCIDENT_USE_FLAG,
UM_CODE,
VERSION_FLAG,
CHANNEL_DUTY,
EMPLOYEE_CHANNEL,
DUTY_TITLE_CODE
FROM EPCISBASE.SAS_EMPLOYEE
--从头表取数核对报表上的数据,财产险应续
SELECT COUNT(DISTINCT CLIENT_NO) AS CLIENT_NO, --客户编码
SUM(NVL(TO_NUMBER(T.PREMIUM), 0)) AS PREMIUM_RMB
FROM PAS_RENEWAL_PAH T
WHERE T.BATCH_NO >= SUBSTR(‘20150101‘, 1, 4)
AND T.BATCH_NO < SUBSTR(‘20150601‘, 1, 6)
AND T.PRODUCT_TYPE = ‘1‘ --财产险
AND T.BUSINESS_TYPE = ‘2‘
AND ORGAN_CODE = ‘202‘
-- AND TRIM(COST_RATE) IS NOT NULL
任务EpcisSasEmployeeFact01依赖层次 --从调度平台查询
--取数语句
--对此报表数据问题的统一回复
这个因为这个月数据延迟的原因,当清单为客户打优质标识的时候,我们MIS本月最新的变动成本率还没计算出来及时给到清单系统,也就是说清单这个月初为客户打优质标识的时候,用的还是MIS 5月份的变动成本率数据,所以导致这个客户在清单那边还是优质客户,下个月就不会是优质客户了
德芳,麻烦将这个数据延迟的事情通告给机构用户,让他们了解这个优质标识数据延迟的事情
是这样的,14年底如果客户已经不符合优质定义的话,那么14年全年的数都会不含这个客户的,同时14年作为历史数据,在15年不会再变化。
同理,15年所有数据,都会根据每月刷新而变动。
换言之,我们14年年底看MIS中14年的数和现在看14年的数是一样的?--是的
汪婷说的:
提取已续保清单是在几号提的?
因为对于意健险有一个问题就是:他总是发生批改,如果你在发生批改的那两天去提数据,是提取不到的。因为发生批改之后,我们从承保系统去到清单系统,
然后进行数据加工处理需要两条时间。
JOB 命令行脚本
cd C:\Program Files\Ascential\DataStage7.5.3
--开发到开发
(description=(address=(protocol=tcp)(host=epcis.dbcow.paic.com.cn)(port = 1560))(connect_data=(sid = epcis)))
cow_circtrep
"wW=G?3px2v"
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllAcc01
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllAcc02
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllAcc03
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllAcc04
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllAcc05
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllAcc06
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllAcc07
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllAcc08
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllAcc09
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllNl01
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllNl02
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllNl03
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllNl04
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllNl05
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllNl06
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllNl07
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllNl08
dsjob -server 10.31.6.12 -user olapetl -password Paic1234 -run -jobstatus -warn 50 -param SourceDsn=d0pcrpt -param SourceUid=olapman -param SourcePwd=paic1234 -param TargetDsn=d0pcrpt -param TargetUid=olapman -param TargetPwd=paic1234 -param IncStart=20150501 -param IncEnd=20150601 -param ExtractType=M -param $APT_CONFIG_FILE=/wls/dsadm/Ascential/DataStage/Configurations/default.apt PacrptPacrptM EpcisSasPasDestAllNl09