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
fdf68485
Commit
fdf68485
authored
Jul 25, 2018
by
bsatyanarayana-nisum-com
Committed by
tdutta-nisum-com
Jul 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MT-97_1 : SNS :: Update_RoleTable_While_Account_CRUD_operations (#60)
parent
a8426665
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
AccountServiceImpl.java
...ain/java/com/nisum/mytime/service/AccountServiceImpl.java
+4
-4
MyTimeUtils.java
src/main/java/com/nisum/mytime/utils/MyTimeUtils.java
+3
-0
No files found.
src/main/java/com/nisum/mytime/service/AccountServiceImpl.java
View file @
fdf68485
...
...
@@ -45,7 +45,7 @@ public class AccountServiceImpl implements AccountService {
String
roleId
=
roleInfoService
.
getRole
(
MyTimeUtils
.
ACCOUNT
);
if
(
action
!=
null
&&
action
.
equals
(
"N"
))
{
//N means adding New Account
if
(
action
!=
null
&&
action
.
equals
(
MyTimeUtils
.
STRING_N
))
{
//N means adding New Account
List
<
Account
>
accounts
=
validateAccounts
(
account
.
getAccountName
());
if
(
!
accounts
.
isEmpty
()
&&
accounts
.
size
()
>
0
){
...
...
@@ -53,7 +53,7 @@ public class AccountServiceImpl implements AccountService {
}
else
{
List
<
String
>
accDms
=
account
.
getDeliveryManagers
();
account
.
setAccountId
(
generateAccountId
());
account
.
setStatus
(
MyTimeUtils
.
ACTIVE
);
account
.
setStatus
(
MyTimeUtils
.
STRING_Y
);
accountResult
=
accountRepo
.
save
(
account
);
if
(
accDms
!=
null
&&
!
accDms
.
isEmpty
()
&&
accDms
.
size
()
>
0
)
{
...
...
@@ -105,7 +105,7 @@ public class AccountServiceImpl implements AccountService {
}
}
account
.
setStatus
(
MyTimeUtils
.
ACTIVE
);
account
.
setStatus
(
MyTimeUtils
.
STRING_Y
);
accountResult
=
accountRepo
.
save
(
account
);
response
=
"Updated succesfully"
;
}
...
...
@@ -170,7 +170,7 @@ public class AccountServiceImpl implements AccountService {
public
Account
deleteAccount
(
String
accountId
)
throws
MyTimeException
{
Query
query
=
new
Query
(
Criteria
.
where
(
MyTimeUtils
.
ACCOUNT_ID
).
is
(
accountId
));
Update
update
=
new
Update
();
update
.
set
(
MyTimeUtils
.
STATUS
,
MyTimeUtils
.
IN_ACTIVE
);
update
.
set
(
MyTimeUtils
.
STATUS
,
MyTimeUtils
.
STRING_N
);
FindAndModifyOptions
options
=
new
FindAndModifyOptions
();
options
.
upsert
(
true
);
return
mongoTemplate
.
findAndModify
(
query
,
update
,
options
,
Account
.
class
);
...
...
src/main/java/com/nisum/mytime/utils/MyTimeUtils.java
View file @
fdf68485
...
...
@@ -70,6 +70,9 @@ public class MyTimeUtils {
public
final
static
String
DOMAIN_ID
=
"domainId"
;
//public final static String NAME="deliveryManagers";
public
final
static
String
STRING_Y
=
"Y"
;
public
final
static
String
STRING_N
=
"N"
;
//Biometric Attendance
public
final
static
String
ABESENT_STATUS_QUERY
=
"select emp.EmployeeCode,emp.FirstName,"
...
...
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