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
843613fd
Commit
843613fd
authored
Aug 21, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request 8timerv2/8timerapiv200!451
parents
5153f7c0
a8161011
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
476 additions
and
92 deletions
+476
-92
src/main/java/cn/timer/api/bean/kqmk/KqglAssoDkjl.java
+4
-0
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+321
-85
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+70
-6
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
+39
-0
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
+3
-0
src/main/java/cn/timer/api/dto/kqmk/AttSchedule.java
+2
-0
src/main/java/cn/timer/api/dto/kqmk/AttendanceCardListDto.java
+2
-0
src/main/java/cn/timer/api/dto/kqmk/TransactionApprovalDto.java
+25
-0
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
+10
-1
No files found.
src/main/java/cn/timer/api/bean/kqmk/KqglAssoDkjl.java
View file @
843613fd
...
...
@@ -107,5 +107,8 @@ public class KqglAssoDkjl extends Model<KqglAssoDkjl> {
@TableField
(
exist
=
false
)
private
Integer
calendar_status_type
;
//0:无;1:事假;2:调休;3:病假;4:年假;5:产假;6:陪产假;7:婚假;8:例假;9:丧假;10:哺乳假;11:加班;12:出差;13:外出
@TableField
(
exist
=
false
)
private
String
calendar_status_name
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
843613fd
...
...
@@ -67,14 +67,13 @@ 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.TransactionApprovalDto
;
import
cn.timer.api.dto.kqmk.WorkbenchCalendarDto
;
import
cn.timer.api.utils.DateUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
=
"3.0[3]考勤打卡"
)
...
...
@@ -217,6 +216,8 @@ public class ClockInController {
}
}
else
{
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
//无记录的话就找昨天的数据
AttendanceCardListDto
attdate1
=
MethodCall
(
qyid
,
userid
,
yesterday
);
List
<
AttSchedule
>
ashssyebo
=
attdate1
.
getAttsch
();
//获取昨天应打卡时间
...
...
@@ -228,9 +229,25 @@ public class ClockInController {
}
}
crdk
=
true
;
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
// crdk = true;
// attdate = MethodCall(qyid,userid,yesterday);
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
;
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
}
else
{
crdk
=
false
;
}
}
}
if
(
crdk
&&
dnck
)
{
...
...
@@ -2605,7 +2622,7 @@ public class ClockInController {
boolean
iscrdk
=
true
;
String
crlasttime
=
null
;
//次日最后打卡时间
boolean
bycf
=
true
;
/****************
次
日开始***************/
/****************
昨
日开始***************/
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
()));
...
...
@@ -2680,6 +2697,7 @@ public class ClockInController {
if
(
ectivedate
)
{
attschbefo
.
setIsdk
(
0
);
}
else
{
bc
++;
attschbefo
.
setIsdk
(
1
);
}
}
...
...
@@ -2687,6 +2705,7 @@ public class ClockInController {
if
(
ectivedate
)
{
attschbefo
.
setIsdk
(
0
);
}
else
{
bc
++;
attschbefo
.
setIsdk
(
1
);
}
}
...
...
@@ -2728,12 +2747,18 @@ public class ClockInController {
}
}
/****************
次
日结束***************/
/****************
昨
日结束***************/
int
bccs
=
attdate
.
getAttsch
().
size
();
int
r
=
1
;
// int bc = 0;
// int bsz = 0;
boolean
dk1
=
true
;
//上
boolean
dk2
=
true
;
//下
boolean
dk3
=
true
;
boolean
dk4
=
true
;
boolean
dk5
=
true
;
boolean
dk6
=
true
;
for
(
AttSchedule
ash
:
attsch
)
{
if
(
ash
.
getNextdaycard
()
==
0
)
{
if
(
attdate
.
getAttsch
().
size
()
==
2
)
{
...
...
@@ -2748,6 +2773,7 @@ public class ClockInController {
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
dk1
=
false
;
bc
++;
ash
.
setIsdk
(
1
);
...
...
@@ -2766,6 +2792,7 @@ public class ClockInController {
bsz
=
1
;
ash
.
setIsdk
(
0
);
}
else
{
dk2
=
false
;
bc
++;
ash
.
setIsdk
(
1
);
...
...
@@ -2794,9 +2821,9 @@ public class ClockInController {
}
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
);
Timestamp
a
=
Timestamp
.
valueOf
(
xbdk1
);
//下班
String
sbdk1
=
(
str
+
" "
+
shif
.
getSbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
);
Timestamp
c
=
Timestamp
.
valueOf
(
sbdk1
);
Timestamp
c
=
Timestamp
.
valueOf
(
sbdk1
);
//上班
if
(
r
==
1
)
{
if
(
b
.
after
(
a
)
&&
b
.
after
(
c
))
{
// 当前时间大于下班打卡时间
...
...
@@ -2839,6 +2866,25 @@ public class ClockInController {
}
else
{
bc
++;
ash
.
setIsdk
(
1
);
if
(
ash
.
getSort
()
==
1
)
{
dk1
=
false
;
}
if
(
ash
.
getSort
()
==
2
)
{
dk2
=
false
;
}
if
(
ash
.
getSort
()
==
3
)
{
dk3
=
false
;
}
if
(
ash
.
getSort
()
==
4
)
{
dk4
=
false
;
}
if
(
ash
.
getSort
()
==
5
)
{
dk5
=
false
;
}
if
(
ash
.
getSort
()
==
6
)
{
dk6
=
false
;
}
}
//是否请假
...
...
@@ -2956,79 +3002,85 @@ public class ClockInController {
}
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
(
asssum1
!=
null
)
{
if
(
asssum1
.
getApprovalType
()
!=
5
)
{
String
startTime
=
asssum1
.
getStartTime
();
//
String
endTime
=
asssum1
.
getEndTime
();
//
if
(
ash
.
getDajl
().
getCardType
()
!=
null
)
{
boolean
affair
=
ClockInTool
.
hourMinuteBetween
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ash
.
getDajl
().
getDktime
())),
startTime
,
endTime
,
"yyyy-MM-dd HH:mm:ss"
);
if
(
affair
&&
ash
.
getDajl
().
getStatus
()
!=
9
&&
ash
.
getDajl
().
getStatus
()
!=
10
&&
ash
.
getDajl
().
getStatus
()
!=
11
&&
ash
.
getDajl
().
getStatus
()
!=
12
&&
ash
.
getDajl
().
getStatus
()
!=
13
&&
ash
.
getDajl
().
getStatus
()
!=
14
)
{
ash
.
getDajl
().
setStatus
(
1
);
}
}
}
//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
()
!=
null
)
{
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
);
}
}
else
{
dkjl
.
setCalendar_status_type
(-
1
);
dkjl
.
setCalendar_status_name
(
rul
.
getName
());
ash
.
setCalendar_status_type
(-
1
);
dkjl
.
setCalendar_status_name
(
rul
.
getName
());
}
}
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
);
//班次信息中插入打卡打卡 数据
//
ash.setDajl(dkjl);//班次信息中插入打卡打卡 数据
}
}
...
...
@@ -3069,22 +3121,95 @@ public class ClockInController {
}
}
//当天最后一个班打完后 打卡按钮全部不显示
//当天最后一个班打完后 打卡按钮全部不显示
(没打卡的显示缺卡)
boolean
isdkjj
=
true
;
if
(
attdate
.
getAttsch
().
size
()
==
2
)
{
if
(
attsch
.
get
(
1
).
getDajl
().
getId
()
!=
null
&&
attsch
.
get
(
1
).
getDajl
().
getDktime
()
!=
null
)
{
isdkjj
=
false
;
if
(
attsch
.
get
(
0
).
getDajl
().
getId
()
==
null
&&
attsch
.
get
(
0
).
getDajl
().
getDktime
()
==
null
)
{
attsch
.
get
(
0
).
getDajl
().
setDktime
(
null
);
attsch
.
get
(
0
).
getDajl
().
setStatus
(
17
);
//缺卡
attsch
.
get
(
0
).
getDajl
().
setSort
(
attdate
.
getAttsch
().
get
(
0
).
getSort
());
attsch
.
get
(
0
).
getDajl
().
setId
(
888
);
attdate
.
getAttsch
().
get
(
0
).
setIsdk
(
1
);
}
}
}
else
if
(
attdate
.
getAttsch
().
size
()
==
4
)
{
if
(
attsch
.
get
(
3
).
getDajl
().
getId
()
!=
null
&&
attsch
.
get
(
3
).
getDajl
().
getDktime
()
!=
null
)
{
isdkjj
=
false
;
if
(
attsch
.
get
(
0
).
getDajl
().
getId
()
==
null
&&
attsch
.
get
(
0
).
getDajl
().
getDktime
()
==
null
)
{
attsch
.
get
(
0
).
getDajl
().
setDktime
(
null
);
attsch
.
get
(
0
).
getDajl
().
setStatus
(
17
);
//缺卡
attsch
.
get
(
0
).
getDajl
().
setSort
(
attdate
.
getAttsch
().
get
(
0
).
getSort
());
attsch
.
get
(
0
).
getDajl
().
setId
(
888
);
attdate
.
getAttsch
().
get
(
0
).
setIsdk
(
1
);
}
if
(
attsch
.
get
(
1
).
getDajl
().
getId
()
==
null
&&
attsch
.
get
(
1
).
getDajl
().
getDktime
()
==
null
&&
attsch
.
get
(
1
).
getDajl
().
getId
()
!=
999
)
{
attsch
.
get
(
1
).
getDajl
().
setDktime
(
null
);
attsch
.
get
(
1
).
getDajl
().
setStatus
(
17
);
//缺卡
attsch
.
get
(
1
).
getDajl
().
setSort
(
attdate
.
getAttsch
().
get
(
1
).
getSort
());
attsch
.
get
(
1
).
getDajl
().
setId
(
888
);
attdate
.
getAttsch
().
get
(
1
).
setIsdk
(
1
);
}
if
(
attsch
.
get
(
2
).
getDajl
().
getId
()
==
null
&&
attsch
.
get
(
2
).
getDajl
().
getDktime
()
==
null
)
{
attsch
.
get
(
2
).
getDajl
().
setDktime
(
null
);
attsch
.
get
(
2
).
getDajl
().
setStatus
(
17
);
//缺卡
attsch
.
get
(
2
).
getDajl
().
setSort
(
attdate
.
getAttsch
().
get
(
2
).
getSort
());
attsch
.
get
(
2
).
getDajl
().
setId
(
888
);
attdate
.
getAttsch
().
get
(
2
).
setIsdk
(
1
);
}
}
}
else
if
(
attdate
.
getAttsch
().
size
()
==
6
)
{
if
(
attsch
.
get
(
5
).
getDajl
().
getId
()
!=
null
&&
attsch
.
get
(
5
).
getDajl
().
getDktime
()
!=
null
)
{
isdkjj
=
false
;
if
(
attsch
.
get
(
0
).
getDajl
().
getId
()
==
null
&&
attsch
.
get
(
0
).
getDajl
().
getDktime
()
==
null
)
{
attsch
.
get
(
0
).
getDajl
().
setDktime
(
null
);
attsch
.
get
(
0
).
getDajl
().
setStatus
(
17
);
//缺卡
attsch
.
get
(
0
).
getDajl
().
setSort
(
attdate
.
getAttsch
().
get
(
0
).
getSort
());
attsch
.
get
(
0
).
getDajl
().
setId
(
888
);
attdate
.
getAttsch
().
get
(
0
).
setIsdk
(
1
);
}
if
(
attsch
.
get
(
1
).
getDajl
().
getId
()
==
null
&&
attsch
.
get
(
1
).
getDajl
().
getDktime
()
==
null
&&
attsch
.
get
(
1
).
getDajl
().
getId
()
!=
999
)
{
attsch
.
get
(
1
).
getDajl
().
setDktime
(
null
);
attsch
.
get
(
1
).
getDajl
().
setStatus
(
17
);
//缺卡
attsch
.
get
(
1
).
getDajl
().
setSort
(
attdate
.
getAttsch
().
get
(
1
).
getSort
());
attsch
.
get
(
1
).
getDajl
().
setId
(
888
);
attdate
.
getAttsch
().
get
(
1
).
setIsdk
(
1
);
}
if
(
attsch
.
get
(
2
).
getDajl
().
getId
()
==
null
&&
attsch
.
get
(
2
).
getDajl
().
getDktime
()
==
null
)
{
attsch
.
get
(
2
).
getDajl
().
setDktime
(
null
);
attsch
.
get
(
2
).
getDajl
().
setStatus
(
17
);
//缺卡
attsch
.
get
(
2
).
getDajl
().
setSort
(
attdate
.
getAttsch
().
get
(
2
).
getSort
());
attsch
.
get
(
2
).
getDajl
().
setId
(
888
);
attdate
.
getAttsch
().
get
(
2
).
setIsdk
(
1
);
}
if
(
attsch
.
get
(
3
).
getDajl
().
getId
()
==
null
&&
attsch
.
get
(
3
).
getDajl
().
getDktime
()
==
null
&&
attsch
.
get
(
3
).
getDajl
().
getId
()
!=
999
)
{
attsch
.
get
(
3
).
getDajl
().
setDktime
(
null
);
attsch
.
get
(
3
).
getDajl
().
setStatus
(
17
);
//缺卡
attsch
.
get
(
3
).
getDajl
().
setSort
(
attdate
.
getAttsch
().
get
(
3
).
getSort
());
attsch
.
get
(
3
).
getDajl
().
setId
(
888
);
attdate
.
getAttsch
().
get
(
3
).
setIsdk
(
1
);
}
if
(
attsch
.
get
(
4
).
getDajl
().
getId
()
==
null
&&
attsch
.
get
(
4
).
getDajl
().
getDktime
()
==
null
)
{
attsch
.
get
(
4
).
getDajl
().
setDktime
(
null
);
attsch
.
get
(
4
).
getDajl
().
setStatus
(
17
);
//缺卡
attsch
.
get
(
4
).
getDajl
().
setSort
(
attdate
.
getAttsch
().
get
(
4
).
getSort
());
attsch
.
get
(
4
).
getDajl
().
setId
(
888
);
attdate
.
getAttsch
().
get
(
4
).
setIsdk
(
1
);
}
}
}
// System.out.println(attsch.get(attdate.getAttsch().size()-1).getTime());
//全部为 1 时 iscrdk
if
(
bccs
==
bc
&&
b
.
before
(
d
)
&&
lcdkgb
&&
isdkjj
)
{
KqglAssoDkjl
dk
=
KqglAssoDkjl
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getQyid
,
userBean
.
getOrgCode
())
...
...
@@ -3094,35 +3219,93 @@ public class ClockInController {
if
(
dk
!=
null
&&
attdate
.
getAttsch
().
size
()
!=
dk
.
getSort
())
{
AttSchedule
att
=
attsch
.
get
(
dk
.
getSort
()-
cr
);
att
.
setIsdk
(
0
);
AttSchedule
attw
=
attsch
.
get
(
dk
.
getSort
()-
1
);
attw
.
setIsupdate
(
1
);
if
(
att
.
getDajl
().
getId
()
!=
null
&&
att
.
getDajl
().
getStatus
()
!=
17
&&
att
.
getDajl
().
getId
()
!=
888
)
{
att
.
setIsdk
(
0
);
AttSchedule
attw
=
attsch
.
get
(
dk
.
getSort
()-
1
);
attw
.
setIsupdate
(
1
);
}
else
{
AttSchedule
att1
=
attsch
.
get
(
dk
.
getSort
()+
cr
);
att1
.
setIsdk
(
0
);
AttSchedule
attw
=
attsch
.
get
(
dk
.
getSort
()+
cr
-
1
);
attw
.
setIsupdate
(
1
);
}
}
else
{
if
(
iscrdk
)
{
AttSchedule
attc
=
attsch
.
get
(
0
);
if
(
attc
.
getDajl
().
getId
()
!=
null
&&
attc
.
getDajl
().
getStatus
()
==
17
&&
attc
.
getDajl
().
getId
()
==
888
)
{
attc
.
getDajl
().
setId
(
null
);
attc
.
getDajl
().
setSort
(
null
);
attc
.
getDajl
().
setStatus
(
null
);
if
(
attdate
.
getAttsch
().
size
()
==
2
)
{
AttSchedule
attc
=
attsch
.
get
(
0
);
AttSchedule
attcto
=
attsch
.
get
(
1
);
Timestamp
tt1
=
Timestamp
.
valueOf
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
attsch
.
get
(
0
).
getTime
())));
Timestamp
tt2
=
Timestamp
.
valueOf
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
attsch
.
get
(
1
).
getTime
())));
if
(!
dk1
&&
dk2
)
{
attc
.
getDajl
().
setStatus
(
17
);
//缺卡
attc
.
getDajl
().
setSort
(
attc
.
getSort
());
attc
.
getDajl
().
setId
(
888
);
attc
.
setIsdk
(
1
);
}
if
(!
dk1
&&
!
dk2
&&
b
.
after
(
tt1
)
&&
b
.
before
(
tt2
))
{
attcto
.
getDajl
().
setStatus
(
null
);
//缺卡
attcto
.
getDajl
().
setSort
(
null
);
attcto
.
getDajl
().
setId
(
null
);
attcto
.
setIsdk
(
0
);
}
if
(!
dk1
&&
!
dk2
&&
b
.
after
(
tt1
)
&&
b
.
after
(
tt2
))
{
attcto
.
getDajl
().
setStatus
(
17
);
//缺卡
attcto
.
getDajl
().
setSort
(
attc
.
getSort
());
attcto
.
getDajl
().
setId
(
888
);
attcto
.
setIsdk
(
1
);
}
}
else
if
(
attdate
.
getAttsch
().
size
()
==
4
)
{
AttSchedule
attc
=
attsch
.
get
(
0
);
if
(
attc
.
getDajl
().
getId
()
!=
null
&&
attc
.
getDajl
().
getStatus
()
==
17
&&
attc
.
getDajl
().
getId
()
==
888
)
{
attc
.
getDajl
().
setId
(
null
);
attc
.
getDajl
().
setSort
(
null
);
attc
.
getDajl
().
setStatus
(
null
);
}
attc
.
setIsdk
(
0
);
}
attc
.
setIsdk
(
0
);
}
else
{
if
(
crlasttime
!=
null
)
{
Timestamp
dd
=
Timestamp
.
valueOf
(
crlasttime
);
if
(
dd
.
after
(
b
))
{
//after:大于 before:小于
AttSchedule
attc
=
attsch
.
get
(
0
);
if
(
attc
.
getDajl
().
getId
()
!=
null
&&
attc
.
getDajl
().
getStatus
()
==
17
&&
attc
.
getDajl
().
getId
()
==
888
)
{
attc
.
getDajl
().
setId
(
null
);
attc
.
getDajl
().
setSort
(
null
);
attc
.
getDajl
().
setStatus
(
null
);
}
attc
.
setIsdk
(
0
);
}
else
{
AttSchedule
attc
=
attsch
.
get
(
cr
);
attc
.
setIsdk
(
0
);
Timestamp
ag
=
Timestamp
.
valueOf
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
attc
.
getTime
())));
if
(
ag
.
after
(
b
))
{
if
(
attc
.
getDajl
().
getId
()
!=
null
&&
attc
.
getDajl
().
getStatus
()
==
17
&&
attc
.
getDajl
().
getId
()
==
888
)
{
attc
.
getDajl
().
setId
(
null
);
attc
.
getDajl
().
setSort
(
null
);
attc
.
getDajl
().
setStatus
(
null
);
}
attc
.
setIsdk
(
0
);
}
}
}
}
}
//没有打卡按钮时
for
(
int
y
=
0
;
y
<
bc
;
y
++)
{
AttSchedule
attc
=
attsch
.
get
(
y
);
if
(
attc
.
getDajl
().
getCardType
()
==
null
&&
attc
.
getDajl
().
getId
()
==
null
&&
attc
.
getDajl
().
getStatus
()
==
null
)
{
attc
.
setIsdk
(
0
);
break
;
}
}
}
}
else
{
//休息的时候
List
<
AttSchedule
>
attsch_
=
new
ArrayList
<
AttSchedule
>();
...
...
@@ -3134,15 +3317,10 @@ public class ClockInController {
//自由工时
List
<
AttSchedule
>
attsch
=
new
ArrayList
<
AttSchedule
>();
// List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// KqglAssoDkjl dkjl = KqglAssoDkjl.builder().build();
if
(
dajllist_
.
size
()
>
0
)
{
for
(
int
i
=
1
;
i
<=
dajllist_
.
size
();
i
++){
KqglAssoDkjl
dkjl
=
KqglAssoDkjl
.
builder
().
build
();
// for(KqglAssoDkjl ddk : dajllist_) {
BeanUtil
.
copyProperties
(
dajllist_
.
get
(
i
-
1
),
dkjl
,
"attdate"
,
"bcid"
,
"remarks"
,
"userId"
,
"attime"
,
"dkmxid"
,
"commentary"
,
"punchequipment"
,
"punchmode"
);
// }
BeanUtil
.
copyProperties
(
dajllist_
.
get
(
i
-
1
),
dkjl
,
"attdate"
,
"bcid"
,
"remarks"
,
"userId"
,
"attime"
,
"dkmxid"
,
"commentary"
,
"punchequipment"
,
"punchmode"
);
AttSchedule
ast
=
AttSchedule
.
builder
().
build
();
ast
.
setId
(
0
);
ast
.
setIsdk
(
1
);
...
...
@@ -3151,8 +3329,6 @@ public class ClockInController {
attsch
.
add
(
ast
);
attdate
.
setAttsch
(
attsch
);
}
KqglAssoDkjl
dkjj_
=
KqglAssoDkjl
.
builder
().
build
();
AttSchedule
ast_
=
AttSchedule
.
builder
().
build
();
ast_
.
setId
(
0
);
...
...
@@ -3161,8 +3337,6 @@ public class ClockInController {
ast_
.
setSort
(
dajllist_
.
size
()
+
1
);
attsch
.
add
(
ast_
);
attdate
.
setAttsch
(
attsch
);
}
else
{
KqglAssoDkjl
dkjj
=
KqglAssoDkjl
.
builder
().
build
();
AttSchedule
ast
=
AttSchedule
.
builder
().
build
();
...
...
@@ -3175,6 +3349,62 @@ public class ClockInController {
}
}
List
<
TransactionApprovalDto
>
tranappr
=
new
ArrayList
<
TransactionApprovalDto
>();
//事务审批单
List
<
KqglAssoRelationSummary
>
trap
=
KqglAssoRelationSummary
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
userBean
.
getEmpNum
())
.
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
str
));
if
(
trap
.
size
()
>
0
)
{
for
(
KqglAssoRelationSummary
spnsw
:
trap
)
{
if
(
spnsw
.
getApprovalType
()
!=
5
)
{
TransactionApprovalDto
taap
=
TransactionApprovalDto
.
builder
().
build
();
if
(
spnsw
.
getApprovalType
()
==
1
)
{
taap
.
setCalendar_status_type
(
11
);
}
else
if
(
spnsw
.
getApprovalType
()
==
2
)
{
KqglAssoLeaveRules
rul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getId
,
spnsw
.
getLeaveTypeId
()));
if
(
rul
.
getRulesType
()
!=
null
)
{
if
(
rul
.
getRulesType
()
==
1
)
{
taap
.
setCalendar_status_type
(
1
);
}
else
if
(
rul
.
getRulesType
()
==
2
)
{
taap
.
setCalendar_status_type
(
2
);
}
else
if
(
rul
.
getRulesType
()
==
3
)
{
taap
.
setCalendar_status_type
(
3
);
}
else
if
(
rul
.
getRulesType
()
==
4
)
{
taap
.
setCalendar_status_type
(
4
);
}
else
if
(
rul
.
getRulesType
()
==
5
)
{
taap
.
setCalendar_status_type
(
5
);
}
else
if
(
rul
.
getRulesType
()
==
6
)
{
taap
.
setCalendar_status_type
(
6
);
}
else
if
(
rul
.
getRulesType
()
==
7
)
{
taap
.
setCalendar_status_type
(
7
);
}
else
if
(
rul
.
getRulesType
()
==
8
)
{
taap
.
setCalendar_status_type
(
8
);
}
else
if
(
rul
.
getRulesType
()
==
9
)
{
taap
.
setCalendar_status_type
(
9
);
}
else
if
(
rul
.
getRulesType
()
==
10
)
{
taap
.
setCalendar_status_type
(
10
);
}
}
else
{
taap
.
setCalendar_status_type
(-
1
);
taap
.
setCalendar_status_name
(
rul
.
getName
());
}
}
else
if
(
spnsw
.
getApprovalType
()
==
3
)
{
taap
.
setCalendar_status_type
(
12
);
}
else
if
(
spnsw
.
getApprovalType
()
==
4
)
{
taap
.
setCalendar_status_type
(
13
);
}
taap
.
setApproval_form
(
spnsw
.
getApprovalId
());
tranappr
.
add
(
taap
);
attdate
.
setTranappr
(
tranappr
);
}
}
}
else
{
attdate
.
setTranappr
(
tranappr
);
}
//外勤 true:开 false:关
if
(
attgro
.
getIsWq
()
==
1
)
{
attdate
.
setFieldpersonnel
(
true
);
...
...
@@ -3202,32 +3432,38 @@ public class ClockInController {
if
(
abp
.
getType
()
==
1
){
AttendanceMachine
kqjs
=
attendancemachinemapper
.
selectByPrimaryKey
(
abp
.
getDkfsid
());
AttClockMethod
akm
=
AttClockMethod
.
builder
().
build
();
akm
.
setName
(
kqjs
.
getName
());
// 打卡名称
akm
.
setMac
(
""
);
// wifi【wifi】
akm
.
setAttrange
(
0
);
// 范围【地址】
akm
.
setType
(
1
);
// 类型(1:考勤机;2:地址;3:WIFI)
akm
.
setLongitude
(
0
);
// 经度【地址】
akm
.
setLatitude
(
0
);
// 纬度【地址】
if
(
kqjs
!=
null
)
{
akm
.
setName
(
kqjs
.
getName
());
// 打卡名称
akm
.
setMac
(
""
);
// wifi【wifi】
akm
.
setAttrange
(
0
);
// 范围【地址】
akm
.
setType
(
1
);
// 类型(1:考勤机;2:地址;3:WIFI)
akm
.
setLongitude
(
0
);
// 经度【地址】
akm
.
setLatitude
(
0
);
// 纬度【地址】
}
akms
.
add
(
akm
);
}
else
if
(
abp
.
getType
()
==
2
){
PunchCardAddress
kqdzs
=
punchcardaddressmapper
.
selectByPrimaryKey
(
abp
.
getDkfsid
());
AttClockMethod
akm
=
AttClockMethod
.
builder
().
build
();
akm
.
setName
(
kqdzs
.
getName
());
// 打卡名称
akm
.
setMac
(
""
);
// wifi【wifi】
akm
.
setAttrange
(
kqdzs
.
getDkfw
());
// 范围【地址】
akm
.
setType
(
2
);
// 类型(1:考勤机;2:地址;3:WIFI)
akm
.
setLongitude
(
kqdzs
.
getLon
());
// 经度【地址】
akm
.
setLatitude
(
kqdzs
.
getLat
());
// 纬度【地址】
if
(
kqdzs
!=
null
)
{
akm
.
setName
(
kqdzs
.
getName
());
// 打卡名称
akm
.
setMac
(
""
);
// wifi【wifi】
akm
.
setAttrange
(
kqdzs
.
getDkfw
());
// 范围【地址】
akm
.
setType
(
2
);
// 类型(1:考勤机;2:地址;3:WIFI)
akm
.
setLongitude
(
kqdzs
.
getLon
());
// 经度【地址】
akm
.
setLatitude
(
kqdzs
.
getLat
());
// 纬度【地址】
}
akms
.
add
(
akm
);
}
else
{
PunchCardWiFi
kqwfs
=
punchcardwifimapper
.
selectByPrimaryKey
(
abp
.
getDkfsid
());
AttClockMethod
akm
=
AttClockMethod
.
builder
().
build
();
akm
.
setName
(
kqwfs
.
getName
());
// 打卡名称
akm
.
setMac
(
kqwfs
.
getMac
());
// wifi【wifi】
akm
.
setAttrange
(
0
);
// 范围【地址】
akm
.
setType
(
3
);
// 类型(1:考勤机;2:地址;3:WIFI)
akm
.
setLongitude
(
0
);
// 经度【地址】
akm
.
setLatitude
(
0
);
// 纬度【地址】
if
(
kqwfs
!=
null
)
{
akm
.
setName
(
kqwfs
.
getName
());
// 打卡名称
akm
.
setMac
(
kqwfs
.
getMac
());
// wifi【wifi】
akm
.
setAttrange
(
0
);
// 范围【地址】
akm
.
setType
(
3
);
// 类型(1:考勤机;2:地址;3:WIFI)
akm
.
setLongitude
(
0
);
// 经度【地址】
akm
.
setLatitude
(
0
);
// 纬度【地址】
}
akms
.
add
(
akm
);
}
}
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
843613fd
...
...
@@ -890,14 +890,15 @@ public class TimeCardController {
public
Result
<
Object
>
PunchCardWIFI
(
@CurrentUser
UserBean
userBean
,
@RequestBody
KqglAssoDkwx
kqglassodkwx
)
{
List
<
KqglAssoDkwx
>
cxwifi
=
KqglAssoDkwx
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoDkwx
>().
lambda
().
eq
(
KqglAssoDkwx:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
KqglAssoDkwx:
:
getMac
,
kqglassodkwx
.
getMac
()));
if
(
cxwifi
.
size
()
>
0
)
{
if
(
cxwifi
.
size
()
>
0
&&
kqglassodkwx
.
getId
()
==
null
)
{
return
ResultUtil
.
error
(
"此WiFi已存在"
);
}
else
{
kqglassodkwx
.
setLuryid
(
userBean
.
getEmpNum
());
kqglassodkwx
.
setLusjTime
(
new
Date
().
getTime
());
kqglassodkwx
.
setQyid
(
userBean
.
getOrgCode
());
return
kqglassodkwx
.
insertOrUpdate
()
?
ResultUtil
.
success
(
"添加成功!"
)
:
ResultUtil
.
error
(
"添加失败!"
);
}
kqglassodkwx
.
setLuryid
(
userBean
.
getEmpNum
());
kqglassodkwx
.
setLusjTime
(
new
Date
().
getTime
());
kqglassodkwx
.
setQyid
(
userBean
.
getOrgCode
());
return
kqglassodkwx
.
insertOrUpdate
()
?
ResultUtil
.
success
(
"添加成功!"
)
:
ResultUtil
.
error
(
"添加失败!"
);
}
/**
...
...
@@ -1886,6 +1887,8 @@ public class TimeCardController {
Long
startDate
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
data
,
"yyyy-MM-dd"
)).
getTime
();
String
attdate_
=
new
SimpleDateFormat
(
"yy-MM-dd"
).
format
(
Double
.
valueOf
(
startDate
));
//转换打卡时间格式
String
punchattdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
Double
.
valueOf
(
startDate
));
//转换打卡时间格式
String
minutes
=
chpunchr
.
getMinutes
();
//更改分钟数
KqglAssoBcsz
dkbc
=
kqglassobcszmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
chpunchr
.
getBcszid
()));
...
...
@@ -2024,6 +2027,39 @@ public class TimeCardController {
dkmxid
=
pcd
.
getId
();
}
double
gzsc
=
0
;
long
rest_time
=
0
;
if
(
dkbc
.
getStartTime
()
!=
null
&&
dkbc
.
getEndTime
()
!=
null
)
{
long
kaishixiuxi
=
Long
.
valueOf
(
ClockInTool
.
dateToStamp
(
punchattdate
+
" "
+
dkbc
.
getStartTime
()+
":00"
));
long
jieshuxiuxi
=
Long
.
valueOf
(
ClockInTool
.
dateToStamp
(
punchattdate
+
" "
+
dkbc
.
getEndTime
()+
":00"
));
rest_time
=
(
jieshuxiuxi
-
kaishixiuxi
)/
1000
/
60
;
//休息时间
}
//请假时长
KqglAssoRelationSummary
qjsc
=
kqglassorelationsummarymapper
.
Businessdayclockin
(
userBean
.
getEmpNum
(),
2
,
punchattdate
,
userBean
.
getOrgCode
());
//计算工作时长
KqglAssoDkmx
dkgzsc
=
KqglAssoDkmx
.
builder
().
id
(
dkmxid
).
build
().
selectById
();
if
(
dkgzsc
.
getYdkcs
()
==
2
||
dkgzsc
.
getYdkcs
()
==
4
||
dkgzsc
.
getYdkcs
()
==
6
)
{
if
(
dkgzsc
.
getSbdk1
()
!=
null
&&
dkgzsc
.
getXbdk1
()
!=
null
)
{
gzsc
=
gzsc
+
(
dkgzsc
.
getXbdk1
()
-
dkgzsc
.
getSbdk1
())/
1000
/
60
;
}
}
if
(
dkgzsc
.
getYdkcs
()
==
4
||
dkgzsc
.
getYdkcs
()
==
6
)
{
if
(
dkgzsc
.
getSbdk2
()
!=
null
&&
dkgzsc
.
getXbdk2
()
!=
null
)
{
gzsc
=
gzsc
+
(
dkgzsc
.
getXbdk2
()
-
dkgzsc
.
getSbdk2
())/
1000
/
60
;
}
}
if
(
dkgzsc
.
getYdkcs
()
==
6
)
{
if
(
dkgzsc
.
getSbdk3
()
!=
null
&&
dkgzsc
.
getXbdk3
()
!=
null
)
{
gzsc
=
gzsc
+
(
dkgzsc
.
getXbdk3
()
-
dkgzsc
.
getSbdk3
())/
1000
/
60
;
}
}
gzsc
=
gzsc
-
rest_time
-
qjsc
.
getDuration
();
KqglAssoDkmx
.
builder
().
id
(
dkmxid
).
gzsc
(
gzsc
).
build
().
updateById
();
//打卡记录表
clock_time_
=
Long
.
valueOf
(
ClockInTool
.
dateToStamp
(
clock_time
));
...
...
@@ -3059,4 +3095,32 @@ public class TimeCardController {
return
ResultUtil
.
data
(
null
,
"操作成功!"
);
}
/**
* 删除考勤机
*/
@DeleteMapping
(
value
=
"/attendance/{code}"
)
@ApiOperation
(
value
=
"删除考勤机"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
)
public
Result
<
Integer
>
DeleteAttendance
(
@PathVariable
(
"code"
)
String
code
)
{
KqglAssoKqj
kqj
=
KqglAssoKqj
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoKqj
>().
lambda
().
eq
(
KqglAssoKqj:
:
getCode
,
code
));
int
kqjid
=
kqj
.
getId
();
if
(
KqglAssoKqj
.
builder
().
id
(
kqjid
).
build
().
deleteById
())
{
KqglAssoYhsb
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqjid
));
KqglAssoKqjgly
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoKqjgly
>().
lambda
().
eq
(
KqglAssoKqjgly:
:
getKqjid
,
kqjid
));
}
return
ResultUtil
.
data
(
null
,
"操作成功!"
);
}
}
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
View file @
843613fd
...
...
@@ -32,6 +32,7 @@ import cn.timer.api.controller.kqgl.ClockInTool;
import
cn.timer.api.controller.kqgl.EmptyUtil
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoPbmxMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoRelationSummaryMapper
;
import
cn.timer.api.dao.kqmk.KqglMainKqzMapper
;
import
cn.timer.api.dto.kqmk.AttEvectionApprovalDto
;
import
cn.timer.api.dto.kqmk.AttLateLate
;
...
...
@@ -289,6 +290,9 @@ public class KqglServiceImpl implements KqglService {
@Autowired
private
KqglMainKqzMapper
kqglmainkqzmapper
;
@Autowired
private
KqglAssoRelationSummaryMapper
kqglassorelationsummarymapper
;
/**
* 考勤补卡审批
*/
...
...
@@ -755,6 +759,41 @@ public class KqglServiceImpl implements KqglService {
//attime 应打卡时间
double
gzsc
=
0
;
long
rest_time
=
0
;
if
(
shif
.
getStartTime
()
!=
null
&&
shif
.
getEndTime
()
!=
null
)
{
long
kaishixiuxi
=
Long
.
valueOf
(
ClockInTool
.
dateToStamp
(
cardrepltime
+
" "
+
shif
.
getStartTime
()+
":00"
));
long
jieshuxiuxi
=
Long
.
valueOf
(
ClockInTool
.
dateToStamp
(
cardrepltime
+
" "
+
shif
.
getEndTime
()+
":00"
));
rest_time
=
(
jieshuxiuxi
-
kaishixiuxi
)/
1000
/
60
;
//休息时间
}
//请假时长
KqglAssoRelationSummary
qjsc
=
kqglassorelationsummarymapper
.
Businessdayclockin
(
repaappr
.
getUserid
(),
2
,
cardrepltime
,
repaappr
.
getOrgcode
());
//计算工作时长
KqglAssoDkmx
dkgzsc
=
KqglAssoDkmx
.
builder
().
id
(
dkmxid
).
build
().
selectById
();
if
(
dkgzsc
.
getYdkcs
()
==
2
||
dkgzsc
.
getYdkcs
()
==
4
||
dkgzsc
.
getYdkcs
()
==
6
)
{
if
(
dkgzsc
.
getSbdk1
()
!=
null
&&
dkgzsc
.
getXbdk1
()
!=
null
)
{
gzsc
=
gzsc
+
(
dkgzsc
.
getXbdk1
()
-
dkgzsc
.
getSbdk1
())/
1000
/
60
;
}
}
if
(
dkgzsc
.
getYdkcs
()
==
4
||
dkgzsc
.
getYdkcs
()
==
6
)
{
if
(
dkgzsc
.
getSbdk2
()
!=
null
&&
dkgzsc
.
getXbdk2
()
!=
null
)
{
gzsc
=
gzsc
+
(
dkgzsc
.
getXbdk2
()
-
dkgzsc
.
getSbdk2
())/
1000
/
60
;
}
}
if
(
dkgzsc
.
getYdkcs
()
==
6
)
{
if
(
dkgzsc
.
getSbdk3
()
!=
null
&&
dkgzsc
.
getXbdk3
()
!=
null
)
{
gzsc
=
gzsc
+
(
dkgzsc
.
getXbdk3
()
-
dkgzsc
.
getSbdk3
())/
1000
/
60
;
}
}
gzsc
=
gzsc
-
rest_time
-
qjsc
.
getDuration
();
KqglAssoDkmx
.
builder
().
id
(
dkmxid
).
gzsc
(
gzsc
).
build
().
updateById
();
KqglAssoDkjl
pre
=
KqglAssoDkjl
.
builder
().
dktime
(
repaappr
.
getCardrepltime
()).
results
(
results
).
userId
(
repaappr
.
getUserid
()).
type
(
type
).
status
(
status
).
sort
(
atttype
)
.
cardType
(
0
).
qyid
(
repaappr
.
getOrgcode
()).
attdate
(
attdate_
+
" "
+
ClockInTool
.
dateToWeek2
(
cardrepltime
)).
attime
(
attime
).
dkmxid
(
dkmxid
).
bcid
(
shifid
).
remarks
(
"审批补卡通过打卡"
).
punchmode
(
0
)
.
punchequipment
(
""
).
commentary
(
"成功打卡"
).
build
();
...
...
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
View file @
843613fd
...
...
@@ -25,4 +25,7 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
KqglAssoRelationSummary
selectTabledata
(
int
userid
,
int
approvaltype
,
String
apptime
);
KqglAssoRelationSummary
leaveinvesti
(
int
userid
,
int
approvaltype
,
String
apptime
,
int
orgcode
);
KqglAssoRelationSummary
Businessdayclockin
(
int
userid
,
int
approvaltype
,
String
apptime
,
int
orgcode
);
}
src/main/java/cn/timer/api/dto/kqmk/AttSchedule.java
View file @
843613fd
...
...
@@ -28,6 +28,8 @@ public class AttSchedule implements Serializable{
private
Integer
calendar_status_type
;
//0:无;1:事假;2:调休;3:病假;4:年假;5:产假;6:陪产假;7:婚假;8:例假;9:丧假;10:哺乳假;11:加班;12:出差;13:外出
private
Integer
calendar_status_name
;
private
int
isleave
;
//是否请假
private
int
isupdate
;
//是否跟新打卡
private
int
isdk
;
//0:当前打卡 1:已过打卡
...
...
src/main/java/cn/timer/api/dto/kqmk/AttendanceCardListDto.java
View file @
843613fd
...
...
@@ -44,4 +44,6 @@ public class AttendanceCardListDto implements Serializable {
// private List<SystemShift> ssfh;// 无排班时获取的系统班次
private
Integer
attgrouptype
;
// 1:固定排班;2:自由排班;3:自由工时
private
List
<
TransactionApprovalDto
>
tranappr
;
//事务审批单
}
src/main/java/cn/timer/api/dto/kqmk/TransactionApprovalDto.java
0 → 100644
View file @
843613fd
package
cn
.
timer
.
api
.
dto
.
kqmk
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Yl123
* 事务审批单
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
TransactionApprovalDto
{
private
Integer
calendar_status_type
;
//0:无;1:事假;2:调休;3:病假;4:年假;5:产假;6:陪产假;7:婚假;8:例假;9:丧假;10:哺乳假;11:加班;12:出差;13:外出
private
Integer
approval_form
;
//审批单
private
String
calendar_status_name
;
}
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
View file @
843613fd
...
...
@@ -76,7 +76,7 @@
and res.org_code = #{orgcode}
and res.approval_type = #{approvaltype}
and res.app_time = #{apptime}
GROUP BY res.start_time,res.end_time
;
GROUP BY res.start_time,res.end_time
DESC LIMIT 1
</select>
<select
id=
"selectTabledata"
resultMap=
"BaseResultMap"
>
...
...
@@ -86,6 +86,15 @@
and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{apptime}
</select>
<select
id=
"Businessdayclockin"
resultMap=
"BaseResultMap"
>
select IFNULL(SUM(res.duration),0) as duration
from kqgl_asso_relation_summary res
where res.user_id = #{userid}
and res.approval_type = #{approvaltype}
and res.app_time = #{apptime}
and res.org_code = #{orgcode}
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoRelationSummary">
...
...
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