fix: 尝试解决导入excle 报找不到字段的问题
This commit is contained in:
parent
d7c383d943
commit
85d840d91a
@ -104,23 +104,15 @@
|
||||
<artifactId>pagehelper</artifactId>
|
||||
<version>5.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<!--<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring-boot-starter</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
@ -139,41 +131,26 @@
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.72</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.auth0</groupId>
|
||||
<artifactId>java-jwt</artifactId>
|
||||
<version>${jwt.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>7.4.1.jre8</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.14</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>19.7.0.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.curator</groupId>
|
||||
<artifactId>curator-framework</artifactId>
|
||||
@ -184,8 +161,6 @@
|
||||
<artifactId>curator-recipes</artifactId>
|
||||
<version>4.0.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- easyexcel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
|
||||
@ -905,7 +905,7 @@ public class ExtractDataService {
|
||||
ExcelInputField[] fields = new ExcelInputField[datasetTableFields.size()];
|
||||
for (int i = 0; i < datasetTableFields.size(); i++) {
|
||||
ExcelInputField field = new ExcelInputField();
|
||||
field.setName(datasetTableFields.get(i).getOriginName());
|
||||
field.setName(datasetTableFields.get(i).getDataeaseName());
|
||||
if (datasetTableFields.get(i).getDeExtractType() == 1) {
|
||||
field.setType("String");
|
||||
field.setFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@ -968,13 +968,14 @@ public class ExtractDataService {
|
||||
TextFileField[] outputFields = new TextFileField[datasetTableFields.size() + 1];
|
||||
for(int i=0;i< datasetTableFields.size();i++){
|
||||
TextFileField textFileField = new TextFileField();
|
||||
textFileField.setName(datasetTableFields.get(i).getOriginName());
|
||||
textFileField.setName(datasetTableFields.get(i).getDataeaseName());
|
||||
if (datasetTableFields.get(i).getDeExtractType() == 2) {
|
||||
textFileField.setType("Integer");
|
||||
textFileField.setFormat("0");
|
||||
} else {
|
||||
textFileField.setType("String");
|
||||
}
|
||||
|
||||
outputFields[i] = textFileField;
|
||||
}
|
||||
TextFileField textFileField = new TextFileField();
|
||||
@ -1013,7 +1014,7 @@ public class ExtractDataService {
|
||||
|
||||
tmp_code = tmp_code.replace("handleWraps", handleWraps);
|
||||
String Column_Fields = "";
|
||||
if (datasourceType.equals(DatasourceTypes.excel) || datasourceType.equals(DatasourceTypes.oracle)) {
|
||||
if (datasourceType.equals(DatasourceTypes.oracle)) {
|
||||
Column_Fields = String.join(",", datasetTableFields.stream().map(DatasetTableField::getOriginName).collect(Collectors.toList()));
|
||||
} else {
|
||||
Column_Fields = String.join(",", datasetTableFields.stream().map(DatasetTableField::getDataeaseName).collect(Collectors.toList()));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user