Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
base_platform_enterprise
gic-platform-enterprise
Commits
935c5ad6
Commit
935c5ad6
authored
Jun 09, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报表中心
parent
00a9fc99
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
9 deletions
+20
-9
DownloadReportStatusEnum.java
...com/gic/enterprise/constant/DownloadReportStatusEnum.java
+3
-2
DownloadReportServiceImpl.java
...ic/enterprise/service/impl/DownloadReportServiceImpl.java
+8
-1
DownloadReportApiServiceImpl.java
...rise/service/outer/impl/DownloadReportApiServiceImpl.java
+6
-6
TabDownloadReportMapper.xml
...ice/src/main/resources/mapper/TabDownloadReportMapper.xml
+3
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/DownloadReportStatusEnum.java
View file @
935c5ad6
...
...
@@ -39,8 +39,9 @@ public enum DownloadReportStatusEnum {
*/
GENERATED
(
5
,
"已生成"
),
ERROR
(
6
,
"生成异常"
)
;
ERROR
(
6
,
"生成异常"
),
WAITLINE
(
7
,
"排队中"
);
private
Integer
code
;
private
String
msg
;
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/DownloadReportServiceImpl.java
View file @
935c5ad6
...
...
@@ -61,7 +61,9 @@ public class DownloadReportServiceImpl implements DownloadReportService {
public
Page
<
TabDownloadReport
>
listDownloadReport
(
DownloadReportQO
downloadReportQO
)
{
PageHelper
.
startPage
(
downloadReportQO
.
getCurrentPage
(),
downloadReportQO
.
getPageSize
());
if
(
downloadReportQO
.
getDownloadReportStatus
()
!=
null
)
{
switch
(
downloadReportQO
.
getDownloadReportStatus
())
{
Integer
downloadReportStatus
=
downloadReportQO
.
getDownloadReportStatus
();
downloadReportQO
.
setDownloadReportStatus
(
null
);
switch
(
downloadReportStatus
)
{
case
0
:
downloadReportQO
.
setAuditResult
(
DataSecurityAuditEnum
.
WAIT
.
getCode
());
downloadReportQO
.
setLtAuditExpireTime
(
new
Date
());
...
...
@@ -84,6 +86,11 @@ public class DownloadReportServiceImpl implements DownloadReportService {
downloadReportQO
.
setAuditResult
(
DataSecurityAuditEnum
.
PASS
.
getCode
());
downloadReportQO
.
setHasDownloadUrl
(
true
);
break
;
case
6
:
downloadReportQO
.
setDownloadReportStatus
(
6
);
break
;
case
7
:
downloadReportQO
.
setDownloadReportStatus
(
7
);
default
:
break
;
}
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/DownloadReportApiServiceImpl.java
View file @
935c5ad6
...
...
@@ -133,7 +133,12 @@ public class DownloadReportApiServiceImpl implements DownloadReportApiService {
DateUtil
.
dateToStr
(
downloadReportDTO
.
getReportEndTime
(),
DateUtil
.
FORMAT_DATE_10
);
downloadReportDTO
.
setFileName
(
fileName
);
}
if
(
"hive"
.
equals
(
downloadReportDTO
.
getDataSource
())){
downloadReportDTO
.
setStatus
(
DownloadReportStatusEnum
.
WAITLINE
.
getCode
());
}
else
{
//sdk下载没有任务队列 直接生成中状态
downloadReportDTO
.
setStatus
(
DownloadReportStatusEnum
.
BUILD
.
getCode
());
}
Integer
downloadReportId
=
downloadReportService
.
save
(
downloadReportDTO
);
return
EnterpriseServiceResponse
.
success
(
downloadReportId
);
}
...
...
@@ -162,11 +167,6 @@ public class DownloadReportApiServiceImpl implements DownloadReportApiService {
if
(
DataSecurityAuditEnum
.
WAIT
.
getCode
().
equals
(
downloadReportDTO
.
getAuditResult
())
&&
DateUtil
.
compareDate
(
currDate
,
downloadReportDTO
.
getAuditExpireTime
()))
{
downloadReportDTO
.
setDownloadReportStatus
(
DownloadReportStatusEnum
.
OVER_TIME
.
getCode
());
downloadReportDTO
.
setAuditReason
(
"审核超时"
);
}
else
if
(
DataSecurityAuditEnum
.
PASS
.
getCode
().
equals
(
downloadReportDTO
.
getAuditResult
()))
{
// 判断生成状态
downloadReportDTO
.
setDownloadReportStatus
(
StringUtils
.
isNotBlank
(
downloadReportDTO
.
getDownloadUrl
())
?
DownloadReportStatusEnum
.
GENERATED
.
getCode
()
:
DownloadReportStatusEnum
.
BUILD
.
getCode
());
}
else
{
downloadReportDTO
.
setDownloadReportStatus
(
downloadReportDTO
.
getAuditResult
());
}
downloadReportDTO
.
setDownloadUrl
(
null
);
}
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabDownloadReportMapper.xml
View file @
935c5ad6
...
...
@@ -404,6 +404,9 @@
<if
test=
"projectCode == null or projectCode == '' "
>
and project_code in ('gic', 'mall')
</if>
<if
test=
"downloadReportStatus != null"
>
and status=#{downloadReportStatus}
</if>
order by create_time desc
</select>
<select
id=
"listUnfinishedTask"
resultMap=
"BaseResultMap"
>
...
...
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