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
b0299183
Commit
b0299183
authored
Aug 03, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
d664cb39
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
10 deletions
+39
-10
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+39
-10
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
b0299183
...
@@ -1110,6 +1110,8 @@ public class ClockInController {
...
@@ -1110,6 +1110,8 @@ public class ClockInController {
status
=
status_
;
status
=
status_
;
}
}
}
}
//cardtype--1:GPS,2:WIFI,3:考勤机
//cardtype--1:GPS,2:WIFI,3:考勤机
KqglAssoDkjl
pre
=
KqglAssoDkjl
.
builder
().
dktime
(
time_
).
results
(
results
).
userId
(
userid
).
type
(
type
).
status
(
status
).
sort
(
atttype
)
KqglAssoDkjl
pre
=
KqglAssoDkjl
.
builder
().
dktime
(
time_
).
results
(
results
).
userId
(
userid
).
type
(
type
).
status
(
status
).
sort
(
atttype
)
.
cardType
(
3
).
qyid
(
qyid
).
attdate
(
attdate_
+
" "
+
ClockInTool
.
dateToWeek2
(
toweek
)).
attime
(
attime
).
dkmxid
(
dkmx
).
bcid
(
shifid
).
remarks
(
remarks
).
punchmode
(
Integer
.
valueOf
(
asVerifyMode
))
.
cardType
(
3
).
qyid
(
qyid
).
attdate
(
attdate_
+
" "
+
ClockInTool
.
dateToWeek2
(
toweek
)).
attime
(
attime
).
dkmxid
(
dkmx
).
bcid
(
shifid
).
remarks
(
remarks
).
punchmode
(
Integer
.
valueOf
(
asVerifyMode
))
...
@@ -2022,6 +2024,7 @@ public class ClockInController {
...
@@ -2022,6 +2024,7 @@ public class ClockInController {
dkmx
=
pcd
.
getId
();
dkmx
=
pcd
.
getId
();
atttype
=
1
;
atttype
=
1
;
}
else
{
//修改
}
else
{
//修改
boolean
zydk
=
true
;
dkmx
=
zydkmc
.
getId
();
dkmx
=
zydkmc
.
getId
();
KqglAssoDkmx
zypcd
=
KqglAssoDkmx
.
builder
().
build
();
KqglAssoDkmx
zypcd
=
KqglAssoDkmx
.
builder
().
build
();
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
((
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
==
null
)){
//下班1
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
((
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
==
null
)){
//下班1
...
@@ -2031,6 +2034,8 @@ public class ClockInController {
...
@@ -2031,6 +2034,8 @@ public class ClockInController {
if
(
zysd1
.
after
(
zysd2
))
{
//当zysd1大于zysd2时,返回TRUE,当小于等于时,返回false;
if
(
zysd1
.
after
(
zysd2
))
{
//当zysd1大于zysd2时,返回TRUE,当小于等于时,返回false;
msg
=
"自由工时:上班打卡后"
+
canpunchworkdate
+
"小时后,才可打下班卡"
;
msg
=
"自由工时:上班打卡后"
+
canpunchworkdate
+
"小时后,才可打下班卡"
;
sbyf
=
0
;
sbyf
=
0
;
zydk
=
false
;
atttype
=
0
;
}
else
{
}
else
{
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setXbdk1
(
time_
);
//下班1打卡时间
zypcd
.
setXbdk1
(
time_
);
//下班1打卡时间
...
@@ -2040,7 +2045,10 @@ public class ClockInController {
...
@@ -2040,7 +2045,10 @@ public class ClockInController {
}
}
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
}
}
if
(
zydk
)
{
atttype
=
2
;
atttype
=
2
;
}
}
else
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
!=
null
)
}
else
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
!=
null
)
&&
((
""
).
equals
(
zydkmc
.
getSbdk2
())
||
zydkmc
.
getSbdk2
()
==
null
)){
//上班2
&&
((
""
).
equals
(
zydkmc
.
getSbdk2
())
||
zydkmc
.
getSbdk2
()
==
null
)){
//上班2
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setId
(
zydkmc
.
getId
());
...
@@ -2055,6 +2063,8 @@ public class ClockInController {
...
@@ -2055,6 +2063,8 @@ public class ClockInController {
if
(
zysd1
.
after
(
zysd2
))
{
//当zysd1大于zysd2时,返回TRUE,当小于等于时,返回false;
if
(
zysd1
.
after
(
zysd2
))
{
//当zysd1大于zysd2时,返回TRUE,当小于等于时,返回false;
msg
=
"自由工时:上班打卡后"
+
canpunchworkdate
+
"小时后,才可打下班卡"
;
msg
=
"自由工时:上班打卡后"
+
canpunchworkdate
+
"小时后,才可打下班卡"
;
sbyf
=
0
;
sbyf
=
0
;
zydk
=
false
;
atttype
=
0
;
}
else
{
}
else
{
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setXbdk2
(
time_
);
//下班1打卡时间
zypcd
.
setXbdk2
(
time_
);
//下班1打卡时间
...
@@ -2068,7 +2078,9 @@ public class ClockInController {
...
@@ -2068,7 +2078,9 @@ public class ClockInController {
}
}
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
}
}
if
(
zydk
)
{
atttype
=
4
;
atttype
=
4
;
}
}
else
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
!=
null
)
}
else
if
((!(
""
).
equals
(
zydkmc
.
getSbdk1
())
||
zydkmc
.
getSbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk1
())
||
zydkmc
.
getXbdk1
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getSbdk2
())
||
zydkmc
.
getSbdk2
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk2
())
||
zydkmc
.
getXbdk2
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getSbdk2
())
||
zydkmc
.
getSbdk2
()
!=
null
)
&&
(!(
""
).
equals
(
zydkmc
.
getXbdk2
())
||
zydkmc
.
getXbdk2
()
!=
null
)
&&
((
""
).
equals
(
zydkmc
.
getSbdk3
())
||
zydkmc
.
getSbdk3
()
==
null
)){
//上班3
&&
((
""
).
equals
(
zydkmc
.
getSbdk3
())
||
zydkmc
.
getSbdk3
()
==
null
)){
//上班3
...
@@ -2085,6 +2097,8 @@ public class ClockInController {
...
@@ -2085,6 +2097,8 @@ public class ClockInController {
if
(
zysd1
.
after
(
zysd2
))
{
//当zysd1大于zysd2时,返回TRUE,当小于等于时,返回false;
if
(
zysd1
.
after
(
zysd2
))
{
//当zysd1大于zysd2时,返回TRUE,当小于等于时,返回false;
msg
=
"自由工时:上班打卡后"
+
canpunchworkdate
+
"小时后,才可打下班卡"
;
msg
=
"自由工时:上班打卡后"
+
canpunchworkdate
+
"小时后,才可打下班卡"
;
sbyf
=
0
;
sbyf
=
0
;
zydk
=
false
;
atttype
=
0
;
}
else
{
}
else
{
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setId
(
zydkmc
.
getId
());
zypcd
.
setXbdk3
(
time_
);
//下班1打卡时间
zypcd
.
setXbdk3
(
time_
);
//下班1打卡时间
...
@@ -2098,8 +2112,9 @@ public class ClockInController {
...
@@ -2098,8 +2112,9 @@ public class ClockInController {
}
}
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
kqglassodkmxmapper
.
updateByPrimaryKeySelective
(
zypcd
);
//修改打卡记录
}
}
if
(
zydk
)
{
atttype
=
6
;
atttype
=
6
;
}
}
else
{
}
else
{
atttype
=
7
;
atttype
=
7
;
}
}
...
@@ -2137,7 +2152,8 @@ public class ClockInController {
...
@@ -2137,7 +2152,8 @@ public class ClockInController {
}
}
}
}
}
}
int
type
,
status
=
0
;
int
type
=
0
,
status
=
0
;
if
(
atttype
>
0
)
{
if
((
atttype
)%
2
>
0
){
if
((
atttype
)%
2
>
0
){
type
=
1
;
// 类型(类型 0:无排班打卡 1:上班 2:下班) punchcardtime == 0:无班次打卡
type
=
1
;
// 类型(类型 0:无排班打卡 1:上班 2:下班) punchcardtime == 0:无班次打卡
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
...
@@ -2197,6 +2213,7 @@ public class ClockInController {
...
@@ -2197,6 +2213,7 @@ public class ClockInController {
}
}
}
}
}
}
}
//第二次未超过应上班打卡时间 打卡为无效
//第二次未超过应上班打卡时间 打卡为无效
if
(
sbdkkd
)
{
if
(
sbdkkd
)
{
...
@@ -2604,14 +2621,14 @@ public class ClockInController {
...
@@ -2604,14 +2621,14 @@ public class ClockInController {
List
<
AttSchedule
>
attsch
=
new
ArrayList
<
AttSchedule
>();
List
<
AttSchedule
>
attsch
=
new
ArrayList
<
AttSchedule
>();
// List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
KqglAssoDkjl
dkjl
=
KqglAssoDkjl
.
builder
().
build
();
//
KqglAssoDkjl dkjl = KqglAssoDkjl.builder().build();
if
(
dajllist_
.
size
()
>
0
)
{
if
(
dajllist_
.
size
()
>
0
)
{
for
(
int
i
=
1
;
i
<=
dajllist_
.
size
();
i
++){
for
(
int
i
=
1
;
i
<=
dajllist_
.
size
();
i
++){
KqglAssoDkjl
dkjl
=
KqglAssoDkjl
.
builder
().
build
();
for
(
KqglAssoDkjl
ddk
:
dajllist_
)
{
//
for(KqglAssoDkjl ddk : dajllist_) {
BeanUtil
.
copyProperties
(
d
dk
,
dkjl
,
"attdate"
,
"bcid"
,
"remarks"
,
"userId"
,
"attime"
,
"dkmxid"
,
"commentary"
,
"punchequipment"
,
"punchmode"
);
BeanUtil
.
copyProperties
(
d
ajllist_
.
get
(
i
-
1
)
,
dkjl
,
"attdate"
,
"bcid"
,
"remarks"
,
"userId"
,
"attime"
,
"dkmxid"
,
"commentary"
,
"punchequipment"
,
"punchmode"
);
}
//
}
AttSchedule
ast
=
AttSchedule
.
builder
().
build
();
AttSchedule
ast
=
AttSchedule
.
builder
().
build
();
ast
.
setId
(
0
);
ast
.
setId
(
0
);
ast
.
setIsdk
(
1
);
ast
.
setIsdk
(
1
);
...
@@ -2882,7 +2899,7 @@ public class ClockInController {
...
@@ -2882,7 +2899,7 @@ public class ClockInController {
AttendanceCardListDto
attdate
=
MethodCall
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
num
);
//获取当天所打卡班次
AttendanceCardListDto
attdate
=
MethodCall
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
num
);
//获取当天所打卡班次
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
()))
{
//班次不为空
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
())
&&
attdate
.
getAttgrouptype
()
!=
3
)
{
//班次不为空
KqglAssoBcsz
bcsts
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ashss
.
get
(
0
).
getId
()));
KqglAssoBcsz
bcsts
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ashss
.
get
(
0
).
getId
()));
...
@@ -3019,6 +3036,7 @@ public class ClockInController {
...
@@ -3019,6 +3036,7 @@ public class ClockInController {
//当月后续补贴数据
//当月后续补贴数据
if
(
date
==
null
||
(
""
).
equals
(
date
)
||
date
.
equals
(
yue
))
{
if
(
date
==
null
||
(
""
).
equals
(
date
)
||
date
.
equals
(
yue
))
{
int
pbfs
=
0
;
String
next_day
=
ClockInTool
.
requires_extra_times
(
current
,
1
,
2
,
1
);
String
next_day
=
ClockInTool
.
requires_extra_times
(
current
,
1
,
2
,
1
);
Calendar
ca
=
Calendar
.
getInstance
();
Calendar
ca
=
Calendar
.
getInstance
();
ca
.
set
(
Calendar
.
DAY_OF_MONTH
,
ca
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
ca
.
set
(
Calendar
.
DAY_OF_MONTH
,
ca
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
...
@@ -3033,6 +3051,7 @@ public class ClockInController {
...
@@ -3033,6 +3051,7 @@ public class ClockInController {
if
(
attgro
!=
null
){
//该员工是否加入到考勤组 排班方式 1:固定排班;2:自由排班;3:自由工时 计算出应出勤,实际出勤,休息天数
if
(
attgro
!=
null
){
//该员工是否加入到考勤组 排班方式 1:固定排班;2:自由排班;3:自由工时 计算出应出勤,实际出勤,休息天数
if
(
attgro
.
getPbfs
()
==
1
){
//固定排班
if
(
attgro
.
getPbfs
()
==
1
){
//固定排班
pbfs
=
1
;
List
<
KqglAssoTeshu
>
bxdklist
=
kqglassoteshumapper
.
ShouldSpecialDatessetByKqzid
(
attgro
.
getId
(),
ttstr
,
1
);
//当前月 必须打卡日期
List
<
KqglAssoTeshu
>
bxdklist
=
kqglassoteshumapper
.
ShouldSpecialDatessetByKqzid
(
attgro
.
getId
(),
ttstr
,
1
);
//当前月 必须打卡日期
int
bxdk
=
bxdklist
.
size
();
int
bxdk
=
bxdklist
.
size
();
String
[]
bxdkss
=
new
String
[
bxdk
];
////特殊-必须打卡天数(工作日)
String
[]
bxdkss
=
new
String
[
bxdk
];
////特殊-必须打卡天数(工作日)
...
@@ -3096,6 +3115,7 @@ public class ClockInController {
...
@@ -3096,6 +3115,7 @@ public class ClockInController {
}
}
}
}
}
else
if
(
attgro
.
getPbfs
()
==
2
){
//自由排班
}
else
if
(
attgro
.
getPbfs
()
==
2
){
//自由排班
pbfs
=
2
;
DateFormat
df11
=
new
SimpleDateFormat
(
"EEE MMM dd HH:mm:ss zzz yyyy"
,
Locale
.
US
);
DateFormat
df11
=
new
SimpleDateFormat
(
"EEE MMM dd HH:mm:ss zzz yyyy"
,
Locale
.
US
);
List
<
Schedule
>
ycqs
=
schedulemapper
.
getAttendanceShouldList
(
userBean
.
getEmpNum
(),
startMonth
,
endMonth
);
List
<
Schedule
>
ycqs
=
schedulemapper
.
getAttendanceShouldList
(
userBean
.
getEmpNum
(),
startMonth
,
endMonth
);
int
z
=
0
;
int
z
=
0
;
...
@@ -3120,6 +3140,7 @@ public class ClockInController {
...
@@ -3120,6 +3140,7 @@ public class ClockInController {
}
}
}
}
}
else
{
}
else
{
pbfs
=
3
;
List
<
AttendanceWeeklySch
>
atwek
=
attendanceweeklyschmapper
.
selectAttendanceMadeByUserid
(
userBean
.
getEmpNum
(),
userBean
.
getOrgCode
());
List
<
AttendanceWeeklySch
>
atwek
=
attendanceweeklyschmapper
.
selectAttendanceMadeByUserid
(
userBean
.
getEmpNum
(),
userBean
.
getOrgCode
());
String
[]
week
=
new
String
[
atwek
.
size
()];
String
[]
week
=
new
String
[
atwek
.
size
()];
int
e
=
0
;
int
e
=
0
;
...
@@ -3147,12 +3168,20 @@ public class ClockInController {
...
@@ -3147,12 +3168,20 @@ public class ClockInController {
for
(
String
nus
:
nextrange
)
{
for
(
String
nus
:
nextrange
)
{
WorkbenchCalendarDto
wocal
=
WorkbenchCalendarDto
.
builder
().
build
();
WorkbenchCalendarDto
wocal
=
WorkbenchCalendarDto
.
builder
().
build
();
wocal
.
setDate
(
nus
);
wocal
.
setDate
(
nus
);
if
(
pbfs
==
3
)
{
wocal
.
setCalendar_status
(
0
);
//
wocal
.
setCalendar_status_type
(
0
);
}
else
{
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
nus
))
{
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
ycqts
),
nus
))
{
wocal
.
setCalendar_status
(
1
);
//打卡异常
wocal
.
setCalendar_status
(
1
);
//
wocal
.
setCalendar_status_type
(
0
);
}
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
nus
))
{
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
xxts
),
nus
))
{
wocal
.
setCalendar_status
(
4
);
//打卡异常
wocal
.
setCalendar_status
(
4
);
//
wocal
.
setCalendar_status_type
(
0
);
}
}
}
workcal
.
add
(
wocal
);
workcal
.
add
(
wocal
);
}
}
...
...
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