Compare commits

..

No commits in common. "7311ab5e2add1a5594d2a08d94cda1a6847028a2" and "02ac5274e01872a196c6dcc63f99f39a06f4342b" have entirely different histories.

7 changed files with 5 additions and 266 deletions

View File

@ -31,24 +31,6 @@ interface ImportBIReportResponse
importedCount: number,
}
// BI坐席渗透率报表记录
interface BITelsalerAttachingRateReportRecord
{
departmentName: string;
telsalerName: string;
motoPremium: number;
nomotoPremium: number;
attachingRatePresentMonth: number;
attachingRateChange: number;
}
interface QueryBITelsalerAttachingRateReportResponse
{
success: boolean,
message: string,
records: BITelsalerAttachingRateReportRecord[];
}
type ImportBIReportResponseHandler = ( response: ImportBIReportResponse, error?: any ) => void;
/**
@ -93,7 +75,5 @@ export {
type ImportBIReportRequest,
type ImportBIReportResponse,
type ImportBIReportResponseHandler,
type BITelsalerAttachingRateReportRecord,
type QueryBITelsalerAttachingRateReportResponse,
importBIReport
};

View File

@ -1,21 +0,0 @@
/*
* @Author: Kane
* @Date: 2023-11-01 15:50:40
* @LastEditors: Kane
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/mapper/QueryBIArchievementDataMapper.java
* @Description:
*
* Copyright (c) ${2023} by Kane, All Rights Reserved.
*/
package com.cpic.xim.mybatis.mapper;
import java.util.ArrayList;
import com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord;
import com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord;
public interface QueryBIArchievementDataMapper
{
public ArrayList<BITelsalerAttachingRateRecord> queryBITelsalerAttachingRate();
public ArrayList<BITelsalerRenewalRateRecord> queryBITesalerRenewalRate();
}

View File

