创建坐席记录文件。

This commit is contained in:
unknown 2023-10-08 01:17:43 +08:00
parent 19d658858e
commit e5dfb45c79
4 changed files with 407 additions and 2 deletions

View File

@ -29,7 +29,7 @@
"axios": "^1.5.1", "axios": "^1.5.1",
"babel": "^6.23.0", "babel": "^6.23.0",
"eslint-config-recommended": "^4.1.0", "eslint-config-recommended": "^4.1.0",
"eslint-config-standard-with-typescript": "^39.1.0", "eslint-config-standard-with-typescript": "^39.1.1",
"eslint-plugin-vue": "^9.17.0", "eslint-plugin-vue": "^9.17.0",
"node-sass": "^9.0.0", "node-sass": "^9.0.0",
"sass": "^1.69.0", "sass": "^1.69.0",

View File

@ -0,0 +1,341 @@
/*
* @Author: Kane
* @Date: 2023-10-07 23:29:22
* @LastEditors: Kane
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/mybatis/pojo/TelsalerFromJYGL.java
* @Description: 经营管理系统中导出的电销坐席数据记录
*
* Copyright (c) ${2023} by Kane, All Rights Reserved.
*/
package com.cpic.xim.mybatis.pojo;
import java.time.LocalDate;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* 经营管理系统中导出的电销坐席数据记录
* @author Kane
*/
public class TelsalerFromJYGL
{
// 名称
@JsonProperty("telsalerName")
private String telsalerName;
// 坐席工号
@JsonProperty("telsalerCode")
private String telsalerCode;
// 籍贯
@JsonProperty("nativePlace")
private String nativePlace;
// 参加工作时间
@JsonProperty("startWorkingDate")
private LocalDate startWorkingDate;
// 入司时间
@JsonProperty("employmentDate")
private LocalDate employmentDate;
// 业务类型
@JsonProperty("business")
private String business;
// 办公地省
@JsonProperty("province")
private String province;
// 办公地市
@JsonProperty("city")
private String city;
// 人员类别
@JsonProperty("employmentType")
private String employmentType;
// 现任岗位
@JsonProperty("quarters")
private String quarters;
// 现任职级
@JsonProperty("rank")
private String rank;
// 机构名称
@JsonProperty("branchName")
private String branchName;
// 职场分类
@JsonProperty("workPlaceType")
private String workPlaceType;
public TelsalerFromJYGL() {}
@Override
public String toString()
{
return "TelsalerFromJYGL [telsalerName=" + telsalerName + ", telsalerCode=" + telsalerCode
+ ", nativePlace=" + nativePlace + ", startWorkingDate=" + startWorkingDate
+ ", employmentDate=" + employmentDate + ", business=" + business + ", province="
+ province + ", city=" + city + ", employmentType=" + employmentType + ", quarters="
+ quarters + ", rank=" + rank + ", branchName=" + branchName + ", workPlaceType="
+ workPlaceType + "]";
}
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + ((telsalerName == null) ? 0 : telsalerName.hashCode());
result = prime * result + ((telsalerCode == null) ? 0 : telsalerCode.hashCode());
result = prime * result + ((nativePlace == null) ? 0 : nativePlace.hashCode());
result = prime * result + ((startWorkingDate == null) ? 0 : startWorkingDate.hashCode());
result = prime * result + ((employmentDate == null) ? 0 : employmentDate.hashCode());
result = prime * result + ((business == null) ? 0 : business.hashCode());
result = prime * result + ((province == null) ? 0 : province.hashCode());
result = prime * result + ((city == null) ? 0 : city.hashCode());
result = prime * result + ((employmentType == null) ? 0 : employmentType.hashCode());
result = prime * result + ((quarters == null) ? 0 : quarters.hashCode());
result = prime * result + ((rank == null) ? 0 : rank.hashCode());
result = prime * result + ((branchName == null) ? 0 : branchName.hashCode());
result = prime * result + ((workPlaceType == null) ? 0 : workPlaceType.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;
TelsalerFromJYGL other = (TelsalerFromJYGL) obj;
if ( telsalerName == null )
{
if ( other.telsalerName != null )
return false;
}
else if ( !telsalerName.equals( other.telsalerName ) )
return false;
if ( telsalerCode == null )
{
if ( other.telsalerCode != null )
return false;
}
else if ( !telsalerCode.equals( other.telsalerCode ) )
return false;
if ( nativePlace == null )
{
if ( other.nativePlace != null )
return false;
}
else if ( !nativePlace.equals( other.nativePlace ) )
return false;
if ( startWorkingDate == null )
{
if ( other.startWorkingDate != null )
return false;
}
else if ( !startWorkingDate.equals( other.startWorkingDate ) )
return false;
if ( employmentDate == null )
{
if ( other.employmentDate != null )
return false;
}
else if ( !employmentDate.equals( other.employmentDate ) )
return false;
if ( business == null )
{
if ( other.business != null )
return false;
}
else if ( !business.equals( other.business ) )
return false;
if ( province == null )
{
if ( other.province != null )
return false;
}
else if ( !province.equals( other.province ) )
return false;
if ( city == null )
{
if ( other.city != null )
return false;
}
else if ( !city.equals( other.city ) )
return false;
if ( employmentType == null )
{
if ( other.employmentType != null )
return false;
}
else if ( !employmentType.equals( other.employmentType ) )
return false;
if ( quarters == null )
{
if ( other.quarters != null )
return false;
}
else if ( !quarters.equals( other.quarters ) )
return false;
if ( rank == null )
{
if ( other.rank != null )
return false;
}
else if ( !rank.equals( other.rank ) )
return false;
if ( branchName == null )
{
if ( other.branchName != null )
return false;
}
else if ( !branchName.equals( other.branchName ) )
return false;
if ( workPlaceType == null )
{
if ( other.workPlaceType != null )
return false;
}
else if ( !workPlaceType.equals( other.workPlaceType ) )
return false;
return true;
}
public String getTelsalerName()
{
return telsalerName;
}
public void setTelsalerName( String telsalerName )
{
this.telsalerName = telsalerName;
}
public String getTelsalerCode()
{
return telsalerCode;
}
public void setTelsalerCode( String telsalerCode )
{
this.telsalerCode = telsalerCode;
}
public String getNativePlace()
{
return nativePlace;
}
public void setNativePlace( String nativePlace )
{
this.nativePlace = nativePlace;
}
public LocalDate getStartWorkingDate()
{
return startWorkingDate;
}
public void setStartWorkingDate( LocalDate startWorkingDate )
{
this.startWorkingDate = startWorkingDate;
}
public LocalDate getEmploymentDate()
{
return employmentDate;
}
public void setEmploymentDate( LocalDate employmentDate )
{
this.employmentDate = employmentDate;
}
public String getBusiness()
{
return business;
}
public void setBusiness( String business )
{
this.business = business;
}
public String getProvince()
{
return province;
}
public void setProvince( String province )
{
this.province = province;
}
public String getCity()
{
return city;
}
public void setCity( String city )
{
this.city = city;
}
public String getEmploymentType()
{
return employmentType;
}
public void setEmploymentType( String employmentType )
{
this.employmentType = employmentType;
}
public String getQuarters()
{
return quarters;
}
public void setQuarters( String quarters )
{
this.quarters = quarters;
}
public String getRank()
{
return rank;
}
public void setRank( String rank )
{
this.rank = rank;
}
public String getBranchName()
{
return branchName;
}
public void setBranchName( String branchName )
{
this.branchName = branchName;
}
public String getWorkPlaceType()
{
return workPlaceType;
}
public void setWorkPlaceType( String workPlaceType )
{
this.workPlaceType = workPlaceType;
}
}

