From 321ff39e1cba45446fd28b6e7b6e5d6dc1e385ff Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Oct 2023 00:36:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=BF=9B=E5=BA=A6!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xim/utils/data/ImportBIExcelData.java | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/ImportBIExcelData.java b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/ImportBIExcelData.java index 510417b..1aa620e 100644 --- a/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/ImportBIExcelData.java +++ b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/ImportBIExcelData.java @@ -2,7 +2,7 @@ * @Author: Kane * @Date: 2023-10-08 15:02:15 * @LastEditors: Kane - * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/ImportBIData.java + * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/ImportBIExcelData.java * @Description: 坐席业绩相关的数据操作方法。 * * Copyright (c) ${2023} by Kane, All Rights Reserved. @@ -26,9 +26,22 @@ import com.cpic.xim.utils.poi.MyPOIUtils; /** * 坐席业绩相关的数据操作方法。 */ -public class ImportBIExcelData +public final class ImportBIExcelData { - private static Logger logger = LoggerFactory.getLogger( ImportBIExcelData.class ); + private static Logger logger = + LoggerFactory.getLogger( ImportBIExcelData.class ); + + private static String[] TelsalerAttachingRateExcelTitle = new String[] + { "部门", "经办", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "当月客户渗透率", "客户渗透率环比上月", + "当月车非客均保费", "客均保费环比上月"}; + + private static String[] TelSalerRenewalRateExcelTitle = new String[] + { "责任人", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)", + "环比上月(%)"}; + + private static String[] DepartmentArchievementExcelTitle = new String[] + { "部门", "目标值-机构", "目标差距", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "当月客户渗透率", + "客户渗透率环比上月", "当月车非客均保费", "客均保费环比上月"}; /** * 从excel文件读取坐席的车非渗透率数据 @@ -50,7 +63,7 @@ public class ImportBIExcelData try { wb = WorkbookFactory.create( new File( filePath ) ); - sheet = wb.getSheetAt(SheetIndex); + sheet = wb.getSheetAt( SheetIndex ); for ( Row row : sheet ) { @@ -95,10 +108,10 @@ public class ImportBIExcelData MyPOIUtils.getNumbericCellValue( row, 10 ); BITelsalerAttachingRateRecord record = new BITelsalerAttachingRateRecord( - LocalDate.now(), name, motoPremium, nomotoPremium, motoPremiumProPortion, - attachingRate, attachingRateChange, customerHandleRateCell, - customerHandleRateChangeCell, noMotoPremiumPerCustomerCell, - noMotoPremiumPerCustomerChangeCell ); + LocalDate.now(), name, motoPremium, nomotoPremium, + motoPremiumProPortion, attachingRate, attachingRateChange, + customerHandleRateCell, customerHandleRateChangeCell, + noMotoPremiumPerCustomerCell, noMotoPremiumPerCustomerChangeCell ); records.add( record ); } @@ -183,8 +196,8 @@ public class ImportBIExcelData double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 6 ); double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 7 ); - BITelsalerRenewalRateRecord record = new BITelsalerRenewalRateRecord( 责任人, 机构目标值, - 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月 ); + BITelsalerRenewalRateRecord record = new BITelsalerRenewalRateRecord( 责任人, + 机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月 ); records.add( record ); } @@ -241,7 +254,7 @@ public class ImportBIExcelData { String departmentName = MyPOIUtils.getStringCellValue( row, 0 ); - if ( departmentName.isEmpty() || departmentName.equals("合计") ) + if ( departmentName.isEmpty() || departmentName.equals( "合计" ) ) { continue; }