@ -47,19 +47,19 @@ public class BITelsalerAttachingRateRecord
private double attachingRateChange;
// 当月客户渗透率
@JsonProperty( "customerHandleRate" )
@JsonProperty( "customerHandleRateCell" )
private double customerHandleRate;
// 客户渗透率环比上月
@JsonProperty( "customerHandleRateChange" )
@JsonProperty( "customerHandleRateChangeCell" )
private double customerHandleRateChange;
// 当月车非客均保费
@JsonProperty( "noMotoPremiumPerCustomer" )
@JsonProperty( "noMotoPremiumPerCustomerCell" )
private double noMotoPremiumPerCustomer;
// 客均保费环比上月
@JsonProperty( "noMotoPremiumPerCustomerChange" )
@JsonProperty( "noMotoPremiumPerCustomerChangeCell" )
private double noMotoPremiumPerCustomerChange;
public BITelsalerAttachingRateRecord( String departmentName, LocalDate summaryDate,

View File

@ -1,74 +0,0 @@
/*
* @Author: Kane
* @Date: 2023-11-01 16:48:56
* @LastEditors: Kane
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/archievement/bi/BIReportController.java
* @Description: BI报表相关的controller
*
* Copyright (c) ${2023} by Kane, All Rights Reserved.
*/
package com.cpic.xim.web.controllers.archievement.bi;
import java.io.IOException;
import java.util.ArrayList;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.session.SqlSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.cpic.xim.mybatis.mapper.QueryBIArchievementDataMapper;
import com.cpic.xim.mybatis.pojo.BIDepartmentAttachingRateRecord;
import com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord;
import com.cpic.xim.mybatis.utils.MybatisUtils;
@Controller
@RequestMapping( method = RequestMethod.POST, path = "/archievement" )
public class BIReportController
{
private static Logger logger = LoggerFactory.getLogger( BIReportController.class );
@PostMapping( path = "/bi_telsaler_attachingrate.do" )
@ResponseBody
QueryTelsalerAttachingRateReportResponse queryTelsalerAttachingRateRepor()
{
QueryTelsalerAttachingRateReportResponse response =
new QueryTelsalerAttachingRateReportResponse();
SqlSession session = null;
QueryBIArchievementDataMapper mapper = null;
try
{
session = MybatisUtils.getSqlSession();
mapper = session.getMapper( QueryBIArchievementDataMapper.class );
ArrayList<BITelsalerAttachingRateRecord> records =
mapper.queryBITelsalerAttachingRate();
response.setSuccess( true );
response.setMessage( "查询成功" );
response.setRecords( records );
}
catch ( IOException error )
{
logger.error("查询BI坐席渗透率报表出现IOException异常异常内容", error);
response.setSuccess( false );
response.setMessage( "查询失败,原因" + error.getMessage() );
response.setRecords( null );
}
catch ( PersistenceException error )
{
logger.error("查询BI坐席渗透率报表出现PersistenceException异常异常内容", error);
response.setSuccess( false );
response.setMessage( "查询失败,原因" + error.getMessage() );
response.setRecords( null );
}
return response;
}
}

View File

@ -1,82 +0,0 @@
/*
* @Author: Kane
* @Date: 2023-11-01 16:51:53
* @LastEditors: Kane
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/archievement/bi/QueryTelsalerAttachingRateReportResponse.java
* @Description:
*
* Copyright (c) ${2023} by Kane, All Rights Reserved.
*/
package com.cpic.xim.web.controllers.archievement.bi;
import java.util.ArrayList;
import com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord;
import com.cpic.xim.web.controllers.QueryResponse;
import com.fasterxml.jackson.annotation.JsonProperty;
public class QueryTelsalerAttachingRateReportResponse extends QueryResponse
{
@JsonProperty("records")
ArrayList<BITelsalerAttachingRateRecord> records;
public QueryTelsalerAttachingRateReportResponse( boolean success, String message,
ArrayList<BITelsalerAttachingRateRecord> records )
{
super( success, message );
this.records = records;
}
public QueryTelsalerAttachingRateReportResponse()
{
super( false, "" );
this.records = null;
}
public ArrayList<BITelsalerAttachingRateRecord> getRecords()
{
return records;
}
public void setRecords( ArrayList<BITelsalerAttachingRateRecord> records )
{
this.records = records;
}
@Override
public String toString()
{
return "QueryTelsalerAttachingRateReportResponse [records=" + records + "]";
}
@Override
public int hashCode()
{
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((records == null) ? 0 : records.hashCode());
return result;
}
@Override
public boolean equals( Object obj )
{
if ( this == obj )
return true;
if ( !super.equals( obj ) )
return false;
if ( getClass() != obj.getClass() )
return false;
QueryTelsalerAttachingRateReportResponse other =
(QueryTelsalerAttachingRateReportResponse) obj;
if ( records == null )
{
if ( other.records != null )
return false;
}
else if ( !records.equals( other.records ) )
return false;
return true;
}
}

View File

@ -1,63 +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.QueryBIArchievementDataMapper">
<!-- 查询坐席车非渗透率报表 -->
<select id="queryBITelsalerAttachingRate" resultMap="BITelsalerAttachingRate">
SELECT t.部门,
t.经办,
t."车险保费(万)" as 车险保费,
t.车险保费占比,
t."非车保费(万)" as 非车保费,
t.当月保费渗透率,
t.保费渗透率环比上月,
t.当月客户渗透率,
t.客户渗透率环比上月,
t.当月车非客均保费,
t.客均保费环比上月
FROM BI电销坐席车非渗透率跟踪表 t
ORDER BY t.部门
</select>
<!-- 坐席车非渗透率报表记录 -->
<resultMap id="BITelsalerAttachingRate" type="com.cpic.xim.mybatis.pojo.BITelsalerAttachingRateRecord">
<result property="departmentName" column="部门" javaType="String" jdbcType="VARCHAR" />
<result property="telsalerName" column="经办" javaType="String" jdbcType="VARCHAR" />
<result property="motoPremium" column="车险保费" javaType="double" jdbcType="DOUBLE" />
<result property="motoPremiumProportion" column="车险保费占比" javaType="double" jdbcType="DOUBLE" />
<result property="nomotoPremium" column="非车保费" javaType="double" jdbcType="DOUBLE" />
<result property="attachingRate" column="当月保费渗透率" javaType="double" jdbcType="DOUBLE" />
<result property="attachingRateChange" column="保费渗透率环比上月" javaType="double" jdbcType="DOUBLE" />
<result property="customerHandleRate" column="当月客户渗透率" javaType="double" jdbcType="DOUBLE" />
<result property="customerHandleRateChange" column="客户渗透率环比上月" javaType="double" jdbcType="DOUBLE" />
<result property="noMotoPremiumPerCustomer" column="当月车非客均保费" javaType="double" jdbcType="DOUBLE" />
<result property="noMotoPremiumPerCustomerChange" column="客均保费环比上月" javaType="double" jdbcType="DOUBLE" />
</resultMap>
<select id="queryBITesalerRenewalRate" resultMap="BITelsalerRenewalRate">
select t.责任部门,
t.责任人,
t."机构目标值1(%)" as 机构目标值,
t."到期数-全月" as 到期数全月,
t."序时到期数占比(%)" as 序时到期数占比,
t."个车续保率(序时)(%)" as 个车续保率序时,
t."个车续保率(全月)(%)" as 个车续保率全月,
t."环比昨日(%)" as 环比昨日,
t."环比上月(%)" as 环比上月,
t.平均提前签单天数,
t.环比
from BI电销坐席续保率跟踪表 t
</select>
<resultMap id="BITelsalerRenewalRate" type="com.cpic.xim.mybatis.pojo.BITelsalerRenewalRateRecord">
<result property="责任部门" column="责任部门" javaType="String" jdbcType="VARCHAR" />
<result property="责任人" column="责任人" javaType="String" jdbcType="VARCHAR" />
<result property="机构目标值" column="机构目标值" javaType="double" jdbcType="DOUBLE" />
<result property="到期数全月" column="到期数全月" javaType="double" jdbcType="DOUBLE" />
<result property="序时到期数占比" column="序时到期数占比" javaType="double" jdbcType="DOUBLE" />
<result property="个车续保率序时" column="个车续保率序时" javaType="double" jdbcType="DOUBLE" />
<result property="个车续保率全月" column="个车续保率全月" javaType="double" jdbcType="DOUBLE" />
<result property="环比昨日" column="环比昨日" javaType="double" jdbcType="DOUBLE" />
<result property="环比上月" column="环比上月" javaType="double" jdbcType="DOUBLE" />
<result property="平均提前签单天数" column="平均提前签单天数" javaType="int" jdbcType="DOUBLE" />
<result property="环比" column="环比" javaType="int" jdbcType="DOUBLE" />
</resultMap>
</mapper>

View File

@ -26,7 +26,6 @@
<mapper resource="mybatis/mapper/ArchievementMapper.xml" />
<mapper resource="mybatis/mapper/RankingListMapper.xml" />
<mapper resource="mybatis/mapper/RewardsMapper.xml" />
<mapper resource="mybatis/mapper/ImportBIArchievementDataMapper.xml" />
<mapper resource="mybatis/mapper/QueryBIArchievementDataMapper.xml" />
<mapper resource="mybatis/mapper/ImportBIArchievementDataMapper.xml" />
</mappers>
</configuration>