View File

@ -0,0 +1,64 @@
/*
* @Author: Kane
* @Date: 2023-10-07 23:17:13
* @LastEditors: Kane
* @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/utils/data/TelsalerData.java
* @Description: 电销坐席数据导入导出
*
* Copyright (c) ${2023} by Kane, All Rights Reserved.
*/
package com.cpic.xim.utils.data;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import com.cpic.xim.mybatis.pojo.TelsalerFromJYGL;
public class TelsalerData
{
/**
*
* @param filePath Xlsx文件路径
* @return
*/
public static ArrayList<TelsalerFromJYGL> importTelsalersFromXlsx( String filePath )
{
ArrayList<TelsalerFromJYGL> telsalers = new ArrayList<>();
Workbook wb = null;
try
{
wb = WorkbookFactory.create( new File( filePath ) );
}
catch ( IOException error )
{
}
finally
{
try
{
if ( wb != null )
{
wb.close();
}
}
catch ( IOException error )
{
error.printStackTrace();
}
}
return telsalers;
}
public static int importTelsalers( ArrayList<TelsalerFromJYGL> telsalers )
{
int importedCount = 0;
return importedCount;
}
}

View File

@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
@RequestMapping( path = "/import", method = RequestMethod.POST ) @RequestMapping( path = "/import", method = RequestMethod.POST )
public class ImportController public class ImportController
{ {
@PostMapping( path = "/import_telsalers" ) @PostMapping( path = "/import_telsalers.do" )
@ResponseBody @ResponseBody
public ImportTelsalersResponse importTelsalers( @RequestParam ImportTelsalersRequest request ) public ImportTelsalersResponse importTelsalers( @RequestParam ImportTelsalersRequest request )
{ {