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
f2680c12
Commit
f2680c12
authored
4 years ago
by
ilal
Committed by
chenzg
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
0b337628
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
2 deletions
+103
-2
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+17
-2
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+35
-0
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/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
+9
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
f2680c12
...
@@ -3003,13 +3003,28 @@ public class ClockInController {
...
@@ -3003,13 +3003,28 @@ public class ClockInController {
}
}
ash
.
setDajl
(
dkjl
);
//班次信息中插入打卡打卡 数据
/****/
/****/
//事务(请假,加班,调休,出差)
//事务(请假,加班,调休,出差)
KqglAssoRelationSummary
asssum1
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
userBean
.
getEmpNum
())
KqglAssoRelationSummary
asssum1
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
userBean
.
getEmpNum
())
.
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
str
).
last
(
"LIMIT 1"
));
.
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
str
).
last
(
"LIMIT 1"
));
if
(
asssum1
!=
null
)
{
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:外出
//0:无;1:事假;2:调休;3:病假;4:年假;5:产假;6:陪产假;7:婚假;8:例假;9:丧假;10:哺乳假;11:加班;12:出差;13:外出
if
(
asssum1
.
getApprovalType
()
==
1
)
{
if
(
asssum1
.
getApprovalType
()
==
1
)
{
dkjl
.
setCalendar_status_type
(
11
);
dkjl
.
setCalendar_status_type
(
11
);
...
@@ -3075,7 +3090,7 @@ public class ClockInController {
...
@@ -3075,7 +3090,7 @@ public class ClockInController {
}
}
/****/
/****/
ash
.
setDajl
(
dkjl
);
//班次信息中插入打卡打卡 数据
//
ash.setDajl(dkjl);//班次信息中插入打卡打卡 数据
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
f2680c12
...
@@ -1887,6 +1887,8 @@ public class TimeCardController {
...
@@ -1887,6 +1887,8 @@ public class TimeCardController {
Long
startDate
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
data
,
"yyyy-MM-dd"
)).
getTime
();
Long
startDate
=
DateUtil
.
getStartTime
(
0
,
DateUtil
.
getStringTime
(
data
,
"yyyy-MM-dd"
)).
getTime
();
String
attdate_
=
new
SimpleDateFormat
(
"yy-MM-dd"
).
format
(
Double
.
valueOf
(
startDate
));
//转换打卡时间格式
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
();
//更改分钟数
String
minutes
=
chpunchr
.
getMinutes
();
//更改分钟数
KqglAssoBcsz
dkbc
=
kqglassobcszmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
chpunchr
.
getBcszid
()));
KqglAssoBcsz
dkbc
=
kqglassobcszmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
chpunchr
.
getBcszid
()));
...
@@ -2025,6 +2027,39 @@ public class TimeCardController {
...
@@ -2025,6 +2027,39 @@ public class TimeCardController {
dkmxid
=
pcd
.
getId
();
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
));
clock_time_
=
Long
.
valueOf
(
ClockInTool
.
dateToStamp
(
clock_time
));
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
View file @
f2680c12
...
@@ -32,6 +32,7 @@ import cn.timer.api.controller.kqgl.ClockInTool;
...
@@ -32,6 +32,7 @@ import cn.timer.api.controller.kqgl.ClockInTool;
import
cn.timer.api.controller.kqgl.EmptyUtil
;
import
cn.timer.api.controller.kqgl.EmptyUtil
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoPbmxMapper
;
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.dao.kqmk.KqglMainKqzMapper
;
import
cn.timer.api.dto.kqmk.AttEvectionApprovalDto
;
import
cn.timer.api.dto.kqmk.AttEvectionApprovalDto
;
import
cn.timer.api.dto.kqmk.AttLateLate
;
import
cn.timer.api.dto.kqmk.AttLateLate
;
...
@@ -289,6 +290,9 @@ public class KqglServiceImpl implements KqglService {
...
@@ -289,6 +290,9 @@ public class KqglServiceImpl implements KqglService {
@Autowired
@Autowired
private
KqglMainKqzMapper
kqglmainkqzmapper
;
private
KqglMainKqzMapper
kqglmainkqzmapper
;
@Autowired
private
KqglAssoRelationSummaryMapper
kqglassorelationsummarymapper
;
/**
/**
* 考勤补卡审批
* 考勤补卡审批
*/
*/
...
@@ -755,6 +759,41 @@ public class KqglServiceImpl implements KqglService {
...
@@ -755,6 +759,41 @@ public class KqglServiceImpl implements KqglService {
//attime 应打卡时间
//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
)
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
)
.
cardType
(
0
).
qyid
(
repaappr
.
getOrgcode
()).
attdate
(
attdate_
+
" "
+
ClockInTool
.
dateToWeek2
(
cardrepltime
)).
attime
(
attime
).
dkmxid
(
dkmxid
).
bcid
(
shifid
).
remarks
(
"审批补卡通过打卡"
).
punchmode
(
0
)
.
punchequipment
(
""
).
commentary
(
"成功打卡"
).
build
();
.
punchequipment
(
""
).
commentary
(
"成功打卡"
).
build
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dao/kqmk/KqglAssoRelationSummaryMapper.java
View file @
f2680c12
...
@@ -25,4 +25,7 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
...
@@ -25,4 +25,7 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
KqglAssoRelationSummary
selectTabledata
(
int
userid
,
int
approvaltype
,
String
apptime
);
KqglAssoRelationSummary
selectTabledata
(
int
userid
,
int
approvaltype
,
String
apptime
);
KqglAssoRelationSummary
leaveinvesti
(
int
userid
,
int
approvaltype
,
String
apptime
,
int
orgcode
);
KqglAssoRelationSummary
leaveinvesti
(
int
userid
,
int
approvaltype
,
String
apptime
,
int
orgcode
);
KqglAssoRelationSummary
Businessdayclockin
(
int
userid
,
int
approvaltype
,
String
apptime
,
int
orgcode
);
}
}
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/kqmk/KqglAssoRelationSummaryMapper.xml
View file @
f2680c12
...
@@ -86,6 +86,15 @@
...
@@ -86,6 +86,15 @@
and res.approval_type = #{approvaltype}
and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{apptime}
and SUBSTR(res.app_time,1,7) = #{apptime}
</select>
</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">
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoRelationSummary">
...
...
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