Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Narendar Vakiti
mytime
Commits
9f719d68
Commit
9f719d68
authored
Jul 27, 2018
by
bsatyanarayana-nisum-com
Committed by
tdutta-nisum-com
Jul 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MT-97_7 : SNS :: Update_RoleTable_While_Account_CRUD_operations (#83)
parent
c9f183d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
15 deletions
+22
-15
AccountServiceImpl.java
...ain/java/com/nisum/mytime/service/AccountServiceImpl.java
+22
-15
No files found.
src/main/java/com/nisum/mytime/service/AccountServiceImpl.java
View file @
9f719d68
...
...
@@ -82,12 +82,30 @@ public class AccountServiceImpl implements AccountService {
}
else
if
(
action
!=
null
&&
action
.
equals
(
"U"
)){
//U means updating existing Account
boolean
flag
=
false
;
boolean
nameFlag
=
false
;
boolean
accountExistFlag
=
false
;
List
<
Account
>
accounts
=
accountRepo
.
findAll
();
Account
accountBeforeUpdate
=
accountRepo
.
findByAccountId
(
account
.
getAccountId
());
if
(
accountBeforeUpdate
.
getAccountName
().
equalsIgnoreCase
(
account
.
getAccountName
()))
{
nameFlag
=
accountBeforeUpdate
.
getAccountName
().
equalsIgnoreCase
(
account
.
getAccountName
());
if
(
accounts
!=
null
&&
!
accounts
.
isEmpty
()
&&
accounts
.
size
()>
0
){
for
(
Account
accObj
:
accounts
){
accountExistFlag
=
accObj
.
getAccountName
().
trim
().
equalsIgnoreCase
(
account
.
getAccountName
().
trim
());
if
(
accountExistFlag
){
break
;
}
}
}
if
(
nameFlag
&&
accountExistFlag
)
{
response
=
"Account already exist"
;
return
response
;
}
//if(accountBeforeUpdate.getAccountName().equalsIgnoreCase(account.getAccountName())) {
List
<
String
>
employeeIds
=
null
;
List
<
Account
>
accountList
=
null
;
List
<
String
>
dmsAddedByUser
=
null
;
...
...
@@ -136,22 +154,11 @@ public class AccountServiceImpl implements AccountService {
return
response
;
}
if
(
accounts
!=
null
&&
!
accounts
.
isEmpty
()
&&
accounts
.
size
()>
0
){
for
(
Account
accObj
:
accounts
){
flag
=
accObj
.
getAccountName
().
trim
().
equalsIgnoreCase
(
account
.
getAccountName
().
trim
());
if
(
flag
){
break
;
}
}
}
if
(
flag
)
{
response
=
"Account already exist"
;
return
response
;
}
}
//
}
return
response
;
}
...
...
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