续保率报表格式修改,还未完成。
This commit is contained in:
@@ -19,14 +19,14 @@ public class BIDepartmentRenewalRateRecord
|
||||
private double 个车续保率全月;
|
||||
private double 环比昨日;
|
||||
private double 环比上月;
|
||||
private int 平均提前签单天数;
|
||||
private double 环比;
|
||||
// private int 平均提前签单天数;
|
||||
// private double 环比;
|
||||
|
||||
public BIDepartmentRenewalRateRecord()
|
||||
{}
|
||||
|
||||
public BIDepartmentRenewalRateRecord( String 责任部门, double 机构目标值, int 到期数全月, double 序时到期数占比,
|
||||
double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月, int 平均提前签单天数, double 环比 )
|
||||
double 个车续保率序时, double 个车续保率全月, double 环比昨日, double 环比上月 )
|
||||
{
|
||||
this.责任部门 = 责任部门;
|
||||
this.机构目标值 = 机构目标值;
|
||||
@@ -36,8 +36,8 @@ public class BIDepartmentRenewalRateRecord
|
||||
this.个车续保率全月 = 个车续保率全月;
|
||||
this.环比昨日 = 环比昨日;
|
||||
this.环比上月 = 环比上月;
|
||||
this.平均提前签单天数 = 平均提前签单天数;
|
||||
this.环比 = 环比;
|
||||
// this.平均提前签单天数 = 平均提前签单天数;
|
||||
// this.环比 = 环比;
|
||||
}
|
||||
|
||||
public String get责任部门()
|
||||
@@ -120,25 +120,6 @@ public class BIDepartmentRenewalRateRecord
|
||||
this.环比上月 = 环比上月;
|
||||
}
|
||||
|
||||
public int get平均提前签单天数()
|
||||
{
|
||||
return 平均提前签单天数;
|
||||
}
|
||||
|
||||
public void set平均提前签单天数( int 平均提前签单天数 )
|
||||
{
|
||||
this.平均提前签单天数 = 平均提前签单天数;
|
||||
}
|
||||
|
||||
public double get环比()
|
||||
{
|
||||
return 环比;
|
||||
}
|
||||
|
||||
public void set环比( double 环比 )
|
||||
{
|
||||
this.环比 = 环比;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
@@ -160,9 +141,6 @@ public class BIDepartmentRenewalRateRecord
|
||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
temp = Double.doubleToLongBits( 环比上月 );
|
||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
result = prime * result + 平均提前签单天数;
|
||||
temp = Double.doubleToLongBits( 环比 );
|
||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -197,10 +175,6 @@ public class BIDepartmentRenewalRateRecord
|
||||
return false;
|
||||
if ( Double.doubleToLongBits( 环比上月 ) != Double.doubleToLongBits( other.环比上月 ) )
|
||||
return false;
|
||||
if ( 平均提前签单天数 != other.平均提前签单天数 )
|
||||
return false;
|
||||
if ( Double.doubleToLongBits( 环比 ) != Double.doubleToLongBits( other.环比 ) )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -209,7 +183,6 @@ public class BIDepartmentRenewalRateRecord
|
||||
{
|
||||
return "BIDepartmentRenewalRateRecord [责任部门=" + 责任部门 + ", 机构目标值=" + 机构目标值 + ", 到期数全月="
|
||||
+ 到期数全月 + ", 序时到期数占比=" + 序时到期数占比 + ", 个车续保率序时=" + 个车续保率序时 + ", 个车续保率全月=" + 个车续保率全月
|
||||
+ ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + ", 平均提前签单天数=" + 平均提前签单天数 + ", 环比=" + 环比
|
||||
+ "]";
|
||||
+ ", 环比昨日=" + 环比昨日 + ", 环比上月=" + 环比上月 + "]";
|
||||
}
|
||||
}
|
||||
|
@@ -34,18 +34,21 @@ public final class ImportBIExcelData
|
||||
{
|
||||
private static Logger logger = LoggerFactory.getLogger( ImportBIExcelData.class );
|
||||
|
||||
// 坐席 渗透率
|
||||
private static String[] TelsalerAttachingRateExcelTitle = new String[]
|
||||
{ "部门", "经办", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "当月客户渗透率", "客户渗透率环比上月",
|
||||
"当月车非客均保费", "客均保费环比上月"};
|
||||
|
||||
// 坐席 续保率
|
||||
private static String[] TelSalerRenewalRateExcelTitle = new String[]
|
||||
{ "责任部门", "责任人", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
|
||||
"环比上月(%)", "平均提前签单天数", "环比"};
|
||||
"环比上月(%)", "序时-部门内", "全月-部门内"};
|
||||
|
||||
// 机构 渗透率
|
||||
private static String[] DepartmentAttachingRateExcelTitle = new String[]
|
||||
{ "部门", "目标值-机构", "目标差距", "车险保费(万)", "车险保费占比", "非车保费(万)", "当月保费渗透率", "保费渗透率环比上月", "车险客户数", "当月客户渗透率",
|
||||
"客户渗透率环比上月", "当月车非客均保费", "客均保费环比上月"};
|
||||
|
||||
// 机构 续保率
|
||||
private static String[] DepartmentRenewalRateExcelTitle = new String[]
|
||||
{ "责任部门", "机构目标值1(%)", "到期数-全月", "序时到期数占比(%)", "个车续保率(序时)(%)", "个车续保率(全月)(%)", "环比昨日(%)",
|
||||
"环比上月(%)", "序时-部门内", "全月-部门内",};
|
||||
@@ -499,11 +502,11 @@ public final class ImportBIExcelData
|
||||
double 个车续保率全月 = MyPOIUtils.getNumbericCellValue( row, 5 ) * 100;
|
||||
double 环比昨日 = MyPOIUtils.getNumbericCellValue( row, 6 ) * 100;
|
||||
double 环比上月 = MyPOIUtils.getNumbericCellValue( row, 7 ) * 100;
|
||||
int 平均提前签单天数 = (int) MyPOIUtils.getNumbericCellValue( row, 8 );
|
||||
double 环比 = MyPOIUtils.getNumbericCellValue( row, 9 ) * 100;
|
||||
// int 平均提前签单天数 = (int) MyPOIUtils.getNumbericCellValue( row, 8 );
|
||||
// double 环比 = MyPOIUtils.getNumbericCellValue( row, 9 ) * 100;
|
||||
|
||||
BIDepartmentRenewalRateRecord record = new BIDepartmentRenewalRateRecord( 责任部门,
|
||||
机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月, 平均提前签单天数, 环比 );
|
||||
机构目标值, 到期数全月, 序时到期数占比, 个车续保率序时, 个车续保率全月, 环比昨日, 环比上月 );
|
||||
|
||||
records.add( record );
|
||||
}
|
||||
|
@@ -29,24 +29,23 @@
|
||||
</insert>
|
||||
|
||||
<insert id="insertDepartmentRenewalRateDataToDB" parameterType="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord" >
|
||||
insert into BI机构当月个车续保率跟踪表( "责任部门","机构目标值1(%)","到期数-全月" ,"序时到期数占比(%)","个车续保率(序时)(%)",
|
||||
"个车续保率(全月)(%)","环比昨日(%)","环比上月(%)","平均提前签单天数","环比")
|
||||
insert into "BI机构续保率跟踪表-24年"( "责任部门","机构目标值1(%)","到期数-全月" ,"序时到期数占比(%)","个车续保率(序时)(%)",
|
||||
"个车续保率(全月)(%)","环比昨日(%)","环比上月(%)")
|
||||
values (#{责任部门},#{机构目标值},#{到期数全月},#{序时到期数占比},
|
||||
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月},
|
||||
#{平均提前签单天数},#{环比})
|
||||
#{个车续保率序时},#{个车续保率全月},#{环比昨日},#{环比上月} )
|
||||
</insert>
|
||||
|
||||
<select id="cleanTelsalerAttachingRateData" statementType="CALLABLE">
|
||||
call telsale_bi_utils.清理BI电销坐席车非渗透率跟踪表()
|
||||
call TELSALE_BI_UTILS_dev.清理BI电销坐席车非渗透率跟踪表()
|
||||
</select>
|
||||
<select id="cleanTelsalerRenewalRateData" statementType="CALLABLE">
|
||||
call telsale_bi_utils.清理BI电销坐席续保率跟踪表()
|
||||
call TELSALE_BI_UTILS_dev.清理BI电销坐席续保率跟踪表()
|
||||
</select>
|
||||
<select id="cleanDepartmentAttachingRateData" statementType="CALLABLE">
|
||||
call telsale_bi_utils.清理BI部门渗透率跟踪表()
|
||||
call TELSALE_BI_UTILS_dev.清理BI部门渗透率跟踪表()
|
||||
</select>
|
||||
|
||||
<select id="cleanDepartmentRenewalRateData" statementType="CALLABLE">
|
||||
call telsale_bi_utils.清理BI部门续保率跟踪表()
|
||||
call TELSALE_BI_UTILS_dev.清理BI部门续保率跟踪表()
|
||||
</select>
|
||||
</mapper>
|
@@ -105,7 +105,7 @@
|
||||
t."环比上月(%)" as 环比上月,
|
||||
t.平均提前签单天数,
|
||||
t.环比
|
||||
from BI机构当月个车续保率跟踪表 t
|
||||
from "BI机构续保率跟踪表-24年" t
|
||||
</select>
|
||||
<resultMap id="BIDepartmentRenewalRate" type="com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord">
|
||||
<result column="责任部门" property="责任部门" jdbcType="VARCHAR" javaType="String" />
|
||||
@@ -116,7 +116,7 @@
|
||||
<result column="个车续保率全月" property="个车续保率全月" jdbcType="DOUBLE" javaType="double" />
|
||||
<result column="环比昨日" property="环比昨日" jdbcType="DOUBLE" javaType="double" />
|
||||
<result column="环比上月" property="环比上月" jdbcType="DOUBLE" javaType="double" />
|
||||
<result column="平均提前签单天数" property="平均提前签单天数" jdbcType="INTEGER" javaType="int" />
|
||||
<result column="环比" property="环比" jdbcType="DOUBLE" javaType="double" />
|
||||
<!-- <result column="平均提前签单天数" property="平均提前签单天数" jdbcType="INTEGER" javaType="int" /> -->
|
||||
<!-- <result column="环比" property="环比" jdbcType="DOUBLE" javaType="double" /> -->
|
||||
</resultMap>
|
||||
</mapper>
|
@@ -18,6 +18,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import com.cpic.xim.mybatis.mapper.ImportBIArchievementDataMapper;
|
||||
import com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord;
|
||||
import com.cpic.xim.mybatis.pojo.BIDepartmentRenewalRateRecord;
|
||||
import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord;
|
||||
import com.cpic.xim.mybatis.utils.MybatisUtils;
|
||||
import com.cpic.xim.utils.data.ImportBIExcelData;
|
||||
@@ -74,7 +75,7 @@ public class BatchInsertTest
|
||||
@Test
|
||||
public void testBatchInsertBITeslsalerRenewalRate()
|
||||
{
|
||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/坐席-续保.xlsx";
|
||||
String filePath = "D:\\develop\\cpicxim\\deskop_task_schedule\\数据\\测试用\\24年报表\\坐席-续保.xlsx";
|
||||
ArrayList<BITelsalerRenewalRateRecord> records = null;
|
||||
SqlSession session = null;
|
||||
ImportBIArchievementDataMapper mapper = null;
|
||||
@@ -114,7 +115,7 @@ public class BatchInsertTest
|
||||
@Test
|
||||
public void testBatchInsertBIDepartmentAttachingRateToDB()
|
||||
{
|
||||
String filePath = "D:/develop/cpicxim/deskop_task_schedule/数据/测试用/机构渗透.xlsx";
|
||||
String filePath = "D:\\develop\\cpicxim\\deskop_task_schedule\\数据\\测试用\\24年报表\\机构-续保.xlsx";
|
||||
|
||||
ArrayList<BIDepartmentAttachingRateRecord> records = null;
|
||||
SqlSession session = null;
|
||||
@@ -148,4 +149,42 @@ public class BatchInsertTest
|
||||
assert( false );
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBatchInsertBIDepartmentRenewalRateToDB()
|
||||
{
|
||||
String filePath = "D:\\develop\\cpicxim\\deskop_task_schedule\\数据\\测试用\\24年报表\\机构-续保.xlsx";
|
||||
|
||||
ArrayList<BIDepartmentRenewalRateRecord> records = null;
|
||||
SqlSession session = null;
|
||||
ImportBIArchievementDataMapper mapper = null;
|
||||
|
||||
try
|
||||
{
|
||||
records =
|
||||
ImportBIExcelData.importBIDepartmentRenewalRateRecordsFromXlsx( filePath, 0, 1 );
|
||||
session = MybatisUtils.getSqlSessionBatch();
|
||||
mapper = session.getMapper( ImportBIArchievementDataMapper.class );
|
||||
|
||||
mapper.cleanDepartmentRenewalRateData();
|
||||
|
||||
for ( BIDepartmentRenewalRateRecord record : records )
|
||||
{
|
||||
mapper.insertDepartmentRenewalRateDataToDB( record );
|
||||
}
|
||||
|
||||
session.commit();
|
||||
}
|
||||
catch ( Exception error )
|
||||
{
|
||||
if ( session != null )
|
||||
{
|
||||
session.rollback();
|
||||
}
|
||||
|
||||
logger.error("错误", error);
|
||||
|
||||
assert( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user