Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LaMartin-Webomagic
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Deep Dey
LaMartin-Webomagic
Commits
89e585a9
Commit
89e585a9
authored
Jan 27, 2025
by
Pratik Shrivastava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add set-special-admission-interview API
parent
fd80213d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
3 deletions
+54
-3
lamartinBackend/src/main/java/com/example/LaMartin/admission/controller/AdmissionFormController.java
...aMartin/admission/controller/AdmissionFormController.java
+54
-3
No files found.
lamartinBackend/src/main/java/com/example/LaMartin/admission/controller/AdmissionFormController.java
View file @
89e585a9
...
@@ -158,7 +158,7 @@ public class AdmissionFormController {
...
@@ -158,7 +158,7 @@ public class AdmissionFormController {
}
}
@GetMapping
(
@GetMapping
(
value
=
"/admission-form/set-admission-interview"
,
value
=
"/admission-form/set-
special-
admission-interview"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
)
@ApiResponses
(
value
=
{
@ApiResponses
(
value
=
{
...
@@ -167,7 +167,7 @@ public class AdmissionFormController {
...
@@ -167,7 +167,7 @@ public class AdmissionFormController {
@ApiResponse
(
code
=
500
,
message
=
"Exception Occurred"
)
@ApiResponse
(
code
=
500
,
message
=
"Exception Occurred"
)
})
})
@ApiOperation
(
value
=
""
)
@ApiOperation
(
value
=
""
)
public
Object
set
Fin
alAdmissionInterview
(
public
Object
set
Speci
alAdmissionInterview
(
HttpServletRequest
request
,
HttpServletRequest
request
,
@RequestHeader
(
"apikey"
)
String
apiKey
,
@RequestHeader
(
"apikey"
)
String
apiKey
,
@RequestParam
(
defaultValue
=
""
)
String
formIds
,
@RequestParam
(
defaultValue
=
""
)
String
formIds
,
...
@@ -186,7 +186,7 @@ public class AdmissionFormController {
...
@@ -186,7 +186,7 @@ public class AdmissionFormController {
formIdList
.
forEach
(
formId
->
{
formIdList
.
forEach
(
formId
->
{
try
{
try
{
if
(!
admissionFormDAOController
if
(!
admissionFormDAOController
.
updateAdmissionDateTime
(
formId
,
admissionDate
,
admissionTime
))
{
.
update
Special
AdmissionDateTime
(
formId
,
admissionDate
,
admissionTime
))
{
partiallyFailed
.
set
(
true
);
partiallyFailed
.
set
(
true
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -207,6 +207,57 @@ public class AdmissionFormController {
...
@@ -207,6 +207,57 @@ public class AdmissionFormController {
),
),
HttpStatus
.
OK
);
HttpStatus
.
OK
);
}
}
@GetMapping
(
value
=
"/admission-form/set-admission-interview"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
@ApiResponses
(
value
=
{
@ApiResponse
(
code
=
200
,
message
=
"SUCCESS"
),
@ApiResponse
(
code
=
400
,
message
=
"FAILED"
),
@ApiResponse
(
code
=
500
,
message
=
"Exception Occurred"
)
})
@ApiOperation
(
value
=
""
)
public
Object
setFinalAdmissionInterview
(
HttpServletRequest
request
,
@RequestHeader
(
"apikey"
)
String
apiKey
,
@RequestParam
(
defaultValue
=
""
)
String
formIds
,
@RequestParam
(
"admissionDate"
)
String
admissionDate
,
@RequestParam
(
"admissionTime"
)
String
admissionTime
)
throws
Exception
{
List
<
Long
>
formIdList
=
Stream
.
of
(
formIds
.
split
(
","
))
.
map
(
Long:
:
valueOf
)
.
toList
();
if
(
formIdList
.
isEmpty
())
{
throw
new
Exception
(
"Provide formIds to schedule interview"
);
}
AtomicBoolean
partiallyFailed
=
new
AtomicBoolean
(
false
);
formIdList
.
forEach
(
formId
->
{
try
{
if
(!
admissionFormDAOController
.
updateAdmissionDateTime
(
formId
,
admissionDate
,
admissionTime
))
{
partiallyFailed
.
set
(
true
);
}
}
catch
(
Exception
e
)
{
partiallyFailed
.
set
(
true
);
}
});
if
(
partiallyFailed
.
get
())
{
throw
new
Exception
(
"For Some of the forms failed to schedule admission"
);
}
return
new
ResponseEntity
<>(
new
GeneralResponse
(
true
,
AppConstants
.
RESPONSE_SUCCESS_STATUS_CODE
,
"Admission Date and Time Set Successfully"
,
null
),
HttpStatus
.
OK
);
}
@GetMapping
(
@GetMapping
(
value
=
"/admission-form/get-all"
,
value
=
"/admission-form/get-all"
,
...
...
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