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
3f8caab7
Commit
3f8caab7
authored
Aug 30, 2018
by
bsatyanarayana-nisum-com
Committed by
rbonthala-nisum-com
Aug 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MT-167_1 :SNS :: Able_to_see_attendance_report_shift_wiseChanges (#170)
parent
a54c15af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
AttendanceServiceImpl.java
.../java/com/nisum/mytime/service/AttendanceServiceImpl.java
+15
-15
No files found.
src/main/java/com/nisum/mytime/service/AttendanceServiceImpl.java
View file @
3f8caab7
...
@@ -38,29 +38,29 @@ public class AttendanceServiceImpl implements AttendanceService {
...
@@ -38,29 +38,29 @@ public class AttendanceServiceImpl implements AttendanceService {
}
}
private
List
<
AttendenceData
>
getEmpsAttendenceByShiftWise
(
String
reportDate
,
String
shift
)
throws
MyTimeException
{
private
List
<
AttendenceData
>
getEmpsAttendenceByShiftWise
(
String
reportDate
,
String
shift
)
throws
MyTimeException
{
String
query
=
null
;
List
<
String
>
presentList
=
null
;
List
<
String
>
empIdList
=
null
;
List
<
AttendenceData
>
listOfEmployees
=
new
ArrayList
<
AttendenceData
>();
List
<
AttendenceData
>
listOfEmployees
=
new
ArrayList
<
AttendenceData
>();
Optional
<
List
<
ProjectTeamMate
>>
list
=
findEmpIdsByShiftWise
(
shift
);
Optional
<
List
<
ProjectTeamMate
>>
list
=
findEmpIdsByShiftWise
(
shift
);
if
(
list
.
isPresent
())
{
if
(
list
.
isPresent
())
{
empIdList
=
list
.
get
().
stream
()
List
<
String
>
empIdList
=
list
.
get
().
stream
()
.
map
(
ProjectTeamMate:
:
getEmployeeId
)
.
map
(
ProjectTeamMate:
:
getEmployeeId
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
}
query
=
buildSqlQuery
(
reportDate
,
empIdList
.
toString
().
substring
(
1
,
empIdList
.
toString
().
length
()-
1
),
MyTimeUtils
.
PRESENT
);
if
(
null
!=
empIdList
&&
empIdList
.
size
()
==
MyTimeUtils
.
INT_ZERO
)
{
listOfEmployees
.
addAll
(
getAttendenceData
(
query
));
return
listOfEmployees
;
}
String
query
=
buildSqlQuery
(
reportDate
,
empIdList
.
toString
().
substring
(
1
,
empIdList
.
toString
().
length
()-
1
),
MyTimeUtils
.
PRESENT
);
listOfEmployees
.
addAll
(
getAttendenceData
(
query
));
presentList
=
listOfEmployees
.
stream
().
map
(
AttendenceData
::
getEmployeeId
).
collect
(
Collectors
.
toList
());
List
<
String
>
presentList
=
listOfEmployees
.
stream
().
map
(
AttendenceData
::
getEmployeeId
).
collect
(
Collectors
.
toList
());
empIdList
.
removeAll
(
presentList
);
empIdList
.
removeAll
(
presentList
);
System
.
out
.
println
(
"Absent List :: "
+
empIdList
);
if
(
empIdList
.
size
()>
0
)
{
query
=
buildSqlQuery
(
reportDate
,
empIdList
.
toString
().
substring
(
1
,
empIdList
.
toString
().
length
()-
1
),
MyTimeUtils
.
ABSENT
);
query
=
buildSqlQuery
(
reportDate
,
empIdList
.
toString
().
substring
(
1
,
empIdList
.
toString
().
length
()-
1
),
MyTimeUtils
.
ABSENT
);
listOfEmployees
.
addAll
(
getAttendenceData
(
query
));
listOfEmployees
.
addAll
(
getAttendenceData
(
query
));
}
}
return
listOfEmployees
;
return
listOfEmployees
;
}
}
...
...
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