Compare commits
	
		
			71 Commits
		
	
	
		
			fd59698264
			...
			feature-da
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | 
							
								
								
									
										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,6 +28,7 @@ CREATE OR REPLACE PACKAGE telsale_archievement_pkg IS
 | 
				
			|||||||
        a_attaching_rate OUT VARCHAR2,
 | 
					        a_attaching_rate OUT VARCHAR2,
 | 
				
			||||||
        a_renewal_rate   OUT VARCHAR2,
 | 
					        a_renewal_rate   OUT VARCHAR2,
 | 
				
			||||||
        a_total          OUT INTEGER,
 | 
					        a_total          OUT INTEGER,
 | 
				
			||||||
 | 
					        a_present_month  OUT NUMBER,
 | 
				
			||||||
        a_mensual_cur    OUT cur_type
 | 
					        a_mensual_cur    OUT cur_type
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -52,18 +53,18 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
 | 
				
			|||||||
        A_TOTAL           OUT INTEGER,
 | 
					        A_TOTAL           OUT INTEGER,
 | 
				
			||||||
        A_MENSUAL_CUR     OUT CUR_TYPE
 | 
					        A_MENSUAL_CUR     OUT CUR_TYPE
 | 
				
			||||||
    ) IS
 | 
					    ) IS
 | 
				
			||||||
        L_THIS_MONTH      VARCHAR2(4);
 | 
					        --L_THIS_MONTH      VARCHAR2(4);
 | 
				
			||||||
        L_THIS_YEAR       VARCHAR2(4);
 | 
					        --L_THIS_YEAR       VARCHAR2(4);
 | 
				
			||||||
        L_FIRSTDAY        DATE;
 | 
					        L_FIRSTDAY        DATE;
 | 
				
			||||||
        L_DEPARTMENT_NAME VARCHAR2(100);
 | 
					        L_DEPARTMENT_NAME VARCHAR2(100);
 | 
				
			||||||
    BEGIN
 | 
					    BEGIN
 | 
				
			||||||
        L_THIS_MONTH := TO_CHAR(SYSDATE,
 | 
					        /*L_THIS_MONTH := TO_CHAR(SYSDATE,
 | 
				
			||||||
                                'mm');
 | 
					                                'mm');
 | 
				
			||||||
        L_THIS_YEAR  := TO_CHAR(SYSDATE,
 | 
					        L_THIS_YEAR  := TO_CHAR(SYSDATE,
 | 
				
			||||||
                                'yyyy');
 | 
					                                'yyyy');*/
 | 
				
			||||||
        L_FIRSTDAY   := TO_DATE(TO_CHAR(SYSDATE,
 | 
					        L_FIRSTDAY := TO_DATE(TO_CHAR(SYSDATE,
 | 
				
			||||||
                                        'yyyy') || '-01-01 00:00:00',
 | 
					                                      'yyyy') || '-01-01 00:00:00',
 | 
				
			||||||
                                'yyyy-mm-dd hh24:mi:ss');
 | 
					                              'yyyy-mm-dd hh24:mi:ss');
 | 
				
			||||||
        -- <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					        -- <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
				
			||||||
        BEGIN
 | 
					        BEGIN
 | 
				
			||||||
            SELECT DEPARTMENT_NAME
 | 
					            SELECT DEPARTMENT_NAME
 | 
				
			||||||
@@ -77,25 +78,35 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
 | 
				
			|||||||
                                        DEPARTMENTCODE_EXCEPTION_MSG);
 | 
					                                        DEPARTMENTCODE_EXCEPTION_MSG);
 | 
				
			||||||
        END;
 | 
					        END;
 | 
				
			||||||
        --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>
 | 
					        --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>
 | 
				
			||||||
        SELECT DECODE(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
 | 
					        /*SELECT DECODE(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
 | 
				
			||||||
                      0,
 | 
					                     0,
 | 
				
			||||||
                      0,
 | 
					                     0,
 | 
				
			||||||
                      ROUND((SUM(CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>) * 100),
 | 
					                     ROUND((SUM(CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>) * 100),
 | 
				
			||||||
                            2))
 | 
					                           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;*/
 | 
				
			||||||
 | 
					        SELECT round(dept.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
 | 
				
			||||||
 | 
					                     2)
 | 
				
			||||||
          INTO A_ATTACHING_RATE
 | 
					          INTO A_ATTACHING_RATE
 | 
				
			||||||
          FROM <20><>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD> CF
 | 
					          FROM desktop_archievement_admin.BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD> dept
 | 
				
			||||||
         WHERE CF.<2E>·<EFBFBD> = L_THIS_MONTH
 | 
					         WHERE dept.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME;
 | 
				
			||||||
           AND CF.<2E><><EFBFBD><EFBFBD> = L_THIS_YEAR
 | 
					 | 
				
			||||||
           AND <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD> = A_DEPARTMENT_CODE;
 | 
					 | 
				
			||||||
        --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					        --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
				
			||||||
        SELECT DECODE(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
 | 
					        /*SELECT DECODE(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
 | 
				
			||||||
                      0,
 | 
					                     0,
 | 
				
			||||||
                      0,
 | 
					                     0,
 | 
				
			||||||
                      ROUND(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
 | 
					                     ROUND(SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
 | 
				
			||||||
                            2))
 | 
					                           2))
 | 
				
			||||||
 | 
					         INTO A_RENEWAL_RATE
 | 
				
			||||||
 | 
					         FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>
 | 
				
			||||||
 | 
					        WHERE <20><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME;*/
 | 
				
			||||||
 | 
					        SELECT round(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)",
 | 
				
			||||||
 | 
					                     2)
 | 
				
			||||||
          INTO A_RENEWAL_RATE
 | 
					          INTO A_RENEWAL_RATE
 | 
				
			||||||
          FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>
 | 
					          FROM BI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD>ٱ<EFBFBD> t
 | 
				
			||||||
         WHERE <EFBFBD><EFBFBD><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME;
 | 
					         WHERE t.<2E><><EFBFBD>β<EFBFBD><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME;
 | 
				
			||||||
        --<2D><>ҵ<EFBFBD><D2B5>
 | 
					        --<2D><>ҵ<EFBFBD><D2B5>
 | 
				
			||||||
        SELECT ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD> + CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>),
 | 
					        SELECT ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD> + CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>),
 | 
				
			||||||
                         0),
 | 
					                         0),
 | 
				
			||||||
@@ -131,12 +142,14 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
 | 
				
			|||||||
        a_attaching_rate OUT VARCHAR2,
 | 
					        a_attaching_rate OUT VARCHAR2,
 | 
				
			||||||
        a_renewal_rate   OUT VARCHAR2,
 | 
					        a_renewal_rate   OUT VARCHAR2,
 | 
				
			||||||
        a_total          OUT INTEGER,
 | 
					        a_total          OUT INTEGER,
 | 
				
			||||||
 | 
					        a_present_month  OUT NUMBER,
 | 
				
			||||||
        a_mensual_cur    OUT cur_type
 | 
					        a_mensual_cur    OUT cur_type
 | 
				
			||||||
    ) IS
 | 
					    ) IS
 | 
				
			||||||
        l_caller_name VARCHAR2(100);
 | 
					        l_caller_name VARCHAR2(100);
 | 
				
			||||||
        l_this_month  VARCHAR2(4);
 | 
					        l_this_month  VARCHAR2(4);
 | 
				
			||||||
        l_this_year   VARCHAR2(4);
 | 
					        l_this_year   VARCHAR2(4);
 | 
				
			||||||
        l_firstday    DATE;
 | 
					        l_firstday    DATE;
 | 
				
			||||||
 | 
					        l_rownum      INTEGER;
 | 
				
			||||||
    BEGIN
 | 
					    BEGIN
 | 
				
			||||||
        --<2D><>ѯ<EFBFBD><D1AF>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>
 | 
					        --<2D><>ѯ<EFBFBD><D1AF>ϯ<EFBFBD><CFAF><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>
 | 
				
			||||||
        BEGIN
 | 
					        BEGIN
 | 
				
			||||||
