Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-web
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
cloud-web
Commits
4b2fe8c0
Commit
4b2fe8c0
authored
Apr 10, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出可见范围
parent
65ae7aad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
cloud-web-manage/src/main/java/com/yizhi/application/rangeExport/RangeExportController.java
+23
-2
No files found.
cloud-web-manage/src/main/java/com/yizhi/application/rangeExport/RangeExportController.java
View file @
4b2fe8c0
...
@@ -2,16 +2,22 @@ package com.yizhi.application.rangeExport;
...
@@ -2,16 +2,22 @@ package com.yizhi.application.rangeExport;
import
com.yizhi.application.customProject.contoller.ExperiencePoolRangeExport
;
import
com.yizhi.application.customProject.contoller.ExperiencePoolRangeExport
;
import
com.yizhi.core.application.context.ContextHolder
;
import
com.yizhi.core.application.context.ContextHolder
;
import
com.yizhi.exam.application.feign.ExamAuthorizeClient
;
import
com.yizhi.research.application.feign.ResearchAuthorizeClient
;
import
com.yizhi.research.application.vo.VisibleRangeExport
;
import
com.yizhi.util.application.domain.Response
;
import
com.yizhi.util.application.domain.Response
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -47,6 +53,10 @@ public class RangeExportController {
...
@@ -47,6 +53,10 @@ public class RangeExportController {
@Autowired
@Autowired
private
TrainingProjectVisibleRangeExport
trainingProjectVisibleRangeExport
;
private
TrainingProjectVisibleRangeExport
trainingProjectVisibleRangeExport
;
@Autowired
private
ResearchAuthorizeClient
researchAuthorizeClient
;
@Autowired
private
ExamAuthorizeClient
examAuthorizeClient
;
// @Autowired
// @Autowired
// private VoteVisibleRangeExport voteVisibleRangeExport;
// private VoteVisibleRangeExport voteVisibleRangeExport;
...
@@ -57,6 +67,9 @@ public class RangeExportController {
...
@@ -57,6 +67,9 @@ public class RangeExportController {
@Autowired
@Autowired
private
CaseLibraryRangeExport
caseLibraryRangeExport
;
private
CaseLibraryRangeExport
caseLibraryRangeExport
;
@Value
(
"${pc.host.url}"
)
String
pcHostUrl
;
@ApiOperation
(
value
=
"作业可见范围导出"
,
notes
=
"作业可见范围导出1"
)
@ApiOperation
(
value
=
"作业可见范围导出"
,
notes
=
"作业可见范围导出1"
)
@GetMapping
(
"/assignment"
)
@GetMapping
(
"/assignment"
)
...
@@ -81,7 +94,11 @@ public class RangeExportController {
...
@@ -81,7 +94,11 @@ public class RangeExportController {
map
.
put
(
"examId"
,
examId
);
map
.
put
(
"examId"
,
examId
);
map
.
put
(
"context"
,
ContextHolder
.
get
());
map
.
put
(
"context"
,
ContextHolder
.
get
());
String
result
=(
String
)
examVisibleRangeExport
.
execute
(
map
,
false
);
String
result
=(
String
)
examVisibleRangeExport
.
execute
(
map
,
false
);
return
Response
.
ok
(
result
);
com
.
yizhi
.
exam
.
application
.
vo
.
exam
.
VisibleRangeExport
visibleRangeExport
=
examAuthorizeClient
.
exportVisibleRange
(
examId
);
String
fileNamePattern
=
visibleRangeExport
.
getBizName
().
replaceAll
(
"/"
,
"."
)
+
"-可见范围导出"
;
fileNamePattern
=
fileNamePattern
+
DateFormatUtils
.
format
(
new
Date
(),
"yyyyMMdd"
)
+
".xls"
;
fileNamePattern
=
pcHostUrl
+
"/api/v1/buckets/upload/objects/download/?preview=true&prefix="
+
fileNamePattern
;
return
Response
.
ok
(
fileNamePattern
);
}
}
...
@@ -107,7 +124,11 @@ public class RangeExportController {
...
@@ -107,7 +124,11 @@ public class RangeExportController {
map
.
put
(
"researchId"
,
researchId
);
map
.
put
(
"researchId"
,
researchId
);
map
.
put
(
"context"
,
ContextHolder
.
get
());
map
.
put
(
"context"
,
ContextHolder
.
get
());
String
result
=(
String
)
researchVisibleRangeExport
.
execute
(
map
,
false
);
String
result
=(
String
)
researchVisibleRangeExport
.
execute
(
map
,
false
);
return
Response
.
ok
(
result
);
VisibleRangeExport
visibleRangeExport
=
researchAuthorizeClient
.
exportVisibleRange
(
researchId
);
String
fileNamePattern
=
visibleRangeExport
.
getBizName
().
replaceAll
(
"/"
,
"."
)
+
"-可见范围导出"
;
fileNamePattern
=
fileNamePattern
+
DateFormatUtils
.
format
(
new
Date
(),
"yyyyMMdd"
)
+
".xls"
;
fileNamePattern
=
pcHostUrl
+
"/api/v1/buckets/upload/objects/download/?preview=true&prefix="
+
fileNamePattern
;
return
Response
.
ok
(
fileNamePattern
);
}
}
...
...
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