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
9164b726
Commit
9164b726
authored
Aug 24, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
3fa8ab94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
70 deletions
+68
-70
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+68
-70
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
9164b726
...
...
@@ -1497,94 +1497,92 @@ public class ClockInController {
boolean
sbdkkd
=
false
;
//针对于上班 未超过上班卡打卡 视为无效打卡
long
punchcardtime
=
0
,
punchstart
=
0
,
punchend
=
0
;
//应打卡时间,应打卡开始时间,应打卡结束时间
boolean
chenexday
=
false
;
ClockCollectData
clockt
=
new
ClockCollectData
();
// putime: 根据日期 得到打卡所需的详细信息
AttendanceCardListDto
attdate
=
MethodCall
(
qyid
,
userid
,
putime
);
if
(
attgro
!=
null
)
{
//判断考勤组是否存在
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
//查询打卡当天是否有记录**********************************
List
<
AttSchedule
>
checknextday
=
attdate
.
getAttsch
();
if
(
checknextday
.
size
()
>
0
)
{
for
(
int
c
=
0
;
c
<
checknextday
.
size
();
c
++)
{
if
(
checknextday
.
get
(
c
).
getNextday
()
==
2
)
{
chenexday
=
true
;
}
}
}
KqglAssoDkmx
dkmc
=
KqglAssoDkmx
.
builder
().
build
();
String
dakariqi
=
new
SimpleDateFormat
(
"yy-MM-dd"
).
format
(
Double
.
valueOf
(
startDateyesterday
))+
" "
+
ClockInTool
.
dateToWeek2
(
yesterday
);
//检查昨日的班次是否存在次日打卡
KqglAssoDkjl
balan
=
kqglassodkjlmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getUserId
,
userid
).
eq
(
KqglAssoDkjl:
:
getAttdate
,
dakariqi
).
ne
(
KqglAssoDkjl:
:
getBcid
,
0
).
orderByDesc
(
KqglAssoDkjl
::
getSort
).
last
(
"LIMIT 1"
));
boolean
dnck
=
false
;
boolean
crdk
=
false
;
//当次打卡是否存在次日打卡
if
(
balan
!=
null
)
{
//前一天是否打过卡 去班次id查询是否存在次日打卡
//昨日的班次信息
KqglAssoBcsz
shif
=
kqglassobcszmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
balan
.
getBcid
()));
int
dkcs
=
shif
.
getSxbcs
()*
2
;
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
if
(
ashss
.
size
()
>
0
)
{
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ashss
.
get
(
0
).
getTime
())));
//当天应打的首次上班卡时间
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间
if
(
sd1
.
after
(
sd2
))
{
//大于
dnck
=
true
;
if
(
chenexday
)
{
//查询打卡当天是否有记录**********************************
// KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
String
dakariqi
=
new
SimpleDateFormat
(
"yy-MM-dd"
).
format
(
Double
.
valueOf
(
startDateyesterday
))+
" "
+
ClockInTool
.
dateToWeek2
(
yesterday
);
//检查昨日的班次是否存在次日打卡
KqglAssoDkjl
balan
=
kqglassodkjlmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getUserId
,
userid
).
eq
(
KqglAssoDkjl:
:
getAttdate
,
dakariqi
).
ne
(
KqglAssoDkjl:
:
getBcid
,
0
).
orderByDesc
(
KqglAssoDkjl
::
getSort
).
last
(
"LIMIT 1"
));
// boolean dnck = false;
// boolean crdk = false;//当次打卡是否存在次日打卡
if
(
balan
!=
null
)
{
//前一天是否打过卡 去班次id查询是否存在次日打卡
//昨日的班次信息
KqglAssoBcsz
shif
=
kqglassobcszmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
balan
.
getBcid
()));
int
dkcs
=
shif
.
getSxbcs
()*
2
;
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
if
(
ashss
.
size
()
>
0
)
{
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ashss
.
get
(
0
).
getTime
())));
//当天应打的首次上班卡时间
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间
if
(
sd1
.
after
(
sd2
))
{
//大于
dnck
=
true
;
}
}
}
int
isXbdk1Cr
=
shif
.
getIsXbdk1Cr
();
//下班1是否次日(0:否;1:是)
int
isSbdk2Cr
=
shif
.
getIsSbdk2Cr
();
//上班2是否次日(0:否;1:是)
int
isXbdk2Cr
=
shif
.
getIsXbdk2Cr
();
//下班2是否次日(0:否;1:是)
int
isSbdk3Cr
=
shif
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shif
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
if
(
balan
.
getSort
()
<=
dkcs
)
{
if
((
isXbdk1Cr
+
isSbdk2Cr
+
isXbdk2Cr
+
isSbdk3Cr
+
isXbdk3Cr
)
>
0
)
{
crdk
=
true
;
int
isXbdk1Cr
=
shif
.
getIsXbdk1Cr
();
//下班1是否次日(0:否;1:是)
int
isSbdk2Cr
=
shif
.
getIsSbdk2Cr
();
//上班2是否次日(0:否;1:是)
int
isXbdk2Cr
=
shif
.
getIsXbdk2Cr
();
//下班2是否次日(0:否;1:是)
int
isSbdk3Cr
=
shif
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shif
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
if
(
balan
.
getSort
()
<=
dkcs
)
{
if
((
isXbdk1Cr
+
isSbdk2Cr
+
isXbdk2Cr
+
isSbdk3Cr
+
isXbdk3Cr
)
>
0
)
{
crdk
=
true
;
}
}
}
else
{
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
// 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
{
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
//无记录的话就找昨天的数据
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
;
//无记录的话就找昨天的数据
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
;
}
}
}
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
())
&&
ashss
.
get
(
0
).
getId
()
!=
0
)
{
//班次不为空
KqglAssoBcsz
shifi
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ashss
.
get
(
0
).
getId
()));
int
isXbdk1Cr
=
shifi
.
getIsXbdk1Cr
();
//下班1是否次日(0:否;1:是)
int
isSbdk2Cr
=
shifi
.
getIsSbdk2Cr
();
//上班2是否次日(0:否;1:是)
int
isXbdk2Cr
=
shifi
.
getIsXbdk2Cr
();
//下班2是否次日(0:否;1:是)
int
isSbdk3Cr
=
shifi
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shifi
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
if
((
isXbdk1Cr
+
isSbdk2Cr
+
isXbdk2Cr
+
isSbdk3Cr
+
isXbdk3Cr
)
>
0
)
{
crdk
=
true
;
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
())
&&
ashss
.
get
(
0
).
getId
()
!=
0
)
{
//班次不为空
KqglAssoBcsz
shifi
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ashss
.
get
(
0
).
getId
()));
int
isXbdk1Cr
=
shifi
.
getIsXbdk1Cr
();
//下班1是否次日(0:否;1:是)
int
isSbdk2Cr
=
shifi
.
getIsSbdk2Cr
();
//上班2是否次日(0:否;1:是)
int
isXbdk2Cr
=
shifi
.
getIsXbdk2Cr
();
//下班2是否次日(0:否;1:是)
int
isSbdk3Cr
=
shifi
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shifi
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
}
else
{
crdk
=
false
;
if
((
isXbdk1Cr
+
isSbdk2Cr
+
isXbdk2Cr
+
isSbdk3Cr
+
isXbdk3Cr
)
>
0
)
{
crdk
=
true
;
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
}
else
{
crdk
=
false
;
}
}
}
}
if
(
crdk
&&
dnck
)
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
).
eq
(
KqglAssoDkmx:
:
getData
,
yesterday
));
...
...
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