@@ -159,7 +172,8 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
 | 
				
			|||||||
                                'yyyy-mm-dd hh24:mi:ss');
 | 
					                                'yyyy-mm-dd hh24:mi:ss');
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
        --<2D>ܳ<EFBFBD><DCB3>ձ<EFBFBD><D5B1><EFBFBD>
 | 
					        --<2D>ܳ<EFBFBD><DCB3>ձ<EFBFBD><D5B1><EFBFBD>
 | 
				
			||||||
        SELECT round(SUM(cf.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
 | 
					        SELECT round(nvl(SUM(cf.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
 | 
				
			||||||
 | 
					                         0),
 | 
				
			||||||
                     2) bf
 | 
					                     2) bf
 | 
				
			||||||
          INTO a_total
 | 
					          INTO a_total
 | 
				
			||||||
          FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> cf
 | 
					          FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> cf
 | 
				
			||||||
@@ -167,31 +181,55 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
 | 
				
			|||||||
           AND cf.<2E><><EFBFBD><EFBFBD> = l_this_year;
 | 
					           AND cf.<2E><><EFBFBD><EFBFBD> = l_this_year;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
        --<2D><><EFBFBD><CDB8>
 | 
					        --<2D><><EFBFBD><CDB8>
 | 
				
			||||||
        SELECT decode(SUM(cf.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
 | 
					        SELECT rownum,
 | 
				
			||||||
                      0,
 | 
					               round(nvl(t.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
 | 
				
			||||||
                      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),
 | 
				
			||||||
                            2))
 | 
					               round(nvl(t."<22><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>(<28><>)" * 10000,
 | 
				
			||||||
          INTO a_attaching_rate
 | 
					                         0),
 | 
				
			||||||
          FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> cf
 | 
					                     2)
 | 
				
			||||||
         WHERE cf.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = a_caller_code
 | 
					          INTO l_rownum,
 | 
				
			||||||
           AND cf.<2E><><EFBFBD><EFBFBD> = l_this_year
 | 
					               a_attaching_rate,
 | 
				
			||||||
           AND cf.<2E>·<EFBFBD> = l_this_month;
 | 
					               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;
 | 
				
			||||||
 | 
					        /*SELECT decode(nvl(SUM(cf.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>),
 | 
				
			||||||
 | 
					                         0),
 | 
				
			||||||
 | 
					                     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><CFAF><EFBFBD><EFBFBD> = a_caller_code
 | 
				
			||||||
 | 
					          AND cf.<2E><><EFBFBD><EFBFBD> = l_this_year
 | 
				
			||||||
 | 
					          AND cf.<2E>·<EFBFBD> = l_this_month;*/
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
        --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					        --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
				
			||||||
        SELECT decode(SUM(xb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
 | 
					        /*SELECT decode(nvl(SUM(xb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
 | 
				
			||||||
                      0,
 | 
					                         0),
 | 
				
			||||||
                      0,
 | 
					                     0,
 | 
				
			||||||
                      round(SUM(xb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(xb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
 | 
					                     0,
 | 
				
			||||||
                            2)) xbl
 | 
					                     round(SUM(xb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(xb.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
 | 
				
			||||||
          INTO a_renewal_rate
 | 
					                           2)) xbl
 | 
				
			||||||
          FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3> xb
 | 
					         INTO a_renewal_rate
 | 
				
			||||||
         WHERE xb.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = a_caller_code;
 | 
					         FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3> xb
 | 
				
			||||||
 | 
					        WHERE xb.<2E><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD> = a_caller_code;*/
 | 
				
			||||||
 | 
					        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> t
 | 
				
			||||||
 | 
					         WHERE t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = l_caller_name
 | 
				
			||||||
 | 
					           AND rownum = 1;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
        --ÿ<><C3BF>ҵ<EFBFBD><D2B5>
 | 
					        --ÿ<><C3BF>ҵ<EFBFBD><D2B5>
 | 
				
			||||||
        OPEN A_MENSUAL_CUR FOR
 | 
					        OPEN A_MENSUAL_CUR FOR
 | 
				
			||||||
            SELECT CF.<2E>·<EFBFBD> MM,
 | 
					            SELECT CF.<2E>·<EFBFBD> MM,
 | 
				
			||||||
                   ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD> + CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / 10000,
 | 
					                   ROUND(NVL(SUM(CF.<2E><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD> + CF.<2E><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>),
 | 
				
			||||||
                             0),
 | 
					                             0),
 | 
				
			||||||
                         0) BF
 | 
					                         0) BF
 | 
				
			||||||
              FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
 | 
					              FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD> CF
 | 
				
			||||||
@@ -199,9 +237,7 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
 | 
				
			|||||||
               AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >= TO_DATE(TO_CHAR(SYSDATE,
 | 
					               AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> >= TO_DATE(TO_CHAR(SYSDATE,
 | 
				
			||||||
                                           'yyyy') || '-01-01 00:00:00',
 | 
					                                           'yyyy') || '-01-01 00:00:00',
 | 
				
			||||||
                                   'yyyy-mm-dd hh24:mi:ss')
 | 
					                                   'yyyy-mm-dd hh24:mi:ss')
 | 
				
			||||||
               AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> < TO_DATE(TO_CHAR(SYSDATE,
 | 
					               AND ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <= SYSDATE
 | 
				
			||||||
                                          'yyyy-mm') || '-01 00:00:00',
 | 
					 | 
				
			||||||
                                  'yyyy-mm-dd hh24:mi:ss')
 | 
					 | 
				
			||||||
             GROUP BY CF.<2E>·<EFBFBD>
 | 
					             GROUP BY CF.<2E>·<EFBFBD>
 | 
				
			||||||
             ORDER BY CF.<2E>·<EFBFBD>;
 | 
					             ORDER BY CF.<2E>·<EFBFBD>;
 | 
				
			||||||
    END;
 | 
					    END;
 | 
				
			||||||
@@ -232,34 +268,54 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
 | 
				
			|||||||
        END;
 | 
					        END;
 | 
				
			||||||
        -- <20><><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD><DABA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
 | 
					        -- <20><><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD><DABA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
 | 
				
			||||||
        OPEN A_ATTACHING_RANKING_LIST FOR
 | 
					        OPEN A_ATTACHING_RANKING_LIST FOR
 | 
				
			||||||
            SELECT ROWNUM,
 | 
					            SELECT rownum,
 | 
				
			||||||
                   <20><>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>   AS CALLER_NAME,
 | 
					                   paihang.<EFBFBD><EFBFBD><EFBFBD><EFBFBD> AS caller_name,
 | 
				
			||||||
                   <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> AS ATTACHING_RATE
 | 
					                   paihang.attaching_rate
 | 
				
			||||||
              FROM (SELECT <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
 | 
					              FROM (SELECT DISTINCT *
 | 
				
			||||||
                           ROUND(DECODE(SUM(<28><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
 | 
					                      FROM (SELECT t.<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
 | 
				
			||||||
                                        0,
 | 
					                                   round(t.<2E><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>,
 | 
				
			||||||
                                        0,
 | 
					                                         2) attaching_rate,
 | 
				
			||||||
                                        (SUM(<28><><EFBFBD><EFBFBD><EFBFBD>ںϱ<DABA><CFB1><EFBFBD>) / SUM(<28><><EFBFBD>ո<EFBFBD><D5B8>˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD>)) * 100),
 | 
					                                   zuoxi.department_name
 | 
				
			||||||
                                 2) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>
 | 
					                              FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t,
 | 
				
			||||||
                      FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>
 | 
					                                   (SELECT DISTINCT t.saler_code,
 | 
				
			||||||
                     WHERE <20>·<EFBFBD> = A_MONTH
 | 
					                                                    t.saler_name,
 | 
				
			||||||
                       AND <20><><EFBFBD><EFBFBD> = A_YEAR
 | 
					                                                    t.team_code,
 | 
				
			||||||
                       AND <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD> = A_DEPARTMENT_CODE
 | 
					                                                    team.team,
 | 
				
			||||||
                     GROUP BY <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>
 | 
					                                                    bm.department_name
 | 
				
			||||||
                     ORDER BY <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8> DESC);
 | 
					                                      FROM tele_saler      t,
 | 
				
			||||||
 | 
					                                           tele_saler_team team,
 | 
				
			||||||
 | 
					                                           idst0.bm_t      bm
 | 
				
			||||||
 | 
					                                     WHERE t.team_code = team.team_code
 | 
				
			||||||
 | 
					                                       AND team.department_code = bm.department_code
 | 
				
			||||||
 | 
					                                       AND bm.department_name = L_DEPARTMENT_NAME) zuoxi
 | 
				
			||||||
 | 
					                             WHERE t.<2E><><EFBFBD><EFBFBD> = zuoxi.saler_name) st
 | 
				
			||||||
 | 
					                     ORDER BY st.department_name,
 | 
				
			||||||
 | 
					                              st.attaching_rate DESC) paihang;
 | 
				
			||||||
        -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
 | 
					        -- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD>
 | 
				
			||||||
        OPEN A_RENEWAL_RANKING_LIST FOR
 | 
					        OPEN A_RENEWAL_RANKING_LIST FOR
 | 
				
			||||||
            SELECT ROWNUM,
 | 
					            SELECT rownum,
 | 
				
			||||||
                   <20><>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> AS CALLER_NAME,
 | 
					                   paihang.<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> AS CALLER_NAME,
 | 
				
			||||||
                   <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>   AS RENEWAL_RATE
 | 
					                   paihang.xbl    AS RENEWAL_RATE
 | 
				
			||||||
              FROM (SELECT <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
 | 
					              FROM (SELECT DISTINCT *
 | 
				
			||||||
                           ROUND(NVL((SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)) * 100,
 | 
					                      FROM (SELECT t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
 | 
				
			||||||
                                     0),
 | 
					                                   round(t."<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>ȫ<EFBFBD>£<EFBFBD>(%)",
 | 
				
			||||||
                                 2) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					                                         2) xbl,
 | 
				
			||||||
                      FROM <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3> XB
 | 
					                                   zuoxi.department_name
 | 
				
			||||||
                     WHERE XB.<2E><><EFBFBD><EFBFBD> = L_DEPARTMENT_NAME
 | 
					                              FROM BI<42><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ٱ<EFBFBD> t,
 | 
				
			||||||
                     GROUP BY <20><>ϯ<EFBFBD><CFAF><EFBFBD><EFBFBD>
 | 
					                                   (SELECT DISTINCT t.saler_code,
 | 
				
			||||||
                     ORDER BY <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC);
 | 
					                                                    t.saler_name,
 | 
				
			||||||
 | 
					                                                    t.team_code,
 | 
				
			||||||
 | 
					                                                    team.team,
 | 
				
			||||||
 | 
					                                                    bm.department_name
 | 
				
			||||||
 | 
					                                      FROM tele_saler      t,
 | 
				
			||||||
 | 
					                                           tele_saler_team team,
 | 
				
			||||||
 | 
					                                           idst0.bm_t      bm
 | 
				
			||||||
 | 
					                                     WHERE t.team_code = team.team_code
 | 
				
			||||||
 | 
					                                       AND team.department_code = bm.department_code
 | 
				
			||||||
 | 
					                                       AND bm.department_name = L_DEPARTMENT_NAME) zuoxi
 | 
				
			||||||
 | 
					                             WHERE t.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = zuoxi.saler_name) xb
 | 
				
			||||||
 | 
					                     ORDER BY xb.department_name,
 | 
				
			||||||
 | 
					                              xb.xbl DESC) paihang;
 | 
				
			||||||
    END;
 | 
					    END;
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
    NULL;
 | 
					    NULL;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										43
									
								
								code/db/pkg/telsale_bi_utils.pck
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								code/db/pkg/telsale_bi_utils.pck
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
				
			|||||||
 | 
					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>';
 | 
				
			||||||
 | 
					    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>';
 | 
				
			||||||
 | 
					    END;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					    -- Initialization
 | 
				
			||||||
 | 
					    NULL;
 | 
				
			||||||
 | 
					END telsale_bi_utils;
 | 
				
			||||||
 | 
					/
 | 
				
			||||||
							
								
								
									
										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;
 | 
				
			||||||
 | 
					/
 | 
				
			||||||
							
								
								
									
										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>';
 | 
				
			||||||
							
								
								
									
										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;
 | 
				
			||||||
							
								
								
									
										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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -75,7 +75,7 @@ module.exports = {
 | 
				
			|||||||
                "plugin:vue/vue3-essential",
 | 
					                "plugin:vue/vue3-essential",
 | 
				
			||||||
                "plugin:vue/recommended",
 | 
					                "plugin:vue/recommended",
 | 
				
			||||||
                "eslint:recommended",
 | 
					                "eslint:recommended",
 | 
				
			||||||
                // "standard-with-typescript", 
 | 
					                "standard-with-typescript", 
 | 
				
			||||||
                "plugin:@typescript-eslint/eslint-recommended",
 | 
					                "plugin:@typescript-eslint/eslint-recommended",
 | 
				
			||||||
                "plugin:@typescript-eslint/recommended",
 | 
					                "plugin:@typescript-eslint/recommended",
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
@@ -112,6 +112,7 @@ module.exports = {
 | 
				
			|||||||
                "vue/html-indent": ["error", 4,],
 | 
					                "vue/html-indent": ["error", 4,],
 | 
				
			||||||
                // typescript
 | 
					                // typescript
 | 
				
			||||||
                "@typescript-eslint/indent": ["warn", 4,],
 | 
					                "@typescript-eslint/indent": ["warn", 4,],
 | 
				
			||||||
 | 
					                "@typescript-eslint/no-explicit-any": "warn",
 | 
				
			||||||
                "@typescript-eslint/no-extra-semi": "off",
 | 
					                "@typescript-eslint/no-extra-semi": "off",
 | 
				
			||||||
                "@typescript-eslint/no-inferrable-types": "off",
 | 
					                "@typescript-eslint/no-inferrable-types": "off",
 | 
				
			||||||
                "@typescript-eslint/no-unused-vars": "warn",
 | 
					                "@typescript-eslint/no-unused-vars": "warn",
 | 
				
			||||||
@@ -157,7 +158,7 @@ module.exports = {
 | 
				
			|||||||
                "space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
 | 
					                "space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
 | 
				
			||||||
                "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
 | 
					                "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
 | 
				
			||||||
                "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
 | 
					                "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
 | 
				
			||||||
                "@typescript-eslint/no-explicit-any": "warn",
 | 
					                "@typescript-eslint/no-explicit-any": "off",
 | 
				
			||||||
                "@typescript-eslint/indent": ["error", 4,],
 | 
					                "@typescript-eslint/indent": ["error", 4,],
 | 
				
			||||||
                "@typescript-eslint/no-extra-semi": "off",
 | 
					                "@typescript-eslint/no-extra-semi": "off",
 | 
				
			||||||
                "@typescript-eslint/no-inferrable-types": "off",
 | 
					                "@typescript-eslint/no-inferrable-types": "off",
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										30531
									
								
								code/web/task_schedule/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										30531
									
								
								code/web/task_schedule/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,39 +1,40 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "name": "task_schedule",
 | 
					  "name": "task_schedule",
 | 
				
			||||||
    "private": true,
 | 
					  "private": true,
 | 
				
			||||||
    "version": "0.0.0",
 | 
					  "version": "0.0.0",
 | 
				
			||||||
    "type": "module",
 | 
					  "type": "module",
 | 
				
			||||||
    "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
        "dev": "vite",
 | 
					    "dev": "vite",
 | 
				
			||||||
        "build": "vite build",
 | 
					    "build": "vite build",
 | 
				
			||||||
        "preview": "vite preview"
 | 
					    "preview": "vite preview"
 | 
				
			||||||
    },
 | 
					  },
 | 
				
			||||||
    "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
        "@babel/eslint-parser": "^7.22.11",
 | 
					    "@element-plus/icons-vue": "^2.1.0",
 | 
				
			||||||
        "@element-plus/icons-vue": "^2.1.0",
 | 
					    "echarts": "^5.4.3",
 | 
				
			||||||
        "@rushstack/eslint-patch": "^1.3.3",
 | 
					    "element-plus": "^2.4.1",
 | 
				
			||||||
        "@vue/eslint-config-typescript": "^11.0.3",
 | 
					    "mitt": "^3.0.1",
 | 
				
			||||||
        "axios": "^1.4.0",
 | 
					    "moment": "^2.29.4",
 | 
				
			||||||
        "babel": "^6.23.0",
 | 
					    "sass-loader": "^13.3.2",
 | 
				
			||||||
        "echarts": "^5.4.3",
 | 
					    "vue": "^3.3.6",
 | 
				
			||||||
        "element-plus": "^2.3.10",
 | 
					    "vue-router": "^4.2.5",
 | 
				
			||||||
        "moment": "^2.29.4",
 | 
					    "vuex": "^4.1.0"
 | 
				
			||||||
        "sass-loader": "^13.3.2",
 | 
					  },
 | 
				
			||||||
        "vue": "^3.3.4",
 | 
					  "devDependencies": {
 | 
				
			||||||
        "vue-router": "^4.2.4",
 | 
					    "@babel/eslint-parser": "^7.22.15",
 | 
				
			||||||
        "vuex": "^4.1.0"
 | 
					    "@rushstack/eslint-patch": "^1.5.1",
 | 
				
			||||||
    },
 | 
					    "@typescript-eslint/eslint-plugin": "^6.8.0",
 | 
				
			||||||
    "devDependencies": {
 | 
					    "@vitejs/plugin-vue": "^4.4.0",
 | 
				
			||||||
        "@babel/eslint-parser": "^7.22.11",
 | 
					    "@vue/cli-plugin-eslint": "^5.0.8",
 | 
				
			||||||
        "@typescript-eslint/eslint-plugin": "^6.4.1",
 | 
					    "@vue/eslint-config-typescript": "^12.0.0",
 | 
				
			||||||
        "@vitejs/plugin-vue": "^4.3.3",
 | 
					    "axios": "^1.5.1",
 | 
				
			||||||
        "@vue/cli-plugin-eslint": "^5.0.8",
 | 
					    "babel": "^6.23.0",
 | 
				
			||||||
        "eslint-config-recommended": "^4.1.0",
 | 
					    "eslint-config-recommended": "^4.1.0",
 | 
				
			||||||
        "eslint-config-standard-with-typescript": "^38.0.0",
 | 
					    "eslint-config-standard-with-typescript": "^39.1.1",
 | 
				
			||||||
        "eslint-plugin-vue": "^9.17.0",
 | 
					    "eslint-plugin-vue": "^9.17.0",
 | 
				
			||||||
        "node-sass": "^9.0.0",
 | 
					    "node-sass": "^9.0.0",
 | 
				
			||||||
        "sass": "^1.66.1",
 | 
					    "sass": "^1.69.4",
 | 
				
			||||||
        "style-loader": "^3.3.3",
 | 
					    "style-loader": "^3.3.3",
 | 
				
			||||||
        "vue-eslint-parser": "^9.3.1"
 | 
					    "ts-node": "^10.9.1",
 | 
				
			||||||
    }
 | 
					    "vue-eslint-parser": "^9.3.2"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,12 +29,11 @@ export default {
 | 
				
			|||||||
    setup( props )
 | 
					    setup( props )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        const ui = reactive({
 | 
					        const ui = reactive({
 | 
				
			||||||
            mensualList:[],
 | 
					            mensualList: [],
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
        // 设置图表
 | 
					        // 设置图表
 | 
				
			||||||
        const initCharts = () =>
 | 
					        const initCharts = (): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            console.log( "每月业绩", props.chartData );
 | 
					            console.log( "每月业绩", props.chartData );
 | 
				
			||||||
            const chartDom = document.getElementById( "chartWrapper" );
 | 
					            const chartDom = document.getElementById( "chartWrapper" );
 | 
				
			||||||
@@ -56,7 +55,7 @@ export default {
 | 
				
			|||||||
                ],
 | 
					                ],
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            option && myChart.setOption( option );
 | 
					            myChart.setOption( option );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            window.onresize = function ()
 | 
					            window.onresize = function ()
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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,7 +15,7 @@
 | 
				
			|||||||
                alt=""
 | 
					                alt=""
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
            <div class="title-wrapper">
 | 
					            <div class="title-wrapper">
 | 
				
			||||||
                <span>"消7灭6"突围战</span>
 | 
					                <span>"消8灭70"突围战</span>
 | 
				
			||||||
                <span>{{ props.month }}月入营坐席</span>
 | 
					                <span>{{ props.month }}月入营坐席</span>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -157,6 +157,7 @@ export default {
 | 
				
			|||||||
                display: inline-block;
 | 
					                display: inline-block;
 | 
				
			||||||
                text-align: center;
 | 
					                text-align: center;
 | 
				
			||||||
                color: #fff;
 | 
					                color: #fff;
 | 
				
			||||||
 | 
					                margin-top: 0px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                font: {
 | 
					                font: {
 | 
				
			||||||
                    size: 1.5rem;
 | 
					                    size: 1.5rem;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,9 @@
 | 
				
			|||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
    <div class="rankinglist-wrapper">
 | 
					    <div class="rankinglist-wrapper">
 | 
				
			||||||
 | 
					        <div class="rankinglist-title">
 | 
				
			||||||
 | 
					            <span>{{ props.title }}</span>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
        <el-table
 | 
					        <el-table
 | 
				
			||||||
            :data="topFive"
 | 
					            :data="topFive"
 | 
				
			||||||
            stripe
 | 
					            stripe
 | 
				
			||||||
@@ -25,7 +28,7 @@
 | 
				
			|||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
            </el-table-column>
 | 
					            </el-table-column>
 | 
				
			||||||
            <el-table-column
 | 
					            <el-table-column
 | 
				
			||||||
                label="名次"
 | 
					                label="名称"
 | 
				
			||||||
                width="160"
 | 
					                width="160"
 | 
				
			||||||
                align="center"
 | 
					                align="center"
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
@@ -103,7 +106,14 @@ export default {
 | 
				
			|||||||
    // border: 1px solid red;
 | 
					    // border: 1px solid red;
 | 
				
			||||||
    border-radius: 5px;
 | 
					    border-radius: 5px;
 | 
				
			||||||
    width: 300px;
 | 
					    width: 300px;
 | 
				
			||||||
    height: 250px;
 | 
					    height: 270px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    flex-direction: column;
 | 
				
			||||||
 | 
					    justify-content: center;
 | 
				
			||||||
 | 
					    align-items: center;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    margin-bottom: 15px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.rankinglist-index {
 | 
					.rankinglist-index {
 | 
				
			||||||
@@ -113,7 +123,7 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
:deep(.el-table)
 | 
					:deep(.el-table)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    border-radius: 5px;
 | 
					    border-radius: 0px 0px 5px 5px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:deep(.el-table__header-wrapper) {
 | 
					: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>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@
 | 
				
			|||||||
        <span class="company-name">CPIC</span>
 | 
					        <span class="company-name">CPIC</span>
 | 
				
			||||||
        <div class="version-wrapper">
 | 
					        <div class="version-wrapper">
 | 
				
			||||||
            <span>桌面霸屏后台管理</span>
 | 
					            <span>桌面霸屏后台管理</span>
 | 
				
			||||||
            <span>Build-202303251257</span>
 | 
					            <span>Build-20230915</span>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="buttons-wrapper">
 | 
					        <div class="buttons-wrapper">
 | 
				
			||||||
            <component
 | 
					            <component
 | 
				
			||||||
@@ -35,7 +35,7 @@ export default {
 | 
				
			|||||||
        /**
 | 
					        /**
 | 
				
			||||||
         * 退出登录
 | 
					         * 退出登录
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        const Logout = ():void =>
 | 
					        const Logout = (): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            ElMessageBox.confirm(
 | 
					            ElMessageBox.confirm(
 | 
				
			||||||
                "是否要退出系统?",
 | 
					                "是否要退出系统?",
 | 
				
			||||||
@@ -46,11 +46,12 @@ export default {
 | 
				
			|||||||
                    type: "warning",
 | 
					                    type: "warning",
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
                .then(() =>
 | 
					                .then((): void =>
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    // debugger;
 | 
					                    // debugger;
 | 
				
			||||||
                    logout();
 | 
					                    logout();
 | 
				
			||||||
                });
 | 
					                })
 | 
				
			||||||
 | 
					                .catch((): void => {});
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return { Logout, };
 | 
					        return { Logout, };
 | 
				
			||||||
@@ -91,10 +92,10 @@ export default {
 | 
				
			|||||||
        align-items: start;
 | 
					        align-items: start;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        font: {
 | 
					        font: {
 | 
				
			||||||
            size: 0.5rem;
 | 
					            size: 0.75rem;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        > *+* {
 | 
					        >*+* {
 | 
				
			||||||
            margin-top: 1px;
 | 
					            margin-top: 1px;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,7 +11,7 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2023-01-04 11:40:03
 | 
					 * @Date: 2023-01-04 11:40:03
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @LastEditTime: 2023-03-27 18:19:35
 | 
					 * @LastEditTime: 2023-09-27 11:19:05
 | 
				
			||||||
 * @FilePath: /it-console/src/layout/components/Main.vue
 | 
					 * @FilePath: /it-console/src/layout/components/Main.vue
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -37,6 +37,6 @@ export default {
 | 
				
			|||||||
.el-scrollbar {
 | 
					.el-scrollbar {
 | 
				
			||||||
    height: 100%;
 | 
					    height: 100%;
 | 
				
			||||||
    width: 100%;
 | 
					    width: 100%;
 | 
				
			||||||
    background-color: #ecf2f9;
 | 
					    /* background-color: #ecf2f9; */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,22 +62,31 @@ const routes = [
 | 
				
			|||||||
        component: ()=> import( "../layout/Index.vue" ),
 | 
					        component: ()=> import( "../layout/Index.vue" ),
 | 
				
			||||||
        children:[
 | 
					        children:[
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                path:"/staff_data",
 | 
					                path:"/telsaler_data",
 | 
				
			||||||
                name:"StaffDataManagement",
 | 
					                name:"TelsalerManagement",
 | 
				
			||||||
                meta: {
 | 
					                meta: {
 | 
				
			||||||
                    title:"坐席管理",
 | 
					                    title:"坐席管理",
 | 
				
			||||||
                    icon: "user",
 | 
					                    icon: "user",
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                component: ()=> import( "../views/StaffManagement.vue" ),
 | 
					                component: ()=> import( "../views/telsaler/TelsalerManagementView.vue" ),
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                path:"/archievement_data",
 | 
					                path: "/data_management",
 | 
				
			||||||
                name:"ArchievementDataManagement",
 | 
					                name: "DataManagement",
 | 
				
			||||||
                meta: {
 | 
					                meta: {
 | 
				
			||||||
                    title:"数据管理",
 | 
					                    title: "数据管理",
 | 
				
			||||||
                    icon: "document",
 | 
					                    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" ),
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,6 +8,11 @@
 | 
				
			|||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
					 * 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 );
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,13 +14,12 @@
 | 
				
			|||||||
        "target": "ESNext",
 | 
					        "target": "ESNext",
 | 
				
			||||||
        "module": "ESNext",
 | 
					        "module": "ESNext",
 | 
				
			||||||
        // "module": "CommonJS",
 | 
					        // "module": "CommonJS",
 | 
				
			||||||
        // "moduleResolution": "node",
 | 
					 | 
				
			||||||
        "moduleResolution": "node",
 | 
					        "moduleResolution": "node",
 | 
				
			||||||
        "strict": true,
 | 
					        "strict": true,
 | 
				
			||||||
        "jsx": "preserve",
 | 
					        "jsx": "preserve",
 | 
				
			||||||
        "sourceMap": true,
 | 
					        "sourceMap": true,
 | 
				
			||||||
        "resolveJsonModule": true,
 | 
					        "resolveJsonModule": true,
 | 
				
			||||||
        "esModuleInterop": false,
 | 
					        "esModuleInterop": true,
 | 
				
			||||||
        "baseUrl": "./", // paths 路径解析起点
 | 
					        "baseUrl": "./", // paths 路径解析起点
 | 
				
			||||||
        "paths": { // 别名路径设置
 | 
					        "paths": { // 别名路径设置
 | 
				
			||||||
            "@/*": [
 | 
					            "@/*": [
 | 
				
			||||||
@@ -46,5 +45,8 @@
 | 
				
			|||||||
    ],
 | 
					    ],
 | 
				
			||||||
    "exclude": [
 | 
					    "exclude": [
 | 
				
			||||||
        "./node_modules",
 | 
					        "./node_modules",
 | 
				
			||||||
    ]
 | 
					    ],
 | 
				
			||||||
 | 
					    "ts-node": {
 | 
				
			||||||
 | 
					        "esm": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										79
									
								
								code/web/task_schedule/src/utils/BIReport.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								code/web/task_schedule/src/utils/BIReport.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,79 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @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.js";
 | 
				
			||||||
 | 
					import { API_URL } from "./api/config.js";
 | 
				
			||||||
 | 
					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,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ImportBIReportResponseHandler = ( response: ImportBIReportResponse, error?: any ) => void;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * @param request 请求参数
 | 
				
			||||||
 | 
					 * @param handler 调用者提供的请求结果处理函数
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					function importBIReport( request: ImportBIReportRequest, handler: any ): 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 );
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export {
 | 
				
			||||||
 | 
					    type BIReportType,
 | 
				
			||||||
 | 
					    type ImportBIReportRequest,
 | 
				
			||||||
 | 
					    type ImportBIReportResponse,
 | 
				
			||||||
 | 
					    type ImportBIReportResponseHandler,
 | 
				
			||||||
 | 
					    importBIReport
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
							
								
								
									
										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,7 +7,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export const API_URL = {
 | 
					const API_URL = {
 | 
				
			||||||
    // URL_LOGIN: import.meta.env.VITE_URL_LOGIN,
 | 
					    // 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://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_LOGIN: "http://10.39.0.41:8081/admin-system/account/p13_account_check",
 | 
				
			||||||
@@ -24,4 +24,32 @@ export const API_URL = {
 | 
				
			|||||||
    // URL_RANKINGLIST: "http://222.76.244.118:11101/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_RANKINGLIST: "http://10.39.0.41:8081/desktop_archievement_backend/archievement/query_ranking_list.do",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 坐席业绩查询
 | 
				
			||||||
 | 
					    // URL_CALLER_ARCHIEVEMENT: "http://222.76.244.118:11101/desktop_archievement_backend/archievement/query_caller_archievement.do",
 | 
				
			||||||
 | 
					    URL_CALLER_ARCHIEVEMENT: "http://10.39.0.41:8081/desktop_archievement_backend/archievement/query_caller_archievement.do",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** 奖项相关 **/
 | 
				
			||||||
 | 
					    // 查询奖励项目
 | 
				
			||||||
 | 
					    // URL_RWARD_PROJECTS: "http://222.76.244.118:11101/desktop_archievement_backend/rewards/query_reward_projects.do",
 | 
				
			||||||
 | 
					    URL_RWARD_PROJECTS: "http://10.39.0.41:8081/desktop_archievement_backend/rewards/query_reward_projects.do",
 | 
				
			||||||
 | 
					    // 查询获奖人员
 | 
				
			||||||
 | 
					    URL_REWARD_GAINERS: "http://10.39.0.41:8081/desktop_archievement_backend/rewards/query_reward_gainers.do",
 | 
				
			||||||
 | 
					    // URL_REWARD_GAINERS: "http://222.76.244.118:11101/desktop_archievement_backend/rewards/query_reward_gainers.do",
 | 
				
			||||||
 | 
					    // 添加获奖人员
 | 
				
			||||||
 | 
					    URL_ADD_REWARD_TELSALER: "http://10.39.0.41:8081/desktop_archievement_backend/rewards/add_telsaler_reward.do",
 | 
				
			||||||
 | 
					    // URL_ADD_REWARD_TELSALER: "http://222.76.244.118:11101/desktop_archievement_backend/rewards/add_telsaler_reward.do",
 | 
				
			||||||
 | 
					    // 更新获奖人员
 | 
				
			||||||
 | 
					    URL_UPDATE_REWARD_TELSALER: "http://10.39.0.41:8081/desktop_archievement_backend/rewards/update_telsaler_reward.do",
 | 
				
			||||||
 | 
					    // URL_ADD_REWARD_TELSALER: "http://222.76.244.118:11101/desktop_archievement_backend/rewards/update_telsaler_reward.do",
 | 
				
			||||||
 | 
					    // 删除获奖人员
 | 
				
			||||||
 | 
					    URL_DEL_REWARD_TELSALER: "http://10.39.0.41:8081/desktop_archievement_backend/rewards/delete_telsaler_reward.do",
 | 
				
			||||||
 | 
					    // URL_ADD_REWARD_TELSALER: "http://222.76.244.118:11101/desktop_archievement_backend/rewards/delete_telsaler_reward.do",
 | 
				
			||||||
 | 
					    // 上传文件
 | 
				
			||||||
 | 
					    URL_UPLOAD_FILE: "http://10.39.0.41:8081/desktop_archievement_backend/file/file-upload.do",
 | 
				
			||||||
 | 
					    // URL_UPLOAD_FILE: "http://222.76.244.118:11101/desktop_archievement_backend/file/file-upload.do",
 | 
				
			||||||
 | 
					    // 导入报表
 | 
				
			||||||
 | 
					    URL_IMPORT_REPORT: "http://10.39.0.41:8081/desktop_archievement_backend/import_bi_data/excel.do",
 | 
				
			||||||
 | 
					    // URL_IMPORT_REPORT: "http://222.76.244.118:11101/desktop_archievement_backend/import_bi_data/excel.do",
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export { API_URL };
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,16 +3,17 @@
 | 
				
			|||||||
 * @Date: 2023-03-17 15:17:44
 | 
					 * @Date: 2023-03-17 15:17:44
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @FilePath: /task_schedule/src/utils/archievement.ts
 | 
					 * @FilePath: /task_schedule/src/utils/archievement.ts
 | 
				
			||||||
 * @Description: 请求业绩数据
 | 
					 * @Description: 请求业绩数据相关的方法。
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
import { service as instance } from "./api/request.js";
 | 
					import { service as instance } from "./api/request.js";
 | 
				
			||||||
import { API_URL } from "./api/config.js";
 | 
					import { API_URL } from "./api/config.js";
 | 
				
			||||||
import { type Department } from "@/types/cpicxim/Department.js";
 | 
					import { type Department } from "../types/cpicxim/Department.js";
 | 
				
			||||||
// import { type AxiosResponse } from "axios";
 | 
					import { type TelSaler } from "../types/cpicxim/TelSaler.js";
 | 
				
			||||||
 | 
					import { type AxiosResponse } from "axios";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface Archievement
 | 
					interface DepartmentArchievement // 定义业绩对象的结构
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    success: boolean;
 | 
					    success: boolean;
 | 
				
			||||||
    message: string;
 | 
					    message: string;
 | 
				
			||||||
@@ -25,37 +26,56 @@ interface Archievement
 | 
				
			|||||||
    backward_list: 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
 | 
					function queryDepartmentArchievement( departmentInfo: Department, render: any ): void
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    // 默认的部门业绩对象
 | 
				
			||||||
 | 
					    const archievement: DepartmentArchievement = {
 | 
				
			||||||
 | 
					        success: false,
 | 
				
			||||||
 | 
					        message: "",
 | 
				
			||||||
 | 
					        total_archievement: 0,
 | 
				
			||||||
 | 
					        mensual_archievement_list: [],
 | 
				
			||||||
 | 
					        insurance_renewal_rate: "",
 | 
				
			||||||
 | 
					        attaching_rate: "",
 | 
				
			||||||
 | 
					        leading_reward_gainers: [],
 | 
				
			||||||
 | 
					        advance_reward_gainers: [],
 | 
				
			||||||
 | 
					        backward_list: [],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    instance.request({
 | 
					    instance.request({
 | 
				
			||||||
        method: "post",
 | 
					        method: "post",
 | 
				
			||||||
        url: API_URL.URL_DEPARTMENT_ARCHIEVEMENT,
 | 
					        url: API_URL.URL_DEPARTMENT_ARCHIEVEMENT,
 | 
				
			||||||
        data: departmentInfo,
 | 
					        data: departmentInfo,
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
					        // 请求结束,将请求的结果写入业绩对象,然后调用功能渲染函数。
 | 
				
			||||||
        .then(( response ) =>
 | 
					        .then(( response ) =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            const archievement: Archievement = {
 | 
					 | 
				
			||||||
                success: false,
 | 
					 | 
				
			||||||
                message: "",
 | 
					 | 
				
			||||||
                total_archievement: 0,
 | 
					 | 
				
			||||||
                mensual_archievement_list: [],
 | 
					 | 
				
			||||||
                insurance_renewal_rate: "",
 | 
					 | 
				
			||||||
                attaching_rate: "",
 | 
					 | 
				
			||||||
                leading_reward_gainers: [],
 | 
					 | 
				
			||||||
                advance_reward_gainers: [],
 | 
					 | 
				
			||||||
                backward_list: [],
 | 
					 | 
				
			||||||
            };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            const data = response.data ?? {};
 | 
					            const data = response.data ?? {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            archievement.success = data.success ?? false;
 | 
					            archievement.success = data.success ?? false;
 | 
				
			||||||
            archievement.message = data.message ?? "";
 | 
					            archievement.message = data.message ?? "服务器没有返回调用结果消息,请检查日志!";
 | 
				
			||||||
            archievement.total_archievement = data.total_archievement;
 | 
					            archievement.total_archievement = data.total_archievement;
 | 
				
			||||||
            // archievement.mensual_archievement_list = data.mensual_archievement_list ?? [];
 | 
					 | 
				
			||||||
            archievement.mensual_archievement_list = [];
 | 
					            archievement.mensual_archievement_list = [];
 | 
				
			||||||
            archievement.insurance_renewal_rate = data.insurance_renewal_rate ?? "0.0";
 | 
					            archievement.insurance_renewal_rate = data.insurance_renewal_rate ?? "0.0";
 | 
				
			||||||
            archievement.attaching_rate = data.attaching_rate ?? "0.0";
 | 
					            archievement.attaching_rate = data.attaching_rate ?? "0.0";
 | 
				
			||||||
@@ -72,13 +92,162 @@ function queryDepartmentArchievement( departmentInfo: Department, render: any ):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            console.log( "每月业绩", archievement );
 | 
					            console.log( "每月业绩", archievement );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // 渲染数据
 | 
					            // 调用渲染函数
 | 
				
			||||||
            render( archievement );
 | 
					            if ( render !== undefined )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                render( archievement );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
 | 
					        // 请求失败,将失败原因写入业绩对象,调用渲染函数
 | 
				
			||||||
        .catch(( error ) =>
 | 
					        .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 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 排序一下
 | 
				
			||||||
 | 
					            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
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -32,6 +32,9 @@ interface RankingListResponse
 | 
				
			|||||||
    renewalRateRankingList: RankingListItem[];
 | 
					    renewalRateRankingList: RankingListItem[];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 判断用的正则表达式
 | 
				
			||||||
 | 
					const regexMonth = "(0[1-9])|(1[0-2])";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 请求坐席排行榜。
 | 
					 * 请求坐席排行榜。
 | 
				
			||||||
 * @param reqParam 请求参数
 | 
					 * @param reqParam 请求参数
 | 
				
			||||||
@@ -53,6 +56,9 @@ function requestRankingList( reqParam: RankingListRequest, rander: any ): void /
 | 
				
			|||||||
        renewalRateRankingList: [],
 | 
					        renewalRateRankingList: [],
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 检查请求参数
 | 
				
			||||||
 | 
					    // TODO: 这里要加一个对month的正则表达式验证。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    instance.request(
 | 
					    instance.request(
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            method: "post",
 | 
					            method: "post",
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										346
									
								
								code/web/task_schedule/src/utils/reward.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										346
									
								
								code/web/task_schedule/src/utils/reward.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,346 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @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.js";
 | 
				
			||||||
 | 
					import { API_URL } from "./api/config.js";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 ?? []);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            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 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            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: "",
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    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;
 | 
					    height: 2000px;
 | 
				
			||||||
    width: 2000px;
 | 
					    width: 2000px;
 | 
				
			||||||
    background-color: aquamarine;
 | 
					    // background-color: aquamarine;
 | 
				
			||||||
    padding: 0px;
 | 
					    padding: 0px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,35 +48,22 @@
 | 
				
			|||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="right-wrapper">
 | 
					        <div class="right-wrapper">
 | 
				
			||||||
            <h1>本大爷</h1>
 | 
					            <CallerArchievementComponent
 | 
				
			||||||
            <div class="carousel-item">
 | 
					                :caller-name="callerInfo.telSalerName"
 | 
				
			||||||
                <el-carousel
 | 
					                :this-month-premium="ui.callerPersentMonthPremium"
 | 
				
			||||||
                    arrow="never"
 | 
					                :attaching-rate="ui.callerAttachingRate"
 | 
				
			||||||
                    indicator-position="none"
 | 
					                :renewal-rate="ui.callerRenewalRate"
 | 
				
			||||||
                    :interval="4000"
 | 
					            />
 | 
				
			||||||
                >
 | 
					
 | 
				
			||||||
                    <el-carousel-item :key="1">
 | 
					            <RankingListComponent
 | 
				
			||||||
                        <RankingListComponent :ranking-list="ui.attachingRankingList" />
 | 
					                title="渗透率"
 | 
				
			||||||
                    </el-carousel-item>
 | 
					                :ranking-list="ui.attachingRankingList"
 | 
				
			||||||
                    <el-carousel-item :key="2">
 | 
					            />
 | 
				
			||||||
                        <RankingListComponent :ranking-list="ui.renewalRankingList" />
 | 
					
 | 
				
			||||||
                    </el-carousel-item>
 | 
					            <RankingListComponent
 | 
				
			||||||
                </el-carousel>
 | 
					                title="续保率"
 | 
				
			||||||
            </div>
 | 
					                :ranking-list="ui.renewalRankingList"
 | 
				
			||||||
            <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>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -88,10 +75,12 @@ import { getCallerInfo } from "@/utils/api/localStorage.js";
 | 
				
			|||||||
import { ElMessage } from "element-plus";
 | 
					import { ElMessage } from "element-plus";
 | 
				
			||||||
import
 | 
					import
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    type Archievement,
 | 
					    type DepartmentArchievement,
 | 
				
			||||||
    queryDepartmentArchievement
 | 
					    type CallerArchievement,
 | 
				
			||||||
 | 
					    queryDepartmentArchievement,
 | 
				
			||||||
 | 
					    queryCallerArchievement
 | 
				
			||||||
} from "@/utils/archievement.js";
 | 
					} from "@/utils/archievement.js";
 | 
				
			||||||
import { RankingListItem } from "@/types/cpicxim/RankingListItem.js";
 | 
					import { type RankingListItem } from "@/types/cpicxim/RankingListItem.js";
 | 
				
			||||||
import
 | 
					import
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    type RankingListRequest,
 | 
					    type RankingListRequest,
 | 
				
			||||||
@@ -104,6 +93,7 @@ import ArchievementCompleteRateComponent from "@/components/ArchievementComplete
 | 
				
			|||||||
import HonorListComponent from "@/components/HonorListComponent.vue";
 | 
					import HonorListComponent from "@/components/HonorListComponent.vue";
 | 
				
			||||||
import DishonorListComponent from "@/components/DishonorListComponent.vue";
 | 
					import DishonorListComponent from "@/components/DishonorListComponent.vue";
 | 
				
			||||||
import RankingListComponent from "@/components/RankingListComponent.vue";
 | 
					import RankingListComponent from "@/components/RankingListComponent.vue";
 | 
				
			||||||
 | 
					import CallerArchievementComponent from "@/components/CallerArchievementComponent.vue";
 | 
				
			||||||
import { logout } from "@/utils/account.js";
 | 
					import { logout } from "@/utils/account.js";
 | 
				
			||||||
import { type TelSaler } from "@/types/cpicxim/TelSaler";
 | 
					import { type TelSaler } from "@/types/cpicxim/TelSaler";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -120,6 +110,9 @@ interface ui
 | 
				
			|||||||
    showUI: boolean; // 用来刷新页面的开关
 | 
					    showUI: boolean; // 用来刷新页面的开关
 | 
				
			||||||
    attachingRankingList: RankingListItem[]; // 坐席车非渗透率榜单
 | 
					    attachingRankingList: RankingListItem[]; // 坐席车非渗透率榜单
 | 
				
			||||||
    renewalRankingList: RankingListItem[];
 | 
					    renewalRankingList: RankingListItem[];
 | 
				
			||||||
 | 
					    callerAttachingRate: string;
 | 
				
			||||||
 | 
					    callerRenewalRate: string;
 | 
				
			||||||
 | 
					    callerPersentMonthPremium: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
@@ -130,10 +123,15 @@ export default {
 | 
				
			|||||||
        HonorListComponent,
 | 
					        HonorListComponent,
 | 
				
			||||||
        DishonorListComponent,
 | 
					        DishonorListComponent,
 | 
				
			||||||
        RankingListComponent,
 | 
					        RankingListComponent,
 | 
				
			||||||
 | 
					        CallerArchievementComponent,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    setup()
 | 
					    setup()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        const monthIndex = new Date();
 | 
					        const monthIndex = new Date();
 | 
				
			||||||
 | 
					        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 numInChinese = [
 | 
				
			||||||
            "一",
 | 
					            "一",
 | 
				
			||||||
            "二",
 | 
					            "二",
 | 
				
			||||||
@@ -162,10 +160,13 @@ export default {
 | 
				
			|||||||
            showUI: true, // 用来刷新页面的开关
 | 
					            showUI: true, // 用来刷新页面的开关
 | 
				
			||||||
            attachingRankingList: [], // 坐席车非渗透率榜单
 | 
					            attachingRankingList: [], // 坐席车非渗透率榜单
 | 
				
			||||||
            renewalRankingList: [], // 坐席续保率榜单
 | 
					            renewalRankingList: [], // 坐席续保率榜单
 | 
				
			||||||
 | 
					            callerAttachingRate: "0.0",
 | 
				
			||||||
 | 
					            callerRenewalRate: "0.0",
 | 
				
			||||||
 | 
					            callerPersentMonthPremium: 0,
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        let timerHandler = 0;
 | 
					        let timerHandler = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const getTotalArchievement = computed(() =>
 | 
					        const getTotalArchievement = computed((): string =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            const cnyFormat = new Intl.NumberFormat( "zh-cn", {
 | 
					            const cnyFormat = new Intl.NumberFormat( "zh-cn", {
 | 
				
			||||||
                style: "currency",
 | 
					                style: "currency",
 | 
				
			||||||
@@ -177,13 +178,28 @@ export default {
 | 
				
			|||||||
            return archievement;
 | 
					            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 = data.attaching_rate;
 | 
				
			||||||
            ui.insurance_renewal_rate = data.insurance_renewal_rate;
 | 
					            ui.insurance_renewal_rate = data.insurance_renewal_rate;
 | 
				
			||||||
            ui.leading_reward_gainers = data.leading_reward_gainers;
 | 
					            ui.leading_reward_gainers = data.leading_reward_gainers;
 | 
				
			||||||
@@ -200,6 +216,40 @@ export default {
 | 
				
			|||||||
            }, 0 );
 | 
					            }, 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 =>
 | 
					        const applyRankingListData = ( data: RankingListResponse ): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            ui.attachingRankingList = data.attachingRateRankingList;
 | 
					            ui.attachingRankingList = data.attachingRateRankingList;
 | 
				
			||||||
@@ -218,7 +268,7 @@ export default {
 | 
				
			|||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 退出桌面霸屏
 | 
					        // 退出桌面霸屏
 | 
				
			||||||
        const logoutDesktopArchievement = () =>
 | 
					        const logoutDesktopArchievement = (): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            console.log( "111" );
 | 
					            console.log( "111" );
 | 
				
			||||||
            logout();
 | 
					            logout();
 | 
				
			||||||
@@ -235,13 +285,13 @@ export default {
 | 
				
			|||||||
                center: true,
 | 
					                center: true,
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            router.push( "/login" );
 | 
					            router.push( "/login" ).then(() => {}).catch(() => {});
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /**
 | 
					        /**
 | 
				
			||||||
         * 刷新页面
 | 
					         * 用于定时对页面进行刷新,其中会请求最新的业绩数据。
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        const refresh = () =>
 | 
					        const refresh = (): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            const deparmentInfo: Department = {
 | 
					            const deparmentInfo: Department = {
 | 
				
			||||||
                departmentCode: callerInfo.departmentCode,
 | 
					                departmentCode: callerInfo.departmentCode,
 | 
				
			||||||
@@ -250,11 +300,14 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            const rankinglistRequest: RankingListRequest = {
 | 
					            const rankinglistRequest: RankingListRequest = {
 | 
				
			||||||
                departmentCode: callerInfo.departmentCode,
 | 
					                departmentCode: callerInfo.departmentCode,
 | 
				
			||||||
                year: "2023",
 | 
					                year: thisYearString,
 | 
				
			||||||
                month: "06",
 | 
					                month: thisMonthString,
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            queryDepartmentArchievement( deparmentInfo, applyArchievementData );
 | 
					            console.log( "refresh", rankinglistRequest );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            queryDepartmentArchievement( deparmentInfo, applyDepartmentArchievementData );
 | 
				
			||||||
 | 
					            queryCallerArchievement( callerInfo, applyCallerArchievementData );
 | 
				
			||||||
            requestRankingList( rankinglistRequest, applyRankingListData );
 | 
					            requestRankingList( rankinglistRequest, applyRankingListData );
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -283,7 +336,7 @@ export default {
 | 
				
			|||||||
            callerInfo,
 | 
					            callerInfo,
 | 
				
			||||||
            timerHandler,
 | 
					            timerHandler,
 | 
				
			||||||
            getTotalArchievement,
 | 
					            getTotalArchievement,
 | 
				
			||||||
            renderData: applyArchievementData,
 | 
					            renderData: applyDepartmentArchievementData,
 | 
				
			||||||
            refresh,
 | 
					            refresh,
 | 
				
			||||||
            logoutDesktopArchievement,
 | 
					            logoutDesktopArchievement,
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
@@ -433,11 +486,19 @@ export default {
 | 
				
			|||||||
        width: 300px;
 | 
					        width: 300px;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    >div {
 | 
					    .carousel-item {
 | 
				
			||||||
 | 
					        // 为了限制走马灯组件的高度
 | 
				
			||||||
        display: block;
 | 
					        display: block;
 | 
				
			||||||
        height: 260px;
 | 
					        height: 260px;
 | 
				
			||||||
        width: 300px;
 | 
					        width: 300px;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // >div {
 | 
				
			||||||
 | 
					    //     // 为了限制走马灯组件的高度
 | 
				
			||||||
 | 
					    //     display: block;
 | 
				
			||||||
 | 
					    //     height: 260px;
 | 
				
			||||||
 | 
					    //     width: 300px;
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
<style lang="scss">
 | 
					<style lang="scss">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,7 +71,7 @@ import { saveStaffInfo, getUserType, saveUserType, getCallerInfo, saveCallerInfo
 | 
				
			|||||||
import { login, loginCaller, type LoginCallerInfo, type LoginCallerResult } from "@/utils/account";
 | 
					import { login, loginCaller, type LoginCallerInfo, type LoginCallerResult } from "@/utils/account";
 | 
				
			||||||
import { ElMessage } from "element-plus";
 | 
					import { ElMessage } from "element-plus";
 | 
				
			||||||
import { StaffInfo } from "@/types/cpicxim/StaffInfo";
 | 
					import { StaffInfo } from "@/types/cpicxim/StaffInfo";
 | 
				
			||||||
import { TelSaler } from "@/types/cpicxim/TelSaler";
 | 
					import { type TelSaler } from "@/types/cpicxim/TelSaler";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
    name: "LoginPage",
 | 
					    name: "LoginPage",
 | 
				
			||||||
@@ -95,7 +95,7 @@ export default {
 | 
				
			|||||||
        /**
 | 
					        /**
 | 
				
			||||||
         * 保存p13账号
 | 
					         * 保存p13账号
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        const savedP13uid = () =>
 | 
					        const savedP13uid = (): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            window.localStorage.setItem( "stuff_account", ui.account );
 | 
					            window.localStorage.setItem( "stuff_account", ui.account );
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
@@ -103,7 +103,7 @@ export default {
 | 
				
			|||||||
        /**
 | 
					        /**
 | 
				
			||||||
         * 登录函数,根据ui.currentMenu判断登录的是坐席还是员工。
 | 
					         * 登录函数,根据ui.currentMenu判断登录的是坐席还是员工。
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        const onLogin = () =>
 | 
					        const onLogin = (): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // 保存用户类型
 | 
					            // 保存用户类型
 | 
				
			||||||
            saveUserType( ui.currentMenu );
 | 
					            saveUserType( ui.currentMenu );
 | 
				
			||||||
@@ -145,7 +145,7 @@ export default {
 | 
				
			|||||||
                            saveStaffInfo( staffInfo );
 | 
					                            saveStaffInfo( staffInfo );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            // 跳转路由
 | 
					                            // 跳转路由
 | 
				
			||||||
                            router.push( "/desktop" );
 | 
					                            router.push( "/desktop" ).then(() => {}).catch(() => {});
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        else
 | 
					                        else
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
@@ -177,12 +177,12 @@ export default {
 | 
				
			|||||||
                    // 调用接口成功
 | 
					                    // 调用接口成功
 | 
				
			||||||
                    .then(( response ) =>
 | 
					                    .then(( response ) =>
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        const data:LoginCallerResult = response.data ?? { success: false, };
 | 
					                        const data: LoginCallerResult = response.data ?? { success: false, };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        // debugger;
 | 
					                        // debugger;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        // 查看標志位
 | 
					                        // 查看標志位
 | 
				
			||||||
                        if ( data.success === true )
 | 
					                        if ( data.success )
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                            // 查询成功,显示一个提示,保存工号,并跳转路由
 | 
					                            // 查询成功,显示一个提示,保存工号,并跳转路由
 | 
				
			||||||
                            ElMessage({
 | 
					                            ElMessage({
 | 
				
			||||||
@@ -190,7 +190,7 @@ export default {
 | 
				
			|||||||
                                type: "success",
 | 
					                                type: "success",
 | 
				
			||||||
                            });
 | 
					                            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            const telsaler:TelSaler = {
 | 
					                            const telsaler: TelSaler = {
 | 
				
			||||||
                                telSalerCode: data.tel_saler_code,
 | 
					                                telSalerCode: data.tel_saler_code,
 | 
				
			||||||
                                telSalerName: data.tel_saler_name,
 | 
					                                telSalerName: data.tel_saler_name,
 | 
				
			||||||
                                teamCode: data.team_code,
 | 
					                                teamCode: data.team_code,
 | 
				
			||||||
@@ -201,7 +201,7 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                            saveCallerInfo( telsaler );
 | 
					                            saveCallerInfo( telsaler );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            router.push( "/desktop_archievement" );
 | 
					                            router.push( "/desktop_archievement" ).then(() => {}).catch(() => {});
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        else
 | 
					                        else
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
@@ -249,7 +249,7 @@ export default {
 | 
				
			|||||||
                    });
 | 
					                    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    // 跳转路由
 | 
					                    // 跳转路由
 | 
				
			||||||
                    router.push( "/desktop_archievement" );
 | 
					                    router.push( "/desktop_archievement" ).then(() => {}).catch(() => {});
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else if ( staffType === "cpicxim_staff" )
 | 
					            else if ( staffType === "cpicxim_staff" )
 | 
				
			||||||
@@ -258,7 +258,7 @@ export default {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const onToggleMenu = ( type: string ) =>
 | 
					        const onToggleMenu = ( type: string ): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            ui.currentMenu = type;
 | 
					            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>
 | 
				
			||||||
							
								
								
									
										115
									
								
								code/web/task_schedule/src/views/data/DataManagement.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										115
									
								
								code/web/task_schedule/src/views/data/DataManagement.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,115 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @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">
 | 
				
			||||||
 | 
					        <!-- <div class="telsaler-dataupload-wrapper">
 | 
				
			||||||
 | 
					            <el-upload
 | 
				
			||||||
 | 
					                v-model="ui.fileList"
 | 
				
			||||||
 | 
					                drag
 | 
				
			||||||
 | 
					                action="http://localhost:8080/desktop_archievement_backend/file/file-upload.do"
 | 
				
			||||||
 | 
					                :on-preview="handlePreview"
 | 
				
			||||||
 | 
					                :on-remove="handleRemove"
 | 
				
			||||||
 | 
					                :on-success="handleUploadSuccess"
 | 
				
			||||||
 | 
					                :before-remove="beforeRemove"
 | 
				
			||||||
 | 
					                :limit="1"
 | 
				
			||||||
 | 
					                :on-exceed="handleExceed"
 | 
				
			||||||
 | 
					                :data="ui.uploadData"
 | 
				
			||||||
 | 
					                name="files"
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					                <el-button type="primary">
 | 
				
			||||||
 | 
					                    上传
 | 
				
			||||||
 | 
					                </el-button>
 | 
				
			||||||
 | 
					                <template #tip>
 | 
				
			||||||
 | 
					                    <div class="el-upload__tip">
 | 
				
			||||||
 | 
					                        文件不能大于100MB。
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					                </template>
 | 
				
			||||||
 | 
					            </el-upload>
 | 
				
			||||||
 | 
					        </div> -->
 | 
				
			||||||
 | 
					        <el-tabs>
 | 
				
			||||||
 | 
					            <el-tab-pane label="坐席车非渗透率">
 | 
				
			||||||
 | 
					                <TelsalerAttachingRateView />
 | 
				
			||||||
 | 
					            </el-tab-pane>
 | 
				
			||||||
 | 
					            <el-tab-pane label="坐席续保率">
 | 
				
			||||||
 | 
					                坐席车非渗透率
 | 
				
			||||||
 | 
					            </el-tab-pane>
 | 
				
			||||||
 | 
					            <el-tab-pane label="机构">
 | 
				
			||||||
 | 
					                坐席车非渗透率
 | 
				
			||||||
 | 
					            </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";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    name: "DataManagement",
 | 
				
			||||||
 | 
					    components: { TelsalerAttachingRateView, },
 | 
				
			||||||
 | 
					    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>
 | 
				
			||||||
							
								
								
									
										238
									
								
								code/web/task_schedule/src/views/data/bi/BiDataUploadView.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										238
									
								
								code/web/task_schedule/src/views/data/bi/BiDataUploadView.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,238 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-17 10:56:43
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /task_schedule/src/views/data/bi/BiDataUploadView.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="http://222.76.244.118:11101/desktop_archievement_backend/file/file-upload.do"
 | 
				
			||||||
 | 
					            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, ref } from "vue";
 | 
				
			||||||
 | 
					import {
 | 
				
			||||||
 | 
					    type BIReportType,
 | 
				
			||||||
 | 
					    type ImportBIReportRequest,
 | 
				
			||||||
 | 
					    type ImportBIReportResponse,
 | 
				
			||||||
 | 
					    type ImportBIReportResponseHandler,
 | 
				
			||||||
 | 
					    importBIReport
 | 
				
			||||||
 | 
					} from "@/utils/BIReport.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,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    name: "BiDataUploadView",
 | 
				
			||||||
 | 
					    props: {
 | 
				
			||||||
 | 
					        reportType: {
 | 
				
			||||||
 | 
					            type: Number,
 | 
				
			||||||
 | 
					            require: true,
 | 
				
			||||||
 | 
					            default: (): number => -9999,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    setup()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        const ui: UI = reactive({
 | 
				
			||||||
 | 
					            showUI: false,
 | 
				
			||||||
 | 
					            selectedReportType: 0,
 | 
				
			||||||
 | 
					            reportType: [
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    reportTypeCode: 0,
 | 
				
			||||||
 | 
					                    reportTypeName: "坐席车非渗透率",
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    reportTypeCode: 1,
 | 
				
			||||||
 | 
					                    reportTypeName: "坐席续保率",
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    reportTypeCode: 2,
 | 
				
			||||||
 | 
					                    reportTypeName: "部门车非渗透率",
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    reportTypeCode: 3,
 | 
				
			||||||
 | 
					                    reportTypeName: "当月个车续保率跟踪报表【机构】",
 | 
				
			||||||
 | 
					                },],
 | 
				
			||||||
 | 
					            sheetIndex: 0,
 | 
				
			||||||
 | 
					            firstRow: 2,
 | 
				
			||||||
 | 
					            hasCaption: true,
 | 
				
			||||||
 | 
					            uploadParameters: {
 | 
				
			||||||
 | 
					                "task-name": "1234",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            showFileList: false,
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /**
 | 
				
			||||||
 | 
					         * 文件上传成功响应函数
 | 
				
			||||||
 | 
					         * @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 );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        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,31 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-17 14:53:17
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /task_schedule/src/views/data/bi/DepartmentArchievementView.vue
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved.
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					    <div class="wrapper" />
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script lang="ts">
 | 
				
			||||||
 | 
					import { reactive } from "vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    name: "DepartmentArchievementView",
 | 
				
			||||||
 | 
					    setup()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        const ui = reactive({
 | 
				
			||||||
 | 
					            showUI: true,
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.wrapper {
 | 
				
			||||||
 | 
					    margin: 10px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -0,0 +1,142 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @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-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					        <el-table
 | 
				
			||||||
 | 
					            border
 | 
				
			||||||
 | 
					            stripe
 | 
				
			||||||
 | 
					            style="width:100%;"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					            <el-table-column
 | 
				
			||||||
 | 
					                type="selection"
 | 
				
			||||||
 | 
					                align="center"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					            <el-table-column
 | 
				
			||||||
 | 
					                label="部门"
 | 
				
			||||||
 | 
					                align="center"
 | 
				
			||||||
 | 
					                width="200"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					            <el-table-column
 | 
				
			||||||
 | 
					                label="名称"
 | 
				
			||||||
 | 
					                align="center"
 | 
				
			||||||
 | 
					                width="200"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					            <el-table-column
 | 
				
			||||||
 | 
					                label="车险保费(万)"
 | 
				
			||||||
 | 
					                align="center"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					            <el-table-column
 | 
				
			||||||
 | 
					                label="非车险保费(万)"
 | 
				
			||||||
 | 
					                align="center"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					            <el-table-column
 | 
				
			||||||
 | 
					                label="当月保费渗透率"
 | 
				
			||||||
 | 
					                align="center"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					            <el-table-column
 | 
				
			||||||
 | 
					                label="渗透率环比上月"
 | 
				
			||||||
 | 
					                align="center"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					        </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"
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					                <BiDataUploadView />
 | 
				
			||||||
 | 
					            </el-dialog>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script lang="ts">
 | 
				
			||||||
 | 
					import { reactive } from "vue";
 | 
				
			||||||
 | 
					import BiDataUploadView from "@/views/data/bi/BiDataUploadView.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    name: "TelsalerAttachingRateView",
 | 
				
			||||||
 | 
					    components: { BiDataUploadView, },
 | 
				
			||||||
 | 
					    setup()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        const ui = reactive({
 | 
				
			||||||
 | 
					            showUI: true,
 | 
				
			||||||
 | 
					            showUploadDialog: false,
 | 
				
			||||||
 | 
					            tableCurrentPageIndex: 1,
 | 
				
			||||||
 | 
					            tablePageSize: 10,
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        const showUploadFileDialog = (): void =>
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            ui.showUploadDialog = true;
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        const onCurrentPageIndexChange = ( index: number ): void =>
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            ui.tableCurrentPageIndex = index;
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        const onTablePageSizeChange = ( pageSize: number ): void =>
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            ui.tablePageSize = pageSize;
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return {
 | 
				
			||||||
 | 
					            ui,
 | 
				
			||||||
 | 
					            showUploadFileDialog,
 | 
				
			||||||
 | 
					            onCurrentPageIndexChange,
 | 
				
			||||||
 | 
					            onTablePageSizeChange,
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.wrapper {
 | 
				
			||||||
 | 
					    margin: 10px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    >*+* {
 | 
				
			||||||
 | 
					        margin-top: 10px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.pagination_wrapper {
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    justify-content: flex-end;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					src/views/data/bi/TelsalerAttachingRateView.vue<!--
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-17 14:41:39
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /task_schedule/src/views/data/TelsalerAttachingRateView.vue
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved.
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					    <div class="wrapper" />
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script lang="ts">
 | 
				
			||||||
 | 
					import { reactive } from "vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    name: "TelsalerAttachingRateView",
 | 
				
			||||||
 | 
					    setup()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        const ui = reactive({
 | 
				
			||||||
 | 
					            showUI: true,
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.wrapper {
 | 
				
			||||||
 | 
					    margin: 10px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</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,7 +2,7 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2023-03-23 16:05:08
 | 
					 * @Date: 2023-03-23 16:05:08
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @FilePath: /task_schedule/src/views/StaffManagement.vue
 | 
					 * @FilePath: /task_schedule/src/views/telsaler/TelsalerManagement.vue
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
				
			||||||
@@ -107,7 +107,7 @@
 | 
				
			|||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
import { reactive, computed } from "vue";
 | 
					import { reactive, computed } from "vue";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
    name: "StaffManagement",
 | 
					    name: "TelsalerManagement",
 | 
				
			||||||
    setup()
 | 
					    setup()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        const ui = reactive({
 | 
					        const ui = reactive({
 | 
				
			||||||
@@ -120,7 +120,7 @@ export default {
 | 
				
			|||||||
            callers: [],
 | 
					            callers: [],
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const onCurrentPageIndexChange = ( pageIndex: number ) =>
 | 
					        const onCurrentPageIndexChange = ( pageIndex: number ): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            ui.table_current_page_index = pageIndex;
 | 
					            ui.table_current_page_index = pageIndex;
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
@@ -129,7 +129,7 @@ export default {
 | 
				
			|||||||
         * 设置表格每页显示记录的数量
 | 
					         * 设置表格每页显示记录的数量
 | 
				
			||||||
         * @param pageSize 表格页记录数量
 | 
					         * @param pageSize 表格页记录数量
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        const onTablePageSizeChange = ( pageSize: number ) =>
 | 
					        const onTablePageSizeChange = ( pageSize: number ): void =>
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            ui.table_page_size = pageSize;
 | 
					            ui.table_page_size = pageSize;
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
@@ -150,16 +150,9 @@ export default {
 | 
				
			|||||||
@import "@/assets/css/public/_public.scss";
 | 
					@import "@/assets/css/public/_public.scss";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.wrapper {
 | 
					.wrapper {
 | 
				
			||||||
    margin: 10px;
 | 
					 | 
				
			||||||
    padding: 10px;
 | 
					    padding: 10px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    background-color: #fff;
 | 
					    background-color: #fff;
 | 
				
			||||||
    border-radius: 5px;
 | 
					 | 
				
			||||||
    box-shadow: $box-shadow;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    &:hover {
 | 
					 | 
				
			||||||
        box-shadow: $box-shadow-hover;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    min-width: 800px;
 | 
					    min-width: 800px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -188,4 +181,5 @@ export default {
 | 
				
			|||||||
    display: flex;
 | 
					    display: flex;
 | 
				
			||||||
    justify-content: flex-end;
 | 
					    justify-content: flex-end;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</style>
 | 
					</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>
 | 
				
			||||||
@@ -35,6 +35,7 @@
 | 
				
			|||||||
        ]
 | 
					        ]
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "include": [
 | 
					    "include": [
 | 
				
			||||||
 | 
					        "src/**/*",
 | 
				
			||||||
        "src/**/*.ts",
 | 
					        "src/**/*.ts",
 | 
				
			||||||
        "src/**/*.tsx",
 | 
					        "src/**/*.tsx",
 | 
				
			||||||
        "src/**/*.vue",
 | 
					        "src/**/*.vue",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,8 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "java.configuration.updateBuildConfiguration": "automatic",
 | 
					    "java.configuration.updateBuildConfiguration": "automatic",
 | 
				
			||||||
    "java.compile.nullAnalysis.mode": "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"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										6
									
								
								code/后端/desktop_archievement_backend/package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								code/后端/desktop_archievement_backend/package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					  "name": "desktop_archievement_backend",
 | 
				
			||||||
 | 
					  "lockfileVersion": 3,
 | 
				
			||||||
 | 
					  "requires": true,
 | 
				
			||||||
 | 
					  "packages": {}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -14,6 +14,7 @@
 | 
				
			|||||||
    <maven.compiler.source>17</maven.compiler.source>
 | 
					    <maven.compiler.source>17</maven.compiler.source>
 | 
				
			||||||
    <maven.compiler.target>17</maven.compiler.target>
 | 
					    <maven.compiler.target>17</maven.compiler.target>
 | 
				
			||||||
    <spring.version>5.3.24</spring.version>
 | 
					    <spring.version>5.3.24</spring.version>
 | 
				
			||||||
 | 
					    <log4j2.version>2.20.0</log4j2.version>
 | 
				
			||||||
    <!-- <spring.version>6.0.11</spring.version> -->
 | 
					    <!-- <spring.version>6.0.11</spring.version> -->
 | 
				
			||||||
  </properties>
 | 
					  </properties>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -116,16 +117,46 @@
 | 
				
			|||||||
      <artifactId>log4j-slf4j2-impl</artifactId>
 | 
					      <artifactId>log4j-slf4j2-impl</artifactId>
 | 
				
			||||||
      <version>2.20.0</version>
 | 
					      <version>2.20.0</version>
 | 
				
			||||||
    </dependency>
 | 
					    </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>
 | 
					    <dependency>
 | 
				
			||||||
      <groupId>org.mybatis</groupId>
 | 
					      <groupId>org.mybatis</groupId>
 | 
				
			||||||
      <artifactId>mybatis</artifactId>
 | 
					      <artifactId>mybatis</artifactId>
 | 
				
			||||||
      <version>3.5.13</version>
 | 
					      <version>3.5.13</version>
 | 
				
			||||||
    </dependency>
 | 
					    </dependency>
 | 
				
			||||||
 | 
					 | 
				
			||||||
  </dependencies>
 | 
					  </dependencies>
 | 
				
			||||||
  <build>
 | 
					  <build>
 | 
				
			||||||
    <finalName>desktop_archievement_backend</finalName>
 | 
					    <finalName>desktop_archievement_backend</finalName>
 | 
				
			||||||
 | 
					    <resources>
 | 
				
			||||||
 | 
					      <resource>
 | 
				
			||||||
 | 
					        <directory>src/main/resources</directory>
 | 
				
			||||||
 | 
					        <includes>
 | 
				
			||||||
 | 
					          <include>**/*.properties</include>
 | 
				
			||||||
 | 
					          <include>**/*.xml</include>
 | 
				
			||||||
 | 
					        </includes>
 | 
				
			||||||
 | 
					        <filtering>false</filtering>
 | 
				
			||||||
 | 
					      </resource>
 | 
				
			||||||
 | 
					    </resources>
 | 
				
			||||||
    <plugins>
 | 
					    <plugins>
 | 
				
			||||||
      <plugin>
 | 
					      <plugin>
 | 
				
			||||||
        <groupId>org.apache.maven.plugins</groupId>
 | 
					        <groupId>org.apache.maven.plugins</groupId>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,4 +14,6 @@ import java.util.HashMap;
 | 
				
			|||||||
public interface ArchievementMapper
 | 
					public interface ArchievementMapper
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public void getDepartmentArchievement( HashMap<String, Object> params );
 | 
					    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,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,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,214 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @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 环比上月, int 平均提前签单天数, 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.环比上月 = 环比上月;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public int get平均提前签单天数()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return 平均提前签单天数;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void set平均提前签单天数( int 平均提前签单天数 )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        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));
 | 
				
			||||||
 | 
					        result = prime * result + 平均提前签单天数;
 | 
				
			||||||
 | 
					        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;
 | 
				
			||||||
 | 
					        if ( 平均提前签单天数 != other.平均提前签单天数 )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( Double.doubleToLongBits( 环比 ) != Double.doubleToLongBits( other.环比 ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "BIDepartmentRenewalRateRecord [责任部门=" + 责任部门 + ", 机构目标值=" + 机构目标值 + ", 到期数全月="
 | 
				
			||||||
 | 
					                + 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时 + ", 个车续保率全月=" + 个车续保率全月
 | 
				
			||||||
 | 
					                + ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + ", 平均提前签单天数=" + 平均提前签单天数 + ", 环比=" + 环比
 | 
				
			||||||
 | 
					                + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,311 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @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 java.time.LocalDate;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class BITelsalerAttachingRateRecord
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    // 部门
 | 
				
			||||||
 | 
					    @JsonProperty( "departmentName" )
 | 
				
			||||||
 | 
					    private String departmentName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 统计日期
 | 
				
			||||||
 | 
					    @JsonProperty( "summaryDate" )
 | 
				
			||||||
 | 
					    private LocalDate summaryDate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 坐席名称
 | 
				
			||||||
 | 
					    @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( "customerHandleRateCell" )
 | 
				
			||||||
 | 
					    private double customerHandleRate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 客户渗透率环比上月
 | 
				
			||||||
 | 
					    @JsonProperty( "customerHandleRateChangeCell" )
 | 
				
			||||||
 | 
					    private double customerHandleRateChange;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 当月车非客均保费
 | 
				
			||||||
 | 
					    @JsonProperty( "noMotoPremiumPerCustomerCell" )
 | 
				
			||||||
 | 
					    private double noMotoPremiumPerCustomer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 客均保费环比上月
 | 
				
			||||||
 | 
					    @JsonProperty( "noMotoPremiumPerCustomerChangeCell" )
 | 
				
			||||||
 | 
					    private double noMotoPremiumPerCustomerChange;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public BITelsalerAttachingRateRecord( String departmentName, LocalDate summaryDate,
 | 
				
			||||||
 | 
					            String telsalerName, double motoPremium, double nomotoPremium,
 | 
				
			||||||
 | 
					            double motoPremiumProportion, double attachingRate, double attachingRateChange,
 | 
				
			||||||
 | 
					            double customerHandleRate, double customerHandleRateChange,
 | 
				
			||||||
 | 
					            double noMotoPremiumPerCustomer, double noMotoPremiumPerCustomerChange )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.departmentName = departmentName;
 | 
				
			||||||
 | 
					        this.summaryDate = summaryDate;
 | 
				
			||||||
 | 
					        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="
 | 
				
			||||||
 | 
					                + 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 + ((summaryDate == null) ? 0 : summaryDate.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 ( summaryDate == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.summaryDate != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !summaryDate.equals( other.summaryDate ) )
 | 
				
			||||||
 | 
					            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 LocalDate getSummaryDate()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return summaryDate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setSummaryDate( LocalDate summaryDate )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.summaryDate = summaryDate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    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,236 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @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 环比上月,
 | 
				
			||||||
 | 
					            double 平均提前签单天数, double 环比 )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.责任部门 = 责任部门;
 | 
				
			||||||
 | 
					        this.责任人 = 责任人;
 | 
				
			||||||
 | 
					        this.机构目标值 = 机构目标值;
 | 
				
			||||||
 | 
					        this.到期数全月 = 到期数全月;
 | 
				
			||||||
 | 
					        this.序时到期数占比 = 序时到期数占比;
 | 
				
			||||||
 | 
					        this.个车续保率序时 = 个车续保率序时;
 | 
				
			||||||
 | 
					        this.个车续保率全月 = 个车续保率全月;
 | 
				
			||||||
 | 
					        this.环比昨日 = 环比昨日;
 | 
				
			||||||
 | 
					        this.环比上月 = 环比上月;
 | 
				
			||||||
 | 
					        this.平均提前签单天数 = 平均提前签单天数;
 | 
				
			||||||
 | 
					        this.环比 = 环比;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public double get平均提前签单天数()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return 平均提前签单天数;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void set平均提前签单天数( double 平均提前签单天数 )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.平均提前签单天数 = 平均提前签单天数;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public double get环比()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return 环比;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void set环比( double 环比 )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.环比 = 环比;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String get责任部门()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        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));
 | 
				
			||||||
 | 
					        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;
 | 
				
			||||||
 | 
					        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.环比上月 = 环比上月;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -22,8 +22,6 @@ public class MensualArchievementItem
 | 
				
			|||||||
        this.premium = premium;
 | 
					        this.premium = premium;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public int getMonth()
 | 
					    public int getMonth()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return month;
 | 
					        return month;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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,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;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -13,13 +13,15 @@ import java.io.IOException;
 | 
				
			|||||||
import java.io.InputStream;
 | 
					import java.io.InputStream;
 | 
				
			||||||
import java.util.HashMap;
 | 
					import java.util.HashMap;
 | 
				
			||||||
import org.apache.ibatis.io.Resources;
 | 
					import org.apache.ibatis.io.Resources;
 | 
				
			||||||
 | 
					import org.apache.ibatis.session.ExecutorType;
 | 
				
			||||||
import org.apache.ibatis.session.SqlSession;
 | 
					import org.apache.ibatis.session.SqlSession;
 | 
				
			||||||
import org.apache.ibatis.session.SqlSessionFactory;
 | 
					import org.apache.ibatis.session.SqlSessionFactory;
 | 
				
			||||||
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
 | 
					import org.apache.ibatis.session.SqlSessionFactoryBuilder;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class MybatisUtils
 | 
					public class MybatisUtils
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    private static HashMap<String, SqlSession> SessionMap = new HashMap<>();
 | 
					    private static HashMap<String, SqlSession> SessionMap = new HashMap<>(5);
 | 
				
			||||||
 | 
					    private static HashMap<String, SqlSession> SessionMapBatch = new HashMap<>(5);
 | 
				
			||||||
    private static String DEFAULT_CONFIGFILE = "mybatis/mybatis-config.xml";
 | 
					    private static String DEFAULT_CONFIGFILE = "mybatis/mybatis-config.xml";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
@@ -28,11 +30,10 @@ public class MybatisUtils
 | 
				
			|||||||
     * @return
 | 
					     * @return
 | 
				
			||||||
     * @throws IOException
 | 
					     * @throws IOException
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static SqlSession getSqlSession(String configFile )
 | 
					    public static SqlSession getSqlSession( String configFile ) throws IOException
 | 
				
			||||||
    throws IOException
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        // 根据配置文件的路径,查找是否已经创建了对应的session
 | 
					        // 根据配置文件的路径,查找是否已经创建了对应的session
 | 
				
			||||||
        SqlSession session = SessionMap.get(configFile);
 | 
					        SqlSession session = SessionMap.get( configFile );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 找到就直接返回
 | 
					        // 找到就直接返回
 | 
				
			||||||
        if ( session != null )
 | 
					        if ( session != null )
 | 
				
			||||||
@@ -41,21 +42,45 @@ public class MybatisUtils
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 没找到就创建一个
 | 
					        // 没找到就创建一个
 | 
				
			||||||
        InputStream configIS = Resources.getResourceAsStream(configFile);
 | 
					        InputStream configIS = Resources.getResourceAsStream( configFile );
 | 
				
			||||||
        SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(configIS);
 | 
					        SqlSessionFactory factory = new SqlSessionFactoryBuilder().build( configIS );
 | 
				
			||||||
        session = factory.openSession();
 | 
					        session = factory.openSession();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 保存
 | 
					        // 保存
 | 
				
			||||||
        SessionMap.put(configFile, session);
 | 
					        SessionMap.put( configFile, session );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return session;
 | 
					        return session;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static SqlSession getSqlSession()
 | 
					    public static SqlSession getSqlSessionBatch( String configFile ) throws IOException
 | 
				
			||||||
    throws IOException
 | 
					    {
 | 
				
			||||||
 | 
					        SqlSession sessionBatch = SessionMapBatch.get( configFile );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ( sessionBatch != null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return sessionBatch;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 没有缓存的就创建一个新的
 | 
				
			||||||
 | 
					        InputStream configIS = Resources.getResourceAsStream( configFile );
 | 
				
			||||||
 | 
					        SqlSessionFactory factory = new SqlSessionFactoryBuilder().build( configIS );
 | 
				
			||||||
 | 
					        sessionBatch = factory.openSession(ExecutorType.BATCH, false );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //保存
 | 
				
			||||||
 | 
					        SessionMapBatch.put( configFile, sessionBatch );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return sessionBatch;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     * @throws IOException
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static SqlSession getSqlSession() throws IOException
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        // 根据配置文件的路径,查找是否已经创建了对应的session
 | 
					        // 根据配置文件的路径,查找是否已经创建了对应的session
 | 
				
			||||||
        SqlSession session = SessionMap.get(DEFAULT_CONFIGFILE);
 | 
					        SqlSession session = SessionMap.get( DEFAULT_CONFIGFILE );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 找到就直接返回
 | 
					        // 找到就直接返回
 | 
				
			||||||
        if ( session != null )
 | 
					        if ( session != null )
 | 
				
			||||||
@@ -64,13 +89,40 @@ public class MybatisUtils
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 没找到就创建一个
 | 
					        // 没找到就创建一个
 | 
				
			||||||
        InputStream configIS = Resources.getResourceAsStream(DEFAULT_CONFIGFILE);
 | 
					        InputStream configIS = Resources.getResourceAsStream( DEFAULT_CONFIGFILE );
 | 
				
			||||||
        SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(configIS);
 | 
					        SqlSessionFactory factory = new SqlSessionFactoryBuilder().build( configIS );
 | 
				
			||||||
        session = factory.openSession();
 | 
					        session = factory.openSession();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // 保存
 | 
					        // 保存
 | 
				
			||||||
        SessionMap.put(DEFAULT_CONFIGFILE, session);
 | 
					        SessionMap.put( DEFAULT_CONFIGFILE, session );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return session;
 | 
					        return session;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 获取一个Batch模式的sqlsession,使用默认路径的mybatis-config.xml文件。
 | 
				
			||||||
 | 
					     * 先判断SessionMapBatch中是否有和配置文件对应的缓存的sqlsession对象,有就直接使用。
 | 
				
			||||||
 | 
					     * 没有就创建一个新的,然后放入SessionMapBatch中。
 | 
				
			||||||
 | 
					     * @return ExecutorType.BATCH模式的sqlsession实例对象
 | 
				
			||||||
 | 
					     * @throws IOException 读取配置文件错误时抛出IOException异常
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static SqlSession getSqlSessionBatch() throws IOException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        SqlSession sessionBatch = SessionMapBatch.get( DEFAULT_CONFIGFILE );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ( sessionBatch != null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return sessionBatch;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 没有缓存的就创建一个新的
 | 
				
			||||||
 | 
					        InputStream configIS = Resources.getResourceAsStream( DEFAULT_CONFIGFILE );
 | 
				
			||||||
 | 
					        SqlSessionFactory factory = new SqlSessionFactoryBuilder().build( configIS );
 | 
				
			||||||
 | 
					        sessionBatch = factory.openSession(ExecutorType.BATCH, false );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //保存
 | 
				
			||||||
 | 
					        SessionMapBatch.put( DEFAULT_CONFIGFILE, sessionBatch );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return sessionBatch;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -9,3 +9,311 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package com.cpic.xim.utils.archievement;
 | 
					package com.cpic.xim.utils.archievement;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import org.apache.ibatis.session.SqlSession;
 | 
				
			||||||
 | 
					import org.slf4j.Logger;
 | 
				
			||||||
 | 
					import org.slf4j.LoggerFactory;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.mapper.ArchievementMapper;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.MensualArchievementItem;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.utils.MybatisUtils;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class CallerArchievement
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    private static Logger logger = LoggerFactory.getLogger( CallerArchievement.class );
 | 
				
			||||||
 | 
					    private static ArrayList<MensualArchievementItem> monthArray = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 静态代码块
 | 
				
			||||||
 | 
					    static
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        // 初始化月份
 | 
				
			||||||
 | 
					        monthArray = new ArrayList<MensualArchievementItem>( 12 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 1, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 2, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 3, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 4, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 5, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 6, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 7, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 8, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 9, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 10, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 11, "0" ) );
 | 
				
			||||||
 | 
					        monthArray.add( new MensualArchievementItem( 12, "0" ) );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static CallerArchievement getCallerArchievement( String callerCode ) throws IOException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        CallerArchievement archievement = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        SqlSession session = MybatisUtils.getSqlSession();
 | 
				
			||||||
 | 
					        ArchievementMapper mapper = session.getMapper( ArchievementMapper.class );
 | 
				
			||||||
 | 
					        HashMap<String, Object> params = new HashMap<String, Object>();
 | 
				
			||||||
 | 
					        Integer totalArchievement = null;
 | 
				
			||||||
 | 
					        double motoPremiumPresentMonth = 0;
 | 
				
			||||||
 | 
					        String attachingRate = null;
 | 
				
			||||||
 | 
					        String renewalRate = null;
 | 
				
			||||||
 | 
					        ArrayList<MensualArchievementItem> mensual = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        params.put( "a_caller_code", callerCode );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        mapper.getCallerArchievement( params );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 总业绩
 | 
				
			||||||
 | 
					        if ( params.get( "a_total" ) instanceof Integer )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            totalArchievement = (Integer) params.get( "a_total" );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            totalArchievement = Integer.valueOf( 0 );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 当月车险保费
 | 
				
			||||||
 | 
					        motoPremiumPresentMonth = ((Double) params.get( "a_present_month" )).doubleValue();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 车非融合
 | 
				
			||||||
 | 
					        if ( params.get( "a_attaching_rate" ) instanceof String )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            attachingRate = (String) params.get( "a_attaching_rate" );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            attachingRate = "0.0";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 续保率
 | 
				
			||||||
 | 
					        if ( params.get( "a_renewal_rate" ) instanceof String )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            renewalRate = (String) params.get( "a_renewal_rate" );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            renewalRate = "0.0";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 处理每月业绩
 | 
				
			||||||
 | 
					        // ArrayList<MensualArchievementItem> mensualList = new
 | 
				
			||||||
 | 
					        // ArrayList<>(CallerArchievement.monthArray);
 | 
				
			||||||
 | 
					        // 数据库接收的每月业绩,要检查是否有缺漏
 | 
				
			||||||
 | 
					        if ( params.get( "a_mensual_cur" ) instanceof ArrayList )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            mensual = (ArrayList<MensualArchievementItem>) params.get( "a_mensual_cur" );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        archievement = new CallerArchievement( callerCode, totalArchievement,
 | 
				
			||||||
 | 
					                motoPremiumPresentMonth, mensual, renewalRate, attachingRate );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return archievement;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static Logger getLogger()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return logger;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static void setLogger( Logger logger )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        CallerArchievement.logger = logger;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static ArrayList<MensualArchievementItem> getMonthArray()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return monthArray;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static void setMonthArray( ArrayList<MensualArchievementItem> monthArray )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        CallerArchievement.monthArray = monthArray;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "caller_code" )
 | 
				
			||||||
 | 
					    private String callerCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "total_archievement" )
 | 
				
			||||||
 | 
					    private long totalArchievement; // 总业绩
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "motoPremiumPresentMonth" )
 | 
				
			||||||
 | 
					    private double motoPremiumPresentMonth; // 当月车险保费
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 每月业绩列表
 | 
				
			||||||
 | 
					    // 要保证数据是按照月份排序。
 | 
				
			||||||
 | 
					    @JsonProperty( "mensual_archievement_list" )
 | 
				
			||||||
 | 
					    private ArrayList<MensualArchievementItem> mensualArchievementList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "insurance_renewal_rate" )
 | 
				
			||||||
 | 
					    private String insuranceRenewalRate; // 续保率
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "attaching_rate" )
 | 
				
			||||||
 | 
					    private String attachingRate; // 车非渗透率
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 构造函数
 | 
				
			||||||
 | 
					     * @param callerCode
 | 
				
			||||||
 | 
					     * @param totalArchievement
 | 
				
			||||||
 | 
					     * @param mensualArchievementList
 | 
				
			||||||
 | 
					     * @param insuranceRenewalRate
 | 
				
			||||||
 | 
					     * @param attachingRate
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public CallerArchievement( String callerCode, long totalArchievement,
 | 
				
			||||||
 | 
					            double motoPremiumPresentMonth,
 | 
				
			||||||
 | 
					            ArrayList<MensualArchievementItem> mensualArchievementList, String insuranceRenewalRate,
 | 
				
			||||||
 | 
					            String attachingRate )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.callerCode = callerCode;
 | 
				
			||||||
 | 
					        this.totalArchievement = totalArchievement;
 | 
				
			||||||
 | 
					        this.motoPremiumPresentMonth = motoPremiumPresentMonth;
 | 
				
			||||||
 | 
					        this.mensualArchievementList = mensualArchievementList;
 | 
				
			||||||
 | 
					        this.insuranceRenewalRate = insuranceRenewalRate;
 | 
				
			||||||
 | 
					        this.attachingRate = attachingRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public CallerArchievement()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.totalArchievement = 0;
 | 
				
			||||||
 | 
					        this.motoPremiumPresentMonth = 0;
 | 
				
			||||||
 | 
					        this.mensualArchievementList = null;
 | 
				
			||||||
 | 
					        this.insuranceRenewalRate = "";
 | 
				
			||||||
 | 
					        this.attachingRate = "";
 | 
				
			||||||
 | 
					        this.callerCode = "";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "CallerArchievement [callerCode=" + callerCode + ", totalArchievement="
 | 
				
			||||||
 | 
					                + totalArchievement + ", motoPremiumPresentMonth=" + motoPremiumPresentMonth
 | 
				
			||||||
 | 
					                + ", mensualArchievementList=" + mensualArchievementList + ", insuranceRenewalRate="
 | 
				
			||||||
 | 
					                + insuranceRenewalRate + ", attachingRate=" + attachingRate + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = 1;
 | 
				
			||||||
 | 
					        result = prime * result + ((callerCode == null) ? 0 : callerCode.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result + (int) (totalArchievement ^ (totalArchievement >>> 32));
 | 
				
			||||||
 | 
					        long temp;
 | 
				
			||||||
 | 
					        temp = Double.doubleToLongBits( motoPremiumPresentMonth );
 | 
				
			||||||
 | 
					        result = prime * result + (int) (temp ^ (temp >>> 32));
 | 
				
			||||||
 | 
					        result = prime * result
 | 
				
			||||||
 | 
					                + ((mensualArchievementList == null) ? 0 : mensualArchievementList.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result
 | 
				
			||||||
 | 
					                + ((insuranceRenewalRate == null) ? 0 : insuranceRenewalRate.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result + ((attachingRate == null) ? 0 : attachingRate.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;
 | 
				
			||||||
 | 
					        CallerArchievement other = (CallerArchievement) obj;
 | 
				
			||||||
 | 
					        if ( callerCode == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.callerCode != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !callerCode.equals( other.callerCode ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( totalArchievement != other.totalArchievement )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( Double.doubleToLongBits( motoPremiumPresentMonth ) != Double
 | 
				
			||||||
 | 
					                .doubleToLongBits( other.motoPremiumPresentMonth ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( mensualArchievementList == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.mensualArchievementList != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !mensualArchievementList.equals( other.mensualArchievementList ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( insuranceRenewalRate == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.insuranceRenewalRate != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !insuranceRenewalRate.equals( other.insuranceRenewalRate ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( attachingRate == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.attachingRate != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !attachingRate.equals( other.attachingRate ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public double getMotoPremiumPresentMonth()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return motoPremiumPresentMonth;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setMotoPremiumPresentMonth( double motoPremiumPresentMonth )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.motoPremiumPresentMonth = motoPremiumPresentMonth;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getCallerCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return callerCode;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setCallerCode( String callerCode )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.callerCode = callerCode;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public long getTotalArchievement()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return totalArchievement;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setTotalArchievement( long totalArchievement )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.totalArchievement = totalArchievement;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ArrayList<MensualArchievementItem> getMensualArchievementList()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return mensualArchievementList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setMensualArchievementList(
 | 
				
			||||||
 | 
					            ArrayList<MensualArchievementItem> mensualArchievementList )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.mensualArchievementList = mensualArchievementList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getInsuranceRenewalRate()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return insuranceRenewalRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setInsuranceRenewalRate( String insuranceRenewalRate )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.insuranceRenewalRate = insuranceRenewalRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getAttachingRate()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return attachingRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setAttachingRate( String attachingRate )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.attachingRate = attachingRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,535 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-08 15:02:15
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/ImportBIExcelData.java
 | 
				
			||||||
 | 
					 * @Description: 坐席业绩相关的数据操作方法。
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.utils.data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.File;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.time.LocalDate;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Cell;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Row;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Sheet;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Workbook;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.WorkbookFactory;
 | 
				
			||||||
 | 
					import org.slf4j.Logger;
 | 
				
			||||||
 | 
					import org.slf4j.LoggerFactory;
 | 
				
			||||||
 | 
					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;
 | 
				
			||||||
 | 
					import com.cpic.xim.utils.poi.MyPOIUtils;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 坐席业绩相关的数据操作方法。
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public final class ImportBIExcelData
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    private static Logger logger = LoggerFactory.getLogger( ImportBIExcelData.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static String[] TelsalerAttachingRateExcelTitle = new String[]
 | 
				
			||||||
 | 
					    { "部门", "经办", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "当月客户渗透率", "客户渗透率环比上月",
 | 
				
			||||||
 | 
					            "当月车非客均保费", "客均保费环比上月"};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static String[] TelSalerRenewalRateExcelTitle = new String[]
 | 
				
			||||||
 | 
					    { "责任部门", "责任人", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
 | 
				
			||||||
 | 
					            "环比上月(%)", "平均提前签单天数", "环比"};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static String[] DepartmentAttachingRateExcelTitle = new String[]
 | 
				
			||||||
 | 
					    { "部门", "目标值-机构", "目标差距", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "车险客户数", "当月客户渗透率",
 | 
				
			||||||
 | 
					            "客户渗透率环比上月", "当月车非客均保费", "客均保费环比上月"};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static String[] DepartmentRenewalRateExcelTitle = new String[]
 | 
				
			||||||
 | 
					    { "责任部门", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
 | 
				
			||||||
 | 
					            "环比上月(%)", "平均提前签单天数", "环比",};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 用于通过对比标题行判断excel文件格式的函数。
 | 
				
			||||||
 | 
					     * @param sheet
 | 
				
			||||||
 | 
					     * @param caption 标题行文字
 | 
				
			||||||
 | 
					     * @param captionRowIndex 标题行索引
 | 
				
			||||||
 | 
					     * @param title 字段行文字数组
 | 
				
			||||||
 | 
					     * @param titleRowIndex 字段行索引
 | 
				
			||||||
 | 
					     * @return 返回判断结果
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private static boolean checkExcelFormat( Sheet sheet, String caption, int captionRowIndex,
 | 
				
			||||||
 | 
					            String[] title, int titleRowIndex )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        boolean result = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Row captionRow = sheet.getRow( captionRowIndex );
 | 
				
			||||||
 | 
					        Row titleRow = sheet.getRow( titleRowIndex );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ( caption != null && !caption.isEmpty() )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                int captionCellNum = captionRow.getFirstCellNum();
 | 
				
			||||||
 | 
					                String captionString = MyPOIUtils.getStringCellValue( captionRow, captionCellNum );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if ( !caption.equals( captionString ) )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    result = false;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch ( NullPointerException error )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                result = false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ( title.length != 0 )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            int cellIndex = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                for ( Cell cell : titleRow )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    String cellString = MyPOIUtils.getStringCellValue( cell );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if ( !cellString.equals( title[cellIndex] ) )
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        result = false;
 | 
				
			||||||
 | 
					                        break;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    cellIndex++;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch ( NullPointerException error )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                result = false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return result;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 从excel文件读取坐席的车非渗透率数据
 | 
				
			||||||
 | 
					     * @param filePath 文件路径
 | 
				
			||||||
 | 
					     * @param SheetIndex sheet索引
 | 
				
			||||||
 | 
					     * @param firstRow 数据起始行
 | 
				
			||||||
 | 
					     * @return 返回一个ArrayList保存的TelsalerAttachingRateRecord记录数组。
 | 
				
			||||||
 | 
					     * @throws IOException 打开excel文件错误时抛出。
 | 
				
			||||||
 | 
					     * @throws InvalidFormatException excel单元格格式错误时抛出
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static ArrayList<BITelsalerAttachingRateRecord> importBITelsalerAttachingRateRecordFromXlsx(
 | 
				
			||||||
 | 
					            String filePath, int SheetIndex, int firstRow )
 | 
				
			||||||
 | 
					            throws IOException, InvalidFormatException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ArrayList<BITelsalerAttachingRateRecord> records = new ArrayList<>( 200 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Workbook wb = null;
 | 
				
			||||||
 | 
					        Sheet sheet = null;
 | 
				
			||||||
 | 
					        String name = null;
 | 
				
			||||||
 | 
					        String departmentName = null;
 | 
				
			||||||
 | 
					        String departmentCurrentRow = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            wb = WorkbookFactory.create( new File( filePath ) );
 | 
				
			||||||
 | 
					            sheet = wb.getSheetAt( SheetIndex );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 先验证格式,不对就抛出错误
 | 
				
			||||||
 | 
					            if ( !checkExcelFormat( sheet, null, 0, TelsalerAttachingRateExcelTitle, 0 ) )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                throw new InvalidFormatException( "Excel文件格式错误,请检查报表内容!" );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( Row row : sheet )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                int rowIndex = row.getRowNum();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // 从数据行开始
 | 
				
			||||||
 | 
					                if ( row.getRowNum() < firstRow )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    // 部门
 | 
				
			||||||
 | 
					                    try
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        departmentCurrentRow = MyPOIUtils.getStringCellValue( row, 0 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        // 因为是合并列,所以要判断一下是不是空的
 | 
				
			||||||
 | 
					                        if ( !departmentCurrentRow.equals( "" )
 | 
				
			||||||
 | 
					                                && !departmentCurrentRow.equals( "合计" ) )
 | 
				
			||||||
 | 
					                        {
 | 
				
			||||||
 | 
					                            // 不是空的,也不是合计,说明是新部门的数据,更新部门名称
 | 
				
			||||||
 | 
					                            departmentName = departmentCurrentRow;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    catch ( NullPointerException error )
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        // cell是空的,说明还是上一行的部门
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    // 坐席名称
 | 
				
			||||||
 | 
					                    name = MyPOIUtils.getStringCellValue( row, 1 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    // 忽略坐席名称为空的行
 | 
				
			||||||
 | 
					                    if ( name.equals( "全流程" ) || name.equals( "其他" ) || name.isEmpty() )
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        continue;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    // 车险保费
 | 
				
			||||||
 | 
					                    double motoPremium = MyPOIUtils.getNumbericCellValue( row, 2 );
 | 
				
			||||||
 | 
					                    // 非车险保费
 | 
				
			||||||
 | 
					                    double nomotoPremium = MyPOIUtils.getNumbericCellValue( row, 4 );
 | 
				
			||||||
 | 
					                    // 车险保费占比
 | 
				
			||||||
 | 
					                    double motoPremiumProPortion = MyPOIUtils.getNumbericCellValue( row, 3 ) * 100;
 | 
				
			||||||
 | 
					                    // 当月保费渗透率
 | 
				
			||||||
 | 
					                    double attachingRate = MyPOIUtils.getNumbericCellValue( row, 5 ) * 100;
 | 
				
			||||||
 | 
					                    // 保费渗透率环比上月
 | 
				
			||||||
 | 
					                    double attachingRateChange = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
 | 
				
			||||||
 | 
					                    // 当月客户渗透率
 | 
				
			||||||
 | 
					                    double customerHandleRateCell = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
 | 
				
			||||||
 | 
					                    // 客户渗透率环比上月
 | 
				
			||||||
 | 
					                    double customerHandleRateChangeCell =
 | 
				
			||||||
 | 
					                            MyPOIUtils.getNumbericCellValue( row, 8 ) * 100;
 | 
				
			||||||
 | 
					                    // 当月车非客均保费
 | 
				
			||||||
 | 
					                    double noMotoPremiumPerCustomerCell =
 | 
				
			||||||
 | 
					                            MyPOIUtils.getNumbericCellValue( row, 9 ) * 100;
 | 
				
			||||||
 | 
					                    // 客均保费环比上月
 | 
				
			||||||
 | 
					                    double noMotoPremiumPerCustomerChangeCell =
 | 
				
			||||||
 | 
					                            MyPOIUtils.getNumbericCellValue( row, 10 ) * 100;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    BITelsalerAttachingRateRecord record = new BITelsalerAttachingRateRecord(
 | 
				
			||||||
 | 
					                            departmentName, LocalDate.now(), name, motoPremium, nomotoPremium,
 | 
				
			||||||
 | 
					                            motoPremiumProPortion, attachingRate, attachingRateChange,
 | 
				
			||||||
 | 
					                            customerHandleRateCell, customerHandleRateChangeCell,
 | 
				
			||||||
 | 
					                            noMotoPremiumPerCustomerCell, noMotoPremiumPerCustomerChangeCell );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    records.add( record );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch ( IllegalStateException error )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    error.printStackTrace();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch ( NumberFormatException error )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    error.printStackTrace();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch ( NullPointerException error )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    String message = "第" + String.valueOf( rowIndex ) + "行出现NullPointerException异常";
 | 
				
			||||||
 | 
					                    logger.error( message, error );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        finally
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if ( wb != null )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    wb.close();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch ( IOException error )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                error.printStackTrace();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return records;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 从excel文件读取坐席的车非渗透率数据。
 | 
				
			||||||
 | 
					     * @param filePath
 | 
				
			||||||
 | 
					     * @param hasCaptionRow
 | 
				
			||||||
 | 
					     * @param summaryDate
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static ArrayList<BITelsalerRenewalRateRecord> importBITelsalerRenewalRateFromXlsx(
 | 
				
			||||||
 | 
					            String filePath, int sheetIndex, int firstRow )
 | 
				
			||||||
 | 
					            throws IOException, InvalidFormatException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ArrayList<BITelsalerRenewalRateRecord> records = new ArrayList<>( 200 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Workbook wb = null;
 | 
				
			||||||
 | 
					        Sheet sheet = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            wb = WorkbookFactory.create( new File( filePath ) );
 | 
				
			||||||
 | 
					            sheet = wb.getSheetAt( sheetIndex );
 | 
				
			||||||
 | 
					            int rowIndex = 0;
 | 
				
			||||||
 | 
					            String 责任部门 = null;
 | 
				
			||||||
 | 
					            String 当前行责任部门 = null;
 | 
				
			||||||
 | 
					            String 责任人 = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if ( !checkExcelFormat( sheet, null, 0, TelSalerRenewalRateExcelTitle, 0 ) )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                throw new InvalidFormatException( "格式错误,请检查报表内容!" );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( Row row : sheet )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                rowIndex = row.getRowNum();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // 从数据行开始
 | 
				
			||||||
 | 
					                if ( row.getRowNum() < firstRow )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    // 处理责任部门列
 | 
				
			||||||
 | 
					                    // 如果读取到的当前行责任部门不为空且与前一行责任部门不同,说明是另一个部门的数据
 | 
				
			||||||
 | 
					                    try
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        当前行责任部门 = MyPOIUtils.getStringCellValue( row, 0 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        if ( !当前行责任部门.isEmpty() && !当前行责任部门.equals( 责任部门 ) )
 | 
				
			||||||
 | 
					                        {
 | 
				
			||||||
 | 
					                            责任部门 = 当前行责任部门;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    catch ( NullPointerException error )
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    // 判断责任人,如果是空值,就跳过此行
 | 
				
			||||||
 | 
					                    责任人 = MyPOIUtils.getStringCellValue( row, 1 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if ( 责任人.isEmpty() == true )
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        continue;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    double 机构目标值 = MyPOIUtils.getNumbericCellValue( row, 2 ) * 100;
 | 
				
			||||||
 | 
					                    double 到期数全月 = MyPOIUtils.getNumbericCellValue( row, 3 );
 | 
				
			||||||
 | 
					                    double 序时到期数占比 = MyPOIUtils.getNumbericCellValue( row, 4 ) * 100;
 | 
				
			||||||
 | 
					                    double 个车续保率序时 = MyPOIUtils.getNumbericCellValue( row, 5 ) * 100;
 | 
				
			||||||
 | 
					                    double 个车续保率全月 = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
 | 
				
			||||||
 | 
					                    double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
 | 
				
			||||||
 | 
					                    double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 8 ) * 100;
 | 
				
			||||||
 | 
					                    double 平均提前签单天数 = MyPOIUtils.getNumbericCellValue( row, 9 );
 | 
				
			||||||
 | 
					                    double 环比 = MyPOIUtils.getNumbericCellValue( row, 10 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    BITelsalerRenewalRateRecord record = new BITelsalerRenewalRateRecord( 责任部门, 责任人,
 | 
				
			||||||
 | 
					                            机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月, 平均提前签单天数, 环比 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    records.add( record );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch ( NullPointerException error )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    String message = "第" + String.valueOf( rowIndex ) + "行出现NullPointerException异常";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    logger.error( message, error );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        finally
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if ( wb != null )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    wb.close();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch ( Exception error )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                error.printStackTrace();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return records;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 读取BI机构当月个车续保率跟踪表
 | 
				
			||||||
 | 
					     * @param filePath
 | 
				
			||||||
 | 
					     * @param sheetIndex
 | 
				
			||||||
 | 
					     * @param firstRow
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     * @throws IOException
 | 
				
			||||||
 | 
					     * @throws InvalidFormatException
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static ArrayList<BIDepartmentAttachingRateRecord> importBIDepartmentAttachingRateRecordsFromXlsx(
 | 
				
			||||||
 | 
					            String filePath, int sheetIndex, int firstRow )
 | 
				
			||||||
 | 
					            throws IOException, InvalidFormatException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ArrayList<BIDepartmentAttachingRateRecord> records = new ArrayList<>( 5 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Workbook wb = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            wb = WorkbookFactory.create( new File( filePath ) );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Sheet sheet = wb.getSheetAt( sheetIndex );
 | 
				
			||||||
 | 
					            int rowIndex = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if ( !checkExcelFormat( sheet, null, 0, DepartmentAttachingRateExcelTitle, 0 ) )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                throw new InvalidFormatException( "Excel文件格式错误,请检查报表内容!" );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( Row row : sheet )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                rowIndex = row.getRowNum();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // 从数据行开始
 | 
				
			||||||
 | 
					                if ( row.getRowNum() < firstRow )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    String departmentName = MyPOIUtils.getStringCellValue( row, 0 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if ( departmentName.isEmpty() || departmentName.equals( "合计" ) )
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        continue;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    double departmentObject = MyPOIUtils.getNumbericCellValue( row, 1 ) * 100;
 | 
				
			||||||
 | 
					                    double objectGap = MyPOIUtils.getNumbericCellValue( row, 2 ) * 100;
 | 
				
			||||||
 | 
					                    double motoPremium = MyPOIUtils.getNumbericCellValue( row, 3 );
 | 
				
			||||||
 | 
					                    double motoPremiumProPortion = MyPOIUtils.getNumbericCellValue( row, 4 ) * 100;
 | 
				
			||||||
 | 
					                    double nomotoPremium = MyPOIUtils.getNumbericCellValue( row, 5 );
 | 
				
			||||||
 | 
					                    double attachingRate = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
 | 
				
			||||||
 | 
					                    double attachingRateChange = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
 | 
				
			||||||
 | 
					                    int motoInsuranceCustomerCount = (int)MyPOIUtils.getNumbericCellValue( row, 8 );
 | 
				
			||||||
 | 
					                    double customerHandleRate = MyPOIUtils.getNumbericCellValue( row, 9 ) * 100;
 | 
				
			||||||
 | 
					                    double customerHandleRateChange =
 | 
				
			||||||
 | 
					                            MyPOIUtils.getNumbericCellValue( row, 10 ) * 100;
 | 
				
			||||||
 | 
					                    double premiumPerCustomer = MyPOIUtils.getNumbericCellValue( row, 11 ) * 100;
 | 
				
			||||||
 | 
					                    double premiumPerCustomerChange =
 | 
				
			||||||
 | 
					                            MyPOIUtils.getNumbericCellValue( row, 12 ) * 100;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    BIDepartmentAttachingRateRecord record = new BIDepartmentAttachingRateRecord(
 | 
				
			||||||
 | 
					                            departmentName, departmentObject, objectGap, motoPremium,
 | 
				
			||||||
 | 
					                            motoPremiumProPortion, nomotoPremium, attachingRate,
 | 
				
			||||||
 | 
					                            attachingRateChange, motoInsuranceCustomerCount, customerHandleRate, customerHandleRateChange,
 | 
				
			||||||
 | 
					                            premiumPerCustomer, premiumPerCustomerChange );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    records.add( record );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch ( NullPointerException error )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    String message = "第" + String.valueOf( rowIndex ) + "行出现NullPointerException异常";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    logger.error( message, error );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        finally
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if ( wb != null )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    wb.close();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch ( Exception error )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                String message = "关闭" + filePath + "时出现异常!";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                logger.error( message, error );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return records;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static ArrayList<BIDepartmentRenewalRateRecord> importBIDepartmentRenewalRateRecordsFromXlsx(
 | 
				
			||||||
 | 
					            String filePath, int sheetIndex, int firstRow )
 | 
				
			||||||
 | 
					            throws IOException, InvalidFormatException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ArrayList<BIDepartmentRenewalRateRecord> records = new ArrayList<>( 20 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Workbook wb = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            wb = WorkbookFactory.create( new File( filePath ) );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Sheet sheet = wb.getSheetAt( sheetIndex );
 | 
				
			||||||
 | 
					            int rowIndex = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if ( !checkExcelFormat( sheet, null, 0, DepartmentRenewalRateExcelTitle, 0 ) )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                throw new InvalidFormatException( "Excel文件格式错误,请检查报表内容!" );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( Row row : sheet )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                rowIndex = row.getRowNum();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if ( rowIndex < firstRow )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    continue;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    String 责任部门 = MyPOIUtils.getStringCellValue( row, 0 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    // 部门为空或者是合计行,就跳过
 | 
				
			||||||
 | 
					                    if ( 责任部门.isEmpty() || 责任部门.equals( "合计" ) )
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        continue;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    double 机构目标值 = MyPOIUtils.getNumbericCellValue( row, 1 ) * 100;
 | 
				
			||||||
 | 
					                    int 到期数全月 = (int) MyPOIUtils.getNumbericCellValue( row, 2 );
 | 
				
			||||||
 | 
					                    double 序时到期数占比 = MyPOIUtils.getNumbericCellValue( row, 3 ) * 100;
 | 
				
			||||||
 | 
					                    double 个车续保率序时 = MyPOIUtils.getNumbericCellValue( row, 4 ) * 100;
 | 
				
			||||||
 | 
					                    double 个车续保率全月 = MyPOIUtils.getNumbericCellValue( row, 5 ) * 100;
 | 
				
			||||||
 | 
					                    double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
 | 
				
			||||||
 | 
					                    double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
 | 
				
			||||||
 | 
					                    int 平均提前签单天数 = (int) MyPOIUtils.getNumbericCellValue( row, 8 );
 | 
				
			||||||
 | 
					                    double 环比 = MyPOIUtils.getNumbericCellValue( row, 9 ) * 100;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    BIDepartmentRenewalRateRecord record = new BIDepartmentRenewalRateRecord( 责任部门,
 | 
				
			||||||
 | 
					                            机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月, 平均提前签单天数, 环比 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    records.add( record );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch ( NullPointerException error )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    String message = "第" + String.valueOf( rowIndex ) + "行出现NullPointerException异常";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    logger.error( message, error );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        finally
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( wb != null )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                try
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    wb.close();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                catch ( Exception error )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    error.printStackTrace();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return records;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,64 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-07 23:17:13
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/TelsalerData.java
 | 
				
			||||||
 | 
					 * @Description: 电销坐席数据导入导出
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.utils.data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.File;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Workbook;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.WorkbookFactory;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.TelsalerFromJYGL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class TelsalerData
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param filePath Xlsx文件路径。
 | 
				
			||||||
 | 
					     * @return 
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static ArrayList<TelsalerFromJYGL> importTelsalersFromXlsx( String filePath )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ArrayList<TelsalerFromJYGL> telsalers = new ArrayList<>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Workbook wb = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            wb = WorkbookFactory.create( new File( filePath ) );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        finally
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if ( wb != null )
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    wb.close();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch ( IOException error )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                error.printStackTrace();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return telsalers;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static int importTelsalers( ArrayList<TelsalerFromJYGL> telsalers )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        int importedCount = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,76 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-08 22:12:05
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/utils/poi/MyPOIUtils.java
 | 
				
			||||||
 | 
					 * @Description: POI相关的工具
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.utils.poi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Cell;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Row;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class MyPOIUtils
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public static String getStringCellValue( Cell cell )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        switch( cell.getCellType() )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            case STRING:
 | 
				
			||||||
 | 
					                return cell.getStringCellValue();
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					                return "";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static String getStringCellValue( Row row, int columnIndex )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Cell cell = row.getCell(columnIndex, MissingCellPolicy.RETURN_NULL_AND_BLANK);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        switch( cell.getCellType() )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            case STRING:
 | 
				
			||||||
 | 
					                return cell.getStringCellValue();
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					                return "";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static double getNumbericCellValue( Cell cell )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        double value = 0.0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        switch ( cell.getCellType() )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            case NUMERIC:
 | 
				
			||||||
 | 
					                value = cell.getNumericCellValue();
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					                value = 0.0;
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return value;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static double getNumbericCellValue( Row row, int columnIndex )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        double value = 0.0;
 | 
				
			||||||
 | 
					        Cell cell = row.getCell( columnIndex, MissingCellPolicy.RETURN_NULL_AND_BLANK );
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        switch ( cell.getCellType() )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            case NUMERIC:
 | 
				
			||||||
 | 
					                value = cell.getNumericCellValue();
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					                value = 0.0;
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return value;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,91 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-04-05 22:34:36
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/QueryResponse.java
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    @JsonProperty( "success" )
 | 
				
			||||||
 | 
					    private boolean success;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "message" )
 | 
				
			||||||
 | 
					    private String  message;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public QueryResponse( boolean success, String message )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.success = success;
 | 
				
			||||||
 | 
					        this.message = message;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public QueryResponse()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.success = false;
 | 
				
			||||||
 | 
					        this.message = "";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public boolean isSuccess()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return success;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setSuccess( boolean success )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.success = success;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getMessage()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return message;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setMessage( String message )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.message = message;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = 1;
 | 
				
			||||||
 | 
					        result = prime * result + (success ? 1231 : 1237);
 | 
				
			||||||
 | 
					        result = prime * result + ((message == null) ? 0 : message.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;
 | 
				
			||||||
 | 
					        QueryResponse other = (QueryResponse) obj;
 | 
				
			||||||
 | 
					        if ( success != other.success )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( message == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.message != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !message.equals( other.message ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "QueryResult [success=" + success + ", message=" + message + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,74 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * @Author: Kane
 | 
					 | 
				
			||||||
 * @Date: 2023-04-05 22:34:36
 | 
					 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 | 
				
			||||||
 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/QueryResult.java
 | 
					 | 
				
			||||||
 * @Description:
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
package com.cpic.xim.web.controllers;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class QueryResult {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public QueryResult(boolean success, String message) {
 | 
					 | 
				
			||||||
        this.success = success;
 | 
					 | 
				
			||||||
        this.message = message;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public QueryResult() {
 | 
					 | 
				
			||||||
        this.success = false;
 | 
					 | 
				
			||||||
        this.message = "";
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public boolean isSuccess() {
 | 
					 | 
				
			||||||
        return success;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setSuccess(boolean success) {
 | 
					 | 
				
			||||||
        this.success = success;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public String getMessage() {
 | 
					 | 
				
			||||||
        return message;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setMessage(String message) {
 | 
					 | 
				
			||||||
        this.message = message;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public int hashCode() {
 | 
					 | 
				
			||||||
        final int prime = 31;
 | 
					 | 
				
			||||||
        int result = 1;
 | 
					 | 
				
			||||||
        result = prime * result + (success ? 1231 : 1237);
 | 
					 | 
				
			||||||
        result = prime * result + ((message == null) ? 0 : message.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;
 | 
					 | 
				
			||||||
        QueryResult other = (QueryResult) obj;
 | 
					 | 
				
			||||||
        if (success != other.success) return false;
 | 
					 | 
				
			||||||
        if (message == null) {
 | 
					 | 
				
			||||||
            if (other.message != null) return false;
 | 
					 | 
				
			||||||
        } else if (!message.equals(other.message)) return false;
 | 
					 | 
				
			||||||
        return true;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public String toString() {
 | 
					 | 
				
			||||||
        return "QueryResult [success=" + success + ", message=" + message + "]";
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @JsonProperty("success")
 | 
					 | 
				
			||||||
    private boolean success;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @JsonProperty("message")
 | 
					 | 
				
			||||||
    private String message;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -9,10 +9,10 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
package com.cpic.xim.web.controllers.account;
 | 
					package com.cpic.xim.web.controllers.account;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.cpic.xim.web.controllers.QueryResult;
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class TeleSalerQueryResult extends QueryResult
 | 
					public class TeleSalerQueryResult extends QueryResponse
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public TeleSalerQueryResult()
 | 
					    public TeleSalerQueryResult()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,27 +22,32 @@ import org.springframework.web.bind.annotation.PostMapping;
 | 
				
			|||||||
import org.springframework.web.bind.annotation.RequestBody;
 | 
					import org.springframework.web.bind.annotation.RequestBody;
 | 
				
			||||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
import org.springframework.web.bind.annotation.ResponseBody;
 | 
					import org.springframework.web.bind.annotation.ResponseBody;
 | 
				
			||||||
 | 
					import com.cpic.xim.utils.archievement.CallerArchievement;
 | 
				
			||||||
import com.cpic.xim.utils.archievement.DepartmentArchievement;
 | 
					import com.cpic.xim.utils.archievement.DepartmentArchievement;
 | 
				
			||||||
import com.cpic.xim.utils.ranking.CallerRankingItem;
 | 
					import com.cpic.xim.utils.ranking.CallerRankingItem;
 | 
				
			||||||
import com.cpic.xim.utils.ranking.CallerRankingList;
 | 
					import com.cpic.xim.utils.ranking.CallerRankingList;
 | 
				
			||||||
import com.cpic.xim.web.controllers.archievement.RankingList.RankingListRequest;
 | 
					import com.cpic.xim.web.controllers.archievement.RankingList.RankingListRequest;
 | 
				
			||||||
import com.cpic.xim.web.controllers.archievement.RankingList.RankingListResponse;
 | 
					import com.cpic.xim.web.controllers.archievement.RankingList.RankingListResponse;
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.archievement.caller.CallerArchievementQueryRequest;
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.archievement.caller.CallerArchievementQueryResponse;
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.archievement.department.DepartmentArchievementQueryRequest;
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.archievement.department.DepartmentArchievementQueryResult;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Controller
 | 
					@Controller
 | 
				
			||||||
@RequestMapping( "/archievement" )
 | 
					@RequestMapping( "/archievement" )
 | 
				
			||||||
public class ArchievementQueryController
 | 
					public class ArchievementQueryController
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    //日志
 | 
					    // 日志
 | 
				
			||||||
    private static Logger logger = LoggerFactory.getLogger(ArchievementQueryController.class);
 | 
					    private static Logger logger = LoggerFactory.getLogger( ArchievementQueryController.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 查询坐席业绩
 | 
					     * 查询坐席业绩
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @PostMapping( "/query_caller_archievement.do" )
 | 
					    // @PostMapping( "/query_caller_archievement.do" )
 | 
				
			||||||
    public void queryCallerArchievement()
 | 
					    // public void queryCallerArchievement()
 | 
				
			||||||
    {
 | 
					    // {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    // }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 查询部门业绩
 | 
					     * 查询部门业绩
 | 
				
			||||||
@@ -60,16 +65,16 @@ public class ArchievementQueryController
 | 
				
			|||||||
        try
 | 
					        try
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // 查询业绩
 | 
					            // 查询业绩
 | 
				
			||||||
            departmentArch = DepartmentArchievement
 | 
					            departmentArch =
 | 
				
			||||||
                    .getDepartmentArchievement( request.getDepartmentCode() );
 | 
					                    DepartmentArchievement.getDepartmentArchievement( request.getDepartmentCode() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            result.setTotalArchievement( departmentArch.getTotalArchievement() );
 | 
					            result.setTotalArchievement( departmentArch.getTotalArchievement() );
 | 
				
			||||||
            result.setInsuranceRenewalRate( departmentArch.getInsuranceRenewalRate() );
 | 
					            result.setInsuranceRenewalRate( departmentArch.getInsuranceRenewalRate() );
 | 
				
			||||||
            result.setAttachingRate( departmentArch.getAttachingRate() );
 | 
					            result.setAttachingRate( departmentArch.getAttachingRate() );
 | 
				
			||||||
            result.addAdvanceRewardGainer( "沈群" );
 | 
					            // result.addAdvanceRewardGainer( "沈群" );
 | 
				
			||||||
            result.addLeadingRewardGainer( "王鸿津" );
 | 
					            // result.addLeadingRewardGainer( "王鸿津" );
 | 
				
			||||||
            result.addLeadingRewardGainer( "林宗泽" );
 | 
					            // result.addLeadingRewardGainer( "林宗泽" );
 | 
				
			||||||
            result.addBackwardStaff( "王炜" );
 | 
					            // result.addBackwardStaff( "王炜" );
 | 
				
			||||||
            result.setMensualArchievementList( departmentArch.getMensualArchievementList() );
 | 
					            result.setMensualArchievementList( departmentArch.getMensualArchievementList() );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        catch ( IOException error )
 | 
					        catch ( IOException error )
 | 
				
			||||||
@@ -83,6 +88,31 @@ public class ArchievementQueryController
 | 
				
			|||||||
        return result;
 | 
					        return result;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    @PostMapping( "/query_caller_archievement.do" )
 | 
				
			||||||
 | 
					    public CallerArchievementQueryResponse queryCallerArchievement(
 | 
				
			||||||
 | 
					            @RequestBody CallerArchievementQueryRequest request )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        CallerArchievementQueryResponse result = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            CallerArchievement archievement =
 | 
				
			||||||
 | 
					                    CallerArchievement.getCallerArchievement( request.getCallerCode() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            result = new CallerArchievementQueryResponse( true, "查询成功", archievement.getCallerCode(),
 | 
				
			||||||
 | 
					                    request.getCallName(), archievement.getTotalArchievement(), archievement.getMotoPremiumPresentMonth(),
 | 
				
			||||||
 | 
					                    archievement.getMensualArchievementList(),
 | 
				
			||||||
 | 
					                    archievement.getInsuranceRenewalRate(), archievement.getAttachingRate() );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            result = new CallerArchievementQueryResponse(false, error.getMessage(), null, null, 0, 0, null, null, null);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return result;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @RequestMapping( "/query_ranking_list.do" )
 | 
					    @RequestMapping( "/query_ranking_list.do" )
 | 
				
			||||||
    @ResponseBody
 | 
					    @ResponseBody
 | 
				
			||||||
    public RankingListResponse queryCallerArchievementRankingList(
 | 
					    public RankingListResponse queryCallerArchievementRankingList(
 | 
				
			||||||
@@ -115,7 +145,7 @@ public class ArchievementQueryController
 | 
				
			|||||||
            success = false;
 | 
					            success = false;
 | 
				
			||||||
            message = "获取排行榜失败,原因:" + error.getMessage();
 | 
					            message = "获取排行榜失败,原因:" + error.getMessage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            logger.error(message, error);
 | 
					            logger.error( message, error );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        RankingListResponse response = new RankingListResponse( success, message, departmentCode,
 | 
					        RankingListResponse response = new RankingListResponse( success, message, departmentCode,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +0,0 @@
 | 
				
			|||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package com.cpic.xim.web.controllers.archievement;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class CallerArchievementQueryResult
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -11,10 +11,10 @@ package com.cpic.xim.web.controllers.archievement.RankingList;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
import com.cpic.xim.utils.ranking.CallerRankingItem;
 | 
					import com.cpic.xim.utils.ranking.CallerRankingItem;
 | 
				
			||||||
import com.cpic.xim.web.controllers.QueryResult;
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class RankingListResponse extends QueryResult
 | 
					public class RankingListResponse extends QueryResponse
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public RankingListResponse()
 | 
					    public RankingListResponse()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,43 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-08-26 13:20:32
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/archievement/caller/CallerArchievementQueryRequest.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.archievement.caller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class CallerArchievementQueryRequest 
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public CallerArchievementQueryRequest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getCallerCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return callerCode;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setCallerCode( String callerCode )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.callerCode = callerCode;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getCallName()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return callName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setCallName( String callName )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.callName = callName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("callerCode")
 | 
				
			||||||
 | 
					    private String callerCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("callerName")
 | 
				
			||||||
 | 
					    private String callName;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,222 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-06-06 17:35:54
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/archievement/caller/CallerArchievementQueryResponse.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.archievement.caller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.MensualArchievementItem;
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class CallerArchievementQueryResponse extends QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    @JsonProperty("callerCode")
 | 
				
			||||||
 | 
					    String callerCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("callerName")
 | 
				
			||||||
 | 
					    String callerName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "total_archievement" )
 | 
				
			||||||
 | 
					    private long totalArchievement; // 总业绩
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "motoPremiumPresentMonth" )
 | 
				
			||||||
 | 
					    private double motoPremiumPresentMonth; // 当月车险保费
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 每月业绩列表
 | 
				
			||||||
 | 
					    // 要保证数据是按照月份排序。
 | 
				
			||||||
 | 
					    @JsonProperty( "mensual_archievement_list" )
 | 
				
			||||||
 | 
					    private ArrayList<MensualArchievementItem> mensualArchievementList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "insurance_renewal_rate" )
 | 
				
			||||||
 | 
					    private String insuranceRenewalRate; // 续保率
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "attaching_rate" )
 | 
				
			||||||
 | 
					    private String attachingRate; // 车非渗透率
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public CallerArchievementQueryResponse( boolean success, String message, String callerCode,
 | 
				
			||||||
 | 
					            String callerName, long totalArchievement, double motoPremiumPresentMonth,
 | 
				
			||||||
 | 
					            ArrayList<MensualArchievementItem> mensualArchievementList, String insuranceRenewalRate,
 | 
				
			||||||
 | 
					            String attachingRate )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super( success, message );
 | 
				
			||||||
 | 
					        this.callerCode = callerCode;
 | 
				
			||||||
 | 
					        this.callerName = callerName;
 | 
				
			||||||
 | 
					        this.totalArchievement = totalArchievement;
 | 
				
			||||||
 | 
					        this.motoPremiumPresentMonth = motoPremiumPresentMonth;
 | 
				
			||||||
 | 
					        this.mensualArchievementList = mensualArchievementList;
 | 
				
			||||||
 | 
					        this.insuranceRenewalRate = insuranceRenewalRate;
 | 
				
			||||||
 | 
					        this.attachingRate = attachingRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public CallerArchievementQueryResponse( String callerCode, String callerName,
 | 
				
			||||||
 | 
					            long totalArchievement, double motoPremiumPresentMonth,
 | 
				
			||||||
 | 
					            ArrayList<MensualArchievementItem> mensualArchievementList, String insuranceRenewalRate,
 | 
				
			||||||
 | 
					            String attachingRate )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.callerCode = callerCode;
 | 
				
			||||||
 | 
					        this.callerName = callerName;
 | 
				
			||||||
 | 
					        this.totalArchievement = totalArchievement;
 | 
				
			||||||
 | 
					        this.motoPremiumPresentMonth = motoPremiumPresentMonth;
 | 
				
			||||||
 | 
					        this.mensualArchievementList = mensualArchievementList;
 | 
				
			||||||
 | 
					        this.insuranceRenewalRate = insuranceRenewalRate;
 | 
				
			||||||
 | 
					        this.attachingRate = attachingRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "CallerArchievementQueryResponse [callerCode=" + callerCode + ", callerName="
 | 
				
			||||||
 | 
					                + callerName + ", totalArchievement=" + totalArchievement
 | 
				
			||||||
 | 
					                + ", motoPremiumPresentMonth=" + motoPremiumPresentMonth
 | 
				
			||||||
 | 
					                + ", mensualArchievementList=" + mensualArchievementList + ", insuranceRenewalRate="
 | 
				
			||||||
 | 
					                + insuranceRenewalRate + ", attachingRate=" + attachingRate + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = super.hashCode();
 | 
				
			||||||
 | 
					        result = prime * result + ((callerCode == null) ? 0 : callerCode.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result + ((callerName == null) ? 0 : callerName.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result + (int) (totalArchievement ^ (totalArchievement >>> 32));
 | 
				
			||||||
 | 
					        long temp;
 | 
				
			||||||
 | 
					        temp = Double.doubleToLongBits( motoPremiumPresentMonth );
 | 
				
			||||||
 | 
					        result = prime * result + (int) (temp ^ (temp >>> 32));
 | 
				
			||||||
 | 
					        result = prime * result
 | 
				
			||||||
 | 
					                + ((mensualArchievementList == null) ? 0 : mensualArchievementList.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result
 | 
				
			||||||
 | 
					                + ((insuranceRenewalRate == null) ? 0 : insuranceRenewalRate.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result + ((attachingRate == null) ? 0 : attachingRate.hashCode());
 | 
				
			||||||
 | 
					        return result;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setMotoPremiumPresentMonth( double motoPremiumPresentMonth )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.motoPremiumPresentMonth = motoPremiumPresentMonth;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals( Object obj )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if ( this == obj )
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        if ( !super.equals( obj ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( getClass() != obj.getClass() )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        CallerArchievementQueryResponse other = (CallerArchievementQueryResponse) obj;
 | 
				
			||||||
 | 
					        if ( callerCode == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.callerCode != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !callerCode.equals( other.callerCode ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( callerName == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.callerName != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !callerName.equals( other.callerName ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( totalArchievement != other.totalArchievement )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( Double.doubleToLongBits( motoPremiumPresentMonth ) != Double
 | 
				
			||||||
 | 
					                .doubleToLongBits( other.motoPremiumPresentMonth ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( mensualArchievementList == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.mensualArchievementList != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !mensualArchievementList.equals( other.mensualArchievementList ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( insuranceRenewalRate == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.insuranceRenewalRate != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !insuranceRenewalRate.equals( other.insuranceRenewalRate ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( attachingRate == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.attachingRate != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !attachingRate.equals( other.attachingRate ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getCallerCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return callerCode;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setCallerCode( String callerCode )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.callerCode = callerCode;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getCallerName()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return callerName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setCallerName( String callerName )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.callerName = callerName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public long getTotalArchievement()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return totalArchievement;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setTotalArchievement( long totalArchievement )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.totalArchievement = totalArchievement;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ArrayList<MensualArchievementItem> getMensualArchievementList()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return mensualArchievementList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setMensualArchievementList( ArrayList<MensualArchievementItem> mensualArchievementList )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.mensualArchievementList = mensualArchievementList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getInsuranceRenewalRate()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return insuranceRenewalRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setInsuranceRenewalRate( String insuranceRenewalRate )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.insuranceRenewalRate = insuranceRenewalRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getAttachingRate()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return attachingRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setAttachingRate( String attachingRate )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.attachingRate = attachingRate;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public double getMotoPremiumPresentMonth()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return motoPremiumPresentMonth;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package com.cpic.xim.web.controllers.archievement;
 | 
					package com.cpic.xim.web.controllers.archievement.department;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -2,28 +2,28 @@
 | 
				
			|||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2023-03-16 09:32:53
 | 
					 * @Date: 2023-03-16 09:32:53
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/archievement/DepartmentArchievementQueryResult.java
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/archievement/department/DepartmentArchievementQueryResult.java
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package com.cpic.xim.web.controllers.archievement;
 | 
					package com.cpic.xim.web.controllers.archievement.department;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import java.util.Vector;
 | 
					import java.util.Vector;
 | 
				
			||||||
import com.cpic.xim.mybatis.pojo.MensualArchievementItem;
 | 
					import com.cpic.xim.mybatis.pojo.MensualArchievementItem;
 | 
				
			||||||
import com.cpic.xim.web.controllers.QueryResult;
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 查询部门业绩返回结果。
 | 
					 * 查询部门业绩返回结果。
 | 
				
			||||||
 * MensualArchievementList 每月业绩,要保证数据是按照月份排序。
 | 
					 * MensualArchievementList 每月业绩,要保证数据是按照月份排序。
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public class DepartmentArchievementQueryResult extends QueryResult
 | 
					public class DepartmentArchievementQueryResult extends QueryResponse
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    DepartmentArchievementQueryResult()
 | 
					    public DepartmentArchievementQueryResult()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        mensualArchievementList = new ArrayList<MensualArchievementItem>();
 | 
					        mensualArchievementList = new ArrayList<MensualArchievementItem>();
 | 
				
			||||||
        advanceRewardGainers = new Vector<String>();
 | 
					        advanceRewardGainers = new Vector<String>();
 | 
				
			||||||
@@ -46,7 +46,8 @@ public class DepartmentArchievementQueryResult extends QueryResult
 | 
				
			|||||||
        return mensualArchievementList;
 | 
					        return mensualArchievementList;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void setMensualArchievementList( ArrayList<MensualArchievementItem> mensualArchievementList )
 | 
					    public void setMensualArchievementList(
 | 
				
			||||||
 | 
					            ArrayList<MensualArchievementItem> mensualArchievementList )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        this.mensualArchievementList = mensualArchievementList;
 | 
					        this.mensualArchievementList = mensualArchievementList;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -0,0 +1,31 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-06 00:34:15
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/dataimport/ImportController.java
 | 
				
			||||||
 | 
					 * @Description: 导入相关的controller
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.dataimport;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Controller;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.PostMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMethod;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestParam;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.ResponseBody;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Controller
 | 
				
			||||||
 | 
					@RequestMapping( path = "/import", method = RequestMethod.POST )
 | 
				
			||||||
 | 
					public class ImportController
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    @PostMapping( path = "/import_telsalers.do" )
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    public ImportTelsalersResponse importTelsalers( @RequestParam ImportTelsalersRequest request )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ImportTelsalersResponse response = new ImportTelsalersResponse();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return response;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,98 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-06 00:44:14
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/dataimport/ImportTelsalersRequest.java
 | 
				
			||||||
 | 
					 * @Description: 导入作息列表请求。
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.dataimport;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class ImportTelsalersRequest
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    // 是否全量导入
 | 
				
			||||||
 | 
					    @JsonProperty( "fullImport" )
 | 
				
			||||||
 | 
					    private boolean fullImport;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 文件路径
 | 
				
			||||||
 | 
					    @JsonProperty( "filePath" )
 | 
				
			||||||
 | 
					    private String  filePath;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 构造函数
 | 
				
			||||||
 | 
					     * @param fullImport 是否全量导入
 | 
				
			||||||
 | 
					     * @param filePath 文件路径
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public ImportTelsalersRequest( boolean fullImport, String filePath )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.fullImport = fullImport;
 | 
				
			||||||
 | 
					        this.filePath = filePath;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ImportTelsalersRequest()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.fullImport = false;
 | 
				
			||||||
 | 
					        this.filePath = "";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public boolean isFullImport()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return fullImport;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setFullImport( boolean fullImport )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.fullImport = fullImport;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getFilePath()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return filePath;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setFilePath( String filePath )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.filePath = filePath;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "ImportTelsalersRequest [fullImport=" + fullImport + ", filePath=" + filePath + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = 1;
 | 
				
			||||||
 | 
					        result = prime * result + (fullImport ? 1231 : 1237);
 | 
				
			||||||
 | 
					        result = prime * result + ((filePath == null) ? 0 : filePath.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;
 | 
				
			||||||
 | 
					        ImportTelsalersRequest other = (ImportTelsalersRequest) obj;
 | 
				
			||||||
 | 
					        if ( fullImport != other.fullImport )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( filePath == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.filePath != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !filePath.equals( other.filePath ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,74 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-06 01:30:29
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/dataimport/ImportTelsalersResponse.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.dataimport;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class ImportTelsalersResponse extends QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public ImportTelsalersResponse( boolean success, String message, int importedCount )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super( success, message );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.importedCount = importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ImportTelsalersResponse()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        importedCount = 0;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public int getImportedCount()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setImportedCount( int importedCount )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.importedCount = importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "ImportTelsalersResponse [importedCount=" + importedCount + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = super.hashCode();
 | 
				
			||||||
 | 
					        result = prime * result + importedCount;
 | 
				
			||||||
 | 
					        return result;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals( Object obj )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if ( this == obj )
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        if ( !super.equals( obj ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( getClass() != obj.getClass() )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        ImportTelsalersResponse other = (ImportTelsalersResponse) obj;
 | 
				
			||||||
 | 
					        if ( importedCount != other.importedCount )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 导入的结果数量
 | 
				
			||||||
 | 
					    @JsonProperty( "importedCount" )
 | 
				
			||||||
 | 
					    private int importedCount;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,257 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-12 00:34:39
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/dataimport/bi/ImportBIDataController.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.dataimport.bi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.time.LocalDate;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import org.apache.ibatis.exceptions.PersistenceException;
 | 
				
			||||||
 | 
					import org.apache.ibatis.session.SqlSession;
 | 
				
			||||||
 | 
					import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 | 
				
			||||||
 | 
					import org.slf4j.Logger;
 | 
				
			||||||
 | 
					import org.slf4j.LoggerFactory;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Controller;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestBody;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMethod;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.ResponseBody;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper;
 | 
				
			||||||
 | 
					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;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.utils.MybatisUtils;
 | 
				
			||||||
 | 
					import com.cpic.xim.utils.data.ImportBIExcelData;
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.dataimport.bi.ImportBIDataRequest.ReportType;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Controller
 | 
				
			||||||
 | 
					@RequestMapping( method = RequestMethod.POST, path = "/import_bi_data" )
 | 
				
			||||||
 | 
					public class ImportBIDataController
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    private static Logger logger = LoggerFactory.getLogger( ImportBIDataRequest.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @RequestMapping( method = RequestMethod.POST, path = "/excel.do" )
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    public static ImportBIDataResponse importBIData( @RequestBody ImportBIDataRequest request )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ImportBIDataResponse response = new ImportBIDataResponse();
 | 
				
			||||||
 | 
					        String filePath = request.getFilePath();
 | 
				
			||||||
 | 
					        ReportType type = request.getReportType();
 | 
				
			||||||
 | 
					        int firstRow = request.getFirstRow();
 | 
				
			||||||
 | 
					        int sheetIndex = request.getSheetIndex();
 | 
				
			||||||
 | 
					        int importedCount = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( type == ReportType.TelsalerAttachingRateReport )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                importedCount = importBITelsalerAttachingRate( filePath, sheetIndex, firstRow );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else if ( type == ReportType.TelsalerRenewalRateReport )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                importedCount = importBITeslsalerRenewalRate( filePath, sheetIndex, firstRow );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else if ( type == ReportType.DepartmentAttachingRateReport )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                importedCount = importBIDepartmentAttachingRate( filePath, sheetIndex, firstRow );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else if ( type == ReportType.DepartmentRenewalRateReport )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                importedCount = importBIDepartmentRenewalRate( filePath, sheetIndex, firstRow );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setImportedCount( importedCount );
 | 
				
			||||||
 | 
					            response.setSuccess( true );
 | 
				
			||||||
 | 
					            response.setMessage( "导入成功" );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            String message = "加载文件错误,错误消息:" + error.getMessage();
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( message );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            logger.error( message, error );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( InvalidFormatException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            String message = "Excel文件格式错误,错误消息:" + error.getMessage();
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( message );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            logger.error( message, error );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( PersistenceException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            String message = "Mybatis执行错误,错误消息:" + error.getMessage();
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( message );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            logger.error( message, error );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return response;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static int importBITelsalerAttachingRate( String filePath, int sheetIndex,
 | 
				
			||||||
 | 
					            int firstRow ) throws PersistenceException, IOException, InvalidFormatException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					        int importedCount = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            ArrayList<BITelsalerAttachingRateRecord> records = ImportBIExcelData
 | 
				
			||||||
 | 
					                    .importBITelsalerAttachingRateRecordFromXlsx( filePath, sheetIndex, firstRow );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSessionBatch();
 | 
				
			||||||
 | 
					            ImportBIArchievementDataMapper mapper =
 | 
				
			||||||
 | 
					                    session.getMapper( ImportBIArchievementDataMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            mapper.cleanTelsalerAttachingRateData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( BITelsalerAttachingRateRecord record : records )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                mapper.insertTelsalerAttachingRateDataToDB( record );
 | 
				
			||||||
 | 
					                importedCount++;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            session.commit();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( Exception error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( session != null )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                session.rollback();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            throw error;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static int importBITeslsalerRenewalRate( String filePath, int sheetIndex, int firstRow )
 | 
				
			||||||
 | 
					            throws PersistenceException, IOException, InvalidFormatException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ArrayList<BITelsalerRenewalRateRecord> records = null;
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					        ImportBIArchievementDataMapper mapper = null;
 | 
				
			||||||
 | 
					        int importedCount = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            records = ImportBIExcelData.importBITelsalerRenewalRateFromXlsx( filePath, sheetIndex,
 | 
				
			||||||
 | 
					                    firstRow );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSessionBatch();
 | 
				
			||||||
 | 
					            mapper = session.getMapper( ImportBIArchievementDataMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 清理数据
 | 
				
			||||||
 | 
					            mapper.cleanTelsalerRenewalRateData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( BITelsalerRenewalRateRecord record : records )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                mapper.insertTelsalerRenewalRateDataToDB( record );
 | 
				
			||||||
 | 
					                importedCount++;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            session.commit();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( Exception error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( session != null )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                session.rollback();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            throw error;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static int importBIDepartmentAttachingRate( String filePath, int sheetIndex,
 | 
				
			||||||
 | 
					            int firstRow ) throws PersistenceException, IOException, InvalidFormatException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ArrayList<BIDepartmentAttachingRateRecord> records = null;
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					        ImportBIArchievementDataMapper mapper = null;
 | 
				
			||||||
 | 
					        int importedCount = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            records = ImportBIExcelData.importBIDepartmentAttachingRateRecordsFromXlsx( filePath,
 | 
				
			||||||
 | 
					                    sheetIndex, firstRow );
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSessionBatch();
 | 
				
			||||||
 | 
					            mapper = session.getMapper( ImportBIArchievementDataMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            mapper.cleanDepartmentAttachingRateData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( BIDepartmentAttachingRateRecord record : records )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                mapper.insertDepartmentAttachingRateDataToDB( record );
 | 
				
			||||||
 | 
					                importedCount++;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            session.commit();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( Exception error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( session != null )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                session.rollback();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            throw error;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static int importBIDepartmentRenewalRate( String filePath, int sheetIndex, int firstRow )
 | 
				
			||||||
 | 
					            throws PersistenceException, IOException, InvalidFormatException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ArrayList<BIDepartmentRenewalRateRecord> records = null;
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					        ImportBIArchievementDataMapper mapper = null;
 | 
				
			||||||
 | 
					        int importedCount = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            records = ImportBIExcelData.importBIDepartmentRenewalRateRecordsFromXlsx(filePath, sheetIndex, firstRow);
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSessionBatch();
 | 
				
			||||||
 | 
					            mapper = session.getMapper(ImportBIArchievementDataMapper.class);
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            mapper.cleanDepartmentRenewalRateData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( BIDepartmentRenewalRateRecord record : records )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                mapper.insertDepartmentRenewalRateDataToDB(record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                importedCount++;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            session.commit();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( Exception error)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( session != null )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                session.rollback();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            throw error;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,127 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-13 14:39:06
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/dataimport/bi/ImportBIDataRequest.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.dataimport.bi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Controller;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Controller
 | 
				
			||||||
 | 
					public class ImportBIDataRequest
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public enum ReportType {
 | 
				
			||||||
 | 
					        TelsalerAttachingRateReport, TelsalerRenewalRateReport, DepartmentAttachingRateReport, DepartmentRenewalRateReport
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 导入文件的路径
 | 
				
			||||||
 | 
					    @JsonProperty( "filePath" )
 | 
				
			||||||
 | 
					    private String     filePath;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 报表名称
 | 
				
			||||||
 | 
					    @JsonProperty( "reportType" )
 | 
				
			||||||
 | 
					    private ReportType reportType;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 是否有标题行
 | 
				
			||||||
 | 
					    @JsonProperty( "firstRow" )
 | 
				
			||||||
 | 
					    private int    firstRow;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // sheet索引
 | 
				
			||||||
 | 
					    @JsonProperty( "sheetIndex" )
 | 
				
			||||||
 | 
					    private int        sheetIndex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ImportBIDataRequest()
 | 
				
			||||||
 | 
					    {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public int getFirstRow()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return firstRow;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setFirstRow( int firstRow )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.firstRow = firstRow;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public int getSheetIndex()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return sheetIndex;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setSheetIndex( int sheetIndex )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.sheetIndex = sheetIndex;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getFilePath()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return filePath;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setFilePath( String filePath )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.filePath = filePath;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ReportType getReportType()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return reportType;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setReportType( ReportType reportType )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.reportType = reportType;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = 1;
 | 
				
			||||||
 | 
					        result = prime * result + ((filePath == null) ? 0 : filePath.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result + ((reportType == null) ? 0 : reportType.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result + firstRow;
 | 
				
			||||||
 | 
					        result = prime * result + sheetIndex;
 | 
				
			||||||
 | 
					        return result;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals( Object obj )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if ( this == obj )
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        if ( obj == null )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( getClass() != obj.getClass() )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        ImportBIDataRequest other = (ImportBIDataRequest) obj;
 | 
				
			||||||
 | 
					        if ( filePath == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.filePath != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if ( !filePath.equals( other.filePath ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( reportType != other.reportType )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( firstRow != other.firstRow )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( sheetIndex != other.sheetIndex )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "ImportBIDataRequest [filePath=" + filePath + ", reportType=" + reportType
 | 
				
			||||||
 | 
					                + ", firstRow=" + firstRow + ", sheetIndex=" + sheetIndex + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,78 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-13 14:39:58
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/dataimport/bi/ImportBIDataResponse.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.dataimport.bi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class ImportBIDataResponse extends QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    // 导入数量
 | 
				
			||||||
 | 
					    @JsonProperty( "importedCount" )
 | 
				
			||||||
 | 
					    int importedCount;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ImportBIDataResponse()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        importedCount = 0;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ImportBIDataResponse( boolean success, String message, int importedCount )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super( success, message );
 | 
				
			||||||
 | 
					        this.importedCount = importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ImportBIDataResponse( int importedCount )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.importedCount = importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "ImportBIDataResponse [importedCount=" + importedCount + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = super.hashCode();
 | 
				
			||||||
 | 
					        result = prime * result + importedCount;
 | 
				
			||||||
 | 
					        return result;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals( Object obj )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if ( this == obj )
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        if ( !super.equals( obj ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( getClass() != obj.getClass() )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        ImportBIDataResponse other = (ImportBIDataResponse) obj;
 | 
				
			||||||
 | 
					        if ( importedCount != other.importedCount )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public int getImportedCount()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setImportedCount( int importedCount )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.importedCount = importedCount;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,97 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-01-22 23:11:26
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-10-23 17:01:29
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/fileupload/FileUpload.java
 | 
				
			||||||
 | 
					 * @Description: 用于接受上传文件的Controller。
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.fileupload;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.File;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.time.LocalDateTime;
 | 
				
			||||||
 | 
					import java.time.ZoneOffset;
 | 
				
			||||||
 | 
					import java.util.Vector;
 | 
				
			||||||
 | 
					import javax.servlet.http.HttpServletRequest;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Controller;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestParam;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.ResponseBody;
 | 
				
			||||||
 | 
					import org.springframework.web.multipart.MultipartFile;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@SuppressWarnings( "unused" )
 | 
				
			||||||
 | 
					@Controller
 | 
				
			||||||
 | 
					@RequestMapping( path = "/file" )
 | 
				
			||||||
 | 
					public class FileUpload
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 接收上传文件,并保存到临时目录:
 | 
				
			||||||
 | 
					     * 1、临时目录下再用sessionID作为子目录保存文件。
 | 
				
			||||||
 | 
					     * 2、保存时不更改文件名,会覆盖同名文件。
 | 
				
			||||||
 | 
					     * 3、MultipartFile参数形参名称必须和请求form中file标签的name属性一致,否则值为null。
 | 
				
			||||||
 | 
					     * 4、返回值为接收结果和文件保存绝对路径。
 | 
				
			||||||
 | 
					     * @param taskName 任务名称字符串
 | 
				
			||||||
 | 
					     * @param files MultipartFile结构的文件对象
 | 
				
			||||||
 | 
					     * @param request HttpServletRequest对象实例
 | 
				
			||||||
 | 
					     * @return 返回一个FileUploadResult对象,包含上传结果。
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @RequestMapping( path = "/file-upload.do" )
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    public FileUploadResult getUploadFile( @RequestParam( "task-name" ) String taskName,
 | 
				
			||||||
 | 
					            @RequestParam( "files" ) MultipartFile file, HttpServletRequest request )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        // session id用来创建临时目录,避免重复
 | 
				
			||||||
 | 
					        String sessionID = request.getSession().getId();
 | 
				
			||||||
 | 
					        FileUploadResult result = new FileUploadResult();
 | 
				
			||||||
 | 
					        Vector<String> fileNames = new Vector<String>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        result.setSuccess( true );
 | 
				
			||||||
 | 
					        result.setMessage( "上传成功!" );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String filePath = request.getServletContext().getRealPath( "/temp/upload/" + sessionID );
 | 
				
			||||||
 | 
					        File dir = new File( filePath );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ( !dir.mkdirs() )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // 检查文件长度,如果为0则跳过
 | 
				
			||||||
 | 
					        if ( file.isEmpty() )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            result.setSuccess( false );
 | 
				
			||||||
 | 
					            result.setMessage( "不允许上传空文件。" );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // 保存文件到临时目录
 | 
				
			||||||
 | 
					            Long milliSecond =
 | 
				
			||||||
 | 
					                    LocalDateTime.now().toInstant( ZoneOffset.of( "+8" ) ).toEpochMilli();
 | 
				
			||||||
 | 
					            String fileName = String.valueOf( milliSecond ) + file.getOriginalFilename();
 | 
				
			||||||
 | 
					            // String fileName = file.getOriginalFilename();
 | 
				
			||||||
 | 
					            File destFile = new File( filePath, fileName );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                file.transferTo( destFile );
 | 
				
			||||||
 | 
					                // 把上传文件的绝对路径保存,返回给前端
 | 
				
			||||||
 | 
					                fileNames.add( destFile.getAbsolutePath() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                result.setSuccess( true );
 | 
				
			||||||
 | 
					                result.setMessage( "上传成功" );
 | 
				
			||||||
 | 
					                result.setFileList( fileNames );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch ( IOException error )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                result.setSuccess( false );
 | 
				
			||||||
 | 
					                result.setMessage( "上传失败,原因:" + error.getMessage() );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return result;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,54 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-01-23 22:56:17
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-10-06 00:32:47
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/FileUpload/FileUploadResult.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.fileupload;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Vector;
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@SuppressWarnings( "unused" )
 | 
				
			||||||
 | 
					public class FileUploadResult extends QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public FileUploadResult()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 构造函数
 | 
				
			||||||
 | 
					     * @param success 是否上传成功
 | 
				
			||||||
 | 
					     * @param message 消息字符串
 | 
				
			||||||
 | 
					     * @param fileList 文件绝对路径字符串数组
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public FileUploadResult( boolean success, 
 | 
				
			||||||
 | 
					                             String message, 
 | 
				
			||||||
 | 
					                             Vector<String> fileList )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super( success, message );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.fileList = fileList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Vector<String> getFileList()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return fileList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setFileList( Vector<String> fileList )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.fileList = fileList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "fileList" )
 | 
				
			||||||
 | 
					    private Vector<String> fileList;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -0,0 +1,91 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-09-21 11:35:57
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/rewards/AddTelsalerRequest.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.rewards;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class AddTelsalerRequest
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public AddTelsalerRequest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public AddTelsalerRequest( String rewardIndex, String telsalerName )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.rewardIndex = rewardIndex;
 | 
				
			||||||
 | 
					        this.telsalerName = telsalerName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getRewardIndex()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return rewardIndex;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setRewardIndex( String rewardIndex )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.rewardIndex = rewardIndex;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getTelsalerName()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return telsalerName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setTelsalerName( String telsalerName )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.telsalerName = telsalerName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "AddTelsalerRequest [rewardIndex=" + rewardIndex + ", telsalerName=" + telsalerName
 | 
				
			||||||
 | 
					                + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = 1;
 | 
				
			||||||
 | 
					        result = prime * result + ((rewardIndex == null) ? 0 : rewardIndex.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result + ((telsalerName == null) ? 0 : telsalerName.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;
 | 
				
			||||||
 | 
					        AddTelsalerRequest other = (AddTelsalerRequest) obj;
 | 
				
			||||||
 | 
					        if ( rewardIndex == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.rewardIndex != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        } else if ( !rewardIndex.equals( other.rewardIndex ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( telsalerName == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.telsalerName != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        } else if ( !telsalerName.equals( other.telsalerName ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("rewardIndex")
 | 
				
			||||||
 | 
					    private String rewardIndex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("telsalerName")
 | 
				
			||||||
 | 
					    private String telsalerName;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-09-21 11:35:57
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/rewards/AddTelsalerResponse.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.rewards;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class AddTelsalerResponse extends QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public AddTelsalerResponse()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public AddTelsalerResponse( boolean success, String message )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super( success, message );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,66 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-09-21 11:35:57
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/rewards/DeleteTelsalerRequest.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.rewards;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Arrays;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class DeleteTelsalerRequest
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public DeleteTelsalerRequest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public DeleteTelsalerRequest( int[] recordID)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.recordID = recordID;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "DeleteTelsalerRequest [recordID=" + Arrays.toString( recordID ) + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = 1;
 | 
				
			||||||
 | 
					        result = prime * result + Arrays.hashCode( recordID );
 | 
				
			||||||
 | 
					        return result;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals( Object obj )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if ( this == obj )
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        if ( obj == null )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( getClass() != obj.getClass() )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        DeleteTelsalerRequest other = (DeleteTelsalerRequest) obj;
 | 
				
			||||||
 | 
					        if ( !Arrays.equals( recordID, other.recordID ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public int[] getRecordID()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return recordID;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setRecordID( int[] recordID )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.recordID = recordID;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("recordID")
 | 
				
			||||||
 | 
					    private int[] recordID;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-09-21 11:35:57
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/rewards/DeleteTelsalerResponse.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.rewards;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class DeleteTelsalerResponse extends QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public DeleteTelsalerResponse()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public DeleteTelsalerResponse( boolean success, String message )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super( success, message );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,242 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-09-06 10:41:34
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/rewards/RewardController.java
 | 
				
			||||||
 | 
					 * @Description: 坐席奖励相关的请求
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.rewards;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import org.apache.ibatis.exceptions.PersistenceException;
 | 
				
			||||||
 | 
					import org.apache.ibatis.session.SqlSession;
 | 
				
			||||||
 | 
					import org.slf4j.Logger;
 | 
				
			||||||
 | 
					import org.slf4j.LoggerFactory;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Controller;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.PostMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestBody;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.ResponseBody;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.mapper.RewardsMapper;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.RewardGainer;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.RewardProject;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.utils.MybatisUtils;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@Controller
 | 
				
			||||||
 | 
					@RequestMapping( "/rewards" )
 | 
				
			||||||
 | 
					public class RewardController
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    // 日志
 | 
				
			||||||
 | 
					    private static Logger logger = LoggerFactory.getLogger( RewardController.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private RewardController()
 | 
				
			||||||
 | 
					    {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 相应查询获奖项目清单的请求
 | 
				
			||||||
 | 
					     * @return 获奖项目清单的response对象
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @PostMapping( "/query_reward_projects.do" )
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    public RewardProjectsResponse queryRewardProjecrts()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        RewardProjectsResponse response = new RewardProjectsResponse();
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        logger.debug( "查询奖项清单。" );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSession();
 | 
				
			||||||
 | 
					            session.clearCache();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            RewardsMapper mapper = session.getMapper( RewardsMapper.class );
 | 
				
			||||||
 | 
					            ArrayList<RewardProject> rewards = mapper.queryRewardProjects();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( true );
 | 
				
			||||||
 | 
					            response.setMessage( "查询成功!" );
 | 
				
			||||||
 | 
					            response.setRewardList( rewards );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            logger.debug( "查询奖项清单," + response.getMessage() + "," + rewards.toString() );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( "查询失败!" + error.getMessage() );
 | 
				
			||||||
 | 
					            response.setRewardList( null );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            logger.debug( "查询奖项清单," + response.getMessage() + "," + error.getMessage() );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return response;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @PostMapping( "/query_reward_gainers.do" )
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    RewardGainersResponse queryRewardGainers()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        RewardGainersResponse response = new RewardGainersResponse();
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSession();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            RewardsMapper mapper = session.getMapper( RewardsMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            ArrayList<RewardGainer> gainers = mapper.queryRewardTelsaler();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( true );
 | 
				
			||||||
 | 
					            response.setMessage( "查询成功!" );
 | 
				
			||||||
 | 
					            response.setGainerList( gainers );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( PersistenceException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( "查询失败!" + error.getMessage() );
 | 
				
			||||||
 | 
					            response.setGainerList( null );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( "查询失败!" + error.getMessage() );
 | 
				
			||||||
 | 
					            response.setGainerList( null );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return response;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @PostMapping( "/add_telsaler_reward.do" )
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    public AddTelsalerResponse addTelsalerReward( @RequestBody AddTelsalerRequest request )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        AddTelsalerResponse response = new AddTelsalerResponse();
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSession();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            RewardsMapper mapper = session.getMapper( RewardsMapper.class );
 | 
				
			||||||
 | 
					            HashMap<String, Object> params = new HashMap<>( 3 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            params.put( "a_reward_index", request.getRewardIndex() );
 | 
				
			||||||
 | 
					            params.put( "a_telsaler_name", request.getTelsalerName() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            mapper.addRewardTelSaler( params );
 | 
				
			||||||
 | 
					            session.commit();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( true );
 | 
				
			||||||
 | 
					            response.setMessage( "添加成功!" );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( PersistenceException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( session != null )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                session.rollback();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            logger.error( "添加获奖坐席失败,原因:" + error.getMessage() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( error.getMessage() );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            logger.error( "添加获奖坐席失败,原因:" + error.getMessage() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( error.getMessage() );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return response;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @PostMapping( "/delete_telsaler_reward.do" )
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    public DeleteTelsalerResponse deleteTelsalerReward( @RequestBody DeleteTelsalerRequest request )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        DeleteTelsalerResponse response = new DeleteTelsalerResponse();
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSession();
 | 
				
			||||||
 | 
					            RewardsMapper mapper = session.getMapper( RewardsMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            HashMap<String, Object> param = new HashMap<String, Object>( 3 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            int[] records = request.getRecordID();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( int index = 0; index < records.length; index++ )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                param.put( "a_rec_id", records[index] );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                mapper.deleteRewardTelSaler( param );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( true );
 | 
				
			||||||
 | 
					            response.setMessage( "删除成功!" );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            logger.error( "删除获奖坐席失败,原因:" + error.getMessage() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( error.getMessage() );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( PersistenceException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            logger.error( "删除获奖坐席失败,原因:" + error.getMessage() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( error.getMessage() );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return response;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @PostMapping( "update_telsaler_reward.do" )
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    UpdateTelsalerResponse updateTelsalerReward( @RequestBody UpdateTelsalerRequest request )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        UpdateTelsalerResponse response = new UpdateTelsalerResponse();
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSession();
 | 
				
			||||||
 | 
					            RewardsMapper mapper = session.getMapper( RewardsMapper.class );
 | 
				
			||||||
 | 
					            HashMap<String, Object> params = new HashMap<>( 3 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            params.put( "a_rec_id", request.getRecordID() );
 | 
				
			||||||
 | 
					            params.put( "a_telsaler_name", request.getTelsalerName() );
 | 
				
			||||||
 | 
					            params.put( "a_reward_index", request.getRewardIndex() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            mapper.updateRewardTelSaler( params );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( true );
 | 
				
			||||||
 | 
					            response.setMessage( "更新成功!" );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            logger.error( "更新获奖坐席失败,原因:" + error.getMessage() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( error.getMessage() );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( PersistenceException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            logger.error( "更新获奖坐席失败,原因:" + error.getMessage() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            response.setSuccess( false );
 | 
				
			||||||
 | 
					            response.setMessage( error.getMessage() );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return response;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,47 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-09-07 17:16:12
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/rewards/RewardGainersResponse.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.rewards;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.RewardGainer;
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class RewardGainersResponse extends QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public RewardGainersResponse( boolean success, String message,
 | 
				
			||||||
 | 
					            ArrayList<RewardGainer> gainerList)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super( success, message );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.gainerList = gainerList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public RewardGainersResponse()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.gainerList = null;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ArrayList<RewardGainer> getGainerList()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return gainerList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setGainerList( ArrayList<RewardGainer> gainerList )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.gainerList = gainerList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty( "gainerList" )
 | 
				
			||||||
 | 
					    private ArrayList<RewardGainer> gainerList;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,46 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-09-06 10:59:45
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/rewards/RewardProjectsResponse.java
 | 
				
			||||||
 | 
					 * @Description: 奖励项目请求结果
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.rewards;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.RewardProject;
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class RewardProjectsResponse extends QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public RewardProjectsResponse( boolean success, String message,
 | 
				
			||||||
 | 
					            ArrayList<RewardProject> rewardList)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super( success, message );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.rewardList = rewardList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public RewardProjectsResponse()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.rewardList = null;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ArrayList<RewardProject> getRewardList()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return rewardList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setRewardList( ArrayList<RewardProject> rewardList )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.rewardList = rewardList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("rewardList")
 | 
				
			||||||
 | 
					    private ArrayList<RewardProject> rewardList;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,109 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-09-21 16:01:51
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/rewards/UpdateTelsalerRequest.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.rewards;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class UpdateTelsalerRequest
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public UpdateTelsalerRequest() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public UpdateTelsalerRequest( int recordID, String rewardIndex, String telsalerName )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.recordID = recordID;
 | 
				
			||||||
 | 
					        this.rewardIndex = rewardIndex;
 | 
				
			||||||
 | 
					        this.telsalerName = telsalerName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getRewardIndex()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return rewardIndex;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setRewardIndex( String rewardIndex )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.rewardIndex = rewardIndex;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getTelsalerName()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return telsalerName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setTelsalerName( String telsalerName )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.telsalerName = telsalerName;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public int getRecordID()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return recordID;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setRecordID( int recordID )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        this.recordID = recordID;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return "UpdateTelsalerRequest [recordID=" + recordID + ", rewardIndex=" + rewardIndex
 | 
				
			||||||
 | 
					                + ", telsalerName=" + telsalerName + "]";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        final int prime = 31;
 | 
				
			||||||
 | 
					        int result = 1;
 | 
				
			||||||
 | 
					        result = prime * result + recordID;
 | 
				
			||||||
 | 
					        result = prime * result + ((rewardIndex == null) ? 0 : rewardIndex.hashCode());
 | 
				
			||||||
 | 
					        result = prime * result + ((telsalerName == null) ? 0 : telsalerName.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;
 | 
				
			||||||
 | 
					        UpdateTelsalerRequest other = (UpdateTelsalerRequest) obj;
 | 
				
			||||||
 | 
					        if ( recordID != other.recordID )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( rewardIndex == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.rewardIndex != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        } else if ( !rewardIndex.equals( other.rewardIndex ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        if ( telsalerName == null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( other.telsalerName != null )
 | 
				
			||||||
 | 
					                return false;
 | 
				
			||||||
 | 
					        } else if ( !telsalerName.equals( other.telsalerName ) )
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("recordID")
 | 
				
			||||||
 | 
					    private int recordID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("rewardIndex")
 | 
				
			||||||
 | 
					    private String rewardIndex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @JsonProperty("telsalerName")
 | 
				
			||||||
 | 
					    private String telsalerName;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-09-21 11:35:57
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/rewards/UpdateTelsalerResponsense.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.web.controllers.rewards;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.cpic.xim.web.controllers.QueryResponse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class UpdateTelsalerResponse extends QueryResponse
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public UpdateTelsalerResponse()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public UpdateTelsalerResponse( boolean success, String message )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        super( success, message );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<!DOCTYPE mapper  PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
					<!DOCTYPE mapper  PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
				
			||||||
<mapper namespace="com.cpic.xim.mybatis.mapper.ArchievementMapper">
 | 
					<mapper namespace="com.cpic.xim.mybatis.mapper.ArchievementMapper">
 | 
				
			||||||
    <select id="getDepartmentArchievement" statementType="CALLABLE" parameterType="java.util.HashMap"> 
 | 
					    <select id="getDepartmentArchievement" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap"> 
 | 
				
			||||||
        call telsale_archievement_pkg.department_archievement(
 | 
					        call telsale_archievement_pkg.department_archievement(
 | 
				
			||||||
            #{a_department_code, mode=IN, jdbcType=VARCHAR},
 | 
					            #{a_department_code, mode=IN, jdbcType=VARCHAR},
 | 
				
			||||||
            #{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
 | 
					            #{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
 | 
				
			||||||
@@ -9,6 +9,16 @@
 | 
				
			|||||||
            #{a_total, mode=OUT, jdbcType=INTEGER, javaType=Integer},
 | 
					            #{a_total, mode=OUT, jdbcType=INTEGER, javaType=Integer},
 | 
				
			||||||
            #{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
 | 
					            #{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
 | 
				
			||||||
    </select>
 | 
					    </select>
 | 
				
			||||||
 | 
					    <select id="getCallerArchievement" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
 | 
				
			||||||
 | 
					        call telsale_archievement_pkg.caller_archievement(
 | 
				
			||||||
 | 
					            #{a_caller_code, mode=IN, jdbcType=VARCHAR},
 | 
				
			||||||
 | 
					            #{a_attaching_rate, mode=OUT, jdbcType=VARCHAR},
 | 
				
			||||||
 | 
					            #{a_renewal_rate, mode=OUT, jdbcType=VARCHAR},
 | 
				
			||||||
 | 
					            #{a_total, mode=OUT, jdbcType=INTEGER, javaType=Integer},
 | 
				
			||||||
 | 
					            #{a_present_month, mode=OUT, jdbcType=DOUBLE, javaType=Double},
 | 
				
			||||||
 | 
					            #{a_mensual_cur, mode=OUT, jdbcType=CURSOR, resultMap=MensualArchievementMapper})
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <resultMap id="MensualArchievementMapper" type="MensualArchievementItem">
 | 
					    <resultMap id="MensualArchievementMapper" type="MensualArchievementItem">
 | 
				
			||||||
        <id property="month" column="mm" javaType="INT"/>
 | 
					        <id property="month" column="mm" javaType="INT"/>
 | 
				
			||||||
        <result property="premium" column="bf" />
 | 
					        <result property="premium" column="bf" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,53 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<!DOCTYPE mapper  PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
				
			||||||
 | 
					<mapper namespace="com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper">
 | 
				
			||||||
 | 
					    <insert id="insertTelsalerAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord">
 | 
				
			||||||
 | 
					        insert into BI电销坐席车非渗透率跟踪表 ( "部门","经办","车险保费(万)","车险保费占比","非车保费(万)",
 | 
				
			||||||
 | 
					        "当月保费渗透率","保费渗透率环比上月","当月客户渗透率","客户渗透率环比上月",
 | 
				
			||||||
 | 
					        "当月车非客均保费","客均保费环比上月" )
 | 
				
			||||||
 | 
					        values ( #{departmentName}, #{telsalerName}, #{motoPremium}, #{motoPremiumProportion}, #{nomotoPremium}, 
 | 
				
			||||||
 | 
					                 #{attachingRate},  #{attachingRateChange}, #{customerHandleRate},
 | 
				
			||||||
 | 
					                 #{customerHandleRateChange}, #{noMotoPremiumPerCustomer}, #{noMotoPremiumPerCustomerChange} )
 | 
				
			||||||
 | 
					    </insert>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <insert id="insertTelsalerRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
 | 
				
			||||||
 | 
					        insert into BI电销坐席续保率跟踪表 ("责任部门","责任人","机构目标值1(%)","到期数-全月",
 | 
				
			||||||
 | 
					                                         "序时到期数占比(%)","个车续保率(序时)(%)","个车续保率(全月)(%)",
 | 
				
			||||||
 | 
					                                         "环比昨日(%)","环比上月(%)","平均提前签单天数","环比")
 | 
				
			||||||
 | 
					        values (#{责任部门},#{责任人},#{机构目标值},#{到期数全月},#{序时到期数占比},
 | 
				
			||||||
 | 
					        #{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月},
 | 
				
			||||||
 | 
					        #{平均提前签单天数},#{环比})
 | 
				
			||||||
 | 
					    </insert>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <insert id="insertDepartmentAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord">
 | 
				
			||||||
 | 
					        insert into BI机构渗透率跟踪表 ( 部门,"目标值-机构",目标差距,"车险保费",
 | 
				
			||||||
 | 
					        车险保费占比,"非车保费",当月保费渗透率,保费渗透率环比上月,当月客户渗透率,
 | 
				
			||||||
 | 
					        客户渗透率环比上月,当月车非客均保费,客均保费环比上月,车险客户数)
 | 
				
			||||||
 | 
					        values (#{departmentName},#{departmentObject},#{objectGap},#{motoPremium},
 | 
				
			||||||
 | 
					        #{motoPremiumProPortion},#{nomotoPremium},#{attachingRate},#{attachingRateChange},
 | 
				
			||||||
 | 
					        #{customerHandleRate},#{customerHandleRateChange},#{premiumPerCustomer},#{premiumPerCustomerChange},
 | 
				
			||||||
 | 
					        #{motoInsuranceCustomerCount} )
 | 
				
			||||||
 | 
					    </insert>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <insert id="insertDepartmentRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord" >
 | 
				
			||||||
 | 
					        insert into BI机构当月个车续保率跟踪表( "责任部门","机构目标值1(%)","到期数-全月" ,"序时到期数占比(%)","个车续保率(序时)(%)",
 | 
				
			||||||
 | 
					        "个车续保率(全月)(%)","环比昨日(%)","环比上月(%)","平均提前签单天数","环比")
 | 
				
			||||||
 | 
					        values (#{责任部门},#{机构目标值},#{到期数全月},#{序时到期数占比},
 | 
				
			||||||
 | 
					        #{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月},
 | 
				
			||||||
 | 
					        #{平均提前签单天数},#{环比})
 | 
				
			||||||
 | 
					    </insert>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <select id="cleanTelsalerAttachingRateData" statementType="CALLABLE">
 | 
				
			||||||
 | 
					        call telsale_bi_utils.清理BI电销坐席车非渗透跟踪表()
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					    <select id="cleanTelsalerRenewalRateData" statementType="CALLABLE">
 | 
				
			||||||
 | 
					        call telsale_bi_utils.清理BI电销坐席续保率跟踪表()
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					    <select id="cleanDepartmentAttachingRateData" statementType="CALLABLE">
 | 
				
			||||||
 | 
					        call telsale_bi_utils.清理BI部门渗透率跟踪表()
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <select id="cleanDepartmentRenewalRateData" statementType="CALLABLE">
 | 
				
			||||||
 | 
					        call telsale_bi_utils.清理BI部门续保率跟踪表()
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					</mapper>
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<!DOCTYPE mapper  PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
					<!DOCTYPE mapper  PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
				
			||||||
<mapper namespace="com.cpic.xim.mybatis.mapper.RankingListMapper">
 | 
					<mapper namespace="com.cpic.xim.mybatis.mapper.RankingListMapper">
 | 
				
			||||||
    <select id="getRankingList" statementType="CALLABLE" parameterType="java.util.HashMap">
 | 
					    <select id="getRankingList" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
 | 
				
			||||||
        call telsale_archievement_pkg.caller_arch_ranking_list(
 | 
					        call telsale_archievement_pkg.caller_arch_ranking_list(
 | 
				
			||||||
            #{a_department_code,mode=IN,jdbcType=VARCHAR},
 | 
					            #{a_department_code,mode=IN,jdbcType=VARCHAR},
 | 
				
			||||||
            #{a_year,mode=IN,jdbcType=VARCHAR},
 | 
					            #{a_year,mode=IN,jdbcType=VARCHAR},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,50 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<!DOCTYPE mapper  PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
				
			||||||
 | 
					<mapper namespace="com.cpic.xim.mybatis.mapper.RewardsMapper">
 | 
				
			||||||
 | 
					    <select id="queryRewardProjects" resultMap="RewardProjectMap">
 | 
				
			||||||
 | 
					        select reward_index, reward_name from reward_projects order by reward_index desc
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					    <resultMap id="RewardProjectMap" type="com.cpic.xim.mybatis.pojo.RewardProject">
 | 
				
			||||||
 | 
					        <id property="rewardCode" column="reward_index" />
 | 
				
			||||||
 | 
					        <result property="rewardName" column="reward_name" javaType="String"/>
 | 
				
			||||||
 | 
					    </resultMap>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <select id="queryRewardTelsaler" flushCache="true" resultMap="RewardGainerMapper">
 | 
				
			||||||
 | 
					        SELECT hjr.rec_id rec_id,
 | 
				
			||||||
 | 
					               hjr.telsaler_name telsaler_name,
 | 
				
			||||||
 | 
					               hjr.telsaler_code telsaler_code,
 | 
				
			||||||
 | 
					               xm.reward_name reward_name,
 | 
				
			||||||
 | 
					               xm.reward_index reward_index
 | 
				
			||||||
 | 
					               FROM telsaler_reward hjr,
 | 
				
			||||||
 | 
					                    reward_projects xm
 | 
				
			||||||
 | 
					         WHERE hjr.reward_index = xm.reward_index
 | 
				
			||||||
 | 
					         order by xm.reward_index desc
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					    <resultMap id="RewardGainerMapper" type="com.cpic.xim.mybatis.pojo.RewardGainer">
 | 
				
			||||||
 | 
					        <id column="rec_id" property="recID" />
 | 
				
			||||||
 | 
					        <result column="telsaler_name" property="callerName" />
 | 
				
			||||||
 | 
					        <result column="telsaler_code" property="callerCode" />
 | 
				
			||||||
 | 
					        <result column="reward_name" property="rewardProjectName" />
 | 
				
			||||||
 | 
					        <result column="reward_index" property="rewardProjectCode" />
 | 
				
			||||||
 | 
					    </resultMap>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <select id="addRewardTelSaler" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
 | 
				
			||||||
 | 
					        call telsaler_reward_pkg.add_telsaler_reward(
 | 
				
			||||||
 | 
					            #{a_reward_index,mode=IN,jdbcType=VARCHAR},
 | 
				
			||||||
 | 
					            #{a_telsaler_name,mode=IN,jdbcType=VARCHAR})
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- 删除获奖坐席记录 -->
 | 
				
			||||||
 | 
					    <select id="deleteRewardTelSaler" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap">
 | 
				
			||||||
 | 
					        call telsaler_reward_pkg.delete_telsaler_reward(
 | 
				
			||||||
 | 
					             #{a_rec_id,mode=IN,jdbcType=INTEGER})
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- 更新获奖坐席 -->
 | 
				
			||||||
 | 
					    <select id="updateRewardTelSaler" statementType="CALLABLE" flushCache="true" parameterType="java.util.HashMap" >
 | 
				
			||||||
 | 
					        call telsaler_reward_pkg.update_telsaler_reward(
 | 
				
			||||||
 | 
					            #{a_rec_id,mode=IN,jdbcType=INTEGER},
 | 
				
			||||||
 | 
					            #{a_telsaler_name,mode=IN,jdbcType=VARCHAR},
 | 
				
			||||||
 | 
					            #{a_reward_index,mode=IN,jdbcType=VARCHAR})
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					</mapper>
 | 
				
			||||||
@@ -25,5 +25,7 @@
 | 
				
			|||||||
        <!-- <mapper resource="mybatis/mapper/StaffMapper.xml" /> -->
 | 
					        <!-- <mapper resource="mybatis/mapper/StaffMapper.xml" /> -->
 | 
				
			||||||
        <mapper resource="mybatis/mapper/ArchievementMapper.xml" />
 | 
					        <mapper resource="mybatis/mapper/ArchievementMapper.xml" />
 | 
				
			||||||
        <mapper resource="mybatis/mapper/RankingListMapper.xml" />
 | 
					        <mapper resource="mybatis/mapper/RankingListMapper.xml" />
 | 
				
			||||||
 | 
					        <mapper resource="mybatis/mapper/RewardsMapper.xml" />
 | 
				
			||||||
 | 
					        <mapper resource="mybatis/mapper/ImportBIArchievementDataMapper.xml" />  
 | 
				
			||||||
    </mappers>
 | 
					    </mappers>
 | 
				
			||||||
</configuration>
 | 
					</configuration>
 | 
				
			||||||
@@ -0,0 +1,151 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2023-10-12 10:43:31
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /desktop_archievement_backend/src/test/java/com/cpic/xim/DesktopArchievement/test/BatchInsertTest.java
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.DesktopArchievement.test;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import org.apache.ibatis.exceptions.PersistenceException;
 | 
				
			||||||
 | 
					import org.apache.ibatis.session.SqlSession;
 | 
				
			||||||
 | 
					import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 | 
				
			||||||
 | 
					import org.junit.Test;
 | 
				
			||||||
 | 
					import org.slf4j.Logger;
 | 
				
			||||||
 | 
					import org.slf4j.LoggerFactory;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.utils.MybatisUtils;
 | 
				
			||||||
 | 
					import com.cpic.xim.utils.data.ImportBIExcelData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class BatchInsertTest
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    private static Logger logger = LoggerFactory.getLogger(BatchInsertTest.class);
 | 
				
			||||||
 | 
					    @Test
 | 
				
			||||||
 | 
					    public void testBatchInsertIntoBITelsalerAttachingRate()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/经办 (2).xlsx";
 | 
				
			||||||
 | 
					        ArrayList<BITelsalerRenewalRateRecord> records = null;
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					        ImportBIArchievementDataMapper mapper = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            records = ImportBIExcelData.importBITelsalerRenewalRateFromXlsx( filePath, 0,
 | 
				
			||||||
 | 
					                    1 );
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSessionBatch();
 | 
				
			||||||
 | 
					            mapper = session.getMapper( ImportBIArchievementDataMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            mapper.cleanTelsalerRenewalRateData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( BITelsalerRenewalRateRecord record : records )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                mapper.insertTelsalerRenewalRateDataToDB( record );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            session.commit();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            assert (true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( PersistenceException error)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            System.out.println(error);
 | 
				
			||||||
 | 
					            assert( false );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch(InvalidFormatException error)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( Exception error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( session != null )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                session.rollback();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                assert (false);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Test
 | 
				
			||||||
 | 
					    public void testBatchInsertBITeslsalerRenewalRate()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/坐席-续保.xlsx";
 | 
				
			||||||
 | 
					        ArrayList<BITelsalerRenewalRateRecord> records = null;
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					        ImportBIArchievementDataMapper mapper = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSessionBatch();
 | 
				
			||||||
 | 
					            mapper = session.getMapper( ImportBIArchievementDataMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            records = ImportBIExcelData.importBITelsalerRenewalRateFromXlsx( filePath, 0, 1 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // 清理数据
 | 
				
			||||||
 | 
					            mapper.cleanTelsalerRenewalRateData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( BITelsalerRenewalRateRecord record : records )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                mapper.insertTelsalerRenewalRateDataToDB( record );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            session.commit();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            System.out.println( records );
 | 
				
			||||||
 | 
					            assert (!records.isEmpty());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( Exception error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            logger.error("出现错误", error);
 | 
				
			||||||
 | 
					            assert (false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if ( session != null )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                session.rollback();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Test
 | 
				
			||||||
 | 
					    public void testBatchInsertBIDepartmentAttachingRateToDB()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/机构渗透.xlsx";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ArrayList<BIDepartmentAttachingRateRecord> records = null;
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					        ImportBIArchievementDataMapper mapper = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            records =
 | 
				
			||||||
 | 
					                    ImportBIExcelData.importBIDepartmentAttachingRateRecordsFromXlsx( filePath, 0, 1 );
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSessionBatch();
 | 
				
			||||||
 | 
					            mapper = session.getMapper( ImportBIArchievementDataMapper.class );
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            mapper.cleanDepartmentAttachingRateData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            for ( BIDepartmentAttachingRateRecord record : records )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                mapper.insertDepartmentAttachingRateDataToDB( record );
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            session.commit();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( Exception error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if ( session != null )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                session.rollback();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            logger.error("错误", error);
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            assert( false );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -23,15 +23,18 @@ import org.junit.Test;
 | 
				
			|||||||
import org.slf4j.Logger;
 | 
					import org.slf4j.Logger;
 | 
				
			||||||
import org.slf4j.LoggerFactory;
 | 
					import org.slf4j.LoggerFactory;
 | 
				
			||||||
import com.cpic.xim.mybatis.mapper.ArchievementMapper;
 | 
					import com.cpic.xim.mybatis.mapper.ArchievementMapper;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.mapper.RewardsMapper;
 | 
				
			||||||
import com.cpic.xim.mybatis.pojo.MensualArchievementItem;
 | 
					import com.cpic.xim.mybatis.pojo.MensualArchievementItem;
 | 
				
			||||||
import com.cpic.xim.utils.archievement.DepartmentArchievement;
 | 
					import com.cpic.xim.mybatis.pojo.RewardGainer;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.pojo.RewardProject;
 | 
				
			||||||
 | 
					import com.cpic.xim.mybatis.utils.MybatisUtils;
 | 
				
			||||||
import com.cpic.xim.utils.ranking.CallerRankingList;
 | 
					import com.cpic.xim.utils.ranking.CallerRankingList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@SuppressWarnings( "all" )
 | 
					@SuppressWarnings( "all" )
 | 
				
			||||||
public class DesktopArchievementTest
 | 
					public class DesktopArchievementTest
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    private static String configFilePath = "mybatis/mybatis-config.xml";
 | 
					    private static String configFilePath = "mybatis/mybatis-config.xml";
 | 
				
			||||||
    private static Logger logger = LoggerFactory.getLogger(DesktopArchievementTest.class);
 | 
					    private static Logger logger = LoggerFactory.getLogger( DesktopArchievementTest.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Test
 | 
					    @Test
 | 
				
			||||||
    public void testCallerRankingList()
 | 
					    public void testCallerRankingList()
 | 
				
			||||||
@@ -46,7 +49,7 @@ public class DesktopArchievementTest
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            String message = "获取排行榜失败,原因:" + error.getMessage();
 | 
					            String message = "获取排行榜失败,原因:" + error.getMessage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            logger.error(message, error);
 | 
					            logger.error( message, error );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        assertNotNull( rankingList );
 | 
					        assertNotNull( rankingList );
 | 
				
			||||||
@@ -85,17 +88,75 @@ public class DesktopArchievementTest
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Test
 | 
					    @Test
 | 
				
			||||||
    public void testDepartmentArchievement2()
 | 
					    public void testCallerArchievement()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        try
 | 
					        try
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            DepartmentArchievement arch = DepartmentArchievement.getDepartmentArchievement( "QDI" );
 | 
					            SqlSession session = MybatisUtils.getSqlSession();
 | 
				
			||||||
 | 
					            ArchievementMapper mapper = session.getMapper( ArchievementMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            System.out.println( arch.toString() );
 | 
					            ArrayList<MensualArchievementItem> mensual = null;
 | 
				
			||||||
 | 
					            HashMap<String, Object> params = new HashMap<>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            params.put( "a_caller_code", "61136" );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            mapper.getCallerArchievement( params );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Object obj = params.get( "a_mensual_cur" );
 | 
				
			||||||
 | 
					            mensual = (ArrayList<MensualArchievementItem>) params.get( "a_mensual_cur" );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            System.out.println( params.toString() );
 | 
				
			||||||
 | 
					            System.out.println( mensual.toString() );
 | 
				
			||||||
 | 
					            System.out.println( obj.getClass() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            assertTrue( params.size() > 1 );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        catch ( IOException error )
 | 
					        catch ( IOException error )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            assert (false);
 | 
					            assert (false);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Test
 | 
				
			||||||
 | 
					    public void testRewardProjects()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            SqlSession session = MybatisUtils.getSqlSession();
 | 
				
			||||||
 | 
					            RewardsMapper mapper = session.getMapper( RewardsMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            ArrayList<RewardProject> rewards = mapper.queryRewardProjects();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            System.out.println( rewards );
 | 
				
			||||||
 | 
					            assert (rewards.isEmpty() == false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            assert (false);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Test
 | 
				
			||||||
 | 
					    public void testQueryGainers()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        SqlSession session = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            session = MybatisUtils.getSqlSession();
 | 
				
			||||||
 | 
					            RewardsMapper mapper = session.getMapper( RewardsMapper.class );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            ArrayList<RewardGainer> gainers = mapper.queryRewardTelsaler();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            System.out.println( gainers );
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            assert( gainers != null );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch ( IOException error )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            System.out.println( error.getMessage() );
 | 
				
			||||||
 | 
					            assert (false);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								数据/测试用/坐席-渗透.xlsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								数据/测试用/坐席-渗透.xlsx
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user