Compare commits
	
		
			1 Commits
		
	
	
		
			feature-te
			...
			feature-ui
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 4511395d35 | 
| @@ -1,28 +0,0 @@ | |||||||
| 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; |  | ||||||
| / |  | ||||||
| @@ -1,309 +0,0 @@ | |||||||
| 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_ATTACHING_RATE_TARGET OUT VARCHAR2, |         a_renewal_rate    OUT VARCHAR2, | ||||||
|         A_RENEWAL_RATE          OUT VARCHAR2, |         a_total           OUT INTEGER, | ||||||
|         A_RENEWAL_RATE_TARGET   OUT VARCHAR2, |         a_mensual_cur     OUT cur_type | ||||||
|         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_TOTAL           OUT INTEGER, | ||||||
|         A_RENEWAL_RATE_TARGET   OUT VARCHAR2, |         A_MENSUAL_CUR     OUT CUR_TYPE | ||||||
|         A_TOTAL                 OUT INTEGER, |  | ||||||
|         A_MENSUAL_CUR           OUT CUR_TYPE |  | ||||||
|     ) IS |     ) IS | ||||||
|         L_FIRSTDAY            DATE; |         --L_THIS_MONTH      VARCHAR2(4); | ||||||
|         L_DEPARTMENT_NAME     VARCHAR2(100); |         --L_THIS_YEAR       VARCHAR2(4); | ||||||
|         L_RENEWAL_RATE_TARGET NUMBER; |         L_FIRSTDAY        DATE; | ||||||
|  |         L_DEPARTMENT_NAME VARCHAR2(100); | ||||||
|     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,62 +77,45 @@ 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> | ||||||
|         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>&Ŀ<><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |         /*SELECT DECODE(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>), | ||||||
|         BEGIN |                      0, | ||||||
|             SELECT ROUND(DEPT.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>, |                      0, | ||||||
|                          2), |                      ROUND((SUM(CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>) * 100), | ||||||
|                    ROUND(DEPT.Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, |                            2)) | ||||||
|                          2) |          INTO A_ATTACHING_RATE | ||||||
|               INTO A_ATTACHING_RATE, |          FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF | ||||||
|                    A_ATTACHING_RATE_TARGET |         WHERE CF.<2E>·<EFBFBD> = L_THIS_MONTH | ||||||
|               FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD> DEPT |           AND CF.<2E><EFBFBD><EFBFBD><EFBFBD> = L_THIS_YEAR | ||||||
|              WHERE DEPT.<2E><EFBFBD><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME; |           AND <20><><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD> = A_DEPARTMENT_CODE;*/ | ||||||
|          |         SELECT round(dept.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>, | ||||||
|             --<2D><><EFBFBD><EFBFBD>round<6E><64><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ȱ0<C8B1><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |                      2) | ||||||
|             SELECT DECODE(SUBSTR(A_ATTACHING_RATE_TARGET, |           INTO A_ATTACHING_RATE | ||||||
|                                  1, |           FROM desktop_archievement_admin.BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> dept | ||||||
|                                  1), |          WHERE dept.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME; | ||||||
|                           '.', |         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||||
|                           '0' || A_ATTACHING_RATE_TARGET, |         /*SELECT DECODE(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>), | ||||||
|                           A_ATTACHING_RATE_TARGET) |                      0, | ||||||
|               INTO A_ATTACHING_RATE_TARGET |                      0, | ||||||
|               FROM DUAL; |                      ROUND(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100, | ||||||
|         EXCEPTION |                            2)) | ||||||
|             WHEN NO_DATA_FOUND THEN |          INTO A_RENEWAL_RATE | ||||||
|                 A_ATTACHING_RATE        := '0.0'; |          FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3> | ||||||
|                 A_ATTACHING_RATE_TARGET := '0.0'; |         WHERE <20><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME;*/ | ||||||
|         END; |         SELECT round(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)", | ||||||
|      |                      2) | ||||||
|         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |           INTO A_RENEWAL_RATE | ||||||
|         BEGIN |           FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t | ||||||
|             SELECT ROUND(t."<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>(%)", |          WHERE t.<2E><><EFBFBD>β<EFBFBD><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME; | ||||||
|                          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> |         --<2D><>ҵ<EFBFBD><D2B5> | ||||||
|         A_TOTAL := 0; |         SELECT ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD> + CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>), | ||||||
|      |                          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, | ||||||
| @@ -153,90 +136,92 @@ 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_YEAR       VARCHAR2(4); |         --l_this_month      VARCHAR2(4); | ||||||
|         L_ROWNUM          INTEGER; |         l_this_year VARCHAR2(4); | ||||||
|  |         --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.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>, |             /*SELECT zx.saler_name, | ||||||
|                    BM.DEPARTMENT_NAME |                   bm.department_name | ||||||
|               INTO L_CALLER_NAME, |              INTO l_caller_name, | ||||||
|                    L_DEPARTMENT_NAME |                   l_department_name | ||||||
|               FROM TWR_TELSALER      ZX, |              FROM tele_saler      zx, | ||||||
|                    TWR_TELSALER_TEAM T, |                   tele_saler_team team, | ||||||
|                    IDST0.BM_T        BM |                   idst0.bm_t      bm | ||||||
|              WHERE ZX.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD> = A_CALLER_CODE |             WHERE zx.saler_code = a_caller_code | ||||||
|                AND ZX.<2E>Ŷ<EFBFBD><C5B6><EFBFBD><EFBFBD><EFBFBD> = T.TEAM_NAME |               AND zx.team_code = team.team_code | ||||||
|                AND T.DEPARTMENT_CODE = BM.DEPARTMENT_CODE; |               AND team.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_YEAR := TO_CHAR(SYSDATE, |         --l_this_month := 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> | ||||||
|         BEGIN |         SELECT rownum, | ||||||
|             SELECT ROWNUM, |                round(nvl(t.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>, | ||||||
|                    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> | ||||||
|         BEGIN |         SELECT rownum, | ||||||
|             SELECT ROWNUM, |                round(nvl(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)", | ||||||
|                    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<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>-24<32><34>" T |          WHERE t.<EFBFBD><EFBFBD><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 | ||||||
| @@ -245,8 +230,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') | ||||||
| @@ -281,27 +266,54 @@ 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.XBL  AS ATTACHING_RATE |                    paihang.attaching_rate | ||||||
|               FROM (SELECT T.<2E><><EFBFBD><EFBFBD>, |               FROM (SELECT DISTINCT * | ||||||
|                            ROUND(T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, |                       FROM (SELECT t.<2E><><EFBFBD><EFBFBD>, | ||||||
|                                  2) XBL |                                    round(t.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>, | ||||||
|                       FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> T |                                          2) attaching_rate, | ||||||
|                      WHERE T.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME |                                    zuoxi.department_name | ||||||
|                      ORDER BY T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8> DESC) PAIHANG; |                               FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t, | ||||||
|      |                                    (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 T.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, |               FROM (SELECT DISTINCT * | ||||||
|                            ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)", |                       FROM (SELECT t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||||
|                                  2) XBL |                                    round(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)", | ||||||
|                       FROM "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>" T |                                          2) xbl, | ||||||
|                      WHERE T.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> = L_DEPARTMENT_NAME |                                    zuoxi.department_name | ||||||
|                      ORDER BY XBL DESC) PAIHANG; |                               FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t, | ||||||
|  |                                    (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,8 +23,7 @@ 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 | ||||||
| @@ -34,12 +33,11 @@ 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; | ||||||
| / | / | ||||||
|   | |||||||
| @@ -1,45 +0,0 @@ | |||||||
| 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; |  | ||||||
| / |  | ||||||
| @@ -1,3 +0,0 @@ | |||||||
| 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>-24<32><34>" |   FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD> | ||||||
|  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>-24<32><34>"; |   FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>; | ||||||
|   | |||||||
| @@ -1,17 +0,0 @@ | |||||||
| 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 |  | ||||||
| @@ -1,40 +0,0 @@ | |||||||
| { |  | ||||||
|   "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" |  | ||||||
|   } |  | ||||||
| } |  | ||||||
							
								
								
									
										11504
									
								
								code/web/task_schedule/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										11504
									
								
								code/web/task_schedule/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -9,22 +9,32 @@ | |||||||
|     "preview": "vite preview" |     "preview": "vite preview" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@element-plus/icons-vue": "^2.3.2", |     "@element-plus/icons-vue": "^2.3.1", | ||||||
|     "axios": "^1.11.0", |     "echarts": "^5.4.3", | ||||||
|     "echarts": "^6.0.0", |     "element-plus": "^2.4.3", | ||||||
|     "element-plus": "^2.11.1", |  | ||||||
|     "mitt": "^3.0.1", |     "mitt": "^3.0.1", | ||||||
|     "moment": "^2.30.1", |     "moment": "^2.29.4", | ||||||
|     "task_schedule": "file:", |     "sass-loader": "^13.3.2", | ||||||
|     "vue": "^3.5.21", |     "vue": "^3.3.11", | ||||||
|     "vue-router": "^4.5.1", |     "vue-router": "^4.2.5", | ||||||
|     "vuex": "^4.1.0" |     "vuex": "^4.1.0" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@vitejs/plugin-vue": "^6.0.1", |     "@babel/eslint-parser": "^7.23.3", | ||||||
|  |     "@rushstack/eslint-patch": "^1.6.0", | ||||||
|  |     "@typescript-eslint/eslint-plugin": "^6.14.0", | ||||||
|  |     "@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": "^43.0.1", |     "eslint-config-standard-with-typescript": "^42.0.0", | ||||||
|     "eslint-plugin-vue": "^10.4.0", |     "eslint-plugin-vue": "^9.19.2", | ||||||
|     "ts-node": "^10.9.2" |     "node-sass": "^9.0.0", | ||||||
|  |     "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="ui.warningLevel" |             status="success" | ||||||
|         > |         > | ||||||
|             <template #default> |             <template #default> | ||||||
|                 <span class="percentage-label">{{ ui.indicator }}</span> |                 <span class="percentage-label">{{ ui.indicator }}</span> | ||||||
|                 <span :class="warningLevelClass">{{ percentage }}%</span> |                 <span class="percentage-value">{{ percentage }}%</span> | ||||||
|             </template> |             </template> | ||||||
|         </el-progress> |         </el-progress> | ||||||
|     </div> |     </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script lang="ts"> | <script lang="ts"> | ||||||
| import { reactive, computed } from "vue"; | import { reactive } from "vue"; | ||||||
| export default { | export default { | ||||||
|     name: "ArchievementCompleteRateComponent", |     name: "ArchievementCompleteRateComponent", | ||||||
|     props: { |     props: { | ||||||
| @@ -36,42 +36,17 @@ 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, warningLevelClass, }; |         return { ui, }; | ||||||
|     }, |     }, | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
| @@ -99,21 +74,6 @@ 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,22 +78,32 @@ | |||||||
| // @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 userRout.path; |             return useRoute().path; | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return { userRout, routes, currentPath, hasOnlyChild, }; |         return { 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-20240111</span> |             <span>Build-20230915</span> | ||||||
|         </div> |         </div> | ||||||
|         <div class="buttons-wrapper"> |         <div class="buttons-wrapper"> | ||||||
|             <component |             <component | ||||||
|   | |||||||
| @@ -1,89 +0,0 @@ | |||||||
| /* |  | ||||||
|  * @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 |  | ||||||
| }; |  | ||||||
| @@ -1,50 +0,0 @@ | |||||||
|  |  | ||||||
| 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 |  | ||||||
| }; |  | ||||||
| @@ -1,35 +0,0 @@ | |||||||
| /* |  | ||||||
|  * @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 ); |  | ||||||
| @@ -1,28 +0,0 @@ | |||||||
| /* |  | ||||||
|  * @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 ); |  | ||||||
| @@ -1,31 +0,0 @@ | |||||||
| /* |  | ||||||
|  * @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 }; |  | ||||||
| @@ -1,30 +0,0 @@ | |||||||
| /* |  | ||||||
|  * @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,12 +11,10 @@ | |||||||
|     "compilerOptions": { |     "compilerOptions": { | ||||||
|         "forceConsistentCasingInFileNames": true, |         "forceConsistentCasingInFileNames": true, | ||||||
|         "useDefineForClassFields": true, |         "useDefineForClassFields": true, | ||||||
|         "allowImportingTsExtensions": true, |  | ||||||
|         "noEmit": true, |  | ||||||
|         "target": "ESNext", |         "target": "ESNext", | ||||||
|         "module": "NodeNext", |         "module": "ESNext", | ||||||
|         // "module": "CommonJS", |         // "module": "CommonJS", | ||||||
|         "moduleResolution": "NodeNext", |         "moduleResolution": "node", | ||||||
|         "strict": true, |         "strict": true, | ||||||
|         "jsx": "preserve", |         "jsx": "preserve", | ||||||
|         "sourceMap": true, |         "sourceMap": true, | ||||||
| @@ -49,7 +47,6 @@ | |||||||
|         "./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.ts"; | import { service as instance } from "./api/request.js"; | ||||||
| import { API_URL } from "./api/config.ts"; | import { API_URL } from "./api/config.js"; | ||||||
| import { type AxiosResponse } from "axios"; | import { type AxiosResponse } from "axios"; | ||||||
| interface BIReportType | interface BIReportType | ||||||
| { | { | ||||||
|   | |||||||
| @@ -7,7 +7,6 @@ | |||||||
|  * |  * | ||||||
|  * 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,7 +27,6 @@ function loadStaffInfo(): StaffInfo | |||||||
|         obj = {}; |         obj = {}; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /* eslint-disable */ |  | ||||||
|     const stuff = new StaffInfo( |     const stuff = new StaffInfo( | ||||||
|         obj._p13uid ?? "", |         obj._p13uid ?? "", | ||||||
|         obj._stuffCode ?? "", |         obj._stuffCode ?? "", | ||||||
| @@ -36,7 +35,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: 30000, |         timeout: 10000, | ||||||
|     } |     } | ||||||
| ); | ); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,18 +0,0 @@ | |||||||
| /* |  | ||||||
|  * @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.ts"; | import { service as instance } from "./api/request.js"; | ||||||
| import { API_URL } from "./api/config.ts"; | import { API_URL } from "./api/config.js"; | ||||||
| import { type Department } from "../types/cpicxim/Department.ts"; | import { type Department } from "../types/cpicxim/Department.js"; | ||||||
| import { type TelSaler } from "../types/cpicxim/TelSaler.ts"; | import { type TelSaler } from "../types/cpicxim/TelSaler.js"; | ||||||
| import { type AxiosResponse } from "axios"; | import { type AxiosResponse } from "axios"; | ||||||
|  |  | ||||||
| interface DepartmentArchievement // 定义业绩对象的结构 | interface DepartmentArchievement // 定义业绩对象的结构 | ||||||
| @@ -20,9 +20,7 @@ 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[]; | ||||||
| @@ -59,9 +57,7 @@ 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: [], | ||||||
| @@ -82,9 +78,7 @@ 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 ?? []; | ||||||
| @@ -93,7 +87,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 ); // eslint-disable-line |                 archievement.mensual_archievement_list.push( item.premium ); | ||||||
|             }); |             }); | ||||||
|  |  | ||||||
|             console.log( "每月业绩", archievement ); |             console.log( "每月业绩", archievement ); | ||||||
| @@ -169,7 +163,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 ); // eslint-disable-line |             const checkedList = checkMensualArchievement( data.mensual_archievement_list ); | ||||||
|  |  | ||||||
|             // 排序一下 |             // 排序一下 | ||||||
|             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.ts"; | import { service as instance } from "./api/request.js"; | ||||||
| import { API_URL } from "./api/config.ts"; | import { API_URL } from "./api/config.js"; | ||||||
| import { type RankingListItem } from "../types/cpicxim/RankingListItem.ts"; | import { type RankingListItem } from "../types/cpicxim/RankingListItem.js"; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 用于请求排行榜数据请求参数 |  * 用于请求排行榜数据请求参数 | ||||||
| @@ -33,7 +33,7 @@ interface RankingListResponse | |||||||
| } | } | ||||||
|  |  | ||||||
| // 判断用的正则表达式 | // 判断用的正则表达式 | ||||||
| const regexMonth = "(0[1-9])|(1[0-2])"; // eslint-disable-line | const regexMonth = "(0[1-9])|(1[0-2])"; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 请求坐席排行榜。 |  * 请求坐席排行榜。 | ||||||
|   | |||||||
| @@ -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.ts"; | import { service as instance } from "./api/request.js"; | ||||||
| import { API_URL } from "./api/config.ts"; | import { API_URL } from "./api/config.js"; | ||||||
|  |  | ||||||
| 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 ?? []); // eslint-disable-line |             rewardResponse.rewardList = checkRewardProjects( data.rewardList ?? []); | ||||||
|  |  | ||||||
|             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 ); // eslint-disable-line |             rewardResponse.gainerList = checkRewardGainers( data.gainerList ); | ||||||
|  |  | ||||||
|             handler( rewardResponse, null ); |             handler( rewardResponse, null ); | ||||||
|         }) |         }) | ||||||
|   | |||||||
| @@ -25,12 +25,10 @@ | |||||||
|                     <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"> | ||||||
| @@ -105,9 +103,7 @@ 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[]; | ||||||
| @@ -157,9 +153,7 @@ 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: ["",], | ||||||
| @@ -207,9 +201,7 @@ 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; | ||||||
| @@ -339,52 +331,6 @@ 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, | ||||||
| @@ -393,8 +339,6 @@ 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/DataUploadView.vue |  * @FilePath: /task_schedule/src/views/data/bi/BiDataUploadView.vue | ||||||
|  * @Description: 上传文件用的组件 |  * @Description: | ||||||
|  * |  * | ||||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved. |  * Copyright (c) ${2023} by Kane, All Rights Reserved. | ||||||
| --> | --> | ||||||
| @@ -104,24 +104,20 @@ export default { | |||||||
|             selectedReportType: 0, |             selectedReportType: 0, | ||||||
|             reportType: [ |             reportType: [ | ||||||
|                 { |                 { | ||||||
|                     reportTypeCode: 1, |                     reportTypeCode: 0, | ||||||
|                     reportTypeName: "坐席车非渗透率", |                     reportTypeName: "坐席车非渗透率", | ||||||
|                 }, |                 }, | ||||||
|                 { |                 { | ||||||
|                     reportTypeCode: 2, |                     reportTypeCode: 1, | ||||||
|                     reportTypeName: "坐席续保率", |                     reportTypeName: "坐席续保率", | ||||||
|                 }, |                 }, | ||||||
|                 { |                 { | ||||||
|                     reportTypeCode: 3, |                     reportTypeCode: 2, | ||||||
|                     reportTypeName: "部门车非渗透率", |                     reportTypeName: "部门车非渗透率", | ||||||
|                 }, |                 }, | ||||||
|                 { |                 { | ||||||
|                     reportTypeCode: 4, |                     reportTypeCode: 3, | ||||||
|                     reportTypeName: "当月个车续保率跟踪报表【机构】", |                     reportTypeName: "当月个车续保率跟踪报表【机构】", | ||||||
|                 }, |  | ||||||
|                 { |  | ||||||
|                     reportTypeCode: 10, |  | ||||||
|                     reportTypeName: "TWr坐席清单", |  | ||||||
|                 },], |                 },], | ||||||
|             sheetIndex: 0, |             sheetIndex: 0, | ||||||
|             firstRow: 1, |             firstRow: 1, | ||||||
| @@ -7,6 +7,7 @@ | |||||||
|  * |  * | ||||||
|  * 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"> | ||||||
| @@ -91,7 +92,7 @@ | |||||||
|                 :close-on-press-escape="false" |                 :close-on-press-escape="false" | ||||||
|                 :show-close="true" |                 :show-close="true" | ||||||
|             > |             > | ||||||
|                 <DataUploadView :report-type="3" /> |                 <BiDataUploadView :report-type="2" /> | ||||||
|             </el-dialog> |             </el-dialog> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| @@ -105,7 +106,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 DataUploadView from "@/views/data/DataUploadView.vue"; | import BiDataUploadView from "@/views/data/bi/BiDataUploadView.vue"; | ||||||
|  |  | ||||||
| interface UI | interface UI | ||||||
| { | { | ||||||
| @@ -118,7 +119,7 @@ interface UI | |||||||
|  |  | ||||||
| export default { | export default { | ||||||
|     name: "DepartmentAttachingRateView", |     name: "DepartmentAttachingRateView", | ||||||
|     components: { DataUploadView, }, |     components: { BiDataUploadView, }, | ||||||
|     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" | ||||||
|             > |             > | ||||||
|                 <DataUploadView :report-type="4" /> |                 <BiDataUploadView :report-type="3" /> | ||||||
|             </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 DataUploadView from "@/views/data/DataUploadView.vue"; | import BiDataUploadView from "@/views/data/bi/BiDataUploadView.vue"; | ||||||
|  |  | ||||||
| interface UI | interface UI | ||||||
| { | { | ||||||
| @@ -135,7 +135,7 @@ interface UI | |||||||
|  |  | ||||||
| export default { | export default { | ||||||
|     name: "DepartmentRenewalRateView", |     name: "DepartmentRenewalRateView", | ||||||
|     components: { DataUploadView, }, |     components: { BiDataUploadView, }, | ||||||
|     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" | ||||||
|             > |             > | ||||||
|                 <DataUploadView :report-type="1" /> |                 <BiDataUploadView :report-type="0" /> | ||||||
|             </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 DataUploadView from "@/views/data/DataUploadView.vue"; | import BiDataUploadView from "@/views/data/bi/BiDataUploadView.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: { DataUploadView, }, |     components: { BiDataUploadView, }, | ||||||
|     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.个车续保率序时.toFixed(2) + "%" }}</span> |                     <span>{{ telsaler.row.个车续保率序时 }}</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.个车续保率全月.toFixed(2) + "%" }}</span> |                     <span>{{ telsaler.row.个车续保率全月 }}</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" | ||||||
|             > |             > | ||||||
|                 <DataUploadView :report-type="2" /> |                 <BiDataUploadView :report-type="1" /> | ||||||
|             </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 DataUploadView from "@/views/data/DataUploadView.vue"; | import BiDataUploadView from "@/views/data/bi/BiDataUploadView.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: { DataUploadView, }, |     components: { BiDataUploadView, }, | ||||||
|     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,19 +51,9 @@ | |||||||
|                         > |                         > | ||||||
|                             查询 |                             查询 | ||||||
|                         </el-button> |                         </el-button> | ||||||
|                         <el-button |                         <el-button icon="refresh"> | ||||||
|                             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> | ||||||
| @@ -112,38 +102,19 @@ | |||||||
|                 @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: [], | ||||||
| @@ -171,18 +142,7 @@ export default { | |||||||
|             return 10 * 50 + 40; |             return 10 * 50 + 40; | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         const onResetQuery = (): void => |         return { ui, onCurrentPageIndexChange, onTablePageSizeChange, tableHeight, }; | ||||||
|         { |  | ||||||
|             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,8 +11,6 @@ | |||||||
|     "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", | ||||||
|   | |||||||
							
								
								
									
										6
									
								
								code/后端/desktop_archievement_backend/package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								code/后端/desktop_archievement_backend/package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | { | ||||||
|  |   "name": "desktop_archievement_backend", | ||||||
|  |   "lockfileVersion": 3, | ||||||
|  |   "requires": true, | ||||||
|  |   "packages": {} | ||||||
|  | } | ||||||
| @@ -1,4 +1,3 @@ | |||||||
| <?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"> | ||||||
| @@ -14,9 +13,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.2.4</spring.version> |     <!-- <spring.version>6.0.11</spring.version> --> | ||||||
|   </properties> |   </properties> | ||||||
|  |  | ||||||
|   <dependencies> |   <dependencies> | ||||||
| @@ -67,7 +66,7 @@ | |||||||
|     <dependency> |     <dependency> | ||||||
|       <groupId>commons-io</groupId> |       <groupId>commons-io</groupId> | ||||||
|       <artifactId>commons-io</artifactId> |       <artifactId>commons-io</artifactId> | ||||||
|       <version>2.18.0</version> |       <version>2.11.0</version> | ||||||
|     </dependency> |     </dependency> | ||||||
|  |  | ||||||
|     <!--jackson--> |     <!--jackson--> | ||||||
| @@ -146,7 +145,6 @@ | |||||||
|       <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,8 +17,4 @@ 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 环比上月 ) |             double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月, int 平均提前签单天数, 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,6 +120,25 @@ 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() | ||||||
| @@ -141,6 +160,9 @@ 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; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -175,6 +197,10 @@ 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; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -183,6 +209,7 @@ 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,11 +20,12 @@ 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.责任人 = 责任人; | ||||||
| @@ -35,8 +36,32 @@ 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 责任部门; | ||||||
| @@ -69,6 +94,10 @@ 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; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -110,6 +139,10 @@ 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; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -118,7 +151,8 @@ public class BITelsalerRenewalRateRecord | |||||||
|     { |     { | ||||||
|         return "BITelsalerRenewalRateRecord [责任部门=" + 责任部门 + ", 责任人=" + 责任人 + ", 机构目标值=" + 机构目标值 |         return "BITelsalerRenewalRateRecord [责任部门=" + 责任部门 + ", 责任人=" + 责任人 + ", 机构目标值=" + 机构目标值 | ||||||
|                 + ", 到期数全月=" + 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时 |                 + ", 到期数全月=" + 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时 | ||||||
|                 + ", 个车续保率全月=" + 个车续保率全月 + ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + "]"; |                 + ", 个车续保率全月=" + 个车续保率全月 + ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + ", 平均提前签单天数=" | ||||||
|  |                 + 平均提前签单天数 + ", 环比=" + 环比 + "]"; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public String get责任人() |     public String get责任人() | ||||||
|   | |||||||
| @@ -25,6 +25,36 @@ 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 部门代码 | ||||||
| @@ -52,17 +82,15 @@ 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, renewalRateTarget, |                 renewalRate,  | ||||||
|                 attachingRate, attachingRateTarget); |                 attachingRate); | ||||||
|         } |         } | ||||||
|         catch ( IOException error ) |         catch ( IOException error ) | ||||||
|         { |         { | ||||||
| @@ -76,67 +104,6 @@ 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; | ||||||
| @@ -172,117 +139,11 @@ 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; | ||||||
| @@ -292,4 +153,21 @@ 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,24 +34,21 @@ 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文件格式的函数。 | ||||||
| @@ -97,8 +94,6 @@ public final class ImportBIExcelData | |||||||
|                 for ( Cell cell : titleRow ) |                 for ( Cell cell : titleRow ) | ||||||
|                 { |                 { | ||||||
|                     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] ) ) | ||||||
|                     { |                     { | ||||||
| @@ -325,11 +320,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 ); | ||||||
|                 } |                 } | ||||||
| @@ -504,11 +499,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 ArrayList<TWrTelsalerRecord> importTWrTelsalerDataFromExcel( String filePath, int sheetIndex, |     public static void 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,8 +132,6 @@ 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,10 +70,11 @@ 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.setAttachingRateTarget( departmentArch.getAttachingRateTarget() ); |             // result.addAdvanceRewardGainer( "沈群" ); | ||||||
|  |             // result.addLeadingRewardGainer( "王鸿津" ); | ||||||
|  |             // result.addLeadingRewardGainer( "林宗泽" ); | ||||||
|  |             // result.addBackwardStaff( "王炜" ); | ||||||
|             result.setMensualArchievementList( departmentArch.getMensualArchievementList() ); |             result.setMensualArchievementList( departmentArch.getMensualArchievementList() ); | ||||||
|         } |         } | ||||||
|         catch ( IOException error ) |         catch ( IOException error ) | ||||||
|   | |||||||
| @@ -7,6 +7,7 @@ | |||||||
|  *  |  *  | ||||||
|  * 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; | ||||||
| @@ -22,35 +23,6 @@ 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>(); | ||||||
| @@ -145,129 +117,26 @@ public class DepartmentArchievementQueryResult extends QueryResponse | |||||||
|         this.backwardList = backwardList; |         this.backwardList = backwardList; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public String getInsuranceRenewalRateTarget() |     @JsonProperty( "total_archievement" ) | ||||||
|     { |     private long totalArchievement; // 总业绩 | ||||||
|         return insuranceRenewalRateTarget; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public void setInsuranceRenewalRateTarget( String insuranceRenewalRateTarget ) |     // 每月业绩列表 | ||||||
|     { |     // 要保证数据是按照月份排序。 | ||||||
|         this.insuranceRenewalRateTarget = insuranceRenewalRateTarget; |     @JsonProperty( "mensual_archievement_list" ) | ||||||
|     } |     private ArrayList<MensualArchievementItem> mensualArchievementList; | ||||||
|  |  | ||||||
|     public String getAttachingRateTarget() |     @JsonProperty( "insurance_renewal_rate" ) | ||||||
|     { |     private String insuranceRenewalRate; // 续保率 | ||||||
|         return attachingRateTarget; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public void setAttachingRateTarget( String attachingRateTarget ) |     @JsonProperty( "attaching_rate" ) | ||||||
|     { |     private String attachingRate; // 车非渗透率 | ||||||
|         this.attachingRateTarget = attachingRateTarget; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     @Override |     @JsonProperty( "leading_reward_gainers" ) | ||||||
|     public String toString() |     private Vector<String> leadingRewardGainers; // 领跑奖 | ||||||
|     { |  | ||||||
|         return "DepartmentArchievementQueryResult [totalArchievement=" + totalArchievement |  | ||||||
|                 + ", mensualArchievementList=" + mensualArchievementList + ", insuranceRenewalRate=" |  | ||||||
|                 + insuranceRenewalRate + ", insuranceRenewalRateTarget=" |  | ||||||
|                 + insuranceRenewalRateTarget + ", attachingRate=" + attachingRate |  | ||||||
|                 + ", attachingRateTarget=" + attachingRateTarget + ", leadingRewardGainers=" |  | ||||||
|                 + leadingRewardGainers + ", advanceRewardGainers=" + advanceRewardGainers |  | ||||||
|                 + ", backwardList=" + backwardList + "]"; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     @Override |     @JsonProperty( "advance_reward_gainers" ) | ||||||
|     public int hashCode() |     private Vector<String> advanceRewardGainers; // 飞跃奖 | ||||||
|     { |  | ||||||
|         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; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     @Override |     @JsonProperty( "backward_list" ) | ||||||
|     public boolean equals( Object obj ) |     private Vector<String> backwardList; // 消七灭六坐席 | ||||||
|     { |  | ||||||
|         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; |  | ||||||
|     } |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,35 +0,0 @@ | |||||||
| 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,6 +10,7 @@ | |||||||
| 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; | ||||||
| @@ -22,16 +23,13 @@ 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.utils.data.ImportTWRTelsalerData; | import com.cpic.xim.web.controllers.dataimport.bi.ImportBIDataRequest.ReportType; | ||||||
| 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" ) | ||||||
| @@ -45,35 +43,29 @@ public class ImportBIDataController | |||||||
|     { |     { | ||||||
|         ImportBIDataResponse response = new ImportBIDataResponse(); |         ImportBIDataResponse response = new ImportBIDataResponse(); | ||||||
|         String filePath = request.getFilePath(); |         String filePath = request.getFilePath(); | ||||||
|         int type = request.getReportType(); |         ReportType 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.BiTelsalerAttachingRateReport.getReportTypeCode() ) |             if ( type == ReportType.TelsalerAttachingRateReport ) | ||||||
|             { |             { | ||||||
|                 importedCount = importBITelsalerAttachingRate( filePath, sheetIndex, firstRow ); |                 importedCount = importBITelsalerAttachingRate( filePath, sheetIndex, firstRow ); | ||||||
|             } |             } | ||||||
|             else if ( type == ReportType.BiTelsalerRenewalRateReport.getReportTypeCode() ) |             else if ( type == ReportType.TelsalerRenewalRateReport ) | ||||||
|             { |             { | ||||||
|                 importedCount = importBITeslsalerRenewalRate( filePath, sheetIndex, firstRow ); |                 importedCount = importBITeslsalerRenewalRate( filePath, sheetIndex, firstRow ); | ||||||
|             } |             } | ||||||
|             else if ( type == ReportType.BiDepartmentAttachingRateReport.getReportTypeCode() ) |             else if ( type == ReportType.DepartmentAttachingRateReport ) | ||||||
|             { |             { | ||||||
|                 importedCount = importBIDepartmentAttachingRate( filePath, sheetIndex, firstRow ); |                 importedCount = importBIDepartmentAttachingRate( filePath, sheetIndex, firstRow ); | ||||||
|             } |             } | ||||||
|             else if ( type == ReportType.BiDepartmentRenewalRateReport.getReportTypeCode() ) |             else if ( type == ReportType.DepartmentRenewalRateReport ) | ||||||
|             { |             { | ||||||
|                 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 ); | ||||||
| @@ -262,43 +254,4 @@ 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; |  | ||||||
|     } |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -3,65 +3,78 @@ | |||||||
|  * @Date: 2023-10-13 14:39:06 |  * @Date: 2023-10-13 14:39:06 | ||||||
|  * @LastEditors: Kane |  * @LastEditors: Kane | ||||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/dataimport/bi/ImportBIDataRequest.java |  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/dataimport/bi/ImportBIDataRequest.java | ||||||
|  * @Description: |  * @Description:  | ||||||
|  * |  *  | ||||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved. |  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||||
|  */ |  */ | ||||||
| package com.cpic.xim.web.controllers.dataimport.bi; | package com.cpic.xim.web.controllers.dataimport.bi; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; |  | ||||||
| import org.springframework.stereotype.Controller; | import org.springframework.stereotype.Controller; | ||||||
|  | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| @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 int reportType; |     private ReportType 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 int getReportType() { |     public ReportType getReportType() | ||||||
|  |     { | ||||||
|         return reportType; |         return reportType; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public void setReportType(int reportType) { |     public void setReportType( ReportType reportType ) | ||||||
|  |     { | ||||||
|         this.reportType = reportType; |         this.reportType = reportType; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -71,7 +84,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; |         result = prime * result + ((reportType == null) ? 0 : reportType.hashCode()); | ||||||
|         result = prime * result + firstRow; |         result = prime * result + firstRow; | ||||||
|         result = prime * result + sheetIndex; |         result = prime * result + sheetIndex; | ||||||
|         return result; |         return result; | ||||||
| @@ -104,17 +117,11 @@ public class ImportBIDataRequest { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public String toString() { |     public String toString() | ||||||
|         return ( |     { | ||||||
|             "ImportBIDataRequest [filePath=" + |         return "ImportBIDataRequest [filePath=" + filePath + ", reportType=" + reportType | ||||||
|             filePath + |                 + ", firstRow=" + firstRow + ", sheetIndex=" + sheetIndex + "]"; | ||||||
|             ", reportType=" + |  | ||||||
|             reportType + |  | ||||||
|             ", firstRow=" + |  | ||||||
|             firstRow + |  | ||||||
|             ", sheetIndex=" + |  | ||||||
|             sheetIndex + |  | ||||||
|             "]" |  | ||||||
|         ); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,15 +1,11 @@ | |||||||
| /* | /* | ||||||
|  * @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. |  | ||||||
|  */ |  */ | ||||||
| package com.cpic.xim.web.filters.cros; | package com.cpic.xim.web.filters.cros; | ||||||
|  |  | ||||||
| @@ -27,31 +23,30 @@ 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, |             throws ServletException, IOException | ||||||
|                                                                                         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 = "*"; | ||||||
|         } |         } | ||||||
|  |          | ||||||
|         response.setHeader( "Access-Control-Allow-Origin", originHeader ); |         response.setHeader( "Access-Control-Allow-Origin", originHeader ); | ||||||
|         response.setHeader( "Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE, PUT" ); |         response.setHeader( "Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE, PUT" ); | ||||||
|         response.setHeader( "Access-Control-Max-Age", "0" ); |         response.setHeader( "Access-Control-Max-Age", "0" ); | ||||||
|         response.setHeader( "Access-Control-Allow-Headers", |         response.setHeader( "Access-Control-Allow-Headers", | ||||||
|                             "Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token" ); |                 "Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token" ); | ||||||
|         response.setHeader( "Access-Control-Allow-Credentials", "true" ); |         response.setHeader( "Access-Control-Allow-Credentials", "true" ); | ||||||
|         response.setHeader( "XDomainRequestAllowed", "1" ); |         response.setHeader( "XDomainRequestAllowed", "1" ); | ||||||
|         response.setHeader( "XDomainRequestAllowed", "1" ); |         response.setHeader( "XDomainRequestAllowed", "1" ); | ||||||
|   | |||||||
| @@ -5,9 +5,7 @@ | |||||||
|         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,11 +11,12 @@ | |||||||
|     </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电销坐席续保率跟踪表-24年" ("责任部门","责任人","机构目标值1(%)","到期数-全月", |         insert into BI电销坐席续保率跟踪表 ("责任部门","责任人","机构目标值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"> | ||||||
| @@ -29,23 +30,24 @@ | |||||||
|     </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机构续保率跟踪表-24年"( "责任部门","机构目标值1(%)","到期数-全月" ,"序时到期数占比(%)","个车续保率(序时)(%)", |         insert into BI机构当月个车续保率跟踪表( "责任部门","机构目标值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,8 +43,10 @@ | |||||||
|             t."个车续保率(序时)(%)" as 个车续保率序时, |             t."个车续保率(序时)(%)" as 个车续保率序时, | ||||||
|             t."个车续保率(全月)(%)" as 个车续保率全月, |             t."个车续保率(全月)(%)" as 个车续保率全月, | ||||||
|             t."环比昨日(%)" as 环比昨日, |             t."环比昨日(%)" as 环比昨日, | ||||||
|             t."环比上月(%)" as 环比上月 |             t."环比上月(%)" as 环比上月, | ||||||
|         from "BI电销坐席续保率跟踪表-24年" t |             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" /> | ||||||
| @@ -56,8 +58,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> | ||||||
|  |  | ||||||
|     <!-- 机构渗透率 --> |     <!-- 机构渗透率 --> | ||||||
| @@ -102,8 +104,10 @@ | |||||||
|                 t."个车续保率(序时)(%)" as 个车续保率序时, |                 t."个车续保率(序时)(%)" as 个车续保率序时, | ||||||
|                 t."个车续保率(全月)(%)" as 个车续保率全月, |                 t."个车续保率(全月)(%)" as 个车续保率全月, | ||||||
|                 t."环比昨日(%)" as 环比昨日, |                 t."环比昨日(%)" as 环比昨日, | ||||||
|                 t."环比上月(%)" as 环比上月 |                 t."环比上月(%)" as 环比上月, | ||||||
|            from "BI机构续保率跟踪表-24年" t |                 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" /> | ||||||
| @@ -114,7 +118,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,86 +79,6 @@ | |||||||
|     </resultMap> |     </resultMap> | ||||||
|  |  | ||||||
|     <!-- insertTWrTelsalerRecordToDB -->  |     <!-- insertTWrTelsalerRecordToDB -->  | ||||||
|     <insert id="insertTWrTelsalerRecordToDB" parameterType="TWrTelsalerRecord"> |     <insert id="insertTWrTelsalerRecordToDB"> | ||||||
|         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> | ||||||
| @@ -32,8 +32,7 @@ | |||||||
|         <mapper resource="mybatis/mapper/RankingListMapper.xml" /> |         <mapper resource="mybatis/mapper/RankingListMapper.xml" /> | ||||||
|         <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,12 +1,8 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> | <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" | ||||||
| <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_4_0.xsd"> |   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" | ||||||
|    |   version="3.1"> | ||||||
|  |  | ||||||
|   <display-name>Archetype Created Web Application</display-name> |   <display-name>Archetype Created Web Application</display-name> | ||||||
|  |  | ||||||
|   <servlet> |   <servlet> | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ 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; | ||||||
| @@ -75,7 +74,7 @@ public class BatchInsertTest | |||||||
|     @Test |     @Test | ||||||
|     public void testBatchInsertBITeslsalerRenewalRate() |     public void testBatchInsertBITeslsalerRenewalRate() | ||||||
|     { |     { | ||||||
|         String filePath = "D:\\develop\\cpicxim\\deskop_task_schedule\\数据\\测试用\\24年报表\\坐席-续保.xlsx"; |         String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/坐席-续保.xlsx"; | ||||||
|         ArrayList<BITelsalerRenewalRateRecord> records = null; |         ArrayList<BITelsalerRenewalRateRecord> records = null; | ||||||
|         SqlSession session = null; |         SqlSession session = null; | ||||||
|         ImportBIArchievementDataMapper mapper = null; |         ImportBIArchievementDataMapper mapper = null; | ||||||
| @@ -115,7 +114,7 @@ public class BatchInsertTest | |||||||
|     @Test |     @Test | ||||||
|     public void testBatchInsertBIDepartmentAttachingRateToDB() |     public void testBatchInsertBIDepartmentAttachingRateToDB() | ||||||
|     { |     { | ||||||
|         String filePath = "D:\\develop\\cpicxim\\deskop_task_schedule\\数据\\测试用\\24年报表\\机构-续保.xlsx"; |         String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/机构渗透.xlsx"; | ||||||
|  |  | ||||||
|         ArrayList<BIDepartmentAttachingRateRecord> records = null; |         ArrayList<BIDepartmentAttachingRateRecord> records = null; | ||||||
|         SqlSession session = null; |         SqlSession session = null; | ||||||
| @@ -149,42 +148,4 @@ 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.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user