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
Grievance
Commits
52eb936e
Commit
52eb936e
authored
1 year ago
by
shishir suman
Browse files
Options
Download
Patches
Plain Diff
removing CORS filter
parent
0919f721
main
Escalate_ticket_send_mail_to_raiser
UAT
UPHRH_7903_mobile_otp
UPHRH_quartz_scheduler
Velocity_template_changes
admin_config_changes
bug_fixes_01_11
github/fork/vky25/patch-1
rahu_test
shishir_dynamic_schedular
shishir_ticket_statistics_by_user
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/java/org/upsmf/grievance/controller/UserController.java
+1
-1
...n/java/org/upsmf/grievance/controller/UserController.java
src/main/java/org/upsmf/grievance/enums/Department.java
+15
-1
src/main/java/org/upsmf/grievance/enums/Department.java
src/main/java/org/upsmf/grievance/service/impl/IntegrationServiceImpl.java
+3
-3
.../upsmf/grievance/service/impl/IntegrationServiceImpl.java
with
19 additions
and
5 deletions
+19
-5
src/main/java/org/upsmf/grievance/controller/UserController.java
+
1
−
1
View file @
52eb936e
...
...
@@ -88,7 +88,7 @@ public class UserController {
}
}
@P
u
tMapping
(
"/update-user"
)
@P
os
tMapping
(
"/update-user"
)
public
ResponseEntity
<
String
>
updateUser
(
@RequestBody
UpdateUserDto
userDto
)
{
try
{
integrationService
.
updateUser
(
userDto
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/upsmf/grievance/enums/Department.java
+
15
−
1
View file @
52eb936e
...
...
@@ -6,14 +6,28 @@ import java.util.stream.Collectors;
public
enum
Department
{
REGISTRATION
(
1
),
EXAM
(
2
),
HALL_TICKET
(
3
),
OTHERS
(-
1
);
REGISTRATION
(
1
,
"Registration"
),
AFFILIATION
(
2
,
"Affiliation"
),
ASSESSMENT
(
3
,
"Assessment"
),
HALL_TICKET
(
4
,
"Hall Ticket"
),
OTHERS
(-
1
,
"Others"
);
private
int
id
;
private
String
code
;
Department
(
int
id
)
{
this
.
id
=
id
;
}
Department
(
int
id
,
String
code
)
{
this
.
id
=
id
;
this
.
code
=
code
;
}
public
static
List
<
Department
>
getById
(
int
id
)
{
return
Arrays
.
stream
(
Department
.
values
()).
filter
(
x
->
x
.
id
==
id
).
collect
(
Collectors
.
toList
());
}
public
int
getId
()
{
return
id
;
}
public
String
getCode
()
{
return
code
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/org/upsmf/grievance/service/impl/IntegrationServiceImpl.java
+
3
−
3
View file @
52eb936e
...
...
@@ -140,7 +140,7 @@ public class IntegrationServiceImpl implements IntegrationService {
if
(
departmentId
!=
null
)
{
departmentList
=
Department
.
getById
(
Integer
.
valueOf
(
departmentId
));
if
(
departmentList
!=
null
&&
!
departmentList
.
isEmpty
())
{
user
.
getAttributes
().
put
(
"departmentName"
,
departmentList
.
get
(
0
).
nam
e
());
user
.
getAttributes
().
put
(
"departmentName"
,
departmentList
.
get
(
0
).
getCod
e
());
}
}
HttpHeaders
headers
=
new
HttpHeaders
();
...
...
@@ -176,7 +176,7 @@ public class IntegrationServiceImpl implements IntegrationService {
createUserRoleMapping
(
user
,
savedUser
);
// create user department mapping
if
(
savedUser
!=
null
&&
savedUser
.
getId
()
>
0
&&
departmentList
!=
null
&&
!
departmentList
.
isEmpty
())
{
org
.
upsmf
.
grievance
.
model
.
Department
departmentMap
=
org
.
upsmf
.
grievance
.
model
.
Department
.
builder
().
departmentName
(
departmentList
.
get
(
0
).
nam
e
()).
userId
(
savedUser
.
getId
()).
build
();
org
.
upsmf
.
grievance
.
model
.
Department
departmentMap
=
org
.
upsmf
.
grievance
.
model
.
Department
.
builder
().
departmentName
(
departmentList
.
get
(
0
).
getCod
e
()).
userId
(
savedUser
.
getId
()).
build
();
org
.
upsmf
.
grievance
.
model
.
Department
userDepartment
=
departmentRepository
.
save
(
departmentMap
);
List
<
org
.
upsmf
.
grievance
.
model
.
Department
>
departments
=
new
ArrayList
<>();
departments
.
add
(
userDepartment
);
...
...
@@ -225,7 +225,7 @@ public class IntegrationServiceImpl implements IntegrationService {
if
(
departmentId
!=
null
)
{
departmentList
=
Department
.
getById
(
Integer
.
valueOf
(
departmentId
));
if
(
departmentList
!=
null
&&
!
departmentList
.
isEmpty
())
{
user
.
getAttributes
().
put
(
"departmentName"
,
departmentList
.
get
(
0
).
nam
e
());
user
.
getAttributes
().
put
(
"departmentName"
,
departmentList
.
get
(
0
).
getCod
e
());
}
}
...
...
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