Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
DQMP
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data
DQMP
Commits
81133bc8
Commit
81133bc8
authored
Dec 20, 2019
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add and test import excel codes
parent
8414dae4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
43 deletions
+50
-43
DqReferRuleDto.java
src/main/java/com/gmei/data/dqmp/dto/DqReferRuleDto.java
+11
-11
DqSpecialRuleDto.java
src/main/java/com/gmei/data/dqmp/dto/DqSpecialRuleDto.java
+10
-10
DqUnblankRuleDto.java
src/main/java/com/gmei/data/dqmp/dto/DqUnblankRuleDto.java
+7
-7
DqUniqueRuleDto.java
src/main/java/com/gmei/data/dqmp/dto/DqUniqueRuleDto.java
+13
-7
DqVolatilityRuleDto.java
...main/java/com/gmei/data/dqmp/dto/DqVolatilityRuleDto.java
+8
-8
UniqueExcelListener.java
...java/com/gmei/data/dqmp/listener/UniqueExcelListener.java
+1
-0
No files found.
src/main/java/com/gmei/data/dqmp/dto/DqReferRuleDto.java
View file @
81133bc8
...
...
@@ -7,26 +7,26 @@ import lombok.Data;
@Data
public
class
DqReferRuleDto
extends
BaseRowModel
{
@ExcelProperty
(
value
=
"校验类型"
,
index
=
1
)
@ExcelProperty
(
value
=
"校验类型"
,
index
=
0
)
private
String
checkType
;
@ExcelProperty
(
value
=
"是否启用"
,
index
=
2
)
@ExcelProperty
(
value
=
"是否启用"
,
index
=
1
)
private
Integer
isValid
;
@ExcelProperty
(
value
=
"校验时间"
,
index
=
3
)
@ExcelProperty
(
value
=
"校验时间"
,
index
=
2
)
private
String
checkTime
;
@ExcelProperty
(
value
=
"校验数据库名"
,
index
=
4
)
@ExcelProperty
(
value
=
"校验数据库名"
,
index
=
3
)
private
String
checkDbName
;
@ExcelProperty
(
value
=
"校验数据表名"
,
index
=
5
)
@ExcelProperty
(
value
=
"校验数据表名"
,
index
=
4
)
private
String
checkTbName
;
@ExcelProperty
(
value
=
"校验数据列名"
,
index
=
6
)
@ExcelProperty
(
value
=
"校验数据列名"
,
index
=
5
)
private
String
checkColName
;
@ExcelProperty
(
value
=
"校验表过滤条件"
,
index
=
7
)
@ExcelProperty
(
value
=
"校验表过滤条件"
,
index
=
6
)
private
String
checkFilters
;
@ExcelProperty
(
value
=
"参照数据库名"
,
index
=
8
)
@ExcelProperty
(
value
=
"参照数据库名"
,
index
=
7
)
private
String
referDbName
;
@ExcelProperty
(
value
=
"参照数据表名"
,
index
=
9
)
@ExcelProperty
(
value
=
"参照数据表名"
,
index
=
8
)
private
String
referTbName
;
@ExcelProperty
(
value
=
"参照数据列名"
,
index
=
10
)
@ExcelProperty
(
value
=
"参照数据列名"
,
index
=
9
)
private
String
referColName
;
@ExcelProperty
(
value
=
"参照表过滤条件"
,
index
=
1
1
)
@ExcelProperty
(
value
=
"参照表过滤条件"
,
index
=
1
0
)
private
String
referFilters
;
}
src/main/java/com/gmei/data/dqmp/dto/DqSpecialRuleDto.java
View file @
81133bc8
...
...
@@ -7,24 +7,24 @@ import lombok.Data;
@Data
public
class
DqSpecialRuleDto
extends
BaseRowModel
{
@ExcelProperty
(
value
=
"校验类型"
,
index
=
1
)
@ExcelProperty
(
value
=
"校验类型"
,
index
=
0
)
private
String
checkType
;
@ExcelProperty
(
value
=
"是否启用"
,
index
=
2
)
@ExcelProperty
(
value
=
"是否启用"
,
index
=
1
)
private
Integer
isValid
;
@ExcelProperty
(
value
=
"校验时间"
,
index
=
3
)
@ExcelProperty
(
value
=
"校验时间"
,
index
=
2
)
private
String
checkTime
;
@ExcelProperty
(
value
=
"数据库名"
,
index
=
4
)
@ExcelProperty
(
value
=
"数据库名"
,
index
=
3
)
private
String
dbName
;
@ExcelProperty
(
value
=
"数据表名"
,
index
=
5
)
@ExcelProperty
(
value
=
"数据表名"
,
index
=
4
)
private
String
tbName
;
@ExcelProperty
(
value
=
"数据列名"
,
index
=
6
)
@ExcelProperty
(
value
=
"数据列名"
,
index
=
5
)
private
String
colName
;
@ExcelProperty
(
value
=
"数据时间列名"
,
index
=
7
)
@ExcelProperty
(
value
=
"数据时间列名"
,
index
=
6
)
private
String
timeColName
;
@ExcelProperty
(
value
=
"指标类型"
,
index
=
8
)
@ExcelProperty
(
value
=
"指标类型"
,
index
=
7
)
private
String
indicatorType
;
@ExcelProperty
(
value
=
"数据校验起始时间"
,
index
=
9
)
@ExcelProperty
(
value
=
"数据校验起始时间"
,
index
=
8
)
private
String
startTime
;
@ExcelProperty
(
value
=
"过滤条件"
,
index
=
10
)
@ExcelProperty
(
value
=
"过滤条件"
,
index
=
9
)
private
String
filters
;
}
src/main/java/com/gmei/data/dqmp/dto/DqUnblankRuleDto.java
View file @
81133bc8
...
...
@@ -7,18 +7,18 @@ import lombok.Data;
@Data
public
class
DqUnblankRuleDto
extends
BaseRowModel
{
@ExcelProperty
(
value
=
"校验类型"
,
index
=
1
)
@ExcelProperty
(
value
=
"校验类型"
,
index
=
0
)
private
String
checkType
;
@ExcelProperty
(
value
=
"是否启用"
,
index
=
2
)
@ExcelProperty
(
value
=
"是否启用"
,
index
=
1
)
private
Integer
isValid
;
@ExcelProperty
(
value
=
"校验时间"
,
index
=
3
)
@ExcelProperty
(
value
=
"校验时间"
,
index
=
2
)
private
String
checkTime
;
@ExcelProperty
(
value
=
"数据库名"
,
index
=
4
)
@ExcelProperty
(
value
=
"数据库名"
,
index
=
3
)
private
String
dbName
;
@ExcelProperty
(
value
=
"数据表名"
,
index
=
5
)
@ExcelProperty
(
value
=
"数据表名"
,
index
=
4
)
private
String
tbName
;
@ExcelProperty
(
value
=
"数据列名"
,
index
=
6
)
@ExcelProperty
(
value
=
"数据列名"
,
index
=
5
)
private
String
colName
;
@ExcelProperty
(
value
=
"过滤条件"
,
index
=
7
)
@ExcelProperty
(
value
=
"过滤条件"
,
index
=
6
)
private
String
filters
;
}
src/main/java/com/gmei/data/dqmp/dto/DqUniqueRuleDto.java
View file @
81133bc8
...
...
@@ -7,18 +7,24 @@ import lombok.Data;
@Data
public
class
DqUniqueRuleDto
extends
BaseRowModel
{
@ExcelProperty
(
value
=
"校验类型"
,
index
=
1
)
@ExcelProperty
(
value
=
"校验类型"
,
index
=
0
)
private
String
checkType
;
@ExcelProperty
(
value
=
"是否启用"
,
index
=
2
)
@ExcelProperty
(
value
=
"是否启用"
,
index
=
1
)
private
Integer
isValid
;
@ExcelProperty
(
value
=
"校验时间"
,
index
=
3
)
@ExcelProperty
(
value
=
"校验时间"
,
index
=
2
)
private
String
checkTime
;
@ExcelProperty
(
value
=
"数据库名"
,
index
=
4
)
@ExcelProperty
(
value
=
"数据库名"
,
index
=
3
)
private
String
dbName
;
@ExcelProperty
(
value
=
"数据表名"
,
index
=
5
)
@ExcelProperty
(
value
=
"数据表名"
,
index
=
4
)
private
String
tbName
;
@ExcelProperty
(
value
=
"数据列名"
,
index
=
6
)
@ExcelProperty
(
value
=
"数据列名"
,
index
=
5
)
private
String
colName
;
@ExcelProperty
(
value
=
"过滤条件"
,
index
=
7
)
@ExcelProperty
(
value
=
"过滤条件"
,
index
=
6
)
private
String
filters
;
@Override
public
String
toString
()
{
return
"DqUniqueRuleDto [checkType="
+
checkType
+
", isValid="
+
isValid
+
", checkTime="
+
checkTime
+
", dbName="
+
dbName
+
", tbName="
+
tbName
+
", colName="
+
colName
+
", filters="
+
filters
+
"]"
;
}
}
src/main/java/com/gmei/data/dqmp/dto/DqVolatilityRuleDto.java
View file @
81133bc8
...
...
@@ -7,20 +7,20 @@ import lombok.Data;
@Data
public
class
DqVolatilityRuleDto
extends
BaseRowModel
{
@ExcelProperty
(
value
=
"校验类型"
,
index
=
1
)
@ExcelProperty
(
value
=
"校验类型"
,
index
=
0
)
private
String
checkType
;
@ExcelProperty
(
value
=
"是否启用"
,
index
=
2
)
@ExcelProperty
(
value
=
"是否启用"
,
index
=
1
)
private
Integer
isValid
;
@ExcelProperty
(
value
=
"校验时间"
,
index
=
3
)
@ExcelProperty
(
value
=
"校验时间"
,
index
=
2
)
private
String
checkTime
;
@ExcelProperty
(
value
=
"数据库名"
,
index
=
4
)
@ExcelProperty
(
value
=
"数据库名"
,
index
=
3
)
private
String
dbName
;
@ExcelProperty
(
value
=
"数据表名"
,
index
=
5
)
@ExcelProperty
(
value
=
"数据表名"
,
index
=
4
)
private
String
tbName
;
@ExcelProperty
(
value
=
"数据列名"
,
index
=
6
)
@ExcelProperty
(
value
=
"数据列名"
,
index
=
5
)
private
String
colName
;
@ExcelProperty
(
value
=
"指标类型"
,
index
=
7
)
@ExcelProperty
(
value
=
"指标类型"
,
index
=
6
)
private
String
indicatorType
;
@ExcelProperty
(
value
=
"过滤条件"
,
index
=
8
)
@ExcelProperty
(
value
=
"过滤条件"
,
index
=
7
)
private
String
filters
;
}
src/main/java/com/gmei/data/dqmp/listener/UniqueExcelListener.java
View file @
81133bc8
...
...
@@ -39,6 +39,7 @@ public class UniqueExcelListener extends AnalysisEventListener<Object> {
public
void
doSomething
(){
for
(
Object
o:
data
)
{
String
jsonString
=
JSONObject
.
toJSONString
(
o
);
System
.
out
.
println
(
jsonString
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonString
);
DqRuleVo
dqRuleVo
=
JSON
.
toJavaObject
(
jsonObject
,
DqRuleVo
.
class
);
dqRuleService
.
addDqRule
(
dqRuleVo
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment