Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
24a14c7d
Commit
24a14c7d
authored
Aug 12, 2020
by
leialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
Lal See merge request 8timerv2/8timerapiv200!419
parents
9335fd06
382b022b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
32 deletions
+38
-32
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+38
-32
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
24a14c7d
...
...
@@ -194,47 +194,54 @@ public class ClockInController {
int
isSbdk3Cr
=
shif
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shif
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
if
(
balan
.
getSort
()
<
dkcs
)
{
if
(
balan
.
getSort
()+
1
==
2
&&
dkcs
==
2
)
{
if
(
isXbdk1Cr
>
0
)
{
//次日
crdk
=
true
;
}
}
if
(
balan
.
getSort
()+
1
==
3
&&
dkcs
==
4
)
{
if
(
isSbdk2Cr
>
0
)
{
//次日
crdk
=
true
;
}
}
if
(
balan
.
getSort
()+
1
==
4
&&
dkcs
==
4
)
{
if
(
isXbdk2Cr
>
0
)
{
//次日
crdk
=
true
;
}
}
if
(
balan
.
getSort
()+
1
==
5
&&
dkcs
==
6
)
{
if
(
isSbdk3Cr
>
0
)
{
//次日
crdk
=
true
;
}
}
if
(
balan
.
getSort
()+
1
==
6
&&
dkcs
==
6
)
{
if
(
isXbdk3Cr
>
0
)
{
//次日
crdk
=
true
;
}
if
((
isXbdk1Cr
+
isSbdk2Cr
+
isXbdk2Cr
+
isSbdk3Cr
+
isXbdk3Cr
)
>
0
)
{
crdk
=
true
;
}
// if(balan.getSort()+1 == 2 && dkcs == 2) {
// //次日
// if(isXbdk1Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 3 && dkcs == 4) {
// if(isSbdk2Cr > 0) {crdk = true; }
// }
// if(balan.getSort()+1 == 4 && dkcs == 4) {
// if(isXbdk2Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 5 && dkcs == 6) {
// if(isSbdk3Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 6 && dkcs == 6) {
// if(isXbdk3Cr > 0) { crdk = true; }
// }
}
}
else
{
//无记录的话就找昨天的数据
// AttendanceCardListDto attdate1 = MethodCall(qyid,userid,yesterday);
AttendanceCardListDto
attdate1
=
MethodCall
(
qyid
,
userid
,
yesterday
);
List
<
AttSchedule
>
ashssyebo
=
attdate1
.
getAttsch
();
//获取昨天应打卡时间
if
(
ashssyebo
.
size
()
>
0
)
{
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ashssyebo
.
get
(
0
).
getTime
())));
//当天应打的首次上班卡时间
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间
if
(
sd2
.
after
(
sd1
))
{
//大于
dnck
=
true
;
}
}
crdk
=
true
;
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
}
if
(
crdk
&&
dnck
)
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
)
.
eq
(
KqglAssoDkmx:
:
getData
,
yesterday
)
);
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
attendance_date
=
startDateyesterday
;
toweek
=
yesterday
;
}
else
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
));
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
)
.
eq
(
KqglAssoDkmx:
:
getData
,
putime
)
);
attendance_date
=
startDate
;
toweek
=
putime
;
}
...
...
@@ -1456,11 +1463,10 @@ public class ClockInController {
// pbfs;// 排班方式 1:固定排班;2:自由排班;3:自由工时
long
time_
=
DateUtil
.
getStringTime
(
clock
.
getPunchtime
(),
"yyyy-MM-dd HH:mm:ss"
);
//打卡时间戳
String
putime
=
sStdIoTime
.
substring
(
0
,
10
);
////转换打卡时间格式 yyyy-MM-dd
String
putime
=
sStdIoTime
.
substring
(
0
,
10
);
////转换打卡时间格式 yyyy-MM-dd
String
putimehhmm
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
);
//转换打卡时间格式 年月日
String
putimehhmm
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
);
//转换打卡时间格式 年月日
Long
startDate
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
putime
,
"yyyy-MM-dd"
)).
getTime
();
//打卡当天开始时间
Long
endDate
=
DateUtil
.
getnowEndTime
(
23
,
DateUtil
.
getStringTime
(
putime
,
"yyyy-MM-dd"
)).
getTime
();
//打卡当天结束时间
...
...
@@ -1545,14 +1551,14 @@ public class ClockInController {
}
if
(
crdk
&&
dnck
)
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
));
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
)
.
eq
(
KqglAssoDkmx:
:
getData
,
yesterday
)
);
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
attendance_date
=
startDateyesterday
;
toweek
=
yesterday
;
putime
=
toweek
;
}
else
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
));
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDate
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDate
)
.
eq
(
KqglAssoDkmx:
:
getData
,
putime
)
);
attendance_date
=
startDate
;
toweek
=
putime
;
}
...
...
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