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
99ab5e9e
Commit
99ab5e9e
authored
May 23, 2020
by
dengshichuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
提交 See merge request 8timerv2/8timerapiv200!113
parents
816c5a9f
0a895f6d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
20 deletions
+30
-20
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+28
-19
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
+1
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
99ab5e9e
...
...
@@ -33,7 +33,7 @@ public class ClockInTool {
// 用StringBuffer来存放数组中的非空元素,用“;”分隔
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
str
.
length
;
i
++)
{
if
(
""
.
equals
(
str
[
i
]))
{
if
(
"
null
"
.
equals
(
str
[
i
]))
{
continue
;
}
sb
.
append
(
str
[
i
]);
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
99ab5e9e
package
cn
.
timer
.
api
.
controller
.
kqgl
.
atttimer
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -7,6 +8,7 @@ import java.util.Arrays;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Locale
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
...
...
@@ -293,11 +295,14 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
}
}
else
if
(
attgro
.
getPbfs
()
==
2
){
//自由排班
DateFormat
df
=
new
SimpleDateFormat
(
"EEE MMM dd HH:mm:ss zzz yyyy"
,
Locale
.
US
);
List
<
Schedule
>
ycqs
=
schedulemapper
.
getAttendanceShouldList
(
user
.
getEmpnum
(),
startDate
,
endDate
);
int
xiuxi
=
0
,
shangban
=
0
,
z
=
0
;
String
[]
ziyoupb
=
new
String
[
ycqs
.
size
()];
for
(
Schedule
sc
:
ycqs
){
ziyoupb
[
z
]
=
String
.
valueOf
(
sc
.
getData
());
String
data
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
df
.
parse
(
String
.
valueOf
(
sc
.
getData
())));
// 获得格式化后的日期字符串
ziyoupb
[
z
]
=
data
;
z
++;
if
(
sc
.
getBcid
().
equals
(
0
)){
xiuxi
++;
...
...
@@ -314,6 +319,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
KqglAssoPbmx
pbx
=
KqglAssoPbmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoPbmx
>().
lambda
().
eq
(
KqglAssoPbmx:
:
getUserid
,
user
.
getEmpnum
()).
eq
(
KqglAssoPbmx:
:
getData
,
num
).
eq
(
KqglAssoPbmx:
:
getKqzid
,
attgro
.
getId
()));
if
(
pbx
!=
null
&&
pbx
.
getBcid
()!=
0
)
{
ycqts
[
y
]
=
num
;
y
++;
zjgzts
++;
}
else
{
xxts
[
x
]
=
num
;
...
...
@@ -350,6 +356,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
for
(
String
num
:
range
)
{
if
(
Arrays
.
binarySearch
(
ziyoupb
,
String
.
valueOf
(
ClockInTool
.
dateToWeek
(
num
)))
>=
0
)
{
//对比排班应打卡时间
ycqts
[
g
]
=
num
;
g
++;
zjgzts
++;
}
else
{
xxts
[
x
]
=
num
;
...
...
@@ -446,16 +453,18 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
//遍历目前为止所有日期 结合该用户发起的审批进行结合
//1:加班 2:请假 3:出差 4:外出 5:补卡
for
(
String
num
:
range
)
{
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
xxts
),
num
)
>=
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
dkjtts
),
num
)
>=
0
)
{
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
xxts
),
"null"
),
num
)
>=
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
dkjtts
),
"null"
),
num
)
>=
0
)
{
rowData
.
add
(
"休息并打卡"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
xxts
),
num
)
>=
0
){
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
xxts
),
"null"
),
num
)
>=
0
){
rowData
.
add
(
"休息"
);
}
else
{
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
ycqts
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
leaves
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
travels
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
goouts
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
cards
),
num
)
<
0
)
{
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
ycqts
),
"null"
),
num
)
>=
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
dkjtts
),
"null"
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
leaves
),
"null"
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
travels
),
"null"
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
goouts
),
"null"
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
cards
),
"null"
),
num
)
<
0
)
{
rowData
.
add
(
"旷工"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
ycqts
),
"null"
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
xxts
),
"null"
),
num
)
<
0
)
{
//日期不在上班也不在休息里面即为未排班
rowData
.
add
(
"未排班"
);
}
else
if
(
sdf1
.
parse
(
beginTime
).
getTime
()
<
sdf1
.
parse
(
num
).
getTime
())
{
rowData
.
add
(
"未到班期"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
leaves
),
num
)
>=
0
)
{
//请假
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
leaves
),
"null"
),
num
)
>=
0
)
{
//请假
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
2
));
String
leavetype
=
"未知"
;
//请假类型
String
company
=
"未知"
;
//请假单位
...
...
@@ -471,16 +480,16 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"请"
+
leavetype
+
lea
.
getDuration
()+
company
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
travels
),
num
)
>=
0
)
{
//出差
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
travels
),
"null"
),
num
)
>=
0
)
{
//出差
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
3
));
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"出差"
+
lea
.
getDuration
()+
"天"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
goouts
),
num
)
>=
0
){
//外出
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
goouts
),
"null"
),
num
)
>=
0
){
//外出
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
4
));
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"外出"
+
lea
.
getDuration
()+
"天"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
cards
),
num
)
>=
0
){
//补卡
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
cards
),
"null"
),
num
)
>=
0
){
//补卡
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
5
));
rowData
.
add
(
"已补卡:"
+
lea
.
getStartTime
());
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
overtimes
),
num
)
>=
0
)
{
//加班
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
overtimes
),
"null"
),
num
)
>=
0
)
{
//加班
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
1
));
String
company
=
"未知"
,
method
=
"无"
;
//加班单位、加班补偿方式
...
...
@@ -498,7 +507,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"加班"
+
lea
.
getDuration
()+
company
+
"["
+
method
+
"]"
);
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
//工作日
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
ycqts
),
num
)
>=
0
)
{
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
ycqts
),
"null"
),
num
)
>=
0
)
{
if
(
lea
.
getCompensateId
()
==
1
)
{
workingturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
...
...
@@ -506,14 +515,14 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
}
//休息日
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
xxts
),
num
)
>=
0
)
{
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
xxts
),
"null"
),
num
)
>=
0
)
{
if
(
lea
.
getCompensateId
()
==
1
)
{
restturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
resttransferovertime
++;
}
}
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
ycqts
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
xxts
),
num
)
<
0
)
{
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
ycqts
),
"null"
),
num
)
<
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
xxts
),
"null"
),
num
)
<
0
)
{
if
(
lea
.
getCompensateId
()
==
1
)
{
holidayturncompenleave
++;
}
else
if
(
lea
.
getCompensateId
()
==
2
)
{
...
...
@@ -521,19 +530,19 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
}
}
else
{
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
sblacks
),
num
)
>=
0
)
{
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
sblacks
),
"null"
),
num
)
>=
0
)
{
rowData
.
add
(
"上班缺卡"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
sblacks
),
num
)
>=
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
ztts
),
num
)
>=
0
)
{
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
sblacks
),
"null"
),
num
)
>=
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
ztts
),
"null"
),
num
)
>=
0
)
{
rowData
.
add
(
"上班缺卡,下班早退"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
cdts
),
num
)
>=
0
)
{
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
cdts
),
"null"
),
num
)
>=
0
)
{
rowData
.
add
(
"上班迟到"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
cdts
),
num
)
>=
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
xblacks
),
num
)
>=
0
)
{
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
cdts
),
"null"
),
num
)
>=
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
xblacks
),
"null"
),
num
)
>=
0
)
{
rowData
.
add
(
"上班迟到,下班缺卡"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
cdts
),
num
)
>=
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
ztts
),
num
)
>=
0
)
{
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
cdts
),
"null"
),
num
)
>=
0
&&
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
ztts
),
"null"
),
num
)
>=
0
)
{
rowData
.
add
(
"上班迟到,下班早退"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
xblacks
),
num
)
>=
0
)
{
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
xblacks
),
"null"
),
num
)
>=
0
)
{
rowData
.
add
(
"下班缺卡"
);
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
replaceNull
(
ztts
),
num
)
>=
0
)
{
}
else
if
(
Arrays
.
binarySearch
(
ClockInTool
.
doChinFilters
(
ClockInTool
.
replaceNull
(
ztts
),
"null"
),
num
)
>=
0
)
{
rowData
.
add
(
"下班早退"
);
}
else
{
rowData
.
add
(
"正常"
);
...
...
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
View file @
99ab5e9e
...
...
@@ -108,6 +108,7 @@
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
where emp.org_code = #{orgcode}
and emp.job_status in (0,1)
</select>
<!--
...
...
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