Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
examsAndAdmissions
Commits
0d16074e
Unverified
Commit
0d16074e
authored
1 year ago
by
Ankit Verma
Committed by
GitHub
1 year ago
Browse files
Options
Download
Plain Diff
Merge pull request #171 from UPHRH-platform/bug_fix_question_paper_upload
fix for question paper upload
parents
8cd1935f
97a53054
github/fork/ruksana2808/filter_bug_examCycle
development
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/java/com/tarento/upsmf/examsAndAdmissions/controller/QuestionPaperController.java
+2
-2
...xamsAndAdmissions/controller/QuestionPaperController.java
src/main/java/com/tarento/upsmf/examsAndAdmissions/service/AttachmentService.java
+1
-1
...o/upsmf/examsAndAdmissions/service/AttachmentService.java
src/main/java/com/tarento/upsmf/examsAndAdmissions/service/impl/AttachmentServiceImpl.java
+2
-2
...xamsAndAdmissions/service/impl/AttachmentServiceImpl.java
with
5 additions
and
5 deletions
+5
-5
src/main/java/com/tarento/upsmf/examsAndAdmissions/controller/QuestionPaperController.java
+
2
−
2
View file @
0d16074e
...
...
@@ -32,9 +32,9 @@ public class QuestionPaperController {
}
@PostMapping
(
"/upload"
)
public
ResponseEntity
<
ResponseDto
>
upload
(
Long
examCycleId
,
@RequestAttribute
(
Constants
.
Parameters
.
USER_ID
)
String
createdBy
,
MultipartFile
file
)
{
public
ResponseEntity
<
ResponseDto
>
upload
(
Long
examCycleId
,
Long
examId
,
@RequestAttribute
(
Constants
.
Parameters
.
USER_ID
)
String
createdBy
,
MultipartFile
file
)
{
try
{
ResponseDto
response
=
attachmentService
.
upload
(
examCycleId
,
createdBy
,
file
);
ResponseDto
response
=
attachmentService
.
upload
(
examCycleId
,
examId
,
createdBy
,
file
);
return
new
ResponseEntity
<>(
response
,
response
.
getResponseCode
());
}
catch
(
Exception
e
)
{
return
HandleResponse
.
handleErrorResponse
(
e
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/tarento/upsmf/examsAndAdmissions/service/AttachmentService.java
+
1
−
1
View file @
0d16074e
...
...
@@ -13,5 +13,5 @@ public interface AttachmentService {
ResponseDto
deleteQuestionPaper
(
Long
id
);
ResponseDto
upload
(
Long
examCycleId
,
String
createdBy
,
MultipartFile
file
);
ResponseDto
upload
(
Long
examCycleId
,
Long
examId
,
String
createdBy
,
MultipartFile
file
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/tarento/upsmf/examsAndAdmissions/service/impl/AttachmentServiceImpl.java
+
2
−
2
View file @
0d16074e
...
...
@@ -179,7 +179,7 @@ public class AttachmentServiceImpl implements AttachmentService {
}
@Override
public
ResponseDto
upload
(
Long
examCycleId
,
String
createdBy
,
MultipartFile
file
)
{
public
ResponseDto
upload
(
Long
examCycleId
,
Long
examId
,
String
createdBy
,
MultipartFile
file
)
{
ResponseDto
response
=
new
ResponseDto
(
Constants
.
API_QUESTION_PAPER_UPLOAD
);
Path
filePath
=
null
;
try
{
...
...
@@ -200,7 +200,7 @@ public class AttachmentServiceImpl implements AttachmentService {
storage
.
create
(
blobInfo
,
new
FileInputStream
(
filePath
.
toFile
()));
//Get Details from other table
Exam
examDetails
=
examRepository
.
findBy
ExamCycle
IdAndObsolete
(
exam
Cycle
Id
,
0
).
orElse
(
null
);
Exam
examDetails
=
examRepository
.
findByIdAndObsolete
(
examId
,
0
).
orElse
(
null
);
LocalDate
examDate
=
null
;
String
examName
=
null
;
LocalTime
examStartTime
=
null
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets