保存进度!
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-10-08 14:45:13
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/TelsalerAttachingRateRecord.java
|
||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/BITelsalerAttachingRateRecord.java
|
||||
* @Description: 用于存放BI导出每日电销坐席车险非车险保费和车非渗透率数据.
|
||||
*
|
||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||
@@ -20,41 +20,37 @@ public class BITelsalerAttachingRateRecord
|
||||
|
||||
// 坐席名称
|
||||
@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 )
|
||||
public BITelsalerAttachingRateRecord( LocalDate summaryDate, String telsalerName, double motoPremium, double nomotoPremium, double motoPremiumProportion, double attachingRate, double attachingRateChange, double customerHandleRate, double customerHandleRateChange, double noMotoPremiumPerCustomer, double noMotoPremiumPerCustomerChange )
|
||||
{
|
||||
this.summaryDate = summaryDate;
|
||||
this.telsalerName = telsalerName;
|
||||
|
@@ -72,6 +72,11 @@ public class MybatisUtils
|
||||
return sessionBatch;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
public static SqlSession getSqlSession() throws IOException
|
||||
{
|
||||
// 根据配置文件的路径,查找是否已经创建了对应的session
|
||||
@@ -94,6 +99,13 @@ public class MybatisUtils
|
||||
return session;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个Batch模式的sqlsession,使用默认路径的mybatis-config.xml文件。
|
||||
* 先判断SessionMapBatch中是否有和配置文件对应的缓存的sqlsession对象,有就直接使用。
|
||||
* 没有就创建一个新的,然后放入SessionMapBatch中。
|
||||
* @return ExecutorType.BATCH模式的sqlsession实例对象
|
||||
* @throws IOException 读取配置文件错误时抛出IOException异常
|
||||
*/
|
||||
public static SqlSession getSqlSessionBatch() throws IOException
|
||||
{
|
||||
SqlSession sessionBatch = SessionMapBatch.get( DEFAULT_CONFIGFILE );
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-04-05 22:34:36
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/QueryResult.java
|
||||
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/QueryResponse.java
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
@@ -11,36 +11,49 @@ package com.cpic.xim.web.controllers;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class QueryResponse {
|
||||
public class QueryResponse
|
||||
{
|
||||
@JsonProperty( "success" )
|
||||
private boolean success;
|
||||
|
||||
public QueryResponse(boolean success, String message) {
|
||||
@JsonProperty( "message" )
|
||||
private String message;
|
||||
|
||||
public QueryResponse( boolean success, String message )
|
||||
{
|
||||
this.success = success;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public QueryResponse() {
|
||||
public QueryResponse()
|
||||
{
|
||||
this.success = false;
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
public boolean isSuccess()
|
||||
{
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
public void setSuccess( boolean success )
|
||||
{
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
public String getMessage()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
public void setMessage( String message )
|
||||
{
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
public int hashCode()
|
||||
{
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + (success ? 1231 : 1237);
|
||||
@@ -49,26 +62,30 @@ public class QueryResponse {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) return true;
|
||||
if (obj == null) return false;
|
||||
if (getClass() != obj.getClass()) return false;
|
||||
public boolean equals( Object obj )
|
||||
{
|
||||
if ( this == obj )
|
||||
return true;
|
||||
if ( obj == null )
|
||||
return false;
|
||||
if ( getClass() != obj.getClass() )
|
||||
return false;
|
||||
QueryResponse other = (QueryResponse) obj;
|
||||
if (success != other.success) return false;
|
||||
if (message == null) {
|
||||
if (other.message != null) return false;
|
||||
} else if (!message.equals(other.message)) return false;
|
||||
if ( success != other.success )
|
||||
return false;
|
||||
if ( message == null )
|
||||
{
|
||||
if ( other.message != null )
|
||||
return false;
|
||||
}
|
||||
else if ( !message.equals( other.message ) )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public String toString()
|
||||
{
|
||||
return "QueryResult [success=" + success + ", message=" + message + "]";
|
||||
}
|
||||
|
||||
@JsonProperty("success")
|
||||
private boolean success;
|
||||
|
||||
@JsonProperty("message")
|
||||
private String message;
|
||||
}
|
||||
|
@@ -13,6 +13,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class ImportTelsalersRequest
|
||||
{
|
||||
// 是否全量导入
|
||||
@JsonProperty( "fullImport" )
|
||||
private boolean fullImport;
|
||||
|
||||
// 文件路径
|
||||
@JsonProperty( "filePath" )
|
||||
private String filePath;
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
* @param fullImport 是否全量导入
|
||||
@@ -87,12 +95,4 @@ public class ImportTelsalersRequest
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 是否全量导入
|
||||
@JsonProperty( "fullImport" )
|
||||
private boolean fullImport;
|
||||
|
||||
// 文件路径
|
||||
@JsonProperty( "filePath" )
|
||||
private String filePath;
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ public class ImportBIDataRequest
|
||||
|
||||
// 导入文件的路径
|
||||
@JsonProperty( "filePath" )
|
||||
private String filePath;
|
||||
private String filePath;
|
||||
|
||||
// 报表名称
|
||||
@JsonProperty( "reportType" )
|
||||
@@ -29,11 +29,11 @@ public class ImportBIDataRequest
|
||||
|
||||
// 是否有标题行
|
||||
@JsonProperty( "hasCaption" )
|
||||
private boolean hasCaption;
|
||||
private boolean hasCaption;
|
||||
|
||||
// sheet索引
|
||||
@JsonProperty( "sheetIndex" )
|
||||
private int sheetIndex;
|
||||
private int sheetIndex;
|
||||
|
||||
public ImportBIDataRequest()
|
||||
{}
|
||||
|
Reference in New Issue
Block a user