Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tagManager
Overview
Overview
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
lanmw
tagManager
Commits
e66c5c97
Commit
e66c5c97
authored
Mar 02, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改标签分析和分析导出接口
parent
401ce8bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
TagCtrl.java
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
+1
-1
TagFileService.java
...java/com/keymobile/tagmanager/service/TagFileService.java
+2
-0
TagService.java
...ain/java/com/keymobile/tagmanager/service/TagService.java
+17
-2
No files found.
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
View file @
e66c5c97
...
...
@@ -256,7 +256,7 @@ public class TagCtrl {
return
tagService
.
tagAnalysis
(
dataType
);
}
@ApiOperation
(
value
=
"导出标签分析excel文件(dataType:0,1,2 依次代表:元数据,模型,标准; type:0,1
代表:导出系统分析,导出自定义分析)"
,
notes
=
"导出标签分析excel文件(dataType:0,1,2 依次代表:元数据,模型,标准; type:0,1 代表:导出系统
分析,导出自定义分析)"
)
@ApiOperation
(
value
=
"导出标签分析excel文件(dataType:0,1,2 依次代表:元数据,模型,标准; type:0,1
,2 代表:导出系统分析,导出维度分析,导出自定义分析)"
,
notes
=
"导出标签分析excel文件(dataType:0,1,2 依次代表:元数据,模型,标准; type:0,1,2 代表:导出系统分析,导出维度
分析,导出自定义分析)"
)
@GetMapping
(
"/exportTagAnalysis"
)
public
int
exportTagAnalysis
(
@RequestParam
String
dataType
,
@RequestParam
String
type
,
HttpServletResponse
response
)
throws
Exception
{
...
...
src/main/java/com/keymobile/tagmanager/service/TagFileService.java
View file @
e66c5c97
...
...
@@ -71,6 +71,8 @@ public class TagFileService {
//如果是导出系统标签
if
(
"0"
.
equals
(
type
))
{
tagList
=
(
List
<
Map
<
String
,
Object
>>)
tagAnalysisMap
.
get
(
"sysTag"
);
}
else
if
(
"1"
.
equals
(
type
)){
tagList
=
(
List
<
Map
<
String
,
Object
>>)
tagAnalysisMap
.
get
(
"dimTag"
);
}
else
{
tagList
=
(
List
<
Map
<
String
,
Object
>>)
tagAnalysisMap
.
get
(
"personalTag"
);
}
...
...
src/main/java/com/keymobile/tagmanager/service/TagService.java
View file @
e66c5c97
...
...
@@ -348,8 +348,11 @@ public class TagService {
public
Map
<
String
,
Object
>
tagAnalysis
(
String
dataType
)
throws
Exception
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
String
modelPath
=
null
;
//定义存储系统
和个人标签分析的
list<Map>
//定义存储系统list<Map>
List
<
Map
<
String
,
Object
>>
sysTagList
=
new
ArrayList
<>();
//定义存储维度标签list<Map>
List
<
Map
<
String
,
Object
>>
dimTagList
=
new
ArrayList
<>();
//定义存储自定义标签list<Map>
List
<
Map
<
String
,
Object
>>
perTagList
=
new
ArrayList
<>();
//根据类型获取模型路径
switch
(
dataType
)
{
...
...
@@ -390,7 +393,7 @@ public class TagService {
if
(
"0"
.
equals
(
tag
.
getTagType
()))
{
sysTagList
.
add
(
tagMap
);
}
else
{
per
TagList
.
add
(
tagMap
);
dim
TagList
.
add
(
tagMap
);
}
}
}
...
...
@@ -427,6 +430,17 @@ public class TagService {
}
});
}
//配许维度标签
if
(!
dimTagList
.
isEmpty
())
{
Collections
.
sort
(
dimTagList
,
new
Comparator
<
Map
<
String
,
Object
>>()
{
@Override
public
int
compare
(
Map
<
String
,
Object
>
o1
,
Map
<
String
,
Object
>
o2
)
{
int
total1
=
Integer
.
parseInt
(
o1
.
get
(
"total"
).
toString
());
int
total2
=
Integer
.
parseInt
(
o2
.
get
(
"total"
).
toString
());
return
total2
-
total1
;
}
});
}
//排序个人标签(降序)
if
(!
perTagList
.
isEmpty
())
{
Collections
.
sort
(
perTagList
,
new
Comparator
<
Map
<
String
,
Object
>>()
{
...
...
@@ -440,6 +454,7 @@ public class TagService {
}
//装填结果
result
.
put
(
"sysTag"
,
sysTagList
);
result
.
put
(
"dimTag"
,
dimTagList
);
result
.
put
(
"personalTag"
,
perTagList
);
return
result
;
}
...
...
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