变更报表内容。
This commit is contained in:
parent
506f18abfe
commit
a33981ac55
@ -28,6 +28,7 @@ CREATE OR REPLACE PACKAGE telsale_archievement_pkg IS
|
||||
a_attaching_rate OUT VARCHAR2,
|
||||
a_renewal_rate OUT VARCHAR2,
|
||||
a_total OUT INTEGER,
|
||||
a_present_month OUT NUMBER,
|
||||
a_mensual_cur OUT cur_type
|
||||
);
|
||||
|
||||
@ -90,7 +91,7 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
||||
SELECT round(dept.当月保费渗透率,
|
||||
2)
|
||||
INTO A_ATTACHING_RATE
|
||||
FROM desktop_archievement_admin.bi部门渗透率续保率统计表 dept
|
||||
FROM desktop_archievement_admin.BI机构渗透率跟踪表 dept
|
||||
WHERE dept.部门 = L_DEPARTMENT_NAME;
|
||||
--续保率
|
||||
/*SELECT DECODE(SUM(到期数),
|
||||
@ -141,6 +142,7 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
||||
a_attaching_rate OUT VARCHAR2,
|
||||
a_renewal_rate OUT VARCHAR2,
|
||||
a_total OUT INTEGER,
|
||||
a_present_month OUT NUMBER,
|
||||
a_mensual_cur OUT cur_type
|
||||
) IS
|
||||
l_caller_name VARCHAR2(100);
|
||||
@ -182,11 +184,15 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
||||
SELECT rownum,
|
||||
round(nvl(t.当月保费渗透率,
|
||||
0),
|
||||
2),
|
||||
round(nvl(t."车险保费(万)" * 10000,
|
||||
0),
|
||||
2)
|
||||
INTO l_rownum,
|
||||
a_attaching_rate
|
||||
FROM BI电销坐席车非渗透统计表 t
|
||||
WHERE t.坐席名称 = l_caller_name
|
||||
a_attaching_rate,
|
||||
a_present_month
|
||||
FROM BI电销坐席车非渗透率跟踪表 t
|
||||
WHERE t.经办 = l_caller_name
|
||||
AND rownum = 1;
|
||||
/*SELECT decode(nvl(SUM(cf.车险个人客户保费),
|
||||
0),
|
||||
@ -211,12 +217,12 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
||||
FROM 坐席续保统计 xb
|
||||
WHERE xb.坐席工号 = a_caller_code;*/
|
||||
SELECT rownum,
|
||||
round(nvl(t.个车续保率全月,
|
||||
round(nvl(t."个车续保率(全月)(%)",
|
||||
0),
|
||||
2)
|
||||
INTO l_rownum,
|
||||
a_renewal_rate
|
||||
FROM BI坐席续保率统计表 t
|
||||
FROM BI电销坐席续保率跟踪表 t
|
||||
WHERE t.责任人 = l_caller_name
|
||||
AND rownum = 1;
|
||||
|
||||
@ -263,14 +269,14 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
||||
-- 车非融合率排行榜
|
||||
OPEN A_ATTACHING_RANKING_LIST FOR
|
||||
SELECT rownum,
|
||||
paihang.坐席名称 AS caller_name,
|
||||
paihang.经办 AS caller_name,
|
||||
paihang.attaching_rate
|
||||
FROM (SELECT DISTINCT *
|
||||
FROM (SELECT t.坐席名称,
|
||||
FROM (SELECT t.经办,
|
||||
round(t.当月保费渗透率,
|
||||
2) attaching_rate,
|
||||
zuoxi.department_name
|
||||
FROM BI电销坐席车非渗透统计表 t,
|
||||
FROM BI电销坐席车非渗透率跟踪表 t,
|
||||
(SELECT DISTINCT t.saler_code,
|
||||
t.saler_name,
|
||||
t.team_code,
|
||||
@ -282,7 +288,7 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
||||
WHERE t.team_code = team.team_code
|
||||
AND team.department_code = bm.department_code
|
||||
AND bm.department_name = L_DEPARTMENT_NAME) zuoxi
|
||||
WHERE t.坐席名称 = zuoxi.saler_name) st
|
||||
WHERE t.经办 = zuoxi.saler_name) st
|
||||
ORDER BY st.department_name,
|
||||
st.attaching_rate DESC) paihang;
|
||||
-- 续保率排行榜
|
||||
@ -292,10 +298,10 @@ CREATE OR REPLACE PACKAGE BODY TELSALE_ARCHIEVEMENT_PKG IS
|
||||
paihang.xbl AS RENEWAL_RATE
|
||||
FROM (SELECT DISTINCT *
|
||||
FROM (SELECT t.责任人,
|
||||
round(t.个车续保率全月,
|
||||
round(t."个车续保率(全月)(%)",
|
||||
2) xbl,
|
||||
zuoxi.department_name
|
||||
FROM BI坐席续保率统计表 t,
|
||||
FROM BI电销坐席续保率跟踪表 t,
|
||||
(SELECT DISTINCT t.saler_code,
|
||||
t.saler_name,
|
||||
t.team_code,
|
||||
|
@ -4,9 +4,9 @@ CREATE OR REPLACE PACKAGE telsale_bi_utils IS
|
||||
-- Created : 2023/10/12 15:31:13
|
||||
-- Purpose : bi数据报表相关的工具
|
||||
|
||||
PROCEDURE 清理BI电销坐席车非渗透统计表;
|
||||
PROCEDURE 清理BI电销坐席车非渗透率跟踪表;
|
||||
|
||||
PROCEDURE 清理BI电销坐席续保率统计表;
|
||||
PROCEDURE 清理BI电销坐席续保率跟踪表;
|
||||
|
||||
PROCEDURE 清理BI部门渗透率跟踪表;
|
||||
|
||||
@ -16,19 +16,19 @@ END telsale_bi_utils;
|
||||
/
|
||||
CREATE OR REPLACE PACKAGE BODY telsale_bi_utils IS
|
||||
|
||||
PROCEDURE 清理BI电销坐席车非渗透统计表 IS
|
||||
PROCEDURE 清理BI电销坐席车非渗透率跟踪表 IS
|
||||
BEGIN
|
||||
EXECUTE IMMEDIATE 'truncate table BI电销坐席车非渗透统计表';
|
||||
EXECUTE IMMEDIATE 'truncate table BI电销坐席车非渗透率跟踪表';
|
||||
END;
|
||||
|
||||
PROCEDURE 清理BI电销坐席续保率统计表 IS
|
||||
PROCEDURE 清理BI电销坐席续保率跟踪表 IS
|
||||
BEGIN
|
||||
EXECUTE IMMEDIATE 'truncate table BI坐席续保率统计表';
|
||||
EXECUTE IMMEDIATE 'truncate table BI电销坐席续保率跟踪表';
|
||||
END;
|
||||
|
||||
PROCEDURE 清理BI部门渗透率跟踪表 IS
|
||||
BEGIN
|
||||
EXECUTE IMMEDIATE 'truncate table BI部门渗透率续保率统计表';
|
||||
EXECUTE IMMEDIATE 'truncate table BI机构渗透率跟踪表';
|
||||
END;
|
||||
|
||||
PROCEDURE 清理BI部门续保率跟踪表 IS
|
||||
|
@ -1,14 +1,15 @@
|
||||
--drop table BI坐席续保率统计表;
|
||||
create table BI坐席续保率统计表
|
||||
drop table BI电销坐席续保率跟踪表;
|
||||
create table BI电销坐席续保率跟踪表
|
||||
(
|
||||
summary_date date default sysdate not null,
|
||||
责任人 varchar2(20) not null,
|
||||
机构目标值 NUMBER default 0 not null,
|
||||
到期数全月 NUMBER default 0 not null,
|
||||
序时到期数占比 NUMBER default 0 not null,
|
||||
个车续保率序时 NUMBER default 0 not null,
|
||||
个车续保率全月 NUMBER default 0 not null,
|
||||
环比昨日 NUMBER default 0 not null,
|
||||
环比上月 NUMBER default 0 not null
|
||||
);
|
||||
comment on table BI坐席续保率统计表 is '用于存放BI导出电销坐席全月续保率数据。';
|
||||
"责任部门" varchar2(100),
|
||||
"责任人" varchar2(30),
|
||||
"机构目标值1(%)" number default 0,
|
||||
"到期数-全月" integer default 0,
|
||||
"序时到期数占比(%)" number default 0,
|
||||
"个车续保率(序时)(%)" number default 0,
|
||||
"个车续保率(全月)(%)" number default 0,
|
||||
"环比昨日(%)" number default 0,
|
||||
"环比上月(%)" number default 0,
|
||||
"平均提前签单天数" integer default 0,
|
||||
"环比" number
|
||||
)
|
||||
|
14
code/db/建表/BI电销坐席续保率跟踪表.sql
Normal file
14
code/db/建表/BI电销坐席续保率跟踪表.sql
Normal file
@ -0,0 +1,14 @@
|
||||
--drop table BI坐席续保率统计表;
|
||||
create table BI坐席续保率统计表
|
||||
(
|
||||
summary_date date default sysdate not null,
|
||||
责任人 varchar2(20) not null,
|
||||
机构目标值 NUMBER default 0 not null,
|
||||
到期数全月 NUMBER default 0 not null,
|
||||
序时到期数占比 NUMBER default 0 not null,
|
||||
个车续保率序时 NUMBER default 0 not null,
|
||||
个车续保率全月 NUMBER default 0 not null,
|
||||
环比昨日 NUMBER default 0 not null,
|
||||
环比上月 NUMBER default 0 not null
|
||||
);
|
||||
comment on table BI坐席续保率统计表 is '用于存放BI导出电销坐席全月续保率数据。';
|
14
code/db/建表/BI电销坐席车非渗透率跟踪表.sql
Normal file
14
code/db/建表/BI电销坐席车非渗透率跟踪表.sql
Normal file
@ -0,0 +1,14 @@
|
||||
create table BI电销坐席车非渗透率跟踪表
|
||||
(
|
||||
"部门" varchar2(100),
|
||||
"经办" varchar2(100) not null,
|
||||
"车险保费(万)" number default 0,
|
||||
"车险保费占比" number default 0,
|
||||
"非车保费(万)" number default 0,
|
||||
"当月保费渗透率" number default 0,
|
||||
"保费渗透率环比上月" number default 0,
|
||||
"当月客户渗透率" number default 0,
|
||||
"客户渗透率环比上月" number default 0,
|
||||
"当月车非客均保费" number default 0,
|
||||
"客均保费环比上月" number default 0
|
||||
);
|
@ -1,23 +0,0 @@
|
||||
-- Create table
|
||||
create table BI电销坐席车非渗透统计表
|
||||
(
|
||||
summary_date DATE default sysdate not null,
|
||||
坐席名称 varchar2(20) not null,
|
||||
车险保费 NUMBER default 0 not null,
|
||||
车险保费占比 NUMBER default 0 not null,
|
||||
非车保费 NUMBER default 0 not null,
|
||||
当月保费渗透率 NUMBER default 0 not null,
|
||||
保费渗透率环比上月 NUMBER default 0 not null,
|
||||
当月客户渗透率 NUMBER default 0 not null,
|
||||
客户渗透率环比上月 NUMBER default 0 not null,
|
||||
当月车非客均保费 NUMBER default 0 not null,
|
||||
客均保费环比上月 NUMBER default 0 not null
|
||||
)
|
||||
tablespace DESKTOP_ARCHIEVEMENT
|
||||
pctfree 10
|
||||
initrans 1
|
||||
maxtrans 255;
|
||||
-- Add comments to the table
|
||||
comment on table BI电销坐席车非渗透统计表
|
||||
is '用于存放BI导出每日电销坐席车险非车险保费和车非渗透率数据。';
|
||||
|
@ -31,6 +31,7 @@ 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;
|
||||
@ -134,6 +135,7 @@ function queryCallerArchievement( callerInfo: TelSaler, render: any ): void
|
||||
success: false,
|
||||
message: "",
|
||||
total_archievement: 0,
|
||||
moto_premium_present_month: 0,
|
||||
mensual_archievement_list: [],
|
||||
insurance_renewal_rate: "0.0",
|
||||
attaching_rate: "0.0",
|
||||
@ -150,9 +152,12 @@ function queryCallerArchievement( callerInfo: TelSaler, render: any ): void
|
||||
{
|
||||
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";
|
||||
|
@ -238,10 +238,10 @@ export default {
|
||||
ui.totalArchievement = data.total_archievement;
|
||||
ui.callerAttachingRate = data.attaching_rate;
|
||||
ui.callerRenewalRate = data.insurance_renewal_rate;
|
||||
ui.callerPersentMonthPremium = data.mensual_archievement_list[thisMonth];
|
||||
ui.callerPersentMonthPremium = data.moto_premium_present_month;
|
||||
// ui.callerPersentMonthPremium = data.mensual_archievement_list[thisMonth];
|
||||
|
||||
// console.log( "业绩清单", ui.chartData );
|
||||
// console.log( "当月", data.mensual_archievement_list );
|
||||
console.log( "业绩清单", data );
|
||||
|
||||
ui.showUI = false;
|
||||
setTimeout(() =>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-10-10 14:50:55
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/DepartmentArchievementRecord.java
|
||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/BIDepartmentAttachingRateRecord.java
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||
@ -27,19 +27,25 @@ public class BIDepartmentAttachingRateRecord
|
||||
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,
|
||||
double customerHandleRate, double customerHandleRateChange, double premiumPerCustomer,
|
||||
int motoInsuranceCustomerCount, double customerHandleRate,
|
||||
double customerHandleRateChange, double premiumPerCustomer,
|
||||
double premiumPerCustomerChange )
|
||||
{
|
||||
this.departmentName = departmentName;
|
||||
@ -50,20 +56,32 @@ public class BIDepartmentAttachingRateRecord
|
||||
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 "DepartmentArchievementRecord [departmentName=" + departmentName
|
||||
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 + "]";
|
||||
@ -90,6 +108,7 @@ public class BIDepartmentAttachingRateRecord
|
||||
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 );
|
||||
@ -138,6 +157,8 @@ public class BIDepartmentAttachingRateRecord
|
||||
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;
|
||||
|
@ -14,44 +14,61 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class BITelsalerAttachingRateRecord
|
||||
{
|
||||
// 部门
|
||||
@JsonProperty( "departmentName" )
|
||||
private String departmentName;
|
||||
|
||||
// 统计日期
|
||||
@JsonProperty( "summaryDate" )
|
||||
private LocalDate summaryDate;
|
||||
|
||||
// 坐席名称
|
||||
@JsonProperty( "telsalerName" )
|
||||
private String telsalerName;
|
||||
private String telsalerName;
|
||||
|
||||
// 车险保费
|
||||
@JsonProperty( "motoPremium" )
|
||||
private double motoPremium;
|
||||
private double motoPremium;
|
||||
|
||||
// 非车险保费
|
||||
@JsonProperty( "nomotoPremium" )
|
||||
private double nomotoPremium;
|
||||
private double nomotoPremium;
|
||||
|
||||
// 车险保费占比
|
||||
@JsonProperty( "motoPremiumProportion" )
|
||||
private double motoPremiumProportion;
|
||||
private double motoPremiumProportion;
|
||||
|
||||
// 渗透率
|
||||
@JsonProperty( "attachingRate" )
|
||||
private double attachingRate;
|
||||
private double attachingRate;
|
||||
|
||||
// 渗透率环比上月
|
||||
@JsonProperty( "attachingRateChange" )
|
||||
private double attachingRateChange;
|
||||
private double attachingRateChange;
|
||||
|
||||
// 当月客户渗透率
|
||||
@JsonProperty( "customerHandleRateCell" )
|
||||
private double customerHandleRate;
|
||||
private double customerHandleRate;
|
||||
|
||||
// 客户渗透率环比上月
|
||||
@JsonProperty( "customerHandleRateChangeCell" )
|
||||
private double customerHandleRateChange;
|
||||
private double customerHandleRateChange;
|
||||
|
||||
public BITelsalerAttachingRateRecord( LocalDate summaryDate, String telsalerName, double motoPremium, double nomotoPremium, double motoPremiumProportion, double attachingRate, double attachingRateChange, double customerHandleRate, double customerHandleRateChange, double noMotoPremiumPerCustomer, double noMotoPremiumPerCustomerChange )
|
||||
// 当月车非客均保费
|
||||
@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;
|
||||
@ -65,6 +82,9 @@ public class BITelsalerAttachingRateRecord
|
||||
this.noMotoPremiumPerCustomerChange = noMotoPremiumPerCustomerChange;
|
||||
}
|
||||
|
||||
public BITelsalerAttachingRateRecord()
|
||||
{}
|
||||
|
||||
public double getCustomerHandleRate()
|
||||
{
|
||||
return customerHandleRate;
|
||||
@ -105,28 +125,17 @@ public class BITelsalerAttachingRateRecord
|
||||
this.noMotoPremiumPerCustomerChange = noMotoPremiumPerCustomerChange;
|
||||
}
|
||||
|
||||
// 当月车非客均保费
|
||||
@JsonProperty( "noMotoPremiumPerCustomerCell" )
|
||||
private double noMotoPremiumPerCustomer;
|
||||
|
||||
// 客均保费环比上月
|
||||
@JsonProperty( "noMotoPremiumPerCustomerChangeCell" )
|
||||
private double noMotoPremiumPerCustomerChange;
|
||||
|
||||
public BITelsalerAttachingRateRecord()
|
||||
{}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "BITelsalerAttachingRateRecord [summaryDate=" + summaryDate + ", telsalerName="
|
||||
+ telsalerName + ", motoPremium=" + motoPremium + ", nomotoPremium=" + nomotoPremium
|
||||
+ ", motoPremiumProportion=" + motoPremiumProportion + ", attachingRate="
|
||||
+ attachingRate + ", attachingRateChange=" + attachingRateChange
|
||||
+ ", customerHandleRate=" + customerHandleRate + ", customerHandleRateChange="
|
||||
+ customerHandleRateChange + ", noMotoPremiumPerCustomer="
|
||||
+ noMotoPremiumPerCustomer + ", noMotoPremiumPerCustomerChange="
|
||||
+ noMotoPremiumPerCustomerChange + "]";
|
||||
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
|
||||
@ -134,6 +143,7 @@ public class BITelsalerAttachingRateRecord
|
||||
{
|
||||
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;
|
||||
@ -168,6 +178,13 @@ public class BITelsalerAttachingRateRecord
|
||||
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 )
|
||||
@ -281,4 +298,14 @@ public class BITelsalerAttachingRateRecord
|
||||
{
|
||||
this.attachingRateChange = attachingRateChange;
|
||||
}
|
||||
|
||||
public String getDepartmentName()
|
||||
{
|
||||
return departmentName;
|
||||
}
|
||||
|
||||
public void setDepartmentName( String departmentName )
|
||||
{
|
||||
this.departmentName = departmentName;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-10-09 21:45:39
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/TelsalerRenewalRateRecord.java
|
||||
* @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.
|
||||
@ -11,6 +11,7 @@ package com.cpic.xim.mybatis.pojo;
|
||||
|
||||
public class BITelsalerRenewalRateRecord
|
||||
{
|
||||
private String 责任部门;
|
||||
private String 责任人;
|
||||
private double 机构目标值;
|
||||
private double 到期数全月;
|
||||
@ -19,9 +20,14 @@ public class BITelsalerRenewalRateRecord
|
||||
private double 个车续保率全月;
|
||||
private double 环比昨日;
|
||||
private double 环比上月;
|
||||
|
||||
public BITelsalerRenewalRateRecord( String 责任人, double 机构目标值, double 到期数全月, double 序时到期数占比, double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月 )
|
||||
private double 平均提前签单天数;
|
||||
private double 环比;
|
||||
|
||||
public BITelsalerRenewalRateRecord( String 责任部门, String 责任人, double 机构目标值, double 到期数全月,
|
||||
double 序时到期数占比, double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月,
|
||||
double 平均提前签单天数, double 环比 )
|
||||
{
|
||||
this.责任部门 = 责任部门;
|
||||
this.责任人 = 责任人;
|
||||
this.机构目标值 = 机构目标值;
|
||||
this.到期数全月 = 到期数全月;
|
||||
@ -30,6 +36,40 @@ public class BITelsalerRenewalRateRecord
|
||||
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
|
||||
@ -37,6 +77,7 @@ public class BITelsalerRenewalRateRecord
|
||||
{
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((责任部门 == null) ? 0 : 责任部门.hashCode());
|
||||
result = prime * result + ((责任人 == null) ? 0 : 责任人.hashCode());
|
||||
long temp;
|
||||
temp = Double.doubleToLongBits( 机构目标值 );
|
||||
@ -53,6 +94,10 @@ public class BITelsalerRenewalRateRecord
|
||||
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;
|
||||
}
|
||||
|
||||
@ -66,6 +111,13 @@ public class BITelsalerRenewalRateRecord
|
||||
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 )
|
||||
@ -87,15 +139,20 @@ public class BITelsalerRenewalRateRecord
|
||||
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 "TelsalerRenewalRateRecord [责任人=" + 责任人 + ", 机构目标值=" + 机构目标值 + ", 到期数全月=" + 到期数全月
|
||||
+ ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时 + ", 个车续保率全月=" + 个车续保率全月
|
||||
+ ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + "]";
|
||||
return "BITelsalerRenewalRateRecord [责任部门=" + 责任部门 + ", 责任人=" + 责任人 + ", 机构目标值=" + 机构目标值
|
||||
+ ", 到期数全月=" + 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时
|
||||
+ ", 个车续保率全月=" + 个车续保率全月 + ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + ", 平均提前签单天数="
|
||||
+ 平均提前签单天数 + ", 环比=" + 环比 + "]";
|
||||
}
|
||||
|
||||
public String get责任人()
|
||||
|
@ -26,25 +26,6 @@ public class CallerArchievement
|
||||
private static Logger logger = LoggerFactory.getLogger( CallerArchievement.class );
|
||||
private static ArrayList<MensualArchievementItem> monthArray = null;
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
* @param callerCode
|
||||
* @param totalArchievement
|
||||
* @param mensualArchievementList
|
||||
* @param insuranceRenewalRate
|
||||
* @param attachingRate
|
||||
*/
|
||||
public CallerArchievement( String callerCode, long totalArchievement,
|
||||
ArrayList<MensualArchievementItem> mensualArchievementList, String insuranceRenewalRate,
|
||||
String attachingRate )
|
||||
{
|
||||
this.callerCode = callerCode;
|
||||
this.totalArchievement = totalArchievement;
|
||||
this.mensualArchievementList = mensualArchievementList;
|
||||
this.insuranceRenewalRate = insuranceRenewalRate;
|
||||
this.attachingRate = attachingRate;
|
||||
}
|
||||
|
||||
// 静态代码块
|
||||
static
|
||||
{
|
||||
@ -65,15 +46,6 @@ public class CallerArchievement
|
||||
monthArray.add( new MensualArchievementItem( 12, "0" ) );
|
||||
}
|
||||
|
||||
public CallerArchievement()
|
||||
{
|
||||
this.totalArchievement = 0;
|
||||
this.mensualArchievementList = null;
|
||||
this.insuranceRenewalRate = "";
|
||||
this.attachingRate = "";
|
||||
this.callerCode = "";
|
||||
}
|
||||
|
||||
public static CallerArchievement getCallerArchievement( String callerCode ) throws IOException
|
||||
{
|
||||
CallerArchievement archievement = null;
|
||||
@ -82,6 +54,7 @@ public class CallerArchievement
|
||||
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;
|
||||
@ -100,6 +73,10 @@ public class CallerArchievement
|
||||
totalArchievement = Integer.valueOf( 0 );
|
||||
}
|
||||
|
||||
// 当月车险保费
|
||||
motoPremiumPresentMonth = ((Double) params.get( "a_present_month" )).doubleValue();
|
||||
|
||||
|
||||
// 车非融合
|
||||
if ( params.get( "a_attaching_rate" ) instanceof String )
|
||||
{
|
||||
@ -129,8 +106,8 @@ public class CallerArchievement
|
||||
mensual = (ArrayList<MensualArchievementItem>) params.get( "a_mensual_cur" );
|
||||
}
|
||||
|
||||
archievement = new CallerArchievement( callerCode, totalArchievement, mensual, renewalRate,
|
||||
attachingRate );
|
||||
archievement = new CallerArchievement( callerCode, totalArchievement,
|
||||
motoPremiumPresentMonth, mensual, renewalRate, attachingRate );
|
||||
|
||||
return archievement;
|
||||
}
|
||||
@ -145,6 +122,150 @@ public class CallerArchievement
|
||||
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;
|
||||
@ -195,21 +316,4 @@ public class CallerArchievement
|
||||
{
|
||||
this.attachingRate = attachingRate;
|
||||
}
|
||||
|
||||
@JsonProperty( "caller_code" )
|
||||
private String callerCode;
|
||||
|
||||
@JsonProperty( "total_archievement" )
|
||||
private long totalArchievement; // 总业绩
|
||||
|
||||
// 每月业绩列表
|
||||
// 要保证数据是按照月份排序。
|
||||
@JsonProperty( "mensual_archievement_list" )
|
||||
private ArrayList<MensualArchievementItem> mensualArchievementList;
|
||||
|
||||
@JsonProperty( "insurance_renewal_rate" )
|
||||
private String insuranceRenewalRate; // 续保率
|
||||
|
||||
@JsonProperty( "attaching_rate" )
|
||||
private String attachingRate; // 车非渗透率
|
||||
}
|
||||
|
@ -39,11 +39,11 @@ public final class ImportBIExcelData
|
||||
"当月车非客均保费", "客均保费环比上月"};
|
||||
|
||||
private static String[] TelSalerRenewalRateExcelTitle = new String[]
|
||||
{ "责任人", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
|
||||
"环比上月(%)"};
|
||||
{ "责任部门", "责任人", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
|
||||
"环比上月(%)", "平均提前签单天数", "环比"};
|
||||
|
||||
private static String[] DepartmentAttachingRateExcelTitle = new String[]
|
||||
{ "部门", "目标值-机构", "目标差距", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "当月客户渗透率",
|
||||
{ "部门", "目标值-机构", "目标差距", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "车险客户数", "当月客户渗透率",
|
||||
"客户渗透率环比上月", "当月车非客均保费", "客均保费环比上月"};
|
||||
|
||||
private static String[] DepartmentRenewalRateExcelTitle = new String[]
|
||||
@ -130,6 +130,9 @@ public final class ImportBIExcelData
|
||||
|
||||
Workbook wb = null;
|
||||
Sheet sheet = null;
|
||||
String name = null;
|
||||
String departmentName = null;
|
||||
String departmentCurrentRow = null;
|
||||
|
||||
try
|
||||
{
|
||||
@ -144,7 +147,7 @@ public final class ImportBIExcelData
|
||||
|
||||
for ( Row row : sheet )
|
||||
{
|
||||
String name = "";
|
||||
|
||||
int rowIndex = row.getRowNum();
|
||||
|
||||
// 从数据行开始
|
||||
@ -155,6 +158,24 @@ public final class ImportBIExcelData
|
||||
|
||||
try
|
||||
{
|
||||
// 部门
|
||||
try
|
||||
{
|
||||
departmentCurrentRow = MyPOIUtils.getStringCellValue( row, 0 );
|
||||
|
||||
// 因为是合并列,所以要判断一下是不是空的
|
||||
if ( !departmentCurrentRow.equals( "" )
|
||||
&& !departmentCurrentRow.equals( "合计" ) )
|
||||
{
|
||||
// 不是空的,也不是合计,说明是新部门的数据,更新部门名称
|
||||
departmentName = departmentCurrentRow;
|
||||
}
|
||||
}
|
||||
catch ( NullPointerException error )
|
||||
{
|
||||
// cell是空的,说明还是上一行的部门
|
||||
}
|
||||
|
||||
// 坐席名称
|
||||
name = MyPOIUtils.getStringCellValue( row, 1 );
|
||||
|
||||
@ -165,9 +186,9 @@ public final class ImportBIExcelData
|
||||
}
|
||||
|
||||
// 车险保费
|
||||
double motoPremium = MyPOIUtils.getNumbericCellValue( row, 2 ) * 10000;
|
||||
double motoPremium = MyPOIUtils.getNumbericCellValue( row, 2 );
|
||||
// 非车险保费
|
||||
double nomotoPremium = MyPOIUtils.getNumbericCellValue( row, 4 ) * 10000;
|
||||
double nomotoPremium = MyPOIUtils.getNumbericCellValue( row, 4 );
|
||||
// 车险保费占比
|
||||
double motoPremiumProPortion = MyPOIUtils.getNumbericCellValue( row, 3 ) * 100;
|
||||
// 当月保费渗透率
|
||||
@ -187,7 +208,7 @@ public final class ImportBIExcelData
|
||||
MyPOIUtils.getNumbericCellValue( row, 10 ) * 100;
|
||||
|
||||
BITelsalerAttachingRateRecord record = new BITelsalerAttachingRateRecord(
|
||||
LocalDate.now(), name, motoPremium, nomotoPremium,
|
||||
departmentName, LocalDate.now(), name, motoPremium, nomotoPremium,
|
||||
motoPremiumProPortion, attachingRate, attachingRateChange,
|
||||
customerHandleRateCell, customerHandleRateChangeCell,
|
||||
noMotoPremiumPerCustomerCell, noMotoPremiumPerCustomerChangeCell );
|
||||
@ -235,7 +256,7 @@ public final class ImportBIExcelData
|
||||
* @return
|
||||
*/
|
||||
public static ArrayList<BITelsalerRenewalRateRecord> importBITelsalerRenewalRateFromXlsx(
|
||||
String filePath, int sheetIndex, int firstRow, LocalDate summaryDate )
|
||||
String filePath, int sheetIndex, int firstRow )
|
||||
throws IOException, InvalidFormatException
|
||||
{
|
||||
ArrayList<BITelsalerRenewalRateRecord> records = new ArrayList<>( 200 );
|
||||
@ -248,6 +269,9 @@ public final class ImportBIExcelData
|
||||
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 ) )
|
||||
{
|
||||
@ -266,23 +290,41 @@ public final class ImportBIExcelData
|
||||
|
||||
try
|
||||
{
|
||||
String 责任人 = MyPOIUtils.getStringCellValue( row, 0 );
|
||||
// 处理责任部门列
|
||||
// 如果读取到的当前行责任部门不为空且与前一行责任部门不同,说明是另一个部门的数据
|
||||
try
|
||||
{
|
||||
当前行责任部门 = MyPOIUtils.getStringCellValue( row, 0 );
|
||||
|
||||
if ( !当前行责任部门.isEmpty() && !当前行责任部门.equals( 责任部门 ) )
|
||||
{
|
||||
责任部门 = 当前行责任部门;
|
||||
}
|
||||
}
|
||||
catch ( NullPointerException error )
|
||||
{
|
||||
}
|
||||
|
||||
// 判断责任人,如果是空值,就跳过此行
|
||||
责任人 = MyPOIUtils.getStringCellValue( row, 1 );
|
||||
|
||||
if ( 责任人.isEmpty() == true )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
double 机构目标值 = MyPOIUtils.getNumbericCellValue( row, 1 ) * 100;
|
||||
double 到期数全月 = MyPOIUtils.getNumbericCellValue( row, 2 ) * 100;
|
||||
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;
|
||||
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( 责任人,
|
||||
机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月 );
|
||||
BITelsalerRenewalRateRecord record = new BITelsalerRenewalRateRecord( 责任部门, 责任人,
|
||||
机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月, 平均提前签单天数, 环比 );
|
||||
|
||||
records.add( record );
|
||||
}
|
||||
@ -362,22 +404,23 @@ public final class ImportBIExcelData
|
||||
|
||||
double departmentObject = MyPOIUtils.getNumbericCellValue( row, 1 ) * 100;
|
||||
double objectGap = MyPOIUtils.getNumbericCellValue( row, 2 ) * 100;
|
||||
double motoPremium = MyPOIUtils.getNumbericCellValue( row, 3 ) * 10000;
|
||||
double motoPremium = MyPOIUtils.getNumbericCellValue( row, 3 );
|
||||
double motoPremiumProPortion = MyPOIUtils.getNumbericCellValue( row, 4 ) * 100;
|
||||
double nomotoPremium = MyPOIUtils.getNumbericCellValue( row, 5 ) * 10000;
|
||||
double nomotoPremium = MyPOIUtils.getNumbericCellValue( row, 5 );
|
||||
double attachingRate = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
|
||||
double attachingRateChange = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
|
||||
double customerHandleRate = MyPOIUtils.getNumbericCellValue( row, 8 ) * 100;
|
||||
int motoInsuranceCustomerCount = (int)MyPOIUtils.getNumbericCellValue( row, 8 );
|
||||
double customerHandleRate = MyPOIUtils.getNumbericCellValue( row, 9 ) * 100;
|
||||
double customerHandleRateChange =
|
||||
MyPOIUtils.getNumbericCellValue( row, 9 ) * 100;
|
||||
double premiumPerCustomer = MyPOIUtils.getNumbericCellValue( row, 10 ) * 100;
|
||||
MyPOIUtils.getNumbericCellValue( row, 10 ) * 100;
|
||||
double premiumPerCustomer = MyPOIUtils.getNumbericCellValue( row, 11 ) * 100;
|
||||
double premiumPerCustomerChange =
|
||||
MyPOIUtils.getNumbericCellValue( row, 11 ) * 100;
|
||||
MyPOIUtils.getNumbericCellValue( row, 12 ) * 100;
|
||||
|
||||
BIDepartmentAttachingRateRecord record = new BIDepartmentAttachingRateRecord(
|
||||
departmentName, departmentObject, objectGap, motoPremium,
|
||||
motoPremiumProPortion, nomotoPremium, attachingRate,
|
||||
attachingRateChange, customerHandleRate, customerHandleRateChange,
|
||||
attachingRateChange, motoInsuranceCustomerCount, customerHandleRate, customerHandleRateChange,
|
||||
premiumPerCustomer, premiumPerCustomerChange );
|
||||
|
||||
records.add( record );
|
||||
|
@ -29,7 +29,7 @@ import com.cpic.xim.utils.ranking.CallerRankingList;
|
||||
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.caller.CallerArchievementQueryRequest;
|
||||
import com.cpic.xim.web.controllers.archievement.caller.CallerArchievementQueryResult;
|
||||
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;
|
||||
|
||||
@ -90,24 +90,24 @@ public class ArchievementQueryController
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping( "/query_caller_archievement.do" )
|
||||
public CallerArchievementQueryResult queryCallerArchievement(
|
||||
public CallerArchievementQueryResponse queryCallerArchievement(
|
||||
@RequestBody CallerArchievementQueryRequest request )
|
||||
{
|
||||
CallerArchievementQueryResult result = null;
|
||||
CallerArchievementQueryResponse result = null;
|
||||
|
||||
try
|
||||
{
|
||||
CallerArchievement archievement =
|
||||
CallerArchievement.getCallerArchievement( request.getCallerCode() );
|
||||
|
||||
result = new CallerArchievementQueryResult( true, "查询成功", archievement.getCallerCode(),
|
||||
request.getCallName(), archievement.getTotalArchievement(),
|
||||
result = new CallerArchievementQueryResponse( true, "查询成功", archievement.getCallerCode(),
|
||||
request.getCallName(), archievement.getTotalArchievement(), archievement.getMotoPremiumPresentMonth(),
|
||||
archievement.getMensualArchievementList(),
|
||||
archievement.getInsuranceRenewalRate(), archievement.getAttachingRate() );
|
||||
}
|
||||
catch ( IOException error )
|
||||
{
|
||||
result = new CallerArchievementQueryResult(false, error.getMessage(), null, null, 0, null, null, null);
|
||||
result = new CallerArchievementQueryResponse(false, error.getMessage(), null, null, 0, 0, null, null, null);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
/*
|
||||
* @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/CallerArchievementQueryResult.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 CallerArchievementQueryResult extends QueryResponse
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param success
|
||||
* @param message
|
||||
* @param callerCode
|
||||
* @param callerName
|
||||
* @param totalArchievement
|
||||
* @param mensualArchievementList
|
||||
* @param insuranceRenewalRate
|
||||
* @param attachingRate
|
||||
*/
|
||||
public CallerArchievementQueryResult( boolean success, String message, String callerCode,
|
||||
String callerName, long totalArchievement,
|
||||
ArrayList<MensualArchievementItem> mensualArchievementList, String insuranceRenewalRate,
|
||||
String attachingRate)
|
||||
{
|
||||
super( success, message );
|
||||
this.callerCode = callerCode;
|
||||
this.callerName = callerName;
|
||||
this.totalArchievement = totalArchievement;
|
||||
this.mensualArchievementList = mensualArchievementList;
|
||||
this.insuranceRenewalRate = insuranceRenewalRate;
|
||||
this.attachingRate = attachingRate;
|
||||
}
|
||||
|
||||
@JsonProperty("callerCode")
|
||||
String callerCode;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@JsonProperty("callerName")
|
||||
String callerName;
|
||||
|
||||
@JsonProperty( "total_archievement" )
|
||||
private long totalArchievement; // 总业绩
|
||||
|
||||
// 每月业绩列表
|
||||
// 要保证数据是按照月份排序。
|
||||
@JsonProperty( "mensual_archievement_list" )
|
||||
private ArrayList<MensualArchievementItem> mensualArchievementList;
|
||||
|
||||
@JsonProperty( "insurance_renewal_rate" )
|
||||
private String insuranceRenewalRate; // 续保率
|
||||
|
||||
@JsonProperty( "attaching_rate" )
|
||||
private String attachingRate; // 车非渗透率
|
||||
}
|
@ -149,7 +149,7 @@ public class ImportBIDataController
|
||||
try
|
||||
{
|
||||
records = ImportBIExcelData.importBITelsalerRenewalRateFromXlsx( filePath, sheetIndex,
|
||||
firstRow, LocalDate.now() );
|
||||
firstRow );
|
||||
|
||||
session = MybatisUtils.getSqlSessionBatch();
|
||||
mapper = session.getMapper( ImportBIArchievementDataMapper.class );
|
||||
|
@ -15,6 +15,7 @@
|
||||
#{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>
|
||||
|
||||
|
@ -2,27 +2,31 @@
|
||||
<!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 ( #{telsalerName}, #{motoPremium}, #{nomotoPremium}, #{motoPremiumProportion},
|
||||
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坐席续保率统计表 (责任人,机构目标值,到期数全月,序时到期数占比,个车续保率序时,个车续保率全月,环比昨日,环比上月)
|
||||
values (#{责任人},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
||||
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月})
|
||||
insert into BI电销坐席续保率跟踪表 ("责任部门","责任人","机构目标值1(%)","到期数-全月",
|
||||
"序时到期数占比(%)","个车续保率(序时)(%)","个车续保率(全月)(%)",
|
||||
"环比昨日(%)","环比上月(%)","平均提前签单天数","环比")
|
||||
values (#{责任部门},#{责任人},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
||||
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月},
|
||||
#{平均提前签单天数},#{环比})
|
||||
</insert>
|
||||
|
||||
<insert id="insertDepartmentAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord">
|
||||
insert into BI部门渗透率续保率统计表 ( 部门,"目标值-机构",目标差距,"车险保费",
|
||||
insert into BI机构渗透率跟踪表 ( 部门,"目标值-机构",目标差距,"车险保费",
|
||||
车险保费占比,"非车保费",当月保费渗透率,保费渗透率环比上月,当月客户渗透率,
|
||||
客户渗透率环比上月,当月车非客均保费,客均保费环比上月)
|
||||
客户渗透率环比上月,当月车非客均保费,客均保费环比上月,车险客户数)
|
||||
values (#{departmentName},#{departmentObject},#{objectGap},#{motoPremium},
|
||||
#{motoPremiumProPortion},#{nomotoPremium},#{attachingRate},#{attachingRateChange},
|
||||
#{customerHandleRate},#{customerHandleRateChange},#{premiumPerCustomer},#{premiumPerCustomerChange} )
|
||||
#{customerHandleRate},#{customerHandleRateChange},#{premiumPerCustomer},#{premiumPerCustomerChange},
|
||||
#{motoInsuranceCustomerCount} )
|
||||
</insert>
|
||||
|
||||
<insert id="insertDepartmentRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord" >
|
||||
@ -34,10 +38,10 @@
|
||||
</insert>
|
||||
|
||||
<select id="cleanTelsalerAttachingRateData" statementType="CALLABLE">
|
||||
call telsale_bi_utils.清理BI电销坐席车非渗透统计表()
|
||||
call telsale_bi_utils.清理BI电销坐席车非渗透跟踪表()
|
||||
</select>
|
||||
<select id="cleanTelsalerRenewalRateData" statementType="CALLABLE">
|
||||
call telsale_bi_utils.清理BI电销坐席续保率统计表()
|
||||
call telsale_bi_utils.清理BI电销坐席续保率跟踪表()
|
||||
</select>
|
||||
<select id="cleanDepartmentAttachingRateData" statementType="CALLABLE">
|
||||
call telsale_bi_utils.清理BI部门渗透率跟踪表()
|
||||
|
@ -9,37 +9,42 @@
|
||||
*/
|
||||
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.*;
|
||||
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;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class BatchInsertTest
|
||||
{
|
||||
private static Logger logger = LoggerFactory.getLogger(BatchInsertTest.class);
|
||||
@Test
|
||||
public void testBatchInsertIntoBITelsalerAttachingRate()
|
||||
{
|
||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/坐席车非渗透.xlsx";
|
||||
ArrayList<BITelsalerAttachingRateRecord> records = null;
|
||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/经办 (2).xlsx";
|
||||
ArrayList<BITelsalerRenewalRateRecord> records = null;
|
||||
SqlSession session = null;
|
||||
ImportBIArchievementDataMapper mapper = null;
|
||||
|
||||
try
|
||||
{
|
||||
records = ImportBIExcelData.importBITelsalerAttachingRateRecordFromXlsx( filePath, 0,
|
||||
records = ImportBIExcelData.importBITelsalerRenewalRateFromXlsx( filePath, 0,
|
||||
1 );
|
||||
session = MybatisUtils.getSqlSessionBatch();
|
||||
mapper = session.getMapper( ImportBIArchievementDataMapper.class );
|
||||
|
||||
mapper.cleanTelsalerAttachingRateData();
|
||||
mapper.cleanTelsalerRenewalRateData();
|
||||
|
||||
for ( BITelsalerAttachingRateRecord record : records )
|
||||
for ( BITelsalerRenewalRateRecord record : records )
|
||||
{
|
||||
mapper.insertTelsalerAttachingRateDataToDB( record );
|
||||
mapper.insertTelsalerRenewalRateDataToDB( record );
|
||||
}
|
||||
|
||||
session.commit();
|
||||
@ -50,6 +55,10 @@ public class BatchInsertTest
|
||||
{
|
||||
System.out.println(error);
|
||||
assert( false );
|
||||
}
|
||||
catch(InvalidFormatException error)
|
||||
{
|
||||
|
||||
}
|
||||
catch ( Exception error )
|
||||
{
|
||||
@ -65,20 +74,18 @@ public class BatchInsertTest
|
||||
@Test
|
||||
public void testBatchInsertBITeslsalerRenewalRate()
|
||||
{
|
||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/坐席续保率 .xlsx";
|
||||
String sheetName = "当月个车续保率跟踪报表【机构】";
|
||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/坐席-续保.xlsx";
|
||||
ArrayList<BITelsalerRenewalRateRecord> records = null;
|
||||
SqlSession session = null;
|
||||
ImportBIArchievementDataMapper mapper = null;
|
||||
|
||||
try
|
||||
{
|
||||
records = ImportBIExcelData.importBITelsalerRenewalRateFromXlsx( filePath, 0, 1,
|
||||
null );
|
||||
|
||||
session = MybatisUtils.getSqlSessionBatch();
|
||||
mapper = session.getMapper( ImportBIArchievementDataMapper.class );
|
||||
|
||||
records = ImportBIExcelData.importBITelsalerRenewalRateFromXlsx( filePath, 0, 1 );
|
||||
|
||||
// 清理数据
|
||||
mapper.cleanTelsalerRenewalRateData();
|
||||
|
||||
@ -94,6 +101,7 @@ public class BatchInsertTest
|
||||
}
|
||||
catch ( Exception error )
|
||||
{
|
||||
logger.error("出现错误", error);
|
||||
assert (false);
|
||||
|
||||
if ( session != null )
|
||||
@ -104,10 +112,9 @@ public class BatchInsertTest
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBatchInsertBIDepartmentArchievementToDB()
|
||||
public void testBatchInsertBIDepartmentAttachingRateToDB()
|
||||
{
|
||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/BI部门渗透率续保率.xlsx";
|
||||
String sheetName = "部门";
|
||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/机构渗透.xlsx";
|
||||
|
||||
ArrayList<BIDepartmentAttachingRateRecord> records = null;
|
||||
SqlSession session = null;
|
||||
@ -135,6 +142,10 @@ public class BatchInsertTest
|
||||
{
|
||||
session.rollback();
|
||||
}
|
||||
|
||||
logger.error("错误", error);
|
||||
|
||||
assert( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
数据/测试用/坐席-渗透.xlsx
Normal file
BIN
数据/测试用/坐席-渗透.xlsx
Normal file
Binary file not shown.
BIN
数据/测试用/坐席-续保.xlsx
Normal file
BIN
数据/测试用/坐席-续保.xlsx
Normal file
Binary file not shown.
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