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
c6c5530d
Commit
c6c5530d
authored
4 years ago
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
cfcac37b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
280 additions
and
233 deletions
+280
-233
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+270
-232
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
+1
-0
src/main/java/cn/timer/api/dto/kqmk/AttSchedule.java
+3
-1
src/main/java/cn/timer/api/dto/kqmk/ClockCollectData.java
+3
-0
src/main/java/cn/timer/api/dto/spmk/SpmkApproveDetailDto.java
+3
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
c6c5530d
...
...
@@ -2303,7 +2303,6 @@ public class ClockInController {
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
())){
...
...
@@ -2324,14 +2323,11 @@ public class ClockInController {
String
stampToDate
=
ClockInTool
.
stampToDate
(
String
.
valueOf
(
endDate
));
//当天打卡的最后时间
Timestamp
d
=
Timestamp
.
valueOf
(
stampToDate
);
Timestamp
b
=
Timestamp
.
valueOf
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
//当前时间
String
now
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
());
String
nowtime
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
());
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
userBean
.
getEmpNum
(),
userBean
.
getOrgCode
());
//考勤组信息
if
(
attgro
!=
null
)
{
...
...
@@ -2351,96 +2347,158 @@ public class ClockInController {
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
List
<
AttSchedule
>
attsch
=
attdate
.
getAttsch
();
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
())
&&
attsch
.
get
(
0
).
getId
()
!=
0
)
{
//班次不为空
/******次日开始*****/
int
sb1
=
0
,
xb1
=
0
,
sb2
=
0
,
xb2
=
0
,
sb3
=
0
,
xb3
=
0
;
//先判断前一天是否存在次日打卡的方式
KqglAssoBcsz
jianchashif
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
attsch
.
get
(
0
).
getId
()));
if
(
jianchashif
.
getIsSbdk1Cr
()
==
1
)
{
sb1
=
1
;
}
if
(
jianchashif
.
getIsXbdk1Cr
()
==
1
)
{
xb1
=
1
;
}
if
(
jianchashif
.
getIsSbdk2Cr
()
==
1
)
{
sb2
=
1
;
}
if
(
jianchashif
.
getIsXbdk2Cr
()
==
1
)
{
xb2
=
1
;
}
if
(
jianchashif
.
getIsSbdk3Cr
()
==
1
)
{
sb3
=
1
;
}
if
(
jianchashif
.
getIsXbdk3Cr
()
==
1
)
{
xb3
=
1
;
}
//
if
(
sb1
==
1
||
xb1
==
1
||
sb2
==
1
||
xb2
==
1
||
sb3
==
1
||
xb3
==
1
)
{
//前一天的班次
AttendanceCardListDto
beforeattdate
=
MethodCall
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
yesterday
);
//前一天的打卡数据
List
<
KqglAssoDkjl
>
dajllistbefo
=
kqglassodkjlmapper
.
getDetailedRecordClock
(
startDateyesterday
,
endDateyesterday
,
userBean
.
getEmpNum
());
List
<
AttSchedule
>
beforeattsch
=
beforeattdate
.
getAttsch
();
int
p
=
0
;
for
(
AttSchedule
befo
:
beforeattsch
)
{
if
(
befo
.
getNextday
()
==
1
)
{
AttSchedule
attschbefo
=
AttSchedule
.
builder
().
build
();
BeanUtil
.
copyProperties
(
befo
,
attschbefo
,
"nextdaycard"
,
"dajl"
);
attschbefo
.
setNextday
(
2
);
//昨日
KqglAssoDkjl
dkjlbefo
=
KqglAssoDkjl
.
builder
().
build
();
for
(
KqglAssoDkjl
ka
:
dajllistbefo
)
{
if
(
befo
.
getId
()
==
ka
.
getBcid
()
&&
befo
.
getSort
()
==
ka
.
getSort
())
{
//班次id和打卡顺序对应
BeanUtil
.
copyProperties
(
ka
,
dkjlbefo
,
"attdate"
,
"remarks"
,
"userId"
,
"attime"
,
"dkmxid"
,
"commentary"
,
"punchequipment"
,
"punchmode"
);
}
}
attschbefo
.
setDajl
(
dkjlbefo
);
attsch
.
add
(
p
,
attschbefo
);
p
++;
}
}
}
/******次日结束*****/
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"
);
String
timme
=
ClockInTool
.
stampToDate2
(
String
.
valueOf
(
ash
.
getTime
()));
if
(
r
==
1
)
{
if
(
ectivedate
)
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
bc
++;
ash
.
setIsdk
(
1
);
if
(!
now
.
equals
(
timme
))
{
//小于
ash
.
setIsupdate
(
0
);
if
(
ash
.
getNextdaycard
()
==
0
)
{
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"
);
String
timme
=
ClockInTool
.
stampToDate2
(
String
.
valueOf
(
ash
.
getTime
()));
if
(
r
==
1
)
{
if
(
ectivedate
)
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
bc
++;
ash
.
setIsdk
(
1
);
ash
.
setIsupdate
(
1
);
if
(!
now
.
equals
(
timme
))
{
//小于
ash
.
setIsupdate
(
0
);
}
else
{
ash
.
setIsupdate
(
1
);
}
}
}
}
if
(
r
==
2
)
{
if
(
ectivedate
)
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
bc
++;
ash
.
setIsdk
(
1
);
if
(!
now
.
equals
(
timme
))
{
//小于
ash
.
setIsupdate
(
0
);
if
(
r
==
2
)
{
if
(
ectivedate
)
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
if
(
isxbdk
==
2
)
{
ash
.
setIsupdate
(
1
);
}
bc
++;
ash
.
setIsdk
(
1
);
if
(!
now
.
equals
(
timme
))
{
//小于
ash
.
setIsupdate
(
0
);
}
else
{
if
(
isxbdk
==
2
)
{
ash
.
setIsupdate
(
1
);
}
}
}
}
r
++;
//是否请假
KqglAssoRelationSummary
leainv
=
kqglassorelationsummarymapper
.
leaveinvesti
(
userBean
.
getEmpNum
(),
2
,
str
,
userBean
.
getOrgCode
());
boolean
adopt
=
false
;
if
(
leainv
!=
null
)
{
String
time
=
ClockInTool
.
stampToDate4
(
String
.
valueOf
(
ash
.
getTime
()));
//当天打卡的最后时间
adopt
=
ClockInTool
.
hourMinuteBetween
(
time
,
leainv
.
getStartTime
().
substring
(
0
,
16
),
leainv
.
getEndTime
().
substring
(
0
,
16
),
"yyyy-MM-dd HH:mm"
);
}
if
(
adopt
)
{
ash
.
setIsleave
(
1
);
}
}
else
{
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ash
.
getId
()));
String
xbdk1
=
(
str
+
" "
+
shif
.
getXbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
);
Timestamp
a
=
Timestamp
.
valueOf
(
xbdk1
);
String
sbdk1
=
(
str
+
" "
+
shif
.
getSbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
);
Timestamp
c
=
Timestamp
.
valueOf
(
sbdk1
);
if
(
r
==
1
)
{
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
))
{
// 当前时间大于下班打卡时间
bc
++;
ash
.
setIsdk
(
1
);
if
(
b
.
before
(
d
))
{
ash
.
setIsupdate
(
1
);
}
}
else
{
bsz
=
1
;
}
}
if
(
r
==
2
)
{
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
)
&&
b
.
before
(
d
))
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
bc
++;
ash
.
setIsdk
(
1
);
}
}
r
++;
//是否请假
KqglAssoRelationSummary
leainv
=
kqglassorelationsummarymapper
.
leaveinvesti
(
userBean
.
getEmpNum
(),
2
,
str
,
userBean
.
getOrgCode
());
boolean
adopt
=
false
;
if
(
leainv
!=
null
)
{
String
time
=
ClockInTool
.
stampToDate4
(
String
.
valueOf
(
ash
.
getTime
()));
//当天打卡的最后时间
adopt
=
ClockInTool
.
hourMinuteBetween
(
time
,
leainv
.
getStartTime
().
substring
(
0
,
16
),
leainv
.
getEndTime
().
substring
(
0
,
16
),
"yyyy-MM-dd HH:mm"
);
}
if
(
adopt
)
{
ash
.
setIsleave
(
1
);
}
}
r
++;
//是否请假
KqglAssoRelationSummary
leainv
=
kqglassorelationsummarymapper
.
leaveinvesti
(
userBean
.
getEmpNum
(),
2
,
str
,
userBean
.
getOrgCode
());
boolean
adopt
=
false
;
if
(
leainv
!=
null
)
{
String
time
=
ClockInTool
.
stampToDate4
(
String
.
valueOf
(
ash
.
getTime
()));
//当天打卡的最后时间
adopt
=
ClockInTool
.
hourMinuteBetween
(
time
,
leainv
.
getStartTime
().
substring
(
0
,
16
),
leainv
.
getEndTime
().
substring
(
0
,
16
),
"yyyy-MM-dd HH:mm"
);
}
if
(
adopt
)
{
ash
.
setIsleave
(
1
);
}
}
else
{
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ash
.
getId
()));
String
xbdk1
=
(
str
+
" "
+
shif
.
getXbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
);
Timestamp
a
=
Timestamp
.
valueOf
(
xbdk1
);
String
sbdk1
=
(
str
+
" "
+
shif
.
getSbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
);
Timestamp
c
=
Timestamp
.
valueOf
(
sbdk1
);
if
(
r
==
1
)
{
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
))
{
// 当前时间大于下班打卡时间
bc
++;
ash
.
setIsdk
(
1
);
if
(
b
.
before
(
d
))
{
ash
.
setIsupdate
(
1
);
}
}
else
{
bsz
=
1
;
}
}
if
(
r
==
2
)
{
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
)
&&
b
.
before
(
d
))
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
bc
++;
ash
.
setIsdk
(
1
);
}
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
);
}
r
++;
//是否请假
//是否请假
KqglAssoRelationSummary
leainv
=
kqglassorelationsummarymapper
.
leaveinvesti
(
userBean
.
getEmpNum
(),
2
,
str
,
userBean
.
getOrgCode
());
boolean
adopt
=
false
;
if
(
leainv
!=
null
)
{
...
...
@@ -2451,173 +2509,153 @@ public class ClockInController {
ash
.
setIsleave
(
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
)
{
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
bc
++;
ash
.
setIsdk
(
1
);
}
//是否请假
KqglAssoRelationSummary
leainv
=
kqglassorelationsummarymapper
.
leaveinvesti
(
userBean
.
getEmpNum
(),
2
,
str
,
userBean
.
getOrgCode
());
boolean
adopt
=
false
;
if
(
leainv
!=
null
)
{
String
time
=
ClockInTool
.
stampToDate4
(
String
.
valueOf
(
ash
.
getTime
()));
//当天打卡的最后时间
adopt
=
ClockInTool
.
hourMinuteBetween
(
time
,
leainv
.
getStartTime
().
substring
(
0
,
16
),
leainv
.
getEndTime
().
substring
(
0
,
16
),
"yyyy-MM-dd HH:mm"
);
}
if
(
adopt
)
{
ash
.
setIsleave
(
1
);
}
}
////
// List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// dkcs = dajllist_.size();
KqglAssoDkjl
dkjl
=
KqglAssoDkjl
.
builder
().
build
();
for
(
KqglAssoDkjl
daj
:
dajllist_
)
{
if
(
ash
.
getId
()
==
daj
.
getBcid
()
&&
ash
.
getSort
()
==
daj
.
getSort
())
{
//班次id和打卡顺序对应
BeanUtil
.
copyProperties
(
daj
,
dkjl
,
"attdate"
,
"remarks"
,
"userId"
,
"attime"
,
"dkmxid"
,
"commentary"
,
"punchequipment"
,
"punchmode"
);
int
bcid
=
dkjl
.
getBcid
();
int
results
=
dkjl
.
getResults
();
KqglAssoBcsz
bcsz
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
bcid
));
if
(
bcsz
!=
null
)
{
int
yxcdfzs
=
bcsz
.
getYxcdfzs
();
//允许迟到分钟数
int
yzcdfzs
=
bcsz
.
getYzcdfzs
();
//严重迟到分钟数
int
kgcdfzs
=
bcsz
.
getKgcdfzs
();
//旷工迟到分钟数
//允许迟到范围
if
(
results
<
yxcdfzs
)
{
dkjl
.
setResults
(
0
);
if
(
dkjl
.
getStatus
()
==
3
)
{
//原本是迟到的 但是在“允许迟到”范围内 则更改为正常
dkjl
.
setStatus
(
1
);
////
// List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// dkcs = dajllist_.size();
KqglAssoDkjl
dkjl
=
KqglAssoDkjl
.
builder
().
build
();
for
(
KqglAssoDkjl
daj
:
dajllist_
)
{
if
(
ash
.
getId
()
==
daj
.
getBcid
()
&&
ash
.
getSort
()
==
daj
.
getSort
())
{
//班次id和打卡顺序对应
BeanUtil
.
copyProperties
(
daj
,
dkjl
,
"attdate"
,
"remarks"
,
"userId"
,
"attime"
,
"dkmxid"
,
"commentary"
,
"punchequipment"
,
"punchmode"
);
int
bcid
=
dkjl
.
getBcid
();
int
results
=
dkjl
.
getResults
();
KqglAssoBcsz
bcsz
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
bcid
));
if
(
bcsz
!=
null
)
{
int
yxcdfzs
=
bcsz
.
getYxcdfzs
();
//允许迟到分钟数
int
yzcdfzs
=
bcsz
.
getYzcdfzs
();
//严重迟到分钟数
int
kgcdfzs
=
bcsz
.
getKgcdfzs
();
//旷工迟到分钟数
//允许迟到范围
if
(
results
<
yxcdfzs
)
{
dkjl
.
setResults
(
0
);
if
(
dkjl
.
getStatus
()
==
3
)
{
//原本是迟到的 但是在“允许迟到”范围内 则更改为正常
dkjl
.
setStatus
(
1
);
}
}
//严重迟到范围
if
(
results
>
yzcdfzs
&&
results
<
kgcdfzs
&&
yzcdfzs
>
0
)
{
dkjl
.
setStatus
(
15
);
//严重迟到
}
//旷工迟到
if
(
results
>
kgcdfzs
&&
kgcdfzs
>
0
)
{
dkjl
.
setStatus
(
16
);
//旷工迟到
}
}
//严重迟到范围
if
(
results
>
yzcdfzs
&&
results
<
kgcdfzs
&&
yzcdfzs
>
0
)
{
dkjl
.
setStatus
(
15
);
//严重迟到
}
//旷工迟到
if
(
results
>
kgcdfzs
&&
kgcdfzs
>
0
)
{
dkjl
.
setStatus
(
16
);
//旷工迟到
if
(
bsz
==
1
)
{
bc
++;
ash
.
setIsdk
(
1
);
}
else
{
ash
.
setIsdk
(
1
);
}
}
}
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ash
.
getId
()));
Timestamp
tt
=
Timestamp
.
valueOf
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ash
.
getTime
())));
//处理下班不用打卡的数据
if
(
shif
.
getIsXbdk
()
==
1
&&
(
ash
.
getSort
())%
2
==
0
)
{
if
(
bsz
==
1
)
{
bc
++;
ash
.
setIsdk
(
1
);
}
else
{
ash
.
setIsdk
(
1
);
if
(
dkjl
.
getDktime
()
==
null
&&
b
.
after
(
tt
))
{
dkjl
.
setDktime
(
ash
.
getTime
());
dkjl
.
setStatus
(
1
);
dkjl
.
setSort
(
ash
.
getSort
());
dkjl
.
setId
(
999
);
}
else
if
(
dkjl
.
getDktime
()
!=
null
){
dkjl
.
setStatus
(
1
);
}
}
}
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ash
.
getId
()));
Timestamp
tt
=
Timestamp
.
valueOf
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ash
.
getTime
())));
//处理下班不用打卡的数据
if
(
shif
.
getIsXbdk
()
==
1
&&
(
ash
.
getSort
())%
2
==
0
)
{
//处理当天完全没打卡的数据
if
(
ash
.
getIsdk
()
==
1
&&
b
.
after
(
tt
)
&&
dkcs
==
0
)
{
dkjl
.
setDktime
(
null
);
dkjl
.
setStatus
(
17
);
//缺卡
dkjl
.
setSort
(
ash
.
getSort
());
dkjl
.
setId
(
888
);
//更新打卡关闭
ash
.
setIsupdate
(
0
);
}
if
(
dkjl
.
getDktime
()
==
null
&&
b
.
after
(
tt
))
{
dkjl
.
setDktime
(
ash
.
getTime
());
dkjl
.
setStatus
(
1
);
//
if
(
ash
.
getIsdk
()
==
1
&&
b
.
after
(
tt
)
&&
dkjl
.
getDktime
()
==
null
&&
dkjl
.
getId
()
==
null
&&
dkcs
>
0
)
{
dkjl
.
setStatus
(
1
7
);
//缺卡
dkjl
.
setSort
(
ash
.
getSort
());
dkjl
.
setId
(
999
);
}
else
if
(
dkjl
.
getDktime
()
!=
null
){
dkjl
.
setStatus
(
1
);
dkjl
.
setId
(
888
);
//更新打卡关闭
ash
.
setIsupdate
(
0
);
}
}
//处理当天完全没打卡的数据
if
(
ash
.
getIsdk
()
==
1
&&
b
.
after
(
tt
)
&&
dkcs
==
0
)
{
dkjl
.
setDktime
(
null
);
dkjl
.
setStatus
(
17
);
//缺卡
dkjl
.
setSort
(
ash
.
getSort
());
dkjl
.
setId
(
888
);
//更新打卡关闭
ash
.
setIsupdate
(
0
);
}
//
if
(
ash
.
getIsdk
()
==
1
&&
b
.
after
(
tt
)
&&
dkjl
.
getDktime
()
==
null
&&
dkjl
.
getId
()
==
null
&&
dkcs
>
0
)
{
dkjl
.
setStatus
(
17
);
//缺卡
dkjl
.
setSort
(
ash
.
getSort
());
dkjl
.
setId
(
888
);
//更新打卡关闭
ash
.
setIsupdate
(
0
);
}
/****/
//事务(请假,加班,调休,出差)
KqglAssoRelationSummary
asssum1
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
userBean
.
getEmpNum
())
.
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
str
).
last
(
"LIMIT 1"
));
if
(
asssum1
!=
null
)
{
//0:无;1:事假;2:调休;3:病假;4:年假;5:产假;6:陪产假;7:婚假;8:例假;9:丧假;10:哺乳假;11:加班;12:出差;13:外出
if
(
asssum1
.
getApprovalType
()
==
1
)
{
dkjl
.
setCalendar_status_type
(
11
);
ash
.
setCalendar_status_type
(
11
);
}
else
if
(
asssum1
.
getApprovalType
()
==
2
)
{
//请假
KqglAssoLeaveRules
rul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getId
,
asssum1
.
getLeaveTypeId
()));
if
(
rul
.
getRulesType
()
==
1
)
{
dkjl
.
setCalendar_status_type
(
1
);
ash
.
setCalendar_status_type
(
1
);
}
else
if
(
rul
.
getRulesType
()
==
2
)
{
dkjl
.
setCalendar_status_type
(
2
);
ash
.
setCalendar_status_type
(
2
);
}
else
if
(
rul
.
getRulesType
()
==
3
)
{
dkjl
.
setCalendar_status_type
(
3
);
ash
.
setCalendar_status_type
(
3
);
}
else
if
(
rul
.
getRulesType
()
==
4
)
{
dkjl
.
setCalendar_status_type
(
4
);
ash
.
setCalendar_status_type
(
4
);
}
else
if
(
rul
.
getRulesType
()
==
5
)
{
dkjl
.
setCalendar_status_type
(
5
);
ash
.
setCalendar_status_type
(
5
);
}
else
if
(
rul
.
getRulesType
()
==
6
)
{
dkjl
.
setCalendar_status_type
(
6
);
ash
.
setCalendar_status_type
(
6
);
}
else
if
(
rul
.
getRulesType
()
==
7
)
{
dkjl
.
setCalendar_status_type
(
7
);
ash
.
setCalendar_status_type
(
7
);
}
else
if
(
rul
.
getRulesType
()
==
8
)
{
dkjl
.
setCalendar_status_type
(
8
);
ash
.
setCalendar_status_type
(
8
);
}
else
if
(
rul
.
getRulesType
()
==
9
)
{
dkjl
.
setCalendar_status_type
(
9
);
ash
.
setCalendar_status_type
(
9
);
}
else
if
(
rul
.
getRulesType
()
==
10
)
{
dkjl
.
setCalendar_status_type
(
10
);
ash
.
setCalendar_status_type
(
10
);
}
}
else
if
(
asssum1
.
getApprovalType
()
==
3
)
{
dkjl
.
setCalendar_status_type
(
12
);
ash
.
setCalendar_status_type
(
12
);
}
else
if
(
asssum1
.
getApprovalType
()
==
4
)
{
dkjl
.
setCalendar_status_type
(
13
);
ash
.
setCalendar_status_type
(
13
);
}
}
else
{
dkjl
.
setCalendar_status_type
(
0
);
ash
.
setCalendar_status_type
(
0
);
}
/****/
ash
.
setDajl
(
dkjl
);
//班次信息中插入打卡打卡 数据
//事务(请假,加班,调休,出差)
KqglAssoRelationSummary
asssum1
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
userBean
.
getEmpNum
())
.
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
str
).
last
(
"LIMIT 1"
));
if
(
asssum1
!=
null
)
{
//0:无;1:事假;2:调休;3:病假;4:年假;5:产假;6:陪产假;7:婚假;8:例假;9:丧假;10:哺乳假;11:加班;12:出差;13:外出
if
(
asssum1
.
getApprovalType
()
==
1
)
{
dkjl
.
setCalendar_status_type
(
11
);
ash
.
setCalendar_status_type
(
11
);
}
else
if
(
asssum1
.
getApprovalType
()
==
2
)
{
//请假
KqglAssoLeaveRules
rul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getId
,
asssum1
.
getLeaveTypeId
()));
if
(
rul
.
getRulesType
()
==
1
)
{
dkjl
.
setCalendar_status_type
(
1
);
ash
.
setCalendar_status_type
(
1
);
}
else
if
(
rul
.
getRulesType
()
==
2
)
{
dkjl
.
setCalendar_status_type
(
2
);
ash
.
setCalendar_status_type
(
2
);
}
else
if
(
rul
.
getRulesType
()
==
3
)
{
dkjl
.
setCalendar_status_type
(
3
);
ash
.
setCalendar_status_type
(
3
);
}
else
if
(
rul
.
getRulesType
()
==
4
)
{
dkjl
.
setCalendar_status_type
(
4
);
ash
.
setCalendar_status_type
(
4
);
}
else
if
(
rul
.
getRulesType
()
==
5
)
{
dkjl
.
setCalendar_status_type
(
5
);
ash
.
setCalendar_status_type
(
5
);
}
else
if
(
rul
.
getRulesType
()
==
6
)
{
dkjl
.
setCalendar_status_type
(
6
);
ash
.
setCalendar_status_type
(
6
);
}
else
if
(
rul
.
getRulesType
()
==
7
)
{
dkjl
.
setCalendar_status_type
(
7
);
ash
.
setCalendar_status_type
(
7
);
}
else
if
(
rul
.
getRulesType
()
==
8
)
{
dkjl
.
setCalendar_status_type
(
8
);
ash
.
setCalendar_status_type
(
8
);
}
else
if
(
rul
.
getRulesType
()
==
9
)
{
dkjl
.
setCalendar_status_type
(
9
);
ash
.
setCalendar_status_type
(
9
);
}
else
if
(
rul
.
getRulesType
()
==
10
)
{
dkjl
.
setCalendar_status_type
(
10
);
ash
.
setCalendar_status_type
(
10
);
}
}
else
if
(
asssum1
.
getApprovalType
()
==
3
)
{
dkjl
.
setCalendar_status_type
(
12
);
ash
.
setCalendar_status_type
(
12
);
}
else
if
(
asssum1
.
getApprovalType
()
==
4
)
{
dkjl
.
setCalendar_status_type
(
13
);
ash
.
setCalendar_status_type
(
13
);
}
}
else
{
dkjl
.
setCalendar_status_type
(
0
);
ash
.
setCalendar_status_type
(
0
);
}
/****/
ash
.
setDajl
(
dkjl
);
//班次信息中插入打卡打卡 数据
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
View file @
c6c5530d
...
...
@@ -113,6 +113,7 @@ public class SpmkServiceImpl implements SpmkService{
if
(
sum
!=
null
)
{
adD
.
setEmpNum
(
sum
.
getEmpNum
());
adD
.
setSts
(
sum
.
getSts
());
adD
.
setLaunchTime
(
sum
.
getCreateTime
());
SpmkExecutor
exe
=
null
;
SpmkApproveExecuteRecord
exere
=
SpmkApproveExecuteRecord
.
builder
().
build
()
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/kqmk/AttSchedule.java
View file @
c6c5530d
...
...
@@ -21,7 +21,7 @@ public class AttSchedule implements Serializable{
private
Integer
id
;
private
Integer
sort
;
// 1:上班;2:下班; 3:上班;4:下班;5:上班;6:下班
private
Integer
nextday
;
//0:否;1:是
private
Integer
nextday
;
//0:否;1:是
(0:今日;1:次日;2:昨日)
private
Long
time
;
private
Long
starttime
;
private
Long
endtime
;
...
...
@@ -32,4 +32,6 @@ public class AttSchedule implements Serializable{
private
int
isupdate
;
//是否跟新打卡
private
int
isdk
;
//0:当前打卡 1:已过打卡
private
KqglAssoDkjl
dajl
;
private
int
nextdaycard
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/kqmk/ClockCollectData.java
View file @
c6c5530d
...
...
@@ -60,4 +60,7 @@ public class ClockCollectData implements Serializable {
@ApiModelProperty
(
value
=
"打卡类型"
,
example
=
"1:打卡 2:更新打卡"
)
private
Integer
differ
;
@ApiModelProperty
(
value
=
"打卡"
,
example
=
"0:当天卡 1:次日卡"
)
private
Integer
nextday
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/spmk/SpmkApproveDetailDto.java
View file @
c6c5530d
package
cn
.
timer
.
api
.
dto
.
spmk
;
import
java.util.Date
;
import
java.util.List
;
import
cn.hutool.json.JSONObject
;
...
...
@@ -54,5 +55,7 @@ public class SpmkApproveDetailDto {
private
Integer
exeid
;
private
Integer
exereid
;
private
Date
launchTime
;
//审批发起时间
}
This diff is collapsed.
Click to expand it.
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