Compare commits
31 Commits
feature-ui
...
feature-te
Author | SHA1 | Date | |
---|---|---|---|
c6ea898505 | |||
711697e6a1 | |||
89866c8513 | |||
f90114e204 | |||
0458da2fae | |||
46d0ff64ef | |||
57b5edd9c0 | |||
73cfe24460 | |||
9e0d07a9f7 | |||
ab957962fc | |||
da9da6e906 | |||
7ba9d249ee | |||
afccb2a88c | |||
962c22400e | |||
c7bf9f6c0d | |||
daa1d2aaaf | |||
6a93fc2738 | |||
e3858d23d9 | |||
0cf8e16129 | |||
fe6707ca3f | |||
c6705d326d | |||
3e071cedd7 | |||
c7ae33222d | |||
a9c6e0476b | |||
2e02b9182d | |||
f391880c9c | |||
372824ec50 | |||
e4b68276dd | |||
8489f43b55 | |||
42dd59e141 | |||
d20a3222c0 |
28
code/db/pkg/TELSALER_TWR_UTILS.pck
Normal file
28
code/db/pkg/TELSALER_TWR_UTILS.pck
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
CREATE OR REPLACE PACKAGE TELSALER_TWR_UTILS IS
|
||||||
|
|
||||||
|
-- Author : KANE
|
||||||
|
-- Created : 2023/12/19 16:27:20
|
||||||
|
-- Purpose : twr<77><72><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĹ<D8B5><C4B9>ߺ<EFBFBD><DFBA><EFBFBD>
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>TWR<57><52>ϯ<EFBFBD>嵥;
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>TWR<57>Ŷ<EFBFBD><C5B6>嵥;
|
||||||
|
|
||||||
|
END TELSALER_TWR_UTILS;
|
||||||
|
/
|
||||||
|
CREATE OR REPLACE PACKAGE BODY TELSALER_TWR_UTILS IS
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>TWR<57><52>ϯ<EFBFBD>嵥 IS
|
||||||
|
BEGIN
|
||||||
|
EXECUTE IMMEDIATE 'truncate table twr_telsaler_dev';
|
||||||
|
END;
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>TWR<57>Ŷ<EFBFBD><C5B6>嵥 IS
|
||||||
|
BEGIN
|
||||||
|
EXECUTE IMMEDIATE 'truncate table twr_telsaler_team_dev';
|
||||||
|
END;
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
NULL;
|
||||||
|
END TELSALER_TWR_UTILS;
|
||||||
|
/
|
309
code/db/pkg/telsale_archievement_dev_pkg.pck
Normal file
309
code/db/pkg/telsale_archievement_dev_pkg.pck
Normal file
@@ -0,0 +1,309 @@
|
|||||||
|
CREATE OR REPLACE PACKAGE TELSALE_ARCHIEVEMENT_DEV_PKG IS
|
||||||
|
|
||||||
|
-- Author : WANGWEI-202
|
||||||
|
-- Created : 2023/3/10 15:13:34
|
||||||
|
-- Purpose : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɰ<EFBFBD>
|
||||||
|
|
||||||
|
TYPE CUR_TYPE IS REF CURSOR;
|
||||||
|
|
||||||
|
-- <20>쳣
|
||||||
|
DEPARTMENTCODE_EXCEPTION_CODE CONSTANT INTEGER := -20000;
|
||||||
|
DEPARTMENTCODE_EXCEPTION_MSG CONSTANT VARCHAR2(100) := '<27><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>';
|
||||||
|
|
||||||
|
CALLERCODE_EXCEPTION_CODE CONSTANT INTEGER := -20001;
|
||||||
|
CALLERCODE_EXCEPTION_MSG CONSTANT VARCHAR2(100) := '<27><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>';
|
||||||
|
|
||||||
|
PROCEDURE DEPARTMENT_ARCHIEVEMENT
|
||||||
|
(
|
||||||
|
A_DEPARTMENT_CODE IN VARCHAR2,
|
||||||
|
A_ATTACHING_RATE OUT VARCHAR2,
|
||||||
|
A_ATTACHING_RATE_TARGET OUT VARCHAR2,
|
||||||
|
A_RENEWAL_RATE OUT VARCHAR2,
|
||||||
|
A_RENEWAL_RATE_TARGET OUT VARCHAR2,
|
||||||
|
A_TOTAL OUT INTEGER,
|
||||||
|
A_MENSUAL_CUR OUT CUR_TYPE
|
||||||
|
);
|
||||||
|
|
||||||
|
PROCEDURE CALLER_ARCHIEVEMENT
|
||||||
|
(
|
||||||
|
A_CALLER_CODE IN VARCHAR2,
|
||||||
|
A_ATTACHING_RATE OUT VARCHAR2,
|
||||||
|
A_RENEWAL_RATE OUT VARCHAR2,
|
||||||
|
A_TOTAL OUT INTEGER,
|
||||||
|
A_PRESENT_MONTH OUT NUMBER,
|
||||||
|
A_MENSUAL_CUR OUT CUR_TYPE
|
||||||
|
);
|
||||||
|
|
||||||
|
PROCEDURE CALLER_ARCH_RANKING_LIST
|
||||||
|
(
|
||||||
|
A_DEPARTMENT_CODE IN VARCHAR2,
|
||||||
|
A_YEAR IN VARCHAR2,
|
||||||
|
A_MONTH IN VARCHAR2,
|
||||||
|
A_ATTACHING_RANKING_LIST OUT CUR_TYPE,
|
||||||
|
A_RENEWAL_RANKING_LIST OUT CUR_TYPE
|
||||||
|
);
|
||||||
|
|
||||||
|
END TELSALE_ARCHIEVEMENT_DEV_PKG;
|
||||||
|
/
|
||||||
|
CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_DEV_PKG IS
|
||||||
|
|
||||||
|
-- <20><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
|
||||||
|
PROCEDURE DEPARTMENT_ARCHIEVEMENT
|
||||||
|
(
|
||||||
|
A_DEPARTMENT_CODE IN VARCHAR2,
|
||||||
|
A_ATTACHING_RATE OUT VARCHAR2,
|
||||||
|
A_ATTACHING_RATE_TARGET OUT VARCHAR2,
|
||||||
|
A_RENEWAL_RATE OUT VARCHAR2,
|
||||||
|
A_RENEWAL_RATE_TARGET OUT VARCHAR2,
|
||||||
|
A_TOTAL OUT INTEGER,
|
||||||
|
A_MENSUAL_CUR OUT CUR_TYPE
|
||||||
|
) IS
|
||||||
|
L_FIRSTDAY DATE;
|
||||||
|
L_DEPARTMENT_NAME VARCHAR2(100);
|
||||||
|
L_RENEWAL_RATE_TARGET NUMBER;
|
||||||
|
BEGIN
|
||||||
|
L_FIRSTDAY := TO_DATE(TO_CHAR(SYSDATE,
|
||||||
|
'yyyy') || '-01-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss');
|
||||||
|
-- <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
BEGIN
|
||||||
|
SELECT DEPARTMENT_NAME
|
||||||
|
INTO L_DEPARTMENT_NAME
|
||||||
|
FROM IDST0.BM_T BM
|
||||||
|
WHERE BM.DEPARTMENT_CODE = A_DEPARTMENT_CODE;
|
||||||
|
EXCEPTION
|
||||||
|
-- <20><><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׳<EFBFBD><D7B3>쳣
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
RAISE_APPLICATION_ERROR(DEPARTMENTCODE_EXCEPTION_CODE,
|
||||||
|
DEPARTMENTCODE_EXCEPTION_MSG);
|
||||||
|
END;
|
||||||
|
|
||||||
|
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>&Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
BEGIN
|
||||||
|
SELECT ROUND(DEPT.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
|
||||||
|
2),
|
||||||
|
ROUND(DEPT.Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
|
2)
|
||||||
|
INTO A_ATTACHING_RATE,
|
||||||
|
A_ATTACHING_RATE_TARGET
|
||||||
|
FROM DESKTOP_ARCHIEVEMENT_ADMIN.BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> DEPT
|
||||||
|
WHERE DEPT.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME;
|
||||||
|
|
||||||
|
--<2D><><EFBFBD><EFBFBD>round<6E><64><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ȱ0<C8B1><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
SELECT DECODE(SUBSTR(A_ATTACHING_RATE_TARGET,
|
||||||
|
1,
|
||||||
|
1),
|
||||||
|
'.',
|
||||||
|
'0' || A_ATTACHING_RATE_TARGET,
|
||||||
|
A_ATTACHING_RATE_TARGET)
|
||||||
|
INTO A_ATTACHING_RATE_TARGET
|
||||||
|
FROM DUAL;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
A_ATTACHING_RATE := '0.0';
|
||||||
|
A_ATTACHING_RATE_TARGET := '0.0';
|
||||||
|
END;
|
||||||
|
|
||||||
|
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
BEGIN
|
||||||
|
SELECT ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>ʱ<EFBFBD><CAB1>(%)",
|
||||||
|
2),
|
||||||
|
ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>ʱ<EFBFBD><CAB1>(%)" - t."<22><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>ֵ1(%)",
|
||||||
|
2)
|
||||||
|
INTO A_RENEWAL_RATE,
|
||||||
|
A_RENEWAL_RATE_TARGET
|
||||||
|
FROM "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>" T
|
||||||
|
WHERE T.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> = L_DEPARTMENT_NAME;
|
||||||
|
|
||||||
|
--<2D><><EFBFBD><EFBFBD>round<6E><64><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ȱ0<C8B1><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
SELECT DECODE(SUBSTR(A_RENEWAL_RATE_TARGET,
|
||||||
|
1,
|
||||||
|
1),
|
||||||
|
'.',
|
||||||
|
'0' || A_RENEWAL_RATE_TARGET,
|
||||||
|
A_RENEWAL_RATE_TARGET)
|
||||||
|
INTO A_RENEWAL_RATE_TARGET
|
||||||
|
FROM DUAL;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
A_RENEWAL_RATE := '0.0';
|
||||||
|
A_RENEWAL_RATE_TARGET := '0.0';
|
||||||
|
END;
|
||||||
|
|
||||||
|
--<2D><>ҵ<EFBFBD><D2B5>
|
||||||
|
A_TOTAL := 0;
|
||||||
|
|
||||||
|
--ÿ<><C3BF>ҵ<EFBFBD><D2B5>
|
||||||
|
OPEN A_MENSUAL_CUR FOR
|
||||||
|
SELECT CF.<2E>·<EFBFBD> MM,
|
||||||
|
ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD> + CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / 10000,
|
||||||
|
0),
|
||||||
|
0) BF
|
||||||
|
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
|
||||||
|
WHERE <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD> = A_DEPARTMENT_CODE
|
||||||
|
AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >= TO_DATE(TO_CHAR(SYSDATE,
|
||||||
|
'yyyy') || '-01-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> < TO_DATE(TO_CHAR(SYSDATE,
|
||||||
|
'yyyy-mm') || '-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
GROUP BY CF.<2E>·<EFBFBD>
|
||||||
|
ORDER BY CF.<2E>·<EFBFBD>;
|
||||||
|
END;
|
||||||
|
|
||||||
|
/*******************************************************/
|
||||||
|
-- <20><>ϯҵ<CFAF><D2B5>
|
||||||
|
PROCEDURE CALLER_ARCHIEVEMENT
|
||||||
|
(
|
||||||
|
A_CALLER_CODE IN VARCHAR2,
|
||||||
|
A_ATTACHING_RATE OUT VARCHAR2,
|
||||||
|
A_RENEWAL_RATE OUT VARCHAR2,
|
||||||
|
A_TOTAL OUT INTEGER,
|
||||||
|
A_PRESENT_MONTH OUT NUMBER,
|
||||||
|
A_MENSUAL_CUR OUT CUR_TYPE
|
||||||
|
) IS
|
||||||
|
L_CALLER_NAME VARCHAR2(100);
|
||||||
|
L_DEPARTMENT_NAME VARCHAR2(100);
|
||||||
|
L_THIS_YEAR VARCHAR2(4);
|
||||||
|
L_ROWNUM INTEGER;
|
||||||
|
BEGIN
|
||||||
|
--<2D><>ѯ<EFBFBD><D1AF>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD><C6A3>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>
|
||||||
|
BEGIN
|
||||||
|
SELECT ZX.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>,
|
||||||
|
BM.DEPARTMENT_NAME
|
||||||
|
INTO L_CALLER_NAME,
|
||||||
|
L_DEPARTMENT_NAME
|
||||||
|
FROM TWR_TELSALER ZX,
|
||||||
|
TWR_TELSALER_TEAM T,
|
||||||
|
IDST0.BM_T BM
|
||||||
|
WHERE ZX.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD> = A_CALLER_CODE
|
||||||
|
AND ZX.<2E>Ŷ<EFBFBD><C5B6><EFBFBD><EFBFBD><EFBFBD> = T.TEAM_NAME
|
||||||
|
AND T.DEPARTMENT_CODE = BM.DEPARTMENT_CODE;
|
||||||
|
EXCEPTION
|
||||||
|
-- <20><><EFBFBD><EFBFBD>û<EFBFBD>в<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׳<EFBFBD><D7B3>쳣
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
RAISE_APPLICATION_ERROR(CALLERCODE_EXCEPTION_CODE,
|
||||||
|
CALLERCODE_EXCEPTION_MSG);
|
||||||
|
END;
|
||||||
|
|
||||||
|
L_THIS_YEAR := TO_CHAR(SYSDATE,
|
||||||
|
'yyyy');
|
||||||
|
|
||||||
|
--<2D>ܳ<EFBFBD><DCB3>ձ<EFBFBD><D5B1><EFBFBD>
|
||||||
|
SELECT ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
|
||||||
|
0),
|
||||||
|
2) BF
|
||||||
|
INTO A_TOTAL
|
||||||
|
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
|
||||||
|
WHERE CF.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = L_CALLER_NAME
|
||||||
|
AND CF.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME
|
||||||
|
AND CF.<2E><><EFBFBD><EFBFBD> = L_THIS_YEAR;
|
||||||
|
|
||||||
|
--<2D><><EFBFBD><CDB8>
|
||||||
|
BEGIN
|
||||||
|
SELECT ROWNUM,
|
||||||
|
ROUND(NVL(T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
|
||||||
|
0),
|
||||||
|
2),
|
||||||
|
ROUND(NVL(t."<22><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>(<28><>)" * 10000,
|
||||||
|
0),
|
||||||
|
2)
|
||||||
|
INTO L_ROWNUM,
|
||||||
|
A_ATTACHING_RATE,
|
||||||
|
A_PRESENT_MONTH
|
||||||
|
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> T
|
||||||
|
WHERE T.<2E><><EFBFBD><EFBFBD> = L_CALLER_NAME
|
||||||
|
AND ROWNUM = 1;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
L_ROWNUM := 1;
|
||||||
|
A_ATTACHING_RATE := 0.0;
|
||||||
|
A_PRESENT_MONTH := 0.0;
|
||||||
|
END;
|
||||||
|
|
||||||
|
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
BEGIN
|
||||||
|
SELECT ROWNUM,
|
||||||
|
ROUND(NVL(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)",
|
||||||
|
0),
|
||||||
|
2)
|
||||||
|
INTO L_ROWNUM,
|
||||||
|
A_RENEWAL_RATE
|
||||||
|
FROM "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>" T
|
||||||
|
WHERE T.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = L_CALLER_NAME
|
||||||
|
AND ROWNUM = 1;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
L_ROWNUM := 1;
|
||||||
|
A_RENEWAL_RATE := 0.0;
|
||||||
|
END;
|
||||||
|
|
||||||
|
--ÿ<><C3BF>ҵ<EFBFBD><D2B5>
|
||||||
|
OPEN A_MENSUAL_CUR FOR
|
||||||
|
SELECT CF.<2E>·<EFBFBD> MM,
|
||||||
|
ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
|
||||||
|
0),
|
||||||
|
0) BF
|
||||||
|
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
|
||||||
|
WHERE CF.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = L_CALLER_NAME
|
||||||
|
AND CF.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME
|
||||||
|
AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >= TO_DATE(TO_CHAR(SYSDATE,
|
||||||
|
'yyyy') || '-01-01 00:00:00',
|
||||||
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
|
AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <= SYSDATE
|
||||||
|
GROUP BY CF.<2E>·<EFBFBD>
|
||||||
|
ORDER BY CF.<2E>·<EFBFBD>;
|
||||||
|
END;
|
||||||
|
|
||||||
|
/*******************************************************/
|
||||||
|
-- <20><>ϯ<EFBFBD><CFAF><EFBFBD>а<EFBFBD>
|
||||||
|
PROCEDURE CALLER_ARCH_RANKING_LIST
|
||||||
|
(
|
||||||
|
A_DEPARTMENT_CODE IN VARCHAR2,
|
||||||
|
A_YEAR IN VARCHAR2,
|
||||||
|
A_MONTH IN VARCHAR2,
|
||||||
|
A_ATTACHING_RANKING_LIST OUT CUR_TYPE,
|
||||||
|
A_RENEWAL_RANKING_LIST OUT CUR_TYPE
|
||||||
|
) IS
|
||||||
|
L_DEPARTMENT_NAME VARCHAR2(100);
|
||||||
|
BEGIN
|
||||||
|
-- <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
BEGIN
|
||||||
|
SELECT DEPARTMENT_NAME
|
||||||
|
INTO L_DEPARTMENT_NAME
|
||||||
|
FROM IDST0.BM_T BM
|
||||||
|
WHERE BM.DEPARTMENT_CODE = A_DEPARTMENT_CODE;
|
||||||
|
EXCEPTION
|
||||||
|
-- <20><><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׳<EFBFBD><D7B3>쳣
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
RAISE_APPLICATION_ERROR(DEPARTMENTCODE_EXCEPTION_CODE,
|
||||||
|
DEPARTMENTCODE_EXCEPTION_MSG);
|
||||||
|
END;
|
||||||
|
-- <20><><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD><DABA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
|
||||||
|
OPEN A_ATTACHING_RANKING_LIST FOR
|
||||||
|
SELECT ROWNUM,
|
||||||
|
PAIHANG.<2E><><EFBFBD><EFBFBD> AS CALLER_NAME,
|
||||||
|
PAIHANG.XBL AS ATTACHING_RATE
|
||||||
|
FROM (SELECT T.<2E><><EFBFBD><EFBFBD>,
|
||||||
|
ROUND(T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
|
||||||
|
2) XBL
|
||||||
|
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> T
|
||||||
|
WHERE T.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME
|
||||||
|
ORDER BY T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8> DESC) PAIHANG;
|
||||||
|
|
||||||
|
-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
|
||||||
|
OPEN A_RENEWAL_RANKING_LIST FOR
|
||||||
|
SELECT ROWNUM,
|
||||||
|
PAIHANG.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> AS CALLER_NAME,
|
||||||
|
PAIHANG.XBL AS RENEWAL_RATE
|
||||||
|
FROM (SELECT T.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
|
ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)",
|
||||||
|
2) XBL
|
||||||
|
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> T
|
||||||
|
WHERE T.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> = L_DEPARTMENT_NAME
|
||||||
|
ORDER BY XBL DESC) PAIHANG;
|
||||||
|
END;
|
||||||
|
BEGIN
|
||||||
|
NULL;
|
||||||
|
END TELSALE_ARCHIEVEMENT_DEV_PKG;
|
||||||
|
/
|
@@ -1,10 +1,10 @@
|
|||||||
CREATE OR REPLACE PACKAGE telsale_archievement_pkg IS
|
CREATE OR REPLACE PACKAGE TELSALE_ARCHIEVEMENT_PKG IS
|
||||||
|
|
||||||
-- Author : WANGWEI-202
|
-- Author : WANGWEI-202
|
||||||
-- Created : 2023/3/10 15:13:34
|
-- Created : 2023/3/10 15:13:34
|
||||||
-- Purpose : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɰ<EFBFBD>
|
-- Purpose : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɰ<EFBFBD>
|
||||||
|
|
||||||
TYPE cur_type IS REF CURSOR;
|
TYPE CUR_TYPE IS REF CURSOR;
|
||||||
|
|
||||||
-- <20>쳣
|
-- <20>쳣
|
||||||
DEPARTMENTCODE_EXCEPTION_CODE CONSTANT INTEGER := -20000;
|
DEPARTMENTCODE_EXCEPTION_CODE CONSTANT INTEGER := -20000;
|
||||||
@@ -13,55 +13,55 @@ CREATE OR REPLACE PACKAGE telsale_archievement_pkg IS
|
|||||||
CALLERCODE_EXCEPTION_CODE CONSTANT INTEGER := -20001;
|
CALLERCODE_EXCEPTION_CODE CONSTANT INTEGER := -20001;
|
||||||
CALLERCODE_EXCEPTION_MSG CONSTANT VARCHAR2(100) := '<27><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>';
|
CALLERCODE_EXCEPTION_MSG CONSTANT VARCHAR2(100) := '<27><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>';
|
||||||
|
|
||||||
PROCEDURE department_archievement
|
PROCEDURE DEPARTMENT_ARCHIEVEMENT
|
||||||
(
|
(
|
||||||
a_department_code IN VARCHAR2,
|
A_DEPARTMENT_CODE IN VARCHAR2,
|
||||||
a_attaching_rate OUT VARCHAR2,
|
A_ATTACHING_RATE OUT VARCHAR2,
|
||||||
a_renewal_rate OUT VARCHAR2,
|
A_ATTACHING_RATE_TARGET OUT VARCHAR2,
|
||||||
a_total OUT INTEGER,
|
A_RENEWAL_RATE OUT VARCHAR2,
|
||||||
a_mensual_cur OUT cur_type
|
A_RENEWAL_RATE_TARGET OUT VARCHAR2,
|
||||||
|
A_TOTAL OUT INTEGER,
|
||||||
|
A_MENSUAL_CUR OUT CUR_TYPE
|
||||||
);
|
);
|
||||||
|
|
||||||
PROCEDURE caller_archievement
|
PROCEDURE CALLER_ARCHIEVEMENT
|
||||||
(
|
(
|
||||||
a_caller_code IN VARCHAR2,
|
A_CALLER_CODE IN VARCHAR2,
|
||||||
a_attaching_rate OUT VARCHAR2,
|
A_ATTACHING_RATE OUT VARCHAR2,
|
||||||
a_renewal_rate OUT VARCHAR2,
|
A_RENEWAL_RATE OUT VARCHAR2,
|
||||||
a_total OUT INTEGER,
|
A_TOTAL OUT INTEGER,
|
||||||
a_present_month OUT NUMBER,
|
A_PRESENT_MONTH OUT NUMBER,
|
||||||
a_mensual_cur OUT cur_type
|
A_MENSUAL_CUR OUT CUR_TYPE
|
||||||
);
|
);
|
||||||
|
|
||||||
PROCEDURE caller_arch_ranking_list
|
PROCEDURE CALLER_ARCH_RANKING_LIST
|
||||||
(
|
(
|
||||||
a_department_code IN VARCHAR2,
|
A_DEPARTMENT_CODE IN VARCHAR2,
|
||||||
a_year IN VARCHAR2,
|
A_YEAR IN VARCHAR2,
|
||||||
a_month IN VARCHAR2,
|
A_MONTH IN VARCHAR2,
|
||||||
a_attaching_ranking_list OUT cur_type,
|
A_ATTACHING_RANKING_LIST OUT CUR_TYPE,
|
||||||
a_renewal_ranking_list OUT cur_type
|
A_RENEWAL_RANKING_LIST OUT CUR_TYPE
|
||||||
);
|
);
|
||||||
|
|
||||||
END telsale_archievement_pkg;
|
END TELSALE_ARCHIEVEMENT_PKG;
|
||||||
/
|
/
|
||||||
CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
||||||
|
|
||||||
-- <20><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
|
-- <20><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>
|
||||||
PROCEDURE DEPARTMENT_ARCHIEVEMENT
|
PROCEDURE DEPARTMENT_ARCHIEVEMENT
|
||||||
(
|
(
|
||||||
A_DEPARTMENT_CODE IN VARCHAR2,
|
A_DEPARTMENT_CODE IN VARCHAR2,
|
||||||
A_ATTACHING_RATE OUT VARCHAR2,
|
A_ATTACHING_RATE OUT VARCHAR2,
|
||||||
|
A_ATTACHING_RATE_TARGET OUT VARCHAR2,
|
||||||
A_RENEWAL_RATE OUT VARCHAR2,
|
A_RENEWAL_RATE OUT VARCHAR2,
|
||||||
|
A_RENEWAL_RATE_TARGET OUT VARCHAR2,
|
||||||
A_TOTAL OUT INTEGER,
|
A_TOTAL OUT INTEGER,
|
||||||
A_MENSUAL_CUR OUT CUR_TYPE
|
A_MENSUAL_CUR OUT CUR_TYPE
|
||||||
) IS
|
) IS
|
||||||
--L_THIS_MONTH VARCHAR2(4);
|
|
||||||
--L_THIS_YEAR VARCHAR2(4);
|
|
||||||
L_FIRSTDAY DATE;
|
L_FIRSTDAY DATE;
|
||||||
L_DEPARTMENT_NAME VARCHAR2(100);
|
L_DEPARTMENT_NAME VARCHAR2(100);
|
||||||
|
L_RENEWAL_RATE_TARGET NUMBER;
|
||||||
BEGIN
|
BEGIN
|
||||||
/*L_THIS_MONTH := TO_CHAR(SYSDATE,
|
|
||||||
'mm');
|
|
||||||
L_THIS_YEAR := TO_CHAR(SYSDATE,
|
|
||||||
'yyyy');*/
|
|
||||||
L_FIRSTDAY := TO_DATE(TO_CHAR(SYSDATE,
|
L_FIRSTDAY := TO_DATE(TO_CHAR(SYSDATE,
|
||||||
'yyyy') || '-01-01 00:00:00',
|
'yyyy') || '-01-01 00:00:00',
|
||||||
'yyyy-mm-dd hh24:mi:ss');
|
'yyyy-mm-dd hh24:mi:ss');
|
||||||
@@ -77,45 +77,62 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
|||||||
RAISE_APPLICATION_ERROR(DEPARTMENTCODE_EXCEPTION_CODE,
|
RAISE_APPLICATION_ERROR(DEPARTMENTCODE_EXCEPTION_CODE,
|
||||||
DEPARTMENTCODE_EXCEPTION_MSG);
|
DEPARTMENTCODE_EXCEPTION_MSG);
|
||||||
END;
|
END;
|
||||||
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>
|
|
||||||
/*SELECT DECODE(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
|
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>&Ŀ<><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
0,
|
BEGIN
|
||||||
0,
|
SELECT ROUND(DEPT.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
|
||||||
ROUND((SUM(CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>) * 100),
|
2),
|
||||||
2))
|
ROUND(DEPT.Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
INTO A_ATTACHING_RATE
|
|
||||||
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
|
|
||||||
WHERE CF.<2E>·<EFBFBD> = L_THIS_MONTH
|
|
||||||
AND CF.<2E><><EFBFBD><EFBFBD> = L_THIS_YEAR
|
|
||||||
AND <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD> = A_DEPARTMENT_CODE;*/
|
|
||||||
SELECT round(dept.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
|
|
||||||
2)
|
2)
|
||||||
INTO A_ATTACHING_RATE
|
INTO A_ATTACHING_RATE,
|
||||||
FROM desktop_archievement_admin.BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> dept
|
A_ATTACHING_RATE_TARGET
|
||||||
WHERE dept.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME;
|
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> DEPT
|
||||||
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
WHERE DEPT.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME;
|
||||||
/*SELECT DECODE(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
|
|
||||||
0,
|
--<2D><><EFBFBD><EFBFBD>round<6E><64><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ȱ0<C8B1><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
0,
|
SELECT DECODE(SUBSTR(A_ATTACHING_RATE_TARGET,
|
||||||
ROUND(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
|
1,
|
||||||
2))
|
1),
|
||||||
INTO A_RENEWAL_RATE
|
'.',
|
||||||
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>
|
'0' || A_ATTACHING_RATE_TARGET,
|
||||||
WHERE <20><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME;*/
|
A_ATTACHING_RATE_TARGET)
|
||||||
SELECT round(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)",
|
INTO A_ATTACHING_RATE_TARGET
|
||||||
|
FROM DUAL;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
A_ATTACHING_RATE := '0.0';
|
||||||
|
A_ATTACHING_RATE_TARGET := '0.0';
|
||||||
|
END;
|
||||||
|
|
||||||
|
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
BEGIN
|
||||||
|
SELECT ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>ʱ<EFBFBD><CAB1>(%)",
|
||||||
|
2),
|
||||||
|
ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>ʱ<EFBFBD><CAB1>(%)" - t."<22><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>ֵ1(%)",
|
||||||
2)
|
2)
|
||||||
INTO A_RENEWAL_RATE
|
INTO A_RENEWAL_RATE,
|
||||||
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t
|
A_RENEWAL_RATE_TARGET
|
||||||
WHERE t.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> = L_DEPARTMENT_NAME;
|
FROM "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>" T
|
||||||
|
WHERE T.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> = L_DEPARTMENT_NAME;
|
||||||
|
|
||||||
|
--<2D><><EFBFBD><EFBFBD>round<6E><64><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ȱ0<C8B1><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
SELECT DECODE(SUBSTR(A_RENEWAL_RATE_TARGET,
|
||||||
|
1,
|
||||||
|
1),
|
||||||
|
'.',
|
||||||
|
'0' || A_RENEWAL_RATE_TARGET,
|
||||||
|
A_RENEWAL_RATE_TARGET)
|
||||||
|
INTO A_RENEWAL_RATE_TARGET
|
||||||
|
FROM DUAL;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
A_RENEWAL_RATE := '0.0';
|
||||||
|
A_RENEWAL_RATE_TARGET := '0.0';
|
||||||
|
END;
|
||||||
|
|
||||||
--<2D><>ҵ<EFBFBD><D2B5>
|
--<2D><>ҵ<EFBFBD><D2B5>
|
||||||
SELECT ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD> + CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>),
|
A_TOTAL := 0;
|
||||||
0),
|
|
||||||
0)
|
|
||||||
INTO A_TOTAL
|
|
||||||
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
|
|
||||||
WHERE <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD> = A_DEPARTMENT_CODE
|
|
||||||
AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >= L_FIRSTDAY
|
|
||||||
AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <= SYSDATE;
|
|
||||||
--ÿ<><C3BF>ҵ<EFBFBD><D2B5>
|
--ÿ<><C3BF>ҵ<EFBFBD><D2B5>
|
||||||
OPEN A_MENSUAL_CUR FOR
|
OPEN A_MENSUAL_CUR FOR
|
||||||
SELECT CF.<2E>·<EFBFBD> MM,
|
SELECT CF.<2E>·<EFBFBD> MM,
|
||||||
@@ -136,92 +153,90 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
|||||||
|
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
-- <20><>ϯҵ<CFAF><D2B5>
|
-- <20><>ϯҵ<CFAF><D2B5>
|
||||||
PROCEDURE caller_archievement
|
PROCEDURE CALLER_ARCHIEVEMENT
|
||||||
(
|
(
|
||||||
a_caller_code IN VARCHAR2,
|
A_CALLER_CODE IN VARCHAR2,
|
||||||
a_attaching_rate OUT VARCHAR2,
|
A_ATTACHING_RATE OUT VARCHAR2,
|
||||||
a_renewal_rate OUT VARCHAR2,
|
A_RENEWAL_RATE OUT VARCHAR2,
|
||||||
a_total OUT INTEGER,
|
A_TOTAL OUT INTEGER,
|
||||||
a_present_month OUT NUMBER,
|
A_PRESENT_MONTH OUT NUMBER,
|
||||||
a_mensual_cur OUT cur_type
|
A_MENSUAL_CUR OUT CUR_TYPE
|
||||||
) IS
|
) IS
|
||||||
l_caller_name VARCHAR2(100);
|
L_CALLER_NAME VARCHAR2(100);
|
||||||
l_department_name VARCHAR2(100);
|
L_DEPARTMENT_NAME VARCHAR2(100);
|
||||||
--l_this_month VARCHAR2(4);
|
L_THIS_YEAR VARCHAR2(4);
|
||||||
l_this_year VARCHAR2(4);
|
L_ROWNUM INTEGER;
|
||||||
--l_firstday DATE;
|
|
||||||
l_rownum INTEGER;
|
|
||||||
BEGIN
|
BEGIN
|
||||||
--<2D><>ѯ<EFBFBD><D1AF>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD><C6A3>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>
|
--<2D><>ѯ<EFBFBD><D1AF>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD><C6A3>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>
|
||||||
BEGIN
|
BEGIN
|
||||||
/*SELECT zx.saler_name,
|
SELECT ZX.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>,
|
||||||
bm.department_name
|
BM.DEPARTMENT_NAME
|
||||||
INTO l_caller_name,
|
INTO L_CALLER_NAME,
|
||||||
l_department_name
|
L_DEPARTMENT_NAME
|
||||||
FROM tele_saler zx,
|
FROM TWR_TELSALER ZX,
|
||||||
tele_saler_team team,
|
TWR_TELSALER_TEAM T,
|
||||||
idst0.bm_t bm
|
IDST0.BM_T BM
|
||||||
WHERE zx.saler_code = a_caller_code
|
WHERE ZX.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD> = A_CALLER_CODE
|
||||||
AND zx.team_code = team.team_code
|
AND ZX.<2E>Ŷ<EFBFBD><C5B6><EFBFBD><EFBFBD><EFBFBD> = T.TEAM_NAME
|
||||||
AND team.department_code = bm.department_code;*/
|
AND T.DEPARTMENT_CODE = BM.DEPARTMENT_CODE;
|
||||||
SELECT ry.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>,
|
|
||||||
bm.department_name
|
|
||||||
INTO l_caller_name,
|
|
||||||
l_department_name
|
|
||||||
FROM twr_telsaler ry,
|
|
||||||
twr_telsaler_team team,
|
|
||||||
idst0.bm_t bm
|
|
||||||
WHERE ry.<2E>Ŷ<EFBFBD><C5B6><EFBFBD><EFBFBD><EFBFBD> = team.team_name
|
|
||||||
AND team.department_code = bm.department_code
|
|
||||||
AND ry.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD> = a_caller_code;
|
|
||||||
EXCEPTION
|
EXCEPTION
|
||||||
-- <20><><EFBFBD><EFBFBD>û<EFBFBD>в<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׳<EFBFBD><D7B3>쳣
|
-- <20><><EFBFBD><EFBFBD>û<EFBFBD>в<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׳<EFBFBD><D7B3>쳣
|
||||||
WHEN no_data_found THEN
|
WHEN NO_DATA_FOUND THEN
|
||||||
raise_application_error(CALLERCODE_EXCEPTION_CODE,
|
RAISE_APPLICATION_ERROR(CALLERCODE_EXCEPTION_CODE,
|
||||||
CALLERCODE_EXCEPTION_MSG);
|
CALLERCODE_EXCEPTION_MSG);
|
||||||
END;
|
END;
|
||||||
|
|
||||||
--l_this_month := to_char(SYSDATE,
|
L_THIS_YEAR := TO_CHAR(SYSDATE,
|
||||||
-- 'mm');
|
|
||||||
l_this_year := to_char(SYSDATE,
|
|
||||||
'yyyy');
|
'yyyy');
|
||||||
--l_firstday := to_date(l_this_year || '-01-01 00:00:00',
|
|
||||||
-- 'yyyy-mm-dd hh24:mi:ss');
|
|
||||||
|
|
||||||
--<2D>ܳ<EFBFBD><DCB3>ձ<EFBFBD><D5B1><EFBFBD>
|
--<2D>ܳ<EFBFBD><DCB3>ձ<EFBFBD><D5B1><EFBFBD>
|
||||||
SELECT round(nvl(SUM(cf.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
|
SELECT ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
|
||||||
0),
|
0),
|
||||||
2) bf
|
2) BF
|
||||||
INTO a_total
|
INTO A_TOTAL
|
||||||
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> cf
|
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
|
||||||
WHERE cf.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = l_caller_name
|
WHERE CF.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = L_CALLER_NAME
|
||||||
AND cf.<2E><><EFBFBD><EFBFBD> = l_department_name
|
AND CF.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME
|
||||||
AND cf.<2E><><EFBFBD><EFBFBD> = l_this_year;
|
AND CF.<2E><><EFBFBD><EFBFBD> = L_THIS_YEAR;
|
||||||
|
|
||||||
--<2D><><EFBFBD><CDB8>
|
--<2D><><EFBFBD><CDB8>
|
||||||
SELECT rownum,
|
BEGIN
|
||||||
round(nvl(t.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
|
SELECT ROWNUM,
|
||||||
|
ROUND(NVL(T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
|
||||||
0),
|
0),
|
||||||
2),
|
2),
|
||||||
round(nvl(t."<22><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>(<28><>)" * 10000,
|
ROUND(NVL(t."<22><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>(<28><>)" * 10000,
|
||||||
0),
|
0),
|
||||||
2)
|
2)
|
||||||
INTO l_rownum,
|
INTO L_ROWNUM,
|
||||||
a_attaching_rate,
|
A_ATTACHING_RATE,
|
||||||
a_present_month
|
A_PRESENT_MONTH
|
||||||
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t
|
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> T
|
||||||
WHERE t.<2E><><EFBFBD><EFBFBD> = l_caller_name
|
WHERE T.<2E><><EFBFBD><EFBFBD> = L_CALLER_NAME
|
||||||
AND rownum = 1;
|
AND ROWNUM = 1;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
L_ROWNUM := 1;
|
||||||
|
A_ATTACHING_RATE := 0.0;
|
||||||
|
A_PRESENT_MONTH := 0.0;
|
||||||
|
END;
|
||||||
|
|
||||||
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
SELECT rownum,
|
BEGIN
|
||||||
round(nvl(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)",
|
SELECT ROWNUM,
|
||||||
|
ROUND(NVL(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)",
|
||||||
0),
|
0),
|
||||||
2)
|
2)
|
||||||
INTO l_rownum,
|
INTO L_ROWNUM,
|
||||||
a_renewal_rate
|
A_RENEWAL_RATE
|
||||||
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t
|
FROM "BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>-24<32><34>" T
|
||||||
WHERE t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = l_caller_name
|
WHERE T.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = L_CALLER_NAME
|
||||||
AND rownum = 1;
|
AND ROWNUM = 1;
|
||||||
|
EXCEPTION
|
||||||
|
WHEN NO_DATA_FOUND THEN
|
||||||
|
L_ROWNUM := 1;
|
||||||
|
A_RENEWAL_RATE := 0.0;
|
||||||
|
END;
|
||||||
|
|
||||||
--ÿ<><C3BF>ҵ<EFBFBD><D2B5>
|
--ÿ<><C3BF>ҵ<EFBFBD><D2B5>
|
||||||
OPEN A_MENSUAL_CUR FOR
|
OPEN A_MENSUAL_CUR FOR
|
||||||
@@ -230,8 +245,8 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
|||||||
0),
|
0),
|
||||||
0) BF
|
0) BF
|
||||||
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
|
FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
|
||||||
WHERE cf.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = l_caller_name
|
WHERE CF.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = L_CALLER_NAME
|
||||||
AND cf.<2E><><EFBFBD><EFBFBD> = l_department_name
|
AND CF.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME
|
||||||
AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >= TO_DATE(TO_CHAR(SYSDATE,
|
AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >= TO_DATE(TO_CHAR(SYSDATE,
|
||||||
'yyyy') || '-01-01 00:00:00',
|
'yyyy') || '-01-01 00:00:00',
|
||||||
'yyyy-mm-dd hh24:mi:ss')
|
'yyyy-mm-dd hh24:mi:ss')
|
||||||
@@ -266,54 +281,27 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
|||||||
END;
|
END;
|
||||||
-- <20><><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD><DABA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
|
-- <20><><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD><DABA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
|
||||||
OPEN A_ATTACHING_RANKING_LIST FOR
|
OPEN A_ATTACHING_RANKING_LIST FOR
|
||||||
SELECT rownum,
|
SELECT ROWNUM,
|
||||||
paihang.<2E><><EFBFBD><EFBFBD> AS caller_name,
|
PAIHANG.<2E><><EFBFBD><EFBFBD> AS CALLER_NAME,
|
||||||
paihang.attaching_rate
|
PAIHANG.XBL AS ATTACHING_RATE
|
||||||
FROM (SELECT DISTINCT *
|
FROM (SELECT T.<2E><><EFBFBD><EFBFBD>,
|
||||||
FROM (SELECT t.<2E><><EFBFBD><EFBFBD>,
|
ROUND(T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
round(t.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
|
2) XBL
|
||||||
2) attaching_rate,
|
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> T
|
||||||
zuoxi.department_name
|
WHERE T.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME
|
||||||
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t,
|
ORDER BY T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8> DESC) PAIHANG;
|
||||||
(SELECT DISTINCT t.saler_code,
|
|
||||||
t.saler_name,
|
|
||||||
t.team_code,
|
|
||||||
team.team,
|
|
||||||
bm.department_name
|
|
||||||
FROM tele_saler t,
|
|
||||||
tele_saler_team team,
|
|
||||||
idst0.bm_t bm
|
|
||||||
WHERE t.team_code = team.team_code
|
|
||||||
AND team.department_code = bm.department_code
|
|
||||||
AND bm.department_name = L_DEPARTMENT_NAME) zuoxi
|
|
||||||
WHERE t.<2E><><EFBFBD><EFBFBD> = zuoxi.saler_name) st
|
|
||||||
ORDER BY st.department_name,
|
|
||||||
st.attaching_rate DESC) paihang;
|
|
||||||
-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
|
-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
|
||||||
OPEN A_RENEWAL_RANKING_LIST FOR
|
OPEN A_RENEWAL_RANKING_LIST FOR
|
||||||
SELECT rownum,
|
SELECT ROWNUM,
|
||||||
paihang.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> AS CALLER_NAME,
|
PAIHANG.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> AS CALLER_NAME,
|
||||||
paihang.xbl AS RENEWAL_RATE
|
PAIHANG.XBL AS RENEWAL_RATE
|
||||||
FROM (SELECT DISTINCT *
|
FROM (SELECT T.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
FROM (SELECT t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)",
|
||||||
round(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)",
|
2) XBL
|
||||||
2) xbl,
|
FROM "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>" T
|
||||||
zuoxi.department_name
|
WHERE T.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> = L_DEPARTMENT_NAME
|
||||||
FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t,
|
ORDER BY XBL DESC) PAIHANG;
|
||||||
(SELECT DISTINCT t.saler_code,
|
|
||||||
t.saler_name,
|
|
||||||
t.team_code,
|
|
||||||
team.team,
|
|
||||||
bm.department_name
|
|
||||||
FROM tele_saler t,
|
|
||||||
tele_saler_team team,
|
|
||||||
idst0.bm_t bm
|
|
||||||
WHERE t.team_code = team.team_code
|
|
||||||
AND team.department_code = bm.department_code
|
|
||||||
AND bm.department_name = L_DEPARTMENT_NAME) zuoxi
|
|
||||||
WHERE t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = zuoxi.saler_name) xb
|
|
||||||
ORDER BY xb.department_name,
|
|
||||||
xb.xbl DESC) paihang;
|
|
||||||
END;
|
END;
|
||||||
BEGIN
|
BEGIN
|
||||||
NULL;
|
NULL;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
CREATE OR REPLACE PACKAGE telsale_bi_utils IS
|
CREATE OR REPLACE PACKAGE TELSALE_BI_UTILS IS
|
||||||
|
|
||||||
-- Author : WANGWEI-202
|
-- Author : WANGWEI-202
|
||||||
-- Created : 2023/10/12 15:31:13
|
-- Created : 2023/10/12 15:31:13
|
||||||
@@ -12,9 +12,9 @@ CREATE OR REPLACE PACKAGE telsale_bi_utils IS
|
|||||||
|
|
||||||
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>;
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>;
|
||||||
|
|
||||||
END telsale_bi_utils;
|
END TELSALE_BI_UTILS;
|
||||||
/
|
/
|
||||||
CREATE OR REPLACE PACKAGE BODY telsale_bi_utils IS
|
CREATE OR REPLACE PACKAGE BODY TELSALE_BI_UTILS IS
|
||||||
|
|
||||||
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
||||||
BEGIN
|
BEGIN
|
||||||
@@ -23,7 +23,8 @@ CREATE OR REPLACE PACKAGE BODY telsale_bi_utils IS
|
|||||||
|
|
||||||
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
||||||
BEGIN
|
BEGIN
|
||||||
EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>';
|
--EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>';
|
||||||
|
EXECUTE IMMEDIATE 'truncate table "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>"';
|
||||||
END;
|
END;
|
||||||
|
|
||||||
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
||||||
@@ -33,11 +34,12 @@ CREATE OR REPLACE PACKAGE BODY telsale_bi_utils IS
|
|||||||
|
|
||||||
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
||||||
BEGIN
|
BEGIN
|
||||||
EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>';
|
--EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>';
|
||||||
|
EXECUTE IMMEDIATE 'truncate table "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>"';
|
||||||
END;
|
END;
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
-- Initialization
|
-- Initialization
|
||||||
NULL;
|
NULL;
|
||||||
END telsale_bi_utils;
|
END TELSALE_BI_UTILS;
|
||||||
/
|
/
|
||||||
|
45
code/db/pkg/telsale_bi_utils_dev.pck
Normal file
45
code/db/pkg/telsale_bi_utils_dev.pck
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
CREATE OR REPLACE PACKAGE TELSALE_BI_UTILS_DEV IS
|
||||||
|
|
||||||
|
-- Author : WANGWEI-202
|
||||||
|
-- Created : 2023/10/12 15:31:13
|
||||||
|
-- Purpose : bi<62><69><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĹ<D8B5><C4B9><EFBFBD>
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>;
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>;
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>;
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>;
|
||||||
|
|
||||||
|
END TELSALE_BI_UTILS_DEV;
|
||||||
|
/
|
||||||
|
CREATE OR REPLACE PACKAGE BODY TELSALE_BI_UTILS_DEV IS
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
||||||
|
BEGIN
|
||||||
|
EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>';
|
||||||
|
END;
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
||||||
|
BEGIN
|
||||||
|
--EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>';
|
||||||
|
EXECUTE IMMEDIATE 'truncate table "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>"';
|
||||||
|
END;
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
||||||
|
BEGIN
|
||||||
|
EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>';
|
||||||
|
END;
|
||||||
|
|
||||||
|
PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS
|
||||||
|
BEGIN
|
||||||
|
--EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>';
|
||||||
|
EXECUTE IMMEDIATE 'truncate table "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>"';
|
||||||
|
END;
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
-- Initialization
|
||||||
|
NULL;
|
||||||
|
END TELSALE_BI_UTILS_DEV;
|
||||||
|
/
|
3
code/db/宽表.sql
Normal file
3
code/db/宽表.sql
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
SELECT * FROM datacenter.kx_bi_c_kb_qd WHERE <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD> >= DATE '2023-01-01';
|
||||||
|
|
||||||
|
SELECT * FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD> CF WHERE <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>' ORDER BY ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC;
|
@@ -1,30 +1,30 @@
|
|||||||
SELECT *
|
SELECT *
|
||||||
FROM reward_gainers
|
FROM REWARD_GAINERS
|
||||||
FOR UPDATE;
|
FOR UPDATE;
|
||||||
|
|
||||||
SELECT b.reward_name,
|
SELECT B.REWARD_NAME,
|
||||||
a.*
|
A.*
|
||||||
FROM reward_gainers a,
|
FROM REWARD_GAINERS A,
|
||||||
reward_projects b
|
REWARD_PROJECTS B
|
||||||
WHERE a.reward_index = b.reward_index;
|
WHERE A.REWARD_INDEX = B.REWARD_INDEX;
|
||||||
|
|
||||||
--<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
--<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
SELECT DISTINCT s.saler_code,
|
SELECT DISTINCT S.SALER_CODE,
|
||||||
s.saler_name,
|
S.SALER_NAME,
|
||||||
t.team_code,
|
T.TEAM_CODE,
|
||||||
t.team,
|
T.TEAM,
|
||||||
bm.department_code,
|
BM.DEPARTMENT_CODE,
|
||||||
bm.department_name
|
BM.DEPARTMENT_NAME
|
||||||
FROM tele_saler s,
|
FROM TELE_SALER S,
|
||||||
tele_saler_team t,
|
TELE_SALER_TEAM T,
|
||||||
idst0.bm_t bm
|
IDST0.BM_T BM
|
||||||
WHERE s.team_code = t.team_code
|
WHERE S.TEAM_CODE = T.TEAM_CODE
|
||||||
AND t.department_code = bm.department_code
|
AND T.DEPARTMENT_CODE = BM.DEPARTMENT_CODE
|
||||||
AND s.saler_code = '61136';
|
AND S.SALER_CODE = '61136';
|
||||||
|
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM tele_saler_team t
|
FROM TELE_SALER_TEAM T
|
||||||
WHERE t.team_code = '107077'
|
WHERE T.TEAM_CODE = '107077'
|
||||||
|
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
|
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
@@ -35,7 +35,7 @@ SELECT *
|
|||||||
SELECT <EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
SELECT <EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD><EFBFBD><EFBFBD>,
|
SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD><EFBFBD><EFBFBD>,
|
||||||
round((SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)) * 100,
|
ROUND((SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)) * 100,
|
||||||
0) || '%' <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
0) || '%' <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>
|
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>
|
||||||
GROUP BY <EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
GROUP BY <EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||||
@@ -46,7 +46,7 @@ SELECT
|
|||||||
<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
SUM(<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
|
SUM(<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
|
||||||
SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>),
|
SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>),
|
||||||
round(SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
|
ROUND(SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
|
||||||
2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
|
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
GROUP BY <EFBFBD>·<EFBFBD>,
|
GROUP BY <EFBFBD>·<EFBFBD>,
|
||||||
@@ -57,7 +57,7 @@ HAVING
|
|||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC;
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC;
|
||||||
|
|
||||||
SELECT <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
SELECT <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
round(SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
|
ROUND(SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
|
||||||
2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
|
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
|
||||||
WHERE <EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD> = 'QDI'
|
WHERE <EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD> = 'QDI'
|
||||||
@@ -68,37 +68,37 @@ SELECT
|
|||||||
|
|
||||||
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
SELECT <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
SELECT <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||||
round(nvl(SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
|
ROUND(NVL(SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
|
||||||
0),
|
0),
|
||||||
2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD> xb
|
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD> XB
|
||||||
WHERE xb.<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
WHERE XB.<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
||||||
GROUP BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
GROUP BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
ORDER BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC;
|
ORDER BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC;
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
SELECT zx.saler_name,
|
SELECT ZX.SALER_NAME,
|
||||||
bm.department_name
|
BM.DEPARTMENT_NAME
|
||||||
FROM tele_saler zx,
|
FROM TELE_SALER ZX,
|
||||||
tele_saler_team team,
|
TELE_SALER_TEAM TEAM,
|
||||||
idst0.bm_t bm
|
IDST0.BM_T BM
|
||||||
WHERE zx.saler_name = '<EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD>'
|
WHERE ZX.SALER_NAME = '<EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD>'
|
||||||
AND zx.team_code = team.team_code
|
AND ZX.TEAM_CODE = TEAM.TEAM_CODE
|
||||||
AND team.department_code = bm.department_code;
|
AND TEAM.DEPARTMENT_CODE = BM.DEPARTMENT_CODE;
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
/*
|
/*
|
||||||
truncate table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>;
|
truncate table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD> t
|
FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD> T
|
||||||
WHERE t.<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD>';
|
WHERE T.<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
||||||
|
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>
|
FROM "BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>-24<32><34>"
|
||||||
WHERE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD>';
|
WHERE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
||||||
|
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>;
|
FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>;
|
||||||
|
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>;
|
FROM "BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>-24<32><34>";
|
||||||
|
17
code/web/task_schedule/pack.txt
Normal file
17
code/web/task_schedule/pack.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
npm uninstall `
|
||||||
|
@babel/eslint-parser `
|
||||||
|
@rushstack/eslint-patch `
|
||||||
|
@typescript-eslint/eslint-plugin `
|
||||||
|
@vitejs/plugin-vue `
|
||||||
|
@vue/cli-plugin-eslint `
|
||||||
|
@vue/eslint-config-typescript `
|
||||||
|
babel `
|
||||||
|
eslint-config-recommended `
|
||||||
|
eslint-config-standard-with-typescript `
|
||||||
|
eslint-plugin-vue `
|
||||||
|
node-sass `
|
||||||
|
sass `
|
||||||
|
sass-loader `
|
||||||
|
style-loader `
|
||||||
|
ts-node `
|
||||||
|
vue-eslint-parser
|
40
code/web/task_schedule/package copy.json
Normal file
40
code/web/task_schedule/package copy.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"name": "task_schedule",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vite build",
|
||||||
|
"preview": "vite preview"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@element-plus/icons-vue": "^2.3.1",
|
||||||
|
"echarts": "^5.4.3",
|
||||||
|
"element-plus": "^2.5.3",
|
||||||
|
"mitt": "^3.0.1",
|
||||||
|
"moment": "^2.30.1",
|
||||||
|
"vue": "^3.4.15",
|
||||||
|
"vue-router": "^4.2.5",
|
||||||
|
"vuex": "^4.1.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/eslint-parser": "^7.23.3",
|
||||||
|
"@rushstack/eslint-patch": "^1.7.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
||||||
|
"@vitejs/plugin-vue": "^5.0.3",
|
||||||
|
"@vue/cli-plugin-eslint": "^5.0.8",
|
||||||
|
"@vue/eslint-config-typescript": "^12.0.0",
|
||||||
|
"axios": "^1.6.6",
|
||||||
|
"babel": "^6.23.0",
|
||||||
|
"eslint-config-recommended": "^4.1.0",
|
||||||
|
"eslint-config-standard-with-typescript": "^43.0.1",
|
||||||
|
"eslint-plugin-vue": "^9.20.1",
|
||||||
|
"node-sass": "^9.0.0",
|
||||||
|
"sass": "^1.70.0",
|
||||||
|
"sass-loader": "^14.0.0",
|
||||||
|
"style-loader": "^3.3.4",
|
||||||
|
"ts-node": "^10.9.2",
|
||||||
|
"vue-eslint-parser": "^9.4.2"
|
||||||
|
}
|
||||||
|
}
|
11484
code/web/task_schedule/package-lock.json
generated
11484
code/web/task_schedule/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,32 +9,22 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.3.1",
|
"@element-plus/icons-vue": "^2.3.2",
|
||||||
"echarts": "^5.4.3",
|
"axios": "^1.11.0",
|
||||||
"element-plus": "^2.4.3",
|
"echarts": "^6.0.0",
|
||||||
|
"element-plus": "^2.11.1",
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.30.1",
|
||||||
"sass-loader": "^13.3.2",
|
"task_schedule": "file:",
|
||||||
"vue": "^3.3.11",
|
"vue": "^3.5.21",
|
||||||
"vue-router": "^4.2.5",
|
"vue-router": "^4.5.1",
|
||||||
"vuex": "^4.1.0"
|
"vuex": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/eslint-parser": "^7.23.3",
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
"@rushstack/eslint-patch": "^1.6.0",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^6.13.2",
|
|
||||||
"@vitejs/plugin-vue": "^4.5.2",
|
|
||||||
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
||||||
"@vue/eslint-config-typescript": "^12.0.0",
|
|
||||||
"axios": "^1.6.2",
|
|
||||||
"babel": "^6.23.0",
|
|
||||||
"eslint-config-recommended": "^4.1.0",
|
"eslint-config-recommended": "^4.1.0",
|
||||||
"eslint-config-standard-with-typescript": "^42.0.0",
|
"eslint-config-standard-with-typescript": "^43.0.1",
|
||||||
"eslint-plugin-vue": "^9.19.2",
|
"eslint-plugin-vue": "^10.4.0",
|
||||||
"node-sass": "^9.0.0",
|
"ts-node": "^10.9.2"
|
||||||
"sass": "^1.69.5",
|
|
||||||
"style-loader": "^3.3.3",
|
|
||||||
"ts-node": "^10.9.2",
|
|
||||||
"vue-eslint-parser": "^9.3.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -12,18 +12,18 @@
|
|||||||
<el-progress
|
<el-progress
|
||||||
type="circle"
|
type="circle"
|
||||||
:percentage="ui.percentage"
|
:percentage="ui.percentage"
|
||||||
status="success"
|
:status="ui.warningLevel"
|
||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<span class="percentage-label">{{ ui.indicator }}</span>
|
<span class="percentage-label">{{ ui.indicator }}</span>
|
||||||
<span class="percentage-value">{{ percentage }}%</span>
|
<span :class="warningLevelClass">{{ percentage }}%</span>
|
||||||
</template>
|
</template>
|
||||||
</el-progress>
|
</el-progress>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { reactive } from "vue";
|
import { reactive, computed } from "vue";
|
||||||
export default {
|
export default {
|
||||||
name: "ArchievementCompleteRateComponent",
|
name: "ArchievementCompleteRateComponent",
|
||||||
props: {
|
props: {
|
||||||
@@ -36,17 +36,42 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
warningLevel: { // 警告等级
|
||||||
|
type: String,
|
||||||
|
default: "success",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup( props )
|
setup( props )
|
||||||
{
|
{
|
||||||
const percentage = Number( props.percentage ).valueOf();
|
const percentage = Number( props.percentage ).valueOf();
|
||||||
|
|
||||||
|
const warningLevelClass = computed((): string =>
|
||||||
|
{
|
||||||
|
let textClass = "";
|
||||||
|
|
||||||
|
if ( props.warningLevel === "success" )
|
||||||
|
{
|
||||||
|
textClass = "percentage-value";
|
||||||
|
}
|
||||||
|
else if ( props.warningLevel === "warning" )
|
||||||
|
{
|
||||||
|
textClass = "percentage-value-warning";
|
||||||
|
}
|
||||||
|
else if ( props.warningLevel === "exception" )
|
||||||
|
{
|
||||||
|
textClass = "percentage-value-exception";
|
||||||
|
}
|
||||||
|
|
||||||
|
return textClass;
|
||||||
|
});
|
||||||
|
|
||||||
const ui = reactive({
|
const ui = reactive({
|
||||||
percentage,
|
percentage,
|
||||||
indicator: props.indicator,
|
indicator: props.indicator,
|
||||||
|
warningLevel: props.warningLevel,
|
||||||
});
|
});
|
||||||
|
|
||||||
return { ui, };
|
return { ui, warningLevelClass, };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -74,6 +99,21 @@ export default {
|
|||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.percentage-value-warning {
|
||||||
|
display: block;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 28px;
|
||||||
|
color: #e59f46;
|
||||||
|
}
|
||||||
|
|
||||||
|
.percentage-value-exception {
|
||||||
|
display: block;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 28px;
|
||||||
|
color: red;
|
||||||
|
// color: #f3666b;
|
||||||
|
}
|
||||||
|
|
||||||
.percentage-label {
|
.percentage-label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
@@ -78,32 +78,22 @@
|
|||||||
// @ts-expect-error 之后再补充类型文件
|
// @ts-expect-error 之后再补充类型文件
|
||||||
import { hasOnlyChild } from "@/router/index.js";
|
import { hasOnlyChild } from "@/router/index.js";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
// import { useRoute, useRouter, type RouteRecordNormalized, type _RouteRecordBase } from "vue-router";
|
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
// declare interface SideBarRouteRecordNormalized extends RouteRecordNormalized
|
|
||||||
// {
|
|
||||||
// hidden?: boolean;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// declare interface SideBarRouteRecordSingleView extends _RouteRecordBase
|
|
||||||
// {
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "LayoutAside",
|
name: "LayoutAside",
|
||||||
setup()
|
setup()
|
||||||
{
|
{
|
||||||
|
const userRout = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const routes = router.getRoutes();// as SideBarRouteRecordNormalized[];
|
const routes = router.getRoutes();// as SideBarRouteRecordNormalized[];
|
||||||
|
|
||||||
const currentPath = computed(() =>
|
const currentPath = computed(() =>
|
||||||
{
|
{
|
||||||
return useRoute().path;
|
return userRout.path;
|
||||||
});
|
});
|
||||||
|
|
||||||
return { routes, currentPath, hasOnlyChild, };
|
return { userRout, routes, currentPath, hasOnlyChild, };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
<span class="company-name">CPIC</span>
|
<span class="company-name">CPIC</span>
|
||||||
<div class="version-wrapper">
|
<div class="version-wrapper">
|
||||||
<span>桌面霸屏后台管理</span>
|
<span>桌面霸屏后台管理</span>
|
||||||
<span>Build-20230915</span>
|
<span>Build-20240111</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons-wrapper">
|
<div class="buttons-wrapper">
|
||||||
<component
|
<component
|
||||||
|
89
code/web/task_schedule/src/test/identify.ts
Normal file
89
code/web/task_schedule/src/test/identify.ts
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-05-25 21:55:14
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /task_schedule/src/test/identify.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { type AxiosResponse } from "axios";
|
||||||
|
import { service as instance } from "../utils/api/request.js";
|
||||||
|
import { API_URL } from "../utils/api/config.js";
|
||||||
|
// import { login, loginCaller, type LoginCallerInfo } from "../utils/account.js";
|
||||||
|
|
||||||
|
interface LoginInfo
|
||||||
|
{
|
||||||
|
p13account: string;
|
||||||
|
password: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface LoginCallerInfo
|
||||||
|
{
|
||||||
|
telsaler_code: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loginCaller( data: LoginCallerInfo ): Promise<AxiosResponse<any, any>>
|
||||||
|
{
|
||||||
|
return await instance.request(
|
||||||
|
{
|
||||||
|
method: "post",
|
||||||
|
url: API_URL.URL_LOGIN_CALLER,
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function loginTestCaller(): void
|
||||||
|
{
|
||||||
|
const info: LoginCallerInfo =
|
||||||
|
{
|
||||||
|
telsaler_code: "61136",
|
||||||
|
};
|
||||||
|
|
||||||
|
loginCaller( info )
|
||||||
|
.then(( response ) =>
|
||||||
|
{
|
||||||
|
console.log( response.data );
|
||||||
|
})
|
||||||
|
.catch(( error ) =>
|
||||||
|
{
|
||||||
|
console.log( error );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function newCitizen( data: any ): Promise<AxiosResponse<any, any>>
|
||||||
|
{
|
||||||
|
return await instance.request(
|
||||||
|
{
|
||||||
|
method: "post",
|
||||||
|
url: "http://10.39.0.41:8081/NewCitizen/identify.do",
|
||||||
|
data,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function testNewCitizen(): void
|
||||||
|
{
|
||||||
|
const data = {
|
||||||
|
idcard_no: "350402198106130016",
|
||||||
|
name: "王炜",
|
||||||
|
};
|
||||||
|
|
||||||
|
newCitizen( data )
|
||||||
|
.then(( response ) =>
|
||||||
|
{
|
||||||
|
console.log( response.data );
|
||||||
|
})
|
||||||
|
.catch(( error ) =>
|
||||||
|
{
|
||||||
|
console.log( error );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
loginTestCaller,
|
||||||
|
testNewCitizen,
|
||||||
|
type LoginInfo,
|
||||||
|
type LoginCallerInfo
|
||||||
|
};
|
50
code/web/task_schedule/src/test/requestTest.ts
Normal file
50
code/web/task_schedule/src/test/requestTest.ts
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
import { type AxiosResponse } from "axios";
|
||||||
|
import { service as instance } from "../utils/api/request.js";
|
||||||
|
import { API_URL } from "../utils/api/config.js";
|
||||||
|
// import { login, loginCaller, type LoginCallerInfo } from "../utils/account.js";
|
||||||
|
|
||||||
|
interface LoginInfo
|
||||||
|
{
|
||||||
|
p13account: string;
|
||||||
|
password: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface LoginCallerInfo
|
||||||
|
{
|
||||||
|
telsaler_code: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loginCaller( data: LoginCallerInfo ): Promise<AxiosResponse<any, any>>
|
||||||
|
{
|
||||||
|
return await instance.request(
|
||||||
|
{
|
||||||
|
method: "post",
|
||||||
|
url: API_URL.URL_LOGIN_CALLER,
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function loginTestCaller(): void
|
||||||
|
{
|
||||||
|
const info: LoginCallerInfo =
|
||||||
|
{
|
||||||
|
telsaler_code: "61136",
|
||||||
|
};
|
||||||
|
|
||||||
|
loginCaller( info )
|
||||||
|
.then(( response ) =>
|
||||||
|
{
|
||||||
|
console.log( response.data );
|
||||||
|
})
|
||||||
|
.catch(( error ) =>
|
||||||
|
{
|
||||||
|
console.log( error );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
loginTestCaller,
|
||||||
|
type LoginInfo,
|
||||||
|
type LoginCallerInfo
|
||||||
|
};
|
35
code/web/task_schedule/src/test/testBI.ts
Normal file
35
code/web/task_schedule/src/test/testBI.ts
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-11-06 14:50:08
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /task_schedule/src/test/testBI.ts
|
||||||
|
* @Description: 测试bi相关的代码
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
import {
|
||||||
|
type BIReportType,
|
||||||
|
type ImportBIReportRequest,
|
||||||
|
type ImportBIReportResponse,
|
||||||
|
type ImportBIReportResponseHandler,
|
||||||
|
type BITelsalerAttachingRateRecord,
|
||||||
|
type QueryBITelsalerAttachingRateReportResponse,
|
||||||
|
type QueryBITelsalerAttachingRateDataHandler,
|
||||||
|
type BITelsalerRenewalRateRecord,
|
||||||
|
importBIReport,
|
||||||
|
queryBITelsalerAttachingRateData
|
||||||
|
} from "../utils/BIReport.ts";
|
||||||
|
|
||||||
|
function handler( response: QueryBITelsalerAttachingRateReportResponse, error: any ): void
|
||||||
|
{
|
||||||
|
if ( response.success )
|
||||||
|
{
|
||||||
|
console.log( response );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
console.log( error );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
queryBITelsalerAttachingRateData( handler );
|
28
code/web/task_schedule/src/test/testCallerArchievement.ts
Normal file
28
code/web/task_schedule/src/test/testCallerArchievement.ts
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-08-28 16:02:11
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /task_schedule/src/test/testCallerArchievement.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
import { queryCallerArchievement, type CallerArchievement } from "../utils/archievement.js";
|
||||||
|
import { type TelSaler } from "../types/cpicxim/TelSaler.js";
|
||||||
|
|
||||||
|
const callInfo: TelSaler =
|
||||||
|
{
|
||||||
|
telSalerCode: "61136",
|
||||||
|
telSalerName: "陈榕榕",
|
||||||
|
teamCode: "",
|
||||||
|
teamName: "",
|
||||||
|
departmentCode: "",
|
||||||
|
departmentName: "",
|
||||||
|
};
|
||||||
|
|
||||||
|
function render(): void
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
queryCallerArchievement( callInfo, render );
|
31
code/web/task_schedule/src/test/testRankingListRequest.ts
Normal file
31
code/web/task_schedule/src/test/testRankingListRequest.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-06-07 10:16:00
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /task_schedule/src/test/testRankingListRequest.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
import { type AxiosResponse } from "axios";
|
||||||
|
// import { service as instance } from "../utils/api/request.js";
|
||||||
|
// import { API_URL } from "../utils/api/config.js";
|
||||||
|
// import { type RankingListItem } from "../types/cpicxim/RankingListItem.js";
|
||||||
|
import {
|
||||||
|
type RankingListRequest,
|
||||||
|
type RankingListResponse,
|
||||||
|
requestRankingList
|
||||||
|
} from "../utils/ranking.js";
|
||||||
|
|
||||||
|
function testRankingListRequest(): void
|
||||||
|
{
|
||||||
|
const req: RankingListRequest = {
|
||||||
|
departmentCode: "QDI",
|
||||||
|
year: "2023",
|
||||||
|
month: "06",
|
||||||
|
};
|
||||||
|
|
||||||
|
requestRankingList( req );
|
||||||
|
}
|
||||||
|
|
||||||
|
export { testRankingListRequest };
|
30
code/web/task_schedule/src/test/testRewardRequest.ts
Normal file
30
code/web/task_schedule/src/test/testRewardRequest.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-09-11 14:16:30
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /task_schedule/src/test/testRewardRequest.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {
|
||||||
|
type RewardProject,
|
||||||
|
type RewardGainer,
|
||||||
|
type RewardProjectResponse,
|
||||||
|
requestRewardPorjectsList,
|
||||||
|
requestRewardGainers
|
||||||
|
} from "../utils/reward.js";
|
||||||
|
|
||||||
|
function render( data: any, error?: any ): void
|
||||||
|
{
|
||||||
|
console.log( data );
|
||||||
|
|
||||||
|
if ( error !== null )
|
||||||
|
{
|
||||||
|
console.log( "请求失败,", error );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
requestRewardPorjectsList( render );
|
||||||
|
requestRewardGainers( render );
|
@@ -11,10 +11,12 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"noEmit": true,
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"module": "ESNext",
|
"module": "NodeNext",
|
||||||
// "module": "CommonJS",
|
// "module": "CommonJS",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "NodeNext",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
@@ -47,6 +49,7 @@
|
|||||||
"./node_modules",
|
"./node_modules",
|
||||||
],
|
],
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"esm": true
|
"esm": true,
|
||||||
|
"require": ["tsconfig-paths/register"],
|
||||||
},
|
},
|
||||||
}
|
}
|
@@ -7,8 +7,8 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
import { service as instance } from "./api/request.js";
|
import { service as instance } from "./api/request.ts";
|
||||||
import { API_URL } from "./api/config.js";
|
import { API_URL } from "./api/config.ts";
|
||||||
import { type AxiosResponse } from "axios";
|
import { type AxiosResponse } from "axios";
|
||||||
interface BIReportType
|
interface BIReportType
|
||||||
{
|
{
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
// 请求的url
|
||||||
const API_URL = {
|
const API_URL = {
|
||||||
// 登录
|
// 登录
|
||||||
URL_LOGIN: import.meta.env.VITE_URL_LOGIN,
|
URL_LOGIN: import.meta.env.VITE_URL_LOGIN,
|
||||||
|
@@ -27,6 +27,7 @@ function loadStaffInfo(): StaffInfo
|
|||||||
obj = {};
|
obj = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
const stuff = new StaffInfo(
|
const stuff = new StaffInfo(
|
||||||
obj._p13uid ?? "",
|
obj._p13uid ?? "",
|
||||||
obj._stuffCode ?? "",
|
obj._stuffCode ?? "",
|
||||||
@@ -35,7 +36,7 @@ function loadStaffInfo(): StaffInfo
|
|||||||
obj._department_name ?? "",
|
obj._department_name ?? "",
|
||||||
obj._section_office_code ?? "",
|
obj._section_office_code ?? "",
|
||||||
obj._section_office_name ?? "" );
|
obj._section_office_name ?? "" );
|
||||||
|
/* eslint-enable */
|
||||||
return stuff;
|
return stuff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ import axios, { type AxiosInstance } from "axios";
|
|||||||
const service: AxiosInstance = axios.create(
|
const service: AxiosInstance = axios.create(
|
||||||
{
|
{
|
||||||
baseURL: "",
|
baseURL: "",
|
||||||
timeout: 10000,
|
timeout: 30000,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
18
code/web/task_schedule/src/utils/api/systemParameters.ts
Normal file
18
code/web/task_schedule/src/utils/api/systemParameters.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-12-20 23:02:53
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /task_schedule/src/utils/api/systemParameters.ts
|
||||||
|
* @Description: 应用参数相关的代码
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
// import { service as instance } from "@/utils/api/request.ts";
|
||||||
|
|
||||||
|
interface SystemParameter
|
||||||
|
{
|
||||||
|
paramterName: string;
|
||||||
|
parameterValue: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { type SystemParameter };
|
@@ -7,10 +7,10 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
import { service as instance } from "./api/request.js";
|
import { service as instance } from "./api/request.ts";
|
||||||
import { API_URL } from "./api/config.js";
|
import { API_URL } from "./api/config.ts";
|
||||||
import { type Department } from "../types/cpicxim/Department.js";
|
import { type Department } from "../types/cpicxim/Department.ts";
|
||||||
import { type TelSaler } from "../types/cpicxim/TelSaler.js";
|
import { type TelSaler } from "../types/cpicxim/TelSaler.ts";
|
||||||
import { type AxiosResponse } from "axios";
|
import { type AxiosResponse } from "axios";
|
||||||
|
|
||||||
interface DepartmentArchievement // 定义业绩对象的结构
|
interface DepartmentArchievement // 定义业绩对象的结构
|
||||||
@@ -20,7 +20,9 @@ interface DepartmentArchievement // 定义业绩对象的结构
|
|||||||
total_archievement: number;
|
total_archievement: number;
|
||||||
mensual_archievement_list: number[];
|
mensual_archievement_list: number[];
|
||||||
insurance_renewal_rate: string;
|
insurance_renewal_rate: string;
|
||||||
|
insurance_renewal_rate_target: string;
|
||||||
attaching_rate: string;
|
attaching_rate: string;
|
||||||
|
attaching_rate_target: string;
|
||||||
leading_reward_gainers: string[];
|
leading_reward_gainers: string[];
|
||||||
advance_reward_gainers: string[];
|
advance_reward_gainers: string[];
|
||||||
backward_list: string[];
|
backward_list: string[];
|
||||||
@@ -57,7 +59,9 @@ function queryDepartmentArchievement( departmentInfo: Department, render: any ):
|
|||||||
total_archievement: 0,
|
total_archievement: 0,
|
||||||
mensual_archievement_list: [],
|
mensual_archievement_list: [],
|
||||||
insurance_renewal_rate: "",
|
insurance_renewal_rate: "",
|
||||||
|
insurance_renewal_rate_target: "",
|
||||||
attaching_rate: "",
|
attaching_rate: "",
|
||||||
|
attaching_rate_target: "",
|
||||||
leading_reward_gainers: [],
|
leading_reward_gainers: [],
|
||||||
advance_reward_gainers: [],
|
advance_reward_gainers: [],
|
||||||
backward_list: [],
|
backward_list: [],
|
||||||
@@ -78,7 +82,9 @@ function queryDepartmentArchievement( departmentInfo: Department, render: any ):
|
|||||||
archievement.total_archievement = data.total_archievement;
|
archievement.total_archievement = data.total_archievement;
|
||||||
archievement.mensual_archievement_list = [];
|
archievement.mensual_archievement_list = [];
|
||||||
archievement.insurance_renewal_rate = data.insurance_renewal_rate ?? "0.0";
|
archievement.insurance_renewal_rate = data.insurance_renewal_rate ?? "0.0";
|
||||||
|
archievement.insurance_renewal_rate_target = data.insurance_renewal_rate_target ?? "0.0";
|
||||||
archievement.attaching_rate = data.attaching_rate ?? "0.0";
|
archievement.attaching_rate = data.attaching_rate ?? "0.0";
|
||||||
|
archievement.attaching_rate_target = data.attaching_rate_target ?? "0.0";
|
||||||
archievement.leading_reward_gainers = data.leading_reward_gainers ?? [];
|
archievement.leading_reward_gainers = data.leading_reward_gainers ?? [];
|
||||||
archievement.advance_reward_gainers = data.advance_reward_gainers ?? [];
|
archievement.advance_reward_gainers = data.advance_reward_gainers ?? [];
|
||||||
archievement.backward_list = data.backward_list ?? [];
|
archievement.backward_list = data.backward_list ?? [];
|
||||||
@@ -87,7 +93,7 @@ function queryDepartmentArchievement( departmentInfo: Department, render: any ):
|
|||||||
data.mensual_archievement_list.sort(( a: any, b: any ) => a.month - b.month );
|
data.mensual_archievement_list.sort(( a: any, b: any ) => a.month - b.month );
|
||||||
data.mensual_archievement_list.forEach(( item: any ) =>
|
data.mensual_archievement_list.forEach(( item: any ) =>
|
||||||
{
|
{
|
||||||
archievement.mensual_archievement_list.push( item.premium );
|
archievement.mensual_archievement_list.push( item.premium ); // eslint-disable-line
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log( "每月业绩", archievement );
|
console.log( "每月业绩", archievement );
|
||||||
@@ -163,7 +169,7 @@ function queryCallerArchievement( callerInfo: TelSaler, render: any ): void
|
|||||||
callArchievement.attaching_rate = data.attaching_rate ?? "0.0";
|
callArchievement.attaching_rate = data.attaching_rate ?? "0.0";
|
||||||
|
|
||||||
// 检查业绩清单有没有缺漏,缺漏的用0补上
|
// 检查业绩清单有没有缺漏,缺漏的用0补上
|
||||||
const checkedList = checkMensualArchievement( data.mensual_archievement_list );
|
const checkedList = checkMensualArchievement( data.mensual_archievement_list ); // eslint-disable-line
|
||||||
|
|
||||||
// 排序一下
|
// 排序一下
|
||||||
checkedList.sort(( a: MenusalArchievementItem, b: MenusalArchievementItem ): number =>
|
checkedList.sort(( a: MenusalArchievementItem, b: MenusalArchievementItem ): number =>
|
||||||
|
@@ -7,9 +7,9 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
import { service as instance } from "./api/request.js";
|
import { service as instance } from "./api/request.ts";
|
||||||
import { API_URL } from "./api/config.js";
|
import { API_URL } from "./api/config.ts";
|
||||||
import { type RankingListItem } from "../types/cpicxim/RankingListItem.js";
|
import { type RankingListItem } from "../types/cpicxim/RankingListItem.ts";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于请求排行榜数据请求参数
|
* 用于请求排行榜数据请求参数
|
||||||
@@ -33,7 +33,7 @@ interface RankingListResponse
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 判断用的正则表达式
|
// 判断用的正则表达式
|
||||||
const regexMonth = "(0[1-9])|(1[0-2])";
|
const regexMonth = "(0[1-9])|(1[0-2])"; // eslint-disable-line
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求坐席排行榜。
|
* 请求坐席排行榜。
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
import { type AxiosResponse } from "axios";
|
import { type AxiosResponse } from "axios";
|
||||||
import { service as instance } from "./api/request.js";
|
import { service as instance } from "./api/request.ts";
|
||||||
import { API_URL } from "./api/config.js";
|
import { API_URL } from "./api/config.ts";
|
||||||
|
|
||||||
interface RewardProject
|
interface RewardProject
|
||||||
{
|
{
|
||||||
@@ -103,7 +103,7 @@ function requestRewardPorjectsList( handler: any ): void
|
|||||||
const data = response.data ?? {};
|
const data = response.data ?? {};
|
||||||
rewardResponse.success = data.success ?? false;
|
rewardResponse.success = data.success ?? false;
|
||||||
rewardResponse.message = data.message ?? "";
|
rewardResponse.message = data.message ?? "";
|
||||||
rewardResponse.rewardList = checkRewardProjects( data.rewardList ?? []);
|
rewardResponse.rewardList = checkRewardProjects( data.rewardList ?? []); // eslint-disable-line
|
||||||
|
|
||||||
handler( rewardResponse, null );
|
handler( rewardResponse, null );
|
||||||
})
|
})
|
||||||
@@ -144,7 +144,7 @@ function requestRewardGainers( handler: any ): void
|
|||||||
|
|
||||||
rewardResponse.success = data.success;
|
rewardResponse.success = data.success;
|
||||||
rewardResponse.message = data.message;
|
rewardResponse.message = data.message;
|
||||||
rewardResponse.gainerList = checkRewardGainers( data.gainerList );
|
rewardResponse.gainerList = checkRewardGainers( data.gainerList ); // eslint-disable-line
|
||||||
|
|
||||||
handler( rewardResponse, null );
|
handler( rewardResponse, null );
|
||||||
})
|
})
|
||||||
|
@@ -25,10 +25,12 @@
|
|||||||
<ArchievementCompleteRateComponent
|
<ArchievementCompleteRateComponent
|
||||||
indicator="续保完成率"
|
indicator="续保完成率"
|
||||||
:percentage="ui.insurance_renewal_rate"
|
:percentage="ui.insurance_renewal_rate"
|
||||||
|
:warning-level="renewalRateWarningLevel(ui.insurance_renewal_rate_target)"
|
||||||
/>
|
/>
|
||||||
<ArchievementCompleteRateComponent
|
<ArchievementCompleteRateComponent
|
||||||
indicator="车非渗透率"
|
indicator="车非渗透率"
|
||||||
:percentage="ui.attaching_rate"
|
:percentage="ui.attaching_rate"
|
||||||
|
:warning-level="attachingRateWarningLevel(ui.attaching_rate_target)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="total-archievement-charts-wrapper">
|
<div class="total-archievement-charts-wrapper">
|
||||||
@@ -103,7 +105,9 @@ interface ui
|
|||||||
chartData: number[];
|
chartData: number[];
|
||||||
totalArchievement: number;
|
totalArchievement: number;
|
||||||
attaching_rate: string;
|
attaching_rate: string;
|
||||||
|
attaching_rate_target: string;
|
||||||
insurance_renewal_rate: string; // 续保率
|
insurance_renewal_rate: string; // 续保率
|
||||||
|
insurance_renewal_rate_target: string; // 续保率
|
||||||
leading_reward_gainers: string[]; // 领跑奖
|
leading_reward_gainers: string[]; // 领跑奖
|
||||||
advance_reward_gainers: string[]; // 飞跃奖
|
advance_reward_gainers: string[]; // 飞跃奖
|
||||||
dishonorPersons: string[];
|
dishonorPersons: string[];
|
||||||
@@ -153,7 +157,9 @@ export default {
|
|||||||
chartData: [0,], // 业绩表
|
chartData: [0,], // 业绩表
|
||||||
totalArchievement: 0, // 总业绩
|
totalArchievement: 0, // 总业绩
|
||||||
attaching_rate: "", // 车非渗透率
|
attaching_rate: "", // 车非渗透率
|
||||||
|
attaching_rate_target: "", // 车非渗透率目标值
|
||||||
insurance_renewal_rate: "", // 续保率
|
insurance_renewal_rate: "", // 续保率
|
||||||
|
insurance_renewal_rate_target: "", // 续保率目标值
|
||||||
leading_reward_gainers: ["",], // 领跑奖
|
leading_reward_gainers: ["",], // 领跑奖
|
||||||
advance_reward_gainers: ["",], // 飞跃奖
|
advance_reward_gainers: ["",], // 飞跃奖
|
||||||
dishonorPersons: ["",],
|
dishonorPersons: ["",],
|
||||||
@@ -201,7 +207,9 @@ export default {
|
|||||||
// ui.chartData = data.mensual_archievement_list;
|
// ui.chartData = data.mensual_archievement_list;
|
||||||
// ui.totalArchievement = data.total_archievement;
|
// ui.totalArchievement = data.total_archievement;
|
||||||
ui.attaching_rate = data.attaching_rate;
|
ui.attaching_rate = data.attaching_rate;
|
||||||
|
ui.attaching_rate_target = data.attaching_rate_target;
|
||||||
ui.insurance_renewal_rate = data.insurance_renewal_rate;
|
ui.insurance_renewal_rate = data.insurance_renewal_rate;
|
||||||
|
ui.insurance_renewal_rate_target = data.insurance_renewal_rate_target;
|
||||||
ui.leading_reward_gainers = data.leading_reward_gainers;
|
ui.leading_reward_gainers = data.leading_reward_gainers;
|
||||||
ui.advance_reward_gainers = data.advance_reward_gainers;
|
ui.advance_reward_gainers = data.advance_reward_gainers;
|
||||||
ui.dishonorPersons = data.backward_list;
|
ui.dishonorPersons = data.backward_list;
|
||||||
@@ -331,6 +339,52 @@ export default {
|
|||||||
clearInterval( timerHandler );
|
clearInterval( timerHandler );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const attachingRateWarningLevel = ( attachingRateTarget: string ): string =>
|
||||||
|
{
|
||||||
|
const value: number = Number( attachingRateTarget );
|
||||||
|
let warningLevel = "";
|
||||||
|
|
||||||
|
console.log( "渗透率目标差值", attachingRateTarget, value );
|
||||||
|
|
||||||
|
if ( value >= 0.0 )
|
||||||
|
{
|
||||||
|
warningLevel = "success";
|
||||||
|
}
|
||||||
|
else if ( value > -0.5 && value < 0.0 )
|
||||||
|
{
|
||||||
|
warningLevel = "warning";
|
||||||
|
}
|
||||||
|
else if ( value <= -0.5 )
|
||||||
|
{
|
||||||
|
warningLevel = "exception";
|
||||||
|
}
|
||||||
|
|
||||||
|
return warningLevel;
|
||||||
|
};
|
||||||
|
|
||||||
|
const renewalRateWarningLevel = ( attachingRateTarget: string ): string =>
|
||||||
|
{
|
||||||
|
const value: number = Number( attachingRateTarget );
|
||||||
|
let warningLevel = "";
|
||||||
|
|
||||||
|
console.log( "续保率目标差值", attachingRateTarget, value );
|
||||||
|
|
||||||
|
if ( value >= 0.0 )
|
||||||
|
{
|
||||||
|
warningLevel = "success";
|
||||||
|
}
|
||||||
|
else if ( value >= -3 && value < 0.0 )
|
||||||
|
{
|
||||||
|
warningLevel = "warning";
|
||||||
|
}
|
||||||
|
else if ( value <= -3 )
|
||||||
|
{
|
||||||
|
warningLevel = "exception";
|
||||||
|
}
|
||||||
|
|
||||||
|
return warningLevel;
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
ui,
|
ui,
|
||||||
callerInfo,
|
callerInfo,
|
||||||
@@ -339,6 +393,8 @@ export default {
|
|||||||
renderData: applyDepartmentArchievementData,
|
renderData: applyDepartmentArchievementData,
|
||||||
refresh,
|
refresh,
|
||||||
logoutDesktopArchievement,
|
logoutDesktopArchievement,
|
||||||
|
attachingRateWarningLevel,
|
||||||
|
renewalRateWarningLevel,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-10-17 10:56:43
|
* @Date: 2023-10-17 10:56:43
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @FilePath: /task_schedule/src/views/data/bi/BiDataUploadView.vue
|
* @FilePath: /task_schedule/src/views/data/DataUploadView.vue
|
||||||
* @Description:
|
* @Description: 上传文件用的组件
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
@@ -104,20 +104,24 @@ export default {
|
|||||||
selectedReportType: 0,
|
selectedReportType: 0,
|
||||||
reportType: [
|
reportType: [
|
||||||
{
|
{
|
||||||
reportTypeCode: 0,
|
reportTypeCode: 1,
|
||||||
reportTypeName: "坐席车非渗透率",
|
reportTypeName: "坐席车非渗透率",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reportTypeCode: 1,
|
reportTypeCode: 2,
|
||||||
reportTypeName: "坐席续保率",
|
reportTypeName: "坐席续保率",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reportTypeCode: 2,
|
reportTypeCode: 3,
|
||||||
reportTypeName: "部门车非渗透率",
|
reportTypeName: "部门车非渗透率",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reportTypeCode: 3,
|
reportTypeCode: 4,
|
||||||
reportTypeName: "当月个车续保率跟踪报表【机构】",
|
reportTypeName: "当月个车续保率跟踪报表【机构】",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
reportTypeCode: 10,
|
||||||
|
reportTypeName: "TWr坐席清单",
|
||||||
},],
|
},],
|
||||||
sheetIndex: 0,
|
sheetIndex: 0,
|
||||||
firstRow: 1,
|
firstRow: 1,
|
@@ -7,7 +7,6 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
@@ -92,7 +91,7 @@
|
|||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
>
|
>
|
||||||
<BiDataUploadView :report-type="2" />
|
<DataUploadView :report-type="3" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -106,7 +105,7 @@ import {
|
|||||||
queryDepartmentAttachingRateData
|
queryDepartmentAttachingRateData
|
||||||
} from "@/utils/BIReport.js";
|
} from "@/utils/BIReport.js";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import BiDataUploadView from "@/views/data/bi/BiDataUploadView.vue";
|
import DataUploadView from "@/views/data/DataUploadView.vue";
|
||||||
|
|
||||||
interface UI
|
interface UI
|
||||||
{
|
{
|
||||||
@@ -119,7 +118,7 @@ interface UI
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DepartmentAttachingRateView",
|
name: "DepartmentAttachingRateView",
|
||||||
components: { BiDataUploadView, },
|
components: { DataUploadView, },
|
||||||
setup()
|
setup()
|
||||||
{
|
{
|
||||||
const ui: UI = reactive({
|
const ui: UI = reactive({
|
||||||
|
@@ -108,7 +108,7 @@
|
|||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
>
|
>
|
||||||
<BiDataUploadView :report-type="3" />
|
<DataUploadView :report-type="4" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -122,7 +122,7 @@ import {
|
|||||||
queryDepartmentRenewalRateData
|
queryDepartmentRenewalRateData
|
||||||
} from "@/utils/BIReport.js";
|
} from "@/utils/BIReport.js";
|
||||||
import { ElMessageBox, ElMessage } from "element-plus";
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
import BiDataUploadView from "@/views/data/bi/BiDataUploadView.vue";
|
import DataUploadView from "@/views/data/DataUploadView.vue";
|
||||||
|
|
||||||
interface UI
|
interface UI
|
||||||
{
|
{
|
||||||
@@ -135,7 +135,7 @@ interface UI
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DepartmentRenewalRateView",
|
name: "DepartmentRenewalRateView",
|
||||||
components: { BiDataUploadView, },
|
components: { DataUploadView, },
|
||||||
setup()
|
setup()
|
||||||
{
|
{
|
||||||
const ui: UI = reactive({
|
const ui: UI = reactive({
|
||||||
|
@@ -109,7 +109,7 @@
|
|||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
>
|
>
|
||||||
<BiDataUploadView :report-type="0" />
|
<DataUploadView :report-type="1" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -122,7 +122,7 @@ import {
|
|||||||
type QueryBITelsalerAttachingRateDataHandler,
|
type QueryBITelsalerAttachingRateDataHandler,
|
||||||
queryBITelsalerAttachingRateData
|
queryBITelsalerAttachingRateData
|
||||||
} from "@/utils/BIReport.js";
|
} from "@/utils/BIReport.js";
|
||||||
import BiDataUploadView from "@/views/data/bi/BiDataUploadView.vue";
|
import DataUploadView from "@/views/data/DataUploadView.vue";
|
||||||
import { ElMessageBox, ElMessage } from "element-plus";
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
|
|
||||||
interface UI
|
interface UI
|
||||||
@@ -136,7 +136,7 @@ interface UI
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TelsalerAttachingRateView",
|
name: "TelsalerAttachingRateView",
|
||||||
components: { BiDataUploadView, },
|
components: { DataUploadView, },
|
||||||
setup()
|
setup()
|
||||||
{
|
{
|
||||||
const ui: UI = reactive({
|
const ui: UI = reactive({
|
||||||
|
@@ -62,7 +62,7 @@
|
|||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template #default="telsaler">
|
<template #default="telsaler">
|
||||||
<span>{{ telsaler.row.个车续保率序时 }}</span>
|
<span>{{ telsaler.row.个车续保率序时.toFixed(2) + "%" }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template #default="telsaler">
|
<template #default="telsaler">
|
||||||
<span>{{ telsaler.row.个车续保率全月 }}</span>
|
<span>{{ telsaler.row.个车续保率全月.toFixed(2) + "%" }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -99,14 +99,14 @@
|
|||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
>
|
>
|
||||||
<BiDataUploadView :report-type="1" />
|
<DataUploadView :report-type="2" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { reactive, computed, onBeforeMount } from "vue";
|
import { reactive, computed, onBeforeMount } from "vue";
|
||||||
import BiDataUploadView from "@/views/data/bi/BiDataUploadView.vue";
|
import DataUploadView from "@/views/data/DataUploadView.vue";
|
||||||
import {
|
import {
|
||||||
type QueryBITelsalerRenewalRateDataHandler,
|
type QueryBITelsalerRenewalRateDataHandler,
|
||||||
type BITelsalerRenewalRateRecord,
|
type BITelsalerRenewalRateRecord,
|
||||||
@@ -126,7 +126,7 @@ interface UI
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TelsalerAttachingRateView",
|
name: "TelsalerAttachingRateView",
|
||||||
components: { BiDataUploadView, },
|
components: { DataUploadView, },
|
||||||
setup()
|
setup()
|
||||||
{
|
{
|
||||||
const ui: UI = reactive({
|
const ui: UI = reactive({
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
* @Date: 2023-03-23 16:05:08
|
* @Date: 2023-03-23 16:05:08
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @FilePath: /task_schedule/src/views/telsaler/TelsalerManagement.vue
|
* @FilePath: /task_schedule/src/views/telsaler/TelsalerManagement.vue
|
||||||
* @Description:
|
* @Description: 坐席管理组件
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
@@ -51,9 +51,19 @@
|
|||||||
>
|
>
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="refresh">
|
<el-button
|
||||||
|
icon="refresh"
|
||||||
|
@click="onResetQuery"
|
||||||
|
>
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
icon="upload"
|
||||||
|
type="warning"
|
||||||
|
@click="ui.showUploadDialog = true;"
|
||||||
|
>
|
||||||
|
上传
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -102,19 +112,38 @@
|
|||||||
@size-change="onTablePageSizeChange"
|
@size-change="onTablePageSizeChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="upload-dialog-wrapper">
|
||||||
|
<el-dialog
|
||||||
|
v-model="ui.showUploadDialog"
|
||||||
|
title="上传报表"
|
||||||
|
width="600px"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
:show-close="true"
|
||||||
|
>
|
||||||
|
<DataUploadView :report-type="10" />
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import DataUploadView from "@/views/data/DataUploadView.vue";
|
||||||
import { reactive, computed } from "vue";
|
import { reactive, computed } from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TelsalerManagement",
|
name: "TelsalerManagement",
|
||||||
|
components: { DataUploadView, },
|
||||||
setup()
|
setup()
|
||||||
{
|
{
|
||||||
const ui = reactive({
|
const ui = reactive({
|
||||||
|
showUploadDialog: false,
|
||||||
caller_code: "",
|
caller_code: "",
|
||||||
caller_name: "",
|
caller_name: "",
|
||||||
section_office_code: "",
|
section_office_code: "",
|
||||||
section_office_name: "",
|
section_office_name: "",
|
||||||
|
department_code: "",
|
||||||
|
department_name: "",
|
||||||
|
team_name: "",
|
||||||
table_current_page_index: 1,
|
table_current_page_index: 1,
|
||||||
table_page_size: 50,
|
table_page_size: 50,
|
||||||
callers: [],
|
callers: [],
|
||||||
@@ -142,7 +171,18 @@ export default {
|
|||||||
return 10 * 50 + 40;
|
return 10 * 50 + 40;
|
||||||
});
|
});
|
||||||
|
|
||||||
return { ui, onCurrentPageIndexChange, onTablePageSizeChange, tableHeight, };
|
const onResetQuery = (): void =>
|
||||||
|
{
|
||||||
|
ui.caller_code = "";
|
||||||
|
ui.caller_name = "";
|
||||||
|
ui.section_office_code = "";
|
||||||
|
ui.section_office_name = "";
|
||||||
|
ui.department_code = "";
|
||||||
|
ui.department_name = "";
|
||||||
|
ui.team_name = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
return { ui, onResetQuery, onCurrentPageIndexChange, onTablePageSizeChange, tableHeight, };
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
* @Date: 2023-09-27 10:13:31
|
* @Date: 2023-09-27 10:13:31
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @FilePath: /task_schedule/src/views/telsaler/TelsalerManagementView.vue
|
* @FilePath: /task_schedule/src/views/telsaler/TelsalerManagementView.vue
|
||||||
* @Description:
|
* @Description: 坐席和团队管理父组件
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<el-tab-pane>
|
<el-tab-pane>
|
||||||
<template #label>
|
<template #label>
|
||||||
<el-icon><Document /></el-icon>
|
<el-icon><Document /></el-icon>
|
||||||
<span>导入导出</span>
|
<span>团队管理</span>
|
||||||
</template>
|
</template>
|
||||||
导入导出
|
导入导出
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"noEmit": true,
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "desktop_archievement_backend",
|
|
||||||
"lockfileVersion": 3,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {}
|
|
||||||
}
|
|
@@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
@@ -13,9 +14,9 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<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.30</spring.version>
|
<!-- <spring.version>5.3.30</spring.version> -->
|
||||||
<log4j2.version>2.20.0</log4j2.version>
|
<log4j2.version>2.20.0</log4j2.version>
|
||||||
<!-- <spring.version>6.0.11</spring.version> -->
|
<spring.version>6.2.4</spring.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -66,7 +67,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>2.11.0</version>
|
<version>2.18.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--jackson-->
|
<!--jackson-->
|
||||||
@@ -145,6 +146,7 @@
|
|||||||
<version>3.5.13</version>
|
<version>3.5.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>desktop_archievement_backend</finalName>
|
<finalName>desktop_archievement_backend</finalName>
|
||||||
<resources>
|
<resources>
|
||||||
|
@@ -17,4 +17,8 @@ public interface TWrTelsalerMapper
|
|||||||
public TWrTelsalerRecord queryTWrTelsalerInfo( @Param("telsaler") String telsaler );
|
public TWrTelsalerRecord queryTWrTelsalerInfo( @Param("telsaler") String telsaler );
|
||||||
|
|
||||||
public void insertTWrTelsalerRecordToDB( TWrTelsalerRecord record );
|
public void insertTWrTelsalerRecordToDB( TWrTelsalerRecord record );
|
||||||
|
|
||||||
|
public void cleanTWrTelsalerRecord();
|
||||||
|
|
||||||
|
public void cleanTWrTelsalerTeamRecord();
|
||||||
}
|
}
|
@@ -19,14 +19,14 @@ public class BIDepartmentRenewalRateRecord
|
|||||||
private double 个车续保率全月;
|
private double 个车续保率全月;
|
||||||
private double 环比昨日;
|
private double 环比昨日;
|
||||||
private double 环比上月;
|
private double 环比上月;
|
||||||
private int 平均提前签单天数;
|
// private int 平均提前签单天数;
|
||||||
private double 环比;
|
// private double 环比;
|
||||||
|
|
||||||
public BIDepartmentRenewalRateRecord()
|
public BIDepartmentRenewalRateRecord()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public BIDepartmentRenewalRateRecord( String 责任部门, double 机构目标值, int 到期数全月, double 序时到期数占比,
|
public BIDepartmentRenewalRateRecord( String 责任部门, double 机构目标值, int 到期数全月, double 序时到期数占比,
|
||||||
double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月, int 平均提前签单天数, double 环比 )
|
double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月 )
|
||||||
{
|
{
|
||||||
this.责任部门 = 责任部门;
|
this.责任部门 = 责任部门;
|
||||||
this.机构目标值 = 机构目标值;
|
this.机构目标值 = 机构目标值;
|
||||||
@@ -36,8 +36,8 @@ public class BIDepartmentRenewalRateRecord
|
|||||||
this.个车续保率全月 = 个车续保率全月;
|
this.个车续保率全月 = 个车续保率全月;
|
||||||
this.环比昨日 = 环比昨日;
|
this.环比昨日 = 环比昨日;
|
||||||
this.环比上月 = 环比上月;
|
this.环比上月 = 环比上月;
|
||||||
this.平均提前签单天数 = 平均提前签单天数;
|
// this.平均提前签单天数 = 平均提前签单天数;
|
||||||
this.环比 = 环比;
|
// this.环比 = 环比;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String get责任部门()
|
public String get责任部门()
|
||||||
@@ -120,25 +120,6 @@ public class BIDepartmentRenewalRateRecord
|
|||||||
this.环比上月 = 环比上月;
|
this.环比上月 = 环比上月;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int get平均提前签单天数()
|
|
||||||
{
|
|
||||||
return 平均提前签单天数;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void set平均提前签单天数( int 平均提前签单天数 )
|
|
||||||
{
|
|
||||||
this.平均提前签单天数 = 平均提前签单天数;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double get环比()
|
|
||||||
{
|
|
||||||
return 环比;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void set环比( double 环比 )
|
|
||||||
{
|
|
||||||
this.环比 = 环比;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
@@ -160,9 +141,6 @@ public class BIDepartmentRenewalRateRecord
|
|||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
temp = Double.doubleToLongBits( 环比上月 );
|
temp = Double.doubleToLongBits( 环比上月 );
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
result = prime * result + 平均提前签单天数;
|
|
||||||
temp = Double.doubleToLongBits( 环比 );
|
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,10 +175,6 @@ public class BIDepartmentRenewalRateRecord
|
|||||||
return false;
|
return false;
|
||||||
if ( Double.doubleToLongBits( 环比上月 ) != Double.doubleToLongBits( other.环比上月 ) )
|
if ( Double.doubleToLongBits( 环比上月 ) != Double.doubleToLongBits( other.环比上月 ) )
|
||||||
return false;
|
return false;
|
||||||
if ( 平均提前签单天数 != other.平均提前签单天数 )
|
|
||||||
return false;
|
|
||||||
if ( Double.doubleToLongBits( 环比 ) != Double.doubleToLongBits( other.环比 ) )
|
|
||||||
return false;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,7 +183,6 @@ public class BIDepartmentRenewalRateRecord
|
|||||||
{
|
{
|
||||||
return "BIDepartmentRenewalRateRecord [责任部门=" + 责任部门 + ", 机构目标值=" + 机构目标值 + ", 到期数全月="
|
return "BIDepartmentRenewalRateRecord [责任部门=" + 责任部门 + ", 机构目标值=" + 机构目标值 + ", 到期数全月="
|
||||||
+ 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时 + ", 个车续保率全月=" + 个车续保率全月
|
+ 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时 + ", 个车续保率全月=" + 个车续保率全月
|
||||||
+ ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + ", 平均提前签单天数=" + 平均提前签单天数 + ", 环比=" + 环比
|
+ ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + "]";
|
||||||
+ "]";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
* @Date: 2023-10-09 21:45:39
|
* @Date: 2023-10-09 21:45:39
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/BITelsalerRenewalRateRecord.java
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/BITelsalerRenewalRateRecord.java
|
||||||
* @Description: BI导出的续保率Excel文件行记录。
|
* @Description: BI导出的坐席续保率 Excel文件行记录。
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
@@ -20,12 +20,11 @@ public class BITelsalerRenewalRateRecord
|
|||||||
private double 个车续保率全月;
|
private double 个车续保率全月;
|
||||||
private double 环比昨日;
|
private double 环比昨日;
|
||||||
private double 环比上月;
|
private double 环比上月;
|
||||||
private double 平均提前签单天数;
|
// private double 平均提前签单天数;
|
||||||
private double 环比;
|
// private double 环比;
|
||||||
|
|
||||||
public BITelsalerRenewalRateRecord( String 责任部门, String 责任人, double 机构目标值, double 到期数全月,
|
public BITelsalerRenewalRateRecord( String 责任部门, String 责任人, double 机构目标值, double 到期数全月,
|
||||||
double 序时到期数占比, double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月,
|
double 序时到期数占比, double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月 )
|
||||||
double 平均提前签单天数, double 环比 )
|
|
||||||
{
|
{
|
||||||
this.责任部门 = 责任部门;
|
this.责任部门 = 责任部门;
|
||||||
this.责任人 = 责任人;
|
this.责任人 = 责任人;
|
||||||
@@ -36,32 +35,8 @@ public class BITelsalerRenewalRateRecord
|
|||||||
this.个车续保率全月 = 个车续保率全月;
|
this.个车续保率全月 = 个车续保率全月;
|
||||||
this.环比昨日 = 环比昨日;
|
this.环比昨日 = 环比昨日;
|
||||||
this.环比上月 = 环比上月;
|
this.环比上月 = 环比上月;
|
||||||
this.平均提前签单天数 = 平均提前签单天数;
|
|
||||||
this.环比 = 环比;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double get平均提前签单天数()
|
|
||||||
{
|
|
||||||
return 平均提前签单天数;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void set平均提前签单天数( double 平均提前签单天数 )
|
|
||||||
{
|
|
||||||
this.平均提前签单天数 = 平均提前签单天数;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double get环比()
|
|
||||||
{
|
|
||||||
return 环比;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void set环比( double 环比 )
|
|
||||||
{
|
|
||||||
this.环比 = 环比;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String get责任部门()
|
public String get责任部门()
|
||||||
{
|
{
|
||||||
return 责任部门;
|
return 责任部门;
|
||||||
@@ -94,10 +69,6 @@ public class BITelsalerRenewalRateRecord
|
|||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
temp = Double.doubleToLongBits( 环比上月 );
|
temp = Double.doubleToLongBits( 环比上月 );
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
temp = Double.doubleToLongBits( 平均提前签单天数 );
|
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
|
||||||
temp = Double.doubleToLongBits( 环比 );
|
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,10 +110,6 @@ public class BITelsalerRenewalRateRecord
|
|||||||
return false;
|
return false;
|
||||||
if ( Double.doubleToLongBits( 环比上月 ) != Double.doubleToLongBits( other.环比上月 ) )
|
if ( Double.doubleToLongBits( 环比上月 ) != Double.doubleToLongBits( other.环比上月 ) )
|
||||||
return false;
|
return false;
|
||||||
if ( Double.doubleToLongBits( 平均提前签单天数 ) != Double.doubleToLongBits( other.平均提前签单天数 ) )
|
|
||||||
return false;
|
|
||||||
if ( Double.doubleToLongBits( 环比 ) != Double.doubleToLongBits( other.环比 ) )
|
|
||||||
return false;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,8 +118,7 @@ public class BITelsalerRenewalRateRecord
|
|||||||
{
|
{
|
||||||
return "BITelsalerRenewalRateRecord [责任部门=" + 责任部门 + ", 责任人=" + 责任人 + ", 机构目标值=" + 机构目标值
|
return "BITelsalerRenewalRateRecord [责任部门=" + 责任部门 + ", 责任人=" + 责任人 + ", 机构目标值=" + 机构目标值
|
||||||
+ ", 到期数全月=" + 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时
|
+ ", 到期数全月=" + 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时
|
||||||
+ ", 个车续保率全月=" + 个车续保率全月 + ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + ", 平均提前签单天数="
|
+ ", 个车续保率全月=" + 个车续保率全月 + ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + "]";
|
||||||
+ 平均提前签单天数 + ", 环比=" + 环比 + "]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String get责任人()
|
public String get责任人()
|
||||||
|
@@ -25,36 +25,6 @@ public class DepartmentArchievement
|
|||||||
// log4j2
|
// log4j2
|
||||||
private static Logger logger = LoggerFactory.getLogger(DepartmentArchievement.class);
|
private static Logger logger = LoggerFactory.getLogger(DepartmentArchievement.class);
|
||||||
|
|
||||||
/**
|
|
||||||
* 默认的构造函数,提供给json使用。
|
|
||||||
*/
|
|
||||||
public DepartmentArchievement()
|
|
||||||
{
|
|
||||||
this.totalArchievement = 0;
|
|
||||||
this.mensualArchievementList = null;
|
|
||||||
this.insuranceRenewalRate = "";
|
|
||||||
this.attachingRate = "";
|
|
||||||
this.departmentCode = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief 构造函数,提供所有成员对象的值。
|
|
||||||
* @param departmentCode 部门代码
|
|
||||||
* @param totalArchievement 总业绩
|
|
||||||
* @param mensualArchievementList 每月业绩表
|
|
||||||
* @param insuranceRenewalRate 续保率
|
|
||||||
* @param attachingRate 车非渗透率
|
|
||||||
*/
|
|
||||||
public DepartmentArchievement( String departmentCode, long totalArchievement,
|
|
||||||
ArrayList<MensualArchievementItem> mensualArchievementList, String insuranceRenewalRate, String attachingRate)
|
|
||||||
{
|
|
||||||
this.departmentCode = departmentCode;
|
|
||||||
this.totalArchievement = totalArchievement;
|
|
||||||
this.mensualArchievementList = mensualArchievementList;
|
|
||||||
this.insuranceRenewalRate = insuranceRenewalRate;
|
|
||||||
this.attachingRate = attachingRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 静态方法,用于根据部门代码,查询部门业绩,生成一个 DepartmentArchievement 对象。
|
* 静态方法,用于根据部门代码,查询部门业绩,生成一个 DepartmentArchievement 对象。
|
||||||
* @param departmentCode 部门代码
|
* @param departmentCode 部门代码
|
||||||
@@ -82,15 +52,17 @@ public class DepartmentArchievement
|
|||||||
|
|
||||||
Integer totalArchievement = (Integer)params.get("a_total");
|
Integer totalArchievement = (Integer)params.get("a_total");
|
||||||
String attachingRate = (String)params.get("a_attaching_rate");
|
String attachingRate = (String)params.get("a_attaching_rate");
|
||||||
|
String attachingRateTarget = (String)params.get("a_attaching_rate_target");
|
||||||
String renewalRate = (String)params.get("a_renewal_rate");
|
String renewalRate = (String)params.get("a_renewal_rate");
|
||||||
|
String renewalRateTarget = (String)params.get("a_renewal_rate_target");
|
||||||
ArrayList<MensualArchievementItem> mensual = (ArrayList<MensualArchievementItem>)params.get("a_mensual_cur");
|
ArrayList<MensualArchievementItem> mensual = (ArrayList<MensualArchievementItem>)params.get("a_mensual_cur");
|
||||||
|
|
||||||
archievement = new DepartmentArchievement(
|
archievement = new DepartmentArchievement(
|
||||||
departmentCode,
|
departmentCode,
|
||||||
totalArchievement.intValue(),
|
totalArchievement.intValue(),
|
||||||
mensual,
|
mensual,
|
||||||
renewalRate,
|
renewalRate, renewalRateTarget,
|
||||||
attachingRate);
|
attachingRate, attachingRateTarget);
|
||||||
}
|
}
|
||||||
catch ( IOException error )
|
catch ( IOException error )
|
||||||
{
|
{
|
||||||
@@ -104,6 +76,67 @@ public class DepartmentArchievement
|
|||||||
return archievement;
|
return archievement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty( "department_code" )
|
||||||
|
private String departmentCode;
|
||||||
|
|
||||||
|
@JsonProperty( "total_archievement" )
|
||||||
|
private long totalArchievement; // 总业绩
|
||||||
|
|
||||||
|
// 每月业绩列表
|
||||||
|
// 要保证数据是按照月份排序。
|
||||||
|
@JsonProperty( "mensual_archievement_list" )
|
||||||
|
private ArrayList<MensualArchievementItem> mensualArchievementList;
|
||||||
|
|
||||||
|
@JsonProperty( "insurance_renewal_rate" )
|
||||||
|
private String insuranceRenewalRate; // 续保率
|
||||||
|
|
||||||
|
@JsonProperty( "insurance_renewal_rate_target" )
|
||||||
|
private String insuranceRenewalRateTarget; // 续保率目标值
|
||||||
|
|
||||||
|
@JsonProperty( "attaching_rate" )
|
||||||
|
private String attachingRate; // 车非渗透率
|
||||||
|
|
||||||
|
@JsonProperty( "attaching_rate_target" )
|
||||||
|
private String attachingRateTarget; // 车非渗透率目标值
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认的构造函数,提供给json使用。
|
||||||
|
*/
|
||||||
|
public DepartmentArchievement()
|
||||||
|
{
|
||||||
|
this.totalArchievement = 0;
|
||||||
|
this.mensualArchievementList = null;
|
||||||
|
this.insuranceRenewalRate = "";
|
||||||
|
this.attachingRate = "";
|
||||||
|
this.insuranceRenewalRateTarget = "";
|
||||||
|
this.attachingRateTarget = "";
|
||||||
|
this.departmentCode = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 构造函数,提供所有成员对象的值。
|
||||||
|
* @param departmentCode 部门代码
|
||||||
|
* @param totalArchievement 总业绩
|
||||||
|
* @param mensualArchievementList 每月业绩表
|
||||||
|
* @param insuranceRenewalRate 续保率
|
||||||
|
* @param insuranceRenewalRateTarget 续保率目标值
|
||||||
|
* @param attachingRate 车非渗透率
|
||||||
|
* @param attachingRateTarget 车非渗透率目标值
|
||||||
|
*/
|
||||||
|
public DepartmentArchievement( String departmentCode, long totalArchievement,
|
||||||
|
ArrayList<MensualArchievementItem> mensualArchievementList, String insuranceRenewalRate,
|
||||||
|
String insuranceRenewalRateTarget, String attachingRate, String attachingRateTarget )
|
||||||
|
{
|
||||||
|
this.departmentCode = departmentCode;
|
||||||
|
this.totalArchievement = totalArchievement;
|
||||||
|
this.mensualArchievementList = mensualArchievementList;
|
||||||
|
this.insuranceRenewalRate = insuranceRenewalRate;
|
||||||
|
this.insuranceRenewalRateTarget = insuranceRenewalRateTarget;
|
||||||
|
this.attachingRate = attachingRate;
|
||||||
|
this.attachingRateTarget = attachingRateTarget;
|
||||||
|
}
|
||||||
|
|
||||||
public long getTotalArchievement()
|
public long getTotalArchievement()
|
||||||
{
|
{
|
||||||
return totalArchievement;
|
return totalArchievement;
|
||||||
@@ -139,11 +172,117 @@ public class DepartmentArchievement
|
|||||||
return attachingRate;
|
return attachingRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "DepartmentArchievement [departmentCode=" + departmentCode + ", totalArchievement="
|
||||||
|
+ totalArchievement + ", mensualArchievementList=" + mensualArchievementList
|
||||||
|
+ ", insuranceRenewalRate=" + insuranceRenewalRate + ", insuranceRenewalRateTarget="
|
||||||
|
+ insuranceRenewalRateTarget + ", attachingRate=" + attachingRate
|
||||||
|
+ ", attachingRateTarget=" + attachingRateTarget + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((departmentCode == null) ? 0 : departmentCode.hashCode());
|
||||||
|
result = prime * result + (int) (totalArchievement ^ (totalArchievement >>> 32));
|
||||||
|
result = prime * result
|
||||||
|
+ ((mensualArchievementList == null) ? 0 : mensualArchievementList.hashCode());
|
||||||
|
result = prime * result
|
||||||
|
+ ((insuranceRenewalRate == null) ? 0 : insuranceRenewalRate.hashCode());
|
||||||
|
result = prime * result + ((insuranceRenewalRateTarget == null) ? 0
|
||||||
|
: insuranceRenewalRateTarget.hashCode());
|
||||||
|
result = prime * result + ((attachingRate == null) ? 0 : attachingRate.hashCode());
|
||||||
|
result = prime * result
|
||||||
|
+ ((attachingRateTarget == null) ? 0 : attachingRateTarget.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;
|
||||||
|
DepartmentArchievement other = (DepartmentArchievement) obj;
|
||||||
|
if ( departmentCode == null )
|
||||||
|
{
|
||||||
|
if ( other.departmentCode != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !departmentCode.equals( other.departmentCode ) )
|
||||||
|
return false;
|
||||||
|
if ( totalArchievement != other.totalArchievement )
|
||||||
|
return false;
|
||||||
|
if ( mensualArchievementList == null )
|
||||||
|
{
|
||||||
|
if ( other.mensualArchievementList != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !mensualArchievementList.equals( other.mensualArchievementList ) )
|
||||||
|
return false;
|
||||||
|
if ( insuranceRenewalRate == null )
|
||||||
|
{
|
||||||
|
if ( other.insuranceRenewalRate != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !insuranceRenewalRate.equals( other.insuranceRenewalRate ) )
|
||||||
|
return false;
|
||||||
|
if ( insuranceRenewalRateTarget == null )
|
||||||
|
{
|
||||||
|
if ( other.insuranceRenewalRateTarget != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !insuranceRenewalRateTarget.equals( other.insuranceRenewalRateTarget ) )
|
||||||
|
return false;
|
||||||
|
if ( attachingRate == null )
|
||||||
|
{
|
||||||
|
if ( other.attachingRate != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !attachingRate.equals( other.attachingRate ) )
|
||||||
|
return false;
|
||||||
|
if ( attachingRateTarget == null )
|
||||||
|
{
|
||||||
|
if ( other.attachingRateTarget != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !attachingRateTarget.equals( other.attachingRateTarget ) )
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public void setAttachingRate( String attachingRate )
|
public void setAttachingRate( String attachingRate )
|
||||||
{
|
{
|
||||||
this.attachingRate = attachingRate;
|
this.attachingRate = attachingRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getInsuranceRenewalRateTarget()
|
||||||
|
{
|
||||||
|
return insuranceRenewalRateTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInsuranceRenewalRateTarget( String insuranceRenewalRateTarget )
|
||||||
|
{
|
||||||
|
this.insuranceRenewalRateTarget = insuranceRenewalRateTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttachingRateTarget()
|
||||||
|
{
|
||||||
|
return attachingRateTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttachingRateTarget( String attachingRateTarget )
|
||||||
|
{
|
||||||
|
this.attachingRateTarget = attachingRateTarget;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDepartmentCode()
|
public String getDepartmentCode()
|
||||||
{
|
{
|
||||||
return departmentCode;
|
return departmentCode;
|
||||||
@@ -153,21 +292,4 @@ public class DepartmentArchievement
|
|||||||
{
|
{
|
||||||
this.departmentCode = departmentCode;
|
this.departmentCode = departmentCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonProperty( "department_code" )
|
|
||||||
private String departmentCode;
|
|
||||||
|
|
||||||
@JsonProperty( "total_archievement" )
|
|
||||||
private long totalArchievement; // 总业绩
|
|
||||||
|
|
||||||
// 每月业绩列表
|
|
||||||
// 要保证数据是按照月份排序。
|
|
||||||
@JsonProperty( "mensual_archievement_list" )
|
|
||||||
private ArrayList<MensualArchievementItem> mensualArchievementList;
|
|
||||||
|
|
||||||
@JsonProperty( "insurance_renewal_rate" )
|
|
||||||
private String insuranceRenewalRate; // 续保率
|
|
||||||
|
|
||||||
@JsonProperty( "attaching_rate" )
|
|
||||||
private String attachingRate; // 车非渗透率
|
|
||||||
}
|
}
|
||||||
|
@@ -34,21 +34,24 @@ public final class ImportBIExcelData
|
|||||||
{
|
{
|
||||||
private static Logger logger = LoggerFactory.getLogger( ImportBIExcelData.class );
|
private static Logger logger = LoggerFactory.getLogger( ImportBIExcelData.class );
|
||||||
|
|
||||||
|
// 坐席 渗透率
|
||||||
private static String[] TelsalerAttachingRateExcelTitle = new String[]
|
private static String[] TelsalerAttachingRateExcelTitle = new String[]
|
||||||
{ "部门", "经办", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "当月客户渗透率", "客户渗透率环比上月",
|
{ "部门", "经办", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "当月客户渗透率", "客户渗透率环比上月",
|
||||||
"当月车非客均保费", "客均保费环比上月"};
|
"当月车非客均保费", "客均保费环比上月"};
|
||||||
|
|
||||||
|
// 坐席 续保率
|
||||||
private static String[] TelSalerRenewalRateExcelTitle = new String[]
|
private static String[] TelSalerRenewalRateExcelTitle = new String[]
|
||||||
{ "责任部门", "责任人", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
|
{ "责任部门", "责任人", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
|
||||||
"环比上月(%)", "平均提前签单天数", "环比"};
|
"环比上月(%)", "序时-部门内", "全月-部门内"};
|
||||||
|
|
||||||
|
// 机构 渗透率
|
||||||
private static String[] DepartmentAttachingRateExcelTitle = new String[]
|
private static String[] DepartmentAttachingRateExcelTitle = new String[]
|
||||||
{ "部门", "目标值-机构", "目标差距", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "车险客户数", "当月客户渗透率",
|
{ "部门", "目标值-机构", "目标差距", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "车险客户数", "当月客户渗透率",
|
||||||
"客户渗透率环比上月", "当月车非客均保费", "客均保费环比上月"};
|
"客户渗透率环比上月", "当月车非客均保费", "客均保费环比上月"};
|
||||||
|
// 机构 续保率
|
||||||
private static String[] DepartmentRenewalRateExcelTitle = new String[]
|
private static String[] DepartmentRenewalRateExcelTitle = new String[]
|
||||||
{ "责任部门", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
|
{ "责任部门", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
|
||||||
"环比上月(%)", "平均提前签单天数", "环比",};
|
"环比上月(%)", "序时-部门内", "全月-部门内",};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于通过对比标题行判断excel文件格式的函数。
|
* 用于通过对比标题行判断excel文件格式的函数。
|
||||||
@@ -95,6 +98,8 @@ public final class ImportBIExcelData
|
|||||||
{
|
{
|
||||||
String cellString = MyPOIUtils.getStringCellValue( cell );
|
String cellString = MyPOIUtils.getStringCellValue( cell );
|
||||||
|
|
||||||
|
logger.info( "比较报表标题行,待导入报表标题:" + cellString + ";验证标题:" + title[cellIndex] );
|
||||||
|
|
||||||
if ( !cellString.equals( title[cellIndex] ) )
|
if ( !cellString.equals( title[cellIndex] ) )
|
||||||
{
|
{
|
||||||
result = false;
|
result = false;
|
||||||
@@ -320,11 +325,11 @@ public final class ImportBIExcelData
|
|||||||
double 个车续保率全月 = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
|
double 个车续保率全月 = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
|
||||||
double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
|
double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
|
||||||
double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 8 ) * 100;
|
double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 8 ) * 100;
|
||||||
double 平均提前签单天数 = MyPOIUtils.getNumbericCellValue( row, 9 );
|
// double 平均提前签单天数 = MyPOIUtils.getNumbericCellValue( row, 9 );
|
||||||
double 环比 = MyPOIUtils.getNumbericCellValue( row, 10 );
|
// double 环比 = MyPOIUtils.getNumbericCellValue( row, 10 );
|
||||||
|
|
||||||
BITelsalerRenewalRateRecord record = new BITelsalerRenewalRateRecord( 责任部门, 责任人,
|
BITelsalerRenewalRateRecord record = new BITelsalerRenewalRateRecord( 责任部门, 责任人,
|
||||||
机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月, 平均提前签单天数, 环比 );
|
机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月 );
|
||||||
|
|
||||||
records.add( record );
|
records.add( record );
|
||||||
}
|
}
|
||||||
@@ -499,11 +504,11 @@ public final class ImportBIExcelData
|
|||||||
double 个车续保率全月 = MyPOIUtils.getNumbericCellValue( row, 5 ) * 100;
|
double 个车续保率全月 = MyPOIUtils.getNumbericCellValue( row, 5 ) * 100;
|
||||||
double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
|
double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
|
||||||
double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
|
double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
|
||||||
int 平均提前签单天数 = (int) MyPOIUtils.getNumbericCellValue( row, 8 );
|
// int 平均提前签单天数 = (int) MyPOIUtils.getNumbericCellValue( row, 8 );
|
||||||
double 环比 = MyPOIUtils.getNumbericCellValue( row, 9 ) * 100;
|
// double 环比 = MyPOIUtils.getNumbericCellValue( row, 9 ) * 100;
|
||||||
|
|
||||||
BIDepartmentRenewalRateRecord record = new BIDepartmentRenewalRateRecord( 责任部门,
|
BIDepartmentRenewalRateRecord record = new BIDepartmentRenewalRateRecord( 责任部门,
|
||||||
机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月, 平均提前签单天数, 环比 );
|
机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月 );
|
||||||
|
|
||||||
records.add( record );
|
records.add( record );
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ public class ImportTWRTelsalerData
|
|||||||
"学历类型", "用工性质名称", "合同种类", "合同类型", "合同性质", "合同签订次数", "合同生效日期", "合同到期日期", "人员属性", "保代员工号",
|
"学历类型", "用工性质名称", "合同种类", "合同类型", "合同性质", "合同签订次数", "合同生效日期", "合同到期日期", "人员属性", "保代员工号",
|
||||||
"职场属性", "办公性质", "保代人员属性", "人员状态",};
|
"职场属性", "办公性质", "保代人员属性", "人员状态",};
|
||||||
|
|
||||||
public static void importTWrTelsalerDataFromExcel( String filePath, int sheetIndex,
|
public static ArrayList<TWrTelsalerRecord> importTWrTelsalerDataFromExcel( String filePath, int sheetIndex,
|
||||||
int firstRow ) throws IOException, InvalidFormatException
|
int firstRow ) throws IOException, InvalidFormatException
|
||||||
{
|
{
|
||||||
ArrayList<TWrTelsalerRecord> records = new ArrayList<>( 200 );
|
ArrayList<TWrTelsalerRecord> records = new ArrayList<>( 200 );
|
||||||
@@ -132,6 +132,8 @@ public class ImportTWRTelsalerData
|
|||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return records;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean checkExcelFormat( Sheet sheet, String caption, int captionRowIndex,
|
private static boolean checkExcelFormat( Sheet sheet, String caption, int captionRowIndex,
|
||||||
|
@@ -70,11 +70,10 @@ public class ArchievementQueryController
|
|||||||
|
|
||||||
result.setTotalArchievement( departmentArch.getTotalArchievement() );
|
result.setTotalArchievement( departmentArch.getTotalArchievement() );
|
||||||
result.setInsuranceRenewalRate( departmentArch.getInsuranceRenewalRate() );
|
result.setInsuranceRenewalRate( departmentArch.getInsuranceRenewalRate() );
|
||||||
|
result.setInsuranceRenewalRateTarget( departmentArch.getInsuranceRenewalRateTarget() );
|
||||||
result.setAttachingRate( departmentArch.getAttachingRate() );
|
result.setAttachingRate( departmentArch.getAttachingRate() );
|
||||||
// result.addAdvanceRewardGainer( "沈群" );
|
result.setAttachingRateTarget( departmentArch.getAttachingRateTarget() );
|
||||||
// result.addLeadingRewardGainer( "王鸿津" );
|
|
||||||
// result.addLeadingRewardGainer( "林宗泽" );
|
|
||||||
// result.addBackwardStaff( "王炜" );
|
|
||||||
result.setMensualArchievementList( departmentArch.getMensualArchievementList() );
|
result.setMensualArchievementList( departmentArch.getMensualArchievementList() );
|
||||||
}
|
}
|
||||||
catch ( IOException error )
|
catch ( IOException error )
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.cpic.xim.web.controllers.archievement.department;
|
package com.cpic.xim.web.controllers.archievement.department;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -23,6 +22,35 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
*/
|
*/
|
||||||
public class DepartmentArchievementQueryResult extends QueryResponse
|
public class DepartmentArchievementQueryResult extends QueryResponse
|
||||||
{
|
{
|
||||||
|
@JsonProperty( "total_archievement" )
|
||||||
|
private long totalArchievement; // 总业绩
|
||||||
|
|
||||||
|
// 每月业绩列表
|
||||||
|
// 要保证数据是按照月份排序。
|
||||||
|
@JsonProperty( "mensual_archievement_list" )
|
||||||
|
private ArrayList<MensualArchievementItem> mensualArchievementList;
|
||||||
|
|
||||||
|
@JsonProperty( "insurance_renewal_rate" )
|
||||||
|
private String insuranceRenewalRate; // 续保率
|
||||||
|
|
||||||
|
@JsonProperty( "insurance_renewal_rate_target" )
|
||||||
|
private String insuranceRenewalRateTarget; // 续保率目标值
|
||||||
|
|
||||||
|
@JsonProperty( "attaching_rate" )
|
||||||
|
private String attachingRate; // 车非渗透率
|
||||||
|
|
||||||
|
@JsonProperty( "attaching_rate_target" )
|
||||||
|
private String attachingRateTarget; // 车非渗透率目标值
|
||||||
|
|
||||||
|
@JsonProperty( "leading_reward_gainers" )
|
||||||
|
private Vector<String> leadingRewardGainers; // 领跑奖
|
||||||
|
|
||||||
|
@JsonProperty( "advance_reward_gainers" )
|
||||||
|
private Vector<String> advanceRewardGainers; // 飞跃奖
|
||||||
|
|
||||||
|
@JsonProperty( "backward_list" )
|
||||||
|
private Vector<String> backwardList; // 消七灭六坐席
|
||||||
|
|
||||||
public DepartmentArchievementQueryResult()
|
public DepartmentArchievementQueryResult()
|
||||||
{
|
{
|
||||||
mensualArchievementList = new ArrayList<MensualArchievementItem>();
|
mensualArchievementList = new ArrayList<MensualArchievementItem>();
|
||||||
@@ -117,26 +145,129 @@ public class DepartmentArchievementQueryResult extends QueryResponse
|
|||||||
this.backwardList = backwardList;
|
this.backwardList = backwardList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonProperty( "total_archievement" )
|
public String getInsuranceRenewalRateTarget()
|
||||||
private long totalArchievement; // 总业绩
|
{
|
||||||
|
return insuranceRenewalRateTarget;
|
||||||
|
}
|
||||||
|
|
||||||
// 每月业绩列表
|
public void setInsuranceRenewalRateTarget( String insuranceRenewalRateTarget )
|
||||||
// 要保证数据是按照月份排序。
|
{
|
||||||
@JsonProperty( "mensual_archievement_list" )
|
this.insuranceRenewalRateTarget = insuranceRenewalRateTarget;
|
||||||
private ArrayList<MensualArchievementItem> mensualArchievementList;
|
}
|
||||||
|
|
||||||
@JsonProperty( "insurance_renewal_rate" )
|
public String getAttachingRateTarget()
|
||||||
private String insuranceRenewalRate; // 续保率
|
{
|
||||||
|
return attachingRateTarget;
|
||||||
|
}
|
||||||
|
|
||||||
@JsonProperty( "attaching_rate" )
|
public void setAttachingRateTarget( String attachingRateTarget )
|
||||||
private String attachingRate; // 车非渗透率
|
{
|
||||||
|
this.attachingRateTarget = attachingRateTarget;
|
||||||
|
}
|
||||||
|
|
||||||
@JsonProperty( "leading_reward_gainers" )
|
@Override
|
||||||
private Vector<String> leadingRewardGainers; // 领跑奖
|
public String toString()
|
||||||
|
{
|
||||||
|
return "DepartmentArchievementQueryResult [totalArchievement=" + totalArchievement
|
||||||
|
+ ", mensualArchievementList=" + mensualArchievementList + ", insuranceRenewalRate="
|
||||||
|
+ insuranceRenewalRate + ", insuranceRenewalRateTarget="
|
||||||
|
+ insuranceRenewalRateTarget + ", attachingRate=" + attachingRate
|
||||||
|
+ ", attachingRateTarget=" + attachingRateTarget + ", leadingRewardGainers="
|
||||||
|
+ leadingRewardGainers + ", advanceRewardGainers=" + advanceRewardGainers
|
||||||
|
+ ", backwardList=" + backwardList + "]";
|
||||||
|
}
|
||||||
|
|
||||||
@JsonProperty( "advance_reward_gainers" )
|
@Override
|
||||||
private Vector<String> advanceRewardGainers; // 飞跃奖
|
public int hashCode()
|
||||||
|
{
|
||||||
|
final int prime = 31;
|
||||||
|
int result = super.hashCode();
|
||||||
|
result = prime * result + (int) (totalArchievement ^ (totalArchievement >>> 32));
|
||||||
|
result = prime * result
|
||||||
|
+ ((mensualArchievementList == null) ? 0 : mensualArchievementList.hashCode());
|
||||||
|
result = prime * result
|
||||||
|
+ ((insuranceRenewalRate == null) ? 0 : insuranceRenewalRate.hashCode());
|
||||||
|
result = prime * result + ((insuranceRenewalRateTarget == null) ? 0
|
||||||
|
: insuranceRenewalRateTarget.hashCode());
|
||||||
|
result = prime * result + ((attachingRate == null) ? 0 : attachingRate.hashCode());
|
||||||
|
result = prime * result
|
||||||
|
+ ((attachingRateTarget == null) ? 0 : attachingRateTarget.hashCode());
|
||||||
|
result = prime * result
|
||||||
|
+ ((leadingRewardGainers == null) ? 0 : leadingRewardGainers.hashCode());
|
||||||
|
result = prime * result
|
||||||
|
+ ((advanceRewardGainers == null) ? 0 : advanceRewardGainers.hashCode());
|
||||||
|
result = prime * result + ((backwardList == null) ? 0 : backwardList.hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@JsonProperty( "backward_list" )
|
@Override
|
||||||
private Vector<String> backwardList; // 消七灭六坐席
|
public boolean equals( Object obj )
|
||||||
|
{
|
||||||
|
if ( this == obj )
|
||||||
|
return true;
|
||||||
|
if ( !super.equals( obj ) )
|
||||||
|
return false;
|
||||||
|
if ( getClass() != obj.getClass() )
|
||||||
|
return false;
|
||||||
|
DepartmentArchievementQueryResult other = (DepartmentArchievementQueryResult) obj;
|
||||||
|
if ( totalArchievement != other.totalArchievement )
|
||||||
|
return false;
|
||||||
|
if ( mensualArchievementList == null )
|
||||||
|
{
|
||||||
|
if ( other.mensualArchievementList != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !mensualArchievementList.equals( other.mensualArchievementList ) )
|
||||||
|
return false;
|
||||||
|
if ( insuranceRenewalRate == null )
|
||||||
|
{
|
||||||
|
if ( other.insuranceRenewalRate != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !insuranceRenewalRate.equals( other.insuranceRenewalRate ) )
|
||||||
|
return false;
|
||||||
|
if ( insuranceRenewalRateTarget == null )
|
||||||
|
{
|
||||||
|
if ( other.insuranceRenewalRateTarget != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !insuranceRenewalRateTarget.equals( other.insuranceRenewalRateTarget ) )
|
||||||
|
return false;
|
||||||
|
if ( attachingRate == null )
|
||||||
|
{
|
||||||
|
if ( other.attachingRate != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !attachingRate.equals( other.attachingRate ) )
|
||||||
|
return false;
|
||||||
|
if ( attachingRateTarget == null )
|
||||||
|
{
|
||||||
|
if ( other.attachingRateTarget != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !attachingRateTarget.equals( other.attachingRateTarget ) )
|
||||||
|
return false;
|
||||||
|
if ( leadingRewardGainers == null )
|
||||||
|
{
|
||||||
|
if ( other.leadingRewardGainers != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !leadingRewardGainers.equals( other.leadingRewardGainers ) )
|
||||||
|
return false;
|
||||||
|
if ( advanceRewardGainers == null )
|
||||||
|
{
|
||||||
|
if ( other.advanceRewardGainers != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !advanceRewardGainers.equals( other.advanceRewardGainers ) )
|
||||||
|
return false;
|
||||||
|
if ( backwardList == null )
|
||||||
|
{
|
||||||
|
if ( other.backwardList != null )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if ( !backwardList.equals( other.backwardList ) )
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,35 @@
|
|||||||
|
package com.cpic.xim.web.controllers.dataimport;
|
||||||
|
|
||||||
|
public enum ReportType {
|
||||||
|
BiTelsalerAttachingRateReport(1,"坐席车非渗透率"),
|
||||||
|
BiTelsalerRenewalRateReport(2,"坐席续保率"),
|
||||||
|
BiDepartmentAttachingRateReport(3,"部门车非渗透率"),
|
||||||
|
BiDepartmentRenewalRateReport(4,"当月个车续保率跟踪报表【机构】"),
|
||||||
|
TWrTelsalerList(10,"TWr坐席清单"); // Twr坐席清单
|
||||||
|
|
||||||
|
private int reportTypeCode;
|
||||||
|
|
||||||
|
private String reportTypeName;
|
||||||
|
private ReportType( final int code, final String name )
|
||||||
|
{
|
||||||
|
this.reportTypeCode = code;
|
||||||
|
this.reportTypeName = name;
|
||||||
|
}
|
||||||
|
public int getReportTypeCode()
|
||||||
|
{
|
||||||
|
return reportTypeCode;
|
||||||
|
}
|
||||||
|
public void setReportTypeCode( int reportTypeCode )
|
||||||
|
{
|
||||||
|
this.reportTypeCode = reportTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReportTypeName()
|
||||||
|
{
|
||||||
|
return reportTypeName;
|
||||||
|
}
|
||||||
|
public void setReportTypeName( String reportTypeName )
|
||||||
|
{
|
||||||
|
this.reportTypeName = reportTypeName;
|
||||||
|
}
|
||||||
|
}
|
@@ -10,7 +10,6 @@
|
|||||||
package com.cpic.xim.web.controllers.dataimport.bi;
|
package com.cpic.xim.web.controllers.dataimport.bi;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import org.apache.ibatis.exceptions.PersistenceException;
|
import org.apache.ibatis.exceptions.PersistenceException;
|
||||||
import org.apache.ibatis.session.SqlSession;
|
import org.apache.ibatis.session.SqlSession;
|
||||||
@@ -23,13 +22,16 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper;
|
import com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper;
|
||||||
|
import com.cpic.xim.mybatis.mapper.TWrTelsalerMapper;
|
||||||
import com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord;
|
import com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord;
|
||||||
import com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord;
|
import com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord;
|
||||||
import com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord;
|
import com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord;
|
||||||
import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord;
|
import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord;
|
||||||
|
import com.cpic.xim.mybatis.pojo.TWrTelsalerRecord;
|
||||||
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
||||||
import com.cpic.xim.utils.data.ImportBIExcelData;
|
import com.cpic.xim.utils.data.ImportBIExcelData;
|
||||||
import com.cpic.xim.web.controllers.dataimport.bi.ImportBIDataRequest.ReportType;
|
import com.cpic.xim.utils.data.ImportTWRTelsalerData;
|
||||||
|
import com.cpic.xim.web.controllers.dataimport.ReportType;;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping( method = RequestMethod.POST, path = "/import_bi_data" )
|
@RequestMapping( method = RequestMethod.POST, path = "/import_bi_data" )
|
||||||
@@ -43,29 +45,35 @@ public class ImportBIDataController
|
|||||||
{
|
{
|
||||||
ImportBIDataResponse response = new ImportBIDataResponse();
|
ImportBIDataResponse response = new ImportBIDataResponse();
|
||||||
String filePath = request.getFilePath();
|
String filePath = request.getFilePath();
|
||||||
ReportType type = request.getReportType();
|
int type = request.getReportType();
|
||||||
int firstRow = request.getFirstRow();
|
int firstRow = request.getFirstRow();
|
||||||
int sheetIndex = request.getSheetIndex();
|
int sheetIndex = request.getSheetIndex();
|
||||||
int importedCount = 0;
|
int importedCount = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if ( type == ReportType.TelsalerAttachingRateReport )
|
if ( type == ReportType.BiTelsalerAttachingRateReport.getReportTypeCode() )
|
||||||
{
|
{
|
||||||
importedCount = importBITelsalerAttachingRate( filePath, sheetIndex, firstRow );
|
importedCount = importBITelsalerAttachingRate( filePath, sheetIndex, firstRow );
|
||||||
}
|
}
|
||||||
else if ( type == ReportType.TelsalerRenewalRateReport )
|
else if ( type == ReportType.BiTelsalerRenewalRateReport.getReportTypeCode() )
|
||||||
{
|
{
|
||||||
importedCount = importBITeslsalerRenewalRate( filePath, sheetIndex, firstRow );
|
importedCount = importBITeslsalerRenewalRate( filePath, sheetIndex, firstRow );
|
||||||
}
|
}
|
||||||
else if ( type == ReportType.DepartmentAttachingRateReport )
|
else if ( type == ReportType.BiDepartmentAttachingRateReport.getReportTypeCode() )
|
||||||
{
|
{
|
||||||
importedCount = importBIDepartmentAttachingRate( filePath, sheetIndex, firstRow );
|
importedCount = importBIDepartmentAttachingRate( filePath, sheetIndex, firstRow );
|
||||||
}
|
}
|
||||||
else if ( type == ReportType.DepartmentRenewalRateReport )
|
else if ( type == ReportType.BiDepartmentRenewalRateReport.getReportTypeCode() )
|
||||||
{
|
{
|
||||||
importedCount = importBIDepartmentRenewalRate( filePath, sheetIndex, firstRow );
|
importedCount = importBIDepartmentRenewalRate( filePath, sheetIndex, firstRow );
|
||||||
}
|
}
|
||||||
|
else if ( type == ReportType.TWrTelsalerList.getReportTypeCode() )
|
||||||
|
{
|
||||||
|
logger.info( "导入机构续保率报表。");
|
||||||
|
|
||||||
|
importedCount = importTWrTelsalerList( filePath, sheetIndex, firstRow );
|
||||||
|
}
|
||||||
|
|
||||||
response.setImportedCount( importedCount );
|
response.setImportedCount( importedCount );
|
||||||
response.setSuccess( true );
|
response.setSuccess( true );
|
||||||
@@ -254,4 +262,43 @@ public class ImportBIDataController
|
|||||||
|
|
||||||
return importedCount;
|
return importedCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int importTWrTelsalerList( String filePath, int sheetIndex, int firstRow )
|
||||||
|
throws PersistenceException, IOException, InvalidFormatException
|
||||||
|
{
|
||||||
|
|
||||||
|
ArrayList<TWrTelsalerRecord> records = null;
|
||||||
|
SqlSession session = null;
|
||||||
|
TWrTelsalerMapper mapper = null;
|
||||||
|
int importedCount = 0;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
records = ImportTWRTelsalerData.importTWrTelsalerDataFromExcel(filePath, sheetIndex, firstRow);
|
||||||
|
session = MybatisUtils.getSqlSessionBatch();
|
||||||
|
mapper = session.getMapper(TWrTelsalerMapper.class);
|
||||||
|
|
||||||
|
mapper.cleanTWrTelsalerTeamRecord();
|
||||||
|
|
||||||
|
for ( TWrTelsalerRecord record : records )
|
||||||
|
{
|
||||||
|
mapper.insertTWrTelsalerRecordToDB(record);
|
||||||
|
|
||||||
|
importedCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
session.commit();
|
||||||
|
}
|
||||||
|
catch ( Exception error)
|
||||||
|
{
|
||||||
|
if ( session != null )
|
||||||
|
{
|
||||||
|
session.rollback();
|
||||||
|
}
|
||||||
|
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return importedCount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,72 +9,59 @@
|
|||||||
*/
|
*/
|
||||||
package com.cpic.xim.web.controllers.dataimport.bi;
|
package com.cpic.xim.web.controllers.dataimport.bi;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class ImportBIDataRequest
|
public class ImportBIDataRequest {
|
||||||
{
|
|
||||||
public enum ReportType {
|
|
||||||
TelsalerAttachingRateReport, TelsalerRenewalRateReport, DepartmentAttachingRateReport, DepartmentRenewalRateReport
|
|
||||||
};
|
|
||||||
|
|
||||||
// 导入文件的路径
|
// 导入文件的路径
|
||||||
@JsonProperty( "filePath" )
|
@JsonProperty("filePath")
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
||||||
// 报表名称
|
// 报表名称
|
||||||
@JsonProperty( "reportType" )
|
@JsonProperty("reportType")
|
||||||
private ReportType reportType;
|
private int reportType;
|
||||||
|
|
||||||
// 是否有标题行
|
// 是否有标题行
|
||||||
@JsonProperty( "firstRow" )
|
@JsonProperty("firstRow")
|
||||||
private int firstRow;
|
private int firstRow;
|
||||||
|
|
||||||
// sheet索引
|
// sheet索引
|
||||||
@JsonProperty( "sheetIndex" )
|
@JsonProperty("sheetIndex")
|
||||||
private int sheetIndex;
|
private int sheetIndex;
|
||||||
|
|
||||||
public ImportBIDataRequest()
|
public ImportBIDataRequest() {}
|
||||||
{}
|
|
||||||
|
|
||||||
public int getFirstRow()
|
public int getFirstRow() {
|
||||||
{
|
|
||||||
return firstRow;
|
return firstRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFirstRow( int firstRow )
|
public void setFirstRow(int firstRow) {
|
||||||
{
|
|
||||||
this.firstRow = firstRow;
|
this.firstRow = firstRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSheetIndex()
|
public int getSheetIndex() {
|
||||||
{
|
|
||||||
return sheetIndex;
|
return sheetIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSheetIndex( int sheetIndex )
|
public void setSheetIndex(int sheetIndex) {
|
||||||
{
|
|
||||||
this.sheetIndex = sheetIndex;
|
this.sheetIndex = sheetIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFilePath()
|
public String getFilePath() {
|
||||||
{
|
|
||||||
return filePath;
|
return filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFilePath( String filePath )
|
public void setFilePath(String filePath) {
|
||||||
{
|
|
||||||
this.filePath = filePath;
|
this.filePath = filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReportType getReportType()
|
public int getReportType() {
|
||||||
{
|
|
||||||
return reportType;
|
return reportType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setReportType( ReportType reportType )
|
public void setReportType(int reportType) {
|
||||||
{
|
|
||||||
this.reportType = reportType;
|
this.reportType = reportType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +71,7 @@ public class ImportBIDataRequest
|
|||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
result = prime * result + ((filePath == null) ? 0 : filePath.hashCode());
|
result = prime * result + ((filePath == null) ? 0 : filePath.hashCode());
|
||||||
result = prime * result + ((reportType == null) ? 0 : reportType.hashCode());
|
result = prime * result + reportType;
|
||||||
result = prime * result + firstRow;
|
result = prime * result + firstRow;
|
||||||
result = prime * result + sheetIndex;
|
result = prime * result + sheetIndex;
|
||||||
return result;
|
return result;
|
||||||
@@ -117,11 +104,17 @@ public class ImportBIDataRequest
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString() {
|
||||||
{
|
return (
|
||||||
return "ImportBIDataRequest [filePath=" + filePath + ", reportType=" + reportType
|
"ImportBIDataRequest [filePath=" +
|
||||||
+ ", firstRow=" + firstRow + ", sheetIndex=" + sheetIndex + "]";
|
filePath +
|
||||||
|
", reportType=" +
|
||||||
|
reportType +
|
||||||
|
", firstRow=" +
|
||||||
|
firstRow +
|
||||||
|
", sheetIndex=" +
|
||||||
|
sheetIndex +
|
||||||
|
"]"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
|
*
|
||||||
* @Date: 2023-02-28 22:52:32
|
* @Date: 2023-02-28 22:52:32
|
||||||
|
*
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
|
*
|
||||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/filters/cros/CrosFilter.java
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/filters/cros/CrosFilter.java
|
||||||
|
*
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@@ -23,21 +27,22 @@ import org.springframework.http.HttpMethod;
|
|||||||
|
|
||||||
public class CrosFilter implements Filter
|
public class CrosFilter implements Filter
|
||||||
{
|
{
|
||||||
private static Logger logger = LoggerFactory.getLogger(CrosFilter.class);
|
private static Logger logger = LoggerFactory.getLogger( CrosFilter.class );
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
|
public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
|
||||||
throws ServletException, IOException
|
throws ServletException,
|
||||||
|
IOException
|
||||||
{
|
{
|
||||||
HttpServletRequest request = (HttpServletRequest) req;
|
HttpServletRequest request = ( HttpServletRequest ) req;
|
||||||
HttpServletResponse response = (HttpServletResponse) resp;
|
HttpServletResponse response = ( HttpServletResponse ) resp;
|
||||||
String method = request.getMethod();
|
String method = request.getMethod();
|
||||||
String originHeader = request.getHeader( "Origin" );
|
String originHeader = request.getHeader( "Origin" );
|
||||||
|
|
||||||
logger.info( "收到" + method + "请求,来自" + originHeader);
|
logger.info( "收到" + method + "请求,来自" + originHeader );
|
||||||
|
|
||||||
// 如果是Options请求
|
// 如果是Options请求
|
||||||
if ( method.equals(HttpMethod.OPTIONS.toString()) )
|
if ( method.equals( HttpMethod.OPTIONS.toString() ) )
|
||||||
{
|
{
|
||||||
originHeader = "*";
|
originHeader = "*";
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,9 @@
|
|||||||
call telsale_archievement_pkg.department_archievement(
|
call telsale_archievement_pkg.department_archievement(
|
||||||
#{a_department_code, mode=IN, jdbcType=VARCHAR},
|
#{a_department_code, mode=IN, jdbcType=VARCHAR},
|
||||||
#{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
|
#{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_attaching_rate_target, mode=OUT, jdbcType=VARCHAR},
|
||||||
#{a_renewal_rate, mode=OUT, jdbcType=VARCHAR},
|
#{a_renewal_rate, mode=OUT, jdbcType=VARCHAR},
|
||||||
|
#{a_renewal_rate_target, mode=OUT, jdbcType=VARCHAR},
|
||||||
#{a_total, mode=OUT, jdbcType=INTEGER, javaType=Integer},
|
#{a_total, mode=OUT, jdbcType=INTEGER, javaType=Integer},
|
||||||
#{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
|
#{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
|
||||||
</select>
|
</select>
|
||||||
|
@@ -11,12 +11,11 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertTelsalerRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
|
<insert id="insertTelsalerRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
|
||||||
insert into BI电销坐席续保率跟踪表 ("责任部门","责任人","机构目标值1(%)","到期数-全月",
|
insert into "BI电销坐席续保率跟踪表-24年" ("责任部门","责任人","机构目标值1(%)","到期数-全月",
|
||||||
"序时到期数占比(%)","个车续保率(序时)(%)","个车续保率(全月)(%)",
|
"序时到期数占比(%)","个车续保率(序时)(%)","个车续保率(全月)(%)",
|
||||||
"环比昨日(%)","环比上月(%)","平均提前签单天数","环比")
|
"环比昨日(%)","环比上月(%)")
|
||||||
values (#{责任部门},#{责任人},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
values (#{责任部门},#{责任人},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
||||||
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月},
|
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月} )
|
||||||
#{平均提前签单天数},#{环比})
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertDepartmentAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord">
|
<insert id="insertDepartmentAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord">
|
||||||
@@ -30,24 +29,23 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertDepartmentRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord" >
|
<insert id="insertDepartmentRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord" >
|
||||||
insert into BI机构当月个车续保率跟踪表( "责任部门","机构目标值1(%)","到期数-全月" ,"序时到期数占比(%)","个车续保率(序时)(%)",
|
insert into "BI机构续保率跟踪表-24年"( "责任部门","机构目标值1(%)","到期数-全月" ,"序时到期数占比(%)","个车续保率(序时)(%)",
|
||||||
"个车续保率(全月)(%)","环比昨日(%)","环比上月(%)","平均提前签单天数","环比")
|
"个车续保率(全月)(%)","环比昨日(%)","环比上月(%)")
|
||||||
values (#{责任部门},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
values (#{责任部门},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
||||||
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月},
|
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月} )
|
||||||
#{平均提前签单天数},#{环比})
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="cleanTelsalerAttachingRateData" statementType="CALLABLE">
|
<select id="cleanTelsalerAttachingRateData" statementType="CALLABLE">
|
||||||
call telsale_bi_utils.清理BI电销坐席车非渗透率跟踪表()
|
call TELSALE_BI_UTILS.清理BI电销坐席车非渗透率跟踪表()
|
||||||
</select>
|
</select>
|
||||||
<select id="cleanTelsalerRenewalRateData" statementType="CALLABLE">
|
<select id="cleanTelsalerRenewalRateData" statementType="CALLABLE">
|
||||||
call telsale_bi_utils.清理BI电销坐席续保率跟踪表()
|
call TELSALE_BI_UTILS.清理BI电销坐席续保率跟踪表()
|
||||||
</select>
|
</select>
|
||||||
<select id="cleanDepartmentAttachingRateData" statementType="CALLABLE">
|
<select id="cleanDepartmentAttachingRateData" statementType="CALLABLE">
|
||||||
call telsale_bi_utils.清理BI部门渗透率跟踪表()
|
call TELSALE_BI_UTILS.清理BI部门渗透率跟踪表()
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="cleanDepartmentRenewalRateData" statementType="CALLABLE">
|
<select id="cleanDepartmentRenewalRateData" statementType="CALLABLE">
|
||||||
call telsale_bi_utils.清理BI部门续保率跟踪表()
|
call TELSALE_BI_UTILS.清理BI部门续保率跟踪表()
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@@ -43,10 +43,8 @@
|
|||||||
t."个车续保率(序时)(%)" as 个车续保率序时,
|
t."个车续保率(序时)(%)" as 个车续保率序时,
|
||||||
t."个车续保率(全月)(%)" as 个车续保率全月,
|
t."个车续保率(全月)(%)" as 个车续保率全月,
|
||||||
t."环比昨日(%)" as 环比昨日,
|
t."环比昨日(%)" as 环比昨日,
|
||||||
t."环比上月(%)" as 环比上月,
|
t."环比上月(%)" as 环比上月
|
||||||
t.平均提前签单天数,
|
from "BI电销坐席续保率跟踪表-24年" t
|
||||||
t.环比
|
|
||||||
from BI电销坐席续保率跟踪表 t
|
|
||||||
</select>
|
</select>
|
||||||
<resultMap id="BITelsalerRenewalRate" type="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
|
<resultMap id="BITelsalerRenewalRate" type="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
|
||||||
<result property="责任部门" column="责任部门" javaType="String" jdbcType="VARCHAR" />
|
<result property="责任部门" column="责任部门" javaType="String" jdbcType="VARCHAR" />
|
||||||
@@ -58,8 +56,8 @@
|
|||||||
<result property="个车续保率全月" column="个车续保率全月" javaType="double" jdbcType="DOUBLE" />
|
<result property="个车续保率全月" column="个车续保率全月" javaType="double" jdbcType="DOUBLE" />
|
||||||
<result property="环比昨日" column="环比昨日" javaType="double" jdbcType="DOUBLE" />
|
<result property="环比昨日" column="环比昨日" javaType="double" jdbcType="DOUBLE" />
|
||||||
<result property="环比上月" column="环比上月" javaType="double" jdbcType="DOUBLE" />
|
<result property="环比上月" column="环比上月" javaType="double" jdbcType="DOUBLE" />
|
||||||
<result property="平均提前签单天数" column="平均提前签单天数" javaType="int" jdbcType="DOUBLE" />
|
<!-- <result property="平均提前签单天数" column="平均提前签单天数" javaType="int" jdbcType="DOUBLE" /> -->
|
||||||
<result property="环比" column="环比" javaType="int" jdbcType="DOUBLE" />
|
<!-- <result property="环比" column="环比" javaType="int" jdbcType="DOUBLE" /> -->
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 机构渗透率 -->
|
<!-- 机构渗透率 -->
|
||||||
@@ -104,10 +102,8 @@
|
|||||||
t."个车续保率(序时)(%)" as 个车续保率序时,
|
t."个车续保率(序时)(%)" as 个车续保率序时,
|
||||||
t."个车续保率(全月)(%)" as 个车续保率全月,
|
t."个车续保率(全月)(%)" as 个车续保率全月,
|
||||||
t."环比昨日(%)" as 环比昨日,
|
t."环比昨日(%)" as 环比昨日,
|
||||||
t."环比上月(%)" as 环比上月,
|
t."环比上月(%)" as 环比上月
|
||||||
t.平均提前签单天数,
|
from "BI机构续保率跟踪表-24年" t
|
||||||
t.环比
|
|
||||||
from BI机构当月个车续保率跟踪表 t
|
|
||||||
</select>
|
</select>
|
||||||
<resultMap id="BIDepartmentRenewalRate" type="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord">
|
<resultMap id="BIDepartmentRenewalRate" type="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord">
|
||||||
<result column="责任部门" property="责任部门" jdbcType="VARCHAR" javaType="String" />
|
<result column="责任部门" property="责任部门" jdbcType="VARCHAR" javaType="String" />
|
||||||
@@ -118,7 +114,7 @@
|
|||||||
<result column="个车续保率全月" property="个车续保率全月" jdbcType="DOUBLE" javaType="double" />
|
<result column="个车续保率全月" property="个车续保率全月" jdbcType="DOUBLE" javaType="double" />
|
||||||
<result column="环比昨日" property="环比昨日" jdbcType="DOUBLE" javaType="double" />
|
<result column="环比昨日" property="环比昨日" jdbcType="DOUBLE" javaType="double" />
|
||||||
<result column="环比上月" property="环比上月" jdbcType="DOUBLE" javaType="double" />
|
<result column="环比上月" property="环比上月" jdbcType="DOUBLE" javaType="double" />
|
||||||
<result column="平均提前签单天数" property="平均提前签单天数" jdbcType="INTEGER" javaType="int" />
|
<!-- <result column="平均提前签单天数" property="平均提前签单天数" jdbcType="INTEGER" javaType="int" /> -->
|
||||||
<result column="环比" property="环比" jdbcType="DOUBLE" javaType="double" />
|
<!-- <result column="环比" property="环比" jdbcType="DOUBLE" javaType="double" /> -->
|
||||||
</resultMap>
|
</resultMap>
|
||||||
</mapper>
|
</mapper>
|
@@ -79,6 +79,86 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- insertTWrTelsalerRecordToDB -->
|
<!-- insertTWrTelsalerRecordToDB -->
|
||||||
<insert id="insertTWrTelsalerRecordToDB">
|
<insert id="insertTWrTelsalerRecordToDB" parameterType="TWrTelsalerRecord">
|
||||||
|
insert into TWR_TELSALER_DEV(
|
||||||
|
人员姓名,
|
||||||
|
人员工号,
|
||||||
|
籍贯,
|
||||||
|
参加工作时间,
|
||||||
|
入职日期,
|
||||||
|
入司日期,
|
||||||
|
业务类型,
|
||||||
|
办公地省,
|
||||||
|
办公地市,
|
||||||
|
人员类别,
|
||||||
|
现任岗位,
|
||||||
|
现任职级,
|
||||||
|
机构名称,
|
||||||
|
职场分类,
|
||||||
|
片区名称,
|
||||||
|
团队名称,
|
||||||
|
对口分公司,
|
||||||
|
展业地区,
|
||||||
|
招聘渠道,
|
||||||
|
渠道明细,
|
||||||
|
全日制最高学历,
|
||||||
|
学历类型,
|
||||||
|
用工性质名称,
|
||||||
|
合同种类,
|
||||||
|
合同类型,
|
||||||
|
合同性质,
|
||||||
|
合同签订次数,
|
||||||
|
合同生效日期,
|
||||||
|
合同到期日期,
|
||||||
|
人员属性,
|
||||||
|
保代员工号,
|
||||||
|
职场属性,
|
||||||
|
办公性质,
|
||||||
|
保代人员属性,
|
||||||
|
人员状态)
|
||||||
|
values (
|
||||||
|
#{人员姓名},
|
||||||
|
#{人员工号},
|
||||||
|
#{籍贯},
|
||||||
|
#{参加工作时间},
|
||||||
|
#{入职日期},
|
||||||
|
#{入司日期},
|
||||||
|
#{业务类型},
|
||||||
|
#{办公地省},
|
||||||
|
#{办公地市},
|
||||||
|
#{人员类别},
|
||||||
|
#{现任岗位},
|
||||||
|
#{现任职级},
|
||||||
|
#{机构名称},
|
||||||
|
#{职场分类},
|
||||||
|
#{片区名称},
|
||||||
|
#{团队名称},
|
||||||
|
#{对口分公司},
|
||||||
|
#{展业地区},
|
||||||
|
#{招聘渠道},
|
||||||
|
#{渠道明细},
|
||||||
|
#{全日制最高学历},
|
||||||
|
#{学历类型},
|
||||||
|
#{用工性质名称},
|
||||||
|
#{合同种类},
|
||||||
|
#{合同类型},
|
||||||
|
#{合同性质},
|
||||||
|
#{合同签订次数},
|
||||||
|
#{合同生效日期},
|
||||||
|
#{合同到期日期},
|
||||||
|
#{人员属性},
|
||||||
|
#{保代员工号},
|
||||||
|
#{职场属性},
|
||||||
|
#{办公性质},
|
||||||
|
#{保代人员属性},
|
||||||
|
#{人员状态} )
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="cleanTWrTelsalerRecord" statementType="CALLABLE">
|
||||||
|
call TELSALER_TWR_UTILS.清理TWR坐席清单()
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="cleanTWrTelsalerTeamRecord" statementType="CALLABLE">
|
||||||
|
call TELSALER_TWR_UTILS.清理TWR团队清单()
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@@ -33,6 +33,7 @@
|
|||||||
<mapper resource="mybatis/mapper/RewardsMapper.xml" />
|
<mapper resource="mybatis/mapper/RewardsMapper.xml" />
|
||||||
<mapper resource="mybatis/mapper/ImportBIArchievementDataMapper.xml" />
|
<mapper resource="mybatis/mapper/ImportBIArchievementDataMapper.xml" />
|
||||||
<mapper resource="mybatis/mapper/QueryBIArchievementDataMapper.xml" />
|
<mapper resource="mybatis/mapper/QueryBIArchievementDataMapper.xml" />
|
||||||
|
<mapper resource="mybatis/mapper/TWrTelsalerMapper.xml" />
|
||||||
</mappers>
|
</mappers>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
@@ -1,7 +1,11 @@
|
|||||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<web-app
|
||||||
|
version="4.0"
|
||||||
|
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||||
|
xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee"
|
||||||
|
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
|
||||||
version="3.1">
|
|
||||||
|
|
||||||
<display-name>Archetype Created Web Application</display-name>
|
<display-name>Archetype Created Web Application</display-name>
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper;
|
import com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper;
|
||||||
import com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord;
|
import com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord;
|
||||||
|
import com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord;
|
||||||
import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord;
|
import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord;
|
||||||
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
||||||
import com.cpic.xim.utils.data.ImportBIExcelData;
|
import com.cpic.xim.utils.data.ImportBIExcelData;
|
||||||
@@ -74,7 +75,7 @@ public class BatchInsertTest
|
|||||||
@Test
|
@Test
|
||||||
public void testBatchInsertBITeslsalerRenewalRate()
|
public void testBatchInsertBITeslsalerRenewalRate()
|
||||||
{
|
{
|
||||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/坐席-续保.xlsx";
|
String filePath = "D:\\develop\\cpicxim\\deskop_task_schedule\\数据\\测试用\\24年报表\\坐席-续保.xlsx";
|
||||||
ArrayList<BITelsalerRenewalRateRecord> records = null;
|
ArrayList<BITelsalerRenewalRateRecord> records = null;
|
||||||
SqlSession session = null;
|
SqlSession session = null;
|
||||||
ImportBIArchievementDataMapper mapper = null;
|
ImportBIArchievementDataMapper mapper = null;
|
||||||
@@ -114,7 +115,7 @@ public class BatchInsertTest
|
|||||||
@Test
|
@Test
|
||||||
public void testBatchInsertBIDepartmentAttachingRateToDB()
|
public void testBatchInsertBIDepartmentAttachingRateToDB()
|
||||||
{
|
{
|
||||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/机构渗透.xlsx";
|
String filePath = "D:\\develop\\cpicxim\\deskop_task_schedule\\数据\\测试用\\24年报表\\机构-续保.xlsx";
|
||||||
|
|
||||||
ArrayList<BIDepartmentAttachingRateRecord> records = null;
|
ArrayList<BIDepartmentAttachingRateRecord> records = null;
|
||||||
SqlSession session = null;
|
SqlSession session = null;
|
||||||
@@ -148,4 +149,42 @@ public class BatchInsertTest
|
|||||||
assert( false );
|
assert( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testBatchInsertBIDepartmentRenewalRateToDB()
|
||||||
|
{
|
||||||
|
String filePath = "D:\\develop\\cpicxim\\deskop_task_schedule\\数据\\测试用\\24年报表\\机构-续保.xlsx";
|
||||||
|
|
||||||
|
ArrayList<BIDepartmentRenewalRateRecord> records = null;
|
||||||
|
SqlSession session = null;
|
||||||
|
ImportBIArchievementDataMapper mapper = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
records =
|
||||||
|
ImportBIExcelData.importBIDepartmentRenewalRateRecordsFromXlsx( filePath, 0, 1 );
|
||||||
|
session = MybatisUtils.getSqlSessionBatch();
|
||||||
|
mapper = session.getMapper( ImportBIArchievementDataMapper.class );
|
||||||
|
|
||||||
|
mapper.cleanDepartmentRenewalRateData();
|
||||||
|
|
||||||
|
for ( BIDepartmentRenewalRateRecord record : records )
|
||||||
|
{
|
||||||
|
mapper.insertDepartmentRenewalRateDataToDB( record );
|
||||||
|
}
|
||||||
|
|
||||||
|
session.commit();
|
||||||
|
}
|
||||||
|
catch ( Exception error )
|
||||||
|
{
|
||||||
|
if ( session != null )
|
||||||
|
{
|
||||||
|
session.rollback();
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.error("错误", error);
|
||||||
|
|
||||||
|
assert( false );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
BIN
数据/测试用/24年报表/坐席-续保.xlsx
Normal file
BIN
数据/测试用/24年报表/坐席-续保.xlsx
Normal file
Binary file not shown.
BIN
数据/测试用/24年报表/机构-续保.xlsx
Normal file
BIN
数据/测试用/24年报表/机构-续保.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user