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
6a849250
Commit
6a849250
authored
1 year ago
by
jay pratap singh
Browse files
Options
Download
Patches
Plain Diff
changes for verified and rejected case
parent
c0930f07
main
1 merge request
!8
adding code for pending verifications of enrolments
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
upsmf-entity/src/main/java/com/tarento/upsmf/examsAndAdmissions/controller/StudentController.java
+3
-7
...psmf/examsAndAdmissions/controller/StudentController.java
upsmf-entity/src/main/java/com/tarento/upsmf/examsAndAdmissions/model/Student.java
+1
-0
...a/com/tarento/upsmf/examsAndAdmissions/model/Student.java
upsmf-entity/src/main/java/com/tarento/upsmf/examsAndAdmissions/model/dto/StudentDto.java
+1
-0
...arento/upsmf/examsAndAdmissions/model/dto/StudentDto.java
upsmf-entity/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/StudentService.java
+14
-0
...ento/upsmf/examsAndAdmissions/service/StudentService.java
with
19 additions
and
7 deletions
+19
-7
upsmf-entity/src/main/java/com/tarento/upsmf/examsAndAdmissions/controller/StudentController.java
+
3
−
7
View file @
6a849250
...
...
@@ -91,13 +91,9 @@ public class StudentController {
}
@PutMapping
(
"/{studentId}/verify"
)
public
ResponseEntity
<
Student
>
verifyStudent
(
@PathVariable
Long
studentId
,
@RequestParam
(
"status"
)
VerificationStatus
status
,
@RequestParam
(
"remarks"
)
String
remarks
,
@RequestParam
(
"verificationDate"
)
LocalDate
verificationDate
)
{
Student
student
=
studentService
.
findById
(
studentId
);
student
.
setVerificationStatus
(
status
);
student
.
setAdminRemarks
(
remarks
);
student
.
setVerificationDate
(
verificationDate
);
studentService
.
save
(
student
);
return
ResponseEntity
.
ok
(
student
);
public
ResponseEntity
<
Student
>
verifyStudent
(
@PathVariable
Long
studentId
,
@RequestParam
(
"status"
)
VerificationStatus
status
,
@RequestParam
(
"remarks"
)
String
remarks
,
@RequestParam
(
"verificationDate"
)
LocalDate
verificationDate
)
{
Student
updatedStudent
=
studentService
.
verifyStudent
(
studentId
,
status
,
remarks
,
verificationDate
);
return
ResponseEntity
.
ok
(
updatedStudent
);
}
@GetMapping
(
"/pendingVerification"
)
public
ResponseEntity
<
List
<
Student
>>
getStudentsPendingVerification
()
{
...
...
This diff is collapsed.
Click to expand it.
upsmf-entity/src/main/java/com/tarento/upsmf/examsAndAdmissions/model/Student.java
+
1
−
0
View file @
6a849250
...
...
@@ -57,6 +57,7 @@ public class Student {
private
String
adminRemarks
;
private
LocalDate
enrollmentDate
;
private
LocalDate
verificationDate
;
private
boolean
requiresRevision
;
@ManyToOne
@JoinColumn
(
name
=
"course_id"
)
...
...
This diff is collapsed.
Click to expand it.
upsmf-entity/src/main/java/com/tarento/upsmf/examsAndAdmissions/model/dto/StudentDto.java
+
1
−
0
View file @
6a849250
...
...
@@ -43,6 +43,7 @@ public class StudentDto {
private
String
adminRemarks
;
private
LocalDate
enrollmentDate
;
private
LocalDate
verificationDate
;
private
boolean
requiresRevision
;
private
MultipartFile
highSchoolMarksheet
;
private
MultipartFile
highSchoolCertificate
;
...
...
This diff is collapsed.
Click to expand it.
upsmf-entity/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/StudentService.java
+
14
−
0
View file @
6a849250
...
...
@@ -189,6 +189,20 @@ public class StudentService {
student
.
setVerificationStatus
(
status
);
return
studentRepository
.
save
(
student
);
}
public
Student
verifyStudent
(
Long
studentId
,
VerificationStatus
status
,
String
remarks
,
LocalDate
verificationDate
)
{
Student
student
=
this
.
findById
(
studentId
);
student
.
setVerificationStatus
(
status
);
student
.
setAdminRemarks
(
remarks
);
student
.
setVerificationDate
(
verificationDate
);
if
(
status
==
VerificationStatus
.
VERIFIED
)
{
String
enrollmentNumber
=
"EN"
+
LocalDate
.
now
().
getYear
()
+
student
.
getCenterCode
()
+
student
.
getId
();
student
.
setProvisionalEnrollmentNumber
(
enrollmentNumber
);
}
else
if
(
status
==
VerificationStatus
.
REJECTED
)
{
student
.
setRequiresRevision
(
true
);
}
return
this
.
save
(
student
);
}
public
List
<
Student
>
findByVerificationStatus
(
VerificationStatus
status
)
{
return
studentRepository
.
findByVerificationStatus
(
status
);
}
...
...
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