开始开发车非渗透率BI表导入功能。
加入一些测试用数据文件。
This commit is contained in:
parent
e5dfb45c79
commit
041ec287b9
33
code/db/建表/电销坐席车非渗透统计表.sql
Normal file
33
code/db/建表/电销坐席车非渗透统计表.sql
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
-- Create table
|
||||||
|
create table 电销坐席车非渗透统计表
|
||||||
|
(
|
||||||
|
summary_date DATE default sysdate not null,
|
||||||
|
telsaler_name VARCHAR2(20) not null,
|
||||||
|
moto_premium NUMBER default 0 not null,
|
||||||
|
nomoto_premium NUMBER default 0 not null,
|
||||||
|
moto_premium_proportion NUMBER default 0 not null,
|
||||||
|
attaching_rate NUMBER default 0 not null,
|
||||||
|
attaching_rate_change NUMBER default 0 not null
|
||||||
|
)
|
||||||
|
tablespace DESKTOP_ARCHIEVEMENT
|
||||||
|
pctfree 10
|
||||||
|
initrans 1
|
||||||
|
maxtrans 255;
|
||||||
|
-- Add comments to the table
|
||||||
|
comment on table 电销坐席车非渗透统计表
|
||||||
|
is '用于存放BI导出每日电销坐席车险非车险保费和车非渗透率数据。';
|
||||||
|
-- Add comments to the columns
|
||||||
|
comment on column 电销坐席车非渗透统计表.summary_date
|
||||||
|
is '统计日期';
|
||||||
|
comment on column 电销坐席车非渗透统计表.telsaler_name
|
||||||
|
is '坐席名称';
|
||||||
|
comment on column 电销坐席车非渗透统计表.moto_premium
|
||||||
|
is '车险保费';
|
||||||
|
comment on column 电销坐席车非渗透统计表.nomoto_premium
|
||||||
|
is '非车险保费';
|
||||||
|
comment on column 电销坐席车非渗透统计表.moto_premium_proportion
|
||||||
|
is '车险保费占比';
|
||||||
|
comment on column 电销坐席车非渗透统计表.attaching_rate
|
||||||
|
is '渗透率';
|
||||||
|
comment on column 电销坐席车非渗透统计表.attaching_rate_change
|
||||||
|
is '渗透率环比上月';
|
@ -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,19 +117,26 @@
|
|||||||
<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 -->
|
<!-- POI -->
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
|
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi</artifactId>
|
<artifactId>poi</artifactId>
|
||||||
<version>5.2.4</version>
|
<version>5.2.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
|
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
<version>5.2.4</version>
|
<version>5.2.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -0,0 +1,188 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-10-08 14:45:13
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/TelsalerAttachingRateRecord.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 TelsalerAttachingRateRecord
|
||||||
|
{
|
||||||
|
// 统计日期
|
||||||
|
@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;
|
||||||
|
|
||||||
|
public TelsalerAttachingRateRecord() {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "TelsalerAttachingRateRecord [summaryDate=" + summaryDate + ", telsalerName="
|
||||||
|
+ telsalerName + ", motoPremium=" + motoPremium + ", nomotoPremium=" + nomotoPremium
|
||||||
|
+ ", motoPremiumProportion=" + motoPremiumProportion + ", attachingRate="
|
||||||
|
+ attachingRate + ", attachingRateChange=" + attachingRateChange + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
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));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals( Object obj )
|
||||||
|
{
|
||||||
|
if ( this == obj )
|
||||||
|
return true;
|
||||||
|
if ( obj == null )
|
||||||
|
return false;
|
||||||
|
if ( getClass() != obj.getClass() )
|
||||||
|
return false;
|
||||||
|
TelsalerAttachingRateRecord other = (TelsalerAttachingRateRecord) obj;
|
||||||
|
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;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-10-08 15:02:15
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/TelsalerArchievementData.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.openxml4j.exceptions.InvalidFormatException;
|
||||||
|
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||||
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import com.cpic.xim.mybatis.pojo.TelsalerAttachingRateRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 坐席业绩相关的数据操作方法。
|
||||||
|
*/
|
||||||
|
public class TelsalerArchievementData
|
||||||
|
{
|
||||||
|
public static ArrayList<TelsalerAttachingRateRecord> importTelsalerAttachingRateRecordFromXlsx(
|
||||||
|
String filePath ) throws IOException, InvalidFormatException
|
||||||
|
{
|
||||||
|
ArrayList<TelsalerAttachingRateRecord> records = new ArrayList<>( 200 );
|
||||||
|
|
||||||
|
Workbook wb = null;
|
||||||
|
Sheet sheet = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
wb = WorkbookFactory.create( new File(filePath));
|
||||||
|
sheet = wb.getSheet("经办");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if ( wb != null )
|
||||||
|
{
|
||||||
|
wb.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch ( IOException error )
|
||||||
|
{
|
||||||
|
error.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
}
|
BIN
数据/测试用/TWr业务员人力查询 - 坐席清单.xlsx
Normal file
BIN
数据/测试用/TWr业务员人力查询 - 坐席清单.xlsx
Normal file
Binary file not shown.
BIN
数据/测试用/坐席清单.xlsx
Normal file
BIN
数据/测试用/坐席清单.xlsx
Normal file
Binary file not shown.
BIN
数据/测试用/坐席续保率 - 当月个车续保率跟踪报表【机构】.xlsx
Normal file
BIN
数据/测试用/坐席续保率 - 当月个车续保率跟踪报表【机构】.xlsx
Normal file
Binary file not shown.
BIN
数据/测试用/坐席车非渗透 - 副本.xlsx
Normal file
BIN
数据/测试用/坐席车非渗透 - 副本.xlsx
Normal file
Binary file not shown.
BIN
数据/测试用/坐席车非渗透.xlsx
Normal file
BIN
数据/测试用/坐席车非渗透.xlsx
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user