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
5873f140
Commit
5873f140
authored
Jul 10, 2020
by
leialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
Lal See merge request 8timerv2/8timerapiv200!320
parents
1311f2fb
5c79f12a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
12 deletions
+48
-12
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+48
-12
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
5873f140
...
...
@@ -2148,17 +2148,22 @@ public class ClockInController {
//打卡记录
// List<KqglAssoDkjl> dajllist = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// attdate.setAttpr(dajllist);
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
List
<
AttSchedule
>
attsch
=
attdate
.
getAttsch
();
int
r
=
1
;
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
()))
{
//班次不为空
int
bccs
=
attdate
.
getAttsch
().
size
();
int
r
=
1
,
bc
=
0
;
int
bsz
=
0
;
for
(
AttSchedule
ash
:
attsch
)
{
if
(
attdate
.
getAttsch
().
size
()
==
2
)
{
//有范围
if
(
ash
.
getStarttime
()
!=
0
&&
ash
.
getEndtime
()
!=
0
)
{
boolean
ectivedate
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
nowdate
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
ash
.
getStarttime
()),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
ash
.
getEndtime
()),
"yyyy-MM-dd HH:mm"
);
if
(
ectivedate
)
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
bc
++;
ash
.
setIsdk
(
1
);
}
}
else
{
...
...
@@ -2171,8 +2176,11 @@ public class ClockInController {
Timestamp
c
=
Timestamp
.
valueOf
(
sbdk1
);
if
(
r
==
1
)
{
if
(
b
.
after
(
a
))
{
// 当前时间大于下班打卡时间
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
))
{
// 当前时间大于下班打卡时间
bc
++;
ash
.
setIsdk
(
1
);
}
else
{
bsz
=
1
;
}
}
if
(
r
==
2
)
{
...
...
@@ -2180,42 +2188,67 @@ public class ClockInController {
String
stampToDate
=
ClockInTool
.
stampToDate
(
String
.
valueOf
(
endDate
));
Timestamp
d
=
Timestamp
.
valueOf
(
stampToDate
);
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
))
{
ash
.
setIsdk
(
1
);
}
//
if (b.after(a) && b.after(c)) {
//
ash.setIsdk(1);
//
}
if
(
b
.
after
(
a
)
&&
b
.
before
(
d
))
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
if
(
b
.
before
(
a
)
||
b
.
after
(
c
))
{
bc
++;
ash
.
setIsdk
(
1
);
}
}
r
++;
}
}
else
{
boolean
ectivedate
=
ClockInTool
.
hourMinuteBetween
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
nowdate
),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
ash
.
getStarttime
()),
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
ash
.
getEndtime
()),
"yyyy-MM-dd HH:mm"
);
if
(
ectivedate
)
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
bc
++;
ash
.
setIsdk
(
1
);
}
}
//自由工时
if
(
attdate
.
getAttgrouptype
()
==
3
)
{
}
else
{
List
<
KqglAssoDkjl
>
dajllist_
=
kqglassodkjlmapper
.
getDetailedRecordClock
(
startDate
,
endDate
,
userBean
.
getEmpNum
());
KqglAssoDkjl
dkjl
=
KqglAssoDkjl
.
builder
().
build
();
for
(
KqglAssoDkjl
daj
:
dajllist_
)
{
if
(
ash
.
getId
()
==
daj
.
getBcid
()
&&
ash
.
getSort
()
==
daj
.
getSort
())
{
//班次id和打卡顺序对应
BeanUtil
.
copyProperties
(
daj
,
dkjl
,
"attdate"
,
"bcid"
,
"remarks"
,
"userId"
,
"attime"
,
"dkmxid"
,
"commentary"
,
"punchequipment"
,
"punchmode"
);
if
(
bsz
==
1
)
{
bc
++;
ash
.
setIsdk
(
1
);
}
else
{
ash
.
setIsdk
(
1
);
}
}
}
ash
.
setDajl
(
dkjl
);
}
//全部为 1 时
if
(
bccs
==
bc
)
{
KqglAssoDkjl
dk
=
KqglAssoDkjl
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getQyid
,
userBean
.
getOrgCode
())
.
eq
(
KqglAssoDkjl:
:
getUserId
,
userBean
.
getEmpNum
()).
ge
(
KqglAssoDkjl:
:
getDktime
,
startDate
).
le
(
KqglAssoDkjl:
:
getDktime
,
endDate
).
orderByDesc
(
KqglAssoDkjl:
:
getSort
).
last
(
"LIMIT 1"
));
if
(
dk
!=
null
&&
attdate
.
getAttsch
().
size
()
!=
dk
.
getSort
())
{
AttSchedule
att
=
attsch
.
get
(
dk
.
getSort
());
att
.
setIsdk
(
0
);
}
}
}
}
else
{
//自由工时
List
<
AttSchedule
>
attsch
=
new
ArrayList
<
AttSchedule
>();
List
<
KqglAssoDkjl
>
dajllist_
=
kqglassodkjlmapper
.
getDetailedRecordClock
(
startDate
,
endDate
,
userBean
.
getEmpNum
());
KqglAssoDkjl
dkjl
=
KqglAssoDkjl
.
builder
().
build
();
}
//外勤 true:开 false:关
if
(
attgro
.
getIsWq
()
==
1
)
{
...
...
@@ -2280,6 +2313,7 @@ public class ClockInController {
double
latetime_
=
0
;
//前天晚走时长(分钟)
Long
changed_time
=
0
l
;
//晚到后应打卡时间
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
List
<
AttSchedule
>
ash
=
attdate
.
getAttsch
();
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ash
.
get
(
0
).
getId
()));
...
...
@@ -2354,6 +2388,8 @@ public class ClockInController {
attdate
.
setLatetime
(
latetime_
);
attdate
.
setChanged_time
(
changed_time
);
}
}
return
ResultUtil
.
data
(
attdate
);
}
else
{
...
...
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