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
30710e29
Commit
30710e29
authored
Jul 09, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
bc64a06a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
7 deletions
+65
-7
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+56
-5
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+5
-2
src/main/java/cn/timer/api/dto/kqmk/AttSchedule.java
+4
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
30710e29
package
cn
.
timer
.
api
.
controller
.
kqgl
;
import
java.math.BigDecimal
;
import
java.sql.Timestamp
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
...
...
@@ -24,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.kqgl.AttConditions
;
import
cn.timer.api.bean.kqgl.AttGroupBinPunchMode
;
...
...
@@ -63,6 +65,7 @@ import cn.timer.api.dto.kqmk.AttLateLate;
import
cn.timer.api.dto.kqmk.AttSchedule
;
import
cn.timer.api.dto.kqmk.AttendanceCardListDto
;
import
cn.timer.api.dto.kqmk.ClockCollectData
;
import
cn.timer.api.dto.kqmk.KqglAssoMonthPunchSummaryDto
;
import
cn.timer.api.dto.kqmk.KqglAssoPbmxDto
;
import
cn.timer.api.dto.kqmk.WorkbenchCalendarDto
;
import
cn.timer.api.utils.DateUtil
;
...
...
@@ -2113,6 +2116,10 @@ public class ClockInController {
@ApiOperation
(
value
=
"获取考勤打卡数据------APP打卡"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
)
public
Result
<
Object
>
getAttClockData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AttConditions
attconditions
)
throws
ParseException
{
long
nowdate
=
new
Date
().
getTime
();
String
current
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
());
String
str
=
null
;
if
(!(
""
).
equals
(
attconditions
.
getDate
())){
str
=
attconditions
.
getDate
();
...
...
@@ -2139,9 +2146,57 @@ public class ClockInController {
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
userBean
.
getEmpNum
(),
userBean
.
getOrgCode
());
//考勤组信息
if
(
attgro
!=
null
)
{
//APP获取当前天的考勤信息
//APP获取当前天的考勤信息
AttendanceCardListDto
attdate
=
MethodCall
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
attconditions
.
getDate
());
//打卡记录
// List<KqglAssoDkjl> dajllist = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// attdate.setAttpr(dajllist);
List
<
AttSchedule
>
attsch
=
attdate
.
getAttsch
();
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
)
{
ash
.
setIsdk
(
0
);
}
else
{
ash
.
setIsdk
(
1
);
}
}
else
{
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ash
.
getId
()));
String
xbdk1
=
(
current
+
" "
+
shif
.
getXbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
);
Timestamp
b
=
Timestamp
.
valueOf
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
//
Timestamp
a
=
Timestamp
.
valueOf
(
xbdk1
);
if
(
b
.
after
(
a
))
{
// >
ash
.
setIsdk
(
1
);
}
}
}
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
)
{
ash
.
setIsdk
(
0
);
}
else
{
ash
.
setIsdk
(
1
);
}
}
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"
);
ash
.
setIsdk
(
1
);
}
}
ash
.
setDajl
(
dkjl
);
}
//外勤 true:开 false:关
if
(
attgro
.
getIsWq
()
==
1
)
{
attdate
.
setFieldpersonnel
(
true
);
...
...
@@ -2200,10 +2255,6 @@ public class ClockInController {
}
attdate
.
setMachine
(
akms
);
//打卡记录
List
<
KqglAssoDkjl
>
dajllist
=
kqglassodkjlmapper
.
getDetailedRecordClock
(
startDate
,
endDate
,
userBean
.
getEmpNum
());
attdate
.
setAttpr
(
dajllist
);
//当天第一次打卡 前一天晚走小时**************************************************
double
latetime_
=
0
;
//前天晚走时长(分钟)
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
30710e29
...
...
@@ -1315,8 +1315,11 @@ public class TimeCardController {
String
[]
attser
=
attass
.
getAttuserids
();
if
(
attser
.
length
>
0
){
for
(
int
u
=
0
;
u
<
attser
.
length
;
u
++){
if
(
attass
.
getAtttype
()
==
2
){
KqglAssoPbmx
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoPbmx
>().
lambda
().
eq
(
KqglAssoPbmx:
:
getUserid
,
Integer
.
valueOf
(
attser
[
u
])));}
KqglAssoYhkqz
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhkqz
>().
lambda
().
eq
(
KqglAssoYhkqz:
:
getUserid
,
Integer
.
valueOf
(
attser
[
u
])));
if
(
attass
.
getAtttype
()
==
2
){
KqglAssoPbmx
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoPbmx
>().
lambda
().
eq
(
KqglAssoPbmx:
:
getUserid
,
Integer
.
valueOf
(
attser
[
u
])));
}
KqglAssoYhkqz
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhkqz
>().
lambda
().
eq
(
KqglAssoYhkqz:
:
getUserid
,
Integer
.
valueOf
(
attser
[
u
])).
eq
(
KqglAssoYhkqz:
:
getQyid
,
userBean
.
getOrgCode
()));
KqglAssoYhkqz
kquser
=
KqglAssoYhkqz
.
builder
().
kqzid
(
attid
).
userid
(
Integer
.
valueOf
(
attser
[
u
])).
qyid
(
userBean
.
getOrgCode
()).
build
();
yhkqzlist
.
add
(
kquser
);
...
...
src/main/java/cn/timer/api/dto/kqmk/AttSchedule.java
View file @
30710e29
...
...
@@ -2,6 +2,7 @@ package cn.timer.api.dto.kqmk;
import
java.io.Serializable
;
import
cn.timer.api.bean.kqmk.KqglAssoDkjl
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
...
...
@@ -24,4 +25,7 @@ public class AttSchedule implements Serializable{
private
Long
time
;
private
Long
starttime
;
private
Long
endtime
;
private
int
isdk
;
//0:当前打卡 1:已过打卡
private
KqglAssoDkjl
dajl
;
}
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