保存进度!
This commit is contained in:
commit
374a87e1ee
@ -37,28 +37,28 @@ CREATE OR REPLACE PACKAGE BODY telsale_pkg IS
|
|||||||
a_end_date);
|
a_end_date);
|
||||||
|
|
||||||
FOR caller_record IN (SELECT *
|
FOR caller_record IN (SELECT *
|
||||||
FROM desktop_archievement_admin.车非每日保费_t)
|
FROM desktop_archievement_admin.坐席车非每日保费_t)
|
||||||
LOOP
|
LOOP
|
||||||
BEGIN
|
BEGIN
|
||||||
DELETE desktop_archievement_admin.车非每日保费 cf
|
DELETE desktop_archievement_admin.坐席车非每日保费 cf
|
||||||
WHERE cf.签单日期 = caller_record.签单日期
|
WHERE cf.签单日期 = caller_record.签单日期
|
||||||
AND cf.部门 = caller_record.部门
|
AND cf.部门 = caller_record.部门
|
||||||
AND cf.经办人n = caller_record.经办人n
|
AND cf.经办人n = caller_record.经办人n
|
||||||
AND cf.坐席工号 = caller_record.坐席工号;
|
AND cf.坐席工号 = caller_record.坐席工号;
|
||||||
EXCEPTION
|
EXCEPTION
|
||||||
WHEN no_data_found THEN
|
WHEN no_data_found THEN
|
||||||
NULL;
|
dbms_output.put_line(caller_record.签单日期 || '无重复数据');
|
||||||
END;
|
END;
|
||||||
|
|
||||||
INSERT INTO desktop_archievement_admin.车非每日保费
|
INSERT INTO desktop_archievement_admin.坐席车非每日保费
|
||||||
VALUES caller_record;
|
VALUES caller_record;
|
||||||
|
|
||||||
END LOOP;
|
END LOOP;
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
EXCEPTION
|
/*EXCEPTION
|
||||||
WHEN OTHERS THEN
|
WHEN OTHERS THEN
|
||||||
NULL;
|
NULL;*/
|
||||||
END;
|
END;
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
@ -359,10 +359,10 @@ CREATE OR REPLACE PACKAGE BODY telsale_pkg IS
|
|||||||
nvl(SUM(融合保费),
|
nvl(SUM(融合保费),
|
||||||
0) 车非融合保费
|
0) 车非融合保费
|
||||||
FROM ff
|
FROM ff
|
||||||
WHERE ff.签单日期 >= to_char(a_start_date,
|
WHERE to_date(ff.签单日期,
|
||||||
'yyyy-mm-dd')
|
'yyyy-mm-dd') >= a_start_date
|
||||||
AND ff.签单日期 <= to_char(a_end_date,
|
AND to_date(ff.签单日期,
|
||||||
'yyyy-mm-dd')
|
'yyyy-mm-dd') < a_end_date
|
||||||
AND bm IN ('续保业务部',
|
AND bm IN ('续保业务部',
|
||||||
'湖里支公司')
|
'湖里支公司')
|
||||||
GROUP BY 签单日期,
|
GROUP BY 签单日期,
|
||||||
|
918
code/db/pkg/telsale_pkg_07-26.pck
Normal file
918
code/db/pkg/telsale_pkg_07-26.pck
Normal file
@ -0,0 +1,918 @@
|
|||||||
|
CREATE OR REPLACE PACKAGE telsale_pkg IS
|
||||||
|
|
||||||
|
-- Author : WANGWEI-202
|
||||||
|
-- Created : 2023/3/10 15:13:34
|
||||||
|
-- Purpose : 桌面霸屏项目基础数据生成包
|
||||||
|
|
||||||
|
PROCEDURE 车非基础数据
|
||||||
|
(
|
||||||
|
a_start_date IN DATE,
|
||||||
|
a_end_date IN DATE
|
||||||
|
);
|
||||||
|
|
||||||
|
PROCEDURE gen_车非临时数据
|
||||||
|
(
|
||||||
|
a_start_date IN DATE,
|
||||||
|
a_end_date IN DATE
|
||||||
|
);
|
||||||
|
|
||||||
|
PROCEDURE 续保基本数据;
|
||||||
|
|
||||||
|
PROCEDURE chefei_daily_job;
|
||||||
|
PROCEDURE xubao_daily_job;
|
||||||
|
|
||||||
|
END telsale_pkg;
|
||||||
|
/
|
||||||
|
CREATE OR REPLACE PACKAGE BODY telsale_pkg IS
|
||||||
|
|
||||||
|
PROCEDURE 车非基础数据
|
||||||
|
(
|
||||||
|
a_start_date IN DATE,
|
||||||
|
a_end_date IN DATE
|
||||||
|
) IS
|
||||||
|
--l_count INTEGER; --已有记录的数量
|
||||||
|
BEGIN
|
||||||
|
--产生临时数据
|
||||||
|
gen_车非临时数据(a_start_date,
|
||||||
|
a_end_date);
|
||||||
|
|
||||||
|
FOR caller_record IN (SELECT *
|
||||||
|
FROM desktop_archievement_admin.坐席车非每日保费_t)
|
||||||
|
LOOP
|
||||||
|
BEGIN
|
||||||
|
DELETE desktop_archievement_admin.坐席车非每日保费 cf
|
||||||
|
WHERE cf.签单日期 = caller_record.签单日期
|
||||||
|
AND cf.部门 = caller_record.部门
|
||||||
|
AND cf.经办人n = caller_record.经办人n
|
||||||
|
AND cf.坐席工号 = caller_record.坐席工号;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN no_data_found THEN
|
||||||
|
dbms_output.put_line(caller_record.签单日期 || '无重复数据');
|
||||||
|
END;
|
||||||
|
|
||||||
|
INSERT INTO desktop_archievement_admin.坐席车非每日保费
|
||||||
|
VALUES caller_record;
|
||||||
|
|
||||||
|
END LOOP;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
/*EXCEPTION
|
||||||
|
WHEN OTHERS THEN
|
||||||
|
NULL;*/
|
||||||
|
END;
|
||||||
|
|
||||||
|
/**********************************************************************/
|
||||||
|
|
||||||
|
PROCEDURE gen_车非临时数据
|
||||||
|
(
|
||||||
|
a_start_date IN DATE,
|
||||||
|
a_end_date IN DATE
|
||||||
|
) IS
|
||||||
|
BEGIN
|
||||||
|
desktop_archievement_admin.clean_temp_data;
|
||||||
|
|
||||||
|
INSERT INTO desktop_archievement_admin.坐席车非每日保费_t
|
||||||
|
WITH aa AS
|
||||||
|
(SELECT to_char(t.signature_date,
|
||||||
|
'yyyy-mm-dd') 签单日期,
|
||||||
|
(to_char(T.signature_date,
|
||||||
|
'yyyy')) the_year,
|
||||||
|
(to_char(T.signature_date,
|
||||||
|
'mm')) the_month,
|
||||||
|
t.policy_no bdh,
|
||||||
|
t.endorsement_no pdh,
|
||||||
|
qt.t_cre tid,
|
||||||
|
QT.B_CRE BTID, -----添加字段
|
||||||
|
e.inception_date qbsj,
|
||||||
|
e.planned_end_date zzsj,
|
||||||
|
pt.premium_amount - nvl(pt.tax_amount,
|
||||||
|
0) bf
|
||||||
|
--,qt.qdbf - nvl(qt.qdbf_tax_amount,0) bf
|
||||||
|
,
|
||||||
|
nt.ecompensation_rate * (pt.premium_amount - nvl(pt.tax_amount,
|
||||||
|
0)) fxbf,
|
||||||
|
z.department_name bm,
|
||||||
|
z.department_code bmdm,
|
||||||
|
CASE
|
||||||
|
WHEN (et.telpartnercode LIKE '%HC%' OR
|
||||||
|
zx.workerno IN (SELECT code
|
||||||
|
FROM datacenter.dc_lsj_zx_hc)) THEN
|
||||||
|
'海沧丰骏'
|
||||||
|
ELSE
|
||||||
|
''
|
||||||
|
END 是否丰骏,
|
||||||
|
nvl(zx.workerno,
|
||||||
|
et.telpartnercode) 坐席工号,
|
||||||
|
(CASE
|
||||||
|
WHEN nvl(zx.workerno,
|
||||||
|
et.telpartnercode) = 'DX001' AND
|
||||||
|
xx.staff_name LIKE '%建发凯迪%' THEN
|
||||||
|
'林伟华'
|
||||||
|
WHEN nvl(zx.workerno,
|
||||||
|
et.telpartnercode) = 'DX001' AND
|
||||||
|
xx.staff_name NOT LIKE '%建发凯迪%' THEN
|
||||||
|
'其他'
|
||||||
|
ELSE
|
||||||
|
to_char(ys.坐席姓名)
|
||||||
|
END) 坐席名称,
|
||||||
|
YS.团队 坐席团队,
|
||||||
|
nvl(YS.团队,
|
||||||
|
y.section_office_name) 科室N,
|
||||||
|
nvl((CASE
|
||||||
|
WHEN nvl(zx.workerno,
|
||||||
|
et.telpartnercode) = 'DX001' AND
|
||||||
|
xx.staff_name LIKE '%建发凯迪%' THEN
|
||||||
|
'林伟华'
|
||||||
|
WHEN nvl(zx.workerno,
|
||||||
|
et.telpartnercode) = 'DX001' AND
|
||||||
|
xx.staff_name NOT LIKE '%建发凯迪%' THEN
|
||||||
|
'其他'
|
||||||
|
ELSE
|
||||||
|
to_char(ys.坐席姓名)
|
||||||
|
END),
|
||||||
|
xx.staff_name) 经办人N
|
||||||
|
FROM idst0.auto_agreement_request_t t
|
||||||
|
LEFT JOIN idst0.auto_agreement_t e
|
||||||
|
ON e.policy_no = t.policy_no
|
||||||
|
LEFT JOIN idst0.motorised_vehicle_t v
|
||||||
|
ON v.policy_no = e.policy_no
|
||||||
|
LEFT JOIN idst0.auto_premium_t pt
|
||||||
|
ON pt.policy_no = t.policy_no
|
||||||
|
AND pt.endorsement_no = t.endorsement_no
|
||||||
|
LEFT JOIN ywglxt.w_dxbd_i i
|
||||||
|
ON e.policy_no = i.bdh
|
||||||
|
LEFT JOIN idst0.rydm_t xx
|
||||||
|
ON xx.staff_code = nvl(i.zhjywy,
|
||||||
|
e.operator_code)
|
||||||
|
LEFT JOIN idst0.ks_t y
|
||||||
|
ON y.section_office_code = nvl(xx.section_office_code,
|
||||||
|
e.section_office_code)
|
||||||
|
LEFT JOIN idst0.bm_t z
|
||||||
|
ON z.department_code = nvl(xx.department_code,
|
||||||
|
e.department_code)
|
||||||
|
--left join datacenter.dc_cx_csteam ct on ct.jbrcode = xx.staff_code
|
||||||
|
LEFT JOIN idst0.auto_new_product_info_t nt
|
||||||
|
ON nt.policy_no = t.policy_no
|
||||||
|
AND nt.endorsement_no = t.endorsement_no
|
||||||
|
--left join ywglxt.q_auto_agreement_extend_t qe on qe.policy_no = e.policy_no
|
||||||
|
LEFT JOIN ywglxt.q_auto_agreement_t qt
|
||||||
|
ON qt.policy_no = e.policy_no
|
||||||
|
LEFT JOIN datacenter.dc_yangg_qdcode qd
|
||||||
|
ON qd.code = e.selling_channel_type
|
||||||
|
LEFT JOIN datacenter.dc_tb_jc_c_tag cl
|
||||||
|
ON cl.保单号 = e.policy_no
|
||||||
|
LEFT JOIN datacenter.dc_yangg_basecode_teams fg
|
||||||
|
ON fg.bm = z.department_name
|
||||||
|
AND fg.ks = y.section_office_name
|
||||||
|
--left join idst0.t_sell_policy_autobase_t zx on zx.policy_no=e.policy_no
|
||||||
|
--left join idst0.auto_agreement_extend_t et on et.policy_no = e.policy_no
|
||||||
|
LEFT JOIN idst0.auto_agreement_extend_t et
|
||||||
|
ON et.policy_no = e.policy_no
|
||||||
|
LEFT JOIN idst0.t_sell_policy_autobase_t zx
|
||||||
|
ON zx.policy_no = e.policy_no
|
||||||
|
LEFT JOIN datacenter.dc_YZH_ZXYS YS
|
||||||
|
ON YS.坐席工号 = nvl(zx.workerno,
|
||||||
|
et.telpartnercode)
|
||||||
|
--left join v_lsj_dimian dm on dm.vin=v.vin and e.selling_channel_type='25' and dm.MEMO like'%地面续保%'
|
||||||
|
--left join datacenter.dc_lsj_zx_team zt on zt.name=coalesce(zc.name,zc1.name,bc.name,dm.JBRMC)
|
||||||
|
WHERE t.signature_date >= to_date('2023-01-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND t.signature_date < to_date(to_char(SYSDATE - 1,
|
||||||
|
'yyyy-mm-dd') || ' 23:59:59',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
--and t.endorsement_no = '无'
|
||||||
|
AND e.policy_status = '1' --条件:保单有效
|
||||||
|
AND qt.tflag = '0' --条件:类型为个人
|
||||||
|
AND qt.usage_xm = '家庭自用车'
|
||||||
|
--条件:单程提车、摩托车、拖拉机
|
||||||
|
--and e.policy_no in ('AXIMC90Y1419B038594J','AXIMC90CTP19B039593R','AXIMC04CTP19B013473X')
|
||||||
|
AND e.planned_end_date - e.inception_date >= 360
|
||||||
|
--条件:保单周期
|
||||||
|
)
|
||||||
|
-----添加字段
|
||||||
|
,
|
||||||
|
dd2 AS
|
||||||
|
(SELECT 签单日期,
|
||||||
|
the_year,
|
||||||
|
the_month,
|
||||||
|
bm,
|
||||||
|
bmdm,
|
||||||
|
坐席工号,
|
||||||
|
坐席名称,
|
||||||
|
坐席团队,
|
||||||
|
科室N,
|
||||||
|
经办人N,
|
||||||
|
CASE
|
||||||
|
WHEN pdh = '无' THEN
|
||||||
|
tid
|
||||||
|
END tid,
|
||||||
|
to_number('1') 客户数,
|
||||||
|
COUNT(DISTINCT CASE
|
||||||
|
WHEN pdh = '无' THEN
|
||||||
|
bdh
|
||||||
|
END) 保单数,
|
||||||
|
SUM(bf) 保费
|
||||||
|
FROM (SELECT DISTINCT *
|
||||||
|
FROM aa) aa
|
||||||
|
GROUP BY bm,
|
||||||
|
bmdm,
|
||||||
|
CASE
|
||||||
|
WHEN pdh = '无' THEN
|
||||||
|
tid
|
||||||
|
END,
|
||||||
|
the_year,
|
||||||
|
the_month,
|
||||||
|
BTID,
|
||||||
|
坐席工号,
|
||||||
|
坐席名称,
|
||||||
|
坐席团队,
|
||||||
|
签单日期,
|
||||||
|
科室N,
|
||||||
|
经办人N
|
||||||
|
UNION
|
||||||
|
SELECT 签单日期,
|
||||||
|
the_year,
|
||||||
|
the_month,
|
||||||
|
bm,
|
||||||
|
bmdm,
|
||||||
|
坐席工号,
|
||||||
|
坐席名称,
|
||||||
|
坐席团队,
|
||||||
|
科室N,
|
||||||
|
经办人N,
|
||||||
|
CASE
|
||||||
|
WHEN btid = tid THEN
|
||||||
|
''
|
||||||
|
ELSE
|
||||||
|
btid
|
||||||
|
END btid,
|
||||||
|
to_number('0') 客户数,
|
||||||
|
to_number('0') 保单数,
|
||||||
|
to_number('0') 保费
|
||||||
|
FROM (SELECT DISTINCT *
|
||||||
|
FROM aa) aa),
|
||||||
|
DD AS
|
||||||
|
(SELECT *
|
||||||
|
FROM DD2
|
||||||
|
WHERE TID IS NOT NULL)
|
||||||
|
--select * from dd
|
||||||
|
,
|
||||||
|
bb AS
|
||||||
|
(SELECT DISTINCT q.policy_no bdh,
|
||||||
|
q.endorsement_no pdh,
|
||||||
|
qna.t_cre tid,
|
||||||
|
to_number(to_char(q.signature_date,
|
||||||
|
'yyyy')) || '年' nf,
|
||||||
|
(to_char(q.signature_date,
|
||||||
|
'mm')) mm_f,
|
||||||
|
to_char(q.signature_date,
|
||||||
|
'dd') || '日' dd,
|
||||||
|
q.signature_date sj,
|
||||||
|
round((pt.premium_amount - nvl(pt.taxamount,
|
||||||
|
0)) * c.rate / 100,
|
||||||
|
2) bf,
|
||||||
|
z.department_name bm
|
||||||
|
FROM idst0.nonauto_agreement_request_t q
|
||||||
|
LEFT JOIN idst0.nonauto_agreement_t e
|
||||||
|
ON e.policy_no = q.policy_no
|
||||||
|
LEFT JOIN idst0.nonauto_premium_t pt
|
||||||
|
ON pt.endorsement_no = q.endorsement_no
|
||||||
|
AND pt.policy_no = q.policy_no
|
||||||
|
LEFT JOIN idst0.reinsurance_t r
|
||||||
|
ON r.reinsurance_policy_no = e.policy_no
|
||||||
|
LEFT JOIN idst0.exrate_month_t c
|
||||||
|
ON pt.currency_code = c.bzh
|
||||||
|
AND to_char(q.signature_date,
|
||||||
|
'YYYY') = c.theyear
|
||||||
|
AND to_char(q.signature_date,
|
||||||
|
'fmmm') = c.themonth
|
||||||
|
|
||||||
|
LEFT JOIN idst0.rydm_t x
|
||||||
|
ON x.staff_code = e.operator_code
|
||||||
|
LEFT JOIN idst0.ks_t y
|
||||||
|
ON y.section_office_code = x.section_office_code
|
||||||
|
LEFT JOIN idst0.bm_t z
|
||||||
|
ON z.department_code = x.department_code
|
||||||
|
LEFT JOIN ywglxt.q_nonauto_agreement_t qna
|
||||||
|
ON qna.policy_no = q.policy_no
|
||||||
|
LEFT JOIN datacenter.dc_yangg_gkxzh gk
|
||||||
|
ON gk.product_code = e.product_code --分散型险种
|
||||||
|
--left join datacenter.dc_yangg_zbxzh zb on zb.product_code = e.product_code --政保险种
|
||||||
|
LEFT JOIN dd
|
||||||
|
ON dd.tid = qna.t_cre
|
||||||
|
WHERE qna.tflag = '0'
|
||||||
|
AND (CASE
|
||||||
|
WHEN q.endorsement_no != '无' AND
|
||||||
|
round((pt.premium_amount - nvl(pt.taxamount,
|
||||||
|
0)) * c.rate / 100,
|
||||||
|
2) != 0 THEN
|
||||||
|
'是'
|
||||||
|
END) IS NULL
|
||||||
|
--and q.endorsement_no = '无'
|
||||||
|
AND e.policy_status = '1'
|
||||||
|
AND gk.product_code IS NOT NULL
|
||||||
|
AND (e.product_code LIKE '2%' OR e.product_code LIKE '1106%' --意健 --责任
|
||||||
|
OR e.product_code LIKE '1107%' OR e.product_code LIKE '1108%' OR e.product_code LIKE '1307%' OR e.product_code LIKE '1304A400%' --家财
|
||||||
|
|
||||||
|
)
|
||||||
|
--and e.product_code not in ('22KC9800')
|
||||||
|
AND q.signature_date >= to_date('2023-01-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND q.signature_date < to_date(to_char(SYSDATE - 1,
|
||||||
|
'yyyy-mm-dd') || ' 23:59:59',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND e.planned_end_date - e.inception_date >= 90
|
||||||
|
AND dd.tid IS NOT NULL
|
||||||
|
--车险个人客户)
|
||||||
|
)
|
||||||
|
--SELECT * FROM BB
|
||||||
|
,
|
||||||
|
cc AS
|
||||||
|
(SELECT mm_f,
|
||||||
|
tid 融合证件,
|
||||||
|
COUNT(DISTINCT bdh) 融合保数,
|
||||||
|
SUM(bf) 融合保费
|
||||||
|
FROM bb
|
||||||
|
GROUP BY tid,
|
||||||
|
mm_f),
|
||||||
|
ff AS
|
||||||
|
(SELECT dd.*,
|
||||||
|
cc.*
|
||||||
|
FROM dd
|
||||||
|
LEFT JOIN cc
|
||||||
|
ON cc.融合证件 = dd.tid
|
||||||
|
AND cc.mm_f = dd.the_month) --OR cc.融合证件 = dd.btid
|
||||||
|
--select * from ff
|
||||||
|
SELECT to_date(签单日期,
|
||||||
|
'yyyy-mm-dd') 签单日期,
|
||||||
|
the_year 年份,
|
||||||
|
the_month 月份,
|
||||||
|
bm 部门,
|
||||||
|
bmdm 部门代码,
|
||||||
|
科室N,
|
||||||
|
经办人N,
|
||||||
|
坐席工号,
|
||||||
|
坐席名称,
|
||||||
|
坐席团队,
|
||||||
|
nvl(SUM(保费),
|
||||||
|
0) 车险个人客户保费,
|
||||||
|
nvl(SUM(融合保费),
|
||||||
|
0) 车非融合保费
|
||||||
|
FROM ff
|
||||||
|
WHERE to_date(ff.签单日期,
|
||||||
|
'yyyy-mm-dd') >= a_start_date
|
||||||
|
AND to_date(ff.签单日期,
|
||||||
|
'yyyy-mm-dd') < a_end_date
|
||||||
|
AND bm IN ('续保业务部',
|
||||||
|
'湖里支公司')
|
||||||
|
GROUP BY 签单日期,
|
||||||
|
the_year,
|
||||||
|
the_month,
|
||||||
|
bm,
|
||||||
|
bmdm,
|
||||||
|
坐席工号,
|
||||||
|
坐席名称,
|
||||||
|
坐席团队,
|
||||||
|
科室N,
|
||||||
|
经办人N
|
||||||
|
ORDER BY 部门,
|
||||||
|
坐席名称;
|
||||||
|
COMMIT;
|
||||||
|
END;
|
||||||
|
|
||||||
|
/**********************************************************************/
|
||||||
|
|
||||||
|
PROCEDURE 续保基本数据 IS
|
||||||
|
BEGIN
|
||||||
|
--清理旧数据
|
||||||
|
desktop_archievement_admin.clean_mensual_renewal;
|
||||||
|
|
||||||
|
--生成新数据
|
||||||
|
INSERT INTO desktop_archievement_admin.坐席续保统计
|
||||||
|
WITH cc AS
|
||||||
|
(SELECT pt.policy_no policy_no,
|
||||||
|
SUM(pt.premium_amount) premium_amount,
|
||||||
|
SUM(pt.tax_amount) tax_amount
|
||||||
|
FROM idst0.auto_premium_t pt
|
||||||
|
GROUP BY pt.policy_no)
|
||||||
|
|
||||||
|
,
|
||||||
|
bb AS
|
||||||
|
(SELECT t.policy_no 保单号,
|
||||||
|
(CASE
|
||||||
|
WHEN e.product_code LIKE '1102%' AND
|
||||||
|
e.product_code NOT LIKE '110224%' AND
|
||||||
|
e.product_code != '11026000' THEN
|
||||||
|
'机动车险保险'
|
||||||
|
WHEN e.product_code LIKE '1101%' OR
|
||||||
|
e.product_code LIKE '1301%' OR
|
||||||
|
e.product_code LIKE '11110000%' THEN
|
||||||
|
'财产险'
|
||||||
|
WHEN e.product_code LIKE '1107%' OR
|
||||||
|
e.product_code LIKE '1307%' OR
|
||||||
|
e.product_code LIKE '1304A400%' THEN
|
||||||
|
'责任险'
|
||||||
|
WHEN e.product_code LIKE '1106%' OR
|
||||||
|
e.product_code LIKE '51015700' THEN
|
||||||
|
'家财险'
|
||||||
|
WHEN (e.product_code LIKE '1104%' OR e.product_code LIKE '1204%' OR e.product_code LIKE '13040000%') AND
|
||||||
|
e.product_code NOT LIKE '120404%' THEN
|
||||||
|
'货运险'
|
||||||
|
WHEN e.product_code LIKE '1203%' OR
|
||||||
|
e.product_code LIKE '1103%' OR
|
||||||
|
e.product_code LIKE '120404%' THEN
|
||||||
|
'船舶险'
|
||||||
|
WHEN e.product_code LIKE '1305%' THEN
|
||||||
|
'工程险'
|
||||||
|
WHEN e.product_code LIKE '111%' AND
|
||||||
|
e.product_code NOT LIKE '11110000%' THEN
|
||||||
|
'农业险'
|
||||||
|
WHEN e.product_code LIKE '1109%' OR
|
||||||
|
e.product_code LIKE '1309%' THEN
|
||||||
|
'保证保险'
|
||||||
|
WHEN e.product_code LIKE '1312%' THEN
|
||||||
|
'特殊风险'
|
||||||
|
WHEN e.product_code LIKE '1308%' THEN
|
||||||
|
'信用险'
|
||||||
|
WHEN e.product_code LIKE '23%' THEN
|
||||||
|
'意外险'
|
||||||
|
WHEN e.product_code LIKE '22%' THEN
|
||||||
|
'健康险'
|
||||||
|
WHEN e.product_code LIKE '110224%' OR
|
||||||
|
e.product_code = '11026000' THEN
|
||||||
|
'交强险'
|
||||||
|
ELSE
|
||||||
|
'未分配'
|
||||||
|
END) AS 险种大类
|
||||||
|
FROM idst0.auto_agreement_request_t t
|
||||||
|
LEFT JOIN idst0.auto_agreement_t e
|
||||||
|
ON e.policy_no = t.policy_no)
|
||||||
|
|
||||||
|
,
|
||||||
|
aa1 AS
|
||||||
|
(SELECT a.policy_no 旧保单,
|
||||||
|
a.selling_shop_code 车商代码,
|
||||||
|
a.planned_end_date 到期时间,
|
||||||
|
CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2022' AND
|
||||||
|
a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN
|
||||||
|
'个车专业化销售一科'
|
||||||
|
WHEN a.planned_end_date > to_date('2023-04-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss') AND
|
||||||
|
(a.selling_shop_code || a.tel_sale_4s_code IN ('00EA',
|
||||||
|
'00F1',
|
||||||
|
'00G9')) THEN
|
||||||
|
'个车专业化销售一科'
|
||||||
|
ELSE
|
||||||
|
nvl(dt.科室名称,
|
||||||
|
z.section_office_name)
|
||||||
|
END 科室,
|
||||||
|
(CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2023' AND
|
||||||
|
nvl(dt.部门,
|
||||||
|
y.department_name) NOT LIKE '湖里支公司' and(cd.memo LIKE '%深圳%' OR
|
||||||
|
cd.memo LIKE '%地面%' )and v.vehicle_brand IN ('特斯拉',
|
||||||
|
'蔚来',
|
||||||
|
'理想',
|
||||||
|
'小鹏',
|
||||||
|
'极氪',
|
||||||
|
'极狐',
|
||||||
|
'AITO',
|
||||||
|
'ARCFOX极狐',
|
||||||
|
'特斯拉(中国)',
|
||||||
|
'特斯拉(中国)') AND
|
||||||
|
v.vin NOT IN ('LJ1E6A2UXL7744108',
|
||||||
|
'LW433B10XL1001411',
|
||||||
|
'LJ1E6A3U2L7742089',
|
||||||
|
'L1NSPGHB0MA002652') THEN
|
||||||
|
'新能源车事业发展中心厦门分中心'
|
||||||
|
WHEN (CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2022' AND
|
||||||
|
a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN
|
||||||
|
'集美支公司'
|
||||||
|
ELSE
|
||||||
|
nvl(dt.部门,
|
||||||
|
y.department_name)
|
||||||
|
END) = '湖里支公司' THEN
|
||||||
|
(CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2022' AND
|
||||||
|
a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN
|
||||||
|
'集美支公司'
|
||||||
|
ELSE
|
||||||
|
nvl(dt.部门,
|
||||||
|
y.department_name)
|
||||||
|
END)
|
||||||
|
WHEN (cd.memo LIKE '%地面%' OR
|
||||||
|
cd.memo LIKE '%深圳%' ) THEN
|
||||||
|
'续保业务部'
|
||||||
|
WHEN a.planned_end_date > to_date('2023-04-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss') AND
|
||||||
|
(a.selling_shop_code || a.tel_sale_4s_code IN ('00EA',
|
||||||
|
'00F1',
|
||||||
|
'00G9')) THEN
|
||||||
|
'同安支公司'
|
||||||
|
ELSE
|
||||||
|
(CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2022' AND
|
||||||
|
a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN
|
||||||
|
'集美支公司'
|
||||||
|
ELSE
|
||||||
|
nvl(dt.部门,
|
||||||
|
y.department_name)
|
||||||
|
END)
|
||||||
|
END) 责任部门,
|
||||||
|
qa.USAGE_XM 使用性质,
|
||||||
|
decode(qa.bd_type,
|
||||||
|
'1',
|
||||||
|
'单交强',
|
||||||
|
'2',
|
||||||
|
'单商业',
|
||||||
|
'3',
|
||||||
|
'交商共保',
|
||||||
|
'其它') 保单类型,
|
||||||
|
(CASE
|
||||||
|
WHEN (qa.bd_type = '1' AND nt.ecompensation_rate > 1) THEN
|
||||||
|
'是'
|
||||||
|
END) 高预赔,
|
||||||
|
x.staff_name AS 经办,
|
||||||
|
bb.险种大类,
|
||||||
|
cc.signature_date 新保单签发时间,
|
||||||
|
(SELECT hmd.管控类型
|
||||||
|
FROM (SELECT DISTINCT *
|
||||||
|
FROM dc_lsj_xb_hmd) hmd
|
||||||
|
WHERE hmd.vin = v.vin) 管控类型
|
||||||
|
|
||||||
|
FROM idst0.auto_agreement_t a
|
||||||
|
LEFT JOIN bb
|
||||||
|
ON bb.保单号 = a.policy_no
|
||||||
|
LEFT JOIN ywglxt.w_dxbd_i i
|
||||||
|
ON a.policy_no = i.bdh
|
||||||
|
LEFT JOIN idst0.motorised_vehicle_t v
|
||||||
|
ON a.policy_no = v.policy_no
|
||||||
|
LEFT JOIN ywglxt.q_auto_agreement_t qa
|
||||||
|
ON qa.policy_no = a.policy_no
|
||||||
|
|
||||||
|
LEFT JOIN idst0.auto_new_product_info_t nt
|
||||||
|
ON nt.policy_no = a.policy_no
|
||||||
|
AND nt.endorsement_no = '无'
|
||||||
|
LEFT JOIN idst0.rydm_t x
|
||||||
|
ON x.staff_code = nvl(upper(i.zhjywy),
|
||||||
|
a.operator_code)
|
||||||
|
LEFT JOIN idst0.bm_t y
|
||||||
|
ON x.department_code = y.department_code
|
||||||
|
LEFT JOIN idst0.ks_t z
|
||||||
|
ON x.section_office_code = z.section_office_code
|
||||||
|
LEFT JOIN cc pt
|
||||||
|
ON pt.policy_no = a.policy_no
|
||||||
|
LEFT JOIN (SELECT DISTINCT aa.policy_no,
|
||||||
|
vv.vin,
|
||||||
|
aa.inception_date,
|
||||||
|
t.signature_date,
|
||||||
|
(pt.premium_amount - nvl(pt.tax_amount,
|
||||||
|
0)) qdbf,
|
||||||
|
(CASE
|
||||||
|
WHEN aa.inception_date - aa.issue_date >= '30' THEN
|
||||||
|
vv.vin
|
||||||
|
END) if30,
|
||||||
|
bb.险种大类
|
||||||
|
FROM idst0.auto_agreement_t aa
|
||||||
|
LEFT JOIN bb
|
||||||
|
ON bb.保单号 = aa.policy_no
|
||||||
|
LEFT JOIN idst0.motorised_vehicle_t vv
|
||||||
|
ON vv.policy_no = aa.policy_no
|
||||||
|
LEFT JOIN idst0.auto_agreement_request_t t
|
||||||
|
ON t.policy_no = aa.policy_no
|
||||||
|
AND t.endorsement_no = '无'
|
||||||
|
LEFT JOIN idst0.auto_premium_t pt
|
||||||
|
ON pt.policy_no = aa.policy_no
|
||||||
|
AND pt.endorsement_no = '无'
|
||||||
|
WHERE aa.policy_no = vv.policy_no
|
||||||
|
AND aa.policy_status = '1' --and aa.product_code not in ('11022400','11023900','11024000','11024600','11026000')
|
||||||
|
AND aa.branch_company_code = '3080100'
|
||||||
|
AND (pt.premium_amount - nvl(pt.tax_amount,
|
||||||
|
0)) > 100
|
||||||
|
AND aa.inception_date >= to_date('2022-12-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND aa.inception_date < to_date('2023-11-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND aa.branch_company_code = vv.branch_company_code) cc
|
||||||
|
ON (cc.vin = v.vin AND cc.险种大类 = bb.险种大类)
|
||||||
|
AND cc.inception_date > a.planned_end_date - 30 --时间限制放宽为30天
|
||||||
|
LEFT JOIN dc_yangg_cx_dianxiaodoudi cd
|
||||||
|
ON cd.policy_no = a.policy_no
|
||||||
|
LEFT JOIN dc_tb_jc_c_tag dt
|
||||||
|
ON dt.保单号 = a.policy_no
|
||||||
|
LEFT JOIN idst0.auto_agreement_t aa
|
||||||
|
ON aa.policy_no = cc.policy_no
|
||||||
|
LEFT JOIN cc pt1
|
||||||
|
ON pt1.policy_no = aa.policy_no
|
||||||
|
WHERE a.policy_status = '1'
|
||||||
|
AND a.planned_end_date - a.inception_date > 270
|
||||||
|
AND a.planned_end_date >= to_date('2023-01-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND a.planned_end_date < to_date('2023-10-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')),
|
||||||
|
aa2 AS
|
||||||
|
(SELECT a.policy_no 旧保单,
|
||||||
|
a.selling_shop_code 车商代码,
|
||||||
|
a.planned_end_date 到期时间,
|
||||||
|
CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2022' AND
|
||||||
|
a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN
|
||||||
|
'个车专业化销售一科'
|
||||||
|
WHEN a.planned_end_date > to_date('2023-04-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss') AND
|
||||||
|
(a.selling_shop_code || a.tel_sale_4s_code IN ('00EA',
|
||||||
|
'00F1',
|
||||||
|
'00G9')) THEN
|
||||||
|
'个车专业化销售一科'
|
||||||
|
ELSE
|
||||||
|
nvl(dt.科室名称,
|
||||||
|
z.section_office_name)
|
||||||
|
END 科室,
|
||||||
|
(CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2023' AND
|
||||||
|
nvl(dt.部门,
|
||||||
|
y.department_name) NOT LIKE '湖里支公司' and(cd.memo LIKE '%深圳%' OR
|
||||||
|
cd.memo LIKE '%地面%' )and v.vehicle_brand IN ('特斯拉',
|
||||||
|
'蔚来',
|
||||||
|
'理想',
|
||||||
|
'小鹏',
|
||||||
|
'极氪',
|
||||||
|
'极狐',
|
||||||
|
'AITO',
|
||||||
|
'ARCFOX极狐',
|
||||||
|
'特斯拉(中国)',
|
||||||
|
'特斯拉(中国)') AND
|
||||||
|
v.vin NOT IN ('LJ1E6A2UXL7744108',
|
||||||
|
'LW433B10XL1001411',
|
||||||
|
'LJ1E6A3U2L7742089',
|
||||||
|
'L1NSPGHB0MA002652') THEN
|
||||||
|
'新能源车事业发展中心厦门分中心'
|
||||||
|
WHEN (CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2022' AND
|
||||||
|
a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN
|
||||||
|
'集美支公司'
|
||||||
|
ELSE
|
||||||
|
nvl(dt.部门,
|
||||||
|
y.department_name)
|
||||||
|
END) = '湖里支公司' THEN
|
||||||
|
(CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2022' AND
|
||||||
|
a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN
|
||||||
|
'集美支公司'
|
||||||
|
ELSE
|
||||||
|
nvl(dt.部门,
|
||||||
|
y.department_name)
|
||||||
|
END)
|
||||||
|
WHEN (cd.memo LIKE '%地面%' OR
|
||||||
|
cd.memo LIKE '%深圳%' ) THEN
|
||||||
|
'续保业务部'
|
||||||
|
WHEN a.planned_end_date > to_date('2023-04-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss') AND
|
||||||
|
(a.selling_shop_code || a.tel_sale_4s_code IN ('00EA',
|
||||||
|
'00F1',
|
||||||
|
'00G9')) THEN
|
||||||
|
'同安支公司'
|
||||||
|
ELSE
|
||||||
|
(CASE
|
||||||
|
WHEN to_number(to_char(a.planned_end_date,
|
||||||
|
'yyyy')) = '2022' AND
|
||||||
|
a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN
|
||||||
|
'集美支公司'
|
||||||
|
ELSE
|
||||||
|
nvl(dt.部门,
|
||||||
|
y.department_name)
|
||||||
|
END)
|
||||||
|
END) 责任部门,
|
||||||
|
qa.USAGE_XM 使用性质,
|
||||||
|
decode(qa.bd_type,
|
||||||
|
'1',
|
||||||
|
'单交强',
|
||||||
|
'2',
|
||||||
|
'单商业',
|
||||||
|
'3',
|
||||||
|
'交商共保',
|
||||||
|
'其它') 保单类型,
|
||||||
|
(CASE
|
||||||
|
WHEN (qa.bd_type = '1' AND nt.ecompensation_rate > 1) THEN
|
||||||
|
'是'
|
||||||
|
END) 高预赔,
|
||||||
|
x.staff_name AS 经办,
|
||||||
|
bb.险种大类,
|
||||||
|
cc.signature_date 新保单签发时间,
|
||||||
|
(SELECT hmd.管控类型
|
||||||
|
FROM (SELECT DISTINCT *
|
||||||
|
FROM dc_lsj_xb_hmd) hmd
|
||||||
|
WHERE hmd.vin = v.vin) 管控类型
|
||||||
|
|
||||||
|
FROM idst0.auto_agreement_t a
|
||||||
|
LEFT JOIN bb
|
||||||
|
ON bb.保单号 = a.policy_no
|
||||||
|
LEFT JOIN ywglxt.w_dxbd_i i
|
||||||
|
ON a.policy_no = i.bdh
|
||||||
|
LEFT JOIN idst0.motorised_vehicle_t v
|
||||||
|
ON a.policy_no = v.policy_no
|
||||||
|
LEFT JOIN ywglxt.q_auto_agreement_t qa
|
||||||
|
ON qa.policy_no = a.policy_no
|
||||||
|
LEFT JOIN idst0.auto_new_product_info_t nt
|
||||||
|
ON nt.policy_no = a.policy_no
|
||||||
|
AND nt.endorsement_no = '无'
|
||||||
|
LEFT JOIN idst0.rydm_t x
|
||||||
|
ON x.staff_code = nvl(upper(i.zhjywy),
|
||||||
|
a.operator_code)
|
||||||
|
LEFT JOIN idst0.bm_t y
|
||||||
|
ON x.department_code = y.department_code
|
||||||
|
LEFT JOIN idst0.ks_t z
|
||||||
|
ON x.section_office_code = z.section_office_code
|
||||||
|
LEFT JOIN cc pt
|
||||||
|
ON pt.policy_no = a.policy_no
|
||||||
|
LEFT JOIN (SELECT DISTINCT aa.policy_no,
|
||||||
|
vv.vin,
|
||||||
|
aa.inception_date,
|
||||||
|
t.signature_date,
|
||||||
|
(pt.premium_amount - nvl(pt.tax_amount,
|
||||||
|
0)) qdbf,
|
||||||
|
(CASE
|
||||||
|
WHEN aa.inception_date - aa.issue_date >= '30' THEN
|
||||||
|
vv.vin
|
||||||
|
END) if30,
|
||||||
|
bb.险种大类
|
||||||
|
FROM idst0.auto_agreement_t aa
|
||||||
|
LEFT JOIN bb
|
||||||
|
ON bb.保单号 = aa.policy_no
|
||||||
|
LEFT JOIN idst0.motorised_vehicle_t vv
|
||||||
|
ON vv.policy_no = aa.policy_no
|
||||||
|
LEFT JOIN idst0.auto_agreement_request_t t
|
||||||
|
ON t.policy_no = aa.policy_no
|
||||||
|
AND t.endorsement_no = '无'
|
||||||
|
LEFT JOIN idst0.auto_premium_t pt
|
||||||
|
ON pt.policy_no = aa.policy_no
|
||||||
|
AND pt.endorsement_no = '无'
|
||||||
|
WHERE aa.policy_no = vv.policy_no
|
||||||
|
AND aa.policy_status = '1' --and aa.product_code not in ('11022400','11023900','11024000','11024600','11026000')
|
||||||
|
AND aa.branch_company_code = '3080100'
|
||||||
|
AND (pt.premium_amount - nvl(pt.tax_amount,
|
||||||
|
0)) > 100
|
||||||
|
AND aa.inception_date >= to_date('2022-12-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND aa.inception_date < to_date('2023-11-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND aa.branch_company_code = vv.branch_company_code) cc
|
||||||
|
ON (cc.vin = v.vin AND cc.险种大类 = bb.险种大类)
|
||||||
|
AND cc.inception_date > a.planned_end_date - 30 --时间限制放宽为30天
|
||||||
|
LEFT JOIN dc_yangg_cx_dianxiaodoudi cd
|
||||||
|
ON cd.policy_no = a.policy_no
|
||||||
|
LEFT JOIN dc_tb_jc_c_tag dt
|
||||||
|
ON dt.保单号 = a.policy_no
|
||||||
|
LEFT JOIN idst0.auto_agreement_t aa
|
||||||
|
ON aa.policy_no = cc.policy_no
|
||||||
|
LEFT JOIN cc pt1
|
||||||
|
ON pt1.policy_no = aa.policy_no
|
||||||
|
WHERE a.policy_status = '1'
|
||||||
|
AND a.planned_end_date - a.inception_date > 270
|
||||||
|
AND a.planned_end_date >= to_date('2023-10-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND a.planned_end_date < to_date('2024-01-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss'))
|
||||||
|
|
||||||
|
,
|
||||||
|
aa3 AS
|
||||||
|
(SELECT DISTINCT *
|
||||||
|
FROM aa1
|
||||||
|
UNION ALL (SELECT DISTINCT *
|
||||||
|
FROM aa2))
|
||||||
|
|
||||||
|
,
|
||||||
|
AA AS
|
||||||
|
(SELECT AA3.*,
|
||||||
|
nvl(zx.workerno,
|
||||||
|
et.telpartnercode) 坐席工号,
|
||||||
|
(CASE WHEN nvl(zx.workerno,
|
||||||
|
et.telpartnercode) =
|
||||||
|
'DX001' AND aa3.经办 LIKE
|
||||||
|
'%建发凯迪%' THEN
|
||||||
|
'林伟华' WHEN nvl(zx.workerno,
|
||||||
|
et.telpartnercode) =
|
||||||
|
'DX001' AND aa3.经办 NOT LIKE
|
||||||
|
'%建发凯迪%' THEN
|
||||||
|
'其他' ELSE to_char
|
||||||
|
(ys.坐席姓名) END) 坐席名称,
|
||||||
|
YS.团队 坐席团队 FROM AA3 LEFT JOIN idst0.auto_agreement_extend_t et ON et.policy_no = AA3.旧保单 LEFT JOIN idst0.t_sell_policy_autobase_t zx ON zx.policy_no = AA3.旧保单 LEFT JOIN dc_YZH_ZXYS YS ON YS.坐席工号 = nvl(zx.workerno,
|
||||||
|
et.telpartnercode))
|
||||||
|
|
||||||
|
,
|
||||||
|
yxb AS
|
||||||
|
(
|
||||||
|
---已续保
|
||||||
|
SELECT aa.责任部门 部门,
|
||||||
|
aa.科室,
|
||||||
|
aa.经办,
|
||||||
|
aa.坐席团队,
|
||||||
|
aa.坐席名称,
|
||||||
|
aa.坐席工号,
|
||||||
|
--(case when a.标识='非首续'and A.责任部门='续保业务部' then '续保业务部' else A.部门 end) 部门,
|
||||||
|
(CASE
|
||||||
|
WHEN COUNT(1) IS NULL THEN
|
||||||
|
0
|
||||||
|
ELSE
|
||||||
|
COUNT(1)
|
||||||
|
END) 已续保累计
|
||||||
|
FROM aa
|
||||||
|
WHERE aa.使用性质 IN ('家庭自用车',
|
||||||
|
'企业客车')
|
||||||
|
AND aa.高预赔 IS NULL
|
||||||
|
AND aa.管控类型 IS NULL
|
||||||
|
AND aa.保单类型 IN ( '交商共保', '单交强' )
|
||||||
|
AND aa.到期时间 >= to_date(to_char(SYSDATE,
|
||||||
|
'yyyy-mm') || '-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND aa.到期时间 < to_date(to_char(SYSDATE - 1,
|
||||||
|
'yyyy-mm-dd') || ' 23:59:59',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND aa.新保单签发时间 <= to_date(to_char(SYSDATE - 1,
|
||||||
|
'yyyy-mm-dd') || ' 23:59:59',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
GROUP BY aa.责任部门,
|
||||||
|
aa.科室,
|
||||||
|
aa.经办,
|
||||||
|
aa.坐席团队,
|
||||||
|
aa.坐席名称,
|
||||||
|
aa.坐席工号)
|
||||||
|
--个车续保率=已续数-累计/到期数-累计
|
||||||
|
,
|
||||||
|
dqs AS
|
||||||
|
(
|
||||||
|
---到期数
|
||||||
|
SELECT aa.责任部门 部门,
|
||||||
|
aa.科室,
|
||||||
|
aa.经办,
|
||||||
|
aa.坐席团队,
|
||||||
|
aa.坐席名称,
|
||||||
|
aa.坐席工号,
|
||||||
|
(CASE
|
||||||
|
WHEN COUNT(1) IS NULL THEN
|
||||||
|
0
|
||||||
|
ELSE
|
||||||
|
COUNT(1)
|
||||||
|
END) 到期数
|
||||||
|
FROM aa
|
||||||
|
WHERE aa.使用性质 IN ('家庭自用车',
|
||||||
|
'企业客车')
|
||||||
|
AND aa.高预赔 IS NULL
|
||||||
|
AND aa.管控类型 IS NULL
|
||||||
|
AND aa.保单类型 IN ( '交商共保', '单交强' )
|
||||||
|
AND aa.到期时间 >= to_date(to_char(SYSDATE,
|
||||||
|
'yyyy-mm') || '-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND aa.到期时间 < to_date(to_char(SYSDATE - 1,
|
||||||
|
'yyyy-mm-dd') || ' 23:59:59',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
GROUP BY aa.责任部门,
|
||||||
|
aa.科室,
|
||||||
|
aa.经办,
|
||||||
|
aa.坐席团队,
|
||||||
|
aa.坐席名称,
|
||||||
|
aa.坐席工号)
|
||||||
|
SELECT dqs.部门,
|
||||||
|
dqs.科室,
|
||||||
|
dqs.经办,
|
||||||
|
dqs.坐席团队,
|
||||||
|
dqs.坐席名称,
|
||||||
|
dqs.坐席工号,
|
||||||
|
yxb.已续保累计,
|
||||||
|
dqs.到期数
|
||||||
|
FROM yxb,
|
||||||
|
dqs --,sdqs,syxs,cyxs,cdqs
|
||||||
|
WHERE dqs.部门 = yxb.部门
|
||||||
|
AND dqs.经办 = yxb.经办
|
||||||
|
AND dqs.科室 = yxb.科室
|
||||||
|
AND dqs.坐席名称 = yxb.坐席名称
|
||||||
|
AND dqs.坐席工号 = yxb.坐席工号;
|
||||||
|
COMMIT;
|
||||||
|
END;
|
||||||
|
|
||||||
|
PROCEDURE chefei_daily_job IS
|
||||||
|
BEGIN
|
||||||
|
车非基础数据(SYSDATE - 3,
|
||||||
|
SYSDATE);
|
||||||
|
END;
|
||||||
|
|
||||||
|
PROCEDURE xubao_daily_job IS
|
||||||
|
BEGIN
|
||||||
|
续保基本数据;
|
||||||
|
END;
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
NULL;
|
||||||
|
END telsale_pkg;
|
||||||
|
/
|
@ -1,4 +1,4 @@
|
|||||||
INSERT INTO desktop_archievement_admin.坐席车非每日保费
|
--INSERT INTO desktop_archievement_admin.坐席车非每日保费
|
||||||
WITH aa AS
|
WITH aa AS
|
||||||
(SELECT to_char(t.signature_date,
|
(SELECT to_char(t.signature_date,
|
||||||
'yyyy-mm-dd') 签单日期,
|
'yyyy-mm-dd') 签单日期,
|
||||||
@ -21,8 +21,7 @@ INSERT INTO desktop_archievement_admin.
|
|||||||
z.department_name bm,
|
z.department_name bm,
|
||||||
z.department_code bmdm,
|
z.department_code bmdm,
|
||||||
CASE
|
CASE
|
||||||
WHEN (et.telpartnercode LIKE '%HC%' OR
|
WHEN (et.telpartnercode LIKE '%HC%' OR zx.workerno IN (SELECT code
|
||||||
zx.workerno IN (SELECT code
|
|
||||||
FROM datacenter.dc_lsj_zx_hc)) THEN
|
FROM datacenter.dc_lsj_zx_hc)) THEN
|
||||||
'海沧丰骏'
|
'海沧丰骏'
|
||||||
ELSE
|
ELSE
|
||||||
@ -287,9 +286,9 @@ INSERT INTO desktop_archievement_admin.
|
|||||||
0) 车非融合保费
|
0) 车非融合保费
|
||||||
FROM ff
|
FROM ff
|
||||||
WHERE to_date(ff.签单日期,
|
WHERE to_date(ff.签单日期,
|
||||||
'yyyy-mm-dd') >= DATE '2023-01-01'
|
'yyyy-mm-dd') >= DATE '2023-06-01'
|
||||||
AND to_date(ff.签单日期,
|
AND to_date(ff.签单日期,
|
||||||
'yyyy-mm-dd') <= SYSDATE
|
'yyyy-mm-dd') < DATE '2023-07-01'
|
||||||
AND bm IN ('续保业务部',
|
AND bm IN ('续保业务部',
|
||||||
'湖里支公司')
|
'湖里支公司')
|
||||||
GROUP BY 签单日期,
|
GROUP BY 签单日期,
|
||||||
@ -305,5 +304,7 @@ INSERT INTO desktop_archievement_admin.
|
|||||||
ORDER BY 部门,
|
ORDER BY 部门,
|
||||||
坐席名称;
|
坐席名称;
|
||||||
|
|
||||||
|
/*
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM desktop_archievement_admin.坐席车非每日保费;
|
FROM desktop_archievement_admin.坐席车非每日保费;
|
||||||
|
*/
|
||||||
|
239
code/web/task_schedule/package-lock.json
generated
239
code/web/task_schedule/package-lock.json
generated
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/eslint-parser": "^7.22.9",
|
"@babel/eslint-parser": "^7.22.9",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||||
"@vitejs/plugin-vue": "^4.2.3",
|
"@vitejs/plugin-vue": "^4.2.3",
|
||||||
"@vue/cli-plugin-eslint": "^5.0.8",
|
"@vue/cli-plugin-eslint": "^5.0.8",
|
||||||
"eslint-config-recommended": "^4.1.0",
|
"eslint-config-recommended": "^4.1.0",
|
||||||
@ -1557,6 +1557,50 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": "6.2.0",
|
||||||
|
"@typescript-eslint/visitor-keys": "6.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": "6.2.0",
|
||||||
|
"eslint-visitor-keys": "^3.4.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/eslint-plugin/node_modules/eslint-visitor-keys": {
|
||||||
|
"version": "3.4.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
||||||
|
"integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": {
|
"node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
@ -1591,16 +1635,16 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "6.2.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-6.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-6.1.0.tgz",
|
||||||
"integrity": "sha512-igVYOqtiK/UsvKAmmloQAruAdUHihsOCvplJpplPZ+3h4aDkC/UKZZNKgB6h93ayuYLuEymU3h8nF1xMRbh37g==",
|
"integrity": "sha512-hIzCPvX4vDs4qL07SYzyomamcs2/tQYXg5DtdAfj35AyJ5PIUqhsLf4YrEIFzZcND7R2E8tpQIZKayxg8/6Wbw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "6.2.0",
|
"@typescript-eslint/scope-manager": "6.1.0",
|
||||||
"@typescript-eslint/types": "6.2.0",
|
"@typescript-eslint/types": "6.1.0",
|
||||||
"@typescript-eslint/typescript-estree": "6.2.0",
|
"@typescript-eslint/typescript-estree": "6.1.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.2.0",
|
"@typescript-eslint/visitor-keys": "6.1.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -1616,13 +1660,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "6.2.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.1.0.tgz",
|
||||||
"integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==",
|
"integrity": "sha512-AxjgxDn27hgPpe2rQe19k0tXw84YCOsjDJ2r61cIebq1t+AIxbgiXKvD4999Wk49GVaAcdJ/d49FYel+Pp3jjw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.2.0",
|
"@typescript-eslint/types": "6.1.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.2.0"
|
"@typescript-eslint/visitor-keys": "6.1.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
@ -1651,7 +1696,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.0",
|
||||||
"resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.2.0.tgz",
|
||||||
"integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==",
|
"integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==",
|
||||||
@ -1660,7 +1705,7 @@
|
|||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.0",
|
||||||
"resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz",
|
||||||
"integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==",
|
"integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==",
|
||||||
@ -1683,6 +1728,93 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": "6.2.0",
|
||||||
|
"eslint-visitor-keys": "^3.4.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": {
|
||||||
|
"version": "3.4.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
||||||
|
"integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/type-utils/node_modules/lru-cache": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"yallist": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/type-utils/node_modules/semver": {
|
||||||
|
"version": "7.5.4",
|
||||||
|
"resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz",
|
||||||
|
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"lru-cache": "^6.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"semver": "bin/semver.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/type-utils/node_modules/yallist": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/types": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-+Gfd5NHCpDoHDOaU/yIF3WWRI2PcBRKKpP91ZcVbL0t5tQpqYWBs3z/GGhvU+EV1D0262g9XCnyqQh19prU0JQ==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-nUKAPWOaP/tQjU1IQw9sOPCDavs/iU5iYLiY/6u7gxS7oKQoi4aUxXS1nrrVGTyBBaGesjkcwwHkbkiD5eBvcg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": "6.1.0",
|
||||||
|
"@typescript-eslint/visitor-keys": "6.1.0",
|
||||||
|
"debug": "^4.3.4",
|
||||||
|
"globby": "^11.1.0",
|
||||||
|
"is-glob": "^4.0.3",
|
||||||
|
"semver": "^7.5.4",
|
||||||
|
"ts-api-utils": "^1.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"typescript": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": {
|
"node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
@ -1737,6 +1869,73 @@
|
|||||||
"eslint": "^7.0.0 || ^8.0.0"
|
"eslint": "^7.0.0 || ^8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": "6.2.0",
|
||||||
|
"@typescript-eslint/visitor-keys": "6.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": "6.2.0",
|
||||||
|
"@typescript-eslint/visitor-keys": "6.2.0",
|
||||||
|
"debug": "^4.3.4",
|
||||||
|
"globby": "^11.1.0",
|
||||||
|
"is-glob": "^4.0.3",
|
||||||
|
"semver": "^7.5.4",
|
||||||
|
"ts-api-utils": "^1.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"typescript": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": {
|
||||||
|
"version": "6.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz",
|
||||||
|
"integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@typescript-eslint/types": "6.2.0",
|
||||||
|
"eslint-visitor-keys": "^3.4.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": {
|
||||||
|
"version": "3.4.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
||||||
|
"integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/lru-cache": {
|
"node_modules/@typescript-eslint/utils/node_modules/lru-cache": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||||
@ -1771,12 +1970,13 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "6.2.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.1.0.tgz",
|
||||||
"integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==",
|
"integrity": "sha512-yQeh+EXhquh119Eis4k0kYhj9vmFzNpbhM3LftWQVwqVjipCkwHBQOZutcYW+JVkjtTG9k8nrZU1UoNedPDd1A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.2.0",
|
"@typescript-eslint/types": "6.1.0",
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
"eslint-visitor-keys": "^3.4.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -1788,6 +1988,7 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
||||||
"integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
|
"integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,6 @@ interface Department
|
|||||||
{
|
{
|
||||||
departmentName: string;
|
departmentName: string;
|
||||||
departmentCode: string;
|
departmentCode: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
export { type Department };
|
export { type Department };
|
||||||
|
@ -13,6 +13,6 @@ interface RankingListItem
|
|||||||
index: number;
|
index: number;
|
||||||
callerName: string;
|
callerName: string;
|
||||||
appraiseValue: string;
|
appraiseValue: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
export { type RankingListItem };
|
export { type RankingListItem };
|
||||||
|
@ -16,6 +16,6 @@ interface TelSaler
|
|||||||
teamName: string;
|
teamName: string;
|
||||||
departmentCode: string;
|
departmentCode: string;
|
||||||
departmentName: string;
|
departmentName: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
export { type TelSaler };
|
export { type TelSaler };
|
||||||
|
@ -19,7 +19,7 @@ interface RankingListRequest
|
|||||||
departmentCode: string;
|
departmentCode: string;
|
||||||
year: string;
|
year: string;
|
||||||
month: string;
|
month: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
interface RankingListResponse
|
interface RankingListResponse
|
||||||
{
|
{
|
||||||
@ -30,7 +30,7 @@ interface RankingListResponse
|
|||||||
month: string;
|
month: string;
|
||||||
attachingRateRankingList: RankingListItem[];
|
attachingRateRankingList: RankingListItem[];
|
||||||
renewalRateRankingList: RankingListItem[];
|
renewalRateRankingList: RankingListItem[];
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求坐席排行榜。
|
* 请求坐席排行榜。
|
||||||
|
@ -113,7 +113,7 @@ interface ui
|
|||||||
showUI: boolean; // 用来刷新页面的开关
|
showUI: boolean; // 用来刷新页面的开关
|
||||||
attachingRankingList: RankingListItem[]; // 坐席车非渗透率榜单
|
attachingRankingList: RankingListItem[]; // 坐席车非渗透率榜单
|
||||||
renewalRankingList: RankingListItem[];
|
renewalRankingList: RankingListItem[];
|
||||||
};
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DesktopArchievement",
|
name: "DesktopArchievement",
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<spring.version>5.3.24</spring.version>
|
<spring.version>5.3.24</spring.version>
|
||||||
<!-- <spring.version>6.0.8</spring.version> -->
|
<!-- <spring.version>6.0.11</spring.version> -->
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -86,8 +86,8 @@
|
|||||||
<artifactId>jackson-annotations</artifactId>
|
<artifactId>jackson-annotations</artifactId>
|
||||||
<version>2.13.4</version>
|
<version>2.13.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--
|
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.oracle</groupId>
|
<groupId>com.oracle</groupId>
|
||||||
<artifactId>ojdbc8</artifactId>
|
<artifactId>ojdbc8</artifactId>
|
||||||
<version>19.3.0.0.0</version>
|
<version>19.3.0.0.0</version>
|
||||||
@ -98,6 +98,11 @@
|
|||||||
<artifactId>ojdbc10</artifactId>
|
<artifactId>ojdbc10</artifactId>
|
||||||
<version>19.19.0.0</version>
|
<version>19.19.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle.database.nls</groupId>
|
||||||
|
<artifactId>orai18n</artifactId>
|
||||||
|
<version>23.2.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
|
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-07-27 11:05:53
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ArchivementMapper.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.mybatis.mapper;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
public interface ArchievementMapper
|
||||||
|
{
|
||||||
|
public void getDepartmentArchievement(HashMap<String, Object> params);
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-07-27 11:12:19
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/MensualArchievementItem.java
|
||||||
|
* @Description: 每月业绩对象。
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.mybatis.pojo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class MensualArchievementItem
|
||||||
|
{
|
||||||
|
public MensualArchievementItem()
|
||||||
|
{}
|
||||||
|
|
||||||
|
public MensualArchievementItem( String month, String premium)
|
||||||
|
{
|
||||||
|
this.month = month;
|
||||||
|
this.premium = premium;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMonth()
|
||||||
|
{
|
||||||
|
return month;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonth( String month )
|
||||||
|
{
|
||||||
|
this.month = month;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPremium()
|
||||||
|
{
|
||||||
|
return premium;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPremium( String premium )
|
||||||
|
{
|
||||||
|
this.premium = premium;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "MensualArchievementItem [month=" + month + ", premium=" + premium + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((month == null) ? 0 : month.hashCode());
|
||||||
|
result = prime * result + ((premium == null) ? 0 : premium.hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals( Object obj )
|
||||||
|
{
|
||||||
|
if ( this == obj )
|
||||||
|
return true;
|
||||||
|
if ( obj == null )
|
||||||
|
return false;
|
||||||
|
if ( getClass() != obj.getClass() )
|
||||||
|
return false;
|
||||||
|
MensualArchievementItem other = (MensualArchievementItem) obj;
|
||||||
|
if ( month == null )
|
||||||
|
{
|
||||||
|
if ( other.month != null )
|
||||||
|
return false;
|
||||||
|
} else if ( !month.equals( other.month ) )
|
||||||
|
return false;
|
||||||
|
if ( premium == null )
|
||||||
|
{
|
||||||
|
if ( other.premium != null )
|
||||||
|
return false;
|
||||||
|
} else if ( !premium.equals( other.premium ) )
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 月份
|
||||||
|
@JsonProperty( "month" )
|
||||||
|
private String month;
|
||||||
|
|
||||||
|
// 月总保费
|
||||||
|
@JsonProperty( "premium" )
|
||||||
|
private String premium;
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-07-27 17:22:55
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/utils/MybatisUtils.java
|
||||||
|
* @Description: mybatis的工具集合
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.mybatis.utils;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import org.apache.ibatis.io.Resources;
|
||||||
|
import org.apache.ibatis.session.SqlSession;
|
||||||
|
import org.apache.ibatis.session.SqlSessionFactory;
|
||||||
|
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
|
||||||
|
|
||||||
|
public class MybatisUtils
|
||||||
|
{
|
||||||
|
private static HashMap<String, SqlSession> SessionMap = new HashMap<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param configFile
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public static SqlSession getSqlSession(String configFile )
|
||||||
|
throws IOException
|
||||||
|
{
|
||||||
|
// 根据配置文件的路径,查找是否已经创建了对应的session
|
||||||
|
SqlSession session = SessionMap.get(configFile);
|
||||||
|
|
||||||
|
// 找到就直接返回
|
||||||
|
if ( session != null )
|
||||||
|
{
|
||||||
|
return session;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 没找到就创建一个
|
||||||
|
InputStream configIS = Resources.getResourceAsStream(configFile);
|
||||||
|
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(configIS);
|
||||||
|
session = factory.openSession();
|
||||||
|
|
||||||
|
// 保存
|
||||||
|
SessionMap.put(configFile, session);
|
||||||
|
|
||||||
|
return session;
|
||||||
|
}
|
||||||
|
}
|
@ -4,8 +4,8 @@
|
|||||||
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} ### %msg%n" />
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} ### %msg%n" />
|
||||||
<ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY" />
|
<ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY" />
|
||||||
</Console>
|
</Console>
|
||||||
<RollingFile name="rolling_file" filename="./logs/app.log"
|
<RollingFile name="rolling_file" filename="d:/logs/桌面霸屏/app.log"
|
||||||
filePattern="./logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
|
filePattern="d:/logs/桌面霸屏/logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
|
||||||
<PatternLayout>
|
<PatternLayout>
|
||||||
<Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
|
<Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
|
||||||
</PatternLayout>
|
</PatternLayout>
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cpic.xim.mybatis.mapper.ArchievementMapper">
|
||||||
|
<select id="getDepartmentArchievement" statementType="CALLABLE" parameterType="java.util.HashMap">
|
||||||
|
call telsale_archievement_pkg.department_archievement(
|
||||||
|
#{a_department_code, mode=IN, jdbcType=VARCHAR},
|
||||||
|
#{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_renewal_rate, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_total, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
|
||||||
|
</select>
|
||||||
|
<resultMap id="MensualArchievementMapper" type="MensualArchievementItem">
|
||||||
|
<id property="month" column="mm" />
|
||||||
|
<result property="premium" column="bf" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cpic.xim.mybatis.mapper.StaffMapper">
|
||||||
|
<select id="queryCpicStaff" resultMap="CpicXIMStaff" >
|
||||||
|
SELECT ry.p13uid,
|
||||||
|
ry.staff_code,
|
||||||
|
ry.staff_name,
|
||||||
|
bm.department_code,
|
||||||
|
bm.department_name,
|
||||||
|
ksh.section_office_code,
|
||||||
|
ksh.section_office_name
|
||||||
|
FROM idst0.rydm_t ry,
|
||||||
|
idst0.ks_t ksh,
|
||||||
|
idst0.bm_t bm
|
||||||
|
WHERE ry.staff_code = #{staffCode,mode=IN}
|
||||||
|
AND ry.department_code = bm.department_code
|
||||||
|
AND ry.section_office_code = ksh.section_office_code
|
||||||
|
</select>
|
||||||
|
<resultMap id="CpicXIMStaff" type="com.cpic.xim.mybatis.pojo.CpicStaff">
|
||||||
|
<!-- <constructor>
|
||||||
|
<arg column="p13uid" name="p13uid"/>
|
||||||
|
<arg column="staff_code" name="staffCode"/>
|
||||||
|
<arg column="staff_name" name="staffName"/>
|
||||||
|
<arg column="department_code" name="departmentCode"/>
|
||||||
|
<arg column="department_name" name="departmentName"/>
|
||||||
|
<arg column="section_office_code" name="sectionOfficeCode"/>
|
||||||
|
<arg column="section_office_name" name="sectionOfficeName"/>
|
||||||
|
</constructor> -->
|
||||||
|
<id property="staffCode" column="staff_code"/>
|
||||||
|
<result property="staffName" column="staff_name"/>
|
||||||
|
<result property="p13UID" column="p13uid"/>
|
||||||
|
<result property="departmentCode" column="department_code"/>
|
||||||
|
<result property="departmentName" column="department_name"/>
|
||||||
|
<result property="sectionOfficeCode" column="section_office_code"/>
|
||||||
|
<result property="sectionOfficeName" column="section_office_name"/>
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
@ -1,7 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "https://mybatis.org/dtd/mybatis-3-config.dtd">
|
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "https://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||||
<configuration>
|
<configuration>
|
||||||
<properties resource="jdbc.properties" />
|
<properties resource="mybatis/jdbc.properties" />
|
||||||
|
|
||||||
|
<!-- 类型别名 -->
|
||||||
|
<typeAliases>
|
||||||
|
<package name="com.cpic.xim.mybatis.pojo" />
|
||||||
|
</typeAliases>
|
||||||
|
|
||||||
<environments default="development">
|
<environments default="development">
|
||||||
<environment id="development">
|
<environment id="development">
|
||||||
<transactionManager type="JDBC" />
|
<transactionManager type="JDBC" />
|
||||||
@ -13,7 +19,9 @@
|
|||||||
</dataSource>
|
</dataSource>
|
||||||
</environment>
|
</environment>
|
||||||
</environments>
|
</environments>
|
||||||
|
|
||||||
<mappers>
|
<mappers>
|
||||||
<mapper resource="org/mybatis/example/BlogMapper.xml" />
|
<!-- <mapper resource="mybatis/mapper/StaffMapper.xml" /> -->
|
||||||
|
<mapper resource="mybatis/mapper/ArchievementMapper.xml" />
|
||||||
</mappers>
|
</mappers>
|
||||||
</configuration>
|
</configuration>
|
@ -9,14 +9,28 @@
|
|||||||
*/
|
*/
|
||||||
package com.cpic.xim.DesktopArchievement.test;
|
package com.cpic.xim.DesktopArchievement.test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import org.apache.ibatis.io.Resources;
|
||||||
|
import org.apache.ibatis.session.SqlSession;
|
||||||
|
import org.apache.ibatis.session.SqlSessionFactory;
|
||||||
|
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import com.cpic.xim.mybatis.mapper.ArchievementMapper;
|
||||||
import com.cpic.xim.utils.archievement.DepartmentArchievement;
|
import com.cpic.xim.utils.archievement.DepartmentArchievement;
|
||||||
import com.cpic.xim.utils.ranking.CallerRankingList;
|
import com.cpic.xim.utils.ranking.CallerRankingList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings( "all" )
|
@SuppressWarnings( "all" )
|
||||||
public class DesktopArchievementTest
|
public class DesktopArchievementTest
|
||||||
{
|
{
|
||||||
|
private static String configFilePath = "mybatis/mybatis-config.xml";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testQueryArchievement()
|
public void testQueryArchievement()
|
||||||
{
|
{
|
||||||
@ -37,10 +51,11 @@ public class DesktopArchievementTest
|
|||||||
@Test
|
@Test
|
||||||
public void testCallerRankingList()
|
public void testCallerRankingList()
|
||||||
{
|
{
|
||||||
|
CallerRankingList rankingList = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CallerRankingList rankingList =
|
rankingList = CallerRankingList.getCallerRankingList( "QDI", "2023", "06" );
|
||||||
CallerRankingList.getCallerRankingList( "QDI", "2023", "05" );
|
|
||||||
}
|
}
|
||||||
catch ( SQLException error )
|
catch ( SQLException error )
|
||||||
{
|
{
|
||||||
@ -50,17 +65,34 @@ public class DesktopArchievementTest
|
|||||||
{
|
{
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assertNotNull( rankingList );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testArray()
|
public void testDepartmentArchievement()
|
||||||
{
|
{
|
||||||
int[] num =
|
try
|
||||||
{ 12, 3, 4, 5, 4, 45654,};
|
|
||||||
|
|
||||||
for ( int item : num )
|
|
||||||
{
|
{
|
||||||
|
InputStream configFile = Resources.getResourceAsStream( configFilePath );
|
||||||
|
SqlSessionFactoryBuilder builder = new SqlSessionFactoryBuilder();
|
||||||
|
SqlSessionFactory factory = builder.build( configFile );
|
||||||
|
SqlSession session = factory.openSession();
|
||||||
|
|
||||||
|
ArchievementMapper mapper = session.getMapper( ArchievementMapper.class );
|
||||||
|
|
||||||
|
HashMap<String,Object> params = new HashMap<>();
|
||||||
|
params.put("a_department_code", "QDI");
|
||||||
|
|
||||||
|
mapper.getDepartmentArchievement( params );
|
||||||
|
|
||||||
|
System.out.println(params.toString());
|
||||||
|
|
||||||
|
assertTrue( params.size() > 1 );
|
||||||
|
}
|
||||||
|
catch (IOException error )
|
||||||
|
{
|
||||||
|
assert( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user