完成mybatis导入函数。
This commit is contained in:
parent
a1de9387c8
commit
7964f8fbe0
|
@ -0,0 +1,18 @@
|
||||||
|
SELECT *
|
||||||
|
FROM BI部门渗透率续保率统计表;
|
||||||
|
|
||||||
|
SELECT *
|
||||||
|
FROM BI电销坐席车非渗透统计表;
|
||||||
|
|
||||||
|
SELECT *
|
||||||
|
FROM BI坐席续保率统计表;
|
||||||
|
|
||||||
|
/*
|
||||||
|
truncate table BI电销坐席车非渗透统计表;
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
telsale_bi_utils.清理BI电销坐席车非渗透统计表;
|
||||||
|
telsale_bi_utils.清理BI电销坐席续保率统计表;
|
||||||
|
telsale_bi_utils.清理BI部门业绩统计表;
|
||||||
|
END;
|
||||||
|
*/
|
|
@ -0,0 +1,36 @@
|
||||||
|
CREATE OR REPLACE PACKAGE telsale_bi_utils IS
|
||||||
|
|
||||||
|
-- Author : WANGWEI-202
|
||||||
|
-- Created : 2023/10/12 15:31:13
|
||||||
|
-- Purpose : bi数据报表相关的工具
|
||||||
|
|
||||||
|
PROCEDURE 清理BI电销坐席车非渗透统计表;
|
||||||
|
|
||||||
|
PROCEDURE 清理BI电销坐席续保率统计表;
|
||||||
|
|
||||||
|
PROCEDURE 清理BI部门业绩统计表;
|
||||||
|
|
||||||
|
END telsale_bi_utils;
|
||||||
|
/
|
||||||
|
CREATE OR REPLACE PACKAGE BODY telsale_bi_utils IS
|
||||||
|
|
||||||
|
PROCEDURE 清理BI电销坐席车非渗透统计表 IS
|
||||||
|
BEGIN
|
||||||
|
EXECUTE IMMEDIATE 'truncate table BI电销坐席车非渗透统计表';
|
||||||
|
END;
|
||||||
|
|
||||||
|
PROCEDURE 清理BI电销坐席续保率统计表 IS
|
||||||
|
BEGIN
|
||||||
|
EXECUTE IMMEDIATE 'truncate table BI坐席续保率统计表';
|
||||||
|
END;
|
||||||
|
|
||||||
|
PROCEDURE 清理BI部门业绩统计表 IS
|
||||||
|
BEGIN
|
||||||
|
EXECUTE IMMEDIATE 'truncate table BI部门渗透率续保率统计表';
|
||||||
|
END;
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
-- Initialization
|
||||||
|
NULL;
|
||||||
|
END telsale_bi_utils;
|
||||||
|
/
|
|
@ -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导出电销坐席全月续保率数据。';
|
|
@ -0,0 +1,23 @@
|
||||||
|
-- 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导出每日电销坐席车险非车险保费和车非渗透率数据。';
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
drop table BI部门渗透率续保率统计表;
|
||||||
|
create table BI部门渗透率续保率统计表
|
||||||
|
(
|
||||||
|
部门 varchar2(100) 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,
|
||||||
|
当月车非客均保费 number default 0 not null,
|
||||||
|
客均保费环比上月 number default 0 not null
|
||||||
|
);
|
||||||
|
comment on table BI部门渗透率续保率统计表 is '存放BI系统导出部门渗透率续保率';
|
|
@ -1,33 +0,0 @@
|
||||||
-- 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 '渗透率环比上月';
|
|
|
@ -1,17 +0,0 @@
|
||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2023-10-11 16:47:59
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ImportArchievementDataMapper.java
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
package com.cpic.xim.mybatis.mapper;
|
|
||||||
|
|
||||||
import com.cpic.xim.mybatis.pojo.TelsalerAttachingRateRecord;
|
|
||||||
|
|
||||||
public interface ImportArchievementDataMapper
|
|
||||||
{
|
|
||||||
public void importTesalerAttachingRateDataToDB( TelsalerAttachingRateRecord record);
|
|
||||||
}
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-10-11 16:47:59
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/ImportArchievementDataMapper.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.mybatis.mapper;
|
||||||
|
|
||||||
|
import com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord;
|
||||||
|
import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord;
|
||||||
|
import com.cpic.xim.mybatis.pojo.BIDepartmentArchievementRecord;
|
||||||
|
|
||||||
|
public interface ImportBIArchievementDataMapper
|
||||||
|
{
|
||||||
|
public void insertTelsalerAttachingRateDataToDB( BITelsalerAttachingRateRecord record);
|
||||||
|
|
||||||
|
public void insertTelsalerRenewalRateDataToDB( BITelsalerRenewalRateRecord record );
|
||||||
|
|
||||||
|
public void insertDepartmentAttachingRenewalRateDataToDB(BIDepartmentArchievementRecord record);
|
||||||
|
|
||||||
|
public void cleanTelsalerAttachingRateData();
|
||||||
|
|
||||||
|
public void cleanTelsalerRenewalRateData();
|
||||||
|
|
||||||
|
public void cleanDepartmentAttachingRenewalRateData();
|
||||||
|
}
|
|
@ -9,7 +9,7 @@
|
||||||
*/
|
*/
|
||||||
package com.cpic.xim.mybatis.pojo;
|
package com.cpic.xim.mybatis.pojo;
|
||||||
|
|
||||||
public class DepartmentArchievementRecord
|
public class BIDepartmentArchievementRecord
|
||||||
{
|
{
|
||||||
// 部门
|
// 部门
|
||||||
private String departmentName;
|
private String departmentName;
|
||||||
|
@ -36,7 +36,7 @@ public class DepartmentArchievementRecord
|
||||||
// 客均保费环比上月
|
// 客均保费环比上月
|
||||||
private double premiumPerCustomerChange;
|
private double premiumPerCustomerChange;
|
||||||
|
|
||||||
public DepartmentArchievementRecord( String departmentName, double departmentObject,
|
public BIDepartmentArchievementRecord( String departmentName, double departmentObject,
|
||||||
double objectGap, double motoPremium, double motoPremiumProPortion,
|
double objectGap, double motoPremium, double motoPremiumProPortion,
|
||||||
double nomotoPremium, double attachingRate, double attachingRateChange,
|
double nomotoPremium, double attachingRate, double attachingRateChange,
|
||||||
double customerHandleRate, double customerHandleRateChange, double premiumPerCustomer,
|
double customerHandleRate, double customerHandleRateChange, double premiumPerCustomer,
|
||||||
|
@ -110,7 +110,7 @@ public class DepartmentArchievementRecord
|
||||||
return false;
|
return false;
|
||||||
if ( getClass() != obj.getClass() )
|
if ( getClass() != obj.getClass() )
|
||||||
return false;
|
return false;
|
||||||
DepartmentArchievementRecord other = (DepartmentArchievementRecord) obj;
|
BIDepartmentArchievementRecord other = (BIDepartmentArchievementRecord) obj;
|
||||||
if ( departmentName == null )
|
if ( departmentName == null )
|
||||||
{
|
{
|
||||||
if ( other.departmentName != null )
|
if ( other.departmentName != null )
|
|
@ -12,7 +12,7 @@ package com.cpic.xim.mybatis.pojo;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
public class TelsalerAttachingRateRecord
|
public class BITelsalerAttachingRateRecord
|
||||||
{
|
{
|
||||||
// 统计日期
|
// 统计日期
|
||||||
@JsonProperty( "summaryDate" )
|
@JsonProperty( "summaryDate" )
|
||||||
|
@ -44,28 +44,17 @@ public class TelsalerAttachingRateRecord
|
||||||
|
|
||||||
// 当月客户渗透率
|
// 当月客户渗透率
|
||||||
@JsonProperty( "customerHandleRateCell" )
|
@JsonProperty( "customerHandleRateCell" )
|
||||||
private double customerHandleRateCell;
|
private double customerHandleRate;
|
||||||
|
|
||||||
// 客户渗透率环比上月
|
// 客户渗透率环比上月
|
||||||
@JsonProperty( "customerHandleRateChangeCell" )
|
@JsonProperty( "customerHandleRateChangeCell" )
|
||||||
private double customerHandleRateChangeCell;
|
private double customerHandleRateChange;
|
||||||
|
|
||||||
// 当月车非客均保费
|
public BITelsalerAttachingRateRecord( LocalDate summaryDate, String telsalerName,
|
||||||
@JsonProperty( "noMotoPremiumPerCustomerCell" )
|
|
||||||
private double noMotoPremiumPerCustomerCell;
|
|
||||||
|
|
||||||
// 客均保费环比上月
|
|
||||||
@JsonProperty( "noMotoPremiumPerCustomerChangeCell" )
|
|
||||||
private double noMotoPremiumPerCustomerChangeCell;
|
|
||||||
|
|
||||||
public TelsalerAttachingRateRecord()
|
|
||||||
{}
|
|
||||||
|
|
||||||
public TelsalerAttachingRateRecord( LocalDate summaryDate, String telsalerName,
|
|
||||||
double motoPremium, double nomotoPremium, double motoPremiumProportion,
|
double motoPremium, double nomotoPremium, double motoPremiumProportion,
|
||||||
double attachingRate, double attachingRateChange, double customerHandleRateCell,
|
double attachingRate, double attachingRateChange, double customerHandleRate,
|
||||||
double customerHandleRateChangeCell, double noMotoPremiumPerCustomerCell,
|
double customerHandleRateChange, double noMotoPremiumPerCustomer,
|
||||||
double noMotoPremiumPerCustomerChangeCell )
|
double noMotoPremiumPerCustomerChange )
|
||||||
{
|
{
|
||||||
this.summaryDate = summaryDate;
|
this.summaryDate = summaryDate;
|
||||||
this.telsalerName = telsalerName;
|
this.telsalerName = telsalerName;
|
||||||
|
@ -74,64 +63,74 @@ public class TelsalerAttachingRateRecord
|
||||||
this.motoPremiumProportion = motoPremiumProportion;
|
this.motoPremiumProportion = motoPremiumProportion;
|
||||||
this.attachingRate = attachingRate;
|
this.attachingRate = attachingRate;
|
||||||
this.attachingRateChange = attachingRateChange;
|
this.attachingRateChange = attachingRateChange;
|
||||||
this.customerHandleRateCell = customerHandleRateCell;
|
this.customerHandleRate = customerHandleRate;
|
||||||
this.customerHandleRateChangeCell = customerHandleRateChangeCell;
|
this.customerHandleRateChange = customerHandleRateChange;
|
||||||
this.noMotoPremiumPerCustomerCell = noMotoPremiumPerCustomerCell;
|
this.noMotoPremiumPerCustomer = noMotoPremiumPerCustomer;
|
||||||
this.noMotoPremiumPerCustomerChangeCell = noMotoPremiumPerCustomerChangeCell;
|
this.noMotoPremiumPerCustomerChange = noMotoPremiumPerCustomerChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getCustomerHandleRateCell()
|
public double getCustomerHandleRate()
|
||||||
{
|
{
|
||||||
return customerHandleRateCell;
|
return customerHandleRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCustomerHandleRateCell( double customerHandleRateCell )
|
public void setCustomerHandleRate( double customerHandleRate )
|
||||||
{
|
{
|
||||||
this.customerHandleRateCell = customerHandleRateCell;
|
this.customerHandleRate = customerHandleRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getCustomerHandleRateChangeCell()
|
public double getCustomerHandleRateChange()
|
||||||
{
|
{
|
||||||
return customerHandleRateChangeCell;
|
return customerHandleRateChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCustomerHandleRateChangeCell( double customerHandleRateChangeCell )
|
public void setCustomerHandleRateChange( double customerHandleRateChange )
|
||||||
{
|
{
|
||||||
this.customerHandleRateChangeCell = customerHandleRateChangeCell;
|
this.customerHandleRateChange = customerHandleRateChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getNoMotoPremiumPerCustomerCell()
|
public double getNoMotoPremiumPerCustomer()
|
||||||
{
|
{
|
||||||
return noMotoPremiumPerCustomerCell;
|
return noMotoPremiumPerCustomer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNoMotoPremiumPerCustomerCell( double noMotoPremiumPerCustomerCell )
|
public void setNoMotoPremiumPerCustomer( double noMotoPremiumPerCustomer )
|
||||||
{
|
{
|
||||||
this.noMotoPremiumPerCustomerCell = noMotoPremiumPerCustomerCell;
|
this.noMotoPremiumPerCustomer = noMotoPremiumPerCustomer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getNoMotoPremiumPerCustomerChangeCell()
|
public double getNoMotoPremiumPerCustomerChange()
|
||||||
{
|
{
|
||||||
return noMotoPremiumPerCustomerChangeCell;
|
return noMotoPremiumPerCustomerChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNoMotoPremiumPerCustomerChangeCell( double noMotoPremiumPerCustomerChangeCell )
|
public void setNoMotoPremiumPerCustomerChange( double noMotoPremiumPerCustomerChange )
|
||||||
{
|
{
|
||||||
this.noMotoPremiumPerCustomerChangeCell = noMotoPremiumPerCustomerChangeCell;
|
this.noMotoPremiumPerCustomerChange = noMotoPremiumPerCustomerChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 当月车非客均保费
|
||||||
|
@JsonProperty( "noMotoPremiumPerCustomerCell" )
|
||||||
|
private double noMotoPremiumPerCustomer;
|
||||||
|
|
||||||
|
// 客均保费环比上月
|
||||||
|
@JsonProperty( "noMotoPremiumPerCustomerChangeCell" )
|
||||||
|
private double noMotoPremiumPerCustomerChange;
|
||||||
|
|
||||||
|
public BITelsalerAttachingRateRecord()
|
||||||
|
{}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return "TelsalerAttachingRateRecord [summaryDate=" + summaryDate + ", telsalerName="
|
return "BITelsalerAttachingRateRecord [summaryDate=" + summaryDate + ", telsalerName="
|
||||||
+ telsalerName + ", motoPremium=" + motoPremium + ", nomotoPremium=" + nomotoPremium
|
+ telsalerName + ", motoPremium=" + motoPremium + ", nomotoPremium=" + nomotoPremium
|
||||||
+ ", motoPremiumProportion=" + motoPremiumProportion + ", attachingRate="
|
+ ", motoPremiumProportion=" + motoPremiumProportion + ", attachingRate="
|
||||||
+ attachingRate + ", attachingRateChange=" + attachingRateChange
|
+ attachingRate + ", attachingRateChange=" + attachingRateChange
|
||||||
+ ", customerHandleRateCell=" + customerHandleRateCell
|
+ ", customerHandleRate=" + customerHandleRate + ", customerHandleRateChange="
|
||||||
+ ", customerHandleRateChangeCell=" + customerHandleRateChangeCell
|
+ customerHandleRateChange + ", noMotoPremiumPerCustomer="
|
||||||
+ ", noMotoPremiumPerCustomerCell=" + noMotoPremiumPerCustomerCell
|
+ noMotoPremiumPerCustomer + ", noMotoPremiumPerCustomerChange="
|
||||||
+ ", noMotoPremiumPerCustomerChangeCell=" + noMotoPremiumPerCustomerChangeCell
|
+ noMotoPremiumPerCustomerChange + "]";
|
||||||
+ "]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -152,13 +151,13 @@ public class TelsalerAttachingRateRecord
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
temp = Double.doubleToLongBits( attachingRateChange );
|
temp = Double.doubleToLongBits( attachingRateChange );
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
temp = Double.doubleToLongBits( customerHandleRateCell );
|
temp = Double.doubleToLongBits( customerHandleRate );
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
temp = Double.doubleToLongBits( customerHandleRateChangeCell );
|
temp = Double.doubleToLongBits( customerHandleRateChange );
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
temp = Double.doubleToLongBits( noMotoPremiumPerCustomerCell );
|
temp = Double.doubleToLongBits( noMotoPremiumPerCustomer );
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
temp = Double.doubleToLongBits( noMotoPremiumPerCustomerChangeCell );
|
temp = Double.doubleToLongBits( noMotoPremiumPerCustomerChange );
|
||||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +171,7 @@ public class TelsalerAttachingRateRecord
|
||||||
return false;
|
return false;
|
||||||
if ( getClass() != obj.getClass() )
|
if ( getClass() != obj.getClass() )
|
||||||
return false;
|
return false;
|
||||||
TelsalerAttachingRateRecord other = (TelsalerAttachingRateRecord) obj;
|
BITelsalerAttachingRateRecord other = (BITelsalerAttachingRateRecord) obj;
|
||||||
if ( summaryDate == null )
|
if ( summaryDate == null )
|
||||||
{
|
{
|
||||||
if ( other.summaryDate != null )
|
if ( other.summaryDate != null )
|
||||||
|
@ -202,17 +201,17 @@ public class TelsalerAttachingRateRecord
|
||||||
if ( Double.doubleToLongBits( attachingRateChange ) != Double
|
if ( Double.doubleToLongBits( attachingRateChange ) != Double
|
||||||
.doubleToLongBits( other.attachingRateChange ) )
|
.doubleToLongBits( other.attachingRateChange ) )
|
||||||
return false;
|
return false;
|
||||||
if ( Double.doubleToLongBits( customerHandleRateCell ) != Double
|
if ( Double.doubleToLongBits( customerHandleRate ) != Double
|
||||||
.doubleToLongBits( other.customerHandleRateCell ) )
|
.doubleToLongBits( other.customerHandleRate ) )
|
||||||
return false;
|
return false;
|
||||||
if ( Double.doubleToLongBits( customerHandleRateChangeCell ) != Double
|
if ( Double.doubleToLongBits( customerHandleRateChange ) != Double
|
||||||
.doubleToLongBits( other.customerHandleRateChangeCell ) )
|
.doubleToLongBits( other.customerHandleRateChange ) )
|
||||||
return false;
|
return false;
|
||||||
if ( Double.doubleToLongBits( noMotoPremiumPerCustomerCell ) != Double
|
if ( Double.doubleToLongBits( noMotoPremiumPerCustomer ) != Double
|
||||||
.doubleToLongBits( other.noMotoPremiumPerCustomerCell ) )
|
.doubleToLongBits( other.noMotoPremiumPerCustomer ) )
|
||||||
return false;
|
return false;
|
||||||
if ( Double.doubleToLongBits( noMotoPremiumPerCustomerChangeCell ) != Double
|
if ( Double.doubleToLongBits( noMotoPremiumPerCustomerChange ) != Double
|
||||||
.doubleToLongBits( other.noMotoPremiumPerCustomerChangeCell ) )
|
.doubleToLongBits( other.noMotoPremiumPerCustomerChange ) )
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
|
@ -9,7 +9,7 @@
|
||||||
*/
|
*/
|
||||||
package com.cpic.xim.mybatis.pojo;
|
package com.cpic.xim.mybatis.pojo;
|
||||||
|
|
||||||
public class TelsalerRenewalRateRecord
|
public class BITelsalerRenewalRateRecord
|
||||||
{
|
{
|
||||||
private String 责任人;
|
private String 责任人;
|
||||||
private double 机构目标值;
|
private double 机构目标值;
|
||||||
|
@ -20,7 +20,7 @@ public class TelsalerRenewalRateRecord
|
||||||
private double 环比昨日;
|
private double 环比昨日;
|
||||||
private double 环比上月;
|
private double 环比上月;
|
||||||
|
|
||||||
public TelsalerRenewalRateRecord( String 责任人, double 机构目标值, double 到期数全月, double 序时到期数占比, double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月 )
|
public BITelsalerRenewalRateRecord( String 责任人, double 机构目标值, double 到期数全月, double 序时到期数占比, double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月 )
|
||||||
{
|
{
|
||||||
this.责任人 = 责任人;
|
this.责任人 = 责任人;
|
||||||
this.机构目标值 = 机构目标值;
|
this.机构目标值 = 机构目标值;
|
||||||
|
@ -65,7 +65,7 @@ public class TelsalerRenewalRateRecord
|
||||||
return false;
|
return false;
|
||||||
if ( getClass() != obj.getClass() )
|
if ( getClass() != obj.getClass() )
|
||||||
return false;
|
return false;
|
||||||
TelsalerRenewalRateRecord other = (TelsalerRenewalRateRecord) obj;
|
BITelsalerRenewalRateRecord other = (BITelsalerRenewalRateRecord) obj;
|
||||||
if ( 责任人 == null )
|
if ( 责任人 == null )
|
||||||
{
|
{
|
||||||
if ( other.责任人 != null )
|
if ( other.责任人 != null )
|
|
@ -26,9 +26,9 @@ import com.cpic.xim.utils.poi.MyPOIUtils;
|
||||||
/**
|
/**
|
||||||
* 坐席业绩相关的数据操作方法。
|
* 坐席业绩相关的数据操作方法。
|
||||||
*/
|
*/
|
||||||
public class TelsalerArchievementData
|
public class ImportBIData
|
||||||
{
|
{
|
||||||
private static Logger logger = LoggerFactory.getLogger( TelsalerArchievementData.class );
|
private static Logger logger = LoggerFactory.getLogger( ImportBIData.class );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从excel文件读取坐席的车非渗透率数据
|
* 从excel文件读取坐席的车非渗透率数据
|
||||||
|
@ -38,11 +38,11 @@ public class TelsalerArchievementData
|
||||||
* @throws IOException 打开excel文件错误时抛出。
|
* @throws IOException 打开excel文件错误时抛出。
|
||||||
* @throws InvalidFormatException excel单元格格式错误时抛出
|
* @throws InvalidFormatException excel单元格格式错误时抛出
|
||||||
*/
|
*/
|
||||||
public static ArrayList<TelsalerAttachingRateRecord> importTelsalerAttachingRateRecordFromXlsx(
|
public static ArrayList<BITelsalerAttachingRateRecord> importBITelsalerAttachingRateRecordFromXlsx(
|
||||||
String filePath, LocalDate summaryDate, boolean hasCaptionRow )
|
String filePath, LocalDate summaryDate, boolean hasCaptionRow )
|
||||||
throws IOException, InvalidFormatException
|
throws IOException, InvalidFormatException
|
||||||
{
|
{
|
||||||
ArrayList<TelsalerAttachingRateRecord> records = new ArrayList<>( 200 );
|
ArrayList<BITelsalerAttachingRateRecord> records = new ArrayList<>( 200 );
|
||||||
|
|
||||||
Workbook wb = null;
|
Workbook wb = null;
|
||||||
Sheet sheet = null;
|
Sheet sheet = null;
|
||||||
|
@ -94,7 +94,7 @@ public class TelsalerArchievementData
|
||||||
double noMotoPremiumPerCustomerChangeCell =
|
double noMotoPremiumPerCustomerChangeCell =
|
||||||
MyPOIUtils.getNumbericCellValue( row, 10 );
|
MyPOIUtils.getNumbericCellValue( row, 10 );
|
||||||
|
|
||||||
TelsalerAttachingRateRecord record = new TelsalerAttachingRateRecord(
|
BITelsalerAttachingRateRecord record = new BITelsalerAttachingRateRecord(
|
||||||
summaryDate, name, motoPremium, nomotoPremium, motoPremiumProPortion,
|
summaryDate, name, motoPremium, nomotoPremium, motoPremiumProPortion,
|
||||||
attachingRate, attachingRateChange, customerHandleRateCell,
|
attachingRate, attachingRateChange, customerHandleRateCell,
|
||||||
customerHandleRateChangeCell, noMotoPremiumPerCustomerCell,
|
customerHandleRateChangeCell, noMotoPremiumPerCustomerCell,
|
||||||
|
@ -142,11 +142,11 @@ public class TelsalerArchievementData
|
||||||
* @param summaryDate
|
* @param summaryDate
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static ArrayList<TelsalerRenewalRateRecord> importTelsalerRenewalRateFromXlsx(
|
public static ArrayList<BITelsalerRenewalRateRecord> importBITelsalerRenewalRateFromXlsx(
|
||||||
String filePath, String sheetName, boolean hasCaptionRow, LocalDate summaryDate )
|
String filePath, String sheetName, boolean hasCaptionRow, LocalDate summaryDate )
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
ArrayList<TelsalerRenewalRateRecord> records = new ArrayList<>( 200 );
|
ArrayList<BITelsalerRenewalRateRecord> records = new ArrayList<>( 200 );
|
||||||
|
|
||||||
Workbook wb = null;
|
Workbook wb = null;
|
||||||
Sheet sheet = null;
|
Sheet sheet = null;
|
||||||
|
@ -183,7 +183,7 @@ public class TelsalerArchievementData
|
||||||
double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 6 );
|
double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 6 );
|
||||||
double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 7 );
|
double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 7 );
|
||||||
|
|
||||||
TelsalerRenewalRateRecord record = new TelsalerRenewalRateRecord( 责任人, 机构目标值,
|
BITelsalerRenewalRateRecord record = new BITelsalerRenewalRateRecord( 责任人, 机构目标值,
|
||||||
到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月 );
|
到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月 );
|
||||||
|
|
||||||
records.add( record );
|
records.add( record );
|
||||||
|
@ -214,10 +214,10 @@ public class TelsalerArchievementData
|
||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ArrayList<DepartmentArchievementRecord> importDepartmentArchievementRecords(
|
public static ArrayList<BIDepartmentArchievementRecord> importBIDepartmentArchievementRecords(
|
||||||
String filePath, String sheetName, boolean hasCaptionRow ) throws IOException
|
String filePath, String sheetName, boolean hasCaptionRow ) throws IOException
|
||||||
{
|
{
|
||||||
ArrayList<DepartmentArchievementRecord> records = new ArrayList<>( 5 );
|
ArrayList<BIDepartmentArchievementRecord> records = new ArrayList<>( 5 );
|
||||||
|
|
||||||
Workbook wb = null;
|
Workbook wb = null;
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ public class TelsalerArchievementData
|
||||||
{
|
{
|
||||||
String departmentName = MyPOIUtils.getStringCellValue( row, 0 );
|
String departmentName = MyPOIUtils.getStringCellValue( row, 0 );
|
||||||
|
|
||||||
if ( departmentName.isEmpty() )
|
if ( departmentName.isEmpty() || departmentName.equals("合计") )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ public class TelsalerArchievementData
|
||||||
double premiumPerCustomer = MyPOIUtils.getNumbericCellValue( row, 1 );
|
double premiumPerCustomer = MyPOIUtils.getNumbericCellValue( row, 1 );
|
||||||
double premiumPerCustomerChange = MyPOIUtils.getNumbericCellValue( row, 1 );
|
double premiumPerCustomerChange = MyPOIUtils.getNumbericCellValue( row, 1 );
|
||||||
|
|
||||||
DepartmentArchievementRecord record = new DepartmentArchievementRecord(
|
BIDepartmentArchievementRecord record = new BIDepartmentArchievementRecord(
|
||||||
departmentName, departmentObject, objectGap, motoPremium,
|
departmentName, departmentObject, objectGap, motoPremium,
|
||||||
motoPremiumProPortion, nomotoPremium, attachingRate,
|
motoPremiumProPortion, nomotoPremium, attachingRate,
|
||||||
attachingRateChange, customerHandleRate, customerHandleRateChange,
|
attachingRateChange, customerHandleRate, customerHandleRateChange,
|
|
@ -16,10 +16,10 @@ import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import com.cpic.xim.mybatis.mapper.ImportArchievementDataMapper;
|
import com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper;
|
||||||
import com.cpic.xim.mybatis.pojo.TelsalerAttachingRateRecord;
|
import com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord;
|
||||||
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
||||||
import com.cpic.xim.utils.data.TelsalerArchievementData;
|
import com.cpic.xim.utils.data.ImportBIData;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping(method=RequestMethod.POST, path="/import_telsaler_archievement")
|
@RequestMapping(method=RequestMethod.POST, path="/import_telsaler_archievement")
|
||||||
|
@ -32,14 +32,14 @@ public class ImportTelsalerArchievementController
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ArrayList<TelsalerAttachingRateRecord> records = TelsalerArchievementData.importTelsalerAttachingRateRecordFromXlsx( filePath, null,
|
ArrayList<BITelsalerAttachingRateRecord> records = ImportBIData.importBITelsalerAttachingRateRecordFromXlsx( filePath, null,
|
||||||
true );
|
true );
|
||||||
session = MybatisUtils.getSqlSessionBatch();
|
session = MybatisUtils.getSqlSessionBatch();
|
||||||
ImportArchievementDataMapper mapper = session.getMapper( ImportArchievementDataMapper.class );
|
ImportBIArchievementDataMapper mapper = session.getMapper( ImportBIArchievementDataMapper.class );
|
||||||
|
|
||||||
for ( TelsalerAttachingRateRecord record : records )
|
for ( BITelsalerAttachingRateRecord record : records )
|
||||||
{
|
{
|
||||||
mapper.importTesalerAttachingRateDataToDB(record);
|
mapper.insertTelsalerAttachingRateDataToDB(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
session.commit();
|
session.commit();
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?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.ImportArchievementDataMapper">
|
|
||||||
<insert id="importTesalerAttachingRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.TelsalerAttachingRateRecord">
|
|
||||||
insert into 电销坐席车非渗透统计表 ( telsaler_name, moto_premium, nomoto_premium, moto_premium_proportion, attaching_rate, attaching_rate_change )
|
|
||||||
values ( #{telsalerName}, #{motoPremium}, #{nomotoPremium}, #{motoPremiumProportion}, #{attachingRate}, #{attachingRateChange} )
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?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 ( #{telsalerName}, #{motoPremium}, #{nomotoPremium}, #{motoPremiumProportion},
|
||||||
|
#{attachingRate}, #{attachingRateChange}, #{customerHandleRate},
|
||||||
|
#{customerHandleRateChange}, #{noMotoPremiumPerCustomer}, #{noMotoPremiumPerCustomerChange} )
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertTelsalerRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
|
||||||
|
insert into BI坐席续保率统计表 (责任人,机构目标值,到期数全月,序时到期数占比,个车续保率序时,个车续保率全月,环比昨日,环比上月)
|
||||||
|
values (#{责任人},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
||||||
|
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertDepartmentAttachingRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentArchievementRecord">
|
||||||
|
insert into BI部门渗透率续保率统计表 ( 部门,"目标值-机构",目标差距,"车险保费(万)",
|
||||||
|
车险保费占比,"非车保费(万)",当月保费渗透率,保费渗透率环比上月,当月客户渗透率,
|
||||||
|
客户渗透率环比上月,当月车非客均保费,客均保费环比上月)
|
||||||
|
values (#{departmentName},#{departmentObject},#{objectGap},#{motoPremium},
|
||||||
|
#{motoPremiumProPortion},#{nomotoPremium},#{attachingRate},#{attachingRateChange},
|
||||||
|
#{customerHandleRate},#{customerHandleRateChange},#{premiumPerCustomer},#{premiumPerCustomerChange} )
|
||||||
|
</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="cleanDepartmentAttachingRenewalRateData" statementType="CALLABLE">
|
||||||
|
call telsale_bi_utils.清理BI部门业绩统计表()
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -26,6 +26,6 @@
|
||||||
<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/RewardsMapper.xml" />
|
||||||
<mapper resource="mybatis/mapper/ImportArchievementDataMapper.xml" />
|
<mapper resource="mybatis/mapper/ImportBIArchievementDataMapper.xml" />
|
||||||
</mappers>
|
</mappers>
|
||||||
</configuration>
|
</configuration>
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue