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
7802a1b6
Commit
7802a1b6
authored
Jul 23, 2018
by
mmudrakola-nisum-com
Committed by
rbonthala-nisum-com
Jul 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MT-74:integrating_biometric_data_to_the_application (#30)
parent
39abe4d2
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
139 additions
and
657 deletions
+139
-657
build.gradle
build.gradle
+1
-1
DbConnection.java
...ain/java/com/nisum/mytime/configuration/DbConnection.java
+9
-3
AttendanceController.java
...ava/com/nisum/mytime/controller/AttendanceController.java
+2
-2
MyTimeCronSchedularJob.java
...va/com/nisum/mytime/schedular/MyTimeCronSchedularJob.java
+3
-3
AttendanceService.java
...main/java/com/nisum/mytime/service/AttendanceService.java
+0
-4
AttendanceServiceImpl.java
.../java/com/nisum/mytime/service/AttendanceServiceImpl.java
+34
-204
EmployeeDataService.java
...in/java/com/nisum/mytime/service/EmployeeDataService.java
+37
-430
UserServiceImpl.java
src/main/java/com/nisum/mytime/service/UserServiceImpl.java
+3
-2
AttendanceReportController.js
.../webapp/WEB-INF/controllers/AttendanceReportController.js
+34
-3
attendanceReport.html
src/main/webapp/WEB-INF/templates/attendanceReport.html
+16
-5
No files found.
build.gradle
View file @
7802a1b6
...
...
@@ -56,5 +56,5 @@ dependencies {
compile
(
'jcifs:jcifs:1.3.17'
)
compile
(
'javax.servlet:servlet-api'
)
compile
(
'com.github.ozlerhakan:poiji:1.11'
)
testCompile
group:
'com.microsoft.sqlserver'
,
name:
'mssql-jdbc'
,
version:
'6.1.0.jre8'
}
src/main/java/com/nisum/mytime/configuration/DbConnection.java
View file @
7802a1b6
...
...
@@ -15,10 +15,16 @@ public class DbConnection {
public
static
Connection
getDBConnection
(
String
dbURL
)
throws
SQLException
{
try
{
Class
.
forName
(
"
net.ucanaccess.jdbc.UcanaccessDriver"
);
connection
=
DriverManager
.
getConnection
(
dbURL
);
Class
.
forName
(
"
com.microsoft.sqlserver.jdbc.SQLServerDriver"
).
newInstance
(
);
connection
=
DriverManager
.
getConnection
(
"jdbc:sqlserver://10.3.45.105:1433;databaseName=smartiSCC"
,
"sa"
,
"nisum@123"
);
}
catch
(
ClassNotFoundException
cnfex
)
{
log
.
error
(
"Problem in loading or "
+
"registering MS Access JDBC driver"
,
cnfex
);
log
.
error
(
"Problem in loading or "
+
"registering mssql JDBC driver"
,
cnfex
);
}
catch
(
InstantiationException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
connection
;
}
...
...
src/main/java/com/nisum/mytime/controller/AttendanceController.java
View file @
7802a1b6
...
...
@@ -57,11 +57,11 @@ public class AttendanceController {
return
new
ResponseEntity
<>(
result
,
HttpStatus
.
OK
);
}
@RequestMapping
(
value
=
"copyRemoteMdbFileToLocal"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
/*
@RequestMapping(value = "copyRemoteMdbFileToLocal", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Boolean> copyRemoteMdbFileToLocal() throws MyTimeException {
Boolean result = attendanceService.copyRemoteMdbFileToLocal();
return new ResponseEntity<>(result, HttpStatus.OK);
}
}
*/
@RequestMapping
(
value
=
"resyncMonthData/{fromDate}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
<
Boolean
>
resyncMonthData
(
@PathVariable
(
"fromDate"
)
String
fromDate
)
throws
MyTimeException
{
...
...
src/main/java/com/nisum/mytime/schedular/MyTimeCronSchedularJob.java
View file @
7802a1b6
...
...
@@ -15,16 +15,16 @@ import com.nisum.mytime.utils.MyTimeLogger;
public
class
MyTimeCronSchedularJob
implements
Job
{
@Autowired
private
EmployeeDataService
employeeDataService
;
private
EmployeeDataService
employeeDataService
;
@Override
public
void
execute
(
JobExecutionContext
jobExecutionContext
)
{
try
{
/*
try {
if (employeeDataService.fetchEmployeesDataOnDayBasis()) {
MyTimeLogger.getInstance().info("Shedular Executed Successfully Records Saved in DB");
}
} catch (MyTimeException | SQLException e) {
MyTimeLogger.getInstance().error("Shedular failed to Executed ::: " , e);
}
}
*/
}
}
src/main/java/com/nisum/mytime/service/AttendanceService.java
View file @
7802a1b6
...
...
@@ -10,8 +10,4 @@ public interface AttendanceService {
List
<
AttendenceData
>
getAttendanciesReport
(
String
reportDate
)
throws
MyTimeException
,
SQLException
;
Boolean
copyRemoteMdbFileToLocal
()
throws
MyTimeException
;
void
triggerMailToAbsentees
()
throws
MyTimeException
;
}
src/main/java/com/nisum/mytime/service/AttendanceServiceImpl.java
View file @
7802a1b6
This diff is collapsed.
Click to expand it.
src/main/java/com/nisum/mytime/service/EmployeeDataService.java
View file @
7802a1b6
This diff is collapsed.
Click to expand it.
src/main/java/com/nisum/mytime/service/UserServiceImpl.java
View file @
7802a1b6
...
...
@@ -85,8 +85,9 @@ public class UserServiceImpl implements UserService {
@Override
public
Boolean
fetchEmployeesData
(
String
perticularDate
,
boolean
resynchFlag
)
throws
MyTimeException
{
return
employeeDataBaseService
.
fetchEmployeesData
(
perticularDate
,
resynchFlag
);
/* return employeeDataBaseService.fetchEmployeesData(perticularDate,
resynchFlag);*/
return
true
;
}
@Override
...
...
src/main/webapp/WEB-INF/controllers/AttendanceReportController.js
View file @
7802a1b6
...
...
@@ -62,6 +62,7 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
$scope
.
gridOptions
.
data
=
[];
$scope
.
getEmployeePresent
=
function
(
type
){
$scope
.
attendenceType
=
"both"
;
$mdDialog
.
hide
();
if
(
type
==
"onload"
){
showProgressDialog
(
"Fetching data please wait..."
);
...
...
@@ -79,11 +80,25 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
$mdDialog
.
hide
();
if
(
response
.
data
.
length
==
0
){
$timeout
(
function
(){
showAlert
(
'No data available'
);},
600
);
$scope
.
refreshPage
();
$scope
.
refreshPage
();
$scope
.
attendenceType
=
"both"
;
}
else
{
$scope
.
attendenceType
=
"both"
;
$scope
.
totalAttendanceArray
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
totalPresent
=
response
.
data
[
0
].
totalPresent
;
$scope
.
totalAbsent
=
response
.
data
[
0
].
totalAbsent
;
$scope
.
presentArray
=
[];
$scope
.
absentArray
=
[];
angular
.
forEach
(
response
.
data
,
function
(
attendance
)
{
if
(
attendance
.
ifPresent
==
'P'
){
$scope
.
presentArray
.
push
(
attendance
);
}
else
if
(
attendance
.
ifPresent
==
'A'
){
$scope
.
absentArray
.
push
(
attendance
);
}
});
$scope
.
totalPresent
=
$scope
.
presentArray
.
length
;
$scope
.
totalAbsent
=
$scope
.
absentArray
.
length
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
...
...
@@ -134,4 +149,20 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
function
ProgressController
(
$scope
,
dataToPass
)
{
$scope
.
progressText
=
dataToPass
;
}
$scope
.
getAttendanceReport
=
function
(
value
){
if
(
value
==
'both'
){
$scope
.
attendenceType
=
value
;
$scope
.
gridOptions
.
data
=
$scope
.
totalAttendanceArray
;
}
else
if
(
value
==
'present'
){
$scope
.
present
=
value
;
$scope
.
gridOptions
.
data
=
$scope
.
presentArray
;
}
else
if
(
value
==
'absent'
){
$scope
.
absent
=
value
;
$scope
.
gridOptions
.
data
=
$scope
.
absentArray
;
}
}
});
src/main/webapp/WEB-INF/templates/attendanceReport.html
View file @
7802a1b6
...
...
@@ -34,18 +34,29 @@
</div>
<div
class=
"row col-lg-12"
style=
"height: 15px;"
></div>
<div
class=
"row col-lg-12"
>
<div
class=
"col-lg-3"
></div>
<div
class=
"col-lg-2 col-xs-12"
>
<div
class=
"col-lg-8"
>
<div
class=
"col-lg-2 col-xs-12"
>
</div>
<div
class=
" col-lg-offset-2 col-lg-3 col-xs-12"
>
<p>
<b>
Total Present:
</b>
{{totalPresent}}
</p>
</div>
<div
class=
"col-lg-
2
col-xs-12"
>
<div
class=
"col-lg-
3
col-xs-12"
>
<p>
<b>
Total Absent:
</b>
{{totalAbsent}}
</p>
</p>
</div>
</div>
<div
class=
" cocol-lg-4 "
>
<p><input
type=
"radio"
name=
"attend"
ng-model=
"attendenceType"
value=
"both"
ng-click=
"getAttendanceReport(attendenceType)"
>
All
<input
type=
"radio"
name=
"attend"
ng-model=
"attendenceType"
value=
"present"
ng-click=
"getAttendanceReport(attendenceType)"
>
Present
<input
type=
"radio"
name=
"attend"
ng-model=
"attendenceType"
value=
"absent"
ng-click=
"getAttendanceReport(attendenceType)"
>
Absence
</p>
</div>
<div
class=
"col-lg-5"
></div>
</div>
<div
class=
"row col-lg-12"
style=
"height: 15px;"
></div>
</div>
...
...
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