Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bi-report
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
bi-report
Commits
248303be
Commit
248303be
authored
Apr 30, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
363446af
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
workspace.xml
.idea/workspace.xml
+1
-1
workspace.xml
lib/java/bi-report-service/.idea/workspace.xml
+1
-1
BiReportServiceImpl.java
...data/gateway/server/service/impl/BiReportServiceImpl.java
+5
-1
SparksqlServiceImpl.java
...data/gateway/server/service/impl/SparksqlServiceImpl.java
+4
-0
No files found.
.idea/workspace.xml
View file @
248303be
...
...
@@ -118,7 +118,7 @@
<workItem
from=
"1587982524517"
duration=
"5052000"
/>
<workItem
from=
"1588152481879"
duration=
"139000"
/>
<workItem
from=
"1588154352798"
duration=
"195000"
/>
<workItem
from=
"1588220085338"
duration=
"
4971
000"
/>
<workItem
from=
"1588220085338"
duration=
"
5045
000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"add init codes."
>
<created>
1587723565207
</created>
...
...
lib/java/bi-report-service/.idea/workspace.xml
View file @
248303be
...
...
@@ -214,7 +214,7 @@
<workItem
from=
"1584945647680"
duration=
"4469000"
/>
<workItem
from=
"1588148891822"
duration=
"2318000"
/>
<workItem
from=
"1588152718016"
duration=
"1463000"
/>
<workItem
from=
"1588154601852"
duration=
"17
055
000"
/>
<workItem
from=
"1588154601852"
duration=
"17
671
000"
/>
</task>
<servers
/>
</component>
...
...
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/service/impl/BiReportServiceImpl.java
View file @
248303be
...
...
@@ -27,7 +27,11 @@ public class BiReportServiceImpl implements BiReportService {
@Override
public
int
genExcel
(
String
name
){
ExcelGenDto
resultDto
=
sparksqlService
.
getResultDto
(
name
);
return
excelService
.
genExcel
(
resultDto
,
"测试示例"
);
if
(
null
==
resultDto
){
return
-
1
;
}
else
{
return
excelService
.
genExcel
(
resultDto
,
"测试示例"
);
}
}
@Override
...
...
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/service/impl/SparksqlServiceImpl.java
View file @
248303be
...
...
@@ -32,6 +32,7 @@ public class SparksqlServiceImpl implements SparksqlService {
@Override
public
ExcelGenDto
getResultDto
(
String
name
){
ExcelGenDto
excelGenDto
=
null
;
List
<
String
>
sheetNameList
=
new
ArrayList
<
String
>();
List
<
List
<
String
>>
headersList
=
new
ArrayList
<
List
<
String
>>();
List
<
List
<
List
>>
rowsList
=
new
ArrayList
<
List
<
List
>>();
...
...
@@ -57,6 +58,7 @@ public class SparksqlServiceImpl implements SparksqlService {
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
logger
.
error
(
e
.
getMessage
());
continue
;
}
finally
{
if
(
reader
!=
null
)
{
try
{
...
...
@@ -64,6 +66,7 @@ public class SparksqlServiceImpl implements SparksqlService {
}
catch
(
IOException
e1
)
{
e1
.
printStackTrace
();
logger
.
error
(
e1
.
getMessage
());
continue
;
}
}
}
...
...
@@ -89,6 +92,7 @@ public class SparksqlServiceImpl implements SparksqlService {
}
}
catch
(
Exception
e
){
logger
.
error
(
e
.
getMessage
());
return
null
;
}
headersList
.
add
(
headers
);
rowsList
.
add
(
rows
);
...
...
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