Compare commits
	
		
			165 Commits
		
	
	
		
			feature-ra
			...
			feature-te
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c6ea898505 | |||
| 711697e6a1 | |||
| 89866c8513 | |||
| f90114e204 | |||
| 0458da2fae | |||
| 46d0ff64ef | |||
| 57b5edd9c0 | |||
| 73cfe24460 | |||
| 9e0d07a9f7 | |||
| ab957962fc | |||
| da9da6e906 | |||
| 7ba9d249ee | |||
| afccb2a88c | |||
| 962c22400e | |||
| c7bf9f6c0d | |||
| daa1d2aaaf | |||
| 6a93fc2738 | |||
| e3858d23d9 | |||
| 0cf8e16129 | |||
| fe6707ca3f | |||
| c6705d326d | |||
| 3e071cedd7 | |||
| c7ae33222d | |||
| a9c6e0476b | |||
| 2e02b9182d | |||
| f391880c9c | |||
| 372824ec50 | |||
| e4b68276dd | |||
| 8489f43b55 | |||
| 42dd59e141 | |||
| d20a3222c0 | |||
| 68a314703f | |||
| f33486197e | |||
| 6e8a42086b | |||
| 591a5865f3 | |||
| d33572abb8 | |||
| 041ea37122 | |||
| 0f25aa4a72 | |||
| 33cb13fe29 | |||
| eb0bd517d5 | |||
| d1aebdc7f5 | |||
| c3479d7d8e | |||
| 0c89df8c34 | |||
| a5d392c2f6 | |||
| 84b2e906f3 | |||
| 3b4c340b70 | |||
| 3001165bd5 | |||
| 39a75c7bf2 | |||
| 237cc350be | |||
| d202d976a3 | |||
| 492239f269 | |||
| c0406e7000 | |||
| 44357ad3ce | |||
| e07039b517 | |||
| 484b8a78e9 | |||
| 4e74bff380 | |||
| 7311ab5e2a | |||
| 0650227861 | |||
| 75a9c46c2e | |||
| 02ac5274e0 | |||
| 6f303eec03 | |||
| d517c2e82a | |||
| 80ba8da7e0 | |||
| 1422c0b781 | |||
| a33981ac55 | |||
| 506f18abfe | |||
| e4d641021e | |||
| 6ddfe56e6d | |||
| a3c56df910 | |||
| 8b31ffb6d6 | |||
| b794e99694 | |||
| 321ff39e1c | |||
| 05aabea1a2 | |||
| 0caf428d67 | |||
| 0ad42d00a9 | |||
| 16df86e3a7 | |||
| 636ae55b43 | |||
| cb1c08fff4 | |||
| 3c807a6efa | |||
| 7964f8fbe0 | |||
| a1de9387c8 | |||
| 0021873ef7 | |||
| be1a5ffb00 | |||
| 6d06ad934d | |||
| e805bf914b | |||
| e40b81672a | |||
| 041ec287b9 | |||
| e5dfb45c79 | |||
| 19d658858e | |||
| 5fa7639314 | |||
| 8a64561471 | |||
| fdb345176e | |||
| c6e08981f7 | |||
| a9c05eef2c | |||
| 0c2c762721 | |||
| b8df96ac42 | |||
| 580e917347 | |||
| 64824e6f74 | |||
| 099a1e65f6 | |||
| a9b30dd293 | |||
| f61f623f73 | |||
| b03056d783 | |||
| bcef8b4994 | |||
| b91c7d281e | |||
| 1d554056ac | |||
| 0d0b61db3c | |||
| 8fd5ee4904 | |||
| fa4f211ac2 | |||
| 992606d77a | |||
| 712aabfb99 | |||
| 9878abb946 | |||
| 7d0112b483 | |||
| 58f60b9eaf | |||
| 4cd800e62b | |||
| 4deed356f5 | |||
| 31d5e1622c | |||
| be5e426cee | |||
| 7ea11e34a9 | |||
| 2edd5f67db | |||
| efebd548c6 | |||
| 22157b11eb | |||
| bc7e56c336 | |||
| f54f6bbfea | |||
| 21a50f4c61 | |||
| 075da72a73 | |||
| ae68f047f4 | |||
| 7c5da24f5a | |||
| 4d03abde27 | |||
| 08ea359cd1 | |||
| 8e0505bd49 | |||
| a74e612546 | |||
| 42c2e8bdf7 | |||
| 83be988941 | |||
| 2a92179adf | |||
| 9976c852ba | |||
| fd59698264 | |||
| f5a53e2f55 | |||
| 5b6285993f | |||
| b2a973f7bd | |||
| dcc925bb41 | |||
| 8fd60d6b24 | |||
| 090a551066 | |||
| 9483b49a20 | |||
| e436fbf89e | |||
| 0875919b5f | |||
| a5b008f056 | |||
| ada65278a1 | |||
| 38ec1c7d6c | |||
| 7ab604f3dd | |||
| 374a87e1ee | |||
| 7304ccf2e8 | |||
| ff487c3fb6 | |||
| a9b6e88733 | |||
| 9111067e63 | |||
| 702ab2c4d1 | |||
| c08b85cbe4 | |||
| 068c56e1c9 | |||
| 73d03bfe9b | |||
| 6d4ca8cf96 | |||
| 5344f2e0ea | |||
| 78ae920795 | |||
| d39e731a1e | |||
| 16574b6a47 | |||
| c4b1c754a9 | |||
| dbc5066aed | 
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -729,3 +729,6 @@ target/* | ||||
| # oracle | ||||
| *.~pck | ||||
| *.~sql | ||||
|  | ||||
| # 输出目录 | ||||
| 输出/* | ||||
							
								
								
									
										18
									
								
								code/db/BI相关常用语句.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								code/db/BI相关常用语句.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| SELECT * | ||||
|   FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD>; | ||||
|  | ||||
| SELECT * | ||||
|   FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD>; | ||||
|  | ||||
| SELECT * | ||||
|   FROM BI<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD>; | ||||
|  | ||||
| /* | ||||
| truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<CDB8>Ʊ<EFBFBD>; | ||||
|  | ||||
| BEGIN | ||||
|     telsale_bi_utils.<2E><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<CDB8>Ʊ<EFBFBD>; | ||||
|     telsale_bi_utils.<2E><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD>; | ||||
|     telsale_bi_utils.<2E><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>ͳ<EFBFBD>Ʊ<EFBFBD>; | ||||
| END; | ||||
| */ | ||||
							
								
								
									
										28
									
								
								code/db/pkg/TELSALER_TWR_UTILS.pck
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								code/db/pkg/TELSALER_TWR_UTILS.pck
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| CREATE OR REPLACE PACKAGE TELSALER_TWR_UTILS IS | ||||
|  | ||||
|     -- Author  : KANE | ||||
|     -- Created : 2023/12/19 16:27:20 | ||||
|     -- Purpose : twr<77><72><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĹ<D8B5><C4B9>ߺ<EFBFBD><DFBA><EFBFBD> | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>TWR<57><52>ϯ<EFBFBD>嵥; | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>TWR<57>Ŷ<EFBFBD><C5B6>嵥; | ||||
|  | ||||
| END TELSALER_TWR_UTILS; | ||||
| / | ||||
| CREATE OR REPLACE PACKAGE BODY TELSALER_TWR_UTILS IS | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>TWR<57><52>ϯ<EFBFBD>嵥 IS | ||||
|     BEGIN | ||||
|         EXECUTE IMMEDIATE 'truncate table twr_telsaler_dev'; | ||||
|     END; | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>TWR<57>Ŷ<EFBFBD><C5B6>嵥 IS | ||||
|     BEGIN | ||||
|         EXECUTE IMMEDIATE 'truncate table twr_telsaler_team_dev'; | ||||
|     END; | ||||
|  | ||||
| BEGIN | ||||
|     NULL; | ||||
| END TELSALER_TWR_UTILS; | ||||
| / | ||||
							
								
								
									
										23
									
								
								code/db/pkg/Telsaler_twr_pkg.pck
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								code/db/pkg/Telsaler_twr_pkg.pck
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| create or replace package Telsaler_twr_pkg is | ||||
|  | ||||
|   -- Author  : KANE | ||||
|   -- Created : 2023/11/26 18:19:22 | ||||
|   -- Purpose : TWRϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>pkg | ||||
|    | ||||
|   procedure <20><><EFBFBD><EFBFBD>TWR<57><52><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯԱ<CFAF><D4B1><EFBFBD><EFBFBD>; | ||||
|  | ||||
| end Telsaler_twr_pkg; | ||||
| / | ||||
| create or replace package body Telsaler_twr_pkg is | ||||
|  | ||||
|   procedure <20><><EFBFBD><EFBFBD>TWR<57><52><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯԱ<CFAF><D4B1><EFBFBD><EFBFBD> | ||||
|   is | ||||
|   begin | ||||
|     execute immediate 'truncate table twr_telsaler'; | ||||
|   end; | ||||
|  | ||||
| begin | ||||
|   -- Initialization | ||||
|   null; | ||||
| end Telsaler_twr_pkg; | ||||
| / | ||||
							
								
								
									
										309
									
								
								code/db/pkg/telsale_archievement_dev_pkg.pck
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										309
									
								
								code/db/pkg/telsale_archievement_dev_pkg.pck
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,309 @@ | ||||
| CREATE OR REPLACE PACKAGE TELSALE_ARCHIEVEMENT_DEV_PKG IS | ||||
|  | ||||
|     -- Author  : WANGWEI-202 | ||||
|     -- Created : 2023/3/10 15:13:34 | ||||
|     -- Purpose : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɰ<EFBFBD> | ||||
|  | ||||
|     TYPE CUR_TYPE IS REF CURSOR; | ||||
|  | ||||
|     -- <20>쳣 | ||||
|     DEPARTMENTCODE_EXCEPTION_CODE CONSTANT INTEGER := -20000; | ||||
|     DEPARTMENTCODE_EXCEPTION_MSG  CONSTANT VARCHAR2(100) := '<27><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>'; | ||||
|  | ||||
|     CALLERCODE_EXCEPTION_CODE CONSTANT INTEGER := -20001; | ||||
|     CALLERCODE_EXCEPTION_MSG  CONSTANT VARCHAR2(100) := '<27><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>'; | ||||
|  | ||||
|     PROCEDURE DEPARTMENT_ARCHIEVEMENT | ||||
|     ( | ||||
|         A_DEPARTMENT_CODE       IN VARCHAR2, | ||||
|         A_ATTACHING_RATE        OUT VARCHAR2, | ||||
|         A_ATTACHING_RATE_TARGET OUT VARCHAR2, | ||||
|         A_RENEWAL_RATE          OUT VARCHAR2, | ||||
|         A_RENEWAL_RATE_TARGET   OUT VARCHAR2, | ||||
|         A_TOTAL                 OUT INTEGER, | ||||
|         A_MENSUAL_CUR           OUT CUR_TYPE | ||||
|     ); | ||||
|  | ||||
|     PROCEDURE CALLER_ARCHIEVEMENT | ||||
|     ( | ||||
|         A_CALLER_CODE    IN VARCHAR2, | ||||
|         A_ATTACHING_RATE OUT VARCHAR2, | ||||
|         A_RENEWAL_RATE   OUT VARCHAR2, | ||||
|         A_TOTAL          OUT INTEGER, | ||||
|         A_PRESENT_MONTH  OUT NUMBER, | ||||
|         A_MENSUAL_CUR    OUT CUR_TYPE | ||||
|     ); | ||||
|  | ||||
|     PROCEDURE CALLER_ARCH_RANKING_LIST | ||||
|     ( | ||||
|         A_DEPARTMENT_CODE        IN VARCHAR2, | ||||
|         A_YEAR                   IN VARCHAR2, | ||||
|         A_MONTH                  IN VARCHAR2, | ||||
|         A_ATTACHING_RANKING_LIST OUT CUR_TYPE, | ||||
|         A_RENEWAL_RANKING_LIST   OUT CUR_TYPE | ||||
|     ); | ||||
|  | ||||
| END TELSALE_ARCHIEVEMENT_DEV_PKG; | ||||
| / | ||||
| CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_DEV_PKG IS | ||||
|  | ||||
|     -- <20><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5> | ||||
|     PROCEDURE DEPARTMENT_ARCHIEVEMENT | ||||
|     ( | ||||
|         A_DEPARTMENT_CODE       IN VARCHAR2, | ||||
|         A_ATTACHING_RATE        OUT VARCHAR2, | ||||
|         A_ATTACHING_RATE_TARGET OUT VARCHAR2, | ||||
|         A_RENEWAL_RATE          OUT VARCHAR2, | ||||
|         A_RENEWAL_RATE_TARGET   OUT VARCHAR2, | ||||
|         A_TOTAL                 OUT INTEGER, | ||||
|         A_MENSUAL_CUR           OUT CUR_TYPE | ||||
|     ) IS | ||||
|         L_FIRSTDAY            DATE; | ||||
|         L_DEPARTMENT_NAME     VARCHAR2(100); | ||||
|         L_RENEWAL_RATE_TARGET NUMBER; | ||||
|     BEGIN | ||||
|         L_FIRSTDAY := TO_DATE(TO_CHAR(SYSDATE, | ||||
|                                       'yyyy') || '-01-01 00:00:00', | ||||
|                               'yyyy-mm-dd hh24:mi:ss'); | ||||
|         -- <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|         BEGIN | ||||
|             SELECT DEPARTMENT_NAME | ||||
|               INTO L_DEPARTMENT_NAME | ||||
|               FROM IDST0.BM_T BM | ||||
|              WHERE BM.DEPARTMENT_CODE = A_DEPARTMENT_CODE; | ||||
|         EXCEPTION | ||||
|             -- <20><><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׳<EFBFBD><D7B3>쳣 | ||||
|             WHEN NO_DATA_FOUND THEN | ||||
|                 RAISE_APPLICATION_ERROR(DEPARTMENTCODE_EXCEPTION_CODE, | ||||
|                                         DEPARTMENTCODE_EXCEPTION_MSG); | ||||
|         END; | ||||
|      | ||||
|         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>&Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|         BEGIN | ||||
|             SELECT ROUND(DEPT.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>, | ||||
|                          2), | ||||
|                    ROUND(DEPT.Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                          2) | ||||
|               INTO A_ATTACHING_RATE, | ||||
|                    A_ATTACHING_RATE_TARGET | ||||
|               FROM DESKTOP_ARCHIEVEMENT_ADMIN.BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> DEPT | ||||
|              WHERE DEPT.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME; | ||||
|          | ||||
|             --<2D><><EFBFBD><EFBFBD>round<6E><64><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ȱ0<C8B1><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|             SELECT DECODE(SUBSTR(A_ATTACHING_RATE_TARGET, | ||||
|                                  1, | ||||
|                                  1), | ||||
|                           '.', | ||||
|                           '0' || A_ATTACHING_RATE_TARGET, | ||||
|                           A_ATTACHING_RATE_TARGET) | ||||
|               INTO A_ATTACHING_RATE_TARGET | ||||
|               FROM DUAL; | ||||
|         EXCEPTION | ||||
|             WHEN NO_DATA_FOUND THEN | ||||
|                 A_ATTACHING_RATE        := '0.0'; | ||||
|                 A_ATTACHING_RATE_TARGET := '0.0'; | ||||
|         END; | ||||
|      | ||||
|         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|         BEGIN | ||||
|             SELECT ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>ʱ<EFBFBD><CAB1>(%)", | ||||
|                          2), | ||||
|                    ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD>ʱ<EFBFBD><CAB1>(%)" - t."<22><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>ֵ1(%)", | ||||
|                          2) | ||||
|               INTO A_RENEWAL_RATE, | ||||
|                    A_RENEWAL_RATE_TARGET | ||||
|               FROM "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>" T | ||||
|              WHERE T.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> = L_DEPARTMENT_NAME; | ||||
|          | ||||
|             --<2D><><EFBFBD><EFBFBD>round<6E><64><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ȱ0<C8B1><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|             SELECT DECODE(SUBSTR(A_RENEWAL_RATE_TARGET, | ||||
|                                  1, | ||||
|                                  1), | ||||
|                           '.', | ||||
|                           '0' || A_RENEWAL_RATE_TARGET, | ||||
|                           A_RENEWAL_RATE_TARGET) | ||||
|               INTO A_RENEWAL_RATE_TARGET | ||||
|               FROM DUAL; | ||||
|         EXCEPTION | ||||
|             WHEN NO_DATA_FOUND THEN | ||||
|                 A_RENEWAL_RATE        := '0.0'; | ||||
|                 A_RENEWAL_RATE_TARGET := '0.0'; | ||||
|         END; | ||||
|      | ||||
|         --<2D><>ҵ<EFBFBD><D2B5> | ||||
|         A_TOTAL := 0; | ||||
|      | ||||
|         --ÿ<><C3BF>ҵ<EFBFBD><D2B5> | ||||
|         OPEN A_MENSUAL_CUR FOR | ||||
|             SELECT CF.<2E>·<EFBFBD> MM, | ||||
|                    ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD> + CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / 10000, | ||||
|                              0), | ||||
|                          0) BF | ||||
|               FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF | ||||
|              WHERE <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD> = A_DEPARTMENT_CODE | ||||
|                AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >= TO_DATE(TO_CHAR(SYSDATE, | ||||
|                                            'yyyy') || '-01-01 00:00:00', | ||||
|                                    'yyyy-mm-dd hh24:mi:ss') | ||||
|                AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> < TO_DATE(TO_CHAR(SYSDATE, | ||||
|                                           'yyyy-mm') || '-01 00:00:00', | ||||
|                                   'yyyy-mm-dd hh24:mi:ss') | ||||
|              GROUP BY CF.<2E>·<EFBFBD> | ||||
|              ORDER BY CF.<2E>·<EFBFBD>; | ||||
|     END; | ||||
|  | ||||
|     /*******************************************************/ | ||||
|     -- <20><>ϯҵ<CFAF><D2B5> | ||||
|     PROCEDURE CALLER_ARCHIEVEMENT | ||||
|     ( | ||||
|         A_CALLER_CODE    IN VARCHAR2, | ||||
|         A_ATTACHING_RATE OUT VARCHAR2, | ||||
|         A_RENEWAL_RATE   OUT VARCHAR2, | ||||
|         A_TOTAL          OUT INTEGER, | ||||
|         A_PRESENT_MONTH  OUT NUMBER, | ||||
|         A_MENSUAL_CUR    OUT CUR_TYPE | ||||
|     ) IS | ||||
|         L_CALLER_NAME     VARCHAR2(100); | ||||
|         L_DEPARTMENT_NAME VARCHAR2(100); | ||||
|         L_THIS_YEAR       VARCHAR2(4); | ||||
|         L_ROWNUM          INTEGER; | ||||
|     BEGIN | ||||
|         --<2D><>ѯ<EFBFBD><D1AF>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD><C6A3>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD> | ||||
|         BEGIN | ||||
|             SELECT ZX.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>, | ||||
|                    BM.DEPARTMENT_NAME | ||||
|               INTO L_CALLER_NAME, | ||||
|                    L_DEPARTMENT_NAME | ||||
|               FROM TWR_TELSALER      ZX, | ||||
|                    TWR_TELSALER_TEAM T, | ||||
|                    IDST0.BM_T        BM | ||||
|              WHERE ZX.<2E><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD> = A_CALLER_CODE | ||||
|                AND ZX.<2E>Ŷ<EFBFBD><C5B6><EFBFBD><EFBFBD><EFBFBD> = T.TEAM_NAME | ||||
|                AND T.DEPARTMENT_CODE = BM.DEPARTMENT_CODE; | ||||
|         EXCEPTION | ||||
|             -- <20><><EFBFBD><EFBFBD>û<EFBFBD>в<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׳<EFBFBD><D7B3>쳣 | ||||
|             WHEN NO_DATA_FOUND THEN | ||||
|                 RAISE_APPLICATION_ERROR(CALLERCODE_EXCEPTION_CODE, | ||||
|                                         CALLERCODE_EXCEPTION_MSG); | ||||
|         END; | ||||
|      | ||||
|         L_THIS_YEAR := TO_CHAR(SYSDATE, | ||||
|                                'yyyy'); | ||||
|      | ||||
|         --<2D>ܳ<EFBFBD><DCB3>ձ<EFBFBD><D5B1><EFBFBD> | ||||
|         SELECT ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>), | ||||
|                          0), | ||||
|                      2) BF | ||||
|           INTO A_TOTAL | ||||
|           FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF | ||||
|          WHERE CF.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = L_CALLER_NAME | ||||
|            AND CF.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME | ||||
|            AND CF.<2E><><EFBFBD><EFBFBD> = L_THIS_YEAR; | ||||
|      | ||||
|         --<2D><><EFBFBD><CDB8> | ||||
|         BEGIN | ||||
|             SELECT ROWNUM, | ||||
|                    ROUND(NVL(T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>, | ||||
|                              0), | ||||
|                          2), | ||||
|                    ROUND(NVL(t."<22><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>(<28><>)" * 10000, | ||||
|                              0), | ||||
|                          2) | ||||
|               INTO L_ROWNUM, | ||||
|                    A_ATTACHING_RATE, | ||||
|                    A_PRESENT_MONTH | ||||
|               FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> T | ||||
|              WHERE T.<2E><><EFBFBD><EFBFBD> = L_CALLER_NAME | ||||
|                AND ROWNUM = 1; | ||||
|         EXCEPTION | ||||
|             WHEN NO_DATA_FOUND THEN | ||||
|                 L_ROWNUM         := 1; | ||||
|                 A_ATTACHING_RATE := 0.0; | ||||
|                 A_PRESENT_MONTH  := 0.0; | ||||
|         END; | ||||
|      | ||||
|         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|         BEGIN | ||||
|             SELECT ROWNUM, | ||||
|                    ROUND(NVL(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)", | ||||
|                              0), | ||||
|                          2) | ||||
|               INTO L_ROWNUM, | ||||
|                    A_RENEWAL_RATE | ||||
|               FROM "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>" T | ||||
|              WHERE T.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = L_CALLER_NAME | ||||
|                AND ROWNUM = 1; | ||||
|         EXCEPTION | ||||
|             WHEN NO_DATA_FOUND THEN | ||||
|                 L_ROWNUM       := 1; | ||||
|                 A_RENEWAL_RATE := 0.0; | ||||
|         END; | ||||
|      | ||||
|         --ÿ<><C3BF>ҵ<EFBFBD><D2B5> | ||||
|         OPEN A_MENSUAL_CUR FOR | ||||
|             SELECT CF.<2E>·<EFBFBD> MM, | ||||
|                    ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>), | ||||
|                              0), | ||||
|                          0) BF | ||||
|               FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF | ||||
|              WHERE CF.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = L_CALLER_NAME | ||||
|                AND CF.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME | ||||
|                AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >= TO_DATE(TO_CHAR(SYSDATE, | ||||
|                                            'yyyy') || '-01-01 00:00:00', | ||||
|                                    'yyyy-mm-dd hh24:mi:ss') | ||||
|                AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <= SYSDATE | ||||
|              GROUP BY CF.<2E>·<EFBFBD> | ||||
|              ORDER BY CF.<2E>·<EFBFBD>; | ||||
|     END; | ||||
|  | ||||
|     /*******************************************************/ | ||||
|     -- <20><>ϯ<EFBFBD><CFAF><EFBFBD>а<EFBFBD> | ||||
|     PROCEDURE CALLER_ARCH_RANKING_LIST | ||||
|     ( | ||||
|         A_DEPARTMENT_CODE        IN VARCHAR2, | ||||
|         A_YEAR                   IN VARCHAR2, | ||||
|         A_MONTH                  IN VARCHAR2, | ||||
|         A_ATTACHING_RANKING_LIST OUT CUR_TYPE, | ||||
|         A_RENEWAL_RANKING_LIST   OUT CUR_TYPE | ||||
|     ) IS | ||||
|         L_DEPARTMENT_NAME VARCHAR2(100); | ||||
|     BEGIN | ||||
|         -- <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|         BEGIN | ||||
|             SELECT DEPARTMENT_NAME | ||||
|               INTO L_DEPARTMENT_NAME | ||||
|               FROM IDST0.BM_T BM | ||||
|              WHERE BM.DEPARTMENT_CODE = A_DEPARTMENT_CODE; | ||||
|         EXCEPTION | ||||
|             -- <20><><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׳<EFBFBD><D7B3>쳣 | ||||
|             WHEN NO_DATA_FOUND THEN | ||||
|                 RAISE_APPLICATION_ERROR(DEPARTMENTCODE_EXCEPTION_CODE, | ||||
|                                         DEPARTMENTCODE_EXCEPTION_MSG); | ||||
|         END; | ||||
|         -- <20><><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD><DABA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD> | ||||
|         OPEN A_ATTACHING_RANKING_LIST FOR | ||||
|             SELECT ROWNUM, | ||||
|                    PAIHANG.<2E><><EFBFBD><EFBFBD> AS CALLER_NAME, | ||||
|                    PAIHANG.XBL  AS ATTACHING_RATE | ||||
|               FROM (SELECT T.<2E><><EFBFBD><EFBFBD>, | ||||
|                            ROUND(T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>, | ||||
|                                  2) XBL | ||||
|                       FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> T | ||||
|                      WHERE T.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME | ||||
|                      ORDER BY T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8> DESC) PAIHANG; | ||||
|      | ||||
|         -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD> | ||||
|         OPEN A_RENEWAL_RANKING_LIST FOR | ||||
|             SELECT ROWNUM, | ||||
|                    PAIHANG.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> AS CALLER_NAME, | ||||
|                    PAIHANG.XBL    AS RENEWAL_RATE | ||||
|               FROM (SELECT T.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                            ROUND(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)", | ||||
|                                  2) XBL | ||||
|                       FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> T | ||||
|                      WHERE T.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> = L_DEPARTMENT_NAME | ||||
|                      ORDER BY XBL DESC) PAIHANG; | ||||
|     END; | ||||
| BEGIN | ||||
|     NULL; | ||||
| END TELSALE_ARCHIEVEMENT_DEV_PKG; | ||||
| / | ||||
| @@ -1,175 +1,309 @@ | ||||
| CREATE OR REPLACE PACKAGE telsale_archievement_pkg IS | ||||
| CREATE OR REPLACE PACKAGE TELSALE_ARCHIEVEMENT_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; | ||||
|     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>Ч'; | ||||
|     DEPARTMENTCODE_EXCEPTION_MSG  CONSTANT VARCHAR2(100) := '<27><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>'; | ||||
|  | ||||
|     PROCEDURE department_archievement | ||||
|     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_renewal_rate    OUT VARCHAR2, | ||||
|         a_total           OUT INTEGER, | ||||
|         a_mensual_cur     OUT cur_type | ||||
|         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_arch_ranking_list | ||||
|     PROCEDURE CALLER_ARCHIEVEMENT | ||||
|     ( | ||||
|         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 | ||||
|         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 | ||||
|     ); | ||||
|  | ||||
| END telsale_archievement_pkg; | ||||
|     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_PKG; | ||||
| / | ||||
| CREATE OR REPLACE PACKAGE BODY telsale_archievement_pkg IS | ||||
| CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS | ||||
|  | ||||
|     -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|     PROCEDURE department_archievement | ||||
|     -- <20><><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD> | ||||
|     PROCEDURE DEPARTMENT_ARCHIEVEMENT | ||||
|     ( | ||||
|         a_department_code IN VARCHAR2, | ||||
|         a_attaching_rate  OUT VARCHAR2, | ||||
|         a_renewal_rate    OUT VARCHAR2, | ||||
|         a_total           OUT INTEGER, | ||||
|         a_mensual_cur     OUT cur_type | ||||
|         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_this_month      VARCHAR2(4); | ||||
|         l_this_year       VARCHAR2(4); | ||||
|         l_firstday        DATE; | ||||
|         l_department_name VARCHAR2(100); | ||||
|         L_FIRSTDAY            DATE; | ||||
|         L_DEPARTMENT_NAME     VARCHAR2(100); | ||||
|         L_RENEWAL_RATE_TARGET NUMBER; | ||||
|     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-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; | ||||
|             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, | ||||
|                 RAISE_APPLICATION_ERROR(DEPARTMENTCODE_EXCEPTION_CODE, | ||||
|                                         DEPARTMENTCODE_EXCEPTION_MSG); | ||||
|              | ||||
|         END; | ||||
|      | ||||
|         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8> | ||||
|         SELECT decode(SUM(cf.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>), | ||||
|                       0, | ||||
|                       0, | ||||
|                       round((SUM(cf.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / SUM(cf.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>) * 100), | ||||
|                             2)) | ||||
|           INTO a_attaching_rate | ||||
|           FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> cf | ||||
|          WHERE cf.<2E>·<EFBFBD> = l_this_month | ||||
|            AND cf.<2E><><EFBFBD><EFBFBD> = l_this_year | ||||
|            AND <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD> = a_department_code; | ||||
|         --<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 BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> DEPT | ||||
|              WHERE DEPT.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME; | ||||
|          | ||||
|         --<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|         SELECT decode(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>), | ||||
|                       0, | ||||
|                       0, | ||||
|                       round(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100, | ||||
|                             2)) | ||||
|           INTO a_renewal_rate | ||||
|           FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3> | ||||
|          WHERE <20><><EFBFBD><EFBFBD> = l_department_name; | ||||
|             --<2D><><EFBFBD><EFBFBD>round<6E><64><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ȱ0<EFBFBD><EFBFBD><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> | ||||
|         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; | ||||
|         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, | ||||
|         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, | ||||
|                          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, | ||||
|                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>; | ||||
|              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 | ||||
|     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 | ||||
|         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); | ||||
|         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; | ||||
|             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, | ||||
|                 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 <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                    round(nvl(SUM(<28><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / SUM(<28><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>), | ||||
|                              0) * 100, | ||||
|                          2) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|               FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD> | ||||
|              WHERE <20>·<EFBFBD> = a_month | ||||
|                AND <20><><EFBFBD><EFBFBD> = a_year | ||||
|                AND <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD> = a_department_code | ||||
|              GROUP BY <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> | ||||
|             --HAVING <20>·<EFBFBD> = '06<30><36>' | ||||
|              ORDER BY <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8> DESC; | ||||
|         OPEN A_ATTACHING_RANKING_LIST FOR | ||||
|             SELECT ROWNUM, | ||||
|                    PAIHANG.<2E><><EFBFBD><EFBFBD> AS CALLER_NAME, | ||||
|                    PAIHANG.XBL  AS ATTACHING_RATE | ||||
|               FROM (SELECT T.<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                            ROUND(T.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                                  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 <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                    round(nvl((SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)) * 100, | ||||
|                              0), | ||||
|                          2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|               FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD> xb | ||||
|              WHERE xb.<2E><><EFBFBD><EFBFBD> = l_department_name | ||||
|              GROUP BY <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> | ||||
|              ORDER BY <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC; | ||||
|         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.<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                            ROUND(t."<EFBFBD><EFBFBD><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>-24<32><34>" T | ||||
|                      WHERE T.<EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME | ||||
|                      ORDER BY XBL DESC) PAIHANG; | ||||
|     END; | ||||
|  | ||||
| BEGIN | ||||
|     NULL; | ||||
| END telsale_archievement_pkg; | ||||
| END TELSALE_ARCHIEVEMENT_PKG; | ||||
| / | ||||
|   | ||||
							
								
								
									
										45
									
								
								code/db/pkg/telsale_bi_utils.pck
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								code/db/pkg/telsale_bi_utils.pck
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| CREATE OR REPLACE PACKAGE TELSALE_BI_UTILS 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; | ||||
| / | ||||
| 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 | ||||
|     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; | ||||
| / | ||||
							
								
								
									
										45
									
								
								code/db/pkg/telsale_bi_utils_dev.pck
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								code/db/pkg/telsale_bi_utils_dev.pck
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| CREATE OR REPLACE PACKAGE TELSALE_BI_UTILS_DEV IS | ||||
|  | ||||
|     -- Author  : WANGWEI-202 | ||||
|     -- Created : 2023/10/12 15:31:13 | ||||
|     -- Purpose : bi<62><69><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĹ<D8B5><C4B9><EFBFBD> | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>; | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>; | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>; | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>; | ||||
|  | ||||
| END TELSALE_BI_UTILS_DEV; | ||||
| / | ||||
| CREATE OR REPLACE PACKAGE BODY TELSALE_BI_UTILS_DEV IS | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS | ||||
|     BEGIN | ||||
|         EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>'; | ||||
|     END; | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS | ||||
|     BEGIN | ||||
|         --EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>'; | ||||
|         EXECUTE IMMEDIATE 'truncate table "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>"'; | ||||
|     END; | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS | ||||
|     BEGIN | ||||
|         EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>'; | ||||
|     END; | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD>BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> IS | ||||
|     BEGIN | ||||
|         --EXECUTE IMMEDIATE 'truncate table BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><C2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>'; | ||||
|         EXECUTE IMMEDIATE 'truncate table "BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD>-24<32><34>"'; | ||||
|     END; | ||||
|  | ||||
| BEGIN | ||||
|     -- Initialization | ||||
|     NULL; | ||||
| END TELSALE_BI_UTILS_DEV; | ||||
| / | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										918
									
								
								code/db/pkg/telsale_pkg_07-26.pck
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										918
									
								
								code/db/pkg/telsale_pkg_07-26.pck
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,918 @@ | ||||
| CREATE OR REPLACE PACKAGE telsale_pkg IS | ||||
|  | ||||
|     -- Author  : WANGWEI-202 | ||||
|     -- Created : 2023/3/10 15:13:34 | ||||
|     -- Purpose : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɰ<EFBFBD> | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD>ǻ<EFBFBD><C7BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|     ( | ||||
|         a_start_date IN DATE, | ||||
|         a_end_date   IN DATE | ||||
|     ); | ||||
|  | ||||
|     PROCEDURE gen_<6E><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD> | ||||
|     ( | ||||
|         a_start_date IN DATE, | ||||
|         a_end_date   IN DATE | ||||
|     ); | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; | ||||
|  | ||||
|     PROCEDURE chefei_daily_job; | ||||
|     PROCEDURE xubao_daily_job; | ||||
|  | ||||
| END telsale_pkg; | ||||
| / | ||||
| CREATE OR REPLACE PACKAGE BODY telsale_pkg IS | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD>ǻ<EFBFBD><C7BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|     ( | ||||
|         a_start_date IN DATE, | ||||
|         a_end_date   IN DATE | ||||
|     ) IS | ||||
|         --l_count INTEGER; --<2D><><EFBFBD>м<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|     BEGIN | ||||
|         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD> | ||||
|         gen_<6E><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>(a_start_date, | ||||
|                    a_end_date); | ||||
|      | ||||
|         FOR caller_record IN (SELECT * | ||||
|                                 FROM desktop_archievement_admin.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>_t) | ||||
|         LOOP | ||||
|             BEGIN | ||||
|                 DELETE desktop_archievement_admin.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> cf | ||||
|                  WHERE cf.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = caller_record.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|                    AND cf.<2E><><EFBFBD><EFBFBD> = caller_record.<2E><><EFBFBD><EFBFBD> | ||||
|                    AND cf.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>n = caller_record.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>n | ||||
|                    AND cf.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = caller_record.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>; | ||||
|             EXCEPTION | ||||
|                 WHEN no_data_found THEN | ||||
|                     dbms_output.put_line(caller_record.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> || '<27><><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>'); | ||||
|             END; | ||||
|          | ||||
|             INSERT INTO desktop_archievement_admin.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> | ||||
|             VALUES caller_record; | ||||
|          | ||||
|         END LOOP; | ||||
|      | ||||
|         COMMIT; | ||||
|         /*EXCEPTION | ||||
|         WHEN OTHERS THEN | ||||
|             NULL;*/ | ||||
|     END; | ||||
|  | ||||
|     /**********************************************************************/ | ||||
|  | ||||
|     PROCEDURE gen_<6E><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD> | ||||
|     ( | ||||
|         a_start_date IN DATE, | ||||
|         a_end_date   IN DATE | ||||
|     ) IS | ||||
|     BEGIN | ||||
|         desktop_archievement_admin.clean_temp_data; | ||||
|      | ||||
|         INSERT INTO desktop_archievement_admin.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>_t | ||||
|             WITH aa AS | ||||
|              (SELECT to_char(t.signature_date, | ||||
|                              'yyyy-mm-dd') ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      (to_char(T.signature_date, | ||||
|                               'yyyy')) the_year, | ||||
|                      (to_char(T.signature_date, | ||||
|                               'mm')) the_month, | ||||
|                      t.policy_no bdh, | ||||
|                      t.endorsement_no pdh, | ||||
|                      qt.t_cre tid, | ||||
|                      QT.B_CRE BTID, -----<2D><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD> | ||||
|                      e.inception_date qbsj, | ||||
|                      e.planned_end_date zzsj, | ||||
|                      pt.premium_amount - nvl(pt.tax_amount, | ||||
|                                              0) bf | ||||
|                      --,qt.qdbf - nvl(qt.qdbf_tax_amount,0) bf | ||||
|                     , | ||||
|                      nt.ecompensation_rate * (pt.premium_amount - nvl(pt.tax_amount, | ||||
|                                                                       0)) fxbf, | ||||
|                      z.department_name bm, | ||||
|                      z.department_code bmdm, | ||||
|                      CASE | ||||
|                          WHEN (et.telpartnercode LIKE '%HC%' OR | ||||
|                               zx.workerno IN (SELECT code | ||||
|                                                  FROM datacenter.dc_lsj_zx_hc)) THEN | ||||
|                           '<27><><EFBFBD>ῥ' | ||||
|                          ELSE | ||||
|                           '' | ||||
|                      END <20>Ƿ<EFBFBD><C7B7>ῥ, | ||||
|                      nvl(zx.workerno, | ||||
|                          et.telpartnercode) <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                      (CASE | ||||
|                          WHEN nvl(zx.workerno, | ||||
|                                   et.telpartnercode) = 'DX001' AND | ||||
|                               xx.staff_name LIKE '%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%' THEN | ||||
|                           '<27><>ΰ<EFBFBD><CEB0>' | ||||
|                          WHEN nvl(zx.workerno, | ||||
|                                   et.telpartnercode) = 'DX001' AND | ||||
|                               xx.staff_name NOT LIKE '%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD>' | ||||
|                          ELSE | ||||
|                           to_char(ys.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>) | ||||
|                      END) <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                      YS.<2E>Ŷ<EFBFBD> <20><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                      nvl(YS.<2E>Ŷ<EFBFBD>, | ||||
|                          y.section_office_name) <20><><EFBFBD><EFBFBD>N, | ||||
|                      nvl((CASE | ||||
|                              WHEN nvl(zx.workerno, | ||||
|                                       et.telpartnercode) = 'DX001' AND | ||||
|                                   xx.staff_name LIKE '%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%' THEN | ||||
|                               '<27><>ΰ<EFBFBD><CEB0>' | ||||
|                              WHEN nvl(zx.workerno, | ||||
|                                       et.telpartnercode) = 'DX001' AND | ||||
|                                   xx.staff_name NOT LIKE '%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%' THEN | ||||
|                               '<27><><EFBFBD><EFBFBD>' | ||||
|                              ELSE | ||||
|                               to_char(ys.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>) | ||||
|                          END), | ||||
|                          xx.staff_name) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N | ||||
|                 FROM idst0.auto_agreement_request_t t | ||||
|                 LEFT JOIN idst0.auto_agreement_t e | ||||
|                   ON e.policy_no = t.policy_no | ||||
|                 LEFT JOIN idst0.motorised_vehicle_t v | ||||
|                   ON v.policy_no = e.policy_no | ||||
|                 LEFT JOIN idst0.auto_premium_t pt | ||||
|                   ON pt.policy_no = t.policy_no | ||||
|                  AND pt.endorsement_no = t.endorsement_no | ||||
|                 LEFT JOIN ywglxt.w_dxbd_i i | ||||
|                   ON e.policy_no = i.bdh | ||||
|                 LEFT JOIN idst0.rydm_t xx | ||||
|                   ON xx.staff_code = nvl(i.zhjywy, | ||||
|                                          e.operator_code) | ||||
|                 LEFT JOIN idst0.ks_t y | ||||
|                   ON y.section_office_code = nvl(xx.section_office_code, | ||||
|                                                  e.section_office_code) | ||||
|                 LEFT JOIN idst0.bm_t z | ||||
|                   ON z.department_code = nvl(xx.department_code, | ||||
|                                              e.department_code) | ||||
|               --left join datacenter.dc_cx_csteam ct on ct.jbrcode = xx.staff_code | ||||
|                 LEFT JOIN idst0.auto_new_product_info_t nt | ||||
|                   ON nt.policy_no = t.policy_no | ||||
|                  AND nt.endorsement_no = t.endorsement_no | ||||
|               --left join ywglxt.q_auto_agreement_extend_t qe on qe.policy_no = e.policy_no | ||||
|                 LEFT JOIN ywglxt.q_auto_agreement_t qt | ||||
|                   ON qt.policy_no = e.policy_no | ||||
|                 LEFT JOIN datacenter.dc_yangg_qdcode qd | ||||
|                   ON qd.code = e.selling_channel_type | ||||
|                 LEFT JOIN datacenter.dc_tb_jc_c_tag cl | ||||
|                   ON cl.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = e.policy_no | ||||
|                 LEFT JOIN datacenter.dc_yangg_basecode_teams fg | ||||
|                   ON fg.bm = z.department_name | ||||
|                  AND fg.ks = y.section_office_name | ||||
|               --left join idst0.t_sell_policy_autobase_t zx on zx.policy_no=e.policy_no | ||||
|               --left join idst0.auto_agreement_extend_t et on et.policy_no = e.policy_no | ||||
|                 LEFT JOIN idst0.auto_agreement_extend_t et | ||||
|                   ON et.policy_no = e.policy_no | ||||
|                 LEFT JOIN idst0.t_sell_policy_autobase_t zx | ||||
|                   ON zx.policy_no = e.policy_no | ||||
|                 LEFT JOIN datacenter.dc_YZH_ZXYS YS | ||||
|                   ON YS.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = nvl(zx.workerno, | ||||
|                                    et.telpartnercode) | ||||
|               --left join v_lsj_dimian dm on dm.vin=v.vin and e.selling_channel_type='25' and dm.MEMO like'%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%' | ||||
|               --left join datacenter.dc_lsj_zx_team zt on zt.name=coalesce(zc.name,zc1.name,bc.name,dm.JBRMC) | ||||
|                WHERE t.signature_date >= to_date('2023-01-01 00:00:00', | ||||
|                                                  'yyyy-mm-dd hh24:mi:ss') | ||||
|                  AND t.signature_date < to_date(to_char(SYSDATE - 1, | ||||
|                                                         'yyyy-mm-dd') || ' 23:59:59', | ||||
|                                                 'yyyy-mm-dd hh24:mi:ss') | ||||
|                     --and t.endorsement_no = '<27><>' | ||||
|                  AND e.policy_status = '1' --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч | ||||
|                  AND qt.tflag = '0' --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD> | ||||
|                  AND qt.usage_xm = '<27><>ͥ<EFBFBD><CDA5><EFBFBD>ó<EFBFBD>' | ||||
|                     --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᳵ<EFBFBD><E1B3B5>Ħ<EFBFBD>г<EFBFBD><D0B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|                     --and e.policy_no in ('AXIMC90Y1419B038594J','AXIMC90CTP19B039593R','AXIMC04CTP19B013473X') | ||||
|                  AND e.planned_end_date - e.inception_date >= 360 | ||||
|               --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|               ) | ||||
|             -----<2D><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD> | ||||
|             , | ||||
|             dd2 AS | ||||
|              (SELECT ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      the_year, | ||||
|                      the_month, | ||||
|                      bm, | ||||
|                      bmdm, | ||||
|                      <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                      <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                      <20><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                      <20><><EFBFBD><EFBFBD>N, | ||||
|                      <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N, | ||||
|                      CASE | ||||
|                          WHEN pdh = '<27><>' THEN | ||||
|                           tid | ||||
|                      END tid, | ||||
|                      to_number('1') <20>ͻ<EFBFBD><CDBB><EFBFBD>, | ||||
|                      COUNT(DISTINCT CASE | ||||
|                                WHEN pdh = '<27><>' THEN | ||||
|                                 bdh | ||||
|                            END) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      SUM(bf) <20><><EFBFBD><EFBFBD> | ||||
|                 FROM (SELECT DISTINCT * | ||||
|                         FROM aa) aa | ||||
|                GROUP BY bm, | ||||
|                         bmdm, | ||||
|                         CASE | ||||
|                             WHEN pdh = '<27><>' THEN | ||||
|                              tid | ||||
|                         END, | ||||
|                         the_year, | ||||
|                         the_month, | ||||
|                         BTID, | ||||
|                         <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                         <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                         <20><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                         ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                         <20><><EFBFBD><EFBFBD>N, | ||||
|                         <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N | ||||
|               UNION | ||||
|               SELECT ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      the_year, | ||||
|                      the_month, | ||||
|                      bm, | ||||
|                      bmdm, | ||||
|                      <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                      <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                      <20><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                      <20><><EFBFBD><EFBFBD>N, | ||||
|                      <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N, | ||||
|                      CASE | ||||
|                          WHEN btid = tid THEN | ||||
|                           '' | ||||
|                          ELSE | ||||
|                           btid | ||||
|                      END btid, | ||||
|                      to_number('0') <20>ͻ<EFBFBD><CDBB><EFBFBD>, | ||||
|                      to_number('0') <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      to_number('0') <20><><EFBFBD><EFBFBD> | ||||
|                 FROM (SELECT DISTINCT * | ||||
|                         FROM aa) aa), | ||||
|             DD AS | ||||
|              (SELECT * | ||||
|                 FROM DD2 | ||||
|                WHERE TID IS NOT NULL) | ||||
|             --select * from dd | ||||
|             , | ||||
|             bb AS | ||||
|              (SELECT DISTINCT q.policy_no bdh, | ||||
|                               q.endorsement_no pdh, | ||||
|                               qna.t_cre tid, | ||||
|                               to_number(to_char(q.signature_date, | ||||
|                                                 'yyyy')) || '<27><>' nf, | ||||
|                               (to_char(q.signature_date, | ||||
|                                        'mm')) mm_f, | ||||
|                               to_char(q.signature_date, | ||||
|                                       'dd') || '<27><>' dd, | ||||
|                               q.signature_date sj, | ||||
|                               round((pt.premium_amount - nvl(pt.taxamount, | ||||
|                                                              0)) * c.rate / 100, | ||||
|                                     2) bf, | ||||
|                               z.department_name bm | ||||
|                 FROM idst0.nonauto_agreement_request_t q | ||||
|                 LEFT JOIN idst0.nonauto_agreement_t e | ||||
|                   ON e.policy_no = q.policy_no | ||||
|                 LEFT JOIN idst0.nonauto_premium_t pt | ||||
|                   ON pt.endorsement_no = q.endorsement_no | ||||
|                  AND pt.policy_no = q.policy_no | ||||
|                 LEFT JOIN idst0.reinsurance_t r | ||||
|                   ON r.reinsurance_policy_no = e.policy_no | ||||
|                 LEFT JOIN idst0.exrate_month_t c | ||||
|                   ON pt.currency_code = c.bzh | ||||
|                  AND to_char(q.signature_date, | ||||
|                              'YYYY') = c.theyear | ||||
|                  AND to_char(q.signature_date, | ||||
|                              'fmmm') = c.themonth | ||||
|                | ||||
|                 LEFT JOIN idst0.rydm_t x | ||||
|                   ON x.staff_code = e.operator_code | ||||
|                 LEFT JOIN idst0.ks_t y | ||||
|                   ON y.section_office_code = x.section_office_code | ||||
|                 LEFT JOIN idst0.bm_t z | ||||
|                   ON z.department_code = x.department_code | ||||
|                 LEFT JOIN ywglxt.q_nonauto_agreement_t qna | ||||
|                   ON qna.policy_no = q.policy_no | ||||
|                 LEFT JOIN datacenter.dc_yangg_gkxzh gk | ||||
|                   ON gk.product_code = e.product_code --<2D><>ɢ<EFBFBD><C9A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|               --left join datacenter.dc_yangg_zbxzh zb on zb.product_code = e.product_code --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|                 LEFT JOIN dd | ||||
|                   ON dd.tid = qna.t_cre | ||||
|                WHERE qna.tflag = '0' | ||||
|                  AND (CASE | ||||
|                          WHEN q.endorsement_no != '<27><>' AND | ||||
|                               round((pt.premium_amount - nvl(pt.taxamount, | ||||
|                                                              0)) * c.rate / 100, | ||||
|                                     2) != 0 THEN | ||||
|                           '<27><>' | ||||
|                      END) IS NULL | ||||
|                     --and q.endorsement_no = '<27><>' | ||||
|                  AND e.policy_status = '1' | ||||
|                  AND gk.product_code IS NOT NULL | ||||
|                  AND (e.product_code LIKE '2%' OR e.product_code LIKE '1106%' --<2D>⽡ --<2D><><EFBFBD><EFBFBD> | ||||
|                      OR e.product_code LIKE '1107%' OR e.product_code LIKE '1108%' OR e.product_code LIKE '1307%' OR e.product_code LIKE '1304A400%' --<2D>Ҳ<EFBFBD> | ||||
|                       | ||||
|                      ) | ||||
|                     --and e.product_code not in ('22KC9800') | ||||
|                  AND q.signature_date >= to_date('2023-01-01 00:00:00', | ||||
|                                                  'yyyy-mm-dd hh24:mi:ss') | ||||
|                  AND q.signature_date < to_date(to_char(SYSDATE - 1, | ||||
|                                                         'yyyy-mm-dd') || ' 23:59:59', | ||||
|                                                 'yyyy-mm-dd hh24:mi:ss') | ||||
|                  AND e.planned_end_date - e.inception_date >= 90 | ||||
|                  AND dd.tid IS NOT NULL | ||||
|               --<2D><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF>) | ||||
|               ) | ||||
|             --SELECT * FROM BB | ||||
|             , | ||||
|             cc AS | ||||
|              (SELECT mm_f, | ||||
|                      tid <20>ں<EFBFBD>֤<EFBFBD><D6A4>, | ||||
|                      COUNT(DISTINCT bdh) <20>ںϱ<DABA><CFB1><EFBFBD>, | ||||
|                      SUM(bf) <20>ںϱ<DABA><CFB1><EFBFBD> | ||||
|                 FROM bb | ||||
|                GROUP BY tid, | ||||
|                         mm_f), | ||||
|             ff AS | ||||
|              (SELECT dd.*, | ||||
|                      cc.* | ||||
|                 FROM dd | ||||
|                 LEFT JOIN cc | ||||
|                   ON cc.<2E>ں<EFBFBD>֤<EFBFBD><D6A4> = dd.tid | ||||
|                  AND cc.mm_f = dd.the_month) --OR cc.<2E>ں<EFBFBD>֤<EFBFBD><D6A4> = dd.btid | ||||
|             --select * from ff | ||||
|             SELECT to_date(ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                            'yyyy-mm-dd') ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                    the_year <20><><EFBFBD><EFBFBD>, | ||||
|                    the_month <20>·<EFBFBD>, | ||||
|                    bm <20><><EFBFBD><EFBFBD>, | ||||
|                    bmdm <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD>, | ||||
|                    <20><><EFBFBD><EFBFBD>N, | ||||
|                    <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N, | ||||
|                    <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                    <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                    <20><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                    nvl(SUM(<28><><EFBFBD><EFBFBD>), | ||||
|                        0) <20><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                    nvl(SUM(<28>ںϱ<DABA><CFB1><EFBFBD>), | ||||
|                        0) <20><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD> | ||||
|               FROM ff | ||||
|              WHERE to_date(ff.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                            'yyyy-mm-dd') >= a_start_date | ||||
|                AND to_date(ff.ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                            'yyyy-mm-dd') < a_end_date | ||||
|                AND bm IN ('<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>', | ||||
|                           '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾') | ||||
|              GROUP BY ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                       the_year, | ||||
|                       the_month, | ||||
|                       bm, | ||||
|                       bmdm, | ||||
|                       <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                       <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                       <20><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                       <20><><EFBFBD><EFBFBD>N, | ||||
|                       <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N | ||||
|              ORDER BY <20><><EFBFBD><EFBFBD>, | ||||
|                       <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>; | ||||
|         COMMIT; | ||||
|     END; | ||||
|  | ||||
|     /**********************************************************************/ | ||||
|  | ||||
|     PROCEDURE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IS | ||||
|     BEGIN | ||||
|         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|         desktop_archievement_admin.clean_mensual_renewal; | ||||
|      | ||||
|         --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|         INSERT INTO desktop_archievement_admin.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3> | ||||
|             WITH cc AS | ||||
|              (SELECT pt.policy_no policy_no, | ||||
|                      SUM(pt.premium_amount) premium_amount, | ||||
|                      SUM(pt.tax_amount) tax_amount | ||||
|                 FROM idst0.auto_premium_t pt | ||||
|                GROUP BY pt.policy_no) | ||||
|              | ||||
|             , | ||||
|             bb AS | ||||
|              (SELECT t.policy_no <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      (CASE | ||||
|                          WHEN e.product_code LIKE '1102%' AND | ||||
|                               e.product_code NOT LIKE '110224%' AND | ||||
|                               e.product_code != '11026000' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '1101%' OR | ||||
|                               e.product_code LIKE '1301%' OR | ||||
|                               e.product_code LIKE '11110000%' THEN | ||||
|                           '<27>Ʋ<EFBFBD><C6B2><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '1107%' OR | ||||
|                               e.product_code LIKE '1307%' OR | ||||
|                               e.product_code LIKE '1304A400%' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '1106%' OR | ||||
|                               e.product_code LIKE '51015700' THEN | ||||
|                           '<27>Ҳ<EFBFBD><D2B2><EFBFBD>' | ||||
|                          WHEN (e.product_code LIKE '1104%' OR e.product_code LIKE '1204%' OR e.product_code LIKE '13040000%') AND | ||||
|                               e.product_code NOT LIKE '120404%' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '1203%' OR | ||||
|                               e.product_code LIKE '1103%' OR | ||||
|                               e.product_code LIKE '120404%' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '1305%' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '111%' AND | ||||
|                               e.product_code NOT LIKE '11110000%' THEN | ||||
|                           'ũҵ<C5A9><D2B5>' | ||||
|                          WHEN e.product_code LIKE '1109%' OR | ||||
|                               e.product_code LIKE '1309%' THEN | ||||
|                           '<27><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '1312%' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '1308%' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '23%' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '22%' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN e.product_code LIKE '110224%' OR | ||||
|                               e.product_code = '11026000' THEN | ||||
|                           '<27><>ǿ<EFBFBD><C7BF>' | ||||
|                          ELSE | ||||
|                           'δ<><CEB4><EFBFBD><EFBFBD>' | ||||
|                      END) AS <20><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD> | ||||
|                 FROM idst0.auto_agreement_request_t t | ||||
|                 LEFT JOIN idst0.auto_agreement_t e | ||||
|                   ON e.policy_no = t.policy_no) | ||||
|              | ||||
|             , | ||||
|             aa1 AS | ||||
|              (SELECT a.policy_no <20>ɱ<EFBFBD><C9B1><EFBFBD>, | ||||
|                      a.selling_shop_code <20><><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>, | ||||
|                      a.planned_end_date <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>, | ||||
|                      CASE | ||||
|                          WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                 'yyyy')) = '2022' AND | ||||
|                               a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD>רҵ<D7A8><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>' | ||||
|                          WHEN a.planned_end_date > to_date('2023-04-01 00:00:00', | ||||
|                                                            'yyyy-mm-dd hh24:mi:ss') AND | ||||
|                               (a.selling_shop_code || a.tel_sale_4s_code IN ('00EA', | ||||
|                                                                              '00F1', | ||||
|                                                                              '00G9')) THEN | ||||
|                           '<27><><EFBFBD><EFBFBD>רҵ<D7A8><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>' | ||||
|                          ELSE | ||||
|                           nvl(dt.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                               z.section_office_name) | ||||
|                      END <20><><EFBFBD><EFBFBD>, | ||||
|                      (CASE | ||||
|                          WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                 'yyyy')) = '2023' AND | ||||
|                               nvl(dt.<2E><><EFBFBD><EFBFBD>, | ||||
|                                   y.department_name) NOT LIKE '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' and<6E><64>cd.memo LIKE '%<25><><EFBFBD><EFBFBD>%' OR | ||||
|                               cd.memo LIKE '%<25><><EFBFBD><EFBFBD>%' <20><>and v.vehicle_brand IN ('<27><>˹<EFBFBD><CBB9>', | ||||
|                                                   'ε<><CEB5>', | ||||
|                                                   '<27><><EFBFBD><EFBFBD>', | ||||
|                                                   'С<><D0A1>', | ||||
|                                                   '<27><><EFBFBD><EFBFBD>', | ||||
|                                                   '<27><><EFBFBD><EFBFBD>', | ||||
|                                                   'AITO', | ||||
|                                                   'ARCFOX<4F><58><EFBFBD><EFBFBD>', | ||||
|                                                   '<27><>˹<EFBFBD><CBB9><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>', | ||||
|                                                   '<27><>˹<EFBFBD><CBB9>(<28>й<EFBFBD>)') AND | ||||
|                               v.vin NOT IN ('LJ1E6A2UXL7744108', | ||||
|                                             'LW433B10XL1001411', | ||||
|                                             'LJ1E6A3U2L7742089', | ||||
|                                             'L1NSPGHB0MA002652') THEN | ||||
|                           '<27><><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>չ<EFBFBD><D5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN (CASE | ||||
|                                   WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                          'yyyy')) = '2022' AND | ||||
|                                        a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN | ||||
|                                    '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' | ||||
|                                   ELSE | ||||
|                                    nvl(dt.<2E><><EFBFBD><EFBFBD>, | ||||
|                                        y.department_name) | ||||
|                               END) = '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' THEN | ||||
|                           (CASE | ||||
|                               WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                      'yyyy')) = '2022' AND | ||||
|                                    a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN | ||||
|                                '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' | ||||
|                               ELSE | ||||
|                                nvl(dt.<2E><><EFBFBD><EFBFBD>, | ||||
|                                    y.department_name) | ||||
|                           END) | ||||
|                          WHEN <20><>cd.memo LIKE '%<25><><EFBFBD><EFBFBD>%' OR | ||||
|                               cd.memo LIKE '%<25><><EFBFBD><EFBFBD>%' <20><> THEN | ||||
|                           '<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>' | ||||
|                          WHEN a.planned_end_date > to_date('2023-04-01 00:00:00', | ||||
|                                                            'yyyy-mm-dd hh24:mi:ss') AND | ||||
|                               (a.selling_shop_code || a.tel_sale_4s_code IN ('00EA', | ||||
|                                                                              '00F1', | ||||
|                                                                              '00G9')) THEN | ||||
|                           'ͬ<><CDAC>֧<EFBFBD><D6A7>˾' | ||||
|                          ELSE | ||||
|                           (CASE | ||||
|                               WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                      'yyyy')) = '2022' AND | ||||
|                                    a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN | ||||
|                                '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' | ||||
|                               ELSE | ||||
|                                nvl(dt.<2E><><EFBFBD><EFBFBD>, | ||||
|                                    y.department_name) | ||||
|                           END) | ||||
|                      END) <20><><EFBFBD>β<EFBFBD><CEB2><EFBFBD>, | ||||
|                      qa.USAGE_XM ʹ<><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      decode(qa.bd_type, | ||||
|                             '1', | ||||
|                             '<27><><EFBFBD><EFBFBD>ǿ', | ||||
|                             '2', | ||||
|                             '<27><><EFBFBD><EFBFBD>ҵ', | ||||
|                             '3', | ||||
|                             '<27><><EFBFBD>̹<EFBFBD><CCB9><EFBFBD>', | ||||
|                             '<27><><EFBFBD><EFBFBD>') <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      (CASE | ||||
|                          WHEN (qa.bd_type = '1' AND nt.ecompensation_rate > 1) THEN | ||||
|                           '<27><>' | ||||
|                      END) <20><>Ԥ<EFBFBD><D4A4>, | ||||
|                      x.staff_name AS <20><><EFBFBD><EFBFBD>, | ||||
|                      bb.<2E><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD>, | ||||
|                      cc.signature_date <20>±<EFBFBD><C2B1><EFBFBD>ǩ<EFBFBD><C7A9>ʱ<EFBFBD><CAB1>, | ||||
|                      (SELECT hmd.<2E>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD> | ||||
|                         FROM (SELECT DISTINCT * | ||||
|                                 FROM dc_lsj_xb_hmd) hmd | ||||
|                        WHERE hmd.vin = v.vin) <20>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD> | ||||
|                | ||||
|                 FROM idst0.auto_agreement_t a | ||||
|                 LEFT JOIN bb | ||||
|                   ON bb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = a.policy_no | ||||
|                 LEFT JOIN ywglxt.w_dxbd_i i | ||||
|                   ON a.policy_no = i.bdh | ||||
|                 LEFT JOIN idst0.motorised_vehicle_t v | ||||
|                   ON a.policy_no = v.policy_no | ||||
|                 LEFT JOIN ywglxt.q_auto_agreement_t qa | ||||
|                   ON qa.policy_no = a.policy_no | ||||
|                | ||||
|                 LEFT JOIN idst0.auto_new_product_info_t nt | ||||
|                   ON nt.policy_no = a.policy_no | ||||
|                  AND nt.endorsement_no = '<27><>' | ||||
|                 LEFT JOIN idst0.rydm_t x | ||||
|                   ON x.staff_code = nvl(upper(i.zhjywy), | ||||
|                                         a.operator_code) | ||||
|                 LEFT JOIN idst0.bm_t y | ||||
|                   ON x.department_code = y.department_code | ||||
|                 LEFT JOIN idst0.ks_t z | ||||
|                   ON x.section_office_code = z.section_office_code | ||||
|                 LEFT JOIN cc pt | ||||
|                   ON pt.policy_no = a.policy_no | ||||
|                 LEFT JOIN (SELECT DISTINCT aa.policy_no, | ||||
|                                           vv.vin, | ||||
|                                           aa.inception_date, | ||||
|                                           t.signature_date, | ||||
|                                           (pt.premium_amount - nvl(pt.tax_amount, | ||||
|                                                                    0)) qdbf, | ||||
|                                           (CASE | ||||
|                                               WHEN aa.inception_date - aa.issue_date >= '30' THEN | ||||
|                                                vv.vin | ||||
|                                           END) if30, | ||||
|                                           bb.<2E><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD> | ||||
|                             FROM idst0.auto_agreement_t aa | ||||
|                             LEFT JOIN bb | ||||
|                               ON bb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = aa.policy_no | ||||
|                             LEFT JOIN idst0.motorised_vehicle_t vv | ||||
|                               ON vv.policy_no = aa.policy_no | ||||
|                             LEFT JOIN idst0.auto_agreement_request_t t | ||||
|                               ON t.policy_no = aa.policy_no | ||||
|                              AND t.endorsement_no = '<27><>' | ||||
|                             LEFT JOIN idst0.auto_premium_t pt | ||||
|                               ON pt.policy_no = aa.policy_no | ||||
|                              AND pt.endorsement_no = '<27><>' | ||||
|                            WHERE aa.policy_no = vv.policy_no | ||||
|                              AND aa.policy_status = '1' --and aa.product_code not in ('11022400','11023900','11024000','11024600','11026000') | ||||
|                              AND aa.branch_company_code = '3080100' | ||||
|                              AND (pt.premium_amount - nvl(pt.tax_amount, | ||||
|                                                           0)) > 100 | ||||
|                              AND aa.inception_date >= to_date('2022-12-01 00:00:00', | ||||
|                                                               'yyyy-mm-dd hh24:mi:ss') | ||||
|                              AND aa.inception_date < to_date('2023-11-01 00:00:00', | ||||
|                                                              'yyyy-mm-dd hh24:mi:ss') | ||||
|                              AND aa.branch_company_code = vv.branch_company_code) cc | ||||
|                   ON (cc.vin = v.vin AND cc.<2E><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD> = bb.<2E><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD>) | ||||
|                  AND cc.inception_date > a.planned_end_date - 30 --ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD>Ʒſ<C6B7>Ϊ30<33><30> | ||||
|                 LEFT JOIN dc_yangg_cx_dianxiaodoudi cd | ||||
|                   ON cd.policy_no = a.policy_no | ||||
|                 LEFT JOIN dc_tb_jc_c_tag dt | ||||
|                   ON dt.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = a.policy_no | ||||
|                 LEFT JOIN idst0.auto_agreement_t aa | ||||
|                   ON aa.policy_no = cc.policy_no | ||||
|                 LEFT JOIN cc pt1 | ||||
|                   ON pt1.policy_no = aa.policy_no | ||||
|                WHERE a.policy_status = '1' | ||||
|                  AND a.planned_end_date - a.inception_date > 270 | ||||
|                  AND a.planned_end_date >= to_date('2023-01-01 00:00:00', | ||||
|                                                    'yyyy-mm-dd hh24:mi:ss') | ||||
|                  AND a.planned_end_date < to_date('2023-10-01 00:00:00', | ||||
|                                                   'yyyy-mm-dd hh24:mi:ss')), | ||||
|             aa2 AS | ||||
|              (SELECT a.policy_no <20>ɱ<EFBFBD><C9B1><EFBFBD>, | ||||
|                      a.selling_shop_code <20><><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>, | ||||
|                      a.planned_end_date <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>, | ||||
|                      CASE | ||||
|                          WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                 'yyyy')) = '2022' AND | ||||
|                               a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN | ||||
|                           '<27><><EFBFBD><EFBFBD>רҵ<D7A8><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>' | ||||
|                          WHEN a.planned_end_date > to_date('2023-04-01 00:00:00', | ||||
|                                                            'yyyy-mm-dd hh24:mi:ss') AND | ||||
|                               (a.selling_shop_code || a.tel_sale_4s_code IN ('00EA', | ||||
|                                                                              '00F1', | ||||
|                                                                              '00G9')) THEN | ||||
|                           '<27><><EFBFBD><EFBFBD>רҵ<D7A8><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>' | ||||
|                          ELSE | ||||
|                           nvl(dt.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                               z.section_office_name) | ||||
|                      END <20><><EFBFBD><EFBFBD>, | ||||
|                      (CASE | ||||
|                          WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                 'yyyy')) = '2023' AND | ||||
|                               nvl(dt.<2E><><EFBFBD><EFBFBD>, | ||||
|                                   y.department_name) NOT LIKE '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' and<6E><64>cd.memo LIKE '%<25><><EFBFBD><EFBFBD>%' OR | ||||
|                               cd.memo LIKE '%<25><><EFBFBD><EFBFBD>%' <20><>and v.vehicle_brand IN ('<27><>˹<EFBFBD><CBB9>', | ||||
|                                                   'ε<><CEB5>', | ||||
|                                                   '<27><><EFBFBD><EFBFBD>', | ||||
|                                                   'С<><D0A1>', | ||||
|                                                   '<27><><EFBFBD><EFBFBD>', | ||||
|                                                   '<27><><EFBFBD><EFBFBD>', | ||||
|                                                   'AITO', | ||||
|                                                   'ARCFOX<4F><58><EFBFBD><EFBFBD>', | ||||
|                                                   '<27><>˹<EFBFBD><CBB9><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>', | ||||
|                                                   '<27><>˹<EFBFBD><CBB9>(<28>й<EFBFBD>)') AND | ||||
|                               v.vin NOT IN ('LJ1E6A2UXL7744108', | ||||
|                                             'LW433B10XL1001411', | ||||
|                                             'LJ1E6A3U2L7742089', | ||||
|                                             'L1NSPGHB0MA002652') THEN | ||||
|                           '<27><><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>չ<EFBFBD><D5B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD><EFBFBD>' | ||||
|                          WHEN (CASE | ||||
|                                   WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                          'yyyy')) = '2022' AND | ||||
|                                        a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN | ||||
|                                    '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' | ||||
|                                   ELSE | ||||
|                                    nvl(dt.<2E><><EFBFBD><EFBFBD>, | ||||
|                                        y.department_name) | ||||
|                               END) = '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' THEN | ||||
|                           (CASE | ||||
|                               WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                      'yyyy')) = '2022' AND | ||||
|                                    a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN | ||||
|                                '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' | ||||
|                               ELSE | ||||
|                                nvl(dt.<2E><><EFBFBD><EFBFBD>, | ||||
|                                    y.department_name) | ||||
|                           END) | ||||
|                          WHEN <20><>cd.memo LIKE '%<25><><EFBFBD><EFBFBD>%' OR | ||||
|                               cd.memo LIKE '%<25><><EFBFBD><EFBFBD>%' <20><> THEN | ||||
|                           '<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>' | ||||
|                          WHEN a.planned_end_date > to_date('2023-04-01 00:00:00', | ||||
|                                                            'yyyy-mm-dd hh24:mi:ss') AND | ||||
|                               (a.selling_shop_code || a.tel_sale_4s_code IN ('00EA', | ||||
|                                                                              '00F1', | ||||
|                                                                              '00G9')) THEN | ||||
|                           'ͬ<><CDAC>֧<EFBFBD><D6A7>˾' | ||||
|                          ELSE | ||||
|                           (CASE | ||||
|                               WHEN to_number(to_char(a.planned_end_date, | ||||
|                                                      'yyyy')) = '2022' AND | ||||
|                                    a.selling_shop_code || a.tel_sale_4s_code = '00GK' THEN | ||||
|                                '<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>˾' | ||||
|                               ELSE | ||||
|                                nvl(dt.<2E><><EFBFBD><EFBFBD>, | ||||
|                                    y.department_name) | ||||
|                           END) | ||||
|                      END) <20><><EFBFBD>β<EFBFBD><CEB2><EFBFBD>, | ||||
|                      qa.USAGE_XM ʹ<><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      decode(qa.bd_type, | ||||
|                             '1', | ||||
|                             '<27><><EFBFBD><EFBFBD>ǿ', | ||||
|                             '2', | ||||
|                             '<27><><EFBFBD><EFBFBD>ҵ', | ||||
|                             '3', | ||||
|                             '<27><><EFBFBD>̹<EFBFBD><CCB9><EFBFBD>', | ||||
|                             '<27><><EFBFBD><EFBFBD>') <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                      (CASE | ||||
|                          WHEN (qa.bd_type = '1' AND nt.ecompensation_rate > 1) THEN | ||||
|                           '<27><>' | ||||
|                      END) <20><>Ԥ<EFBFBD><D4A4>, | ||||
|                      x.staff_name AS <20><><EFBFBD><EFBFBD>, | ||||
|                      bb.<2E><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD>, | ||||
|                      cc.signature_date <20>±<EFBFBD><C2B1><EFBFBD>ǩ<EFBFBD><C7A9>ʱ<EFBFBD><CAB1>, | ||||
|                      (SELECT hmd.<2E>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD> | ||||
|                         FROM (SELECT DISTINCT * | ||||
|                                 FROM dc_lsj_xb_hmd) hmd | ||||
|                        WHERE hmd.vin = v.vin) <20>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD> | ||||
|                | ||||
|                 FROM idst0.auto_agreement_t a | ||||
|                 LEFT JOIN bb | ||||
|                   ON bb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = a.policy_no | ||||
|                 LEFT JOIN ywglxt.w_dxbd_i i | ||||
|                   ON a.policy_no = i.bdh | ||||
|                 LEFT JOIN idst0.motorised_vehicle_t v | ||||
|                   ON a.policy_no = v.policy_no | ||||
|                 LEFT JOIN ywglxt.q_auto_agreement_t qa | ||||
|                   ON qa.policy_no = a.policy_no | ||||
|                 LEFT JOIN idst0.auto_new_product_info_t nt | ||||
|                   ON nt.policy_no = a.policy_no | ||||
|                  AND nt.endorsement_no = '<27><>' | ||||
|                 LEFT JOIN idst0.rydm_t x | ||||
|                   ON x.staff_code = nvl(upper(i.zhjywy), | ||||
|                                         a.operator_code) | ||||
|                 LEFT JOIN idst0.bm_t y | ||||
|                   ON x.department_code = y.department_code | ||||
|                 LEFT JOIN idst0.ks_t z | ||||
|                   ON x.section_office_code = z.section_office_code | ||||
|                 LEFT JOIN cc pt | ||||
|                   ON pt.policy_no = a.policy_no | ||||
|                 LEFT JOIN (SELECT DISTINCT aa.policy_no, | ||||
|                                           vv.vin, | ||||
|                                           aa.inception_date, | ||||
|                                           t.signature_date, | ||||
|                                           (pt.premium_amount - nvl(pt.tax_amount, | ||||
|                                                                    0)) qdbf, | ||||
|                                           (CASE | ||||
|                                               WHEN aa.inception_date - aa.issue_date >= '30' THEN | ||||
|                                                vv.vin | ||||
|                                           END) if30, | ||||
|                                           bb.<2E><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD> | ||||
|                             FROM idst0.auto_agreement_t aa | ||||
|                             LEFT JOIN bb | ||||
|                               ON bb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = aa.policy_no | ||||
|                             LEFT JOIN idst0.motorised_vehicle_t vv | ||||
|                               ON vv.policy_no = aa.policy_no | ||||
|                             LEFT JOIN idst0.auto_agreement_request_t t | ||||
|                               ON t.policy_no = aa.policy_no | ||||
|                              AND t.endorsement_no = '<27><>' | ||||
|                             LEFT JOIN idst0.auto_premium_t pt | ||||
|                               ON pt.policy_no = aa.policy_no | ||||
|                              AND pt.endorsement_no = '<27><>' | ||||
|                            WHERE aa.policy_no = vv.policy_no | ||||
|                              AND aa.policy_status = '1' --and aa.product_code not in ('11022400','11023900','11024000','11024600','11026000') | ||||
|                              AND aa.branch_company_code = '3080100' | ||||
|                              AND (pt.premium_amount - nvl(pt.tax_amount, | ||||
|                                                           0)) > 100 | ||||
|                              AND aa.inception_date >= to_date('2022-12-01 00:00:00', | ||||
|                                                               'yyyy-mm-dd hh24:mi:ss') | ||||
|                              AND aa.inception_date < to_date('2023-11-01 00:00:00', | ||||
|                                                              'yyyy-mm-dd hh24:mi:ss') | ||||
|                              AND aa.branch_company_code = vv.branch_company_code) cc | ||||
|                   ON (cc.vin = v.vin AND cc.<2E><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD> = bb.<2E><><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD>) | ||||
|                  AND cc.inception_date > a.planned_end_date - 30 --ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD>Ʒſ<C6B7>Ϊ30<33><30> | ||||
|                 LEFT JOIN dc_yangg_cx_dianxiaodoudi cd | ||||
|                   ON cd.policy_no = a.policy_no | ||||
|                 LEFT JOIN dc_tb_jc_c_tag dt | ||||
|                   ON dt.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = a.policy_no | ||||
|                 LEFT JOIN idst0.auto_agreement_t aa | ||||
|                   ON aa.policy_no = cc.policy_no | ||||
|                 LEFT JOIN cc pt1 | ||||
|                   ON pt1.policy_no = aa.policy_no | ||||
|                WHERE a.policy_status = '1' | ||||
|                  AND a.planned_end_date - a.inception_date > 270 | ||||
|                  AND a.planned_end_date >= to_date('2023-10-01 00:00:00', | ||||
|                                                    'yyyy-mm-dd hh24:mi:ss') | ||||
|                  AND a.planned_end_date < to_date('2024-01-01 00:00:00', | ||||
|                                                   'yyyy-mm-dd hh24:mi:ss')) | ||||
|              | ||||
|             , | ||||
|             aa3 AS | ||||
|              (SELECT DISTINCT * | ||||
|                 FROM aa1 | ||||
|               UNION ALL (SELECT DISTINCT * | ||||
|                           FROM aa2)) | ||||
|              | ||||
|             , | ||||
|             AA AS | ||||
|              (SELECT AA3.*, | ||||
|                      nvl<76><6C>zx.workerno, | ||||
|                      et.telpartnercode) <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|             (CASE WHEN nvl<76><6C>zx.workerno, | ||||
|              et.telpartnercode) = | ||||
|              'DX001' AND aa3.<2E><><EFBFBD><EFBFBD> LIKE | ||||
|              '%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%' THEN | ||||
|              '<27><>ΰ<EFBFBD><CEB0>' WHEN nvl<76><6C>zx.workerno, | ||||
|             et.telpartnercode) = | ||||
|              'DX001' AND aa3.<2E><><EFBFBD><EFBFBD> NOT LIKE | ||||
|              '%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%' THEN | ||||
|              '<27><><EFBFBD><EFBFBD>' ELSE to_char | ||||
|             (ys.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>) END) <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|             YS.<2E>Ŷ<EFBFBD> <20><>ϯ<EFBFBD>Ŷ<EFBFBD> FROM AA3 LEFT JOIN idst0.auto_agreement_extend_t et ON et.policy_no = AA3.<2E>ɱ<EFBFBD><C9B1><EFBFBD> LEFT JOIN idst0.t_sell_policy_autobase_t zx ON zx.policy_no = AA3.<2E>ɱ<EFBFBD><C9B1><EFBFBD> LEFT JOIN dc_YZH_ZXYS YS ON YS.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = nvl<76><6C>zx.workerno, | ||||
|             et.telpartnercode)) | ||||
|              | ||||
|             , | ||||
|             yxb AS | ||||
|              ( | ||||
|               ---<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|               SELECT aa.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> <20><><EFBFBD><EFBFBD>, | ||||
|                       aa.<2E><><EFBFBD><EFBFBD>, | ||||
|                       aa.<2E><><EFBFBD><EFBFBD>, | ||||
|                       aa.<2E><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                       aa.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                       aa.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                       --(case when a.<2E><>ʶ='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'and A.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD>='<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>'  then '<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>' else A.<2E><><EFBFBD><EFBFBD>  end)  <20><><EFBFBD><EFBFBD>, | ||||
|                       (CASE | ||||
|                           WHEN COUNT(1) IS NULL THEN | ||||
|                            0 | ||||
|                           ELSE | ||||
|                            COUNT(1) | ||||
|                       END) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD> | ||||
|                 FROM aa | ||||
|                WHERE aa.ʹ<><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IN ('<27><>ͥ<EFBFBD><CDA5><EFBFBD>ó<EFBFBD>', | ||||
|                                  '<27><>ҵ<EFBFBD>ͳ<EFBFBD>') | ||||
|                  AND aa.<2E><>Ԥ<EFBFBD><D4A4> IS NULL | ||||
|                  AND aa.<2E>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD> IS NULL | ||||
|                  AND aa.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IN <20><> '<27><><EFBFBD>̹<EFBFBD><CCB9><EFBFBD>', '<27><><EFBFBD><EFBFBD>ǿ' <20><> | ||||
|                  AND aa.<2E><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> >= to_date(to_char(SYSDATE, | ||||
|                                                 'yyyy-mm') || '-01 00:00:00', | ||||
|                                         'yyyy-mm-dd hh24:mi:ss') | ||||
|                  AND aa.<2E><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> < to_date(to_char(SYSDATE - 1, | ||||
|                                                'yyyy-mm-dd') || ' 23:59:59', | ||||
|                                        'yyyy-mm-dd hh24:mi:ss') | ||||
|                  AND aa.<2E>±<EFBFBD><C2B1><EFBFBD>ǩ<EFBFBD><C7A9>ʱ<EFBFBD><CAB1> <= to_date(to_char(SYSDATE - 1, | ||||
|                                                    'yyyy-mm-dd') || ' 23:59:59', | ||||
|                                            'yyyy-mm-dd hh24:mi:ss') | ||||
|                GROUP BY aa.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD>, | ||||
|                          aa.<2E><><EFBFBD><EFBFBD>, | ||||
|                          aa.<2E><><EFBFBD><EFBFBD>, | ||||
|                          aa.<2E><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                          aa.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                          aa.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>) | ||||
|             --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D>ۼ<EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D>ۼ<EFBFBD> | ||||
|             , | ||||
|             dqs AS | ||||
|              ( | ||||
|               ---<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|               SELECT aa.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD> <20><><EFBFBD><EFBFBD>, | ||||
|                       aa.<2E><><EFBFBD><EFBFBD>, | ||||
|                       aa.<2E><><EFBFBD><EFBFBD>, | ||||
|                       aa.<2E><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                       aa.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                       aa.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                       (CASE | ||||
|                           WHEN COUNT(1) IS NULL THEN | ||||
|                            0 | ||||
|                           ELSE | ||||
|                            COUNT(1) | ||||
|                       END) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|                 FROM aa | ||||
|                WHERE aa.ʹ<><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IN ('<27><>ͥ<EFBFBD><CDA5><EFBFBD>ó<EFBFBD>', | ||||
|                                  '<27><>ҵ<EFBFBD>ͳ<EFBFBD>') | ||||
|                  AND aa.<2E><>Ԥ<EFBFBD><D4A4> IS NULL | ||||
|                  AND aa.<2E>ܿ<EFBFBD><DCBF><EFBFBD><EFBFBD><EFBFBD> IS NULL | ||||
|                  AND aa.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IN <20><> '<27><><EFBFBD>̹<EFBFBD><CCB9><EFBFBD>', '<27><><EFBFBD><EFBFBD>ǿ' <20><> | ||||
|                  AND aa.<2E><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> >= to_date(to_char(SYSDATE, | ||||
|                                                 'yyyy-mm') || '-01 00:00:00', | ||||
|                                         'yyyy-mm-dd hh24:mi:ss') | ||||
|                  AND aa.<2E><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> < to_date(to_char(SYSDATE - 1, | ||||
|                                                'yyyy-mm-dd') || ' 23:59:59', | ||||
|                                        'yyyy-mm-dd hh24:mi:ss') | ||||
|                GROUP BY aa.<2E><><EFBFBD>β<EFBFBD><CEB2><EFBFBD>, | ||||
|                          aa.<2E><><EFBFBD><EFBFBD>, | ||||
|                          aa.<2E><><EFBFBD><EFBFBD>, | ||||
|                          aa.<2E><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                          aa.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                          aa.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>) | ||||
|             SELECT dqs.<2E><><EFBFBD><EFBFBD>, | ||||
|                    dqs.<2E><><EFBFBD><EFBFBD>, | ||||
|                    dqs.<2E><><EFBFBD><EFBFBD>, | ||||
|                    dqs.<2E><>ϯ<EFBFBD>Ŷ<EFBFBD>, | ||||
|                    dqs.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                    dqs.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>, | ||||
|                    yxb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>, | ||||
|                    dqs.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|               FROM yxb, | ||||
|                    dqs --,sdqs,syxs,cyxs,cdqs | ||||
|              WHERE dqs.<2E><><EFBFBD><EFBFBD> = yxb.<2E><><EFBFBD><EFBFBD> | ||||
|                AND dqs.<2E><><EFBFBD><EFBFBD> = yxb.<2E><><EFBFBD><EFBFBD> | ||||
|                AND dqs.<2E><><EFBFBD><EFBFBD> = yxb.<2E><><EFBFBD><EFBFBD> | ||||
|                AND dqs.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = yxb.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> | ||||
|                AND dqs.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = yxb.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>; | ||||
|         COMMIT; | ||||
|     END; | ||||
|  | ||||
|     PROCEDURE chefei_daily_job IS | ||||
|     BEGIN | ||||
|         <20><><EFBFBD>ǻ<EFBFBD><C7BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(SYSDATE - 3, | ||||
|                SYSDATE); | ||||
|     END; | ||||
|  | ||||
|     PROCEDURE xubao_daily_job IS | ||||
|     BEGIN | ||||
|         <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; | ||||
|     END; | ||||
|  | ||||
| BEGIN | ||||
|     NULL; | ||||
| END telsale_pkg; | ||||
| / | ||||
							
								
								
									
										99
									
								
								code/db/pkg/telsaler_reward_pkg.pck
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										99
									
								
								code/db/pkg/telsaler_reward_pkg.pck
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,99 @@ | ||||
| CREATE OR REPLACE PACKAGE telsaler_reward_pkg IS | ||||
|  | ||||
|     -- Author  : WANGWEI-202 | ||||
|     -- Created : 2023/9/13 10:05:43 | ||||
|     -- Purpose : <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صİ<D8B5> | ||||
|  | ||||
|     PROCEDURE add_telsaler_reward | ||||
|     ( | ||||
|         a_reward_index  VARCHAR2, | ||||
|         a_telsaler_name VARCHAR2 | ||||
|     ); | ||||
|  | ||||
|     PROCEDURE update_telsaler_reward | ||||
|     ( | ||||
|         a_rec_id        INTEGER, | ||||
|         a_telsaler_name VARCHAR2, | ||||
|         a_reward_index  VARCHAR2 | ||||
|     ); | ||||
|  | ||||
|     PROCEDURE delete_telsaler_reward(a_rec_id INTEGER); | ||||
|  | ||||
| END telsaler_reward_pkg; | ||||
| / | ||||
| CREATE OR REPLACE PACKAGE BODY telsaler_reward_pkg IS | ||||
|  | ||||
|     PROCEDURE add_telsaler_reward | ||||
|     ( | ||||
|         a_reward_index  VARCHAR2, | ||||
|         a_telsaler_name VARCHAR2 | ||||
|     ) IS | ||||
|     BEGIN | ||||
|         BEGIN | ||||
|             INSERT INTO telsaler_reward | ||||
|                 (reward_index, | ||||
|                  telsaler_name) | ||||
|             VALUES | ||||
|                 (a_reward_index, | ||||
|                  a_telsaler_name); | ||||
|         EXCEPTION | ||||
|             WHEN OTHERS THEN | ||||
|                 IF SQLCODE = -00001 | ||||
|                 THEN | ||||
|                     raise_application_error(-20001, | ||||
|                                             'ֵ<>ظ<EFBFBD>'); | ||||
|                 END IF; | ||||
|         END; | ||||
|         COMMIT; | ||||
|     END; | ||||
|  | ||||
|     PROCEDURE update_telsaler_reward | ||||
|     ( | ||||
|         a_rec_id        INTEGER, | ||||
|         a_telsaler_name VARCHAR2, | ||||
|         a_reward_index  VARCHAR2 | ||||
|     ) IS | ||||
|     BEGIN | ||||
|         /*MERGE INTO telsaler_reward r | ||||
|         USING (SELECT COUNT(*) COUNT | ||||
|                  FROM telsaler_reward | ||||
|                 WHERE rec_id = a_rec_id) a | ||||
|         ON (a.count > 0) | ||||
|         WHEN MATCHED THEN | ||||
|             UPDATE | ||||
|                SET r.reward_index  = a_reward_index, | ||||
|                    r.telsaler_name = a_telsaler_name | ||||
|              WHERE r.rec_id = a_rec_id | ||||
|         WHEN NOT MATCHED THEN | ||||
|             INSERT | ||||
|                 (reward_index, | ||||
|                  telsaler_name) | ||||
|             VALUES | ||||
|                 (a_reward_index, | ||||
|                  a_telsaler_name);*/ | ||||
|         BEGIN | ||||
|             UPDATE telsaler_reward r | ||||
|                SET r.reward_index  = a_reward_index, | ||||
|                    r.telsaler_name = a_telsaler_name | ||||
|              WHERE r.rec_id = a_rec_id; | ||||
|         EXCEPTION | ||||
|             WHEN no_data_found THEN | ||||
|                 raise_application_error(-20002, | ||||
|                                         '<27>˼<DEB4>¼<EFBFBD><C2BC>'); | ||||
|         END; | ||||
|      | ||||
|         COMMIT; | ||||
|     END; | ||||
|  | ||||
|     PROCEDURE delete_telsaler_reward(a_rec_id INTEGER) IS | ||||
|     BEGIN | ||||
|         DELETE telsaler_reward | ||||
|          WHERE rec_id = a_rec_id; | ||||
|      | ||||
|         COMMIT; | ||||
|     END; | ||||
|  | ||||
| BEGIN | ||||
|     NULL; | ||||
| END telsaler_reward_pkg; | ||||
| / | ||||
							
								
								
									
										17
									
								
								code/db/twr_常用.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								code/db/twr_常用.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| select * | ||||
| from twr_telsaler_team; | ||||
|  | ||||
|  | ||||
|  | ||||
| SELECT ry.<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|        ry.<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|        team.team_code, | ||||
|        team.team_name, | ||||
|        bm.department_code, | ||||
|        bm.department_name | ||||
|   FROM twr_telsaler      ry, | ||||
|        twr_telsaler_team team, | ||||
|        idst0.bm_t        bm | ||||
|  WHERE ry.<EFBFBD>Ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = team.team_name | ||||
|    AND team.department_code = bm.department_code | ||||
|    AND (ry.<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>' OR ry.<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>'); | ||||
							
								
								
									
										3
									
								
								code/db/宽表.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								code/db/宽表.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| SELECT * FROM datacenter.kx_bi_c_kb_qd WHERE <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD> >= DATE '2023-01-01'; | ||||
|  | ||||
| SELECT * FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD> CF WHERE <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>' ORDER BY ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC; | ||||
| @@ -1,30 +1,30 @@ | ||||
| SELECT * | ||||
|   FROM reward_gainers | ||||
|   FROM REWARD_GAINERS | ||||
|    FOR UPDATE; | ||||
|  | ||||
| SELECT b.reward_name, | ||||
|        a.* | ||||
|   FROM reward_gainers  a, | ||||
|        reward_projects b | ||||
|  WHERE a.reward_index = b.reward_index; | ||||
| SELECT B.REWARD_NAME, | ||||
|        A.* | ||||
|   FROM REWARD_GAINERS  A, | ||||
|        REWARD_PROJECTS B | ||||
|  WHERE A.REWARD_INDEX = B.REWARD_INDEX; | ||||
|  | ||||
| --<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
| SELECT DISTINCT s.saler_code, | ||||
|                 s.saler_name, | ||||
|                 t.team_code, | ||||
|                 t.team, | ||||
|                 bm.department_code, | ||||
|                 bm.department_name | ||||
|   FROM tele_saler      s, | ||||
|        tele_saler_team t, | ||||
|        idst0.bm_t      bm | ||||
|  WHERE s.team_code = t.team_code | ||||
|    AND t.department_code = bm.department_code | ||||
|    AND s.saler_code = '61136'; | ||||
| SELECT DISTINCT S.SALER_CODE, | ||||
|                 S.SALER_NAME, | ||||
|                 T.TEAM_CODE, | ||||
|                 T.TEAM, | ||||
|                 BM.DEPARTMENT_CODE, | ||||
|                 BM.DEPARTMENT_NAME | ||||
|   FROM TELE_SALER      S, | ||||
|        TELE_SALER_TEAM T, | ||||
|        IDST0.BM_T      BM | ||||
|  WHERE S.TEAM_CODE = T.TEAM_CODE | ||||
|    AND T.DEPARTMENT_CODE = BM.DEPARTMENT_CODE | ||||
|    AND S.SALER_CODE = '61136'; | ||||
|  | ||||
| SELECT * | ||||
|   FROM tele_saler_team t | ||||
|  WHERE t.team_code = '107077' | ||||
|   FROM TELE_SALER_TEAM T | ||||
|  WHERE T.TEAM_CODE = '107077' | ||||
|  | ||||
|     SELECT * | ||||
|             FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD> | ||||
| @@ -35,7 +35,7 @@ SELECT * | ||||
| 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>, | ||||
|        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> | ||||
|   FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD> | ||||
|  GROUP BY <EFBFBD><EFBFBD><EFBFBD><EFBFBD>; | ||||
| @@ -46,32 +46,59 @@ SELECT  | ||||
|        <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>), | ||||
|        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> | ||||
|   FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD> | ||||
|  GROUP BY <EFBFBD>·<EFBFBD>, | ||||
|           <EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD>, | ||||
|           <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
| HAVING <EFBFBD>·<EFBFBD> = '06<EFBFBD><EFBFBD>' | ||||
| HAVING <EFBFBD>·<EFBFBD> = '10<EFBFBD><EFBFBD>' | ||||
|  ORDER BY <EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD>, | ||||
|           <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC; | ||||
|  | ||||
| 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> | ||||
|   FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD> | ||||
|  WHERE <EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD> = 'QDI' | ||||
|    AND <EFBFBD>·<EFBFBD> = '05' | ||||
|    AND <EFBFBD>·<EFBFBD> = '10' | ||||
|    AND <EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '2023' | ||||
|  GROUP BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|  ORDER BY <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC; | ||||
|  | ||||
| --<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), | ||||
|              2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|   FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD> xb | ||||
|  WHERE xb.<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|   FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD> XB | ||||
|  WHERE XB.<EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>' | ||||
|  GROUP BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|  ORDER BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC; | ||||
| ------------------------------------- | ||||
| SELECT ZX.SALER_NAME, | ||||
|        BM.DEPARTMENT_NAME | ||||
|   FROM TELE_SALER      ZX, | ||||
|        TELE_SALER_TEAM TEAM, | ||||
|        IDST0.BM_T      BM | ||||
|  WHERE ZX.SALER_NAME = '<EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD>' | ||||
|    AND ZX.TEAM_CODE = TEAM.TEAM_CODE | ||||
|    AND TEAM.DEPARTMENT_CODE = BM.DEPARTMENT_CODE; | ||||
| ---------------------------------------- | ||||
| /* | ||||
| truncate table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>; | ||||
| */ | ||||
|  | ||||
| SELECT * | ||||
|   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>'; | ||||
|  | ||||
| SELECT * | ||||
|   FROM "BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>-24<32><34>" | ||||
|  WHERE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'; | ||||
|  | ||||
| SELECT * | ||||
|   FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>; | ||||
|  | ||||
| SELECT * | ||||
|   FROM "BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>-24<32><34>"; | ||||
|   | ||||
							
								
								
									
										14
									
								
								code/db/建表/BI机构当月个车续保率跟踪表.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								code/db/建表/BI机构当月个车续保率跟踪表.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| drop table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>; | ||||
| create table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD> | ||||
| ( | ||||
| "<EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><EFBFBD><EFBFBD>" varchar2(100), | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>ֵ1(%)" number, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-ȫ<><C8AB>" integer, | ||||
| "<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><EFBFBD>(%)" number, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>(%)" number, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)" number, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(%)" number, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(%)" number, | ||||
| "ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" integer, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" number | ||||
| ); | ||||
							
								
								
									
										15
									
								
								code/db/建表/BI电销坐席续保率统计表.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								code/db/建表/BI电销坐席续保率统计表.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| drop table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD>; | ||||
| create table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD> | ||||
| ( | ||||
| "<EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><EFBFBD><EFBFBD>" varchar2(100), | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" varchar2(30), | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>ֵ1(%)" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-ȫ<><C8AB>" integer default 0, | ||||
| "<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><EFBFBD>(%)" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>(%)" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(%)" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(%)" number default 0, | ||||
| "ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" integer default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" number | ||||
| ) | ||||
							
								
								
									
										14
									
								
								code/db/建表/BI电销坐席续保率跟踪表.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								code/db/建表/BI电销坐席续保率跟踪表.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| --drop table BI<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD>; | ||||
| create table BI<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD> | ||||
| ( | ||||
|        summary_date date default sysdate not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> varchar2(20) not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>ֵ NUMBER default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD> NUMBER default 0 not null, | ||||
|        <EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><EFBFBD> NUMBER default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ NUMBER default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD> NUMBER default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NUMBER default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NUMBER default 0 not null | ||||
| ); | ||||
| comment on table BI<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD> is '<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD>BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯȫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>'; | ||||
							
								
								
									
										14
									
								
								code/db/建表/BI电销坐席车非渗透率跟踪表.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								code/db/建表/BI电销坐席车非渗透率跟踪表.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| create table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD> | ||||
| ( | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" varchar2(100), | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" varchar2(100) not null, | ||||
| "<EFBFBD><EFBFBD><EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>(<28><>)" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><EFBFBD>" number default 0, | ||||
| "<EFBFBD>dz<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>)" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD>¿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" number default 0, | ||||
| "<EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" number default 0, | ||||
| "<EFBFBD><EFBFBD><EFBFBD>³<EFBFBD><EFBFBD>ǿ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" number default 0, | ||||
| "<EFBFBD>;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" number default 0 | ||||
| ); | ||||
							
								
								
									
										17
									
								
								code/db/建表/BI部门渗透率续保率统计表.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								code/db/建表/BI部门渗透率续保率统计表.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| drop table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD>; | ||||
| create table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD> | ||||
| ( | ||||
|        <EFBFBD><EFBFBD><EFBFBD><EFBFBD> varchar2(100)  not null, | ||||
|        "Ŀ<EFBFBD><EFBFBD>ֵ-<2D><><EFBFBD><EFBFBD>" number default 0 not null, | ||||
|        Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> number default 0 not null, | ||||
|        "<EFBFBD><EFBFBD><EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>" number default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><EFBFBD> number default 0 not null, | ||||
|        "<EFBFBD>dz<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" number default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> number default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> number default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD>¿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> number default 0 not null, | ||||
|        <EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> number default 0 not null, | ||||
|        <EFBFBD><EFBFBD><EFBFBD>³<EFBFBD><EFBFBD>ǿ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> number default 0 not null, | ||||
|        <EFBFBD>;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> number default 0 not null | ||||
| ); | ||||
| comment on table BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>Ʊ<EFBFBD> is '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>BIϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'; | ||||
							
								
								
									
										39
									
								
								code/db/建表/TWr坐席.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								code/db/建表/TWr坐席.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | ||||
| drop table twr_telsaler; | ||||
| create table twr_telsaler | ||||
| ( | ||||
|        <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD> varchar2(40), | ||||
| <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD>μӹ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD> varchar2(20), | ||||
| <EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> varchar2(20), | ||||
| <EFBFBD><EFBFBD>˾<EFBFBD><EFBFBD><EFBFBD><EFBFBD> varchar2(20), | ||||
| ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD>칫<EFBFBD><EFBFBD>ʡ  varchar2(40), | ||||
| <EFBFBD>칫<EFBFBD><EFBFBD><EFBFBD><EFBFBD> varchar2(40), | ||||
| <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD><EFBFBD>θ<EFBFBD>λ  varchar2(40), | ||||
| <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| Ƭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD>Ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD>Կڷֹ<EFBFBD>˾  varchar2(40), | ||||
| չҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD>Ƹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ  varchar2(40), | ||||
| ȫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD>  varchar2(40), | ||||
| ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD>ù<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD>ͬǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  integer, | ||||
| <EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(20), | ||||
| <EFBFBD><EFBFBD>ͬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(20), | ||||
| <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD>칫<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>  varchar2(40), | ||||
| <EFBFBD><EFBFBD>Ա״̬  varchar2(40) | ||||
| ); | ||||
							
								
								
									
										7
									
								
								code/db/建表/TWr坐席团队.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								code/db/建表/TWr坐席团队.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| drop table twr_telsaler_team; | ||||
| create table twr_telsaler_team | ||||
| ( | ||||
|        team_name varchar2(40) not null, | ||||
|        team_code varchar2(20), | ||||
|        department_code varchar2(6) not null | ||||
| ); | ||||
							
								
								
									
										17
									
								
								code/db/建表/坐席奖励表.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								code/db/建表/坐席奖励表.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| drop table telsaler_reward; | ||||
| create table telsaler_reward | ||||
| ( | ||||
|        rec_id integer not null, | ||||
|        reward_index integer not null, | ||||
|        telsaler_name varchar2(100) not null, | ||||
|        telsaler_code varchar2(20) | ||||
| ); | ||||
|  | ||||
| CREATE OR REPLACE TRIGGER telsaler_reward_id | ||||
|     BEFORE INSERT ON telsaler_reward | ||||
|     FOR EACH ROW | ||||
| BEGIN | ||||
|     SELECT desktop_archievement_seq.nextval | ||||
|       INTO :new.rec_id | ||||
|       FROM dual; | ||||
| END; | ||||
| @@ -1,18 +1,18 @@ | ||||
| drop table <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>_T; | ||||
| create global temporary table <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>_T | ||||
| drop table 车非每日保费_T; | ||||
| create global temporary table 车非每日保费_T | ||||
| ( | ||||
|   ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>     DATE not null, | ||||
|   <EFBFBD>·<EFBFBD>       VARCHAR2(10) not null, | ||||
|   <EFBFBD><EFBFBD><EFBFBD><EFBFBD>       VARCHAR2(100) not null, | ||||
|   <EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD>   varchar2(100) not null, | ||||
|   <EFBFBD><EFBFBD><EFBFBD><EFBFBD>n      VARCHAR2(100) not null, | ||||
|   <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>n     VARCHAR2(100), | ||||
|   <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>     VARCHAR2(20), | ||||
|   <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>     VARCHAR2(30), | ||||
|   <EFBFBD><EFBFBD>ϯ<EFBFBD>Ŷ<EFBFBD>     VARCHAR2(100), | ||||
|   <EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NUMBER(16,2), | ||||
|   <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>   NUMBER(16,2) | ||||
|   签单日期     DATE not null, | ||||
|   月份       VARCHAR2(10) not null, | ||||
|   部门       VARCHAR2(100) not null, | ||||
|   部门代码   varchar2(100) not null, | ||||
|   科室n      VARCHAR2(100) not null, | ||||
|   经办人n     VARCHAR2(100), | ||||
|   坐席工号     VARCHAR2(20), | ||||
|   坐席名称     VARCHAR2(30), | ||||
|   坐席团队     VARCHAR2(100), | ||||
|   车险个人客户保费 NUMBER(16,2), | ||||
|   车非融合保费   NUMBER(16,2) | ||||
| ) | ||||
| on commit preserve rows; | ||||
| -- Grant/Revoke object privileges  | ||||
| grant select, insert, delete, alter on <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>_T to DATACENTER; | ||||
| grant select, insert, delete, alter on 车非每日保费_T to DATACENTER; | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| INSERT INTO desktop_archievement_admin.<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD> | ||||
|     WITH aa AS | ||||
| --INSERT INTO desktop_archievement_admin.<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD> | ||||
| WITH aa AS | ||||
|  (SELECT to_char(t.signature_date, | ||||
|                  'yyyy-mm-dd') ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|          (to_char(T.signature_date, | ||||
| @@ -21,8 +21,7 @@ INSERT INTO desktop_archievement_admin. | ||||
|          z.department_name bm, | ||||
|          z.department_code bmdm, | ||||
|          CASE | ||||
|                  WHEN (et.telpartnercode LIKE '%HC%' OR | ||||
|                       zx.workerno IN (SELECT code | ||||
|              WHEN (et.telpartnercode LIKE '%HC%' OR zx.workerno IN (SELECT code | ||||
|                                                                       FROM datacenter.dc_lsj_zx_hc)) THEN | ||||
|               '<EFBFBD><EFBFBD><EFBFBD>ῥ' | ||||
|              ELSE | ||||
| @@ -116,9 +115,9 @@ INSERT INTO desktop_archievement_admin. | ||||
|      AND e.planned_end_date - e.inception_date >= 360 | ||||
|   --<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|   ) | ||||
|     -----<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD> | ||||
|     , | ||||
|     dd2 AS | ||||
| -----<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD> | ||||
| , | ||||
| dd2 AS | ||||
|  (SELECT ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|          the_year, | ||||
|          the_month, | ||||
| @@ -178,13 +177,13 @@ INSERT INTO desktop_archievement_admin. | ||||
|          to_number('0') <EFBFBD><EFBFBD><EFBFBD><EFBFBD> | ||||
|     FROM (SELECT DISTINCT * | ||||
|             FROM aa) aa), | ||||
|     DD AS | ||||
| DD AS | ||||
|  (SELECT * | ||||
|     FROM DD2 | ||||
|    WHERE TID IS NOT NULL) | ||||
|     --select * from dd | ||||
|     , | ||||
|     bb AS | ||||
| --select * from dd | ||||
| , | ||||
| bb AS | ||||
|  (SELECT DISTINCT q.policy_no bdh, | ||||
|                   q.endorsement_no pdh, | ||||
|                   qna.t_cre tid, | ||||
| @@ -252,9 +251,9 @@ INSERT INTO desktop_archievement_admin. | ||||
|      AND dd.tid IS NOT NULL | ||||
|   --<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD>) | ||||
|   ) | ||||
|     --SELECT * FROM BB | ||||
|     , | ||||
|     cc AS | ||||
| --SELECT * FROM BB | ||||
| , | ||||
| cc AS | ||||
|  (SELECT mm_f, | ||||
|          tid <EFBFBD>ں<EFBFBD>֤<EFBFBD><EFBFBD>, | ||||
|          COUNT(DISTINCT bdh) <EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>, | ||||
| @@ -262,15 +261,15 @@ INSERT INTO desktop_archievement_admin. | ||||
|     FROM bb | ||||
|    GROUP BY tid, | ||||
|             mm_f), | ||||
|     ff AS | ||||
| ff AS | ||||
|  (SELECT dd.*, | ||||
|          cc.* | ||||
|     FROM dd | ||||
|     LEFT JOIN cc | ||||
|       ON cc.<EFBFBD>ں<EFBFBD>֤<EFBFBD><EFBFBD> = dd.tid | ||||
|      AND cc.mm_f = dd.the_month) --OR cc.<EFBFBD>ں<EFBFBD>֤<EFBFBD><EFBFBD> = dd.btid | ||||
|     --select * from ff | ||||
|     SELECT to_date(ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
| --select * from ff | ||||
| SELECT to_date(ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                'yyyy-mm-dd') ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|        the_year <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|        the_month <EFBFBD>·<EFBFBD>, | ||||
| @@ -287,9 +286,9 @@ INSERT INTO desktop_archievement_admin. | ||||
|            0) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD> | ||||
|   FROM ff | ||||
|  WHERE to_date(ff.ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                    'yyyy-mm-dd') >= DATE '2023-01-01' | ||||
|                'yyyy-mm-dd') >= DATE '2023-06-01' | ||||
|    AND to_date(ff.ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|                    'yyyy-mm-dd') <= SYSDATE | ||||
|                'yyyy-mm-dd') < DATE '2023-07-01' | ||||
|    AND bm IN ('<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', | ||||
|               '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><EFBFBD>˾') | ||||
|  GROUP BY ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
| @@ -305,5 +304,7 @@ INSERT INTO desktop_archievement_admin. | ||||
|  ORDER BY <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, | ||||
|           <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>; | ||||
|  | ||||
| /* | ||||
| SELECT * | ||||
|   FROM desktop_archievement_admin.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>; | ||||
|   */ | ||||
|   | ||||
							
								
								
									
										259
									
								
								code/db/车非补充部分.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										259
									
								
								code/db/车非补充部分.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,259 @@ | ||||
| with aa1 as (select | ||||
|  | ||||
| to_char(t.signature_date,'yyyy-mm-dd') 签发日期 | ||||
| ,t.policy_no 保单号_车险 | ||||
| ,qt.t_cre TID | ||||
| ,qt.b_cre BTID | ||||
| ,V.PLATE_NUMBER 车牌号 | ||||
|  | ||||
| from | ||||
| idst0.auto_agreement_request_t t | ||||
| left join idst0.auto_agreement_t e on e.policy_no = t.policy_no | ||||
| left join idst0.motorised_vehicle_t v on v.policy_no = e.policy_no | ||||
| left join idst0.auto_premium_t pt on pt.policy_no = t.policy_no and pt.endorsement_no = t.endorsement_no | ||||
| left join ywglxt.w_dxbd_i i on e.policy_no = i.bdh | ||||
| left join idst0.rydm_t xx on xx.staff_code = nvl(i.zhjywy,e.operator_code) | ||||
| left join idst0.ks_t y on y.section_office_code = nvl(xx.section_office_code,e.section_office_code) | ||||
| left join idst0.bm_t z on z.department_code = nvl(xx.department_code,e.department_code) | ||||
| --left join ywglxt.q_auto_agreement _extend_t qe on qe.policy_no = e.policy_no | ||||
| left join ywglxt.q_auto_agreement_t qt on qt.policy_no = e.policy_no | ||||
| left join dc_tb_jc_c_tag cl  on cl.保单号 = e.policy_no | ||||
| --left join dc_yangg_basecode_teams fg on fg.bm = z.department_name and fg.ks = y.section_office_name | ||||
| left join idst0.auto_agreement_extend_t et on et.policy_no = e.policy_no | ||||
| left join idst0.t_sell_policy_autobase_t zx on zx.policy_no = e.policy_no | ||||
|  | ||||
| left join dc_YZH_ZXYS YS ON YS.坐席工号= nvl(zx.workerno,et.telpartnercode) | ||||
| where | ||||
| t.signature_date  >= sysdate-365 | ||||
| AND t.signature_date  < sysdate+90 | ||||
| and e.policy_status = '1'  --条件:保单有效 | ||||
| --AND V.PLATE_NUMBER='LVHRM1810F5024561' | ||||
| and qt.tflag = '0'   --条件:类型为个人 | ||||
| --AND qt.t_cre='440881198901110216' | ||||
| and t.endorsement_no='无' | ||||
| and qt.usage_xm = '家庭自用车' | ||||
| and e.planned_end_date - e.inception_date  >= 360   --条件:保单周期 | ||||
| and et.LICENSEOWNERCERTIFICATETYPE not in ('17','15','13') | ||||
|  | ||||
| ) | ||||
|  | ||||
| ,DD2 AS | ||||
| (SELECT AA1.签发日期,AA1.TID 证件号,AA1.保单号_车险  FROM AA1  | ||||
| union | ||||
| SELECT  AA1.签发日期,AA1.BTID 证件号,AA1.保单号_车险 FROM AA1 ) | ||||
|  | ||||
| --select * from dd2 | ||||
| ,dd3 AS (SELECT  DISTINCT DD2.证件号,dd2.保单号_车险,   | ||||
| case when DD2.证件号 is not null then row_number() over (partition by DD2.证件号 order by DD2.签发日期 desc)  else 1 end Crow_no1  FROM DD2   ) | ||||
| ,dd4 AS (SELECT  DISTINCT AA1.车牌号,AA1.保单号_车险,   | ||||
| case when AA1.车牌号 is not null then row_number() over (partition by AA1.车牌号 order by AA1.签发日期 desc)  else 1 end Crow_no2 FROM aa1 ) | ||||
| --,dd as ( | ||||
| --select dd2.* | ||||
| --,case when DD2.TID is not null then row_number() over (partition by DD2.TID order by DD2.签单日期 desc)  else 1 end Crow_no | ||||
| --from dd2) | ||||
| ,dd5 AS (SELECT DD3.证件号,dd3.保单号_车险 from dd3 where dd3.Crow_no1='1') | ||||
| ,dd6 AS (SELECT DD4.车牌号,dd4.保单号_车险 from dd4 where dd4.Crow_no2='1') | ||||
|  | ||||
| ,bb as ( | ||||
| select | ||||
| '非车' 条线名称 | ||||
| ,to_char(q.signature_date,'yyyy-mm-dd') 签发日期 | ||||
| ,nvl(dd5.保单号_车险,dd6.保单号_车险) 保单号_车险 | ||||
| ,q.policy_no 保单号_非车 | ||||
| --,q.endorsement_no pdh | ||||
| ,qna.t_cre tid | ||||
| ,qna.B_cre Btid | ||||
| ,(case when nvl(dd5.保单号_车险,dd6.保单号_车险)IS NOT NULL THEN '是'  else  '' end )是否分公司融合 | ||||
| --,''    客户数_分公司 | ||||
| --,qna.tbrmc 投保人名称 | ||||
| ,JYX.LICENSE_PLATE_NO 车牌号 | ||||
| ,round((pt.premium_amount-nvl(pt.taxamount,0))*c.rate/100,2) 车险签发保费 | ||||
| ,x.staff_name 经办姓名 | ||||
| ,X.STAFF_CODE 经办代码 | ||||
| ,y.section_office_name 科室名称 | ||||
| ,z.department_name 部门 | ||||
| ,(case when nvl(zx.workerno,et.telpartnercode) = 'DX001' and x.staff_name like '%建发凯迪%' then '林伟华' | ||||
| when nvl(zx.workerno,et.telpartnercode) = 'DX001' and x.staff_name not like '%建发凯迪%' then '其他' | ||||
|   when  x.staff_name like '%建发汽车续保%'  then '林伟华' | ||||
|       when  x.staff_name like '%建发凯通泰成续保%' and e.planned_end_date < to_date('2023-09-30 00:00:00', 'yyyy-mm-dd hh24:mi:ss') then '李定定' | ||||
|          when  x.staff_name like '%建发凯通泰成续保%'  then '周阳' | ||||
| else to_char(ys.坐席姓名) END) 坐席名称 | ||||
| ,nvl(zx.workerno,et.telpartnercode) 坐席代码 | ||||
| ,YS.团队 坐席团队 | ||||
| ,cl.管理渠道21版 管理渠道 | ||||
| ,cl.新转续 ntr | ||||
| ,(select AUTO_NAME from idst0.auto_store_t where auto_code = qna.AGENT_CODE) dldmc | ||||
| ,(case when gk.product_name like '%驾乘%' or gk.product_code in('23XZ9800','23YZ9800') THEN '1' ELSE '' END) 是否驾乘 | ||||
| ,'' 车商代码 | ||||
| ,'' 品牌 | ||||
| ,qna.life_salesperson 寿险代码 | ||||
| ,nvl(ca.plan_name,ra.plan_name) 产品方案名称 | ||||
| ,E.INCEPTION_DATE 起保日期 | ||||
| --,QNA.PRODUCT_CODE 险种代码 | ||||
| FROM | ||||
| idst0.nonauto_agreement_request_t q | ||||
| left join idst0.nonauto_agreement_t e on e.policy_no = q.policy_no | ||||
| left join idst0.nonauto_premium_t pt on pt.endorsement_no = q.endorsement_no and pt.policy_no = q.policy_no | ||||
| --left join idst0.reinsurance_t r on r.reinsurance_policy_no = e.policy_no | ||||
| left join idst0.exrate_month_t c on pt.currency_code = c.bzh | ||||
|      and to_char(q.signature_date,'YYYY') = c.theyear and to_char(q.signature_date,'fmmm') = c.themonth | ||||
| left join idst0.rydm_t x on x.staff_code = e.operator_code | ||||
| left join idst0.ks_t y on y.section_office_code = x.section_office_code | ||||
| left join idst0.bm_t z on z.department_code = x.department_code | ||||
| left join ywglxt.q_nonauto_agreement_t qna on qna.policy_no = q.policy_no | ||||
| left join dc_yangg_gkxzh gk on gk.product_code = e.product_code --分散型险种 | ||||
| left join dd5 on dd5.证件号 = qna.t_cre | ||||
| left join  IDst0.nonauto_vehicle_info_t JYX ON JYX.POLICY_NO=q.policy_no | ||||
| left join dd6 on dd6.车牌号 = JYX.LICENSE_PLATE_NO | ||||
| left join idst0.auto_agreement_extend_t et on et.policy_no = e.policy_no | ||||
| left join idst0.T_SELL_POLICY_PROPERTY_INFO_T zx on zx.policy_no = e.policy_no | ||||
| left join dc_YZH_ZXYS YS ON YS.坐席工号= nvl(zx.workerno,et.telpartnercode) | ||||
| left join dc_tb_jc_c_tag cl  on cl.保单号 = nvl(dd5.保单号_车险,dd6.保单号_车险)  | ||||
| left join idst0.ryx_agreement_t ra on ra.policy_no = e.policy_no | ||||
| left join idst0.cibs_agreement_t ca on ca.policy_no = e.policy_no | ||||
| --left join (SELECT CX.POLICY_NO,CX.LIFE_SALESPERSON,CX.VEHICLE_BRAND FROM ywglxt.q_Auto_Agreement_t CX) cx on cx.policy_no=rmi.保单号_车险 | ||||
| --left join ywglxt.v_xzh xzh on xzh.product_code = e.product_code | ||||
| --left join ywglxt.q_auto_agreement_t qtt  on qtt.plate_number = JYX.LICENSE_PLATE_NO 剔除车非不是家用车 | ||||
| where | ||||
| qna.tflag = '0' | ||||
| and (case when q.endorsement_no !='无' and round((pt.premium_amount-nvl(pt.taxamount,0))*c.rate/100,2) !=0 then '是' end) is null | ||||
| --and q.endorsement_no = '无' | ||||
| and nvl(dd5.证件号,dd6.车牌号) is not null | ||||
| and q.signature_date  >= sysdate-5 | ||||
| AND q.signature_date  < sysdate | ||||
| --AND qna.t_cre='350623198706075199' | ||||
| --and (case when JYX.LICENSE_PLATE_NO is not null  and  qtt.usage_xm='家庭自用车' then '是' when JYX.LICENSE_PLATE_NO is null  then  '是' end )IS NOT NULL 剔除车非不是家用车 | ||||
| and e.policy_status = '1' | ||||
| and gk.product_code is not null | ||||
| and (e.product_code like '2%' or e.product_code like '1106%'  --意健 --责任 | ||||
| or e.product_code like '1107%' or e.product_code like '1108%' or e.product_code like '1307%' or e.product_code like '1304A400%' --家财 | ||||
| ) | ||||
| --AND  qna.policy_no='AXIMQDI30V23FP0062SH' | ||||
| ) | ||||
|  | ||||
| ,BB3 AS (SELECT bb.tid ,COUNT(*) 次数 from bb group by bb.tid ) | ||||
|  | ||||
| ,bb2 as ( | ||||
| select bb.* | ||||
| ,case when bb.是否驾乘 ='1'  then row_number() over (partition by bb.tid,bb.是否驾乘 order by bb.签发日期 desc)  else 1 end JCrow_no | ||||
| ,case when bb.tid  IS not NULL   then row_number() over (partition by bb.tid  order by bb.签发日期 desc)  else 1 end CFrow_no | ||||
| ,BB3.次数 | ||||
| from BB | ||||
| LEFT JOIN BB3 ON BB3.tid =bb.tid | ||||
| ) | ||||
|   | ||||
| ,BB4 AS(select bb2.*  | ||||
| ,(CASE when bb2.次数='1' THEN '1' | ||||
|       WHEN bb2.次数 = '2' and BB2.是否驾乘 ='1' and jcROW_NO ='1' then '1'  | ||||
|      -- WHEN bb2.次数 = '2' and BB2.是否驾乘 is null  and CFROW_NO ='2' then '0'  | ||||
|       WHEN bb2.次数 = '2' and BB2.是否驾乘 is null  and CFROW_NO ='1' then '1'  | ||||
|       WHEN bb2.次数 > '2' AND cfROW_NO ='1' then '1'  --BB2.是否驾乘 ='1' and | ||||
|      -- WHEN bb2.次数 > '2' AND BB2.是否驾乘 IS NULL  THEN '1'--AND CFROW_NO ='1' | ||||
|       ELSE '0' END ) 客户数 | ||||
| from bb2) | ||||
|  | ||||
| /*,ff AS( | ||||
| SELECT  | ||||
| to_char(rmi.签发日期,'yyyy-mm-dd') 签发日期 | ||||
| ,RMI.保单号_车险 | ||||
| ,rmi.保单号_非车 | ||||
| ,rmi.车险签发保费 | ||||
| ,RMI.条线名称 | ||||
| ,RMI.是否分公司融合 | ||||
| ,RMI.客户数_分公司 | ||||
| ,cl.经办姓名 | ||||
| ,CL.科室名称 | ||||
| ,CL.部门 | ||||
| ,(case when nvl(zx.workerno,et.telpartnercode) = 'DX001' and cl.经办姓名 like '%建发凯迪%' then '林伟华' | ||||
| when nvl(zx.workerno,et.telpartnercode) = 'DX001' and cl.经办姓名 not like '%建发凯迪%' then '其他' | ||||
| else to_char(ys.坐席姓名) END) 坐席名称 | ||||
| ,YS.团队 坐席团队 | ||||
| ,cl.管理渠道21版 管理渠道 | ||||
| ,cl.新转续 ntr | ||||
| ,(select AUTO_NAME from idst0.auto_store_t where auto_code = nvl(e.selling_shop_code,e.tel_sale_4s_code)) dldmc | ||||
| FROM DC_CF_RMI rmi | ||||
| left join idst0.auto_agreement_t e on e.policy_no = rmi.保单号_车险 | ||||
| left join dc_tb_jc_c_tag cl  on cl.保单号 = e.policy_no | ||||
| --left join dc_yangg_basecode_teams fg on fg.bm = z.department_name and fg.ks = y.section_office_name | ||||
| left join idst0.auto_agreement_extend_t et on et.policy_no = e.policy_no | ||||
| left join idst0.t_sell_policy_autobase_t zx on zx.policy_no = e.policy_no | ||||
| left join dc_YZH_ZXYS YS ON YS.坐席工号= nvl(zx.workerno,et.telpartnercode))*/ | ||||
|  | ||||
| ,aa as (select | ||||
| '车险' 条线名称 | ||||
| ,to_char(t.signature_date,'yyyy-mm-dd') 签发日期 | ||||
| ,t.policy_no  保单号_车险 | ||||
| --,t.endorsement_no pdh | ||||
| ,'' 保单号_非车 | ||||
| ,'' 是否分公司融合 | ||||
| ,(case when qt.bd_type in ('1','2') THEN '1'   | ||||
|         when qt.bd_type = '3' and qt.xzh_xm='商业险' then '1' ELSE '0'END )客户数_分公司 | ||||
| --,decode(qT.bd_type,'1','单交强','2','单商业','3','交商共保','其它') 保单类型 | ||||
| ,qt.t_cre TID | ||||
| ,qt.b_cre BTID | ||||
| --,QT.TBRMC 投保人名称 | ||||
| ,V.PLATE_NUMBER 车牌号 | ||||
| ,pt.premium_amount - nvl(pt.tax_amount,0) 车险签发保费 | ||||
| ,xx.staff_name 经办姓名 | ||||
| ,XX.STAFF_CODE 经办代码 | ||||
| ,y.section_office_name 科室名称 | ||||
| ,z.department_name 部门 | ||||
| ,(case when nvl(zx.workerno,et.telpartnercode) = 'DX001' and xx.staff_name like '%建发凯迪%' then '林伟华' | ||||
| when nvl(zx.workerno,et.telpartnercode) = 'DX001' and xx.staff_name not like '%建发凯迪%' then '其他' | ||||
|           when  xx.staff_name like '%建发汽车续保%'  then '林伟华' | ||||
|       when  xx.staff_name like '%建发凯通泰成续保%' and e.planned_end_date < to_date('2023-09-30 00:00:00', 'yyyy-mm-dd hh24:mi:ss') then '李定定' | ||||
|          when  xx.staff_name like '%建发凯通泰成续保%'  then '周阳' | ||||
| else to_char(ys.坐席姓名) END) 坐席名称 | ||||
| ,nvl(zx.workerno,et.telpartnercode) 坐席代码 | ||||
| ,YS.团队 坐席团队 | ||||
| ,cl.管理渠道21版 管理渠道 | ||||
| ,cl.新转续 ntr | ||||
| ,(select AUTO_NAME from idst0.auto_store_t where auto_code = nvl(e.selling_shop_code,e.tel_sale_4s_code)) dldmc | ||||
| ,e.selling_shop_code 车商代码 | ||||
| ,qt.life_salesperson 寿险代码 | ||||
| ,QT.VEHICLE_BRAND 品牌 | ||||
| ,'' 产品方案名称 | ||||
| ,E.INCEPTION_DATE 起保日期 | ||||
| --,QT.PRODUCT_CODE 险种代码 | ||||
| from | ||||
| idst0.auto_agreement_request_t t | ||||
| left join idst0.auto_agreement_t e on e.policy_no = t.policy_no | ||||
| left join idst0.motorised_vehicle_t v on v.policy_no = e.policy_no | ||||
| left join idst0.auto_premium_t pt on pt.policy_no = t.policy_no and pt.endorsement_no = t.endorsement_no | ||||
| left join ywglxt.w_dxbd_i i on e.policy_no = i.bdh | ||||
| left join idst0.rydm_t xx on xx.staff_code = nvl(i.zhjywy,e.operator_code) | ||||
| left join idst0.ks_t y on y.section_office_code = nvl(xx.section_office_code,e.section_office_code) | ||||
| left join idst0.bm_t z on z.department_code = nvl(xx.department_code,e.department_code) | ||||
| --left join ywglxt.q_auto_agreement _extend_t qe on qe.policy_no = e.policy_no | ||||
| left join ywglxt.q_auto_agreement_t qt on qt.policy_no = e.policy_no | ||||
| left join dc_tb_jc_c_tag cl  on cl.保单号 = e.policy_no | ||||
| --left join dc_yangg_basecode_teams fg on fg.bm = z.department_name and fg.ks = y.section_office_name | ||||
| left join idst0.auto_agreement_extend_t et on et.policy_no = e.policy_no | ||||
| left join idst0.t_sell_policy_autobase_t zx on zx.policy_no = e.policy_no | ||||
| left join dc_YZH_ZXYS YS ON YS.坐席工号= nvl(zx.workerno,et.telpartnercode) | ||||
| where | ||||
| t.signature_date  >= sysdate-5 | ||||
| AND t.signature_date  < sysdate | ||||
| AND e.policy_status = '1'  --条件:保单有效 | ||||
| --AND qt.t_cre='350623198706075199' | ||||
| and qt.tflag = '0'   --条件:类型为个人 | ||||
| and t.endorsement_no='无' | ||||
| and qt.usage_xm = '家庭自用车' | ||||
| and e.planned_end_date - e.inception_date  >= 360   --条件:保单周期 | ||||
| and et.LICENSEOWNERCERTIFICATETYPE not in ('17','15','13') | ||||
| --AND e.policy_no='AXIMC01Y2023B015820W' | ||||
| ) | ||||
|  | ||||
|  | ||||
| select "签发日期","保单号_车险","保单号_非车","条线名称","是否分公司融合","客户数","车险签发保费","经办姓名","经办代码","科室名称","部门","坐席名称","坐席代码","坐席团队","管理渠道","NTR","DLDMC","车商代码","寿险代码","品牌","产品方案名称","起保日期","车牌号" | ||||
|  from bb4 | ||||
| UNION | ||||
| select "签发日期","保单号_车险","保单号_非车","条线名称","是否分公司融合","客户数_分公司","车险签发保费","经办姓名","经办代码","科室名称","部门","坐席名称","坐席代码","坐席团队","管理渠道","NTR","DLDMC","车商代码","寿险代码","品牌","产品方案名称","起保日期","车牌号" | ||||
| from AA | ||||
| --UNION | ||||
| --Select "签发日期","保单号_车险","保单号_非车","条线名称","是否分公司融合","客户数_分公司","车险签发保费","经办姓名","科室名称","部门","坐席名称","坐席团队","管理渠道","NTR","DLDMC" | ||||
| --from ff | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @@ -7,7 +7,44 @@ | ||||
|  #  | ||||
|  # Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
| ###  | ||||
| NODE_ENV = 'development' | ||||
| NODE_ENV='development' | ||||
| VITE_URL_VALIDATE_ACCOUNT="http://222.76.244.118:11101/desktop_archievement_backend/account/query_staff_info.do" | ||||
| VITE_URL_LOGIN = "http://222.76.244.118:11101/admin-system/account/p13_account_check" | ||||
| VITE_URL_LOGIN="http://222.76.244.118:11101/admin-system/account/p13_account_check" | ||||
| VITE_URL_DEPARTMENT_ARCHIEVEMENT="http://222.76.244.118:11101/desktop_archievement_backend/archievement/query_department_archievement.do" | ||||
|  | ||||
| ### URL相关 ########## | ||||
| #登录 | ||||
| VITE_URL_LOGIN="http://222.76.244.118:11101/admin-system/account/p13_account_check" | ||||
| VITE_URL_LOGIN_CALLER="http://222.76.244.118:11101/desktop_archievement_backend/account/query_telsaler_info.do" | ||||
|  | ||||
| #部门业绩查询 | ||||
| VITE_URL_DEPARTMENT_ARCHIEVEMENT="http://222.76.244.118:11101/desktop_archievement_backend/archievement/query_department_archievement.do" | ||||
| #坐席业绩查询 | ||||
| VITE_URL_CALLER_ARCHIEVEMENT="http://222.76.244.118:11101/desktop_archievement_backend/archievement/query_caller_archievement.do" | ||||
|  | ||||
| #排行榜 | ||||
| VITE_URL_RANKINGLIST="http://222.76.244.118:11101/desktop_archievement_backend/archievement/query_ranking_list.do" | ||||
|  | ||||
|  | ||||
| ## 奖项相关 ## | ||||
| ## 查询奖励项目 | ||||
| VITE_URL_RWARD_PROJECTS="http://222.76.244.118:11101/desktop_archievement_backend/rewards/query_reward_projects.do" | ||||
| ## 查询获奖人员 | ||||
| VITE_URL_REWARD_GAINERS="http://222.76.244.118:11101/desktop_archievement_backend/rewards/query_reward_gainers.do" | ||||
| ## 添加获奖人员 | ||||
| VITE_URL_ADD_REWARD_TELSALER="http://222.76.244.118:11101/desktop_archievement_backend/rewards/add_telsaler_reward.do" | ||||
| ## 更新获奖人员 | ||||
| VITE_URL_UPDATE_REWARD_TELSALER="http://222.76.244.118:11101/desktop_archievement_backend/rewards/update_telsaler_reward.do" | ||||
| ## 删除获奖人员 | ||||
| VITE_URL_DEL_REWARD_TELSALER="http://222.76.244.118:11101/desktop_archievement_backend/rewards/delete_telsaler_reward.do" | ||||
|  | ||||
| ## 上传文件 | ||||
| VITE_URL_UPLOAD_FILE="http://222.76.244.118:11101/desktop_archievement_backend/file/file-upload.do" | ||||
| ## 导入报表 | ||||
| VITE_URL_IMPORT_REPORT="http://222.76.244.118:11101/desktop_archievement_backend/import_bi_data/excel.do" | ||||
|  | ||||
| ## 请求BI报表数据 | ||||
| VITE_URL_BI_TELSALER_ATTACHINGRATE="http://222.76.244.118:11101/desktop_archievement_backend/archievement/bi_telsaler_attachingrate.do" | ||||
| VITE_URL_BI_TELSALER_RENEWALRATE="http://222.76.244.118:11101/desktop_archievement_backend/archievement/bi_telsaler_renewalrate.do" | ||||
| VITE_URL_BI_DEPARTMENT_ATTACHINGRATE="http://222.76.244.118:11101/desktop_archievement_backend/archievement/bi_department_attachingrate.do" | ||||
| VITE_URL_BI_DEPARTMENT_RENEWALRATE="http://222.76.244.118:11101/desktop_archievement_backend/archievement/bi_department_renewalrate.do" | ||||
							
								
								
									
										49
									
								
								code/web/task_schedule/.env.production
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								code/web/task_schedule/.env.production
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,49 @@ | ||||
| ### | ||||
|  # @Author: Kane | ||||
|  # @Date: 2023-03-14 23:46:12 | ||||
|  # @LastEditors: Kane | ||||
|  # @FilePath: /task_schedule/.env.production | ||||
|  # @Description:  | ||||
|  #  | ||||
|  # Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
| ###  | ||||
| VITE_URL_VALIDATE_ACCOUNT="http://10.39.0.61:8081/desktop_archievement_backend/account/query_staff_info.do" | ||||
| VITE_URL_LOGIN="http://10.39.0.61:8081/admin-system/account/p13_account_check" | ||||
| VITE_URL_DEPARTMENT_ARCHIEVEMENT="http://10.39.0.61:8081/desktop_archievement_backend/archievement/query_department_archievement.do" | ||||
|  | ||||
| ### URL相关 ########## | ||||
| #登录 | ||||
| VITE_URL_LOGIN="http://10.39.0.61:8081/admin-system/account/p13_account_check" | ||||
| VITE_URL_LOGIN_CALLER="http://10.39.0.61:8081/desktop_archievement_backend/account/query_telsaler_info.do" | ||||
|  | ||||
| #部门业绩查询 | ||||
| VITE_URL_DEPARTMENT_ARCHIEVEMENT="http://10.39.0.61:8081/desktop_archievement_backend/archievement/query_department_archievement.do" | ||||
| #坐席业绩查询 | ||||
| VITE_URL_CALLER_ARCHIEVEMENT="http://10.39.0.61:8081/desktop_archievement_backend/archievement/query_caller_archievement.do" | ||||
|  | ||||
| #排行榜 | ||||
| VITE_URL_RANKINGLIST="http://10.39.0.61:8081/desktop_archievement_backend/archievement/query_ranking_list.do" | ||||
|  | ||||
|  | ||||
| ## 奖项相关 ## | ||||
| ## 查询奖励项目 | ||||
| VITE_URL_RWARD_PROJECTS="http://10.39.0.61:8081/desktop_archievement_backend/rewards/query_reward_projects.do" | ||||
| ## 查询获奖人员 | ||||
| VITE_URL_REWARD_GAINERS="http://10.39.0.61:8081/desktop_archievement_backend/rewards/query_reward_gainers.do" | ||||
| ## 添加获奖人员 | ||||
| VITE_URL_ADD_REWARD_TELSALER="http://10.39.0.61:8081/desktop_archievement_backend/rewards/add_telsaler_reward.do" | ||||
| ## 更新获奖人员 | ||||
| VITE_URL_UPDATE_REWARD_TELSALER="http://10.39.0.61:8081/desktop_archievement_backend/rewards/update_telsaler_reward.do" | ||||
| ## 删除获奖人员 | ||||
| VITE_URL_DEL_REWARD_TELSALER="http://10.39.0.61:8081/desktop_archievement_backend/rewards/delete_telsaler_reward.do" | ||||
|  | ||||
| ## 上传文件 | ||||
| VITE_URL_UPLOAD_FILE="http://10.39.0.61:8081/desktop_archievement_backend/file/file-upload.do" | ||||
| ## 导入报表 | ||||
| VITE_URL_IMPORT_REPORT="http://10.39.0.61:8081/desktop_archievement_backend/import_bi_data/excel.do" | ||||
|  | ||||
| ## 请求BI报表数据 | ||||
| VITE_URL_BI_TELSALER_ATTACHINGRATE="http://10.39.0.61:8081/desktop_archievement_backend/archievement/bi_telsaler_attachingrate.do" | ||||
| VITE_URL_BI_TELSALER_RENEWALRATE="http://10.39.0.61:8081/desktop_archievement_backend/archievement/bi_telsaler_renewalrate.do" | ||||
| VITE_URL_BI_DEPARTMENT_ATTACHINGRATE="http://10.39.0.61:8081/desktop_archievement_backend/archievement/bi_department_attachingrate.do" | ||||
| VITE_URL_BI_DEPARTMENT_RENEWALRATE="http://10.39.0.61:8081/desktop_archievement_backend/archievement/bi_department_renewalrate.do" | ||||
| @@ -67,6 +67,8 @@ module.exports = { | ||||
|                     js: "espree", | ||||
|                     "<template>": "espree", | ||||
|                 }, | ||||
|                 project: "./tsconfig.json", | ||||
|                 extraFileExtensions: [".vue",], | ||||
|             }, | ||||
|             plugins: ["eslint-plugin-vue",], | ||||
|             extends: [ | ||||
| @@ -79,13 +81,14 @@ module.exports = { | ||||
|             ], | ||||
|             rules: { | ||||
|                 indent: ["warn", 4,], | ||||
|                 "no-trailing-spaces": ["error", {"ignoreComments": true,},], | ||||
|                 // 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格 | ||||
|                 "space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },], | ||||
|                 "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", | ||||
|                 "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", | ||||
|                 "no-unused-vars": "warn", | ||||
|                 semi: ["error", "always",], // 控制行尾部分号 | ||||
|                 quotes: ["error", "double",], | ||||
|                 "semi-spacing": ["error", {"before": false, "after": true,},], // 控制行尾部分号 | ||||
|                 "quotes": ["error", "double",], | ||||
|                 "comma-dangle": ["error", { | ||||
|                     arrays: "always", | ||||
|                     objects: "always", | ||||
| @@ -109,6 +112,8 @@ module.exports = { | ||||
|                 "vue/html-indent": ["error", 4,], | ||||
|                 // typescript | ||||
|                 "@typescript-eslint/indent": ["warn", 4,], | ||||
|                 "@typescript-eslint/no-explicit-any": "warn", | ||||
|                 "@typescript-eslint/no-unsafe-argument": "warn", | ||||
|                 "@typescript-eslint/no-extra-semi": "off", | ||||
|                 "@typescript-eslint/no-inferrable-types": "off", | ||||
|                 "@typescript-eslint/no-unused-vars": "warn", | ||||
| @@ -149,10 +154,13 @@ module.exports = { | ||||
|                 "plugin:@typescript-eslint/recommended", | ||||
|             ], | ||||
|             rules: { | ||||
|                 "no-trailing-spaces": ["error", {"ignoreComments": true,},], | ||||
|                 // 圆括号中的空格,为空不加空格,紧跟花括号、方括号、圆括号时也不加入空格 | ||||
|                 "space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },], | ||||
|                 "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", | ||||
|                 "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", | ||||
|                 "@typescript-eslint/no-explicit-any": "off", | ||||
|                 "@typescript-eslint/no-unsafe-argument": "warn", | ||||
|                 "@typescript-eslint/indent": ["error", 4,], | ||||
|                 "@typescript-eslint/no-extra-semi": "off", | ||||
|                 "@typescript-eslint/no-inferrable-types": "off", | ||||
| @@ -188,6 +196,7 @@ module.exports = { | ||||
|                 "prefer-const": "warn", | ||||
|                 "spaced-comment": "error", | ||||
|                 "space-before-function-paren": "off", | ||||
|                 "semi-spacing": ["error", {"before": false, "after": true,},], | ||||
|             }, | ||||
|         }, | ||||
|     ], | ||||
|   | ||||
							
								
								
									
										17
									
								
								code/web/task_schedule/pack.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								code/web/task_schedule/pack.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| npm uninstall ` | ||||
| @babel/eslint-parser ` | ||||
| @rushstack/eslint-patch ` | ||||
| @typescript-eslint/eslint-plugin ` | ||||
| @vitejs/plugin-vue ` | ||||
| @vue/cli-plugin-eslint ` | ||||
| @vue/eslint-config-typescript ` | ||||
| babel ` | ||||
| eslint-config-recommended ` | ||||
| eslint-config-standard-with-typescript ` | ||||
| eslint-plugin-vue ` | ||||
| node-sass ` | ||||
| sass ` | ||||
| sass-loader ` | ||||
| style-loader ` | ||||
| ts-node ` | ||||
| vue-eslint-parser | ||||
							
								
								
									
										40
									
								
								code/web/task_schedule/package copy.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								code/web/task_schedule/package copy.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | ||||
| { | ||||
|   "name": "task_schedule", | ||||
|   "private": true, | ||||
|   "version": "0.0.0", | ||||
|   "type": "module", | ||||
|   "scripts": { | ||||
|     "dev": "vite", | ||||
|     "build": "vite build", | ||||
|     "preview": "vite preview" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@element-plus/icons-vue": "^2.3.1", | ||||
|     "echarts": "^5.4.3", | ||||
|     "element-plus": "^2.5.3", | ||||
|     "mitt": "^3.0.1", | ||||
|     "moment": "^2.30.1", | ||||
|     "vue": "^3.4.15", | ||||
|     "vue-router": "^4.2.5", | ||||
|     "vuex": "^4.1.0" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@babel/eslint-parser": "^7.23.3", | ||||
|     "@rushstack/eslint-patch": "^1.7.1", | ||||
|     "@typescript-eslint/eslint-plugin": "^6.19.1", | ||||
|     "@vitejs/plugin-vue": "^5.0.3", | ||||
|     "@vue/cli-plugin-eslint": "^5.0.8", | ||||
|     "@vue/eslint-config-typescript": "^12.0.0", | ||||
|     "axios": "^1.6.6", | ||||
|     "babel": "^6.23.0", | ||||
|     "eslint-config-recommended": "^4.1.0", | ||||
|     "eslint-config-standard-with-typescript": "^43.0.1", | ||||
|     "eslint-plugin-vue": "^9.20.1", | ||||
|     "node-sass": "^9.0.0", | ||||
|     "sass": "^1.70.0", | ||||
|     "sass-loader": "^14.0.0", | ||||
|     "style-loader": "^3.3.4", | ||||
|     "ts-node": "^10.9.2", | ||||
|     "vue-eslint-parser": "^9.4.2" | ||||
|   } | ||||
| } | ||||
							
								
								
									
										12224
									
								
								code/web/task_schedule/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										12224
									
								
								code/web/task_schedule/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -9,31 +9,22 @@ | ||||
|     "preview": "vite preview" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|         "@babel/eslint-parser": "^7.22.7", | ||||
|         "@element-plus/icons-vue": "^2.1.0", | ||||
|         "axios": "^1.4.0", | ||||
|         "babel": "^6.23.0", | ||||
|         "echarts": "^5.4.2", | ||||
|         "element-plus": "^2.3.7", | ||||
|         "moment": "^2.29.4", | ||||
|         "sass-loader": "^13.3.2", | ||||
|         "vue": "^3.3.4", | ||||
|         "vue-router": "^4.2.4", | ||||
|     "@element-plus/icons-vue": "^2.3.2", | ||||
|     "axios": "^1.11.0", | ||||
|     "echarts": "^6.0.0", | ||||
|     "element-plus": "^2.11.1", | ||||
|     "mitt": "^3.0.1", | ||||
|     "moment": "^2.30.1", | ||||
|     "task_schedule": "file:", | ||||
|     "vue": "^3.5.21", | ||||
|     "vue-router": "^4.5.1", | ||||
|     "vuex": "^4.1.0" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|         "@babel/eslint-parser": "^7.22.7", | ||||
|         "@typescript-eslint/eslint-plugin": "^5.61.0", | ||||
|         "@typescript-eslint/parser": "^5.61.0", | ||||
|         "@vitejs/plugin-vue": "^4.2.3", | ||||
|         "@vue/cli-plugin-eslint": "^5.0.8", | ||||
|     "@vitejs/plugin-vue": "^6.0.1", | ||||
|     "eslint-config-recommended": "^4.1.0", | ||||
|         "eslint-config-standard-with-typescript": "^36.0.0", | ||||
|         "eslint-plugin-vue": "^9.15.1", | ||||
|         "node-sass": "^9.0.0", | ||||
|         "sass": "^1.63.6", | ||||
|         "style-loader": "^3.3.3", | ||||
|         "typescript": "^5.1.6", | ||||
|         "vue-eslint-parser": "^9.3.1" | ||||
|     "eslint-config-standard-with-typescript": "^43.0.1", | ||||
|     "eslint-plugin-vue": "^10.4.0", | ||||
|     "ts-node": "^10.9.2" | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-02-15 09:25:52 | ||||
|  * @LastEditors: Kane | ||||
|  * @LastEditTime: 2023-03-17 14:31:14 | ||||
|  * @LastEditTime: 2023-08-25 10:53:30 | ||||
|  * @FilePath: /task_schedule/src/App.vue | ||||
|  * @Description: | ||||
|  * 应用的框架: | ||||
| @@ -17,7 +17,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script lang="ts"> | ||||
| import zhCn from "element-plus/lib/locale/lang/zh-cn"; // element-plus语言组件 | ||||
| import zhCn from "element-plus/es/locale/lang/zh-cn"; // element-plus语言组件 | ||||
|  | ||||
| export default { | ||||
|     name: "App", | ||||
|   | ||||
| @@ -2,18 +2,28 @@ | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-02-28 19:25:30 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/assets/css/public/global.scss | ||||
|  * @FilePath: /task_schedule/src/assets/css/public/variables.scss | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
|  | ||||
| // color | ||||
| /* | ||||
| $color-bg-01: #fecb96; | ||||
| $color-bg-02: #f7954e; | ||||
| $color-bg-03: #f27620; | ||||
| $color-bg-04: #da3703; | ||||
| $color-bg-05: #ba1800; | ||||
| */ | ||||
|  | ||||
| $color-bg-01: #00b2f8; | ||||
| $color-bg-02: #00b0fb; | ||||
| $color-bg-03: #0279ea; | ||||
| $color-bg-04: #046ed6; | ||||
| $color-bg-05: #033eb6; | ||||
|  | ||||
| $color-title-font: #046ed6; | ||||
|  | ||||
| $color-charts-bg: #ffffff9f; | ||||
| $color-honorlist-bg: rgba(255, 255, 255, 0.3); | ||||
|   | ||||
| @@ -29,11 +29,13 @@ export default { | ||||
|     setup( props ) | ||||
|     { | ||||
|         const ui = reactive({ | ||||
|             mensualList: [], | ||||
|         }); | ||||
|  | ||||
|         // 设置图表 | ||||
|         const initCharts = () => | ||||
|         const initCharts = (): void => | ||||
|         { | ||||
|             console.log( "每月业绩", props.chartData ); | ||||
|             const chartDom = document.getElementById( "chartWrapper" ); | ||||
|             const myChart = echarts.init( chartDom as HTMLDivElement ); | ||||
|             const option = { | ||||
| @@ -53,7 +55,7 @@ export default { | ||||
|                 ], | ||||
|             }; | ||||
|  | ||||
|             option && myChart.setOption( option ); | ||||
|             myChart.setOption( option ); | ||||
|  | ||||
|             window.onresize = function () | ||||
|             { | ||||
|   | ||||
| @@ -12,17 +12,18 @@ | ||||
|         <el-progress | ||||
|             type="circle" | ||||
|             :percentage="ui.percentage" | ||||
|             :status="ui.warningLevel" | ||||
|         > | ||||
|             <template #default> | ||||
|                 <span class="percentage-label">{{ ui.indicator }}</span> | ||||
|                 <span class="percentage-value">{{ percentage }}%</span> | ||||
|                 <span :class="warningLevelClass">{{ percentage }}%</span> | ||||
|             </template> | ||||
|         </el-progress> | ||||
|     </div> | ||||
| </template> | ||||
|  | ||||
| <script lang="ts"> | ||||
| import { reactive } from "vue"; | ||||
| import { reactive, computed } from "vue"; | ||||
| export default { | ||||
|     name: "ArchievementCompleteRateComponent", | ||||
|     props: { | ||||
| @@ -35,17 +36,42 @@ export default { | ||||
|             type: String, | ||||
|             default: "", | ||||
|         }, | ||||
|         warningLevel: { // 警告等级 | ||||
|             type: String, | ||||
|             default: "success", | ||||
|         }, | ||||
|     }, | ||||
|     setup( props ) | ||||
|     { | ||||
|         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({ | ||||
|             percentage, | ||||
|             indicator: props.indicator, | ||||
|             warningLevel: props.warningLevel, | ||||
|         }); | ||||
|  | ||||
|         return { ui, }; | ||||
|         return { ui, warningLevelClass, }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| @@ -73,6 +99,21 @@ export default { | ||||
|         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 { | ||||
|         display: block; | ||||
|         margin-top: 10px; | ||||
|   | ||||
| @@ -0,0 +1,166 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-08-30 14:08:57 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/components/CallerArchievementComponent.vue | ||||
|  * @Description: | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div class="caller-archievment-wrapper"> | ||||
|         <h1>{{ CallerName }}</h1> | ||||
|         <table> | ||||
|             <tr> | ||||
|                 <th>当月保费</th><td>{{ PresentMonthPremium }} 万元</td> | ||||
|             </tr> | ||||
|             <tr> | ||||
|                 <th>车非渗透率</th><td>{{ props.attachingRate }}%</td> | ||||
|             </tr> | ||||
|             <tr> | ||||
|                 <th>续保率</th><td>{{ props.renewalRate }}%</td> | ||||
|             </tr> | ||||
|         </table> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { computed } from "vue"; | ||||
| interface CallerArchievementComponentUI | ||||
| { | ||||
|     callerName: string, | ||||
|     thisMonthPremium: number, | ||||
|     attachingRate: string, | ||||
|     renewalRate: string, | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     name: "CallerArchievementComponent", | ||||
|     props: { | ||||
|         callerName: { | ||||
|             type: String, | ||||
|             require: true, | ||||
|             default: (): string => "", | ||||
|         }, | ||||
|         thisMonthPremium: { | ||||
|             type: Number, | ||||
|             require: true, | ||||
|             default: (): number => 0, | ||||
|         }, | ||||
|         attachingRate: { | ||||
|             type: String, | ||||
|             require: true, | ||||
|             default: (): string => "0.0", | ||||
|         }, | ||||
|         renewalRate: { | ||||
|             type: String, | ||||
|             require: true, | ||||
|             default: (): string => "0.0", | ||||
|         }, | ||||
|     }, | ||||
|     setup( props ) | ||||
|     { | ||||
|         const ui: CallerArchievementComponentUI = { | ||||
|             callerName: "", | ||||
|             thisMonthPremium: 0, | ||||
|             attachingRate: "0.0", | ||||
|             renewalRate: "0.0", | ||||
|         }; | ||||
|  | ||||
|         const PresentMonthPremium = computed((): string => | ||||
|         { | ||||
|             return ( props.thisMonthPremium / 10000 ).toFixed( 2 ); | ||||
|         }); | ||||
|  | ||||
|         const CallerName = computed((): string => | ||||
|         { | ||||
|             return props.callerName; | ||||
|         }); | ||||
|  | ||||
|         return { | ||||
|             CallerName, | ||||
|             PresentMonthPremium, | ||||
|             ui, | ||||
|             props, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style scoped lang="scss"> | ||||
| .caller-archievment-wrapper | ||||
| { | ||||
|     width: 300px; | ||||
|     height: 120px; | ||||
|  | ||||
|     border-radius: 5px; | ||||
|  | ||||
|     margin-bottom: 30px; | ||||
|  | ||||
|     display: flex; | ||||
|     flex-direction: column; | ||||
|     justify-content: flex-start; | ||||
|     align-items: center; | ||||
|  | ||||
|     background-color: #fff; | ||||
|     color: #4f4f4f; | ||||
|     font-size: 15px; | ||||
|  | ||||
|     h1 { | ||||
|         background-color: #fecb96; | ||||
|         width: 100%; | ||||
|         text-align: center; | ||||
|         border-radius: 5px 5px 0px 0px; | ||||
|         margin: 0px; | ||||
|         padding: 5px 0px; | ||||
|  | ||||
|         color: #da3703; | ||||
|  | ||||
|         font: { | ||||
|             size: 1.2rem; | ||||
|             weight: 100; | ||||
|             family: "FZ-ZHUOHEI"; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     table { | ||||
|         border-collapse: collapse; | ||||
|         border-radius: 0px 0px 5px 5px; | ||||
|         width: 100%; | ||||
|  | ||||
|         margin-top: 5px; | ||||
|  | ||||
|         background-color: #ffffff; | ||||
|  | ||||
|         font: { | ||||
|             size: 14px; | ||||
|         } | ||||
|  | ||||
|         th,td { | ||||
|             padding: 9px; | ||||
|             border-bottom: 1.5px solid #ebeef5; | ||||
|         } | ||||
|  | ||||
|         th { | ||||
|             width: 5.2rem; | ||||
|             text-align: right; | ||||
|         } | ||||
|  | ||||
|         th.caller-name { | ||||
|             text-align: center; | ||||
|             background-color: yellow; | ||||
|         } | ||||
|  | ||||
|         td { | ||||
|             text-align: left; | ||||
|         } | ||||
|  | ||||
|         tr:nth-child(even) { | ||||
|             background-color: #f5f6f7; | ||||
|         } | ||||
|  | ||||
|         tr:last-child td,th { | ||||
|             border-bottom: none; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| </style> | ||||
| @@ -15,10 +15,13 @@ | ||||
|                 alt="" | ||||
|             > | ||||
|             <div class="title-wrapper"> | ||||
|                 <span>"消7灭6"突围战</span> | ||||
|                 <span>{{ props.month }}月入营坐席</span> | ||||
|                 <span>“消 8 灭 6 突围战”</span> | ||||
|                 <span>指标落后入营坐席</span> | ||||
|             </div> | ||||
|         </div> | ||||
|         <div class="telsaler-list-wrapper"> | ||||
|             <span>开发中……</span> | ||||
|         </div> | ||||
|     </div> | ||||
| </template> | ||||
|  | ||||
| @@ -46,6 +49,8 @@ export default { | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .dishonorlist-wrapper { | ||||
|     display: flex; | ||||
|     flex-direction: column; | ||||
|     height: 240px; | ||||
|     width: 360px; | ||||
|     border-radius: 5px; | ||||
| @@ -55,10 +60,16 @@ export default { | ||||
|  | ||||
|     padding: 10px; | ||||
|  | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
|  | ||||
|     .banner-wrapper { | ||||
|         display: flex; | ||||
|         justify-content: center; | ||||
|         align-items: stretch; | ||||
|         height: 65px; | ||||
|         flex-grow: 0; | ||||
|  | ||||
|         img { | ||||
|             // width: 70px; | ||||
| @@ -80,4 +91,24 @@ export default { | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| .telsaler-list-wrapper { | ||||
|     flex-grow: 1; | ||||
|     display: flex; | ||||
|     justify-content: center; | ||||
|     align-items: center; | ||||
|  | ||||
|     span { | ||||
|         display: block; | ||||
|         text-align: center; | ||||
|         color: rgb(101, 140, 194); | ||||
|         margin-top: 0px; | ||||
|  | ||||
|         font: { | ||||
|             size: 2rem; | ||||
|             family: "FZ-ZHUOHEI"; | ||||
|             weight: 100; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -9,38 +9,17 @@ | ||||
| --> | ||||
| <template> | ||||
|     <div class="honorlist-wrapper"> | ||||
|         <span class="title">“90俱乐部”{{ $props.month }}月入围坐席</span> | ||||
|         <div class="reward-wrapper"> | ||||
|             <div class="leading-reward-wrapper"> | ||||
|         <div class="banner-wrapper"> | ||||
|             <img | ||||
|                 src="@/assets/img/ranking/medal.png" | ||||
|                         alt="领跑奖" | ||||
|                 alt="" | ||||
|             > | ||||
|                     <span>领跑奖</span> | ||||
|                 </div> | ||||
|                 <div class="gainer-wrapper"> | ||||
|                     <span | ||||
|                         v-for="gainer in ui.leadingReward" | ||||
|                         :key="gainer" | ||||
|                     >{{ gainer }}</span> | ||||
|                 </div> | ||||
|             </div> | ||||
|             <div class="advance-reward-wrapper"> | ||||
|                 <div class="banner-wrapper"> | ||||
|                     <img | ||||
|                         src="@/assets/img/ranking/copper_medal.png" | ||||
|                         alt="飞跃奖" | ||||
|                     > | ||||
|                     <span>飞跃奖</span> | ||||
|                 </div> | ||||
|                 <div class="gainer-wrapper"> | ||||
|                     <span | ||||
|                         v-for="gainer in ui.advanceReward" | ||||
|                         :key="gainer" | ||||
|                     >{{ gainer }}</span> | ||||
|             <div class="title-wrapper"> | ||||
|                 <span>“90俱乐部”标杆坐席</span> | ||||
|             </div> | ||||
|         </div> | ||||
|         <div class="telsaler-list-wrapper"> | ||||
|             <span>开发中……</span> | ||||
|         </div> | ||||
|     </div> | ||||
| </template> | ||||
| @@ -81,6 +60,8 @@ export default { | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .honorlist-wrapper { | ||||
|     display: flex; | ||||
|     flex-direction: column; | ||||
|     height: 240px; | ||||
|     width: 360px; | ||||
|     border-radius: 5px; | ||||
| @@ -93,48 +74,48 @@ export default { | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
| } | ||||
|  | ||||
|     .title { | ||||
|         display: block; | ||||
|         text-align: center; | ||||
|  | ||||
|         font: { | ||||
|             family: "FZ-ZHUOHEI"; | ||||
|             size: 1.4rem; | ||||
|         } | ||||
|  | ||||
|         color: goldenrod; | ||||
|     } | ||||
|  | ||||
|     .reward-wrapper { | ||||
|         width: 100%; | ||||
|  | ||||
| .banner-wrapper { | ||||
|     display: flex; | ||||
|     justify-content: center; | ||||
|         align-items: stretch; | ||||
|     align-items: center; | ||||
|     height: 65px; | ||||
|     flex-grow: 0; | ||||
|  | ||||
|         >*+* { | ||||
|             margin-left: 10px; | ||||
|     img { | ||||
|         width: 65px; | ||||
|         height: 65px; | ||||
|     } | ||||
|  | ||||
|         .leading-reward-wrapper { | ||||
|             width: 165px; | ||||
|             height: 100%; | ||||
|  | ||||
|         } | ||||
|  | ||||
|         .advance-reward-wrapper { | ||||
|             width: 165px; | ||||
|             height: 100%; | ||||
|         } | ||||
|     .title-wrapper { | ||||
|  | ||||
|         span { | ||||
|             display: block; | ||||
|  | ||||
|             margin-top: 5px; | ||||
|  | ||||
|             text-align: center; | ||||
|                 color: #fff; | ||||
|             color: rgb(245, 178, 11); | ||||
|             margin-top: 0px; | ||||
|  | ||||
|             font: { | ||||
|                 size: 1.65rem; | ||||
|                 family: "FZ-ZHUOHEI"; | ||||
|                 weight: 100; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| .telsaler-list-wrapper { | ||||
|     flex-grow: 1; | ||||
|     display: flex; | ||||
|     justify-content: center; | ||||
|     align-items: center; | ||||
|  | ||||
|     span { | ||||
|             display: block; | ||||
|             text-align: center; | ||||
|             color: rgb(101, 140, 194); | ||||
|             margin-top: 0px; | ||||
|  | ||||
|             font: { | ||||
|                 size: 2rem; | ||||
| @@ -142,29 +123,5 @@ export default { | ||||
|                 weight: 100; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         .banner-wrapper { | ||||
|             display: flex; | ||||
|             justify-content: center; | ||||
|             align-items: center; | ||||
|  | ||||
|             img { | ||||
|                 width: 30px; | ||||
|                 height: 30px; | ||||
|             } | ||||
|  | ||||
|             span { | ||||
|                 display: inline-block; | ||||
|                 text-align: center; | ||||
|                 color: #fff; | ||||
|  | ||||
|                 font: { | ||||
|                     size: 1.5rem; | ||||
|                     family: "FZ-ZHUOHEI"; | ||||
|                     weight: 100; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -9,6 +9,9 @@ | ||||
| --> | ||||
| <template> | ||||
|     <div class="rankinglist-wrapper"> | ||||
|         <div class="rankinglist-title"> | ||||
|             <span>{{ props.title }}</span> | ||||
|         </div> | ||||
|         <el-table | ||||
|             :data="topFive" | ||||
|             stripe | ||||
| @@ -25,7 +28,7 @@ | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="名次" | ||||
|                 label="名称" | ||||
|                 width="160" | ||||
|                 align="center" | ||||
|             > | ||||
| @@ -39,7 +42,7 @@ | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="ranking"> | ||||
|                     <span class="rankinglist-index">{{ ranking.row.appraiseValue }}</span> | ||||
|                     <span class="rankinglist-index">{{ ranking.row.appraiseValue }}%</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|         </el-table> | ||||
| @@ -103,7 +106,14 @@ export default { | ||||
|     // border: 1px solid red; | ||||
|     border-radius: 5px; | ||||
|     width: 300px; | ||||
|     height: 250px; | ||||
|     height: 270px; | ||||
|  | ||||
|     display: flex; | ||||
|     flex-direction: column; | ||||
|     justify-content: center; | ||||
|     align-items: center; | ||||
|  | ||||
|     margin-bottom: 15px; | ||||
| } | ||||
|  | ||||
| .rankinglist-index { | ||||
| @@ -113,7 +123,7 @@ export default { | ||||
|  | ||||
| :deep(.el-table) | ||||
| { | ||||
|     border-radius: 5px; | ||||
|     border-radius: 0px 0px 5px 5px; | ||||
| } | ||||
|  | ||||
| :deep(.el-table__header-wrapper) { | ||||
| @@ -129,4 +139,28 @@ export default { | ||||
|   } | ||||
| } | ||||
|  | ||||
| .rankinglist-title { | ||||
|     color: #da3703; | ||||
|     background-color: #fecc96; | ||||
|  | ||||
|     width: 100%; | ||||
|     border-radius: 5px 5px 0px 0px; | ||||
|  | ||||
|     height: 1.5rem; | ||||
|  | ||||
|     display: flex; | ||||
|     justify-content: center; | ||||
|     align-items: center; | ||||
|  | ||||
|     padding-top: 10px; | ||||
|     padding-bottom: 0px; | ||||
|  | ||||
|     span { | ||||
|         font: { | ||||
|             size: 1rem; | ||||
|             weight: 700; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| </style> | ||||
|   | ||||
| @@ -78,32 +78,22 @@ | ||||
| // @ts-expect-error 之后再补充类型文件 | ||||
| import { hasOnlyChild } from "@/router/index.js"; | ||||
| import { useRoute, useRouter } from "vue-router"; | ||||
| // import { useRoute, useRouter, type RouteRecordNormalized, type _RouteRecordBase } from "vue-router"; | ||||
| import { computed } from "vue"; | ||||
|  | ||||
| // declare interface SideBarRouteRecordNormalized extends RouteRecordNormalized | ||||
| // { | ||||
| //     hidden?: boolean; | ||||
| // } | ||||
|  | ||||
| // declare interface SideBarRouteRecordSingleView extends _RouteRecordBase | ||||
| // { | ||||
|  | ||||
| // } | ||||
|  | ||||
| export default { | ||||
|     name: "LayoutAside", | ||||
|     setup() | ||||
|     { | ||||
|         const userRout = useRoute(); | ||||
|         const router = useRouter(); | ||||
|         const routes = router.getRoutes();// as SideBarRouteRecordNormalized[]; | ||||
|  | ||||
|         const currentPath = computed(() => | ||||
|         { | ||||
|             return useRoute().path; | ||||
|             return userRout.path; | ||||
|         }); | ||||
|  | ||||
|         return { routes, currentPath, hasOnlyChild, }; | ||||
|         return { userRout, routes, currentPath, hasOnlyChild, }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
|   | ||||
| @@ -12,7 +12,7 @@ | ||||
|         <span class="company-name">CPIC</span> | ||||
|         <div class="version-wrapper"> | ||||
|             <span>桌面霸屏后台管理</span> | ||||
|             <span>Build-202303251257</span> | ||||
|             <span>Build-20240111</span> | ||||
|         </div> | ||||
|         <div class="buttons-wrapper"> | ||||
|             <component | ||||
| @@ -35,7 +35,7 @@ export default { | ||||
|         /** | ||||
|          * 退出登录 | ||||
|          */ | ||||
|         const Logout = ():void => | ||||
|         const Logout = (): void => | ||||
|         { | ||||
|             ElMessageBox.confirm( | ||||
|                 "是否要退出系统?", | ||||
| @@ -46,11 +46,12 @@ export default { | ||||
|                     type: "warning", | ||||
|                 } | ||||
|             ) | ||||
|                 .then(() => | ||||
|                 .then((): void => | ||||
|                 { | ||||
|                     // debugger; | ||||
|                     logout(); | ||||
|                 }); | ||||
|                 }) | ||||
|                 .catch((): void => {}); | ||||
|         }; | ||||
|  | ||||
|         return { Logout, }; | ||||
| @@ -91,10 +92,10 @@ export default { | ||||
|         align-items: start; | ||||
|  | ||||
|         font: { | ||||
|             size: 0.5rem; | ||||
|             size: 0.75rem; | ||||
|         } | ||||
|  | ||||
|         > *+* { | ||||
|         >*+* { | ||||
|             margin-top: 1px; | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -11,7 +11,7 @@ | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-01-04 11:40:03 | ||||
|  * @LastEditors: Kane | ||||
|  * @LastEditTime: 2023-03-27 18:19:35 | ||||
|  * @LastEditTime: 2023-09-27 11:19:05 | ||||
|  * @FilePath: /it-console/src/layout/components/Main.vue | ||||
|  * @Description: | ||||
|  * | ||||
| @@ -37,6 +37,6 @@ export default { | ||||
| .el-scrollbar { | ||||
|     height: 100%; | ||||
|     width: 100%; | ||||
|     background-color: #ecf2f9; | ||||
|     /* background-color: #ecf2f9; */ | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -62,22 +62,31 @@ const routes = [ | ||||
|         component: ()=> import( "../layout/Index.vue" ), | ||||
|         children:[ | ||||
|             { | ||||
|                 path:"/staff_data", | ||||
|                 name:"StaffDataManagement", | ||||
|                 path:"/telsaler_data", | ||||
|                 name:"TelsalerManagement", | ||||
|                 meta: { | ||||
|                     title:"坐席管理", | ||||
|                     icon: "user", | ||||
|                 }, | ||||
|                 component: ()=> import( "../views/StaffManagement.vue" ), | ||||
|                 component: ()=> import( "../views/telsaler/TelsalerManagementView.vue" ), | ||||
|             }, | ||||
|             { | ||||
|                 path:"/archievement_data", | ||||
|                 name:"ArchievementDataManagement", | ||||
|                 path: "/data_management", | ||||
|                 name: "DataManagement", | ||||
|                 meta: { | ||||
|                     title:"数据管理", | ||||
|                     title: "数据管理", | ||||
|                     icon: "document", | ||||
|                 }, | ||||
|                 component: ()=> import( "../views/DataManagement.vue" ), | ||||
|                 component: ()=> import( "../views/data/DataManagement.vue" ),  | ||||
|             }, | ||||
|             { | ||||
|                 path:"/reward_management", | ||||
|                 name:"RewardManagement", | ||||
|                 meta: { | ||||
|                     title:"奖励管理", | ||||
|                     icon: "document", | ||||
|                 }, | ||||
|                 component: ()=> import( "../views/RewardManagement.vue" ), | ||||
|             }, | ||||
|         ], | ||||
|     }, | ||||
|   | ||||
							
								
								
									
										89
									
								
								code/web/task_schedule/src/test/identify.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								code/web/task_schedule/src/test/identify.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,89 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-05-25 21:55:14 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/test/identify.ts | ||||
|  * @Description: | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
|  */ | ||||
|  | ||||
| import { type AxiosResponse } from "axios"; | ||||
| import { service as instance } from "../utils/api/request.js"; | ||||
| import { API_URL } from "../utils/api/config.js"; | ||||
| // import { login, loginCaller, type LoginCallerInfo } from "../utils/account.js"; | ||||
|  | ||||
| interface LoginInfo | ||||
| { | ||||
|     p13account: string; | ||||
|     password: string; | ||||
| } | ||||
|  | ||||
| interface LoginCallerInfo | ||||
| { | ||||
|     telsaler_code: string; | ||||
| } | ||||
|  | ||||
| async function loginCaller( data: LoginCallerInfo ): Promise<AxiosResponse<any, any>> | ||||
| { | ||||
|     return await instance.request( | ||||
|         { | ||||
|             method: "post", | ||||
|             url: API_URL.URL_LOGIN_CALLER, | ||||
|             data, | ||||
|         }); | ||||
| } | ||||
|  | ||||
| function loginTestCaller(): void | ||||
| { | ||||
|     const info: LoginCallerInfo = | ||||
|    { | ||||
|        telsaler_code: "61136", | ||||
|    }; | ||||
|  | ||||
|     loginCaller( info ) | ||||
|         .then(( response ) => | ||||
|         { | ||||
|             console.log( response.data ); | ||||
|         }) | ||||
|         .catch(( error ) => | ||||
|         { | ||||
|             console.log( error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| async function newCitizen( data: any ): Promise<AxiosResponse<any, any>> | ||||
| { | ||||
|     return await instance.request( | ||||
|         { | ||||
|             method: "post", | ||||
|             url: "http://10.39.0.41:8081/NewCitizen/identify.do", | ||||
|             data, | ||||
|         } | ||||
|     ); | ||||
| } | ||||
|  | ||||
| function testNewCitizen(): void | ||||
| { | ||||
|     const data = { | ||||
|         idcard_no: "350402198106130016", | ||||
|         name: "王炜", | ||||
|     }; | ||||
|  | ||||
|     newCitizen( data ) | ||||
|         .then(( response ) => | ||||
|         { | ||||
|             console.log( response.data ); | ||||
|         }) | ||||
|         .catch(( error ) => | ||||
|         { | ||||
|             console.log( error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| export { | ||||
|     loginTestCaller, | ||||
|     testNewCitizen, | ||||
|     type LoginInfo, | ||||
|     type LoginCallerInfo | ||||
| }; | ||||
							
								
								
									
										50
									
								
								code/web/task_schedule/src/test/requestTest.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								code/web/task_schedule/src/test/requestTest.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
|  | ||||
| import { type AxiosResponse } from "axios"; | ||||
| import { service as instance } from "../utils/api/request.js"; | ||||
| import { API_URL } from "../utils/api/config.js"; | ||||
| // import { login, loginCaller, type LoginCallerInfo } from "../utils/account.js"; | ||||
|  | ||||
| interface LoginInfo | ||||
| { | ||||
|     p13account: string; | ||||
|     password: string; | ||||
| } | ||||
|  | ||||
| interface LoginCallerInfo | ||||
| { | ||||
|     telsaler_code: string; | ||||
| } | ||||
|  | ||||
| async function loginCaller( data: LoginCallerInfo ): Promise<AxiosResponse<any, any>> | ||||
| { | ||||
|     return await instance.request( | ||||
|         { | ||||
|             method: "post", | ||||
|             url: API_URL.URL_LOGIN_CALLER, | ||||
|             data, | ||||
|         }); | ||||
| } | ||||
|  | ||||
| function loginTestCaller(): void | ||||
| { | ||||
|     const info: LoginCallerInfo = | ||||
|    { | ||||
|        telsaler_code: "61136", | ||||
|    }; | ||||
|  | ||||
|     loginCaller( info ) | ||||
|         .then(( response ) => | ||||
|         { | ||||
|             console.log( response.data ); | ||||
|         }) | ||||
|         .catch(( error ) => | ||||
|         { | ||||
|             console.log( error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| export { | ||||
|     loginTestCaller, | ||||
|     type LoginInfo, | ||||
|     type LoginCallerInfo | ||||
| }; | ||||
| @@ -8,6 +8,11 @@ | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
|  */ | ||||
|  | ||||
| import { testRankingListRequest } from "./testRankingListRequest.js"; | ||||
| // import { testRankingListRequest } from "./testRankingListRequest.js"; | ||||
|  | ||||
| testRankingListRequest(); | ||||
| // testRankingListRequest(); | ||||
|  | ||||
| const arr: string[] = []; | ||||
|  | ||||
| console.log( "test" ); | ||||
| console.log( "检查instanceof:", arr instanceof String ); | ||||
|   | ||||
							
								
								
									
										35
									
								
								code/web/task_schedule/src/test/testBI.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								code/web/task_schedule/src/test/testBI.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-11-06 14:50:08 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/test/testBI.ts | ||||
|  * @Description: 测试bi相关的代码 | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| import { | ||||
|     type BIReportType, | ||||
|     type ImportBIReportRequest, | ||||
|     type ImportBIReportResponse, | ||||
|     type ImportBIReportResponseHandler, | ||||
|     type BITelsalerAttachingRateRecord, | ||||
|     type QueryBITelsalerAttachingRateReportResponse, | ||||
|     type QueryBITelsalerAttachingRateDataHandler, | ||||
|     type BITelsalerRenewalRateRecord, | ||||
|     importBIReport, | ||||
|     queryBITelsalerAttachingRateData | ||||
| } from "../utils/BIReport.ts"; | ||||
|  | ||||
| function handler( response: QueryBITelsalerAttachingRateReportResponse, error: any ): void | ||||
| { | ||||
|     if ( response.success ) | ||||
|     { | ||||
|         console.log( response ); | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         console.log( error ); | ||||
|     } | ||||
| } | ||||
|  | ||||
| queryBITelsalerAttachingRateData( handler ); | ||||
							
								
								
									
										28
									
								
								code/web/task_schedule/src/test/testCallerArchievement.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								code/web/task_schedule/src/test/testCallerArchievement.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-08-28 16:02:11 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/test/testCallerArchievement.ts | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| import { queryCallerArchievement, type CallerArchievement } from "../utils/archievement.js"; | ||||
| import { type TelSaler } from "../types/cpicxim/TelSaler.js"; | ||||
|  | ||||
| const callInfo: TelSaler = | ||||
| { | ||||
|     telSalerCode: "61136", | ||||
|     telSalerName: "陈榕榕", | ||||
|     teamCode: "", | ||||
|     teamName: "", | ||||
|     departmentCode: "", | ||||
|     departmentName: "", | ||||
| }; | ||||
|  | ||||
| function render(): void | ||||
| { | ||||
|  | ||||
| } | ||||
|  | ||||
| queryCallerArchievement( callInfo, render ); | ||||
							
								
								
									
										31
									
								
								code/web/task_schedule/src/test/testRankingListRequest.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								code/web/task_schedule/src/test/testRankingListRequest.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-06-07 10:16:00 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/test/testRankingListRequest.ts | ||||
|  * @Description: | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
|  */ | ||||
| import { type AxiosResponse } from "axios"; | ||||
| // import { service as instance } from "../utils/api/request.js"; | ||||
| // import { API_URL } from "../utils/api/config.js"; | ||||
| // import { type RankingListItem } from "../types/cpicxim/RankingListItem.js"; | ||||
| import { | ||||
|     type RankingListRequest, | ||||
|     type RankingListResponse, | ||||
|     requestRankingList | ||||
| } from "../utils/ranking.js"; | ||||
|  | ||||
| function testRankingListRequest(): void | ||||
| { | ||||
|     const req: RankingListRequest = { | ||||
|         departmentCode: "QDI", | ||||
|         year: "2023", | ||||
|         month: "06", | ||||
|     }; | ||||
|  | ||||
|     requestRankingList( req ); | ||||
| } | ||||
|  | ||||
| export { testRankingListRequest }; | ||||
							
								
								
									
										30
									
								
								code/web/task_schedule/src/test/testRewardRequest.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								code/web/task_schedule/src/test/testRewardRequest.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-11 14:16:30 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/test/testRewardRequest.ts | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
|  | ||||
| import { | ||||
|     type RewardProject, | ||||
|     type RewardGainer, | ||||
|     type RewardProjectResponse, | ||||
|     requestRewardPorjectsList, | ||||
|     requestRewardGainers | ||||
| } from "../utils/reward.js"; | ||||
|  | ||||
| function render( data: any, error?: any ): void | ||||
| { | ||||
|     console.log( data ); | ||||
|  | ||||
|     if ( error !== null ) | ||||
|     { | ||||
|         console.log( "请求失败,", error ); | ||||
|     } | ||||
| } | ||||
|  | ||||
| requestRewardPorjectsList( render ); | ||||
| requestRewardGainers( render ); | ||||
| @@ -11,16 +11,17 @@ | ||||
|     "compilerOptions": { | ||||
|         "forceConsistentCasingInFileNames": true, | ||||
|         "useDefineForClassFields": true, | ||||
|         "allowImportingTsExtensions": true, | ||||
|         "noEmit": true, | ||||
|         "target": "ESNext", | ||||
|         "module": "ESNext", | ||||
|         "module": "NodeNext", | ||||
|         // "module": "CommonJS", | ||||
|         // "moduleResolution": "node", | ||||
|         "moduleResolution": "node", | ||||
|         "moduleResolution": "NodeNext", | ||||
|         "strict": true, | ||||
|         "jsx": "preserve", | ||||
|         "sourceMap": true, | ||||
|         "resolveJsonModule": true, | ||||
|         "esModuleInterop": false, | ||||
|         "esModuleInterop": true, | ||||
|         "baseUrl": "./", // paths 路径解析起点 | ||||
|         "paths": { // 别名路径设置 | ||||
|             "@/*": [ | ||||
| @@ -46,5 +47,9 @@ | ||||
|     ], | ||||
|     "exclude": [ | ||||
|         "./node_modules", | ||||
|     ] | ||||
|     ], | ||||
|     "ts-node": { | ||||
|         "esm": true, | ||||
|         "require": ["tsconfig-paths/register"], | ||||
|     }, | ||||
| } | ||||
| @@ -12,6 +12,6 @@ interface Department | ||||
| { | ||||
|     departmentName: string; | ||||
|     departmentCode: string; | ||||
| }; | ||||
| } | ||||
|  | ||||
| export { type Department }; | ||||
|   | ||||
| @@ -13,6 +13,6 @@ interface RankingListItem | ||||
|     index: number; | ||||
|     callerName: string; | ||||
|     appraiseValue: string; | ||||
| }; | ||||
| } | ||||
|  | ||||
| export { type RankingListItem }; | ||||
|   | ||||
| @@ -16,6 +16,6 @@ interface TelSaler | ||||
|     teamName: string; | ||||
|     departmentCode: string; | ||||
|     departmentName: string; | ||||
| }; | ||||
| } | ||||
|  | ||||
| export { type TelSaler }; | ||||
|   | ||||
							
								
								
									
										356
									
								
								code/web/task_schedule/src/utils/BIReport.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										356
									
								
								code/web/task_schedule/src/utils/BIReport.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,356 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-17 11:18:19 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/utils/BIReport.ts | ||||
|  * @Description: BI报表相关的代码 | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| import { service as instance } from "./api/request.ts"; | ||||
| import { API_URL } from "./api/config.ts"; | ||||
| import { type AxiosResponse } from "axios"; | ||||
| interface BIReportType | ||||
| { | ||||
|     reportTypeCode: number; | ||||
|     reportTypeName: string; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 导入报表的请求对象 | ||||
|  */ | ||||
| interface ImportBIReportRequest | ||||
| { | ||||
|     filePath: string, | ||||
|     reportType: number, | ||||
|     firstRow: number, | ||||
|     sheetIndex: number, | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 导入报表的相应对象 | ||||
|  */ | ||||
| interface ImportBIReportResponse | ||||
| { | ||||
|     success: boolean, // 请求成功标志 | ||||
|     message: string, // 请求结果说明 | ||||
|     importedCount: number, // 导入记录的数量 | ||||
| } | ||||
|  | ||||
| // BI坐席渗透率报表记录 | ||||
| interface BITelsalerAttachingRateRecord | ||||
| { | ||||
|     departmentName: string; // 部门 | ||||
|     telsalerName: string; // 经办人 | ||||
|     motoPremium: number; // 车险保费 | ||||
|     nomotoPremium: number; // 非车险保费 | ||||
|     motoPremiumProportion: number; // 车险保费占比 | ||||
|     attachingRate: number; // 保费渗透率 | ||||
|     attachingRateChange: number; // 渗透率环比上月 | ||||
|     customerHandleRate: number; // 当月客户渗透率 | ||||
|     customerHandleRateChange: number; // 客户渗透率环比上月 | ||||
|     noMotoPremiumPerCustomer: number; // 当月车非客均保费 | ||||
|     noMotoPremiumPerCustomerChange: number; // 客均保费环比上月 | ||||
| } | ||||
|  | ||||
| interface QueryBITelsalerAttachingRateReportResponse | ||||
| { | ||||
|     success: boolean, | ||||
|     message: string, | ||||
|     records: BITelsalerAttachingRateRecord[]; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * BI坐席续保率报表记录 | ||||
|  */ | ||||
| interface BITelsalerRenewalRateRecord | ||||
| { | ||||
|     责任部门: string; | ||||
|     责任人: string; | ||||
|     机构目标值: number; | ||||
|     到期数全月: number; | ||||
|     序时到期数占比: number; | ||||
|     个车续保率序时: number; | ||||
|     个车续保率全月: number; | ||||
|     环比昨日: number; | ||||
|     环比上月: number; | ||||
|     平均提前签单天数: number; | ||||
|     环比: number; | ||||
| } | ||||
|  | ||||
| interface QueryBITelsalerRenewalRateReportResponse | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
|     records: BITelsalerRenewalRateRecord[]; | ||||
| } | ||||
|  | ||||
| /** 机构 ***/ | ||||
| // 机构渗透率 | ||||
| /** | ||||
|  * 机构渗漏率报表记录 | ||||
|  */ | ||||
| interface BIDepartmentAttachingRateRecord | ||||
| { | ||||
|     departmentName: string; | ||||
|     departmentObject: number; | ||||
|     objectGap: number; | ||||
|     motoPremium: number; | ||||
|     motoPremiumProPortion: number; | ||||
|     nomotoPremium: number; | ||||
|     attachingRate: number; | ||||
|     attachingRateChange: number; | ||||
|     motoInsuranceCustomerCount: number; | ||||
|     customerHandleRate: number; | ||||
|     customerHandleRateChange: number; | ||||
|     premiumPerCustomer: number; | ||||
|     premiumPerCustomerChange: number; | ||||
| } | ||||
|  | ||||
| interface QueryBIDepartmentAttachingRateResponse | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
|     records: BIDepartmentAttachingRateRecord[]; | ||||
| } | ||||
|  | ||||
| // 机构续保率 | ||||
| interface BIDepartmentRenewalRateRecord | ||||
| { | ||||
|     责任部门: string; | ||||
|     机构目标值: number; | ||||
|     到期数全月: number; | ||||
|     序时到期数占比: number; | ||||
|     个车续保率序时: number; | ||||
|     个车续保率全月: number; | ||||
|     环比昨日: number; | ||||
|     环比上月: number; | ||||
|     平均提前签单天数: number; | ||||
|     环比: number; | ||||
| } | ||||
|  | ||||
| interface QueryBIDepartmentRenewalRateResponse | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
|     records: BIDepartmentRenewalRateRecord[]; | ||||
| } | ||||
|  | ||||
| type ImportBIReportResponseHandler = ( response: ImportBIReportResponse, error: any ) => void; | ||||
| type QueryBITelsalerAttachingRateDataHandler = ( response: QueryBITelsalerAttachingRateReportResponse, error: any ) => void; | ||||
| type QueryBITelsalerRenewalRateDataHandler = ( response: QueryBITelsalerRenewalRateReportResponse, error: any ) => void; | ||||
| type QueryBIDepartmentAttachingRateDataHandler = ( response: QueryBIDepartmentAttachingRateResponse, error: any ) => void; | ||||
| type QueryBIDepartmentRenewalRateDataHandler = ( response: QueryBIDepartmentRenewalRateResponse, error: any ) => void; | ||||
|  | ||||
| /** | ||||
|  * 请求导入BI报表 | ||||
|  * @param request 请求参数 | ||||
|  * @param handler 调用者提供的请求结果处理函数 | ||||
|  */ | ||||
| function importBIReport( request: ImportBIReportRequest, handler: ImportBIReportResponseHandler ): void | ||||
| { | ||||
|     const importResponse: ImportBIReportResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|         importedCount: 0, | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         url: API_URL.URL_IMPORT_REPORT, | ||||
|         method: "post", | ||||
|         data: request, | ||||
|     }) | ||||
|         .then(( response: AxiosResponse<any, any> ): any => | ||||
|         { | ||||
|             const data: ImportBIReportResponse = response.data; | ||||
|  | ||||
|             importResponse.success = data.success ?? false; | ||||
|             importResponse.message = data.message ?? "请求完成,但服务器未返回请求结果消息!"; | ||||
|             importResponse.importedCount = data.importedCount ?? 0; | ||||
|  | ||||
|             handler( importResponse, null ); | ||||
|         }) | ||||
|         .catch(( error: any ): any => | ||||
|         { | ||||
|             importResponse.message = "请求导入报表错误,请查看控制台!"; | ||||
|             console.log( error ); | ||||
|  | ||||
|             handler( importResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 请求BI坐席渗透率数据 | ||||
|  * @param handler 处理请求结果的handler函数。 | ||||
|  */ | ||||
| function queryBITelsalerAttachingRateData( handler: QueryBITelsalerAttachingRateDataHandler ): void | ||||
| { | ||||
|     const queryResponse: QueryBITelsalerAttachingRateReportResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|         records: [], | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         url: API_URL.URL_BI_TELSALER_ATTACHINGRATE, | ||||
|         method: "post", | ||||
|     }) | ||||
|         .then(( response: AxiosResponse<any, any> ): void => | ||||
|         { | ||||
|             const data = response.data ?? {}; | ||||
|  | ||||
|             queryResponse.success = data.success ?? false; | ||||
|             queryResponse.message = data.message ?? ""; | ||||
|             queryResponse.records = data.records ?? []; | ||||
|  | ||||
|             console.log( "请求BI坐席渗透率数据", queryResponse ); | ||||
|             handler( queryResponse, null ); | ||||
|         }) | ||||
|         .catch(( error ): void => | ||||
|         { | ||||
|             queryResponse.message = "请求BI坐席渗漏率报表数据时出现错误,请查看控制台消息!"; | ||||
|             queryResponse.success = false; | ||||
|  | ||||
|             console.log( error ); | ||||
|  | ||||
|             handler( queryResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 请求BI坐席续保率数据 | ||||
|  * @param handler 调用者提供的处理请求结果的函数。 | ||||
|  */ | ||||
| function queryBITelsalerRenewalData( handler: QueryBITelsalerRenewalRateDataHandler ): void | ||||
| { | ||||
|     const queryResponse: QueryBITelsalerRenewalRateReportResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|         records: [], | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         url: API_URL.URL_BI_TELSALER_RENEWALRATE, | ||||
|         method: "post", | ||||
|     }) | ||||
|         .then(( response: AxiosResponse<any, any> ): void => | ||||
|         { | ||||
|             const data = response.data ?? {}; | ||||
|  | ||||
|             queryResponse.success = data.success ?? false; | ||||
|             queryResponse.message = data.message ?? ""; | ||||
|             queryResponse.records = data.records ?? []; | ||||
|  | ||||
|             console.log( "请求BI坐席续保率数据", queryResponse ); | ||||
|             handler( queryResponse, null ); | ||||
|         }) | ||||
|         .catch(( error: any ): void => | ||||
|         { | ||||
|             queryResponse.success = false; | ||||
|             queryResponse.message = "查询BI坐席续保率数据失败,请查看控制台!"; | ||||
|  | ||||
|             console.log( error ); | ||||
|  | ||||
|             handler( queryResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 请求机构渗透率数据 | ||||
|  * @param handler 调用者提供的处理请求结果的函数。 | ||||
|  */ | ||||
| function queryDepartmentAttachingRateData( handler: QueryBIDepartmentAttachingRateDataHandler ): void | ||||
| { | ||||
|     const queryResponse: QueryBIDepartmentAttachingRateResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|         records: [], | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         url: API_URL.URL_BI_DEPARTMENT_ATTACHINGRATE, | ||||
|         method: "post", | ||||
|     }) | ||||
|         .then(( response: AxiosResponse<any, any> ): void => | ||||
|         { | ||||
|             const data = response.data ?? {}; | ||||
|  | ||||
|             queryResponse.success = data.success ?? false; | ||||
|             queryResponse.message = data.message ?? "请求完成,但结果未知!"; | ||||
|             queryResponse.records = data.records ?? []; | ||||
|  | ||||
|             handler( queryResponse, null ); | ||||
|         }) | ||||
|         .catch(( error: any ): void => | ||||
|         { | ||||
|             queryResponse.success = false; | ||||
|             queryResponse.message = "查询BI机构续渗透失败,请查看控制台!"; | ||||
|             queryResponse.records = []; | ||||
|  | ||||
|             console.log( "查询BI机构渗透率失败:", error ); | ||||
|  | ||||
|             handler( queryResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 请求BI机构续保率数据 | ||||
|  * @param handler 调用者提供的处理请求结果的函数。 | ||||
|  */ | ||||
| function queryDepartmentRenewalRateData( handler: QueryBIDepartmentRenewalRateDataHandler ): void | ||||
| { | ||||
|     const queryResponse: QueryBIDepartmentRenewalRateResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|         records: [], | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         url: API_URL.URL_BI_DEPARTMENT_RENEWALRATE, | ||||
|         method: "post", | ||||
|     }) | ||||
|         .then(( response: AxiosResponse<any, any> ): void => | ||||
|         { | ||||
|             const data = response.data ?? {}; | ||||
|  | ||||
|             queryResponse.success = data.success ?? false; | ||||
|             queryResponse.message = data.message ?? "请求完成,但结果未知!"; | ||||
|             queryResponse.records = data.records ?? []; | ||||
|  | ||||
|             handler( queryResponse, null ); | ||||
|         }) | ||||
|         .catch(( error: any ): void => | ||||
|         { | ||||
|             queryResponse.success = false; | ||||
|             queryResponse.message = "查询BI机构续保率失败,请查看控制台!"; | ||||
|             queryResponse.records = []; | ||||
|  | ||||
|             console.log( "查询BI机构续保率失败:", error ); | ||||
|  | ||||
|             handler( queryResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| export { | ||||
|     type BIReportType, | ||||
|     type ImportBIReportRequest, | ||||
|     type ImportBIReportResponse, | ||||
|     type ImportBIReportResponseHandler, | ||||
|     type BITelsalerAttachingRateRecord, | ||||
|     type QueryBITelsalerAttachingRateReportResponse, | ||||
|     type QueryBITelsalerAttachingRateDataHandler, | ||||
|     type QueryBITelsalerRenewalRateDataHandler, | ||||
|     type BITelsalerRenewalRateRecord, | ||||
|     type QueryBITelsalerRenewalRateReportResponse, | ||||
|     type BIDepartmentAttachingRateRecord, | ||||
|     type QueryBIDepartmentAttachingRateResponse, | ||||
|     type QueryBIDepartmentAttachingRateDataHandler, | ||||
|     type BIDepartmentRenewalRateRecord, | ||||
|     type QueryBIDepartmentRenewalRateResponse, | ||||
|     type QueryBIDepartmentRenewalRateDataHandler, | ||||
|     importBIReport, | ||||
|     queryBITelsalerAttachingRateData, | ||||
|     queryBITelsalerRenewalData, | ||||
|     queryDepartmentAttachingRateData, | ||||
|     queryDepartmentRenewalRateData | ||||
| }; | ||||
| @@ -25,7 +25,7 @@ interface LoginInfo | ||||
|  | ||||
| interface LoginCallerInfo | ||||
| { | ||||
|     telsaler_code: string; | ||||
|     telsaler: string; | ||||
| } | ||||
|  | ||||
| interface RequestResult | ||||
|   | ||||
							
								
								
									
										12
									
								
								code/web/task_schedule/src/utils/api/EventBus.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								code/web/task_schedule/src/utils/api/EventBus.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-14 00:22:04 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/utils/api/eventBus.ts | ||||
|  * @Description: 消息总线。 | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| import mitt from "mitt"; | ||||
|  | ||||
| export default mitt(); | ||||
| @@ -7,21 +7,41 @@ | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
|  */ | ||||
| export const API_URL = { | ||||
|     // URL_LOGIN: import.meta.env.VITE_URL_LOGIN, | ||||
|     // URL_LOGIN: "http://222.76.244.118:11101/admin-system/account/p13_account_check", | ||||
|     URL_LOGIN: "http://10.39.0.41:8081/admin-system/account/p13_account_check", | ||||
| // 请求的url | ||||
| const API_URL = { | ||||
|     // 登录 | ||||
|     URL_LOGIN: import.meta.env.VITE_URL_LOGIN, | ||||
|     URL_LOGIN_CALLER: import.meta.env.VITE_URL_LOGIN_CALLER, | ||||
|  | ||||
|     // URL_LOGIN_CALLER: "http://localhost:8080/desktop_archievement_backend/account/query_telsaler_info.do", | ||||
|     // URL_LOGIN_CALLER: "http://222.76.244.118:11101/desktop_archievement_backend/account/query_telsaler_info.do", | ||||
|     URL_LOGIN_CALLER: "http://10.39.0.41:8081/desktop_archievement_backend/account/query_telsaler_info.do", | ||||
|     // 机构业绩 | ||||
|     URL_DEPARTMENT_ARCHIEVEMENT: import.meta.env.VITE_URL_DEPARTMENT_ARCHIEVEMENT, | ||||
|     // 坐席业绩查询 | ||||
|     URL_CALLER_ARCHIEVEMENT: import.meta.env.VITE_URL_CALLER_ARCHIEVEMENT, | ||||
|  | ||||
|     // URL_DEPARTMENT_ARCHIEVEMENT: import.meta.env.VITE_URL_DEPARTMENT_ARCHIEVEMENT, | ||||
|     // URL_DEPARTMENT_ARCHIEVEMENT: "http://222.76.244.118:11101/desktop_archievement_backend/archievement/query_department_archievement.do", | ||||
|     URL_DEPARTMENT_ARCHIEVEMENT: "http://10.39.0.41:8081/desktop_archievement_backend/archievement/query_department_archievement.do", | ||||
|     // 排行榜 | ||||
|     URL_RANKINGLIST: import.meta.env.VITE_URL_RANKINGLIST, | ||||
|  | ||||
|     // URL_RANKINGLIST: "http://localhost:8080/desktop_archievement_backend/archievement/query_ranking_list.do", | ||||
|     // URL_RANKINGLIST: "http://222.76.244.118:11101/desktop_archievement_backend/archievement/query_ranking_list.do", | ||||
|     URL_RANKINGLIST: "http://10.39.0.41:8081/desktop_archievement_backend/archievement/query_ranking_list.do", | ||||
|     /** 奖项相关 **/ | ||||
|     // 查询奖励项目 | ||||
|     URL_RWARD_PROJECTS: import.meta.env.VITE_URL_RWARD_PROJECTS, | ||||
|     // 查询获奖人员 | ||||
|     URL_REWARD_GAINERS: import.meta.env.VITE_URL_REWARD_GAINERS, | ||||
|     // 添加获奖人员 | ||||
|     URL_ADD_REWARD_TELSALER: import.meta.env.VITE_URL_ADD_REWARD_TELSALER, | ||||
|     // 更新获奖人员 | ||||
|     URL_UPDATE_REWARD_TELSALER: import.meta.env.VITE_URL_UPDATE_REWARD_TELSALER, | ||||
|     // 删除获奖人员 | ||||
|     URL_DEL_REWARD_TELSALER: import.meta.env.VITE_URL_DEL_REWARD_TELSALER, | ||||
|     // 上传文件 | ||||
|     URL_UPLOAD_FILE: import.meta.env.VITE_URL_UPLOAD_FILE, | ||||
|     // 导入报表 | ||||
|     URL_IMPORT_REPORT: import.meta.env.VITE_URL_IMPORT_REPORT, | ||||
|  | ||||
|     // 请求BI报表数据 | ||||
|     URL_BI_TELSALER_ATTACHINGRATE: import.meta.env.VITE_URL_BI_TELSALER_ATTACHINGRATE, | ||||
|     URL_BI_TELSALER_RENEWALRATE: import.meta.env.VITE_URL_BI_TELSALER_RENEWALRATE, | ||||
|     URL_BI_DEPARTMENT_ATTACHINGRATE: import.meta.env.VITE_URL_BI_DEPARTMENT_ATTACHINGRATE, | ||||
|     URL_BI_DEPARTMENT_RENEWALRATE: import.meta.env.VITE_URL_BI_DEPARTMENT_RENEWALRATE, | ||||
| }; | ||||
|  | ||||
| export { API_URL }; | ||||
|   | ||||
| @@ -27,6 +27,7 @@ function loadStaffInfo(): StaffInfo | ||||
|         obj = {}; | ||||
|     } | ||||
|  | ||||
|     /* eslint-disable */ | ||||
|     const stuff = new StaffInfo( | ||||
|         obj._p13uid ?? "", | ||||
|         obj._stuffCode ?? "", | ||||
| @@ -35,7 +36,7 @@ function loadStaffInfo(): StaffInfo | ||||
|         obj._department_name ?? "", | ||||
|         obj._section_office_code ?? "", | ||||
|         obj._section_office_name ?? "" ); | ||||
|  | ||||
|     /* eslint-enable */ | ||||
|     return stuff; | ||||
| } | ||||
|  | ||||
| @@ -44,7 +45,7 @@ function saveStaffInfo( stuff: StaffInfo ): void | ||||
|     const json = JSON.stringify( stuff ); | ||||
|  | ||||
|     window.localStorage.setItem( STUFF_ITEM, json ); | ||||
| }; | ||||
| } | ||||
|  | ||||
| function cleanStaffInfo(): void | ||||
| { | ||||
| @@ -102,7 +103,8 @@ function clearCallerInfo(): void | ||||
|     window.localStorage.removeItem( CALLER_ITEM ); | ||||
| } | ||||
|  | ||||
| export { | ||||
| export | ||||
| { | ||||
|     loadStaffInfo, | ||||
|     saveStaffInfo, | ||||
|     cleanStaffInfo, | ||||
|   | ||||
| @@ -13,7 +13,7 @@ import axios, { type AxiosInstance } from "axios"; | ||||
| const service: AxiosInstance = axios.create( | ||||
|     { | ||||
|         baseURL: "", | ||||
|         timeout: 10000, | ||||
|         timeout: 30000, | ||||
|     } | ||||
| ); | ||||
|  | ||||
|   | ||||
							
								
								
									
										18
									
								
								code/web/task_schedule/src/utils/api/systemParameters.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								code/web/task_schedule/src/utils/api/systemParameters.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-12-20 23:02:53 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/utils/api/systemParameters.ts | ||||
|  * @Description: 应用参数相关的代码 | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| // import { service as instance } from "@/utils/api/request.ts"; | ||||
|  | ||||
| interface SystemParameter | ||||
| { | ||||
|     paramterName: string; | ||||
|     parameterValue: string; | ||||
| } | ||||
|  | ||||
| export { type SystemParameter }; | ||||
| @@ -3,70 +3,257 @@ | ||||
|  * @Date: 2023-03-17 15:17:44 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/utils/archievement.ts | ||||
|  * @Description: 请求业绩数据 | ||||
|  * @Description: 请求业绩数据相关的方法。 | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
|  */ | ||||
| import { service as instance } from "./api/request.js"; | ||||
| import { API_URL } from "./api/config.js"; | ||||
| import { type Department } from "@/types/cpicxim/Department.js"; | ||||
| // import { type AxiosResponse } from "axios"; | ||||
| import { service as instance } from "./api/request.ts"; | ||||
| import { API_URL } from "./api/config.ts"; | ||||
| import { type Department } from "../types/cpicxim/Department.ts"; | ||||
| import { type TelSaler } from "../types/cpicxim/TelSaler.ts"; | ||||
| import { type AxiosResponse } from "axios"; | ||||
|  | ||||
| interface Archievement | ||||
| interface DepartmentArchievement // 定义业绩对象的结构 | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
|     total_archievement: number; | ||||
|     mensual_archievement_list: number[]; | ||||
|     insurance_renewal_rate: string; | ||||
|     insurance_renewal_rate_target: string; | ||||
|     attaching_rate: string; | ||||
|     attaching_rate_target: string; | ||||
|     leading_reward_gainers: string[]; | ||||
|     advance_reward_gainers: string[]; | ||||
|     backward_list: string[]; | ||||
| } | ||||
|  | ||||
| interface CallerArchievement // 坐席业绩对象 | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
|     total_archievement: number; | ||||
|     moto_premium_present_month: number; | ||||
|     mensual_archievement_list: number[]; | ||||
|     insurance_renewal_rate: string; | ||||
|     attaching_rate: string; | ||||
| } | ||||
|  | ||||
| interface MenusalArchievementItem // 每月业绩清单的项目 | ||||
| { | ||||
|     month: number; | ||||
|     premium: string; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 获取部门业绩数据,并调用回调函数进行渲染。 | ||||
|  * @param render 用于给组件更新数据的回调函数 | ||||
|  * @param departmentInfo 作为请求参数的部门参数对象 | ||||
|  * @param render 用于给组件更新数据的回调函数,用DepartmentArchievement对象调用; | ||||
|  */ | ||||
| function queryDepartmentArchievement( departmentInfo: Department, render: any ): void | ||||
| { | ||||
|     instance.request({ | ||||
|         method: "post", | ||||
|         url: API_URL.URL_DEPARTMENT_ARCHIEVEMENT, | ||||
|         data: departmentInfo, | ||||
|     }) | ||||
|         .then(( response ) => | ||||
|         { | ||||
|             const archievement: Archievement = { | ||||
|     // 默认的部门业绩对象 | ||||
|     const archievement: DepartmentArchievement = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|         total_archievement: 0, | ||||
|         mensual_archievement_list: [], | ||||
|         insurance_renewal_rate: "", | ||||
|         insurance_renewal_rate_target: "", | ||||
|         attaching_rate: "", | ||||
|         attaching_rate_target: "", | ||||
|         leading_reward_gainers: [], | ||||
|         advance_reward_gainers: [], | ||||
|         backward_list: [], | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         method: "post", | ||||
|         url: API_URL.URL_DEPARTMENT_ARCHIEVEMENT, | ||||
|         data: departmentInfo, | ||||
|     }) | ||||
|         // 请求结束,将请求的结果写入业绩对象,然后调用功能渲染函数。 | ||||
|         .then(( response ) => | ||||
|         { | ||||
|             const data = response.data ?? {}; | ||||
|  | ||||
|             archievement.success = data.success ?? false; | ||||
|             archievement.message = data.message ?? ""; | ||||
|             archievement.mensual_archievement_list = data.mensual_archievement_list ?? []; | ||||
|             archievement.message = data.message ?? "服务器没有返回调用结果消息,请检查日志!"; | ||||
|             archievement.total_archievement = data.total_archievement; | ||||
|             archievement.mensual_archievement_list = []; | ||||
|             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_target = data.attaching_rate_target ?? "0.0"; | ||||
|             archievement.leading_reward_gainers = data.leading_reward_gainers ?? []; | ||||
|             archievement.advance_reward_gainers = data.advance_reward_gainers ?? []; | ||||
|             archievement.backward_list = data.backward_list ?? []; | ||||
|  | ||||
|             render( data ); | ||||
|             // 转换每月业绩数据,用month排序以后,保留premium。 | ||||
|             data.mensual_archievement_list.sort(( a: any, b: any ) => a.month - b.month ); | ||||
|             data.mensual_archievement_list.forEach(( item: any ) => | ||||
|             { | ||||
|                 archievement.mensual_archievement_list.push( item.premium ); // eslint-disable-line | ||||
|             }); | ||||
|  | ||||
|             console.log( "每月业绩", archievement ); | ||||
|  | ||||
|             // 调用渲染函数 | ||||
|             if ( render !== undefined ) | ||||
|             { | ||||
|                 render( archievement ); | ||||
|             } | ||||
|         }) | ||||
|         // 请求失败,将失败原因写入业绩对象,调用渲染函数 | ||||
|         .catch(( error ) => | ||||
|         { | ||||
|             console.log( error ); | ||||
|             archievement.success = false; | ||||
|             archievement.message = String( error ); | ||||
|  | ||||
|             // 调用渲染函数 | ||||
|             if ( render !== undefined ) | ||||
|             { | ||||
|                 render( archievement ); | ||||
|             } | ||||
|  | ||||
|             console.log( `queryDepartmentArchievement:查询部门${departmentInfo.departmentCode}业绩失败,原因${error}` ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| export { queryDepartmentArchievement, type Archievement }; | ||||
| /** | ||||
|  * 查询坐席的业绩,并调用渲染函数. | ||||
|  * 1、请求坐席业绩的数据 | ||||
|  * 2、对每月业绩清单进行检查,如果有缺少则用0代替,检查的结果是12个月的清单,让调用者自己截断; | ||||
|  * 3、将检查后的清单,写入到业绩对象中,只写金额; | ||||
|  * 4、即使请求失败,也将失败的message写入业绩对象,调用渲染函数; | ||||
|  * @param callerInfo 坐席的信息参数,用于请求业绩; | ||||
|  * @param render 渲染函数,用业绩对象CallerArchievement作为参数; | ||||
|  */ | ||||
| function queryCallerArchievement( callerInfo: TelSaler, render: any ): void | ||||
| { | ||||
|     const caller = { | ||||
|         callerCode: callerInfo.telSalerCode, | ||||
|         callName: callerInfo.telSalerName, | ||||
|     }; | ||||
|  | ||||
|     // 默认的业绩对象 | ||||
|     const callArchievement: CallerArchievement = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|         total_archievement: 0, | ||||
|         moto_premium_present_month: 0, | ||||
|         mensual_archievement_list: [], | ||||
|         insurance_renewal_rate: "0.0", | ||||
|         attaching_rate: "0.0", | ||||
|     }; | ||||
|  | ||||
|     // 发送请求 | ||||
|     instance.request({ | ||||
|         method: "post", | ||||
|         url: API_URL.URL_CALLER_ARCHIEVEMENT, | ||||
|         data: caller, | ||||
|     }) | ||||
|         // 请求完成时 | ||||
|         .then(( response: AxiosResponse<any, any> ) => | ||||
|         { | ||||
|             const data = response.data ?? {}; | ||||
|  | ||||
|             console.log( "个人业绩数据", data ); | ||||
|  | ||||
|             callArchievement.success = data.success ?? false; | ||||
|             callArchievement.message = data.message ?? "服务器没有返回调用结果消息,请检查日志!"; | ||||
|             callArchievement.total_archievement = data.total_archievement ?? 0; | ||||
|             callArchievement.moto_premium_present_month = data.motoPremiumPresentMonth ?? 0; | ||||
|             callArchievement.mensual_archievement_list = []; | ||||
|             callArchievement.insurance_renewal_rate = data.insurance_renewal_rate ?? "0.0"; | ||||
|             callArchievement.attaching_rate = data.attaching_rate ?? "0.0"; | ||||
|  | ||||
|             // 检查业绩清单有没有缺漏,缺漏的用0补上 | ||||
|             const checkedList = checkMensualArchievement( data.mensual_archievement_list ); // eslint-disable-line | ||||
|  | ||||
|             // 排序一下 | ||||
|             checkedList.sort(( a: MenusalArchievementItem, b: MenusalArchievementItem ): number => | ||||
|             { | ||||
|                 return a.month - b.month; | ||||
|             }); | ||||
|  | ||||
|             // 将排序后的每月业绩写到业绩对象中 | ||||
|             checkedList.forEach(( item: MenusalArchievementItem ): void => | ||||
|             { | ||||
|                 const premium = Number( item.premium ); | ||||
|  | ||||
|                 callArchievement.mensual_archievement_list.push( premium ); | ||||
|             }); | ||||
|  | ||||
|             // 调用渲染函数 | ||||
|             if ( render !== undefined ) | ||||
|             { | ||||
|                 render( callArchievement ); | ||||
|             } | ||||
|  | ||||
|             console.log( `queryCallerArchievement查询结果${data}` ); | ||||
|         }) | ||||
|         // 请求失败,将失败的原因保存到message属性,调用渲染函数 | ||||
|         .catch(( error: any ) => | ||||
|         { | ||||
|             callArchievement.success = false; | ||||
|             callArchievement.message = String( error ); | ||||
|  | ||||
|             // 调用渲染函数 | ||||
|             if ( render !== undefined ) | ||||
|             { | ||||
|                 render( callArchievement ); | ||||
|             } | ||||
|  | ||||
|             console.log( `queryCallerArchievement:查询坐席${callerInfo.telSalerCode}业绩失败,原因${error}` ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 检查服务器返回的每月业绩数组,检查是否有缺漏,缺少的月份业绩用0代替。 | ||||
|  * 检查的结果是12个月的清单,由调用者自己进行截断。 | ||||
|  * @param mensualArchievementList MenusalArchievementItem类型的数组,为业绩清单 | ||||
|  * @returns 返回MenusalArchievementItem数组,为检查过的清单 | ||||
|  */ | ||||
| function checkMensualArchievement( mensualArchievementList: MenusalArchievementItem[]): MenusalArchievementItem[] | ||||
| { | ||||
|     const checkedList: MenusalArchievementItem[] = []; | ||||
|     const itemMap = new Map(); | ||||
|  | ||||
|     itemMap.set( 1, "0" ); | ||||
|     itemMap.set( 2, "0" ); | ||||
|     itemMap.set( 3, "0" ); | ||||
|     itemMap.set( 4, "0" ); | ||||
|     itemMap.set( 5, "0" ); | ||||
|     itemMap.set( 6, "0" ); | ||||
|     itemMap.set( 7, "0" ); | ||||
|     itemMap.set( 8, "0" ); | ||||
|     itemMap.set( 9, "0" ); | ||||
|     itemMap.set( 10, "0" ); | ||||
|     itemMap.set( 11, "0" ); | ||||
|     itemMap.set( 12, "0" ); | ||||
|  | ||||
|     mensualArchievementList.forEach(( item: MenusalArchievementItem ): void => | ||||
|     { | ||||
|         itemMap.set( item.month, item.premium ); | ||||
|     }); | ||||
|  | ||||
|     itemMap.forEach(( value, key, map ) => | ||||
|     { | ||||
|         const item: MenusalArchievementItem = { | ||||
|             month: key, | ||||
|             premium: value, | ||||
|         }; | ||||
|  | ||||
|         checkedList.push( item ); | ||||
|     }); | ||||
|  | ||||
|     return checkedList; | ||||
| } | ||||
|  | ||||
| export { | ||||
|     queryDepartmentArchievement, | ||||
|     queryCallerArchievement, | ||||
|     type DepartmentArchievement, | ||||
|     type CallerArchievement | ||||
| }; | ||||
|   | ||||
							
								
								
									
										20
									
								
								code/web/task_schedule/src/utils/fileUpload.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								code/web/task_schedule/src/utils/fileUpload.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-27 14:13:47 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/utils/fileUpload.ts | ||||
|  * @Description: 文件上传相关 | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
|  | ||||
| interface FileUploadResponse | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
|     fileList: string[]; | ||||
| } | ||||
|  | ||||
| export { | ||||
|     type FileUploadResponse | ||||
| }; | ||||
| @@ -7,9 +7,9 @@ | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
|  */ | ||||
| import { service as instance } from "./api/request.js"; | ||||
| import { API_URL } from "./api/config.js"; | ||||
| import { type RankingListItem } from "../types/cpicxim/RankingListItem.js"; | ||||
| import { service as instance } from "./api/request.ts"; | ||||
| import { API_URL } from "./api/config.ts"; | ||||
| import { type RankingListItem } from "../types/cpicxim/RankingListItem.ts"; | ||||
|  | ||||
| /** | ||||
|  * 用于请求排行榜数据请求参数 | ||||
| @@ -19,7 +19,7 @@ interface RankingListRequest | ||||
|     departmentCode: string; | ||||
|     year: string; | ||||
|     month: string; | ||||
| }; | ||||
| } | ||||
|  | ||||
| interface RankingListResponse | ||||
| { | ||||
| @@ -30,7 +30,10 @@ interface RankingListResponse | ||||
|     month: string; | ||||
|     attachingRateRankingList: RankingListItem[]; | ||||
|     renewalRateRankingList: RankingListItem[]; | ||||
| }; | ||||
| } | ||||
|  | ||||
| // 判断用的正则表达式 | ||||
| const regexMonth = "(0[1-9])|(1[0-2])"; // eslint-disable-line | ||||
|  | ||||
| /** | ||||
|  * 请求坐席排行榜。 | ||||
| @@ -53,6 +56,9 @@ function requestRankingList( reqParam: RankingListRequest, rander: any ): void / | ||||
|         renewalRateRankingList: [], | ||||
|     }; | ||||
|  | ||||
|     // 检查请求参数 | ||||
|     // TODO: 这里要加一个对month的正则表达式验证。 | ||||
|  | ||||
|     instance.request( | ||||
|         { | ||||
|             method: "post", | ||||
|   | ||||
							
								
								
									
										348
									
								
								code/web/task_schedule/src/utils/reward.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										348
									
								
								code/web/task_schedule/src/utils/reward.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,348 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-11 09:59:00 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/utils/reward.ts | ||||
|  * @Description: 奖励相关的API | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| import { type AxiosResponse } from "axios"; | ||||
| import { service as instance } from "./api/request.ts"; | ||||
| import { API_URL } from "./api/config.ts"; | ||||
|  | ||||
| interface RewardProject | ||||
| { | ||||
|     rewardCode: number; | ||||
|     rewardName: string; | ||||
| } | ||||
|  | ||||
| interface RewardProjectResponse | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
|     rewardList: RewardProject[] | null; | ||||
| } | ||||
|  | ||||
| interface RewardGainer | ||||
| { | ||||
|     recID: number; | ||||
|     callerName: string; | ||||
|     callerCode: string; | ||||
|     rewardProjectCode: string; | ||||
|     rewardProjectName: string; | ||||
| } | ||||
|  | ||||
| interface RewardGainerResponse | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
|     gainerList: RewardGainer[] | null; | ||||
| } | ||||
|  | ||||
| interface AddRewardTelsalerRequest | ||||
| { | ||||
|     telsalerName: string; | ||||
|     rewardIndex: number; | ||||
| } | ||||
|  | ||||
| interface AddRewardTelsalerResponse | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
| } | ||||
|  | ||||
| interface UpdateRewardTelsalerRequest | ||||
| { | ||||
|     recordID: number, | ||||
|     telsalerName: string; | ||||
|     rewardIndex: number; | ||||
| } | ||||
|  | ||||
| interface UpdateRewardTelsalerResponse | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
| } | ||||
|  | ||||
| interface DeleteRewardTelsalerRequest | ||||
| { | ||||
|     recordID: number[]; | ||||
| } | ||||
|  | ||||
| interface DeleteRewardTelsalerResponse | ||||
| { | ||||
|     success: boolean; | ||||
|     message: string; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 请求奖项清单 | ||||
|  * @param handler 用于处理请求数据的回调函数; | ||||
|  */ | ||||
| function requestRewardPorjectsList( handler: any ): void | ||||
| { | ||||
|     if ( handler === undefined || handler === null ) | ||||
|     { | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     const rewardResponse: RewardProjectResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|         rewardList: [], | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         url: API_URL.URL_RWARD_PROJECTS, | ||||
|         method: "post", | ||||
|     }) | ||||
|         // 请求成功,检查服务器返回结果 | ||||
|         .then(( response: AxiosResponse<any, any> ): void => | ||||
|         { | ||||
|             const data = response.data ?? {}; | ||||
|             rewardResponse.success = data.success ?? false; | ||||
|             rewardResponse.message = data.message ?? ""; | ||||
|             rewardResponse.rewardList = checkRewardProjects( data.rewardList ?? []); // eslint-disable-line | ||||
|  | ||||
|             handler( rewardResponse, null ); | ||||
|         }) | ||||
|         .catch(( error: any ): void => | ||||
|         { | ||||
|             console.log( error ); | ||||
|  | ||||
|             rewardResponse.success = false; | ||||
|  | ||||
|             handler( rewardResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 请求获奖人员清单 | ||||
|  * @param handler 处理请求结果的回调函数 | ||||
|  */ | ||||
| function requestRewardGainers( handler: any ): void | ||||
| { | ||||
|     if ( handler === undefined || handler === null ) | ||||
|     { | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     const rewardResponse: RewardGainerResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|         gainerList: [], | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         url: API_URL.URL_REWARD_GAINERS, | ||||
|         method: "post", | ||||
|     }) | ||||
|         .then(( response: AxiosResponse<any, any> ): void => | ||||
|         { | ||||
|             const data = response.data ?? {}; | ||||
|  | ||||
|             rewardResponse.success = data.success; | ||||
|             rewardResponse.message = data.message; | ||||
|             rewardResponse.gainerList = checkRewardGainers( data.gainerList ); // eslint-disable-line | ||||
|  | ||||
|             handler( rewardResponse, null ); | ||||
|         }) | ||||
|         .catch(( error: any ): void => | ||||
|         { | ||||
|             console.log( error ); | ||||
|  | ||||
|             rewardResponse.success = false; | ||||
|  | ||||
|             handler( rewardResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| function addRewardTelsaler( data: AddRewardTelsalerRequest, handler: any ): void | ||||
| { | ||||
|     if ( handler === undefined || handler === null ) | ||||
|     { | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     const addResponse: AddRewardTelsalerResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|     }; | ||||
|  | ||||
|     console.log( "URL:", API_URL.URL_ADD_REWARD_TELSALER ); | ||||
|  | ||||
|     instance.request({ | ||||
|         method: "post", | ||||
|         url: API_URL.URL_ADD_REWARD_TELSALER, | ||||
|         data, | ||||
|     }) | ||||
|         .then(( response: AxiosResponse<any, any> ): void => | ||||
|         { | ||||
|             const data: AddRewardTelsalerResponse = response.data ?? {}; | ||||
|  | ||||
|             addResponse.success = data.success ?? false; | ||||
|             addResponse.message = data.message ?? ""; | ||||
|  | ||||
|             handler( addResponse ); | ||||
|         }) | ||||
|         .catch(( error ): void => | ||||
|         { | ||||
|             console.log( error ); | ||||
|  | ||||
|             addResponse.success = false; | ||||
|             addResponse.message = "请求添加获奖坐席失败,请查看控制台!"; | ||||
|  | ||||
|             handler( addResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 请求更新获奖坐席,根据请求结果调用handler函数。 | ||||
|  * @param data 请求数据 | ||||
|  * @param handler 处理请求结果数据的回调函数。 | ||||
|  */ | ||||
| function updateTelsalerReward( data: UpdateRewardTelsalerRequest, handler: any ): void | ||||
| { | ||||
|     if ( handler === undefined || handler === null ) | ||||
|     { | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     const updateResponse: UpdateRewardTelsalerResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         method: "post", | ||||
|         url: API_URL.URL_UPDATE_REWARD_TELSALER, | ||||
|         data, | ||||
|     }) | ||||
|         .then(( response: AxiosResponse<any, any> ): any => | ||||
|         { | ||||
|             const data: UpdateRewardTelsalerResponse = response.data ?? {}; | ||||
|  | ||||
|             updateResponse.success = data.success ?? false; | ||||
|             updateResponse.message = data.message ?? ""; | ||||
|  | ||||
|             handler( updateResponse ); | ||||
|         }) | ||||
|         .catch(( error: any ): void => | ||||
|         { | ||||
|             updateResponse.success = false; | ||||
|             updateResponse.message = "请求更新获奖坐席失败,请查看控制台!"; | ||||
|  | ||||
|             console.log( error ); | ||||
|             handler( updateResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * 请求删除获奖坐席。 | ||||
|  * @param data 请求数据 | ||||
|  * @param handler 处理请求结果的回调函数 | ||||
|  */ | ||||
| function deleteRewardTelsaler( data: DeleteRewardTelsalerRequest, handler: any ): void | ||||
| { | ||||
|     if ( handler === undefined || handler === null ) | ||||
|     { | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     const deleteResponse: DeleteRewardTelsalerResponse = { | ||||
|         success: false, | ||||
|         message: "", | ||||
|     }; | ||||
|  | ||||
|     instance.request({ | ||||
|         method: "post", | ||||
|         url: API_URL.URL_DEL_REWARD_TELSALER, | ||||
|         data, | ||||
|     }) | ||||
|         .then(( response: AxiosResponse<any, any> ): void => | ||||
|         { | ||||
|             const data: DeleteRewardTelsalerResponse = response.data ?? {}; | ||||
|  | ||||
|             deleteResponse.success = data.success ?? false; | ||||
|             deleteResponse.message = data.message ?? ""; | ||||
|  | ||||
|             handler( deleteResponse ); | ||||
|         }) | ||||
|         .catch(( error: any ): void => | ||||
|         { | ||||
|             deleteResponse.message = "请求删除获奖坐席失败,请检查日志!"; | ||||
|             deleteResponse.success = false; | ||||
|  | ||||
|             console.log( error ); | ||||
|  | ||||
|             handler( deleteResponse, error ); | ||||
|         }); | ||||
| } | ||||
|  | ||||
| // **功能函数 **********************************/ | ||||
| function checkRewardProjects( data: any[]): RewardProject[] | null | ||||
| { | ||||
|     const rewardList: RewardProject[] = []; | ||||
|  | ||||
|     // 检查一下参数的类型,如果不是数组返回 null | ||||
|     if ( !( data instanceof Array )) | ||||
|     { | ||||
|         return null; | ||||
|     } | ||||
|  | ||||
|     data.forEach(( item: any ) => | ||||
|     { | ||||
|         const reward = { | ||||
|             rewardCode: item.rewardCode ?? "", | ||||
|             rewardName: item.rewardName ?? "", | ||||
|         }; | ||||
|  | ||||
|         rewardList.push( reward ); | ||||
|     }); | ||||
|  | ||||
|     return rewardList; | ||||
| } | ||||
|  | ||||
| function checkRewardGainers( gainers: any[]): RewardGainer[] | null | ||||
| { | ||||
|     const gainerList: RewardGainer[] = []; | ||||
|  | ||||
|     if ( !( gainers instanceof Array )) | ||||
|     { | ||||
|         return null; | ||||
|     } | ||||
|  | ||||
|     gainers.forEach(( item: RewardGainer ): void => | ||||
|     { | ||||
|         const gainer: RewardGainer = { | ||||
|             recID: item.recID ?? "", | ||||
|             callerName: item.callerName ?? "", | ||||
|             callerCode: item.callerCode ?? "", | ||||
|             rewardProjectCode: item.rewardProjectCode ?? "", | ||||
|             rewardProjectName: item.rewardProjectName ?? "", | ||||
|         }; | ||||
|  | ||||
|         gainerList.push( gainer ); | ||||
|     }); | ||||
|  | ||||
|     return gainerList; | ||||
| } | ||||
|  | ||||
| export { | ||||
|     type RewardProject, | ||||
|     type RewardGainer, | ||||
|     type RewardProjectResponse, | ||||
|     type RewardGainerResponse, | ||||
|     type DeleteRewardTelsalerRequest, | ||||
|     type DeleteRewardTelsalerResponse, | ||||
|     type AddRewardTelsalerRequest, | ||||
|     type AddRewardTelsalerResponse, | ||||
|     type UpdateRewardTelsalerRequest, | ||||
|     type UpdateRewardTelsalerResponse, | ||||
|     requestRewardPorjectsList, | ||||
|     requestRewardGainers, | ||||
|     addRewardTelsaler, | ||||
|     updateTelsalerReward, | ||||
|     deleteRewardTelsaler | ||||
| }; | ||||
| @@ -1,26 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-03-23 16:05:08 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/DataManagemant.vue | ||||
|  * @Description: | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div> | ||||
|         数据管理 | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| export default { | ||||
|     name: "DataManagement", | ||||
|     setup() | ||||
|     { | ||||
|         return {}; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
|  | ||||
| </style> | ||||
| @@ -26,7 +26,7 @@ export default { | ||||
| { | ||||
|     height: 2000px; | ||||
|     width: 2000px; | ||||
|     background-color: aquamarine; | ||||
|     // background-color: aquamarine; | ||||
|     padding: 0px; | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -17,7 +17,7 @@ | ||||
|         <div class="center-wrapper"> | ||||
|             <span class="slogan">对标先进 比学赶超</span> | ||||
|             <div class="total-archievement-wrapper"> | ||||
|                 <span>总业绩</span> | ||||
|                 <span>我的车险业绩</span> | ||||
|                 <span>{{ getTotalArchievement }}</span> | ||||
|             </div> | ||||
|             <div class="archievement-wrapper"> | ||||
| @@ -25,10 +25,12 @@ | ||||
|                     <ArchievementCompleteRateComponent | ||||
|                         indicator="续保完成率" | ||||
|                         :percentage="ui.insurance_renewal_rate" | ||||
|                         :warning-level="renewalRateWarningLevel(ui.insurance_renewal_rate_target)" | ||||
|                     /> | ||||
|                     <ArchievementCompleteRateComponent | ||||
|                         indicator="车非渗透率" | ||||
|                         :percentage="ui.attaching_rate" | ||||
|                         :warning-level="attachingRateWarningLevel(ui.attaching_rate_target)" | ||||
|                     /> | ||||
|                 </div> | ||||
|                 <div class="total-archievement-charts-wrapper"> | ||||
| @@ -48,37 +50,22 @@ | ||||
|             </div> | ||||
|         </div> | ||||
|         <div class="right-wrapper"> | ||||
|             <h1>本大爷</h1> | ||||
|             <div class="carousel-item"> | ||||
|                 <el-carousel | ||||
|                     arrow="never" | ||||
|                     indicator-position="none" | ||||
|                     :interval="4000" | ||||
|                 > | ||||
|                     <el-carousel-item | ||||
|                         :key="1" | ||||
|                     > | ||||
|                         <RankingListComponent :ranking-list="ui.attachingRankingList" /> | ||||
|                     </el-carousel-item> | ||||
|                     <el-carousel-item :key="2"> | ||||
|                         <RankingListComponent :ranking-list="ui.renewalRankingList" /> | ||||
|                     </el-carousel-item> | ||||
|                 </el-carousel> | ||||
|             </div> | ||||
|             <div class="carousel-item"> | ||||
|                 <el-carousel | ||||
|                     arrow="never" | ||||
|                     indicator-position="none" | ||||
|                     :interval="4000" | ||||
|                 > | ||||
|                     <el-carousel-item :key="1"> | ||||
|                         <RankingListComponent :ranking-list="ui.attachingRankingList" /> | ||||
|                     </el-carousel-item> | ||||
|                     <el-carousel-item :key="2"> | ||||
|                         <RankingListComponent :ranking-list="ui.renewalRankingList" /> | ||||
|                     </el-carousel-item> | ||||
|                 </el-carousel> | ||||
|             </div> | ||||
|             <CallerArchievementComponent | ||||
|                 :caller-name="callerInfo.telSalerName" | ||||
|                 :this-month-premium="ui.callerPersentMonthPremium" | ||||
|                 :attaching-rate="ui.callerAttachingRate" | ||||
|                 :renewal-rate="ui.callerRenewalRate" | ||||
|             /> | ||||
|  | ||||
|             <RankingListComponent | ||||
|                 title="渗透率" | ||||
|                 :ranking-list="ui.attachingRankingList" | ||||
|             /> | ||||
|  | ||||
|             <RankingListComponent | ||||
|                 title="续保率" | ||||
|                 :ranking-list="ui.renewalRankingList" | ||||
|             /> | ||||
|         </div> | ||||
|     </div> | ||||
| </template> | ||||
| @@ -88,15 +75,27 @@ import { computed, reactive, onBeforeMount, onUnmounted } from "vue"; | ||||
| import { useRouter } from "vue-router"; | ||||
| import { getCallerInfo } from "@/utils/api/localStorage.js"; | ||||
| import { ElMessage } from "element-plus"; | ||||
| import { type Archievement, queryDepartmentArchievement } from "@/utils/archievement.js"; | ||||
| import { RankingListItem } from "@/types/cpicxim/RankingListItem.js"; | ||||
| import { type RankingListRequest, type RankingListResponse, requestRankingList } from "@/utils/ranking.js"; | ||||
| import | ||||
| { | ||||
|     type DepartmentArchievement, | ||||
|     type CallerArchievement, | ||||
|     queryDepartmentArchievement, | ||||
|     queryCallerArchievement | ||||
| } from "@/utils/archievement.js"; | ||||
| import { type RankingListItem } from "@/types/cpicxim/RankingListItem.js"; | ||||
| import | ||||
| { | ||||
|     type RankingListRequest, | ||||
|     type RankingListResponse, | ||||
|     requestRankingList | ||||
| } from "@/utils/ranking.js"; | ||||
| import { type Department } from "@/types/cpicxim/Department"; | ||||
| import ArchievementChart from "@/components/ArchievementChartComponent.vue"; | ||||
| import ArchievementCompleteRateComponent from "@/components/ArchievementCompleteRateComponent.vue"; | ||||
| import HonorListComponent from "@/components/HonorListComponent.vue"; | ||||
| import DishonorListComponent from "@/components/DishonorListComponent.vue"; | ||||
| import RankingListComponent from "@/components/RankingListComponent.vue"; | ||||
| import CallerArchievementComponent from "@/components/CallerArchievementComponent.vue"; | ||||
| import { logout } from "@/utils/account.js"; | ||||
| import { type TelSaler } from "@/types/cpicxim/TelSaler"; | ||||
|  | ||||
| @@ -106,14 +105,19 @@ interface ui | ||||
|     chartData: number[]; | ||||
|     totalArchievement: number; | ||||
|     attaching_rate: string; | ||||
|     attaching_rate_target: string; | ||||
|     insurance_renewal_rate: string; // 续保率 | ||||
|     insurance_renewal_rate_target: string; // 续保率 | ||||
|     leading_reward_gainers: string[]; // 领跑奖 | ||||
|     advance_reward_gainers: string[]; // 飞跃奖 | ||||
|     dishonorPersons: string[]; | ||||
|     showUI: boolean; // 用来刷新页面的开关 | ||||
|     attachingRankingList: RankingListItem[]; // 坐席车非渗透率榜单 | ||||
|     renewalRankingList: RankingListItem[]; | ||||
| }; | ||||
|     callerAttachingRate: string; | ||||
|     callerRenewalRate: string; | ||||
|     callerPersentMonthPremium: number; | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     name: "DesktopArchievement", | ||||
| @@ -123,11 +127,29 @@ export default { | ||||
|         HonorListComponent, | ||||
|         DishonorListComponent, | ||||
|         RankingListComponent, | ||||
|         CallerArchievementComponent, | ||||
|     }, | ||||
|     setup() | ||||
|     { | ||||
|         const monthIndex = new Date(); | ||||
|         const numInChinese = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二",]; | ||||
|         const thisMonth: number = monthIndex.getMonth(); // getMonth返回值从0开始。 | ||||
|         const thisMonthString = thisMonth > 10 ? String( thisMonth ) : "0" + String( thisMonth ); | ||||
|         const thisYear: number = monthIndex.getFullYear(); | ||||
|         const thisYearString: string = String( thisYear ); | ||||
|         const numInChinese = [ | ||||
|             "一", | ||||
|             "二", | ||||
|             "三", | ||||
|             "四", | ||||
|             "五", | ||||
|             "六", | ||||
|             "七", | ||||
|             "八", | ||||
|             "九", | ||||
|             "十", | ||||
|             "十一", | ||||
|             "十二", | ||||
|         ]; | ||||
|         const router = useRouter(); | ||||
|         const callerInfo: TelSaler = getCallerInfo(); | ||||
|         const ui: ui = reactive({ | ||||
| @@ -135,20 +157,24 @@ export default { | ||||
|             chartData: [0,], // 业绩表 | ||||
|             totalArchievement: 0, // 总业绩 | ||||
|             attaching_rate: "", // 车非渗透率 | ||||
|             attaching_rate_target: "", // 车非渗透率目标值 | ||||
|             insurance_renewal_rate: "", // 续保率 | ||||
|             insurance_renewal_rate_target: "", // 续保率目标值 | ||||
|             leading_reward_gainers: ["",], // 领跑奖 | ||||
|             advance_reward_gainers: ["",], // 飞跃奖 | ||||
|             dishonorPersons: ["",], | ||||
|             showUI: true, // 用来刷新页面的开关 | ||||
|             attachingRankingList: [], // 坐席车非渗透率榜单 | ||||
|             renewalRankingList: [], // 坐席续保率榜单 | ||||
|             callerAttachingRate: "0.0", | ||||
|             callerRenewalRate: "0.0", | ||||
|             callerPersentMonthPremium: 0, | ||||
|         }); | ||||
|         let timerHandler = 0; | ||||
|  | ||||
|         const getTotalArchievement = computed(() => | ||||
|         { | ||||
|             const cnyFormat = new Intl.NumberFormat( "zh-cn", | ||||
|         const getTotalArchievement = computed((): string => | ||||
|         { | ||||
|             const cnyFormat = new Intl.NumberFormat( "zh-cn", { | ||||
|                 style: "currency", | ||||
|                 currency: "CNY", | ||||
|                 minimumFractionDigits: 0, | ||||
| @@ -158,15 +184,32 @@ export default { | ||||
|             return archievement; | ||||
|         }); | ||||
|  | ||||
|         // 保存业绩数据 | ||||
|         const applyArchievementData = ( data: Archievement ) => | ||||
|         /** | ||||
|          * 将请求函数获取的部门业绩数据,渲染到页面上。 | ||||
|          * @param data DepartmentArchievementl类型的部门业绩数据对象 | ||||
|          */ | ||||
|         const applyDepartmentArchievementData = ( data: DepartmentArchievement ): void => | ||||
|         { | ||||
|             console.log( "部门业绩数据", data ); | ||||
|             // console.log( "部门业绩数据", data ); | ||||
|  | ||||
|             ui.chartData = data.mensual_archievement_list; | ||||
|             ui.totalArchievement = data.total_archievement; | ||||
|             // 检查请求是否成功 | ||||
|             if ( !data.success ) | ||||
|             { | ||||
|                 // 失败就提示消息,然后退出 | ||||
|                 ElMessage({ | ||||
|                     message: data.message, | ||||
|                     type: "error", | ||||
|                 }); | ||||
|  | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|             // ui.chartData = data.mensual_archievement_list; | ||||
|             // ui.totalArchievement = data.total_archievement; | ||||
|             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_target = data.insurance_renewal_rate_target; | ||||
|             ui.leading_reward_gainers = data.leading_reward_gainers; | ||||
|             ui.advance_reward_gainers = data.advance_reward_gainers; | ||||
|             ui.dishonorPersons = data.backward_list; | ||||
| @@ -175,7 +218,44 @@ export default { | ||||
|             // 先不显示界面,往队列中加入显示队列的回调,让vue刷新组件。 | ||||
|             ui.showUI = false; | ||||
|  | ||||
|             setTimeout(() => { ui.showUI = true; }, 0 ); | ||||
|             setTimeout(() => | ||||
|             { | ||||
|                 ui.showUI = true; | ||||
|             }, 0 ); | ||||
|         }; | ||||
|  | ||||
|         /** | ||||
|          * 将请求的坐席业绩数据渲染到页面 | ||||
|          * @param data  | ||||
|          */ | ||||
|         const applyCallerArchievementData = ( data: CallerArchievement ): void => | ||||
|         { | ||||
|             // 检查请求是否成功 | ||||
|             if ( !data.success ) | ||||
|             { | ||||
|                 // 失败就提示消息,然后退出 | ||||
|                 ElMessage({ | ||||
|                     message: data.message, | ||||
|                     type: "error", | ||||
|                 }); | ||||
|  | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|             ui.chartData = data.mensual_archievement_list.slice( 0, thisMonth ); | ||||
|             ui.totalArchievement = data.total_archievement; | ||||
|             ui.callerAttachingRate = data.attaching_rate; | ||||
|             ui.callerRenewalRate = data.insurance_renewal_rate; | ||||
|             ui.callerPersentMonthPremium = data.moto_premium_present_month; | ||||
|             // ui.callerPersentMonthPremium = data.mensual_archievement_list[thisMonth]; | ||||
|  | ||||
|             console.log( "业绩清单", data ); | ||||
|  | ||||
|             ui.showUI = false; | ||||
|             setTimeout(() => | ||||
|             { | ||||
|                 ui.showUI = true; | ||||
|             }, 0 ); | ||||
|         }; | ||||
|  | ||||
|         const applyRankingListData = ( data: RankingListResponse ): void => | ||||
| @@ -189,11 +269,14 @@ export default { | ||||
|  | ||||
|             console.log( "获取排行榜后的ui:", data ); | ||||
|  | ||||
|             setTimeout(() => { ui.showUI = true; }, 0 ); | ||||
|             setTimeout(() => | ||||
|             { | ||||
|                 ui.showUI = true; | ||||
|             }, 0 ); | ||||
|         }; | ||||
|  | ||||
|         // 退出桌面霸屏 | ||||
|         const logoutDesktopArchievement = () => | ||||
|         const logoutDesktopArchievement = (): void => | ||||
|         { | ||||
|             console.log( "111" ); | ||||
|             logout(); | ||||
| @@ -210,28 +293,29 @@ export default { | ||||
|                 center: true, | ||||
|             }); | ||||
|  | ||||
|             router.push( "/login" ); | ||||
|             router.push( "/login" ).then(() => {}).catch(() => {}); | ||||
|         } | ||||
|  | ||||
|         /** | ||||
|          * 刷新页面 | ||||
|          * 用于定时对页面进行刷新,其中会请求最新的业绩数据。 | ||||
|          */ | ||||
|         const refresh = () => | ||||
|         { | ||||
|             const deparmentInfo: Department = | ||||
|         const refresh = (): void => | ||||
|         { | ||||
|             const deparmentInfo: Department = { | ||||
|                 departmentCode: callerInfo.departmentCode, | ||||
|                 departmentName: callerInfo.departmentName, | ||||
|             }; | ||||
|  | ||||
|             const rankinglistRequest: RankingListRequest = | ||||
|             { | ||||
|             const rankinglistRequest: RankingListRequest = { | ||||
|                 departmentCode: callerInfo.departmentCode, | ||||
|                 year: "2023", | ||||
|                 month: "06", | ||||
|                 year: thisYearString, | ||||
|                 month: thisMonthString, | ||||
|             }; | ||||
|  | ||||
|             queryDepartmentArchievement( deparmentInfo, applyArchievementData ); | ||||
|             console.log( "refresh", rankinglistRequest ); | ||||
|  | ||||
|             queryDepartmentArchievement( deparmentInfo, applyDepartmentArchievementData ); | ||||
|             queryCallerArchievement( callerInfo, applyCallerArchievementData ); | ||||
|             requestRankingList( rankinglistRequest, applyRankingListData ); | ||||
|         }; | ||||
|  | ||||
| @@ -255,7 +339,63 @@ export default { | ||||
|             clearInterval( timerHandler ); | ||||
|         }); | ||||
|  | ||||
|         return { ui, callerInfo, timerHandler, getTotalArchievement, renderData: applyArchievementData, refresh, logoutDesktopArchievement, }; | ||||
|         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 { | ||||
|             ui, | ||||
|             callerInfo, | ||||
|             timerHandler, | ||||
|             getTotalArchievement, | ||||
|             renderData: applyDepartmentArchievementData, | ||||
|             refresh, | ||||
|             logoutDesktopArchievement, | ||||
|             attachingRateWarningLevel, | ||||
|             renewalRateWarningLevel, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| @@ -300,7 +440,7 @@ export default { | ||||
|             size: 90px; | ||||
|         } | ||||
|  | ||||
|         color: $color-bg-04; | ||||
|         color: $color-title-font; | ||||
|         text-shadow: #feebb1 0px 0px, | ||||
|         #feebb1 5px 0px, | ||||
|         #feebb1 -5px -0px, | ||||
| @@ -388,12 +528,13 @@ export default { | ||||
|     // >*+* { | ||||
|     //     margin-top: 15px; | ||||
|     // } | ||||
|     > h1 { | ||||
|     >h1 { | ||||
|         font: { | ||||
|             family: "FZ-ZHUOHEI"; | ||||
|             weight: 100; | ||||
|             size: 30px; | ||||
|         } | ||||
|  | ||||
|         color: $color-bg-04; | ||||
|  | ||||
|         text-align: center; | ||||
| @@ -401,11 +542,19 @@ export default { | ||||
|         width: 300px; | ||||
|     } | ||||
|  | ||||
|     > div { | ||||
|     .carousel-item { | ||||
|         // 为了限制走马灯组件的高度 | ||||
|         display: block; | ||||
|         height: 260px; | ||||
|         width: 300px; | ||||
|     } | ||||
|  | ||||
|     // >div { | ||||
|     //     // 为了限制走马灯组件的高度 | ||||
|     //     display: block; | ||||
|     //     height: 260px; | ||||
|     //     width: 300px; | ||||
|     // } | ||||
| } | ||||
| </style> | ||||
| <style lang="scss"> | ||||
| @@ -416,7 +565,7 @@ body { | ||||
|             $color-bg-03, | ||||
|             $color-bg-04, | ||||
|             $color-bg-05, | ||||
|             $color-bg-05); | ||||
|             $color-bg-05 ); | ||||
| } | ||||
|  | ||||
| div { | ||||
|   | ||||
| @@ -71,7 +71,7 @@ import { saveStaffInfo, getUserType, saveUserType, getCallerInfo, saveCallerInfo | ||||
| import { login, loginCaller, type LoginCallerInfo, type LoginCallerResult } from "@/utils/account"; | ||||
| import { ElMessage } from "element-plus"; | ||||
| import { StaffInfo } from "@/types/cpicxim/StaffInfo"; | ||||
| import { TelSaler } from "@/types/cpicxim/TelSaler"; | ||||
| import { type TelSaler } from "@/types/cpicxim/TelSaler"; | ||||
|  | ||||
| export default { | ||||
|     name: "LoginPage", | ||||
| @@ -95,7 +95,7 @@ export default { | ||||
|         /** | ||||
|          * 保存p13账号 | ||||
|          */ | ||||
|         const savedP13uid = () => | ||||
|         const savedP13uid = (): void => | ||||
|         { | ||||
|             window.localStorage.setItem( "stuff_account", ui.account ); | ||||
|         }; | ||||
| @@ -103,7 +103,7 @@ export default { | ||||
|         /** | ||||
|          * 登录函数,根据ui.currentMenu判断登录的是坐席还是员工。 | ||||
|          */ | ||||
|         const onLogin = () => | ||||
|         const onLogin = (): void => | ||||
|         { | ||||
|             // 保存用户类型 | ||||
|             saveUserType( ui.currentMenu ); | ||||
| @@ -145,7 +145,7 @@ export default { | ||||
|                             saveStaffInfo( staffInfo ); | ||||
|  | ||||
|                             // 跳转路由 | ||||
|                             router.push( "/desktop" ); | ||||
|                             router.push( "/desktop" ).then(() => {}).catch(() => {}); | ||||
|                         } | ||||
|                         else | ||||
|                         { | ||||
| @@ -169,7 +169,7 @@ export default { | ||||
|             { | ||||
|                 // 是坐席 | ||||
|                 const loginInfo: LoginCallerInfo = { | ||||
|                     telsaler_code: ui.account, | ||||
|                     telsaler: ui.account, | ||||
|                 }; | ||||
|  | ||||
|                 // 登录 | ||||
| @@ -177,12 +177,12 @@ export default { | ||||
|                     // 调用接口成功 | ||||
|                     .then(( response ) => | ||||
|                     { | ||||
|                         const data:LoginCallerResult = response.data ?? { success: false, }; | ||||
|                         const data: LoginCallerResult = response.data ?? { success: false, }; | ||||
|  | ||||
|                         // debugger; | ||||
|  | ||||
|                         // 查看標志位 | ||||
|                         if ( data.success === true ) | ||||
|                         if ( data.success ) | ||||
|                         { | ||||
|                             // 查询成功,显示一个提示,保存工号,并跳转路由 | ||||
|                             ElMessage({ | ||||
| @@ -190,7 +190,7 @@ export default { | ||||
|                                 type: "success", | ||||
|                             }); | ||||
|  | ||||
|                             const telsaler:TelSaler = { | ||||
|                             const telsaler: TelSaler = { | ||||
|                                 telSalerCode: data.tel_saler_code, | ||||
|                                 telSalerName: data.tel_saler_name, | ||||
|                                 teamCode: data.team_code, | ||||
| @@ -201,7 +201,7 @@ export default { | ||||
|  | ||||
|                             saveCallerInfo( telsaler ); | ||||
|  | ||||
|                             router.push( "/desktop_archievement" ); | ||||
|                             router.push( "/desktop_archievement" ).then(() => {}).catch(() => {}); | ||||
|                         } | ||||
|                         else | ||||
|                         { | ||||
| @@ -249,7 +249,7 @@ export default { | ||||
|                     }); | ||||
|  | ||||
|                     // 跳转路由 | ||||
|                     router.push( "/desktop_archievement" ); | ||||
|                     router.push( "/desktop_archievement" ).then(() => {}).catch(() => {}); | ||||
|                 } | ||||
|             } | ||||
|             else if ( staffType === "cpicxim_staff" ) | ||||
| @@ -258,7 +258,7 @@ export default { | ||||
|             } | ||||
|         }); | ||||
|  | ||||
|         const onToggleMenu = ( type: string ) => | ||||
|         const onToggleMenu = ( type: string ): void => | ||||
|         { | ||||
|             ui.currentMenu = type; | ||||
|         }; | ||||
|   | ||||
							
								
								
									
										393
									
								
								code/web/task_schedule/src/views/RewardManagement.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										393
									
								
								code/web/task_schedule/src/views/RewardManagement.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,393 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-03-23 16:05:08 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/RewardManagement.vue | ||||
|  * @Description: | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div | ||||
|         v-if="ui.showUI" | ||||
|         class="wrapper" | ||||
|     > | ||||
|         <div class="reward-wrapper"> | ||||
|             <div class="reward-gainer-wrapper"> | ||||
|                 <el-divider content-position="left"> | ||||
|                     90俱乐部 & “消7灭6”包围战 | ||||
|                 </el-divider> | ||||
|                 <div class="toolbutton-wrapper"> | ||||
|                     <el-button | ||||
|                         type="primary" | ||||
|                         icon="documentAdd" | ||||
|                         @click="onAddRewardGainer" | ||||
|                     > | ||||
|                         新增 | ||||
|                     </el-button> | ||||
|                     <el-button | ||||
|                         type="danger" | ||||
|                         icon="delete" | ||||
|                         @click="onDeleteRewardGainer" | ||||
|                     > | ||||
|                         删除 | ||||
|                     </el-button> | ||||
|                     <el-button | ||||
|                         type="warning" | ||||
|                         icon="Refresh" | ||||
|                         @click="refresh" | ||||
|                     > | ||||
|                         刷新 | ||||
|                     </el-button> | ||||
|                 </div> | ||||
|                 <el-table | ||||
|                     ref="rewardTelsalerTable" | ||||
|                     border | ||||
|                     stripe | ||||
|                     style="width:100%;" | ||||
|                     :data="rewardGainerData" | ||||
|                 > | ||||
|                     <el-table-column type="selection" /> | ||||
|                     <el-table-column | ||||
|                         label="坐席名称" | ||||
|                         align="center" | ||||
|                     > | ||||
|                         <template #default="rewardGainer"> | ||||
|                             <span | ||||
|                                 class="reward-gainer-td" | ||||
|                                 @dblclick="onEditRewardGainer(rewardGainer.row.recID, rewardGainer.row.callerName, rewardGainer.row.rewardProjectCode)" | ||||
|                             >{{ rewardGainer.row.callerName }}</span> | ||||
|                         </template> | ||||
|                     </el-table-column> | ||||
|                     <el-table-column | ||||
|                         label="奖项名称" | ||||
|                         align="center" | ||||
|                     > | ||||
|                         <template #default="rewardGainer"> | ||||
|                             <span | ||||
|                                 class="reward-gainer-td" | ||||
|                                 @dblclick="onEditRewardGainer( rewardGainer.row.recID, rewardGainer.row.callerName, rewardGainer.row.rewardProjectCode)" | ||||
|                             >{{ rewardGainer.row.rewardProjectName }}</span> | ||||
|                         </template> | ||||
|                     </el-table-column> | ||||
|                 </el-table> | ||||
|                 <div class="pagination-wrapper"> | ||||
|                     <el-pagination | ||||
|                         v-model="ui.tablePageIndex" | ||||
|                         class="pull_left" | ||||
|                         size="small" | ||||
|                         background | ||||
|                         :page-size="ui.tablePageSize" | ||||
|                         :page-sizes="[10, 20, 50, 100]" | ||||
|                         layout="total, sizes, prev, pager, next, jumper" | ||||
|                         :total="(ui.rewardGainerList ?? []).length" | ||||
|                         @current-change="onCurrentPageIndexChange" | ||||
|                         @size-change="onTablePageSizeChange" | ||||
|                     /> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
|         <div | ||||
|             v-if="ui.showEditRewardGainerDialog" | ||||
|             class="dialog-wrapper" | ||||
|         > | ||||
|             <el-dialog | ||||
|                 v-model="ui.showEditRewardGainerDialog" | ||||
|                 title="编辑获奖人员" | ||||
|                 width="400px" | ||||
|             > | ||||
|                 <RewardGainerDialog | ||||
|                     :selected-rec-id="(ui.selectedRecID ?? -9999)" | ||||
|                     :selected-reward-project-code="ui.selectedRewardProjectCode" | ||||
|                     :selected-telsaler-name="ui.selectedTelsalerName" | ||||
|                 /> | ||||
|             </el-dialog> | ||||
|         </div> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { reactive, computed, onBeforeMount, ref } from "vue"; | ||||
| import { type RewardGainer, type RewardGainerResponse, requestRewardGainers, type DeleteRewardTelsalerResponse, deleteRewardTelsaler, type DeleteRewardTelsalerRequest } from "@/utils/reward.js"; | ||||
| import eventBus from "@/utils/api/EventBus.js"; | ||||
| import { ElMessage, ElMessageBox, type ElTable } from "element-plus"; | ||||
| import RewardGainerDialog from "@/views/reward/RewardTelsaler.vue"; | ||||
|  | ||||
| interface UI | ||||
| { | ||||
|     showUI: boolean; | ||||
|     showEditRewardGainerDialog: boolean; | ||||
|     rewardGainerList: RewardGainer[] | null; | ||||
|     tablePageIndex: number; | ||||
|     tablePageSize: number; | ||||
|     selectedRecID: number | null; | ||||
|     selectedTelsalerName: string; | ||||
|     selectedRewardProjectCode: number; | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     name: "RewardManagement", | ||||
|     components: { RewardGainerDialog, }, | ||||
|     setup() | ||||
|     { | ||||
|         const ui: UI = reactive({ | ||||
|             showUI: true, | ||||
|             showEditRewardGainerDialog: false, | ||||
|             rewardGainerList: null, | ||||
|             tablePageIndex: 1, | ||||
|             tablePageSize: 10, | ||||
|             selectedRecID: null, | ||||
|             selectedTelsalerName: "", | ||||
|             selectedRewardProjectCode: -999, | ||||
|         }); | ||||
|         const rewardTelsalerTable = ref<InstanceType<typeof ElTable>>(); | ||||
|  | ||||
|         /** 请求数据相关 ***************************/ | ||||
|         const requestRewardTelsalerListHandler = ( response: RewardGainerResponse, error: any ): void => | ||||
|         { | ||||
|             if ( !response.success ) | ||||
|             { | ||||
|                 console.log( error ); | ||||
|  | ||||
|                 ElMessageBox({ | ||||
|                     message: "请求获奖人列表失败,请查看日志!", | ||||
|                     type: "error", | ||||
|                     center: true, | ||||
|                 }) | ||||
|                     .then((): void => {}) | ||||
|                     .catch((): void => {}); | ||||
|  | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|             ui.rewardGainerList = response.gainerList; | ||||
|  | ||||
|             console.log( "请求获奖人员列表", ui.rewardGainerList ); | ||||
|  | ||||
|             refreshUI(); | ||||
|         }; | ||||
|  | ||||
|         /** 表格相关 ***************************/ | ||||
|         const tableHeight = computed((): number => | ||||
|         { | ||||
|             return ( ui.tablePageSize + 1 ) * 40; | ||||
|         }); | ||||
|  | ||||
|         /** | ||||
|          * 用于根据分页组件的参数,生成表格用的数据。 | ||||
|          */ | ||||
|         const rewardGainerData = computed((): RewardGainer[] => | ||||
|         { | ||||
|             // 防御性验证 | ||||
|             if ( ui.rewardGainerList === null ) | ||||
|             { | ||||
|                 return []; | ||||
|             } | ||||
|  | ||||
|             const startIndex = ui.tablePageSize * ( ui.tablePageIndex - 1 ); | ||||
|             const endIndex = startIndex + ui.tablePageSize; | ||||
|             const data = ui.rewardGainerList.slice( startIndex, endIndex ); | ||||
|             console.log( ui.tablePageSize, ui.tablePageIndex ); | ||||
|             console.log( "表格数据:", data ); | ||||
|  | ||||
|             return data; | ||||
|         }); | ||||
|  | ||||
|         const onCurrentPageIndexChange = ( pageIndex: number ): void => | ||||
|         { | ||||
|             ui.tablePageIndex = pageIndex; | ||||
|         }; | ||||
|  | ||||
|         const onTablePageSizeChange = ( pageSize: number ): void => | ||||
|         { | ||||
|             ui.tablePageSize = pageSize; | ||||
|         }; | ||||
|  | ||||
|         /** 功能按钮相关 *******************************/ | ||||
|         /** | ||||
|          * 添加获奖坐席 | ||||
|          */ | ||||
|         const onAddRewardGainer = (): void => | ||||
|         { | ||||
|             ui.selectedRecID = -1; | ||||
|             ui.selectedRewardProjectCode = 3; | ||||
|             ui.selectedTelsalerName = ""; | ||||
|             ui.showEditRewardGainerDialog = true; | ||||
|         }; | ||||
|         /** | ||||
|          * 响应用户在表格中的双击 | ||||
|          * @param telsalerName  | ||||
|          * @param rewardProjectName  | ||||
|          */ | ||||
|         const onEditRewardGainer = ( recID: number, telsalerName: string, rewardProjectCode: number ): void => | ||||
|         { | ||||
|             console.log( "编辑获奖清单", recID, telsalerName, rewardProjectCode ); | ||||
|  | ||||
|             ui.selectedRecID = recID; | ||||
|             ui.selectedTelsalerName = telsalerName; | ||||
|             ui.selectedRewardProjectCode = rewardProjectCode; | ||||
|             ui.showEditRewardGainerDialog = true; | ||||
|         }; | ||||
|         /** | ||||
|          * 响应点击删除按钮 | ||||
|          */ | ||||
|         const onDeleteRewardGainer = (): void => | ||||
|         { | ||||
|             const selectedRecord: RewardGainer[] = rewardTelsalerTable.value?.getSelectionRows(); | ||||
|             const deleteRequest: DeleteRewardTelsalerRequest = { | ||||
|                 recordID: [], | ||||
|             }; | ||||
|  | ||||
|             if ( selectedRecord !== undefined ) | ||||
|             { | ||||
|                 selectedRecord.forEach(( item: RewardGainer ): void => | ||||
|                 { | ||||
|                     deleteRequest.recordID.push( item.recID ); | ||||
|                 }); | ||||
|             } | ||||
|  | ||||
|             deleteRewardTelsaler( deleteRequest, deleteTelsalerRewardHandler ); | ||||
|         }; | ||||
|  | ||||
|         /** 回调函数 ************************/ | ||||
|         const deleteTelsalerRewardHandler = ( response: DeleteRewardTelsalerResponse, error: any ): void => | ||||
|         { | ||||
|             if ( response.success ) | ||||
|             { | ||||
|                 ElMessage({ | ||||
|                     message: response.message, | ||||
|                     type: "success", | ||||
|                 }); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 ElMessageBox({ | ||||
|                     message: response.message, | ||||
|                     type: "error", | ||||
|                 }) | ||||
|                     .then(() => {}) | ||||
|                     .catch(() => {}); | ||||
|             } | ||||
|  | ||||
|             refresh(); | ||||
|         }; | ||||
|  | ||||
|         /** 事件相关 ***************/ | ||||
|         /** 订阅新增和保存修改获奖者事件 */ | ||||
|         eventBus.on( "onSavedRewardTelsaler", (): void => | ||||
|         { | ||||
|             // 关闭对话框后,重新请求获奖清单,刷新页面。 | ||||
|             ui.showEditRewardGainerDialog = false; | ||||
|  | ||||
|             refresh(); | ||||
|         }); | ||||
|         /** | ||||
|          * 用于刷新页面 | ||||
|          */ | ||||
|         const refresh = (): void => | ||||
|         { | ||||
|             requestRewardGainers( requestRewardTelsalerListHandler ); | ||||
|         }; | ||||
|  | ||||
|         const refreshUI = (): void => | ||||
|         { | ||||
|             ui.showUI = false; | ||||
|  | ||||
|             setTimeout(() => | ||||
|             { | ||||
|                 ui.showUI = true; | ||||
|             }, 0 ); | ||||
|         }; | ||||
|  | ||||
|         onBeforeMount((): void => | ||||
|         { | ||||
|             refresh(); | ||||
|         }); | ||||
|  | ||||
|         return { | ||||
|             ui, | ||||
|             tableHeight, | ||||
|             rewardGainerData, | ||||
|             rewardTelsalerTable, | ||||
|             onCurrentPageIndexChange, | ||||
|             onTablePageSizeChange, | ||||
|             onEditRewardGainer, | ||||
|             refresh, | ||||
|             onAddRewardGainer, | ||||
|             onDeleteRewardGainer, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
| @import "@/assets/css/public/_public.scss"; | ||||
|  | ||||
| .wrapper { | ||||
|     margin: 10px; | ||||
|     // padding: 10px; | ||||
|  | ||||
|     // background-color: #fff; | ||||
|     // border-radius: 5px; | ||||
|     // box-shadow: $box-shadow; | ||||
|  | ||||
|     // &:hover { | ||||
|     //     box-shadow: $box-shadow-hover; | ||||
|     // } | ||||
|  | ||||
|     min-width: 800px; | ||||
|  | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
| } | ||||
|  | ||||
| .reward-wrapper { | ||||
|     display: flex; | ||||
|     justify-content: center; | ||||
|     align-items: center; | ||||
|  | ||||
|     >div { | ||||
|         background-color: #fff; | ||||
|         border-radius: 5px; | ||||
|         box-shadow: $box-shadow; | ||||
|  | ||||
|         padding: 10px; | ||||
|  | ||||
|         &:hover { | ||||
|             box-shadow: $box-shadow-hover; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     >*+* { | ||||
|         margin-left: 10px; | ||||
|     } | ||||
| } | ||||
|  | ||||
| .reward-gainer-wrapper { | ||||
|     flex-grow: 1; | ||||
| } | ||||
|  | ||||
| .dishonor-wrapper { | ||||
|     flex-grow: 1; | ||||
| } | ||||
|  | ||||
| .toolbutton-wrapper { | ||||
|     text-align: left; | ||||
|     margin-bottom: 10px; | ||||
|     >*+* { | ||||
|         margin-left: 15px; | ||||
|     } | ||||
| } | ||||
|  | ||||
| .pagination-wrapper { | ||||
|     margin-top: 10px; | ||||
|  | ||||
|     display: flex; | ||||
|     justify-content: flex-end; | ||||
| } | ||||
|  | ||||
| .reward-gainer-td { | ||||
|     cursor: pointer; | ||||
|  | ||||
|     display: block; | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										98
									
								
								code/web/task_schedule/src/views/data/DataManagement.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								code/web/task_schedule/src/views/data/DataManagement.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,98 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-25 09:48:25 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/data/DataManagement.vue | ||||
|  * @Description: 数据管理view | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div class="data_management_wrapper"> | ||||
|         <el-tabs> | ||||
|             <el-tab-pane label="坐席车非渗透率"> | ||||
|                 <TelsalerAttachingRateView /> | ||||
|             </el-tab-pane> | ||||
|             <el-tab-pane label="坐席续保率"> | ||||
|                 <TelsalerRenewalRateView /> | ||||
|             </el-tab-pane> | ||||
|             <el-tab-pane label="机构渗透率"> | ||||
|                 <DepartmentAttachingRateView /> | ||||
|             </el-tab-pane> | ||||
|             <el-tab-pane label="机构续保率"> | ||||
|                 <DepartmentRenewalRateView /> | ||||
|             </el-tab-pane> | ||||
|         </el-tabs> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { ref, reactive } from "vue"; | ||||
| import { ElMessage, ElMessageBox, type UploadFile, type UploadFiles, type UploadProps, type UploadUserFile } from "element-plus"; | ||||
| import TelsalerAttachingRateView from "@/views/data/bi/TelsalerAttachingRateView.vue"; | ||||
| import TelsalerRenewalRateView from "@/views/data/bi/TelsalerRenewalRateView.vue"; | ||||
| import DepartmentRenewalRateView from "@/views/data/bi/DepartmentRenewalRateView.vue"; | ||||
| import DepartmentAttachingRateView from "@/views/data/bi/DepartmentAttachingRateView.vue"; | ||||
|  | ||||
| export default { | ||||
|     name: "DataManagement", | ||||
|     components: { TelsalerAttachingRateView, TelsalerRenewalRateView, DepartmentRenewalRateView, DepartmentAttachingRateView, }, | ||||
|     setup() | ||||
|     { | ||||
|         const ui = reactive({ | ||||
|             showUI: false, | ||||
|             fileList: ref<UploadUserFile[]>([]), | ||||
|             uploadData: { | ||||
|                 "task-name": "1234", | ||||
|             }, | ||||
|         }); | ||||
|  | ||||
|         const handleRemove: UploadProps["onRemove"] = ( file, uploadFile ) => | ||||
|         { | ||||
|             console.log( file, uploadFile ); | ||||
|         }; | ||||
|  | ||||
|         const handlePreview: UploadProps["onPreview"] = ( uploadFile ) => | ||||
|         { | ||||
|             console.log( uploadFile ); | ||||
|         }; | ||||
|  | ||||
|         const handleExceed: UploadProps["onExceed"] = ( files, uploadFiles ) => | ||||
|         { | ||||
|             ElMessage.warning( "一次只能上传三个文件!" ); | ||||
|         }; | ||||
|  | ||||
|         const beforeRemove: UploadProps["beforeRemove"] = async ( uploadFile, uploadFiles ) => | ||||
|         { | ||||
|             return await ElMessageBox.confirm( | ||||
|                 `放弃上传${uploadFile.name}` | ||||
|             ) | ||||
|                 .then(() => true, () => false ); | ||||
|         }; | ||||
|  | ||||
|         const handleUploadSuccess = ( response: any, uploadFile: UploadFile, uploadFiles: UploadFiles ): void => | ||||
|         { | ||||
|             console.log( response ); | ||||
|         }; | ||||
|  | ||||
|         return { | ||||
|             ui, | ||||
|             handleRemove, | ||||
|             handlePreview, | ||||
|             handleExceed, | ||||
|             beforeRemove, | ||||
|             handleUploadSuccess, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss"> | ||||
| .data_management_wrapper { | ||||
|     margin: 10px; | ||||
|  | ||||
|     min-width: 800px; | ||||
|  | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										250
									
								
								code/web/task_schedule/src/views/data/DataUploadView.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										250
									
								
								code/web/task_schedule/src/views/data/DataUploadView.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,250 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-17 10:56:43 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/data/DataUploadView.vue | ||||
|  * @Description: 上传文件用的组件 | ||||
|  * | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div class="bi-dataupload-wrapper"> | ||||
|         <div class="query-box-wrapper"> | ||||
|             <el-row :gutter="10"> | ||||
|                 <el-col :span="4"> | ||||
|                     <span>报表类型</span> | ||||
|                 </el-col> | ||||
|                 <el-col :span="9"> | ||||
|                     <el-select v-model="ui.selectedReportType"> | ||||
|                         <el-option | ||||
|                             v-for="item in ui.reportType" | ||||
|                             :key="item.reportTypeCode" | ||||
|                             :label="item.reportTypeName" | ||||
|                             :value="item.reportTypeCode" | ||||
|                             width="100%" | ||||
|                         /> | ||||
|                     </el-select> | ||||
|                 </el-col> | ||||
|                 <el-col :span="4"> | ||||
|                     <span>sheet编号</span> | ||||
|                 </el-col> | ||||
|                 <el-col :span="6"> | ||||
|                     <el-input v-model.lazy.number="ui.sheetIndex" /> | ||||
|                 </el-col> | ||||
|             </el-row> | ||||
|             <el-row :gutter="10"> | ||||
|                 <el-col :span="4"> | ||||
|                     <span>起始行</span> | ||||
|                 </el-col> | ||||
|                 <el-col :span="9"> | ||||
|                     <el-input v-model.lazy.number="ui.firstRow" /> | ||||
|                 </el-col> | ||||
|                 <el-col :span="11"> | ||||
|                     <span style="text-align:left;color:red;">*从0开始计数</span> | ||||
|                 </el-col> | ||||
|             </el-row> | ||||
|         </div> | ||||
|         <el-upload | ||||
|             drag | ||||
|             :action="ui.urlFileUpload" | ||||
|             name="files" | ||||
|             :show-file-list="false" | ||||
|             :data="ui.uploadParameters" | ||||
|             :on-success="onUploadSuccess" | ||||
|         > | ||||
|             <el-icon class="el-icon--upload"> | ||||
|                 <upload-filled /> | ||||
|             </el-icon> | ||||
|             <div class="el-upload__text"> | ||||
|                 将文件拖到此处,或<em>点击上传</em> | ||||
|             </div> | ||||
|         </el-upload> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { reactive, onBeforeMount } from "vue"; | ||||
| import { | ||||
|     type BIReportType, | ||||
|     type ImportBIReportRequest, | ||||
|     type ImportBIReportResponse, | ||||
|     type ImportBIReportResponseHandler, | ||||
|     importBIReport | ||||
| } from "@/utils/BIReport.js"; | ||||
| import { API_URL } from "@/utils/api/config.js"; | ||||
| import { type FileUploadResponse } from "@/utils/fileUpload.js"; | ||||
| // import { UploadFilled } from "@element-plus/icons-vue"; | ||||
| import { type UploadProps, type UploadFile, type UploadFiles, ElMessage, ElMessageBox } from "element-plus"; | ||||
|  | ||||
| interface UI | ||||
| { | ||||
|     showUI: boolean, | ||||
|     selectedReportType: number, | ||||
|     reportType: BIReportType[], | ||||
|     sheetIndex: number, | ||||
|     firstRow: number, | ||||
|     hasCaption: boolean, | ||||
|     uploadParameters: any, | ||||
|     showFileList: boolean, | ||||
|     urlFileUpload: string, | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     name: "BiDataUploadView", | ||||
|     props: { | ||||
|         reportType: { | ||||
|             type: Number, | ||||
|             require: true, | ||||
|             default: (): number => 0, | ||||
|         }, | ||||
|     }, | ||||
|     setup( props ) | ||||
|     { | ||||
|         const ui: UI = reactive({ | ||||
|             showUI: false, | ||||
|             selectedReportType: 0, | ||||
|             reportType: [ | ||||
|                 { | ||||
|                     reportTypeCode: 1, | ||||
|                     reportTypeName: "坐席车非渗透率", | ||||
|                 }, | ||||
|                 { | ||||
|                     reportTypeCode: 2, | ||||
|                     reportTypeName: "坐席续保率", | ||||
|                 }, | ||||
|                 { | ||||
|                     reportTypeCode: 3, | ||||
|                     reportTypeName: "部门车非渗透率", | ||||
|                 }, | ||||
|                 { | ||||
|                     reportTypeCode: 4, | ||||
|                     reportTypeName: "当月个车续保率跟踪报表【机构】", | ||||
|                 }, | ||||
|                 { | ||||
|                     reportTypeCode: 10, | ||||
|                     reportTypeName: "TWr坐席清单", | ||||
|                 },], | ||||
|             sheetIndex: 0, | ||||
|             firstRow: 1, | ||||
|             hasCaption: true, | ||||
|             uploadParameters: { | ||||
|                 "task-name": "1234", | ||||
|             }, | ||||
|             showFileList: false, | ||||
|             urlFileUpload: API_URL.URL_UPLOAD_FILE, | ||||
|         }); | ||||
|  | ||||
|         /** | ||||
|          * 文件上传成功响应函数 | ||||
|          * @param response 响应结果参数 | ||||
|          * @param uploadFile  | ||||
|          * @param uploadFiles  | ||||
|          */ | ||||
|         const onUploadSuccess: UploadProps["onSuccess"] = ( response: FileUploadResponse, uploadFile: UploadFile, uploadFiles: UploadFiles ): void => | ||||
|         { | ||||
|             //  先判断成功标志位 | ||||
|             if ( response.success ) | ||||
|             { | ||||
|                 // 成功,发出导入报表请求 | ||||
|                 if ( response.fileList.length === 0 ) | ||||
|                 { | ||||
|                     // 上传文件路径有问题,提示一下 | ||||
|                     ElMessageBox.confirm( | ||||
|                         "上传文件的保存路径有误,请联系开发人员。", | ||||
|                         "上传文件错误", | ||||
|                         { | ||||
|                             confirmButtonText: "确定", | ||||
|                             type: "warning", | ||||
|                             center: true, | ||||
|                         } | ||||
|                     ) | ||||
|                         .then((): void => {}) | ||||
|                         .catch((): void => {}); | ||||
|                 } | ||||
|  | ||||
|                 const request: ImportBIReportRequest = { | ||||
|                     filePath: response.fileList[0], | ||||
|                     reportType: ui.selectedReportType, | ||||
|                     firstRow: ui.firstRow, | ||||
|                     sheetIndex: ui.sheetIndex, | ||||
|                 }; | ||||
|  | ||||
|                 console.log( "请求参数", request ); | ||||
|  | ||||
|                 // 发出请求 | ||||
|                 importBIReport( request, importResponseHandler ); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 // 失败了,提示一下 | ||||
|                 ElMessageBox.confirm( | ||||
|                     response.message, | ||||
|                     "上传文件错误", | ||||
|                     { | ||||
|                         confirmButtonText: "确定", | ||||
|                         type: "warning", | ||||
|                         center: true, | ||||
|                     } | ||||
|                 ) | ||||
|                     .then((): void => {}) | ||||
|                     .catch((): void => {}); | ||||
|             } | ||||
|         }; | ||||
|  | ||||
|         /** | ||||
|          * handler函数 | ||||
|          * @param response  | ||||
|          * @param error  | ||||
|          */ | ||||
|         const importResponseHandler: ImportBIReportResponseHandler = ( response: ImportBIReportResponse, error?: any ): void => | ||||
|         { | ||||
|             if ( response.success ) | ||||
|             { | ||||
|                 ElMessage({ | ||||
|                     type: "success", | ||||
|                     message: response.message, | ||||
|                 }); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 ElMessageBox.confirm( | ||||
|                     response.message, | ||||
|                     "导入错误", | ||||
|                     { | ||||
|                         confirmButtonText: "确定", | ||||
|                         type: "warning", | ||||
|                         center: true, | ||||
|                     } | ||||
|                 ) | ||||
|                     .then((): void => {}) | ||||
|                     .catch((): void => {}); | ||||
|                 console.log( error ); | ||||
|             } | ||||
|         }; | ||||
|  | ||||
|         onBeforeMount((): void => | ||||
|         { | ||||
|             ui.selectedReportType = props.reportType; | ||||
|         }); | ||||
|  | ||||
|         return { | ||||
|             ui, | ||||
|             onUploadSuccess, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
| @import "@/assets/css/public/_public.scss"; | ||||
|  | ||||
| .bi-dataupload-wrapper { | ||||
|     // max-width: 600px; | ||||
|     width: 100%; | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
| } | ||||
|  | ||||
| .query-box-wrapper { | ||||
|     @include query-box-wrap; | ||||
| } | ||||
| </style> | ||||
| @@ -0,0 +1,226 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-17 14:53:17 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/data/bi/DepartmentAttachingRateView.vue | ||||
|  * @Description: | ||||
|  * | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div class="wrapper"> | ||||
|         <el-row :gutter="10"> | ||||
|             <el-col span="24"> | ||||
|                 <el-button | ||||
|                     type="warning" | ||||
|                     icon="upload" | ||||
|                     @click="showUploadFileDialog" | ||||
|                 > | ||||
|                     上传 | ||||
|                 </el-button> | ||||
|                 <el-button | ||||
|                     type="primary" | ||||
|                     icon="refresh" | ||||
|                     @click="refresh" | ||||
|                 > | ||||
|                     刷新 | ||||
|                 </el-button> | ||||
|             </el-col> | ||||
|         </el-row> | ||||
|         <el-table | ||||
|             width="100%" | ||||
|             stripe | ||||
|             border | ||||
|             :data="tableData" | ||||
|         > | ||||
|             <el-table-column | ||||
|                 label="部门" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="department"> | ||||
|                     <span>{{ department.row.departmentName }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="车险保费(万)" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="department"> | ||||
|                     <span>{{ department.row.motoPremium.toFixed(2) }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="非车险保费(万)" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="department"> | ||||
|                     <span>{{ department.row.nomotoPremium.toFixed(2) }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="渗透率" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="department"> | ||||
|                     <span>{{ department.row.attachingRate.toFixed(2) + "%" }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|         </el-table> | ||||
|         <div class="pagination_wrapper"> | ||||
|             <el-pagination | ||||
|                 v-model="ui.tableCurrentPageIndex" | ||||
|                 class="pull_left" | ||||
|                 size="small" | ||||
|                 background | ||||
|                 :page-size="ui.tablePageSize" | ||||
|                 :page-sizes="[10, 20, 50, 100]" | ||||
|                 layout="total, sizes, prev, pager, next, jumper" | ||||
|                 :total="0" | ||||
|                 @current-change="onCurrentPageIndexChange" | ||||
|                 @size-change="onTablePageSizeChange" | ||||
|             /> | ||||
|         </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="3" /> | ||||
|             </el-dialog> | ||||
|         </div> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { reactive, computed, onBeforeMount } from "vue"; | ||||
| import { | ||||
|     type BIDepartmentAttachingRateRecord, | ||||
|     type QueryBIDepartmentAttachingRateResponse, | ||||
|     type QueryBIDepartmentAttachingRateDataHandler, | ||||
|     queryDepartmentAttachingRateData | ||||
| } from "@/utils/BIReport.js"; | ||||
| import { ElMessage, ElMessageBox } from "element-plus"; | ||||
| import DataUploadView from "@/views/data/DataUploadView.vue"; | ||||
|  | ||||
| interface UI | ||||
| { | ||||
|     showUI: boolean, | ||||
|     showUploadDialog: boolean, | ||||
|     tablePageSize: number, | ||||
|     tableCurrentPageIndex: number, | ||||
|     BIDepartmentAttachingRateData: BIDepartmentAttachingRateRecord[], | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     name: "DepartmentAttachingRateView", | ||||
|     components: { DataUploadView, }, | ||||
|     setup() | ||||
|     { | ||||
|         const ui: UI = reactive({ | ||||
|             showUI: true, | ||||
|             showUploadDialog: false, | ||||
|             tablePageSize: 10, | ||||
|             tableCurrentPageIndex: 1, | ||||
|             BIDepartmentAttachingRateData: [], | ||||
|         }); | ||||
|  | ||||
|         const tableData = computed((): BIDepartmentAttachingRateRecord[] => | ||||
|         { | ||||
|             const tableCount = ui.BIDepartmentAttachingRateData.length; | ||||
|             const startIndex = ui.tablePageSize * ( ui.tableCurrentPageIndex - 1 ) > tableCount ? tableCount - ui.tablePageSize : ui.tablePageSize * ( ui.tableCurrentPageIndex - 1 ); | ||||
|             const endIndex = ui.tablePageSize * ui.tableCurrentPageIndex; | ||||
|  | ||||
|             return ui.BIDepartmentAttachingRateData.slice( startIndex, endIndex ); | ||||
|         }); | ||||
|  | ||||
|         const onCurrentPageIndexChange = ( pageIndex: number ): void => | ||||
|         { | ||||
|             ui.tableCurrentPageIndex = pageIndex; | ||||
|         }; | ||||
|  | ||||
|         const onTablePageSizeChange = ( pageSize: number ): void => | ||||
|         { | ||||
|             ui.tablePageSize = pageSize; | ||||
|         }; | ||||
|  | ||||
|         const handler: QueryBIDepartmentAttachingRateDataHandler = ( response: QueryBIDepartmentAttachingRateResponse, error: any ): void => | ||||
|         { | ||||
|             // 判断一下标志位 | ||||
|             if ( response.success ) | ||||
|             { | ||||
|                 // 请求成功 | ||||
|                 ElMessage({ | ||||
|                     message: "更新成功", | ||||
|                     type: "success", | ||||
|                 }); | ||||
|  | ||||
|                 ui.BIDepartmentAttachingRateData = response.records; | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 // 请求失败 | ||||
|                 ElMessageBox.confirm( | ||||
|                     response.message, | ||||
|                     "请求机构渗透率数据失败", | ||||
|                     { | ||||
|                         confirmButtonText: "确定", | ||||
|                         type: "warning", | ||||
|                         center: true, | ||||
|                     } | ||||
|                 ) | ||||
|                     .then((): void => {}) | ||||
|                     .catch((): void => {}); | ||||
|  | ||||
|                 if ( error !== null ) | ||||
|                 { | ||||
|                     console.log( "请求机构渗透率数据失败", error ); | ||||
|                 } | ||||
|             } | ||||
|         }; | ||||
|  | ||||
|         const refresh = (): void => | ||||
|         { | ||||
|             queryDepartmentAttachingRateData( handler ); | ||||
|         }; | ||||
|  | ||||
|         const showUploadFileDialog = (): void => | ||||
|         { | ||||
|             ui.showUploadDialog = true; | ||||
|         }; | ||||
|  | ||||
|         onBeforeMount((): void => | ||||
|         { | ||||
|             refresh(); | ||||
|         }); | ||||
|  | ||||
|         return { | ||||
|             ui, | ||||
|             tableData, | ||||
|             onCurrentPageIndexChange, | ||||
|             onTablePageSizeChange, | ||||
|             showUploadFileDialog, | ||||
|             handler, | ||||
|             refresh, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
| .wrapper { | ||||
|     margin: 0px 10px 10px 10px; | ||||
|  | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
| } | ||||
|  | ||||
| .pagination_wrapper { | ||||
|     display: flex; | ||||
|     justify-content: flex-end; | ||||
| } | ||||
| </style> | ||||
| @@ -0,0 +1,243 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-11-10 17:48:01 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/data/bi/DepartmentRenewalRateView.vue | ||||
|  * @Description: | ||||
|  * | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div class="wrapper"> | ||||
|         <el-row :gutter="10"> | ||||
|             <el-col :span="24"> | ||||
|                 <el-button | ||||
|                     type="warning" | ||||
|                     icon="upload" | ||||
|                     @click="showUploadFileDialog" | ||||
|                 > | ||||
|                     上传 | ||||
|                 </el-button> | ||||
|                 <el-button | ||||
|                     type="primary" | ||||
|                     icon="refresh" | ||||
|                     @click="refresh" | ||||
|                 > | ||||
|                     刷新 | ||||
|                 </el-button> | ||||
|             </el-col> | ||||
|         </el-row> | ||||
|         <el-table | ||||
|             :data="tableData" | ||||
|             style="width:100%;" | ||||
|             border | ||||
|             stripe | ||||
|         > | ||||
|             <el-table-column | ||||
|                 label="部门" | ||||
|                 align="center" | ||||
|                 width="250px" | ||||
|             > | ||||
|                 <template #default="dept"> | ||||
|                     <span>{{ dept.row.责任部门 }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="机构目标值" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="dept"> | ||||
|                     <span>{{ dept.row.机构目标值.toFixed(2) + "%" }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="到期数全月" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="dept"> | ||||
|                     <span>{{ dept.row.到期数全月 }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="序时到期数占比" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="dept"> | ||||
|                     <span>{{ dept.row.序时到期数占比.toFixed(2) + "%" }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="个车续保率序时" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="dept"> | ||||
|                     <span>{{ dept.row.个车续保率序时.toFixed(2) + "%" }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="个车续保率全月" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="dept"> | ||||
|                     <span>{{ dept.row.个车续保率全月.toFixed(2) + "%" }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|         </el-table> | ||||
|         <div class="pagination-wrapper"> | ||||
|             <el-pagination | ||||
|                 v-model="ui.tableCurrentPageIndex" | ||||
|                 class="pull_left" | ||||
|                 size="small" | ||||
|                 background | ||||
|                 :page-size="ui.tablePageSize" | ||||
|                 :page-sizes="[10, 20, 50, 100]" | ||||
|                 layout="total, sizes, prev, pager, next, jumper" | ||||
|                 :total="0" | ||||
|                 @current-change="onCurrentPageIndexChange" | ||||
|                 @size-change="onTablePageSizeChange" | ||||
|             /> | ||||
|         </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="4" /> | ||||
|             </el-dialog> | ||||
|         </div> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { reactive, computed, onBeforeMount } from "vue"; | ||||
| import { | ||||
|     type BIDepartmentRenewalRateRecord, | ||||
|     type QueryBIDepartmentRenewalRateResponse, | ||||
|     type QueryBIDepartmentRenewalRateDataHandler, | ||||
|     queryDepartmentRenewalRateData | ||||
| } from "@/utils/BIReport.js"; | ||||
| import { ElMessageBox, ElMessage } from "element-plus"; | ||||
| import DataUploadView from "@/views/data/DataUploadView.vue"; | ||||
|  | ||||
| interface UI | ||||
| { | ||||
|     showUI: boolean; | ||||
|     showUploadDialog: boolean; | ||||
|     tablePageSize: number; | ||||
|     tableCurrentPageIndex: number; | ||||
|     BIDepartmentRenewalRateData: BIDepartmentRenewalRateRecord[]; | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     name: "DepartmentRenewalRateView", | ||||
|     components: { DataUploadView, }, | ||||
|     setup() | ||||
|     { | ||||
|         const ui: UI = reactive({ | ||||
|             showUI: true, | ||||
|             showUploadDialog: false, | ||||
|             tablePageSize: 10, | ||||
|             tableCurrentPageIndex: 1, | ||||
|             BIDepartmentRenewalRateData: [], | ||||
|         }); | ||||
|  | ||||
|         // on | ||||
|         const onCurrentPageIndexChange = ( pageIndex: number ): void => | ||||
|         { | ||||
|             ui.tableCurrentPageIndex = pageIndex; | ||||
|         }; | ||||
|  | ||||
|         const onTablePageSizeChange = ( pageSize: number ): void => | ||||
|         { | ||||
|             ui.tablePageSize = pageSize; | ||||
|         }; | ||||
|  | ||||
|         // 计算变量 | ||||
|         const tableData = computed((): BIDepartmentRenewalRateRecord[] => | ||||
|         { | ||||
|             const tableCount = ui.BIDepartmentRenewalRateData.length; | ||||
|             const startIndex = ui.tablePageSize * ( ui.tableCurrentPageIndex - 1 ) < tableCount ? ui.tablePageSize * ( ui.tableCurrentPageIndex - 1 ) : ( tableCount - ui.tablePageSize ); | ||||
|             const endIndex = ui.tablePageSize * ui.tableCurrentPageIndex < tableCount ? ui.tablePageSize * ui.tableCurrentPageIndex : tableCount; | ||||
|  | ||||
|             return ui.BIDepartmentRenewalRateData.slice( startIndex, endIndex ); | ||||
|         }); | ||||
|  | ||||
|         // handler | ||||
|         const handler: QueryBIDepartmentRenewalRateDataHandler = ( response: QueryBIDepartmentRenewalRateResponse, error: any ): void => | ||||
|         { | ||||
|             if ( response.success ) | ||||
|             { | ||||
|                 ui.BIDepartmentRenewalRateData = response.records; | ||||
|  | ||||
|                 ElMessage({ | ||||
|                     message: "更新完成", | ||||
|                     type: "success", | ||||
|                 }); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 ElMessageBox.confirm( | ||||
|                     response.message, | ||||
|                     "请求BI机构续保率数据失败", | ||||
|                     { | ||||
|                         confirmButtonText: "确定", | ||||
|                         type: "warning", | ||||
|                         center: true, | ||||
|                     } | ||||
|                 ) | ||||
|                     .then((): void => {}) | ||||
|                     .catch((): void => {}); | ||||
|  | ||||
|                 if ( error !== null ) | ||||
|                 { | ||||
|                     console.log( error ); | ||||
|                 } | ||||
|             } | ||||
|         }; | ||||
|  | ||||
|         const showUploadFileDialog = (): void => | ||||
|         { | ||||
|             ui.showUploadDialog = true; | ||||
|         }; | ||||
|  | ||||
|         onBeforeMount((): void => | ||||
|         { | ||||
|             refresh(); | ||||
|         }); | ||||
|  | ||||
|         const refresh = (): void => | ||||
|         { | ||||
|             queryDepartmentRenewalRateData( handler ); | ||||
|         }; | ||||
|  | ||||
|         return { | ||||
|             ui, | ||||
|             onCurrentPageIndexChange, | ||||
|             onTablePageSizeChange, | ||||
|             showUploadFileDialog, | ||||
|             // 计算变量 | ||||
|             tableData, | ||||
|             refresh, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
| .wrapper { | ||||
|     margin: 0px 10px 10px 10px; | ||||
|  | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
| } | ||||
|  | ||||
| .pagination-wrapper { | ||||
|     display: flex; | ||||
|     justify-content: flex-end; | ||||
| } | ||||
| </style> | ||||
| @@ -0,0 +1,253 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-17 14:41:39 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/data/bi/TelsalerAttachingRateView.vue | ||||
|  * @Description: BI坐席车非渗透率数据管理界面 | ||||
|  * | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div class="wrapper"> | ||||
|         <el-row :gutter="10"> | ||||
|             <el-col :span="8"> | ||||
|                 <el-button | ||||
|                     type="warning" | ||||
|                     icon="upload" | ||||
|                     @click="showUploadFileDialog" | ||||
|                 > | ||||
|                     上传 | ||||
|                 </el-button> | ||||
|                 <el-button | ||||
|                     type="primary" | ||||
|                     icon="refresh" | ||||
|                     @click="refresh" | ||||
|                 > | ||||
|                     刷新 | ||||
|                 </el-button> | ||||
|             </el-col> | ||||
|         </el-row> | ||||
|         <el-table | ||||
|             border | ||||
|             stripe | ||||
|             style="width:100%;" | ||||
|             :data="tableData" | ||||
|         > | ||||
|             <el-table-column | ||||
|                 label="部门" | ||||
|                 align="center" | ||||
|                 width="300" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ telsaler.row.departmentName }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="名称" | ||||
|                 align="center" | ||||
|                 width="200" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ telsaler.row.telsalerName }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="车险保费" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ Math.trunc( telsaler.row.motoPremium * 10000) }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="非车险保费" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ Math.trunc( telsaler.row.nomotoPremium * 10000) }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="当月保费渗透率" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ telsaler.row.attachingRate.toFixed(2) + "%" }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="渗透率环比上月" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ telsaler.row.attachingRateChange.toFixed(2) + "%" }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|         </el-table> | ||||
|         <div class="pagination_wrapper"> | ||||
|             <el-pagination | ||||
|                 v-model="ui.tableCurrentPageIndex" | ||||
|                 class="pull_left" | ||||
|                 size="small" | ||||
|                 background | ||||
|                 :page-size="ui.tablePageSize" | ||||
|                 :page-sizes="[10, 20, 50, 100]" | ||||
|                 layout="total, sizes, prev, pager, next, jumper" | ||||
|                 :total="tableCount" | ||||
|                 @current-change="onCurrentPageIndexChange" | ||||
|                 @size-change="onTablePageSizeChange" | ||||
|             /> | ||||
|         </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="1" /> | ||||
|             </el-dialog> | ||||
|         </div> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { reactive, onBeforeMount, computed } from "vue"; | ||||
| import { | ||||
|     type BITelsalerAttachingRateRecord, | ||||
|     type QueryBITelsalerAttachingRateReportResponse, | ||||
|     type QueryBITelsalerAttachingRateDataHandler, | ||||
|     queryBITelsalerAttachingRateData | ||||
| } from "@/utils/BIReport.js"; | ||||
| import DataUploadView from "@/views/data/DataUploadView.vue"; | ||||
| import { ElMessageBox, ElMessage } from "element-plus"; | ||||
|  | ||||
| interface UI | ||||
| { | ||||
|     showUI: boolean, | ||||
|     showUploadDialog: boolean, | ||||
|     tableCurrentPageIndex: number, | ||||
|     tablePageSize: number, | ||||
|     BITelsalerAttachingRateData: BITelsalerAttachingRateRecord[], | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     name: "TelsalerAttachingRateView", | ||||
|     components: { DataUploadView, }, | ||||
|     setup() | ||||
|     { | ||||
|         const ui: UI = reactive({ | ||||
|             showUI: true, | ||||
|             showUploadDialog: false, | ||||
|             tableCurrentPageIndex: 1, | ||||
|             tablePageSize: 10, | ||||
|             BITelsalerAttachingRateData: [], | ||||
|         }); | ||||
|  | ||||
|         const showUploadFileDialog = (): void => | ||||
|         { | ||||
|             ui.showUploadDialog = true; | ||||
|         }; | ||||
|  | ||||
|         const onCurrentPageIndexChange = ( index: number ): void => | ||||
|         { | ||||
|             ui.tableCurrentPageIndex = index; | ||||
|         }; | ||||
|  | ||||
|         const onTablePageSizeChange = ( pageSize: number ): void => | ||||
|         { | ||||
|             ui.tablePageSize = pageSize; | ||||
|         }; | ||||
|  | ||||
|         /** 请求处理handler ********/ | ||||
|         const queryBITelsalerAttachingRateDataHandler: QueryBITelsalerAttachingRateDataHandler = ( response: QueryBITelsalerAttachingRateReportResponse, error: any ): void => | ||||
|         { | ||||
|             // 判断调用成功标志位 | ||||
|             if ( response.success ) | ||||
|             { | ||||
|                 ui.BITelsalerAttachingRateData = response.records; | ||||
|  | ||||
|                 ElMessage({ | ||||
|                     message: "更新成功", | ||||
|                     type: "success", | ||||
|                 }); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 // 错误处理 | ||||
|                 ElMessageBox.confirm( | ||||
|                     response.message, | ||||
|                     "请求BI坐席渗透率数据错误", | ||||
|                     { | ||||
|                         confirmButtonText: "确定", | ||||
|                         type: "warning", | ||||
|                         center: true, | ||||
|                     } | ||||
|                 ) | ||||
|                     .then((): void => {}) | ||||
|                     .catch((): void => {}); | ||||
|  | ||||
|                 if ( error !== null ) | ||||
|                 { | ||||
|                     console.log( error ); | ||||
|                 } | ||||
|             } | ||||
|         }; | ||||
|  | ||||
|         const tableCount = computed((): number => | ||||
|         { | ||||
|             return ui.BITelsalerAttachingRateData.length; | ||||
|         }); | ||||
|  | ||||
|         const tableData = computed((): BITelsalerAttachingRateRecord[] => | ||||
|         { | ||||
|             const tableCount = ui.BITelsalerAttachingRateData.length; | ||||
|             const startIndex = ui.tablePageSize * ( ui.tableCurrentPageIndex - 1 ) > tableCount ? tableCount - ui.tablePageSize : ui.tablePageSize * ( ui.tableCurrentPageIndex - 1 ); | ||||
|             const endIndex = ui.tablePageSize * ui.tableCurrentPageIndex; | ||||
|  | ||||
|             return ui.BITelsalerAttachingRateData.slice( startIndex, endIndex ); | ||||
|         }); | ||||
|  | ||||
|         onBeforeMount((): void => | ||||
|         { | ||||
|             queryBITelsalerAttachingRateData( queryBITelsalerAttachingRateDataHandler ); | ||||
|         }); | ||||
|  | ||||
|         const refresh = (): void => | ||||
|         { | ||||
|             console.log( import.meta.env.VITE_TEST ); | ||||
|             queryBITelsalerAttachingRateData( queryBITelsalerAttachingRateDataHandler ); | ||||
|         }; | ||||
|  | ||||
|         return { | ||||
|             ui, | ||||
|             showUploadFileDialog, | ||||
|             onCurrentPageIndexChange, | ||||
|             onTablePageSizeChange, | ||||
|             // 计算变量 | ||||
|             tableData, | ||||
|             tableCount, | ||||
|             // 函数 | ||||
|             queryBITelsalerAttachingRateDataHandler, | ||||
|             refresh, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
| .wrapper { | ||||
|     margin: 0px 10px 10px 10px; | ||||
|  | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
| } | ||||
|  | ||||
| .pagination_wrapper { | ||||
|     display: flex; | ||||
|     justify-content: flex-end; | ||||
| } | ||||
| </style> | ||||
| @@ -0,0 +1,241 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-17 23:31:19 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/data/bi/TelsalerRenewalRateView.vue | ||||
|  * @Description: | ||||
|  * | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div class="wrapper"> | ||||
|         <el-row :gutter="10"> | ||||
|             <el-col :span="24"> | ||||
|                 <el-button | ||||
|                     type="warning" | ||||
|                     icon="Upload" | ||||
|                     @click="showUploadFileDialog" | ||||
|                 > | ||||
|                     上传 | ||||
|                 </el-button> | ||||
|                 <el-button | ||||
|                     type="primary" | ||||
|                     icon="refresh" | ||||
|                     @click="refresh" | ||||
|                 > | ||||
|                     刷新 | ||||
|                 </el-button> | ||||
|             </el-col> | ||||
|         </el-row> | ||||
|         <el-table | ||||
|             border | ||||
|             stripe | ||||
|             style="width:100%;" | ||||
|             :data="tableData" | ||||
|         > | ||||
|             <el-table-column | ||||
|                 label="部门" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ telsaler.row.责任部门 }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="责任人" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ telsaler.row.责任人 }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="到期数-全月" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ telsaler.row.到期数全月 }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="个车续保率(序时)(%)" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ telsaler.row.个车续保率序时.toFixed(2) + "%" }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|             <el-table-column | ||||
|                 label="个车续保率(全月)(%)" | ||||
|                 align="center" | ||||
|             > | ||||
|                 <template #default="telsaler"> | ||||
|                     <span>{{ telsaler.row.个车续保率全月.toFixed(2) + "%" }}</span> | ||||
|                 </template> | ||||
|             </el-table-column> | ||||
|         </el-table> | ||||
|         <div class="pagination_wrapper"> | ||||
|             <el-pagination | ||||
|                 v-model="ui.tableCurrentPageIndex" | ||||
|                 class="pull_left" | ||||
|                 size="small" | ||||
|                 background | ||||
|                 :page-size="ui.tablePageSize" | ||||
|                 :page-sizes="[10, 20, 50, 100]" | ||||
|                 layout="total, sizes, prev, pager, next, jumper" | ||||
|                 :total="0" | ||||
|                 @current-change="onCurrentPageIndexChange" | ||||
|                 @size-change="onTablePageSizeChange" | ||||
|             /> | ||||
|         </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="2" /> | ||||
|             </el-dialog> | ||||
|         </div> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { reactive, computed, onBeforeMount } from "vue"; | ||||
| import DataUploadView from "@/views/data/DataUploadView.vue"; | ||||
| import { | ||||
|     type QueryBITelsalerRenewalRateDataHandler, | ||||
|     type BITelsalerRenewalRateRecord, | ||||
|     type QueryBITelsalerRenewalRateReportResponse, | ||||
|     queryBITelsalerRenewalData | ||||
| } from "@/utils/BIReport.js"; | ||||
| import { ElMessageBox, ElMessage } from "element-plus"; | ||||
|  | ||||
| interface UI | ||||
| { | ||||
|     showUI: boolean, | ||||
|     showUploadDialog: boolean, | ||||
|     tableCurrentPageIndex: number, | ||||
|     tablePageSize: number, | ||||
|     BITelsalerRenewalRateData: BITelsalerRenewalRateRecord[], | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     name: "TelsalerAttachingRateView", | ||||
|     components: { DataUploadView, }, | ||||
|     setup() | ||||
|     { | ||||
|         const ui: UI = reactive({ | ||||
|             showUI: true, | ||||
|             showUploadDialog: false, | ||||
|             tableCurrentPageIndex: 1, | ||||
|             tablePageSize: 10, | ||||
|             BITelsalerRenewalRateData: [], | ||||
|         }); | ||||
|  | ||||
|         const showUploadFileDialog = (): void => | ||||
|         { | ||||
|             ui.showUploadDialog = true; | ||||
|         }; | ||||
|  | ||||
|         const onCurrentPageIndexChange = ( index: number ): void => | ||||
|         { | ||||
|             ui.tableCurrentPageIndex = index; | ||||
|         }; | ||||
|  | ||||
|         const onTablePageSizeChange = ( pageSize: number ): void => | ||||
|         { | ||||
|             ui.tablePageSize = pageSize; | ||||
|         }; | ||||
|  | ||||
|         const tableData = computed((): BITelsalerRenewalRateRecord[] => | ||||
|         { | ||||
|             const tableCount = ui.BITelsalerRenewalRateData.length; | ||||
|             const startIndex = ui.tablePageSize * ( ui.tableCurrentPageIndex - 1 ) > tableCount ? tableCount - ui.tablePageSize : ui.tablePageSize * ( ui.tableCurrentPageIndex - 1 ); | ||||
|             const endIndex = ui.tablePageSize * ui.tableCurrentPageIndex; | ||||
|  | ||||
|             return ui.BITelsalerRenewalRateData.slice( startIndex, endIndex ); | ||||
|         }); | ||||
|  | ||||
|         const tableCount = computed((): number => | ||||
|         { | ||||
|             return ui.BITelsalerRenewalRateData.length; | ||||
|         }); | ||||
|  | ||||
|         // handler | ||||
|         const queryBITelsalerRenewalRateDataHander: QueryBITelsalerRenewalRateDataHandler = ( response: QueryBITelsalerRenewalRateReportResponse, error: any ): void => | ||||
|         { | ||||
|             // 判断调用成功标志位 | ||||
|             if ( response.success ) | ||||
|             { | ||||
|                 ui.BITelsalerRenewalRateData = response.records; | ||||
|  | ||||
|                 ElMessage({ | ||||
|                     message: "更新成功", | ||||
|                     type: "success", | ||||
|                 }); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 // 错误处理 | ||||
|                 ElMessageBox.confirm( | ||||
|                     response.message, | ||||
|                     "请求BI坐席续保率数据错误", | ||||
|                     { | ||||
|                         confirmButtonText: "确定", | ||||
|                         type: "warning", | ||||
|                         center: true, | ||||
|                     } | ||||
|                 ) | ||||
|                     .then((): void => {}) | ||||
|                     .catch((): void => {}); | ||||
|  | ||||
|                 if ( error !== null ) | ||||
|                 { | ||||
|                     console.log( error ); | ||||
|                 } | ||||
|             } | ||||
|         }; | ||||
|  | ||||
|         onBeforeMount((): void => | ||||
|         { | ||||
|             queryBITelsalerRenewalData( queryBITelsalerRenewalRateDataHander ); | ||||
|         }); | ||||
|  | ||||
|         const refresh = (): void => | ||||
|         { | ||||
|             queryBITelsalerRenewalData( queryBITelsalerRenewalRateDataHander ); | ||||
|         }; | ||||
|  | ||||
|         return { | ||||
|             ui, | ||||
|             showUploadFileDialog, | ||||
|             onCurrentPageIndexChange, | ||||
|             onTablePageSizeChange, | ||||
|             // 计算变量 | ||||
|             tableData, | ||||
|             tableCount, | ||||
|             // 函数 | ||||
|             refresh, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
| .wrapper { | ||||
|     margin: 0px 10px 10px 10px; | ||||
|  | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
| } | ||||
|  | ||||
| .pagination_wrapper { | ||||
|     display: flex; | ||||
|     justify-content: flex-end; | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										239
									
								
								code/web/task_schedule/src/views/reward/RewardTelsaler.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										239
									
								
								code/web/task_schedule/src/views/reward/RewardTelsaler.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,239 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-12 10:43:39 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/reward/RewardTelsaler.vue | ||||
|  * @Description: | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div | ||||
|         v-if="ui.showUI" | ||||
|         class="reward-gainer-wrapper" | ||||
|     > | ||||
|         <el-row :gutter="10"> | ||||
|             <el-col :span="8"> | ||||
|                 <span>奖励类型</span> | ||||
|             </el-col> | ||||
|             <el-col :span="16"> | ||||
|                 <el-select | ||||
|                     v-model="ui.selectedRewardProjectCode" | ||||
|                     value-key="rewardCode" | ||||
|                 > | ||||
|                     <el-option | ||||
|                         v-for="item in ui.rewardProjectList" | ||||
|                         :key="item.rewardCode" | ||||
|                         :label="item.rewardName" | ||||
|                         :value="item.rewardCode" | ||||
|                     /> | ||||
|                 </el-select> | ||||
|             </el-col> | ||||
|         </el-row> | ||||
|         <el-row :gutter="10"> | ||||
|             <el-col :span="8"> | ||||
|                 <span>坐席名称</span> | ||||
|             </el-col> | ||||
|             <el-col :span="16"> | ||||
|                 <el-input v-model.trim.lazy="ui.selectedRewardTelsalerName" /> | ||||
|             </el-col> | ||||
|         </el-row> | ||||
|         <div class="tool-button-wrapper"> | ||||
|             <el-button | ||||
|                 type="primary" | ||||
|                 icon="select" | ||||
|                 @click="onSaveRewardTelsaler" | ||||
|             > | ||||
|                 保存 | ||||
|             </el-button> | ||||
|             <el-button | ||||
|                 type="danger" | ||||
|                 icon="Close" | ||||
|             > | ||||
|                 放弃 | ||||
|             </el-button> | ||||
|         </div> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { reactive, onBeforeMount } from "vue"; | ||||
| import { ElMessage, ElMessageBox } from "element-plus"; | ||||
| import { | ||||
|     type RewardProject, | ||||
|     type RewardProjectResponse, | ||||
|     type AddRewardTelsalerRequest, | ||||
|     type AddRewardTelsalerResponse, | ||||
|     type UpdateRewardTelsalerRequest, | ||||
|     type UpdateRewardTelsalerResponse, | ||||
|     requestRewardPorjectsList, | ||||
|     addRewardTelsaler, | ||||
|     updateTelsalerReward | ||||
| } from "@/utils/reward.js"; | ||||
| import eventBus from "@/utils/api/EventBus.js"; | ||||
|  | ||||
| interface RewardGainerUI | ||||
| { | ||||
|     showUI: boolean; | ||||
|     showEditRewardGainerDialog: boolean; | ||||
|     rewardProjectList: RewardProject[] | null; | ||||
|     selectedRewardProjectCode: number | undefined; | ||||
|     selectedRewardTelsalerName: string; | ||||
|     selectedRecID: number; | ||||
| } | ||||
|  | ||||
| export default { | ||||
|     name: "RewardTelsaler", | ||||
|     props: { | ||||
|         selectedRecId: { | ||||
|             type: Number, | ||||
|             require: true, | ||||
|             default: (): number => -9999, | ||||
|         }, | ||||
|         selectedRewardProjectCode: { | ||||
|             type: Number, | ||||
|             require: true, | ||||
|             default: (): number => -999, | ||||
|         }, | ||||
|         selectedTelsalerName: { | ||||
|             type: String, | ||||
|             require: true, | ||||
|             default: (): string => "", | ||||
|         }, | ||||
|     }, | ||||
|     setup( props ) | ||||
|     { | ||||
|         const ui: RewardGainerUI = reactive({ | ||||
|             showUI: true, | ||||
|             showEditRewardGainerDialog: false, | ||||
|             rewardProjectList: [], | ||||
|             selectedRewardProjectCode: 1, | ||||
|             selectedRewardTelsalerName: "", | ||||
|             selectedRecID: 0, | ||||
|         }); | ||||
|  | ||||
|         /** | ||||
|          * 请求奖项清单的回调函数,用于处理请求结果。 | ||||
|          * @param response 请求奖项清单的响应对象 | ||||
|          * @param error 请求失败时的错误对象 | ||||
|          */ | ||||
|         const applyRewardProjectsData = ( response: RewardProjectResponse, error: any ): void => | ||||
|         { | ||||
|             if ( !response.success ) | ||||
|             { | ||||
|                 ElMessageBox({ | ||||
|                     message: "请求奖励项目失败,请查看日志!", | ||||
|                     type: "error", | ||||
|                 }) | ||||
|                     .then((): void => {}) | ||||
|                     .catch((): void => {}); | ||||
|  | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|             ui.rewardProjectList = response.rewardList; | ||||
|         }; | ||||
|  | ||||
|         const refresh = (): void => | ||||
|         { | ||||
|             requestRewardPorjectsList( applyRewardProjectsData ); | ||||
|         }; | ||||
|  | ||||
|         onBeforeMount((): void => | ||||
|         { | ||||
|             ui.selectedRewardProjectCode = props.selectedRewardProjectCode; | ||||
|             ui.selectedRewardTelsalerName = props.selectedTelsalerName; | ||||
|             ui.selectedRecID = props.selectedRecId; | ||||
|  | ||||
|             refresh(); | ||||
|         }); | ||||
|  | ||||
|         const onSaveRewardTelsaler = (): void => | ||||
|         { | ||||
|             if ( props.selectedRecId === -1 ) | ||||
|             { | ||||
|                 // 新增 | ||||
|                 const addRequest: AddRewardTelsalerRequest = { | ||||
|                     rewardIndex: ui.selectedRewardProjectCode as number, | ||||
|                     telsalerName: ui.selectedRewardTelsalerName, | ||||
|                 }; | ||||
|  | ||||
|                 addRewardTelsaler( addRequest, addRewardTelsalerHandler ); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 // 更新 | ||||
|                 const updateRequest: UpdateRewardTelsalerRequest = { | ||||
|                     recordID: ui.selectedRecID, | ||||
|                     telsalerName: ui.selectedRewardTelsalerName, | ||||
|                     rewardIndex: ui.selectedRewardProjectCode as number, | ||||
|                 }; | ||||
|  | ||||
|                 updateTelsalerReward( updateRequest, updateTelsalerRewardHandler ); | ||||
|             } | ||||
|         }; | ||||
|  | ||||
|         const addRewardTelsalerHandler = ( data: AddRewardTelsalerResponse, error: any ): void => | ||||
|         { | ||||
|             if ( data.success ) | ||||
|             { | ||||
|                 ElMessage({ | ||||
|                     message: data.message, | ||||
|                     type: "success", | ||||
|                 }); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 ElMessage({ | ||||
|                     message: data.message, | ||||
|                     type: "error", | ||||
|                 }); | ||||
|             } | ||||
|  | ||||
|             eventBus.emit( "onSavedRewardTelsaler" ); | ||||
|         }; | ||||
|  | ||||
|         const updateTelsalerRewardHandler = ( data: UpdateRewardTelsalerResponse, error: any ): void => | ||||
|         { | ||||
|             if ( data.success ) | ||||
|             { | ||||
|                 ElMessage({ | ||||
|                     message: data.message, | ||||
|                     type: "success", | ||||
|                 }); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 ElMessage({ | ||||
|                     message: data.message, | ||||
|                     type: "error", | ||||
|                 }); | ||||
|             } | ||||
|  | ||||
|             eventBus.emit( "onSavedRewardTelsaler" ); | ||||
|         }; | ||||
|  | ||||
|         // onBeforeUpdate((): void => | ||||
|         // { | ||||
|         //     refresh(); | ||||
|         // }); | ||||
|  | ||||
|         return { ui, onSaveRewardTelsaler, }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style lang="scss" scoped> | ||||
| @import "@/assets/css/public/_public.scss"; | ||||
|  | ||||
| .reward-gainer-wrapper { | ||||
|     width: 300px; | ||||
|  | ||||
|     @include query-box-wrap; | ||||
| } | ||||
|  | ||||
| .tool-button-wrapper { | ||||
|     display: flex; | ||||
|     justify-content: flex-end; | ||||
|  | ||||
|     margin-top: 15px; | ||||
| } | ||||
| </style> | ||||
| @@ -2,8 +2,8 @@ | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-03-23 16:05:08 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/StaffManagement.vue | ||||
|  * @Description: | ||||
|  * @FilePath: /task_schedule/src/views/telsaler/TelsalerManagement.vue | ||||
|  * @Description: 坐席管理组件 | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
| --> | ||||
| @@ -51,9 +51,19 @@ | ||||
|                         > | ||||
|                             查询 | ||||
|                         </el-button> | ||||
|                         <el-button icon="refresh"> | ||||
|                         <el-button | ||||
|                             icon="refresh" | ||||
|                             @click="onResetQuery" | ||||
|                         > | ||||
|                             重置 | ||||
|                         </el-button> | ||||
|                         <el-button | ||||
|                             icon="upload" | ||||
|                             type="warning" | ||||
|                             @click="ui.showUploadDialog = true;" | ||||
|                         > | ||||
|                             上传 | ||||
|                         </el-button> | ||||
|                     </div> | ||||
|                 </el-col> | ||||
|             </el-row> | ||||
| @@ -102,25 +112,44 @@ | ||||
|                 @size-change="onTablePageSizeChange" | ||||
|             /> | ||||
|         </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> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import DataUploadView from "@/views/data/DataUploadView.vue"; | ||||
| import { reactive, computed } from "vue"; | ||||
| 
 | ||||
| export default { | ||||
|     name: "StaffManagement", | ||||
|     name: "TelsalerManagement", | ||||
|     components: { DataUploadView, }, | ||||
|     setup() | ||||
|     { | ||||
|         const ui = reactive({ | ||||
|             showUploadDialog: false, | ||||
|             caller_code: "", | ||||
|             caller_name: "", | ||||
|             section_office_code: "", | ||||
|             section_office_name: "", | ||||
|             department_code: "", | ||||
|             department_name: "", | ||||
|             team_name: "", | ||||
|             table_current_page_index: 1, | ||||
|             table_page_size: 50, | ||||
|             callers: [], | ||||
|         }); | ||||
| 
 | ||||
|         const onCurrentPageIndexChange = ( pageIndex: number ) => | ||||
|         const onCurrentPageIndexChange = ( pageIndex: number ): void => | ||||
|         { | ||||
|             ui.table_current_page_index = pageIndex; | ||||
|         }; | ||||
| @@ -129,7 +158,7 @@ export default { | ||||
|          * 设置表格每页显示记录的数量 | ||||
|          * @param pageSize 表格页记录数量 | ||||
|          */ | ||||
|         const onTablePageSizeChange = ( pageSize: number ) => | ||||
|         const onTablePageSizeChange = ( pageSize: number ): void => | ||||
|         { | ||||
|             ui.table_page_size = pageSize; | ||||
|         }; | ||||
| @@ -142,7 +171,18 @@ export default { | ||||
|             return 10 * 50 + 40; | ||||
|         }); | ||||
| 
 | ||||
|         return { ui, onCurrentPageIndexChange, onTablePageSizeChange, tableHeight, }; | ||||
|         const onResetQuery = (): void => | ||||
|         { | ||||
|             ui.caller_code = ""; | ||||
|             ui.caller_name = ""; | ||||
|             ui.section_office_code = ""; | ||||
|             ui.section_office_name = ""; | ||||
|             ui.department_code = ""; | ||||
|             ui.department_name = ""; | ||||
|             ui.team_name = ""; | ||||
|         }; | ||||
| 
 | ||||
|         return { ui, onResetQuery, onCurrentPageIndexChange, onTablePageSizeChange, tableHeight, }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| @@ -150,16 +190,9 @@ export default { | ||||
| @import "@/assets/css/public/_public.scss"; | ||||
| 
 | ||||
| .wrapper { | ||||
|     margin: 10px; | ||||
|     padding: 10px; | ||||
| 
 | ||||
|     background-color: #fff; | ||||
|     border-radius: 5px; | ||||
|     box-shadow: $box-shadow; | ||||
| 
 | ||||
|     &:hover { | ||||
|         box-shadow: $box-shadow-hover; | ||||
|     } | ||||
| 
 | ||||
|     min-width: 800px; | ||||
| 
 | ||||
| @@ -188,4 +221,5 @@ export default { | ||||
|     display: flex; | ||||
|     justify-content: flex-end; | ||||
| } | ||||
| 
 | ||||
| </style> | ||||
| @@ -0,0 +1,69 @@ | ||||
| <!-- | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-27 10:13:31 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /task_schedule/src/views/telsaler/TelsalerManagementView.vue | ||||
|  * @Description: 坐席和团队管理父组件 | ||||
|  * | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved. | ||||
| --> | ||||
| <template> | ||||
|     <div | ||||
|         v-if="ui.showUI" | ||||
|         class="telsaler-management-view-wrapper" | ||||
|     > | ||||
|         <el-tabs type="border-card"> | ||||
|             <el-tab-pane> | ||||
|                 <template #label> | ||||
|                     <el-icon><User /></el-icon> | ||||
|                     <span>坐席管理</span> | ||||
|                 </template> | ||||
|                 <TelsalerManagement /> | ||||
|             </el-tab-pane> | ||||
|             <el-tab-pane> | ||||
|                 <template #label> | ||||
|                     <el-icon><Document /></el-icon> | ||||
|                     <span>团队管理</span> | ||||
|                 </template> | ||||
|                 导入导出 | ||||
|             </el-tab-pane> | ||||
|         </el-tabs> | ||||
|     </div> | ||||
| </template> | ||||
| <script lang="ts"> | ||||
| import { ref, reactive } from "vue"; | ||||
| // import { User } from "@element-plus/icons-vue"; | ||||
|  | ||||
| import TelsalerManagement from "@/views/telsaler/TelsalerManagement.vue"; | ||||
|  | ||||
| export default { | ||||
|     name: "TelsalerManagementView", | ||||
|     components: { TelsalerManagement, }, | ||||
|     setup() | ||||
|     { | ||||
|         const ui = reactive({ | ||||
|             showUI: true, | ||||
|         }); | ||||
|  | ||||
|         return { | ||||
|             ui, | ||||
|         }; | ||||
|     }, | ||||
| }; | ||||
| </script> | ||||
| <style scoped lang="scss"> | ||||
| .telsaler-management-view-wrapper { | ||||
|     margin: 10px 10px; | ||||
|  | ||||
|     min-width: 800px; | ||||
|  | ||||
|     >*+* { | ||||
|         margin-top: 10px; | ||||
|     } | ||||
|  | ||||
|     span { | ||||
|         margin-left: 4px; | ||||
|         vertical-align: middle; | ||||
|     } | ||||
| } | ||||
| </style> | ||||
| @@ -11,14 +11,18 @@ | ||||
|     "compilerOptions": { | ||||
|         "forceConsistentCasingInFileNames": true, | ||||
|         "useDefineForClassFields": true, | ||||
|         "target": "ES2015", | ||||
|         "module": "ES2015", | ||||
|         "allowImportingTsExtensions": true, | ||||
|         "noEmit": true, | ||||
|         "target": "ESNext", | ||||
|         "module": "ESNext", | ||||
|         "moduleResolution": "node", | ||||
|         "strict": true, | ||||
|         "strictNullChecks": true, | ||||
|         "jsx": "preserve", | ||||
|         "sourceMap": true, | ||||
|         "resolveJsonModule": true, | ||||
|         "esModuleInterop": false, | ||||
|         "isolatedModules": true, | ||||
|         "baseUrl": "./", // paths 路径解析起点 | ||||
|         "paths": { // 别名路径设置 | ||||
|             "@/*": [ | ||||
| @@ -34,6 +38,7 @@ | ||||
|         ] | ||||
|     }, | ||||
|     "include": [ | ||||
|         "src/**/*", | ||||
|         "src/**/*.ts", | ||||
|         "src/**/*.tsx", | ||||
|         "src/**/*.vue", | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-02-15 09:25:52 | ||||
|  * @LastEditors: Kane | ||||
|  * @LastEditTime: 2023-06-25 09:51:13 | ||||
|  * @LastEditTime: 2023-11-13 10:42:29 | ||||
|  * @FilePath: /task_schedule/vite.config.js | ||||
|  * @Description:  | ||||
|  *  | ||||
| @@ -19,6 +19,9 @@ export default defineConfig(( command, mode ) => | ||||
|  | ||||
|     return { | ||||
|         server:{ host: "localhost", port: 5173, }, | ||||
|         build: { | ||||
|             outDir: "../../../输出/web", | ||||
|         }, | ||||
|         plugins: [vue(),], | ||||
|         base: "./", | ||||
|         resolve: { | ||||
|   | ||||
| @@ -1,5 +1,8 @@ | ||||
| { | ||||
|     "java.configuration.updateBuildConfiguration": "automatic", | ||||
|     "java.compile.nullAnalysis.mode": "automatic", | ||||
|     "vue.codeActions.enabled": false | ||||
|     "vue.codeActions.enabled": false, | ||||
|     "java.debug.settings.onBuildFailureProceed": true, | ||||
|     "java.checkstyle.version": "10.12.4", | ||||
|     "java.checkstyle.configuration": "/D:/DevTools/vscode/代码格式化/eclipse-java-google-style.xml" | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" ?> | ||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||||
|   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"> | ||||
| @@ -13,8 +14,9 @@ | ||||
|     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||||
|     <maven.compiler.source>17</maven.compiler.source> | ||||
|     <maven.compiler.target>17</maven.compiler.target> | ||||
|     <spring.version>5.3.24</spring.version> | ||||
|     <!-- <spring.version>6.0.8</spring.version> --> | ||||
|     <!-- <spring.version>5.3.30</spring.version> --> | ||||
|     <log4j2.version>2.20.0</log4j2.version> | ||||
|     <spring.version>6.2.4</spring.version> | ||||
|   </properties> | ||||
|  | ||||
|   <dependencies> | ||||
| @@ -65,7 +67,7 @@ | ||||
|     <dependency> | ||||
|       <groupId>commons-io</groupId> | ||||
|       <artifactId>commons-io</artifactId> | ||||
|       <version>2.11.0</version> | ||||
|       <version>2.18.0</version> | ||||
|     </dependency> | ||||
|  | ||||
|     <!--jackson--> | ||||
| @@ -87,10 +89,21 @@ | ||||
|       <version>2.13.4</version> | ||||
|     </dependency> | ||||
|  | ||||
|     <dependency> | ||||
|     <!-- <dependency> | ||||
|       <groupId>com.oracle</groupId> | ||||
|       <artifactId>ojdbc8</artifactId> | ||||
|       <version>19.3.0.0.0</version> | ||||
|     </dependency> --> | ||||
|  | ||||
|     <dependency> | ||||
|       <groupId>com.oracle.database.jdbc</groupId> | ||||
|       <artifactId>ojdbc10</artifactId> | ||||
|       <version>19.19.0.0</version> | ||||
|     </dependency> | ||||
|     <dependency> | ||||
|       <groupId>com.oracle.database.nls</groupId> | ||||
|       <artifactId>orai18n</artifactId> | ||||
|       <version>23.2.0.0</version> | ||||
|     </dependency> | ||||
|  | ||||
|     <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core --> | ||||
| @@ -105,16 +118,55 @@ | ||||
|       <artifactId>log4j-slf4j2-impl</artifactId> | ||||
|       <version>2.20.0</version> | ||||
|     </dependency> | ||||
|     <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api --> | ||||
|     <dependency> | ||||
|       <groupId>org.apache.logging.log4j</groupId> | ||||
|       <artifactId>log4j-api</artifactId> | ||||
|       <version>2.20.0</version> | ||||
|     </dependency> | ||||
|  | ||||
|  | ||||
|     <!-- POI --> | ||||
|     <!-- https://mvnrepository.com/artifact/org.apache.poi/poi --> | ||||
|     <dependency> | ||||
|       <groupId>org.apache.poi</groupId> | ||||
|       <artifactId>poi</artifactId> | ||||
|       <version>5.2.3</version> | ||||
|     </dependency> | ||||
|     <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml --> | ||||
|     <dependency> | ||||
|       <groupId>org.apache.poi</groupId> | ||||
|       <artifactId>poi-ooxml</artifactId> | ||||
|       <version>5.2.3</version> | ||||
|     </dependency> | ||||
|  | ||||
|     <dependency> | ||||
|       <groupId>org.mybatis</groupId> | ||||
|       <artifactId>mybatis</artifactId> | ||||
|       <version>3.5.13</version> | ||||
|     </dependency> | ||||
|   </dependencies> | ||||
|    | ||||
|   <build> | ||||
|     <finalName>desktop_archievement_backend</finalName> | ||||
|     <resources> | ||||
|       <resource> | ||||
|         <directory>src/main/resources</directory> | ||||
|         <includes> | ||||
|           <include>**/*.properties</include> | ||||
|           <include>**/*.xml</include> | ||||
|         </includes> | ||||
|         <filtering>false</filtering> | ||||
|       </resource> | ||||
|     </resources> | ||||
|     <plugins> | ||||
|       <plugin> | ||||
|         <groupId>org.apache.maven.plugins</groupId> | ||||
|         <artifactId>maven-war-plugin</artifactId> | ||||
|         <version>3.3.2</version> | ||||
|         <configuration></configuration> | ||||
|         <configuration> | ||||
|           <outputDirectory>${project.build.directory}/../../../../输出/back/</outputDirectory> | ||||
|         </configuration> | ||||
|       </plugin> | ||||
|       <plugin> | ||||
|         <groupId>org.apache.maven.plugins</groupId> | ||||
|   | ||||
| @@ -0,0 +1,19 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-07-27 11:05:53 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ArchievementMapper.java | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.mapper; | ||||
|  | ||||
| import java.util.HashMap; | ||||
|  | ||||
| public interface ArchievementMapper | ||||
| { | ||||
|     public void getDepartmentArchievement( HashMap<String, Object> params ); | ||||
|  | ||||
|     public void getCallerArchievement( HashMap<String, Object> params ); | ||||
| } | ||||
| @@ -0,0 +1,34 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-11 16:47:59 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ImportBIArchievementDataMapper.java | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.mapper; | ||||
|  | ||||
| import com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord; | ||||
| import com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord; | ||||
| import com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord; | ||||
| import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord; | ||||
|  | ||||
| public interface ImportBIArchievementDataMapper | ||||
| { | ||||
|     public void insertTelsalerAttachingRateDataToDB( BITelsalerAttachingRateRecord record); | ||||
|  | ||||
|     public void insertTelsalerRenewalRateDataToDB( BITelsalerRenewalRateRecord record ); | ||||
|  | ||||
|     public void insertDepartmentAttachingRateDataToDB(BIDepartmentAttachingRateRecord record); | ||||
|  | ||||
|     public void insertDepartmentRenewalRateDataToDB(BIDepartmentRenewalRateRecord record); | ||||
|     | ||||
|     public void cleanTelsalerAttachingRateData(); | ||||
|  | ||||
|     public void cleanTelsalerRenewalRateData(); | ||||
|  | ||||
|     public void cleanDepartmentAttachingRateData(); | ||||
|  | ||||
|     public void cleanDepartmentRenewalRateData(); | ||||
| } | ||||
| @@ -0,0 +1,27 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-11-01 15:50:40 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/QueryBIArchievementDataMapper.java | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.mapper; | ||||
|  | ||||
| import java.util.ArrayList; | ||||
| import com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord; | ||||
| import com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord; | ||||
| import com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord; | ||||
| import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord; | ||||
|  | ||||
| public interface QueryBIArchievementDataMapper  | ||||
| { | ||||
|     public ArrayList<BITelsalerAttachingRateRecord> queryBITelsalerAttachingRate(); | ||||
|  | ||||
|     public ArrayList<BITelsalerRenewalRateRecord> queryBITesalerRenewalRate(); | ||||
|  | ||||
|     public ArrayList<BIDepartmentAttachingRateRecord> queryBIDepartmentAttachingRate(); | ||||
|  | ||||
|     public ArrayList<BIDepartmentRenewalRateRecord> queryBIDepartmentRenewalRate(); | ||||
| } | ||||
| @@ -0,0 +1,17 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-07-29 22:59:09 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/RankingListMapper.java | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.mapper; | ||||
|  | ||||
| import java.util.HashMap; | ||||
|  | ||||
| public interface RankingListMapper | ||||
| { | ||||
|     public void getRankingList( HashMap<String, Object> params ); | ||||
| } | ||||
| @@ -0,0 +1,29 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-06 11:17:44 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/RewardsMapper.java | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
|  | ||||
| package com.cpic.xim.mybatis.mapper; | ||||
|  | ||||
| import java.util.ArrayList; | ||||
| import java.util.HashMap; | ||||
| import com.cpic.xim.mybatis.pojo.RewardGainer; | ||||
| import com.cpic.xim.mybatis.pojo.RewardProject; | ||||
|  | ||||
| public interface RewardsMapper  | ||||
| { | ||||
|     public ArrayList<RewardProject> queryRewardProjects(); | ||||
|  | ||||
|     public ArrayList<RewardGainer> queryRewardTelsaler(); | ||||
|  | ||||
|     public void addRewardTelSaler( HashMap<String, Object> params ); | ||||
|  | ||||
|     public void updateRewardTelSaler( HashMap<String, Object> params ); | ||||
|  | ||||
|     public void deleteRewardTelSaler( HashMap<String, Object> params ); | ||||
| } | ||||
| @@ -0,0 +1,24 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-11-25 18:48:11 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/TWrTelsalerMapper.java | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.mapper; | ||||
|  | ||||
| import org.apache.ibatis.annotations.Param; | ||||
| import com.cpic.xim.mybatis.pojo.TWrTelsalerRecord; | ||||
|  | ||||
| public interface TWrTelsalerMapper | ||||
| { | ||||
|     public TWrTelsalerRecord queryTWrTelsalerInfo( @Param("telsaler") String telsaler ); | ||||
|  | ||||
|     public void insertTWrTelsalerRecordToDB( TWrTelsalerRecord record ); | ||||
|  | ||||
|     public void cleanTWrTelsalerRecord(); | ||||
|  | ||||
|     public void cleanTWrTelsalerTeamRecord(); | ||||
| } | ||||
| @@ -0,0 +1,296 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-10 14:50:55 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/BIDepartmentAttachingRateRecord.java | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.pojo; | ||||
|  | ||||
| public class BIDepartmentAttachingRateRecord | ||||
| { | ||||
|     // 部门 | ||||
|     private String departmentName; | ||||
|     // 目标值-机构 | ||||
|     private double departmentObject; | ||||
|     // 目标差距 | ||||
|     private double objectGap; | ||||
|     // 车险保费(万) | ||||
|     private double motoPremium; | ||||
|     // 车险保费占比 | ||||
|     private double motoPremiumProPortion; | ||||
|     // 非车保费(万) | ||||
|     private double nomotoPremium; | ||||
|     // 当月保费渗透率 | ||||
|     private double attachingRate; | ||||
|     // 保费渗透率环比上月 | ||||
|     private double attachingRateChange; | ||||
|     // 车险客户数 | ||||
|     private int motoInsuranceCustomerCount; | ||||
|     // 当月客户渗透率 | ||||
|     private double customerHandleRate; | ||||
|  | ||||
|     // 客户渗透率环比上月 | ||||
|     private double customerHandleRateChange; | ||||
|  | ||||
|     // 当月车非客均保费 | ||||
|     private double premiumPerCustomer; | ||||
|  | ||||
|     // 客均保费环比上月 | ||||
|     private double premiumPerCustomerChange; | ||||
|  | ||||
|     public BIDepartmentAttachingRateRecord( String departmentName, double departmentObject, | ||||
|             double objectGap, double motoPremium, double motoPremiumProPortion, | ||||
|             double nomotoPremium, double attachingRate, double attachingRateChange, | ||||
|             int motoInsuranceCustomerCount, double customerHandleRate, | ||||
|             double customerHandleRateChange, double premiumPerCustomer, | ||||
|             double premiumPerCustomerChange ) | ||||
|     { | ||||
|         this.departmentName = departmentName; | ||||
|         this.departmentObject = departmentObject; | ||||
|         this.objectGap = objectGap; | ||||
|         this.motoPremium = motoPremium; | ||||
|         this.motoPremiumProPortion = motoPremiumProPortion; | ||||
|         this.nomotoPremium = nomotoPremium; | ||||
|         this.attachingRate = attachingRate; | ||||
|         this.attachingRateChange = attachingRateChange; | ||||
|         this.motoInsuranceCustomerCount = motoInsuranceCustomerCount; | ||||
|         this.customerHandleRate = customerHandleRate; | ||||
|         this.customerHandleRateChange = customerHandleRateChange; | ||||
|         this.premiumPerCustomer = premiumPerCustomer; | ||||
|         this.premiumPerCustomerChange = premiumPerCustomerChange; | ||||
|     } | ||||
|  | ||||
|     public int getMotoInsuranceCustomerCount() | ||||
|     { | ||||
|         return motoInsuranceCustomerCount; | ||||
|     } | ||||
|  | ||||
|     public void setMotoInsuranceCustomerCount( int motoInsuranceCustomerCount ) | ||||
|     { | ||||
|         this.motoInsuranceCustomerCount = motoInsuranceCustomerCount; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() | ||||
|     { | ||||
|         return "BIDepartmentAttachingRateRecord [departmentName=" + departmentName | ||||
|                 + ", departmentObject=" + departmentObject + ", objectGap=" + objectGap | ||||
|                 + ", motoPremium=" + motoPremium + ", motoPremiumProPortion=" | ||||
|                 + motoPremiumProPortion + ", nomotoPremium=" + nomotoPremium + ", attachingRate=" | ||||
|                 + attachingRate + ", attachingRateChange=" + attachingRateChange | ||||
|                 + ", motoInsuranceCustomerCount=" + motoInsuranceCustomerCount | ||||
|                 + ", customerHandleRate=" + customerHandleRate + ", customerHandleRateChange=" | ||||
|                 + customerHandleRateChange + ", premiumPerCustomer=" + premiumPerCustomer | ||||
|                 + ", premiumPerCustomerChange=" + premiumPerCustomerChange + "]"; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int hashCode() | ||||
|     { | ||||
|         final int prime = 31; | ||||
|         int result = 1; | ||||
|         result = prime * result + ((departmentName == null) ? 0 : departmentName.hashCode()); | ||||
|         long temp; | ||||
|         temp = Double.doubleToLongBits( departmentObject ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( objectGap ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( motoPremium ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( motoPremiumProPortion ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( nomotoPremium ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( attachingRate ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( attachingRateChange ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         result = prime * result + motoInsuranceCustomerCount; | ||||
|         temp = Double.doubleToLongBits( customerHandleRate ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( customerHandleRateChange ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( premiumPerCustomer ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( premiumPerCustomerChange ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public boolean equals( Object obj ) | ||||
|     { | ||||
|         if ( this == obj ) | ||||
|             return true; | ||||
|         if ( obj == null ) | ||||
|             return false; | ||||
|         if ( getClass() != obj.getClass() ) | ||||
|             return false; | ||||
|         BIDepartmentAttachingRateRecord other = (BIDepartmentAttachingRateRecord) obj; | ||||
|         if ( departmentName == null ) | ||||
|         { | ||||
|             if ( other.departmentName != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !departmentName.equals( other.departmentName ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( departmentObject ) != Double | ||||
|                 .doubleToLongBits( other.departmentObject ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( objectGap ) != Double.doubleToLongBits( other.objectGap ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( motoPremium ) != Double | ||||
|                 .doubleToLongBits( other.motoPremium ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( motoPremiumProPortion ) != Double | ||||
|                 .doubleToLongBits( other.motoPremiumProPortion ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( nomotoPremium ) != Double | ||||
|                 .doubleToLongBits( other.nomotoPremium ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( attachingRate ) != Double | ||||
|                 .doubleToLongBits( other.attachingRate ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( attachingRateChange ) != Double | ||||
|                 .doubleToLongBits( other.attachingRateChange ) ) | ||||
|             return false; | ||||
|         if ( motoInsuranceCustomerCount != other.motoInsuranceCustomerCount ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( customerHandleRate ) != Double | ||||
|                 .doubleToLongBits( other.customerHandleRate ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( customerHandleRateChange ) != Double | ||||
|                 .doubleToLongBits( other.customerHandleRateChange ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( premiumPerCustomer ) != Double | ||||
|                 .doubleToLongBits( other.premiumPerCustomer ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( premiumPerCustomerChange ) != Double | ||||
|                 .doubleToLongBits( other.premiumPerCustomerChange ) ) | ||||
|             return false; | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     public String getDepartmentName() | ||||
|     { | ||||
|         return departmentName; | ||||
|     } | ||||
|  | ||||
|     public void setDepartmentName( String departmentName ) | ||||
|     { | ||||
|         this.departmentName = departmentName; | ||||
|     } | ||||
|  | ||||
|     public double getDepartmentObject() | ||||
|     { | ||||
|         return departmentObject; | ||||
|     } | ||||
|  | ||||
|     public void setDepartmentObject( double departmentObject ) | ||||
|     { | ||||
|         this.departmentObject = departmentObject; | ||||
|     } | ||||
|  | ||||
|     public double getObjectGap() | ||||
|     { | ||||
|         return objectGap; | ||||
|     } | ||||
|  | ||||
|     public void setObjectGap( double objectGap ) | ||||
|     { | ||||
|         this.objectGap = objectGap; | ||||
|     } | ||||
|  | ||||
|     public double getMotoPremium() | ||||
|     { | ||||
|         return motoPremium; | ||||
|     } | ||||
|  | ||||
|     public void setMotoPremium( double motoPremium ) | ||||
|     { | ||||
|         this.motoPremium = motoPremium; | ||||
|     } | ||||
|  | ||||
|     public double getMotoPremiumProPortion() | ||||
|     { | ||||
|         return motoPremiumProPortion; | ||||
|     } | ||||
|  | ||||
|     public void setMotoPremiumProPortion( double motoPremiumProPortion ) | ||||
|     { | ||||
|         this.motoPremiumProPortion = motoPremiumProPortion; | ||||
|     } | ||||
|  | ||||
|     public double getNomotoPremium() | ||||
|     { | ||||
|         return nomotoPremium; | ||||
|     } | ||||
|  | ||||
|     public void setNomotoPremium( double nomotoPremium ) | ||||
|     { | ||||
|         this.nomotoPremium = nomotoPremium; | ||||
|     } | ||||
|  | ||||
|     public double getAttachingRate() | ||||
|     { | ||||
|         return attachingRate; | ||||
|     } | ||||
|  | ||||
|     public void setAttachingRate( double attachingRate ) | ||||
|     { | ||||
|         this.attachingRate = attachingRate; | ||||
|     } | ||||
|  | ||||
|     public double getAttachingRateChange() | ||||
|     { | ||||
|         return attachingRateChange; | ||||
|     } | ||||
|  | ||||
|     public void setAttachingRateChange( double attachingRateChange ) | ||||
|     { | ||||
|         this.attachingRateChange = attachingRateChange; | ||||
|     } | ||||
|  | ||||
|     public double getCustomerHandleRate() | ||||
|     { | ||||
|         return customerHandleRate; | ||||
|     } | ||||
|  | ||||
|     public void setCustomerHandleRate( double customerHandleRate ) | ||||
|     { | ||||
|         this.customerHandleRate = customerHandleRate; | ||||
|     } | ||||
|  | ||||
|     public double getCustomerHandleRateChange() | ||||
|     { | ||||
|         return customerHandleRateChange; | ||||
|     } | ||||
|  | ||||
|     public void setCustomerHandleRateChange( double customerHandleRateChange ) | ||||
|     { | ||||
|         this.customerHandleRateChange = customerHandleRateChange; | ||||
|     } | ||||
|  | ||||
|     public double getPremiumPerCustomer() | ||||
|     { | ||||
|         return premiumPerCustomer; | ||||
|     } | ||||
|  | ||||
|     public void setPremiumPerCustomer( double premiumPerCustomer ) | ||||
|     { | ||||
|         this.premiumPerCustomer = premiumPerCustomer; | ||||
|     } | ||||
|  | ||||
|     public double getPremiumPerCustomerChange() | ||||
|     { | ||||
|         return premiumPerCustomerChange; | ||||
|     } | ||||
|  | ||||
|     public void setPremiumPerCustomerChange( double premiumPerCustomerChange ) | ||||
|     { | ||||
|         this.premiumPerCustomerChange = premiumPerCustomerChange; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,188 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-24 11:06:29 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/BIDepartmentRenewalRateRecord.java | ||||
|  * @Description: BI机构当月个车续保率跟踪表记录对象 | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.pojo; | ||||
|  | ||||
| public class BIDepartmentRenewalRateRecord | ||||
| { | ||||
|     private String 责任部门; | ||||
|     private double 机构目标值; | ||||
|     private int 到期数全月; | ||||
|     private double 序时到期数占比; | ||||
|     private double 个车续保率序时; | ||||
|     private double 个车续保率全月; | ||||
|     private double 环比昨日; | ||||
|     private double 环比上月; | ||||
|     // private int 平均提前签单天数; | ||||
|     // private double 环比; | ||||
|  | ||||
|     public BIDepartmentRenewalRateRecord() | ||||
|     {} | ||||
|  | ||||
|     public BIDepartmentRenewalRateRecord( String 责任部门, double 机构目标值, int 到期数全月, double 序时到期数占比, | ||||
|             double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月 ) | ||||
|     { | ||||
|         this.责任部门 = 责任部门; | ||||
|         this.机构目标值 = 机构目标值; | ||||
|         this.到期数全月 = 到期数全月; | ||||
|         this.序时到期数占比 = 序时到期数占比; | ||||
|         this.个车续保率序时 = 个车续保率序时; | ||||
|         this.个车续保率全月 = 个车续保率全月; | ||||
|         this.环比昨日 = 环比昨日; | ||||
|         this.环比上月 = 环比上月; | ||||
|         // this.平均提前签单天数 = 平均提前签单天数; | ||||
|         // this.环比 = 环比; | ||||
|     } | ||||
|  | ||||
|     public String get责任部门() | ||||
|     { | ||||
|         return 责任部门; | ||||
|     } | ||||
|  | ||||
|     public void set责任部门( String 责任部门 ) | ||||
|     { | ||||
|         this.责任部门 = 责任部门; | ||||
|     } | ||||
|  | ||||
|     public double get机构目标值() | ||||
|     { | ||||
|         return 机构目标值; | ||||
|     } | ||||
|  | ||||
|     public void set机构目标值( double 机构目标值 ) | ||||
|     { | ||||
|         this.机构目标值 = 机构目标值; | ||||
|     } | ||||
|  | ||||
|     public int get到期数全月() | ||||
|     { | ||||
|         return 到期数全月; | ||||
|     } | ||||
|  | ||||
|     public void set到期数全月( int 到期数全月 ) | ||||
|     { | ||||
|         this.到期数全月 = 到期数全月; | ||||
|     } | ||||
|  | ||||
|     public double get序时到期数占比() | ||||
|     { | ||||
|         return 序时到期数占比; | ||||
|     } | ||||
|  | ||||
|     public void set序时到期数占比( double 序时到期数占比 ) | ||||
|     { | ||||
|         this.序时到期数占比 = 序时到期数占比; | ||||
|     } | ||||
|  | ||||
|     public double get个车续保率序时() | ||||
|     { | ||||
|         return 个车续保率序时; | ||||
|     } | ||||
|  | ||||
|     public void set个车续保率序时( double 个车续保率序时 ) | ||||
|     { | ||||
|         this.个车续保率序时 = 个车续保率序时; | ||||
|     } | ||||
|  | ||||
|     public double get个车续保率全月() | ||||
|     { | ||||
|         return 个车续保率全月; | ||||
|     } | ||||
|  | ||||
|     public void set个车续保率全月( double 个车续保率全月 ) | ||||
|     { | ||||
|         this.个车续保率全月 = 个车续保率全月; | ||||
|     } | ||||
|  | ||||
|     public double get环比昨日() | ||||
|     { | ||||
|         return 环比昨日; | ||||
|     } | ||||
|  | ||||
|     public void set环比昨日( double 环比昨日 ) | ||||
|     { | ||||
|         this.环比昨日 = 环比昨日; | ||||
|     } | ||||
|  | ||||
|     public double get环比上月() | ||||
|     { | ||||
|         return 环比上月; | ||||
|     } | ||||
|  | ||||
|     public void set环比上月( double 环比上月 ) | ||||
|     { | ||||
|         this.环比上月 = 环比上月; | ||||
|     } | ||||
|  | ||||
|  | ||||
|     @Override | ||||
|     public int hashCode() | ||||
|     { | ||||
|         final int prime = 31; | ||||
|         int result = 1; | ||||
|         result = prime * result + ((责任部门 == null) ? 0 : 责任部门.hashCode()); | ||||
|         long temp; | ||||
|         temp = Double.doubleToLongBits( 机构目标值 ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         result = prime * result + 到期数全月; | ||||
|         temp = Double.doubleToLongBits( 序时到期数占比 ); | ||||
|         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)); | ||||
|         temp = Double.doubleToLongBits( 环比昨日 ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( 环比上月 ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public boolean equals( Object obj ) | ||||
|     { | ||||
|         if ( this == obj ) | ||||
|             return true; | ||||
|         if ( obj == null ) | ||||
|             return false; | ||||
|         if ( getClass() != obj.getClass() ) | ||||
|             return false; | ||||
|         BIDepartmentRenewalRateRecord other = (BIDepartmentRenewalRateRecord) obj; | ||||
|         if ( 责任部门 == null ) | ||||
|         { | ||||
|             if ( other.责任部门 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !责任部门.equals( other.责任部门 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 机构目标值 ) != Double.doubleToLongBits( other.机构目标值 ) ) | ||||
|             return false; | ||||
|         if ( 到期数全月 != other.到期数全月 ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 序时到期数占比 ) != Double.doubleToLongBits( other.序时到期数占比 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 个车续保率序时 ) != Double.doubleToLongBits( other.个车续保率序时 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 个车续保率全月 ) != Double.doubleToLongBits( other.个车续保率全月 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 环比昨日 ) != Double.doubleToLongBits( other.环比昨日 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 环比上月 ) != Double.doubleToLongBits( other.环比上月 ) ) | ||||
|             return false; | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() | ||||
|     { | ||||
|         return "BIDepartmentRenewalRateRecord [责任部门=" + 责任部门 + ", 机构目标值=" + 机构目标值 + ", 到期数全月=" | ||||
|                 + 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时 + ", 个车续保率全月=" + 个车续保率全月 | ||||
|                 + ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + "]"; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,287 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-08 14:45:13 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/BITelsalerAttachingRateRecord.java | ||||
|  * @Description: 用于存放BI导出每日电销坐席车险非车险保费和车非渗透率数据. | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.pojo; | ||||
|  | ||||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||||
|  | ||||
| public class BITelsalerAttachingRateRecord | ||||
| { | ||||
|     // 部门 | ||||
|     @JsonProperty( "departmentName" ) | ||||
|     private String departmentName; | ||||
|  | ||||
|     // 坐席名称 | ||||
|     @JsonProperty( "telsalerName" ) | ||||
|     private String telsalerName; | ||||
|  | ||||
|     // 车险保费 | ||||
|     @JsonProperty( "motoPremium" ) | ||||
|     private double motoPremium; | ||||
|  | ||||
|     // 非车险保费 | ||||
|     @JsonProperty( "nomotoPremium" ) | ||||
|     private double nomotoPremium; | ||||
|  | ||||
|     // 车险保费占比 | ||||
|     @JsonProperty( "motoPremiumProportion" ) | ||||
|     private double motoPremiumProportion; | ||||
|  | ||||
|     // 渗透率 | ||||
|     @JsonProperty( "attachingRate" ) | ||||
|     private double attachingRate; | ||||
|  | ||||
|     // 渗透率环比上月 | ||||
|     @JsonProperty( "attachingRateChange" ) | ||||
|     private double attachingRateChange; | ||||
|  | ||||
|     // 当月客户渗透率 | ||||
|     @JsonProperty( "customerHandleRate" ) | ||||
|     private double customerHandleRate; | ||||
|  | ||||
|     // 客户渗透率环比上月 | ||||
|     @JsonProperty( "customerHandleRateChange" ) | ||||
|     private double customerHandleRateChange; | ||||
|  | ||||
|     // 当月车非客均保费 | ||||
|     @JsonProperty( "noMotoPremiumPerCustomer" ) | ||||
|     private double noMotoPremiumPerCustomer; | ||||
|  | ||||
|     // 客均保费环比上月 | ||||
|     @JsonProperty( "noMotoPremiumPerCustomerChange" ) | ||||
|     private double noMotoPremiumPerCustomerChange; | ||||
|  | ||||
|     public BITelsalerAttachingRateRecord( String departmentName, | ||||
|             String telsalerName, double motoPremium, double nomotoPremium, | ||||
|             double motoPremiumProportion, double attachingRate, double attachingRateChange, | ||||
|             double customerHandleRate, double customerHandleRateChange, | ||||
|             double noMotoPremiumPerCustomer, double noMotoPremiumPerCustomerChange ) | ||||
|     { | ||||
|         this.departmentName = departmentName; | ||||
|         this.telsalerName = telsalerName; | ||||
|         this.motoPremium = motoPremium; | ||||
|         this.nomotoPremium = nomotoPremium; | ||||
|         this.motoPremiumProportion = motoPremiumProportion; | ||||
|         this.attachingRate = attachingRate; | ||||
|         this.attachingRateChange = attachingRateChange; | ||||
|         this.customerHandleRate = customerHandleRate; | ||||
|         this.customerHandleRateChange = customerHandleRateChange; | ||||
|         this.noMotoPremiumPerCustomer = noMotoPremiumPerCustomer; | ||||
|         this.noMotoPremiumPerCustomerChange = noMotoPremiumPerCustomerChange; | ||||
|     } | ||||
|  | ||||
|     public BITelsalerAttachingRateRecord() | ||||
|     {} | ||||
|  | ||||
|     public double getCustomerHandleRate() | ||||
|     { | ||||
|         return customerHandleRate; | ||||
|     } | ||||
|  | ||||
|     public void setCustomerHandleRate( double customerHandleRate ) | ||||
|     { | ||||
|         this.customerHandleRate = customerHandleRate; | ||||
|     } | ||||
|  | ||||
|     public double getCustomerHandleRateChange() | ||||
|     { | ||||
|         return customerHandleRateChange; | ||||
|     } | ||||
|  | ||||
|     public void setCustomerHandleRateChange( double customerHandleRateChange ) | ||||
|     { | ||||
|         this.customerHandleRateChange = customerHandleRateChange; | ||||
|     } | ||||
|  | ||||
|     public double getNoMotoPremiumPerCustomer() | ||||
|     { | ||||
|         return noMotoPremiumPerCustomer; | ||||
|     } | ||||
|  | ||||
|     public void setNoMotoPremiumPerCustomer( double noMotoPremiumPerCustomer ) | ||||
|     { | ||||
|         this.noMotoPremiumPerCustomer = noMotoPremiumPerCustomer; | ||||
|     } | ||||
|  | ||||
|     public double getNoMotoPremiumPerCustomerChange() | ||||
|     { | ||||
|         return noMotoPremiumPerCustomerChange; | ||||
|     } | ||||
|  | ||||
|     public void setNoMotoPremiumPerCustomerChange( double noMotoPremiumPerCustomerChange ) | ||||
|     { | ||||
|         this.noMotoPremiumPerCustomerChange = noMotoPremiumPerCustomerChange; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() | ||||
|     { | ||||
|         return "BITelsalerAttachingRateRecord [departmentName=" + departmentName + ", summaryDate=" | ||||
|                 + ", telsalerName=" + telsalerName + ", motoPremium=" + motoPremium | ||||
|                 + ", nomotoPremium=" + nomotoPremium + ", motoPremiumProportion=" | ||||
|                 + motoPremiumProportion + ", attachingRate=" + attachingRate | ||||
|                 + ", attachingRateChange=" + attachingRateChange + ", customerHandleRate=" | ||||
|                 + customerHandleRate + ", customerHandleRateChange=" + customerHandleRateChange | ||||
|                 + ", noMotoPremiumPerCustomer=" + noMotoPremiumPerCustomer | ||||
|                 + ", noMotoPremiumPerCustomerChange=" + noMotoPremiumPerCustomerChange + "]"; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int hashCode() | ||||
|     { | ||||
|         final int prime = 31; | ||||
|         int result = 1; | ||||
|         result = prime * result + ((departmentName == null) ? 0 : departmentName.hashCode()); | ||||
|         result = prime * result + ((telsalerName == null) ? 0 : telsalerName.hashCode()); | ||||
|         long temp; | ||||
|         temp = Double.doubleToLongBits( motoPremium ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( nomotoPremium ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( motoPremiumProportion ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( attachingRate ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( attachingRateChange ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( customerHandleRate ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( customerHandleRateChange ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( noMotoPremiumPerCustomer ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         temp = Double.doubleToLongBits( noMotoPremiumPerCustomerChange ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public boolean equals( Object obj ) | ||||
|     { | ||||
|         if ( this == obj ) | ||||
|             return true; | ||||
|         if ( obj == null ) | ||||
|             return false; | ||||
|         if ( getClass() != obj.getClass() ) | ||||
|             return false; | ||||
|         BITelsalerAttachingRateRecord other = (BITelsalerAttachingRateRecord) obj; | ||||
|         if ( departmentName == null ) | ||||
|         { | ||||
|             if ( other.departmentName != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !departmentName.equals( other.departmentName ) ) | ||||
|             return false; | ||||
|         if ( telsalerName == null ) | ||||
|         { | ||||
|             if ( other.telsalerName != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !telsalerName.equals( other.telsalerName ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( motoPremium ) != Double | ||||
|                 .doubleToLongBits( other.motoPremium ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( nomotoPremium ) != Double | ||||
|                 .doubleToLongBits( other.nomotoPremium ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( motoPremiumProportion ) != Double | ||||
|                 .doubleToLongBits( other.motoPremiumProportion ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( attachingRate ) != Double | ||||
|                 .doubleToLongBits( other.attachingRate ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( attachingRateChange ) != Double | ||||
|                 .doubleToLongBits( other.attachingRateChange ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( customerHandleRate ) != Double | ||||
|                 .doubleToLongBits( other.customerHandleRate ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( customerHandleRateChange ) != Double | ||||
|                 .doubleToLongBits( other.customerHandleRateChange ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( noMotoPremiumPerCustomer ) != Double | ||||
|                 .doubleToLongBits( other.noMotoPremiumPerCustomer ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( noMotoPremiumPerCustomerChange ) != Double | ||||
|                 .doubleToLongBits( other.noMotoPremiumPerCustomerChange ) ) | ||||
|             return false; | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     public String getTelsalerName() | ||||
|     { | ||||
|         return telsalerName; | ||||
|     } | ||||
|  | ||||
|     public void setTelsalerName( String telsalerName ) | ||||
|     { | ||||
|         this.telsalerName = telsalerName; | ||||
|     } | ||||
|  | ||||
|     public double getMotoPremium() | ||||
|     { | ||||
|         return motoPremium; | ||||
|     } | ||||
|  | ||||
|     public void setMotoPremium( double motoPremium ) | ||||
|     { | ||||
|         this.motoPremium = motoPremium; | ||||
|     } | ||||
|  | ||||
|     public double getNomotoPremium() | ||||
|     { | ||||
|         return nomotoPremium; | ||||
|     } | ||||
|  | ||||
|     public void setNomotoPremium( double nomotoPremium ) | ||||
|     { | ||||
|         this.nomotoPremium = nomotoPremium; | ||||
|     } | ||||
|  | ||||
|     public double getMotoPremiumProportion() | ||||
|     { | ||||
|         return motoPremiumProportion; | ||||
|     } | ||||
|  | ||||
|     public void setMotoPremiumProportion( double motoPremiumProportion ) | ||||
|     { | ||||
|         this.motoPremiumProportion = motoPremiumProportion; | ||||
|     } | ||||
|  | ||||
|     public double getAttachingRate() | ||||
|     { | ||||
|         return attachingRate; | ||||
|     } | ||||
|  | ||||
|     public void setAttachingRate( double attachingRate ) | ||||
|     { | ||||
|         this.attachingRate = attachingRate; | ||||
|     } | ||||
|  | ||||
|     public double getAttachingRateChange() | ||||
|     { | ||||
|         return attachingRateChange; | ||||
|     } | ||||
|  | ||||
|     public void setAttachingRateChange( double attachingRateChange ) | ||||
|     { | ||||
|         this.attachingRateChange = attachingRateChange; | ||||
|     } | ||||
|  | ||||
|     public String getDepartmentName() | ||||
|     { | ||||
|         return departmentName; | ||||
|     } | ||||
|  | ||||
|     public void setDepartmentName( String departmentName ) | ||||
|     { | ||||
|         this.departmentName = departmentName; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,202 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-09 21:45:39 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/BITelsalerRenewalRateRecord.java | ||||
|  * @Description: BI导出的坐席续保率 Excel文件行记录。 | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.pojo; | ||||
|  | ||||
| public class BITelsalerRenewalRateRecord | ||||
| { | ||||
|     private String 责任部门; | ||||
|     private String 责任人; | ||||
|     private double 机构目标值; | ||||
|     private double 到期数全月; | ||||
|     private double 序时到期数占比; | ||||
|     private double 个车续保率序时; | ||||
|     private double 个车续保率全月; | ||||
|     private double 环比昨日; | ||||
|     private double 环比上月; | ||||
|     // private double 平均提前签单天数; | ||||
|     // private double 环比; | ||||
|      | ||||
|     public BITelsalerRenewalRateRecord( String 责任部门, String 责任人, double 机构目标值, double 到期数全月, | ||||
|             double 序时到期数占比, double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月 ) | ||||
|     { | ||||
|         this.责任部门 = 责任部门; | ||||
|         this.责任人 = 责任人; | ||||
|         this.机构目标值 = 机构目标值; | ||||
|         this.到期数全月 = 到期数全月; | ||||
|         this.序时到期数占比 = 序时到期数占比; | ||||
|         this.个车续保率序时 = 个车续保率序时; | ||||
|         this.个车续保率全月 = 个车续保率全月; | ||||
|         this.环比昨日 = 环比昨日; | ||||
|         this.环比上月 = 环比上月; | ||||
|     } | ||||
|  | ||||
|     public String get责任部门() | ||||
|     { | ||||
|         return 责任部门; | ||||
|     } | ||||
|  | ||||
|     public void set责任部门( String 责任部门 ) | ||||
|     { | ||||
|         this.责任部门 = 责任部门; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int hashCode() | ||||
|     { | ||||
|         final int prime = 31; | ||||
|         int result = 1; | ||||
|         result = prime * result + ((责任部门 == null) ? 0 : 责任部门.hashCode()); | ||||
|         result = prime * result + ((责任人 == null) ? 0 : 责任人.hashCode()); | ||||
|         long temp; | ||||
|         temp = Double.doubleToLongBits( 机构目标值 ); | ||||
|         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)); | ||||
|         temp = Double.doubleToLongBits( 个车续保率序时 ); | ||||
|         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)); | ||||
|         temp = Double.doubleToLongBits( 环比上月 ); | ||||
|         result = prime * result + (int) (temp ^ (temp >>> 32)); | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public boolean equals( Object obj ) | ||||
|     { | ||||
|         if ( this == obj ) | ||||
|             return true; | ||||
|         if ( obj == null ) | ||||
|             return false; | ||||
|         if ( getClass() != obj.getClass() ) | ||||
|             return false; | ||||
|         BITelsalerRenewalRateRecord other = (BITelsalerRenewalRateRecord) obj; | ||||
|         if ( 责任部门 == null ) | ||||
|         { | ||||
|             if ( other.责任部门 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !责任部门.equals( other.责任部门 ) ) | ||||
|             return false; | ||||
|         if ( 责任人 == null ) | ||||
|         { | ||||
|             if ( other.责任人 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !责任人.equals( other.责任人 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 机构目标值 ) != Double.doubleToLongBits( other.机构目标值 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 到期数全月 ) != Double.doubleToLongBits( other.到期数全月 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 序时到期数占比 ) != Double.doubleToLongBits( other.序时到期数占比 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 个车续保率序时 ) != Double.doubleToLongBits( other.个车续保率序时 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 个车续保率全月 ) != Double.doubleToLongBits( other.个车续保率全月 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 环比昨日 ) != Double.doubleToLongBits( other.环比昨日 ) ) | ||||
|             return false; | ||||
|         if ( Double.doubleToLongBits( 环比上月 ) != Double.doubleToLongBits( other.环比上月 ) ) | ||||
|             return false; | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() | ||||
|     { | ||||
|         return "BITelsalerRenewalRateRecord [责任部门=" + 责任部门 + ", 责任人=" + 责任人 + ", 机构目标值=" + 机构目标值 | ||||
|                 + ", 到期数全月=" + 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时 | ||||
|                 + ", 个车续保率全月=" + 个车续保率全月 + ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + "]"; | ||||
|     } | ||||
|  | ||||
|     public String get责任人() | ||||
|     { | ||||
|         return 责任人; | ||||
|     } | ||||
|  | ||||
|     public void set责任人( String 责任人 ) | ||||
|     { | ||||
|         this.责任人 = 责任人; | ||||
|     } | ||||
|  | ||||
|     public double get机构目标值() | ||||
|     { | ||||
|         return 机构目标值; | ||||
|     } | ||||
|  | ||||
|     public void set机构目标值( double 机构目标值 ) | ||||
|     { | ||||
|         this.机构目标值 = 机构目标值; | ||||
|     } | ||||
|  | ||||
|     public double get到期数全月() | ||||
|     { | ||||
|         return 到期数全月; | ||||
|     } | ||||
|  | ||||
|     public void set到期数全月( double 到期数全月 ) | ||||
|     { | ||||
|         this.到期数全月 = 到期数全月; | ||||
|     } | ||||
|  | ||||
|     public double get序时到期数占比() | ||||
|     { | ||||
|         return 序时到期数占比; | ||||
|     } | ||||
|     public void set序时到期数占比( double 序时到期数占比 ) | ||||
|     { | ||||
|         this.序时到期数占比 = 序时到期数占比; | ||||
|     } | ||||
|  | ||||
|     public double get个车续保率序时() | ||||
|     { | ||||
|         return 个车续保率序时; | ||||
|     } | ||||
|  | ||||
|     public void set个车续保率序时( double 个车续保率序时 ) | ||||
|     { | ||||
|         this.个车续保率序时 = 个车续保率序时; | ||||
|     } | ||||
|  | ||||
|     public double get个车续保率全月() | ||||
|     { | ||||
|         return 个车续保率全月; | ||||
|     }	 | ||||
|  | ||||
|     public void set个车续保率全月( double 个车续保率全月 ) | ||||
|     { | ||||
|         this.个车续保率全月 = 个车续保率全月; | ||||
|     } | ||||
|  | ||||
|     public double get环比昨日() | ||||
|     { | ||||
|         return 环比昨日; | ||||
|     } | ||||
|  | ||||
|     public void set环比昨日( double 环比昨日 ) | ||||
|     { | ||||
|         this.环比昨日 = 环比昨日; | ||||
|     } | ||||
|  | ||||
|     public double get环比上月() | ||||
|     { | ||||
|         return 环比上月; | ||||
|     } | ||||
|     	 | ||||
|     public void set环比上月( double 环比上月 ) | ||||
|     { | ||||
|         this.环比上月 = 环比上月; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,93 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-07-27 11:12:19 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/MensualArchievementItem.java | ||||
|  * @Description: 每月业绩对象。 | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.pojo; | ||||
|  | ||||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||||
|  | ||||
| public class MensualArchievementItem | ||||
| { | ||||
|     public MensualArchievementItem() | ||||
|     {} | ||||
|  | ||||
|     public MensualArchievementItem( int month, String premium) | ||||
|     { | ||||
|         this.month = month; | ||||
|         this.premium = premium; | ||||
|     } | ||||
|  | ||||
|     public int getMonth() | ||||
|     { | ||||
|         return month; | ||||
|     } | ||||
|  | ||||
|     public void setMonth( int month ) | ||||
|     { | ||||
|         this.month = month; | ||||
|     } | ||||
|  | ||||
|     public String getPremium() | ||||
|     { | ||||
|         return premium; | ||||
|     } | ||||
|  | ||||
|     public void setPremium( String premium ) | ||||
|     { | ||||
|         this.premium = premium; | ||||
|     } | ||||
|  | ||||
|  | ||||
|  | ||||
|     @Override | ||||
|     public int hashCode() | ||||
|     { | ||||
|         final int prime = 31; | ||||
|         int result = 1; | ||||
|         result = prime * result + month; | ||||
|         result = prime * result + ((premium == null) ? 0 : premium.hashCode()); | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public boolean equals( Object obj ) | ||||
|     { | ||||
|         if ( this == obj ) | ||||
|             return true; | ||||
|         if ( obj == null ) | ||||
|             return false; | ||||
|         if ( getClass() != obj.getClass() ) | ||||
|             return false; | ||||
|         MensualArchievementItem other = (MensualArchievementItem) obj; | ||||
|         if ( month != other.month ) | ||||
|             return false; | ||||
|         if ( premium == null ) | ||||
|         { | ||||
|             if ( other.premium != null ) | ||||
|                 return false; | ||||
|         } else if ( !premium.equals( other.premium ) ) | ||||
|             return false; | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() | ||||
|     { | ||||
|         return "MensualArchievementItem [month=" + month + ", premium=" + premium + "]"; | ||||
|     } | ||||
|  | ||||
|  | ||||
|  | ||||
|     // 月份 | ||||
|     @JsonProperty( "month" ) | ||||
|     private int month; | ||||
|  | ||||
|     // 月总保费 | ||||
|     @JsonProperty( "premium" ) | ||||
|     private String premium; | ||||
| } | ||||
| @@ -0,0 +1,149 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-07 15:18:46 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/RewardGainer.java | ||||
|  * @Description: 获奖人对象 | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.pojo; | ||||
|  | ||||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||||
|  | ||||
| public class RewardGainer | ||||
| { | ||||
|     public RewardGainer() | ||||
|     {} | ||||
|  | ||||
|     public RewardGainer( int recID, String callerName, String callerCode, int rewardProjectCode, | ||||
|             String rewardProjectName) | ||||
|     { | ||||
|         this.recID = recID; | ||||
|         this.callerName = callerName; | ||||
|         this.callerCode = callerCode; | ||||
|         this.rewardProjectCode = rewardProjectCode; | ||||
|         this.rewardProjectName = rewardProjectName; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() | ||||
|     { | ||||
|         return "RewardGainer [recID=" + recID + ", callerName=" + callerName + ", callerCode=" | ||||
|                 + callerCode + ", rewardProjectCode=" + rewardProjectCode + ", rewardProjectName=" | ||||
|                 + rewardProjectName + "]"; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int hashCode() | ||||
|     { | ||||
|         final int prime = 31; | ||||
|         int result = 1; | ||||
|         result = prime * result + recID; | ||||
|         result = prime * result + ((callerName == null) ? 0 : callerName.hashCode()); | ||||
|         result = prime * result + ((callerCode == null) ? 0 : callerCode.hashCode()); | ||||
|         result = prime * result + rewardProjectCode; | ||||
|         result = prime * result + ((rewardProjectName == null) ? 0 : rewardProjectName.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; | ||||
|         RewardGainer other = (RewardGainer) obj; | ||||
|         if ( recID != other.recID ) | ||||
|             return false; | ||||
|         if ( callerName == null ) | ||||
|         { | ||||
|             if ( other.callerName != null ) | ||||
|                 return false; | ||||
|         } else if ( !callerName.equals( other.callerName ) ) | ||||
|             return false; | ||||
|         if ( callerCode == null ) | ||||
|         { | ||||
|             if ( other.callerCode != null ) | ||||
|                 return false; | ||||
|         } else if ( !callerCode.equals( other.callerCode ) ) | ||||
|             return false; | ||||
|         if ( rewardProjectCode != other.rewardProjectCode ) | ||||
|             return false; | ||||
|         if ( rewardProjectName == null ) | ||||
|         { | ||||
|             if ( other.rewardProjectName != null ) | ||||
|                 return false; | ||||
|         } else if ( !rewardProjectName.equals( other.rewardProjectName ) ) | ||||
|             return false; | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     public int getRecID() | ||||
|     { | ||||
|         return recID; | ||||
|     } | ||||
|  | ||||
|     public void setRecID( int recID ) | ||||
|     { | ||||
|         this.recID = recID; | ||||
|     } | ||||
|  | ||||
|     public String getCallerName() | ||||
|     { | ||||
|         return callerName; | ||||
|     } | ||||
|  | ||||
|     public void setCallerName( String callerName ) | ||||
|     { | ||||
|         this.callerName = callerName; | ||||
|     } | ||||
|  | ||||
|     public String getCallerCode() | ||||
|     { | ||||
|         return callerCode; | ||||
|     } | ||||
|  | ||||
|     public void setCallerCode( String callerCode ) | ||||
|     { | ||||
|         this.callerCode = callerCode; | ||||
|     } | ||||
|  | ||||
|     public int getRewardProjectCode() | ||||
|     { | ||||
|         return rewardProjectCode; | ||||
|     } | ||||
|  | ||||
|     public void setRewardProjectCode( int rewardProjectCode ) | ||||
|     { | ||||
|         this.rewardProjectCode = rewardProjectCode; | ||||
|     } | ||||
|  | ||||
|     public String getRewardProjectName() | ||||
|     { | ||||
|         return rewardProjectName; | ||||
|     } | ||||
|  | ||||
|     public void setRewardProjectName( String rewardProjectName ) | ||||
|     { | ||||
|         this.rewardProjectName = rewardProjectName; | ||||
|     } | ||||
|  | ||||
|     @JsonProperty( "recID" ) | ||||
|     private int recID; | ||||
|  | ||||
|     @JsonProperty( "callerName" ) | ||||
|     private String callerName; | ||||
|  | ||||
|     @JsonProperty( "callerCode" ) | ||||
|     private String callerCode; | ||||
|  | ||||
|     @JsonProperty( "rewardProjectCode" ) | ||||
|     private int rewardProjectCode; | ||||
|  | ||||
|     @JsonProperty( "rewardProjectName" ) | ||||
|     private String rewardProjectName; | ||||
| } | ||||
| @@ -0,0 +1,90 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-09-06 11:00:35 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/RewardProject.java | ||||
|  * @Description: 奖励项目对象 | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.pojo; | ||||
|  | ||||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||||
|  | ||||
| /** | ||||
|  * 奖励项目对象 | ||||
|  */ | ||||
| public class RewardProject | ||||
| { | ||||
|     public RewardProject( int rewardCode, String rewardName) | ||||
|     { | ||||
|         this.rewardCode = rewardCode; | ||||
|         this.rewardName = rewardName; | ||||
|     } | ||||
|  | ||||
|     public int getRewardCode() | ||||
|     { | ||||
|         return rewardCode; | ||||
|     } | ||||
|  | ||||
|     public void setRewardCode( int rewardCode ) | ||||
|     { | ||||
|         this.rewardCode = rewardCode; | ||||
|     } | ||||
|  | ||||
|     public String getRewardName() | ||||
|     { | ||||
|         return rewardName; | ||||
|     } | ||||
|  | ||||
|     public void setRewardName( String rewardName ) | ||||
|     { | ||||
|         this.rewardName = rewardName; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() | ||||
|     { | ||||
|         return "RewardProject [rewardCode=" + rewardCode + ", rewardName=" + rewardName + "]"; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int hashCode() | ||||
|     { | ||||
|         final int prime = 31; | ||||
|         int result = 1; | ||||
|         result = prime * result + rewardCode; | ||||
|         result = prime * result + ((rewardName == null) ? 0 : rewardName.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; | ||||
|         RewardProject other = (RewardProject) obj; | ||||
|         if ( rewardCode != other.rewardCode ) | ||||
|             return false; | ||||
|         if ( rewardName == null ) | ||||
|         { | ||||
|             if ( other.rewardName != null ) | ||||
|                 return false; | ||||
|         } else if ( !rewardName.equals( other.rewardName ) ) | ||||
|             return false; | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|  | ||||
|     // 奖励项目代码 | ||||
|     @JsonProperty("rewardCode") | ||||
|     private int rewardCode; | ||||
|  | ||||
|     // 奖励项目名称 | ||||
|     @JsonProperty("rewardName") | ||||
|     private String rewardName; | ||||
| } | ||||
| @@ -0,0 +1,755 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-11-24 14:34:16 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/TwrTelsalerRecord.java | ||||
|  * @Description:  | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.pojo; | ||||
|  | ||||
| public class TWrTelsalerRecord | ||||
| { | ||||
|     private String 人员姓名; | ||||
|     private String 人员工号; | ||||
|     private String 籍贯; | ||||
|     private String 参加工作时间; | ||||
|     private String 入职日期; | ||||
|     private String 入司日期; | ||||
|     private String 业务类型; | ||||
|     private String 办公地省; | ||||
|     private String 办公地市; | ||||
|     private String 人员类别; | ||||
|     private String 现任岗位; | ||||
|     private String 现任职级; | ||||
|     private String 机构名称; | ||||
|     private String 职场分类; | ||||
|     private String 片区名称; | ||||
|     private String 团队名称; | ||||
|     private String 对口分公司; | ||||
|     private String 展业地区; | ||||
|     private String 招聘渠道; | ||||
|     private String 渠道明细; | ||||
|     private String 全日制最高学历; | ||||
|     private String 学历类型; | ||||
|     private String 用工性质名称; | ||||
|     private String 合同种类; | ||||
|     private String 合同类型; | ||||
|     private String 合同性质; | ||||
|     private int 合同签订次数; | ||||
|     private String 合同生效日期; | ||||
|     private String 合同到期日期; | ||||
|     private String 人员属性; | ||||
|     private String 保代员工号; | ||||
|     private String 职场属性; | ||||
|     private String 办公性质; | ||||
|     private String 保代人员属性; | ||||
|     private String 人员状态; | ||||
|  | ||||
|     public TWrTelsalerRecord( String 人员姓名, String 人员工号, String 籍贯, String 参加工作时间, String 入职日期, | ||||
|             String 入司日期, String 业务类型, String 办公地省, String 办公地市, String 人员类别, String 现任岗位, | ||||
|             String 现任职级, String 机构名称, String 职场分类, String 片区名称, String 团队名称, String 对口分公司, | ||||
|             String 展业地区, String 招聘渠道, String 渠道明细, String 全日制最高学历, String 学历类型, String 用工性质名称, | ||||
|             String 合同种类, String 合同类型, String 合同性质, int 合同签订次数, String 合同生效日期, String 合同到期日期, | ||||
|             String 人员属性, String 保代员工号, String 职场属性, String 办公性质, String 保代人员属性, String 人员状态 ) | ||||
|     { | ||||
|         this.人员姓名 = 人员姓名; | ||||
|         this.人员工号 = 人员工号; | ||||
|         this.籍贯 = 籍贯; | ||||
|         this.参加工作时间 = 参加工作时间; | ||||
|         this.入职日期 = 入职日期; | ||||
|         this.入司日期 = 入司日期; | ||||
|         this.业务类型 = 业务类型; | ||||
|         this.办公地省 = 办公地省; | ||||
|         this.办公地市 = 办公地市; | ||||
|         this.人员类别 = 人员类别; | ||||
|         this.现任岗位 = 现任岗位; | ||||
|         this.现任职级 = 现任职级; | ||||
|         this.机构名称 = 机构名称; | ||||
|         this.职场分类 = 职场分类; | ||||
|         this.片区名称 = 片区名称; | ||||
|         this.团队名称 = 团队名称; | ||||
|         this.对口分公司 = 对口分公司; | ||||
|         this.展业地区 = 展业地区; | ||||
|         this.招聘渠道 = 招聘渠道; | ||||
|         this.渠道明细 = 渠道明细; | ||||
|         this.全日制最高学历 = 全日制最高学历; | ||||
|         this.学历类型 = 学历类型; | ||||
|         this.用工性质名称 = 用工性质名称; | ||||
|         this.合同种类 = 合同种类; | ||||
|         this.合同类型 = 合同类型; | ||||
|         this.合同性质 = 合同性质; | ||||
|         this.合同签订次数 = 合同签订次数; | ||||
|         this.合同生效日期 = 合同生效日期; | ||||
|         this.合同到期日期 = 合同到期日期; | ||||
|         this.人员属性 = 人员属性; | ||||
|         this.保代员工号 = 保代员工号; | ||||
|         this.职场属性 = 职场属性; | ||||
|         this.办公性质 = 办公性质; | ||||
|         this.保代人员属性 = 保代人员属性; | ||||
|         this.人员状态 = 人员状态; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() | ||||
|     { | ||||
|         return "TWrTelsalerRecord [人员姓名=" + 人员姓名 + ", 人员工号=" + 人员工号 + ", 籍贯=" + 籍贯 + ", 参加工作时间=" | ||||
|                 + 参加工作时间 + ", 入职日期=" + 入职日期 + ", 入司日期=" + 入司日期 + ", 业务类型=" + 业务类型 + ", 办公地省=" + 办公地省 | ||||
|                 + ", 办公地市=" + 办公地市 + ", 人员类别=" + 人员类别 + ", 现任岗位=" + 现任岗位 + ", 现任职级=" + 现任职级 | ||||
|                 + ", 机构名称=" + 机构名称 + ", 职场分类=" + 职场分类 + ", 片区名称=" + 片区名称 + ", 团队名称=" + 团队名称 | ||||
|                 + ", 对口分公司=" + 对口分公司 + ", 展业地区=" + 展业地区 + ", 招聘渠道=" + 招聘渠道 + ", 渠道明细=" + 渠道明细 | ||||
|                 + ", 全日制最高学历=" + 全日制最高学历 + ", 学历类型=" + 学历类型 + ", 用工性质名称=" + 用工性质名称 + ", 合同种类=" | ||||
|                 + 合同种类 + ", 合同类型=" + 合同类型 + ", 合同性质=" + 合同性质 + ", 合同签订次数=" + 合同签订次数 + ", 合同生效日期=" | ||||
|                 + 合同生效日期 + ", 合同到期日期=" + 合同到期日期 + ", 人员属性=" + 人员属性 + ", 保代员工号=" + 保代员工号 + ", 职场属性=" | ||||
|                 + 职场属性 + ", 办公性质=" + 办公性质 + ", 保代人员属性=" + 保代人员属性 + ", 人员状态=" + 人员状态 + "]"; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int hashCode() | ||||
|     { | ||||
|         final int prime = 31; | ||||
|         int result = 1; | ||||
|         result = prime * result + ((人员姓名 == null) ? 0 : 人员姓名.hashCode()); | ||||
|         result = prime * result + ((人员工号 == null) ? 0 : 人员工号.hashCode()); | ||||
|         result = prime * result + ((籍贯 == null) ? 0 : 籍贯.hashCode()); | ||||
|         result = prime * result + ((参加工作时间 == null) ? 0 : 参加工作时间.hashCode()); | ||||
|         result = prime * result + ((入职日期 == null) ? 0 : 入职日期.hashCode()); | ||||
|         result = prime * result + ((入司日期 == null) ? 0 : 入司日期.hashCode()); | ||||
|         result = prime * result + ((业务类型 == null) ? 0 : 业务类型.hashCode()); | ||||
|         result = prime * result + ((办公地省 == null) ? 0 : 办公地省.hashCode()); | ||||
|         result = prime * result + ((办公地市 == null) ? 0 : 办公地市.hashCode()); | ||||
|         result = prime * result + ((人员类别 == null) ? 0 : 人员类别.hashCode()); | ||||
|         result = prime * result + ((现任岗位 == null) ? 0 : 现任岗位.hashCode()); | ||||
|         result = prime * result + ((现任职级 == null) ? 0 : 现任职级.hashCode()); | ||||
|         result = prime * result + ((机构名称 == null) ? 0 : 机构名称.hashCode()); | ||||
|         result = prime * result + ((职场分类 == null) ? 0 : 职场分类.hashCode()); | ||||
|         result = prime * result + ((片区名称 == null) ? 0 : 片区名称.hashCode()); | ||||
|         result = prime * result + ((团队名称 == null) ? 0 : 团队名称.hashCode()); | ||||
|         result = prime * result + ((对口分公司 == null) ? 0 : 对口分公司.hashCode()); | ||||
|         result = prime * result + ((展业地区 == null) ? 0 : 展业地区.hashCode()); | ||||
|         result = prime * result + ((招聘渠道 == null) ? 0 : 招聘渠道.hashCode()); | ||||
|         result = prime * result + ((渠道明细 == null) ? 0 : 渠道明细.hashCode()); | ||||
|         result = prime * result + ((全日制最高学历 == null) ? 0 : 全日制最高学历.hashCode()); | ||||
|         result = prime * result + ((学历类型 == null) ? 0 : 学历类型.hashCode()); | ||||
|         result = prime * result + ((用工性质名称 == null) ? 0 : 用工性质名称.hashCode()); | ||||
|         result = prime * result + ((合同种类 == null) ? 0 : 合同种类.hashCode()); | ||||
|         result = prime * result + ((合同类型 == null) ? 0 : 合同类型.hashCode()); | ||||
|         result = prime * result + ((合同性质 == null) ? 0 : 合同性质.hashCode()); | ||||
|         result = prime * result + 合同签订次数; | ||||
|         result = prime * result + ((合同生效日期 == null) ? 0 : 合同生效日期.hashCode()); | ||||
|         result = prime * result + ((合同到期日期 == null) ? 0 : 合同到期日期.hashCode()); | ||||
|         result = prime * result + ((人员属性 == null) ? 0 : 人员属性.hashCode()); | ||||
|         result = prime * result + ((保代员工号 == null) ? 0 : 保代员工号.hashCode()); | ||||
|         result = prime * result + ((职场属性 == null) ? 0 : 职场属性.hashCode()); | ||||
|         result = prime * result + ((办公性质 == null) ? 0 : 办公性质.hashCode()); | ||||
|         result = prime * result + ((保代人员属性 == null) ? 0 : 保代人员属性.hashCode()); | ||||
|         result = prime * result + ((人员状态 == null) ? 0 : 人员状态.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; | ||||
|         TWrTelsalerRecord other = (TWrTelsalerRecord) obj; | ||||
|         if ( 人员姓名 == null ) | ||||
|         { | ||||
|             if ( other.人员姓名 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !人员姓名.equals( other.人员姓名 ) ) | ||||
|             return false; | ||||
|         if ( 人员工号 == null ) | ||||
|         { | ||||
|             if ( other.人员工号 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !人员工号.equals( other.人员工号 ) ) | ||||
|             return false; | ||||
|         if ( 籍贯 == null ) | ||||
|         { | ||||
|             if ( other.籍贯 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !籍贯.equals( other.籍贯 ) ) | ||||
|             return false; | ||||
|         if ( 参加工作时间 == null ) | ||||
|         { | ||||
|             if ( other.参加工作时间 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !参加工作时间.equals( other.参加工作时间 ) ) | ||||
|             return false; | ||||
|         if ( 入职日期 == null ) | ||||
|         { | ||||
|             if ( other.入职日期 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !入职日期.equals( other.入职日期 ) ) | ||||
|             return false; | ||||
|         if ( 入司日期 == null ) | ||||
|         { | ||||
|             if ( other.入司日期 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !入司日期.equals( other.入司日期 ) ) | ||||
|             return false; | ||||
|         if ( 业务类型 == null ) | ||||
|         { | ||||
|             if ( other.业务类型 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !业务类型.equals( other.业务类型 ) ) | ||||
|             return false; | ||||
|         if ( 办公地省 == null ) | ||||
|         { | ||||
|             if ( other.办公地省 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !办公地省.equals( other.办公地省 ) ) | ||||
|             return false; | ||||
|         if ( 办公地市 == null ) | ||||
|         { | ||||
|             if ( other.办公地市 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !办公地市.equals( other.办公地市 ) ) | ||||
|             return false; | ||||
|         if ( 人员类别 == null ) | ||||
|         { | ||||
|             if ( other.人员类别 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !人员类别.equals( other.人员类别 ) ) | ||||
|             return false; | ||||
|         if ( 现任岗位 == null ) | ||||
|         { | ||||
|             if ( other.现任岗位 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !现任岗位.equals( other.现任岗位 ) ) | ||||
|             return false; | ||||
|         if ( 现任职级 == null ) | ||||
|         { | ||||
|             if ( other.现任职级 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !现任职级.equals( other.现任职级 ) ) | ||||
|             return false; | ||||
|         if ( 机构名称 == null ) | ||||
|         { | ||||
|             if ( other.机构名称 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !机构名称.equals( other.机构名称 ) ) | ||||
|             return false; | ||||
|         if ( 职场分类 == null ) | ||||
|         { | ||||
|             if ( other.职场分类 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !职场分类.equals( other.职场分类 ) ) | ||||
|             return false; | ||||
|         if ( 片区名称 == null ) | ||||
|         { | ||||
|             if ( other.片区名称 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !片区名称.equals( other.片区名称 ) ) | ||||
|             return false; | ||||
|         if ( 团队名称 == null ) | ||||
|         { | ||||
|             if ( other.团队名称 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !团队名称.equals( other.团队名称 ) ) | ||||
|             return false; | ||||
|         if ( 对口分公司 == null ) | ||||
|         { | ||||
|             if ( other.对口分公司 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !对口分公司.equals( other.对口分公司 ) ) | ||||
|             return false; | ||||
|         if ( 展业地区 == null ) | ||||
|         { | ||||
|             if ( other.展业地区 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !展业地区.equals( other.展业地区 ) ) | ||||
|             return false; | ||||
|         if ( 招聘渠道 == null ) | ||||
|         { | ||||
|             if ( other.招聘渠道 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !招聘渠道.equals( other.招聘渠道 ) ) | ||||
|             return false; | ||||
|         if ( 渠道明细 == null ) | ||||
|         { | ||||
|             if ( other.渠道明细 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !渠道明细.equals( other.渠道明细 ) ) | ||||
|             return false; | ||||
|         if ( 全日制最高学历 == null ) | ||||
|         { | ||||
|             if ( other.全日制最高学历 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !全日制最高学历.equals( other.全日制最高学历 ) ) | ||||
|             return false; | ||||
|         if ( 学历类型 == null ) | ||||
|         { | ||||
|             if ( other.学历类型 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !学历类型.equals( other.学历类型 ) ) | ||||
|             return false; | ||||
|         if ( 用工性质名称 == null ) | ||||
|         { | ||||
|             if ( other.用工性质名称 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !用工性质名称.equals( other.用工性质名称 ) ) | ||||
|             return false; | ||||
|         if ( 合同种类 == null ) | ||||
|         { | ||||
|             if ( other.合同种类 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !合同种类.equals( other.合同种类 ) ) | ||||
|             return false; | ||||
|         if ( 合同类型 == null ) | ||||
|         { | ||||
|             if ( other.合同类型 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !合同类型.equals( other.合同类型 ) ) | ||||
|             return false; | ||||
|         if ( 合同性质 == null ) | ||||
|         { | ||||
|             if ( other.合同性质 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !合同性质.equals( other.合同性质 ) ) | ||||
|             return false; | ||||
|         if ( 合同签订次数 != other.合同签订次数 ) | ||||
|             return false; | ||||
|         if ( 合同生效日期 == null ) | ||||
|         { | ||||
|             if ( other.合同生效日期 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !合同生效日期.equals( other.合同生效日期 ) ) | ||||
|             return false; | ||||
|         if ( 合同到期日期 == null ) | ||||
|         { | ||||
|             if ( other.合同到期日期 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !合同到期日期.equals( other.合同到期日期 ) ) | ||||
|             return false; | ||||
|         if ( 人员属性 == null ) | ||||
|         { | ||||
|             if ( other.人员属性 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !人员属性.equals( other.人员属性 ) ) | ||||
|             return false; | ||||
|         if ( 保代员工号 == null ) | ||||
|         { | ||||
|             if ( other.保代员工号 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !保代员工号.equals( other.保代员工号 ) ) | ||||
|             return false; | ||||
|         if ( 职场属性 == null ) | ||||
|         { | ||||
|             if ( other.职场属性 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !职场属性.equals( other.职场属性 ) ) | ||||
|             return false; | ||||
|         if ( 办公性质 == null ) | ||||
|         { | ||||
|             if ( other.办公性质 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !办公性质.equals( other.办公性质 ) ) | ||||
|             return false; | ||||
|         if ( 保代人员属性 == null ) | ||||
|         { | ||||
|             if ( other.保代人员属性 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !保代人员属性.equals( other.保代人员属性 ) ) | ||||
|             return false; | ||||
|         if ( 人员状态 == null ) | ||||
|         { | ||||
|             if ( other.人员状态 != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !人员状态.equals( other.人员状态 ) ) | ||||
|             return false; | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     public String get人员姓名() | ||||
|     { | ||||
|         return 人员姓名; | ||||
|     } | ||||
|  | ||||
|     public void set人员姓名( String 人员姓名 ) | ||||
|     { | ||||
|         this.人员姓名 = 人员姓名; | ||||
|     } | ||||
|  | ||||
|     public String get人员工号() | ||||
|     { | ||||
|         return 人员工号; | ||||
|     } | ||||
|  | ||||
|     public void set人员工号( String 人员工号 ) | ||||
|     { | ||||
|         this.人员工号 = 人员工号; | ||||
|     } | ||||
|  | ||||
|     public String get籍贯() | ||||
|     { | ||||
|         return 籍贯; | ||||
|     } | ||||
|  | ||||
|     public void set籍贯( String 籍贯 ) | ||||
|     { | ||||
|         this.籍贯 = 籍贯; | ||||
|     } | ||||
|  | ||||
|     public String get参加工作时间() | ||||
|     { | ||||
|         return 参加工作时间; | ||||
|     } | ||||
|  | ||||
|     public void set参加工作时间( String 参加工作时间 ) | ||||
|     { | ||||
|         this.参加工作时间 = 参加工作时间; | ||||
|     } | ||||
|  | ||||
|     public String get入职日期() | ||||
|     { | ||||
|         return 入职日期; | ||||
|     } | ||||
|  | ||||
|     public void set入职日期( String 入职日期 ) | ||||
|     { | ||||
|         this.入职日期 = 入职日期; | ||||
|     } | ||||
|  | ||||
|     public String get入司日期() | ||||
|     { | ||||
|         return 入司日期; | ||||
|     } | ||||
|  | ||||
|     public void set入司日期( String 入司日期 ) | ||||
|     { | ||||
|         this.入司日期 = 入司日期; | ||||
|     } | ||||
|  | ||||
|     public String get业务类型() | ||||
|     { | ||||
|         return 业务类型; | ||||
|     } | ||||
|  | ||||
|     public void set业务类型( String 业务类型 ) | ||||
|     { | ||||
|         this.业务类型 = 业务类型; | ||||
|     } | ||||
|  | ||||
|     public String get办公地省() | ||||
|     { | ||||
|         return 办公地省; | ||||
|     } | ||||
|  | ||||
|     public void set办公地省( String 办公地省 ) | ||||
|     { | ||||
|         this.办公地省 = 办公地省; | ||||
|     } | ||||
|  | ||||
|     public String get办公地市() | ||||
|     { | ||||
|         return 办公地市; | ||||
|     } | ||||
|  | ||||
|     public void set办公地市( String 办公地市 ) | ||||
|     { | ||||
|         this.办公地市 = 办公地市; | ||||
|     } | ||||
|  | ||||
|     public String get人员类别() | ||||
|     { | ||||
|         return 人员类别; | ||||
|     } | ||||
|  | ||||
|     public void set人员类别( String 人员类别 ) | ||||
|     { | ||||
|         this.人员类别 = 人员类别; | ||||
|     } | ||||
|  | ||||
|     public String get现任岗位() | ||||
|     { | ||||
|         return 现任岗位; | ||||
|     } | ||||
|  | ||||
|     public void set现任岗位( String 现任岗位 ) | ||||
|     { | ||||
|         this.现任岗位 = 现任岗位; | ||||
|     } | ||||
|  | ||||
|     public String get现任职级() | ||||
|     { | ||||
|         return 现任职级; | ||||
|     } | ||||
|  | ||||
|     public void set现任职级( String 现任职级 ) | ||||
|     { | ||||
|         this.现任职级 = 现任职级; | ||||
|     } | ||||
|  | ||||
|     public String get机构名称() | ||||
|     { | ||||
|         return 机构名称; | ||||
|     } | ||||
|  | ||||
|     public void set机构名称( String 机构名称 ) | ||||
|     { | ||||
|         this.机构名称 = 机构名称; | ||||
|     } | ||||
|  | ||||
|     public String get职场分类() | ||||
|     { | ||||
|         return 职场分类; | ||||
|     } | ||||
|  | ||||
|     public void set职场分类( String 职场分类 ) | ||||
|     { | ||||
|         this.职场分类 = 职场分类; | ||||
|     } | ||||
|  | ||||
|     public String get片区名称() | ||||
|     { | ||||
|         return 片区名称; | ||||
|     } | ||||
|  | ||||
|     public void set片区名称( String 片区名称 ) | ||||
|     { | ||||
|         this.片区名称 = 片区名称; | ||||
|     } | ||||
|  | ||||
|     public String get团队名称() | ||||
|     { | ||||
|         return 团队名称; | ||||
|     } | ||||
|  | ||||
|     public void set团队名称( String 团队名称 ) | ||||
|     { | ||||
|         this.团队名称 = 团队名称; | ||||
|     } | ||||
|  | ||||
|     public String get对口分公司() | ||||
|     { | ||||
|         return 对口分公司; | ||||
|     } | ||||
|  | ||||
|     public void set对口分公司( String 对口分公司 ) | ||||
|     { | ||||
|         this.对口分公司 = 对口分公司; | ||||
|     } | ||||
|  | ||||
|     public String get展业地区() | ||||
|     { | ||||
|         return 展业地区; | ||||
|     } | ||||
|  | ||||
|     public void set展业地区( String 展业地区 ) | ||||
|     { | ||||
|         this.展业地区 = 展业地区; | ||||
|     } | ||||
|  | ||||
|     public String get招聘渠道() | ||||
|     { | ||||
|         return 招聘渠道; | ||||
|     } | ||||
|  | ||||
|     public void set招聘渠道( String 招聘渠道 ) | ||||
|     { | ||||
|         this.招聘渠道 = 招聘渠道; | ||||
|     } | ||||
|  | ||||
|     public String get渠道明细() | ||||
|     { | ||||
|         return 渠道明细; | ||||
|     } | ||||
|  | ||||
|     public void set渠道明细( String 渠道明细 ) | ||||
|     { | ||||
|         this.渠道明细 = 渠道明细; | ||||
|     } | ||||
|  | ||||
|     public String get全日制最高学历() | ||||
|     { | ||||
|         return 全日制最高学历; | ||||
|     } | ||||
|  | ||||
|     public void set全日制最高学历( String 全日制最高学历 ) | ||||
|     { | ||||
|         this.全日制最高学历 = 全日制最高学历; | ||||
|     } | ||||
|  | ||||
|     public String get学历类型() | ||||
|     { | ||||
|         return 学历类型; | ||||
|     } | ||||
|  | ||||
|     public void set学历类型( String 学历类型 ) | ||||
|     { | ||||
|         this.学历类型 = 学历类型; | ||||
|     } | ||||
|  | ||||
|     public String get用工性质名称() | ||||
|     { | ||||
|         return 用工性质名称; | ||||
|     } | ||||
|  | ||||
|     public void set用工性质名称( String 用工性质名称 ) | ||||
|     { | ||||
|         this.用工性质名称 = 用工性质名称; | ||||
|     } | ||||
|  | ||||
|     public String get合同种类() | ||||
|     { | ||||
|         return 合同种类; | ||||
|     } | ||||
|  | ||||
|     public void set合同种类( String 合同种类 ) | ||||
|     { | ||||
|         this.合同种类 = 合同种类; | ||||
|     } | ||||
|  | ||||
|     public String get合同类型() | ||||
|     { | ||||
|         return 合同类型; | ||||
|     } | ||||
|  | ||||
|     public void set合同类型( String 合同类型 ) | ||||
|     { | ||||
|         this.合同类型 = 合同类型; | ||||
|     } | ||||
|  | ||||
|     public String get合同性质() | ||||
|     { | ||||
|         return 合同性质; | ||||
|     } | ||||
|  | ||||
|     public void set合同性质( String 合同性质 ) | ||||
|     { | ||||
|         this.合同性质 = 合同性质; | ||||
|     } | ||||
|  | ||||
|     public int get合同签订次数() | ||||
|     { | ||||
|         return 合同签订次数; | ||||
|     } | ||||
|  | ||||
|     public void set合同签订次数( int 合同签订次数 ) | ||||
|     { | ||||
|         this.合同签订次数 = 合同签订次数; | ||||
|     } | ||||
|  | ||||
|     public String get合同生效日期() | ||||
|     { | ||||
|         return 合同生效日期; | ||||
|     } | ||||
|  | ||||
|     public void set合同生效日期( String 合同生效日期 ) | ||||
|     { | ||||
|         this.合同生效日期 = 合同生效日期; | ||||
|     } | ||||
|  | ||||
|     public String get合同到期日期() | ||||
|     { | ||||
|         return 合同到期日期; | ||||
|     } | ||||
|  | ||||
|     public void set合同到期日期( String 合同到期日期 ) | ||||
|     { | ||||
|         this.合同到期日期 = 合同到期日期; | ||||
|     } | ||||
|  | ||||
|     public String get人员属性() | ||||
|     { | ||||
|         return 人员属性; | ||||
|     } | ||||
|  | ||||
|     public void set人员属性( String 人员属性 ) | ||||
|     { | ||||
|         this.人员属性 = 人员属性; | ||||
|     } | ||||
|  | ||||
|     public String get保代员工号() | ||||
|     { | ||||
|         return 保代员工号; | ||||
|     } | ||||
|  | ||||
|     public void set保代员工号( String 保代员工号 ) | ||||
|     { | ||||
|         this.保代员工号 = 保代员工号; | ||||
|     } | ||||
|  | ||||
|     public String get职场属性() | ||||
|     { | ||||
|         return 职场属性; | ||||
|     } | ||||
|  | ||||
|     public void set职场属性( String 职场属性 ) | ||||
|     { | ||||
|         this.职场属性 = 职场属性; | ||||
|     } | ||||
|  | ||||
|     public String get办公性质() | ||||
|     { | ||||
|         return 办公性质; | ||||
|     } | ||||
|  | ||||
|     public void set办公性质( String 办公性质 ) | ||||
|     { | ||||
|         this.办公性质 = 办公性质; | ||||
|     } | ||||
|  | ||||
|     public String get保代人员属性() | ||||
|     { | ||||
|         return 保代人员属性; | ||||
|     } | ||||
|  | ||||
|     public void set保代人员属性( String 保代人员属性 ) | ||||
|     { | ||||
|         this.保代人员属性 = 保代人员属性; | ||||
|     } | ||||
|  | ||||
|     public String get人员状态() | ||||
|     { | ||||
|         return 人员状态; | ||||
|     } | ||||
|  | ||||
|     public void set人员状态( String 人员状态 ) | ||||
|     { | ||||
|         this.人员状态 = 人员状态; | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -0,0 +1,341 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-10-07 23:29:22 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/TelsalerFromJYGL.java | ||||
|  * @Description: 经营管理系统中导出的电销坐席数据记录。 | ||||
|  *  | ||||
|  * Copyright (c) ${2023} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.pojo; | ||||
|  | ||||
| import java.time.LocalDate; | ||||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||||
|  | ||||
| /** | ||||
|  * 经营管理系统中导出的电销坐席数据记录。 | ||||
|  * @author Kane | ||||
|  */ | ||||
| public class TelsalerFromJYGL | ||||
| { | ||||
|     // 名称 | ||||
|     @JsonProperty("telsalerName") | ||||
|     private String telsalerName; | ||||
|  | ||||
|     // 坐席工号 | ||||
|     @JsonProperty("telsalerCode") | ||||
|     private String telsalerCode; | ||||
|  | ||||
|     // 籍贯 | ||||
|     @JsonProperty("nativePlace") | ||||
|     private String nativePlace; | ||||
|  | ||||
|     // 参加工作时间 | ||||
|     @JsonProperty("startWorkingDate") | ||||
|     private LocalDate startWorkingDate; | ||||
|  | ||||
|     // 入司时间 | ||||
|     @JsonProperty("employmentDate") | ||||
|     private LocalDate employmentDate; | ||||
|  | ||||
|     // 业务类型 | ||||
|     @JsonProperty("business") | ||||
|     private String business; | ||||
|  | ||||
|     // 办公地省 | ||||
|     @JsonProperty("province") | ||||
|     private String province; | ||||
|  | ||||
|     // 办公地市 | ||||
|     @JsonProperty("city") | ||||
|     private String city; | ||||
|  | ||||
|     // 人员类别 | ||||
|     @JsonProperty("employmentType") | ||||
|     private String employmentType; | ||||
|  | ||||
|     // 现任岗位 | ||||
|     @JsonProperty("quarters") | ||||
|     private String quarters; | ||||
|  | ||||
|     // 现任职级 | ||||
|     @JsonProperty("rank") | ||||
|     private String rank; | ||||
|  | ||||
|     // 机构名称 | ||||
|     @JsonProperty("branchName") | ||||
|     private String branchName; | ||||
|  | ||||
|     // 职场分类 | ||||
|     @JsonProperty("workPlaceType") | ||||
|     private String workPlaceType; | ||||
|  | ||||
|     public TelsalerFromJYGL() {} | ||||
|  | ||||
|     @Override | ||||
|     public String toString() | ||||
|     { | ||||
|         return "TelsalerFromJYGL [telsalerName=" + telsalerName + ", telsalerCode=" + telsalerCode | ||||
|                 + ", nativePlace=" + nativePlace + ", startWorkingDate=" + startWorkingDate | ||||
|                 + ", employmentDate=" + employmentDate + ", business=" + business + ", province=" | ||||
|                 + province + ", city=" + city + ", employmentType=" + employmentType + ", quarters=" | ||||
|                 + quarters + ", rank=" + rank + ", branchName=" + branchName + ", workPlaceType=" | ||||
|                 + workPlaceType + "]"; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int hashCode() | ||||
|     { | ||||
|         final int prime = 31; | ||||
|         int result = 1; | ||||
|         result = prime * result + ((telsalerName == null) ? 0 : telsalerName.hashCode()); | ||||
|         result = prime * result + ((telsalerCode == null) ? 0 : telsalerCode.hashCode()); | ||||
|         result = prime * result + ((nativePlace == null) ? 0 : nativePlace.hashCode()); | ||||
|         result = prime * result + ((startWorkingDate == null) ? 0 : startWorkingDate.hashCode()); | ||||
|         result = prime * result + ((employmentDate == null) ? 0 : employmentDate.hashCode()); | ||||
|         result = prime * result + ((business == null) ? 0 : business.hashCode()); | ||||
|         result = prime * result + ((province == null) ? 0 : province.hashCode()); | ||||
|         result = prime * result + ((city == null) ? 0 : city.hashCode()); | ||||
|         result = prime * result + ((employmentType == null) ? 0 : employmentType.hashCode()); | ||||
|         result = prime * result + ((quarters == null) ? 0 : quarters.hashCode()); | ||||
|         result = prime * result + ((rank == null) ? 0 : rank.hashCode()); | ||||
|         result = prime * result + ((branchName == null) ? 0 : branchName.hashCode()); | ||||
|         result = prime * result + ((workPlaceType == null) ? 0 : workPlaceType.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; | ||||
|         TelsalerFromJYGL other = (TelsalerFromJYGL) obj; | ||||
|         if ( telsalerName == null ) | ||||
|         { | ||||
|             if ( other.telsalerName != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !telsalerName.equals( other.telsalerName ) ) | ||||
|             return false; | ||||
|         if ( telsalerCode == null ) | ||||
|         { | ||||
|             if ( other.telsalerCode != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !telsalerCode.equals( other.telsalerCode ) ) | ||||
|             return false; | ||||
|         if ( nativePlace == null ) | ||||
|         { | ||||
|             if ( other.nativePlace != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !nativePlace.equals( other.nativePlace ) ) | ||||
|             return false; | ||||
|         if ( startWorkingDate == null ) | ||||
|         { | ||||
|             if ( other.startWorkingDate != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !startWorkingDate.equals( other.startWorkingDate ) ) | ||||
|             return false; | ||||
|         if ( employmentDate == null ) | ||||
|         { | ||||
|             if ( other.employmentDate != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !employmentDate.equals( other.employmentDate ) ) | ||||
|             return false; | ||||
|         if ( business == null ) | ||||
|         { | ||||
|             if ( other.business != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !business.equals( other.business ) ) | ||||
|             return false; | ||||
|         if ( province == null ) | ||||
|         { | ||||
|             if ( other.province != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !province.equals( other.province ) ) | ||||
|             return false; | ||||
|         if ( city == null ) | ||||
|         { | ||||
|             if ( other.city != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !city.equals( other.city ) ) | ||||
|             return false; | ||||
|         if ( employmentType == null ) | ||||
|         { | ||||
|             if ( other.employmentType != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !employmentType.equals( other.employmentType ) ) | ||||
|             return false; | ||||
|         if ( quarters == null ) | ||||
|         { | ||||
|             if ( other.quarters != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !quarters.equals( other.quarters ) ) | ||||
|             return false; | ||||
|         if ( rank == null ) | ||||
|         { | ||||
|             if ( other.rank != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !rank.equals( other.rank ) ) | ||||
|             return false; | ||||
|         if ( branchName == null ) | ||||
|         { | ||||
|             if ( other.branchName != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !branchName.equals( other.branchName ) ) | ||||
|             return false; | ||||
|         if ( workPlaceType == null ) | ||||
|         { | ||||
|             if ( other.workPlaceType != null ) | ||||
|                 return false; | ||||
|         } | ||||
|         else if ( !workPlaceType.equals( other.workPlaceType ) ) | ||||
|             return false; | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     public String getTelsalerName() | ||||
|     { | ||||
|         return telsalerName; | ||||
|     } | ||||
|  | ||||
|     public void setTelsalerName( String telsalerName ) | ||||
|     { | ||||
|         this.telsalerName = telsalerName; | ||||
|     } | ||||
|  | ||||
|     public String getTelsalerCode() | ||||
|     { | ||||
|         return telsalerCode; | ||||
|     } | ||||
|  | ||||
|     public void setTelsalerCode( String telsalerCode ) | ||||
|     { | ||||
|         this.telsalerCode = telsalerCode; | ||||
|     } | ||||
|  | ||||
|     public String getNativePlace() | ||||
|     { | ||||
|         return nativePlace; | ||||
|     } | ||||
|  | ||||
|     public void setNativePlace( String nativePlace ) | ||||
|     { | ||||
|         this.nativePlace = nativePlace; | ||||
|     } | ||||
|  | ||||
|     public LocalDate getStartWorkingDate() | ||||
|     { | ||||
|         return startWorkingDate; | ||||
|     } | ||||
|  | ||||
|     public void setStartWorkingDate( LocalDate startWorkingDate ) | ||||
|     { | ||||
|         this.startWorkingDate = startWorkingDate; | ||||
|     } | ||||
|  | ||||
|     public LocalDate getEmploymentDate() | ||||
|     { | ||||
|         return employmentDate; | ||||
|     } | ||||
|  | ||||
|     public void setEmploymentDate( LocalDate employmentDate ) | ||||
|     { | ||||
|         this.employmentDate = employmentDate; | ||||
|     } | ||||
|  | ||||
|     public String getBusiness() | ||||
|     { | ||||
|         return business; | ||||
|     } | ||||
|  | ||||
|     public void setBusiness( String business ) | ||||
|     { | ||||
|         this.business = business; | ||||
|     } | ||||
|  | ||||
|     public String getProvince() | ||||
|     { | ||||
|         return province; | ||||
|     } | ||||
|  | ||||
|  | ||||
|     public void setProvince( String province ) | ||||
|     { | ||||
|         this.province = province; | ||||
|     } | ||||
|  | ||||
|     public String getCity() | ||||
|     { | ||||
|         return city; | ||||
|     } | ||||
|  | ||||
|     public void setCity( String city ) | ||||
|     { | ||||
|         this.city = city; | ||||
|     } | ||||
|  | ||||
|     public String getEmploymentType() | ||||
|     { | ||||
|         return employmentType; | ||||
|     } | ||||
|  | ||||
|     public void setEmploymentType( String employmentType ) | ||||
|     { | ||||
|         this.employmentType = employmentType; | ||||
|     } | ||||
|  | ||||
|     public String getQuarters() | ||||
|     { | ||||
|         return quarters; | ||||
|     } | ||||
|  | ||||
|     public void setQuarters( String quarters ) | ||||
|     { | ||||
|         this.quarters = quarters; | ||||
|     } | ||||
|  | ||||
|     public String getRank() | ||||
|     { | ||||
|         return rank; | ||||
|     } | ||||
|  | ||||
|     public void setRank( String rank ) | ||||
|     { | ||||
|         this.rank = rank; | ||||
|     } | ||||
|  | ||||
|     public String getBranchName() | ||||
|     { | ||||
|         return branchName; | ||||
|     } | ||||
|  | ||||
|     public void setBranchName( String branchName ) | ||||
|     { | ||||
|         this.branchName = branchName; | ||||
|     } | ||||
|  | ||||
|     public String getWorkPlaceType() | ||||
|     { | ||||
|         return workPlaceType; | ||||
|     } | ||||
|  | ||||
|     public void setWorkPlaceType( String workPlaceType ) | ||||
|     { | ||||
|         this.workPlaceType = workPlaceType; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,134 @@ | ||||
| /* | ||||
|  * @Author: Kane | ||||
|  * @Date: 2023-07-27 17:22:55 | ||||
|  * @LastEditors: Kane | ||||
|  * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/utils/MybatisUtils.java | ||||
|  * @Description: mybatis的工具集合 | ||||
|  *  | ||||
|  * Copyright (c) ${2022} by Kane, All Rights Reserved.  | ||||
|  */ | ||||
| package com.cpic.xim.mybatis.utils; | ||||
|  | ||||
| import java.io.IOException; | ||||
| import java.io.InputStream; | ||||
| import java.util.HashMap; | ||||
| import org.apache.ibatis.io.Resources; | ||||
| import org.apache.ibatis.session.ExecutorType; | ||||
| import org.apache.ibatis.session.SqlSession; | ||||
| import org.apache.ibatis.session.SqlSessionFactory; | ||||
| import org.apache.ibatis.session.SqlSessionFactoryBuilder; | ||||
|  | ||||
| public class MybatisUtils | ||||
| { | ||||
|     private static HashMap<String, SqlSession> SessionMap = new HashMap<>( 5 ); | ||||
|     private static HashMap<String, SqlSession> SessionMapBatch = new HashMap<>( 5 ); | ||||
|     private static HashMap<String, SqlSessionFactory> SessionFactoryMap = new HashMap<>( 5 ); | ||||
|     private static HashMap<String, SqlSessionFactory> SessionFactoryMapBatch = new HashMap<>( 5 ); | ||||
|     private static String DEFAULT_CONFIGFILE = "mybatis/mybatis-config.xml"; | ||||
|  | ||||
|     /** | ||||
|      *  | ||||
|      * @param configFile | ||||
|      * @return | ||||
|      * @throws IOException | ||||
|      */ | ||||
|     public static SqlSession getSqlSession( String configFile ) throws IOException | ||||
|     { | ||||
|         // 根据配置文件的路径,查找是否已经创建了对应的session | ||||
|         SqlSessionFactory factory = SessionFactoryMap.get( configFile ); | ||||
|  | ||||
|         // 找到就直接返回 | ||||
|         if ( factory != null ) | ||||
|         { | ||||
|             return factory.openSession(); | ||||
|         } | ||||
|  | ||||
|         // 没找到就创建一个 | ||||
|         InputStream configIS = Resources.getResourceAsStream( configFile ); | ||||
|         factory = new SqlSessionFactoryBuilder().build( configIS ); | ||||
|         SqlSession session = factory.openSession(); | ||||
|  | ||||
|         // 保存 | ||||
|         SessionFactoryMap.put( configFile, factory ); | ||||
|  | ||||
|         return session; | ||||
|     } | ||||
|  | ||||
|     public static SqlSession getSqlSessionBatch( String configFile ) throws IOException | ||||
|     { | ||||
|         // 根据配置文件的路径,查找是否已经创建了对应的session | ||||
|         SqlSessionFactory factory = SessionFactoryMap.get( configFile ); | ||||
|  | ||||
|         // 找到就直接返回 | ||||
|         if ( factory != null ) | ||||
|         { | ||||
|             return factory.openSession(); | ||||
|         } | ||||
|  | ||||
|         // 没找到就创建一个 | ||||
|         InputStream configIS = Resources.getResourceAsStream( configFile ); | ||||
|         factory = new SqlSessionFactoryBuilder().build( configIS ); | ||||
|         SqlSession session = factory.openSession( ExecutorType.BATCH, false ); | ||||
|  | ||||
|         // 保存 | ||||
|         SessionFactoryMap.put( configFile, factory ); | ||||
|  | ||||
|         return session; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      *  | ||||
|      * @return | ||||
|      * @throws IOException | ||||
|      */ | ||||
|     public static SqlSession getSqlSession() throws IOException | ||||
|     { | ||||
|         // 根据配置文件的路径,查找是否已经创建了对应的session | ||||
|         SqlSessionFactory factory = SessionFactoryMap.get( DEFAULT_CONFIGFILE ); | ||||
|  | ||||
|         // 找到就直接返回 | ||||
|         if ( factory != null ) | ||||
|         { | ||||
|             return factory.openSession(); | ||||
|         } | ||||
|  | ||||
|         // 没找到就创建一个 | ||||
|         InputStream configIS = Resources.getResourceAsStream( DEFAULT_CONFIGFILE ); | ||||
|         factory = new SqlSessionFactoryBuilder().build( configIS ); | ||||
|         SqlSession session = factory.openSession(); | ||||
|  | ||||
|         // 保存 | ||||
|         SessionFactoryMap.put( DEFAULT_CONFIGFILE, factory ); | ||||
|  | ||||
|         return session; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 获取一个Batch模式的sqlsession,使用默认路径的mybatis-config.xml文件。 | ||||
|      * 先判断SessionMapBatch中是否有和配置文件对应的缓存的sqlsession对象,有就直接使用。 | ||||
|      * 没有就创建一个新的,然后放入SessionMapBatch中。 | ||||
|      * @return ExecutorType.BATCH模式的sqlsession实例对象 | ||||
|      * @throws IOException 读取配置文件错误时抛出IOException异常 | ||||
|      */ | ||||
|     public static SqlSession getSqlSessionBatch() throws IOException | ||||
|     { | ||||
|         // 根据配置文件的路径,查找是否已经创建了对应的session | ||||
|         SqlSessionFactory factory = SessionFactoryMap.get( DEFAULT_CONFIGFILE ); | ||||
|  | ||||
|         // 找到就直接返回 | ||||
|         if ( factory != null ) | ||||
|         { | ||||
|             return factory.openSession(); | ||||
|         } | ||||
|  | ||||
|         // 没找到就创建一个 | ||||
|         InputStream configIS = Resources.getResourceAsStream( DEFAULT_CONFIGFILE ); | ||||
|         factory = new SqlSessionFactoryBuilder().build( configIS ); | ||||
|         SqlSession session = factory.openSession( ExecutorType.BATCH, false ); | ||||
|  | ||||
|         // 保存 | ||||
|         SessionFactoryMap.put( DEFAULT_CONFIGFILE, factory ); | ||||
|  | ||||
|         return session; | ||||
|     } | ||||
| } | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user