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
c490a256
Commit
c490a256
authored
Aug 07, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
f950ce7d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
24 deletions
+73
-24
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+33
-11
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
+37
-12
src/main/resources/mapping/kqgl/PunchRecordMapper.xml
+2
-0
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
+1
-1
No files found.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
c490a256
...
...
@@ -96,7 +96,7 @@ public class AttendanceTaskTiming{
//typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0
38 14
* * ?")
// @Scheduled(cron = "0
16 17
* * ?")
@Scheduled
(
cron
=
"0 0 8,12,16,20 * * ?"
)
//每天上午8、12点,下午16点,20点 执行
public
void
AttendanceTask
()
throws
ParseException
{
...
...
@@ -494,7 +494,9 @@ public class AttendanceTaskTiming{
//遍历目前为止所有日期 结合该用户发起的审批进行结合
//1:加班 2:请假 3:出差 4:外出 5:补卡
int
u
=
0
;
int
p
=
1
;
for
(
String
num
:
range
)
{
String
sjs
=
""
,
qinjia
=
""
,
chuaca
=
""
,
waichu
=
""
,
buka
=
""
,
jiaban
=
""
;
if
(
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
)
&&
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
dkjtts
),
num
))
{
rowData
.
add
(
"休息并打卡"
);
}
else
if
(
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
)){
...
...
@@ -543,24 +545,30 @@ public class AttendanceTaskTiming{
else
{
company
=
"小时"
;
}
}
}
rowData
.
remove
(
u
);
rowData
.
add
(
u
,(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"请"
+
leavetype
+
lea
.
getDuration
()+
company
);
qinjia
=
"#"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"请"
+
leavetype
+
lea
.
getDuration
()+
company
;
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company);
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
travels
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
3
));
rowData
.
remove
(
u
);
rowData
.
add
(
u
,(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"出差"
+
lea
.
getDuration
()+
"天"
);
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天");
chuaca
=
"#"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"出差"
+
lea
.
getDuration
()+
"天"
;
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
goouts
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
4
));
rowData
.
remove
(
u
);
rowData
.
add
(
u
,(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"外出"
+
lea
.
getDuration
()+
"天"
);
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天");
waichu
=
"#"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"外出"
+
lea
.
getDuration
()+
"天"
;
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
cards
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
5
));
rowData
.
remove
(
u
);
rowData
.
add
(
u
,
"已补卡:"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
));
// rowData.remove(u);
// rowData.add(u,"已补卡:"+(lea.getStartTime()).substring(5, 16));
buka
=
"#"
+
"已补卡:"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
);
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
overtimes
),
num
))
{
...
...
@@ -581,8 +589,9 @@ public class AttendanceTaskTiming{
else
if
(
lea
.
getCompensateId
()
==
2
)
{
method
=
"转加班费"
;
}
else
{
method
=
"转调休或加班费"
;}
rowData
.
remove
(
u
);
rowData
.
add
(
u
,(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"加班"
+
lea
.
getDuration
()+
company
+
"["
+
method
+
"]"
);
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]");
jiaban
=
"#"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"加班"
+
lea
.
getDuration
()+
company
+
"["
+
method
+
"]"
;
//防止多运算
if
(
lea
.
getOrdernum
()
==
lea
.
getTotals
())
{
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
...
...
@@ -621,6 +630,18 @@ public class AttendanceTaskTiming{
}
}
if
(
rowData
.
size
()
==
p
)
{
sjs
=
""
;
if
((
""
).
equals
(
qinjia
)
&&
(
""
).
equals
(
chuaca
)
&&
(
""
).
equals
(
waichu
)
&&
(
""
).
equals
(
buka
)
&&
(
""
).
equals
(
jiaban
))
{
sjs
=
rowData
.
get
(
u
);
}
else
{
sjs
=
rowData
.
get
(
u
)+
";"
;
}
}
rowData
.
remove
(
u
);
rowData
.
add
(
u
,
sjs
+
qinjia
+
chuaca
+
waichu
+
buka
+
jiaban
);
/****/
////////
...
...
@@ -680,6 +701,7 @@ public class AttendanceTaskTiming{
u
++;
p
++;
}
}
else
{
for
(
String
num2
:
range
)
{
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
View file @
c490a256
...
...
@@ -88,7 +88,7 @@ public class LastMonthtimingExport {
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// @Scheduled(cron = "0 10 17 * * ?")
@Scheduled
(
cron
=
"0 0 4,20 * * ?"
)
//每天上午4点,下午20点 执行
public
void
LastMonthtimingAttendanceTask
()
throws
ParseException
{
...
...
@@ -483,8 +483,9 @@ public class LastMonthtimingExport {
// List<String> rowData = new ArrayList<String>();
//遍历目前为止所有日期 结合该用户发起的审批进行结合
//1:加班 2:请假 3:出差 4:外出 5:补卡
int
u
=
0
;
int
u
=
0
,
p
=
1
;
for
(
String
num
:
range
)
{
String
sjs
=
""
,
qinjia
=
""
,
chuaca
=
""
,
waichu
=
""
,
buka
=
""
,
jiaban
=
""
;
if
(
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
)
&&
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
dkjtts
),
num
))
{
rowData
.
add
(
"休息并打卡"
);
}
else
if
(
ClockInTool
.
useArrayUtils
(
ClockInTool
.
deleteArrayNull
(
xxts
),
num
)){
...
...
@@ -533,24 +534,32 @@ public class LastMonthtimingExport {
else
{
company
=
"小时"
;
}
}
}
rowData
.
remove
(
u
);
rowData
.
add
(
u
,(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"请"
+
leavetype
+
lea
.
getDuration
()+
company
);
qinjia
=
"#"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"请"
+
leavetype
+
lea
.
getDuration
()+
company
;
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company);
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
travels
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
3
));
rowData
.
remove
(
u
);
rowData
.
add
(
u
,(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"出差"
+
lea
.
getDuration
()+
"天"
);
chuaca
=
"#"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"出差"
+
lea
.
getDuration
()+
"天"
;
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天");
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
goouts
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
4
));
rowData
.
remove
(
u
);
rowData
.
add
(
u
,(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"外出"
+
lea
.
getDuration
()+
"天"
);
waichu
=
"#"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"外出"
+
lea
.
getDuration
()+
"天"
;
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天");
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
cards
),
num
))
{
KqglAssoRelationSummary
lea
=
KqglAssoRelationSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoRelationSummary
>().
lambda
().
eq
(
KqglAssoRelationSummary:
:
getUserId
,
user
.
getEmpnum
()).
eq
(
KqglAssoRelationSummary:
:
getAppTime
,
num
).
eq
(
KqglAssoRelationSummary:
:
getApprovalType
,
5
));
rowData
.
remove
(
u
);
rowData
.
add
(
u
,
"已补卡:"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
));
// rowData.remove(u);
// rowData.add(u,"已补卡:"+(lea.getStartTime()).substring(5, 16));
buka
=
"#"
+
"已补卡:"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
);
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
overtimes
),
num
))
{
...
...
@@ -571,8 +580,10 @@ public class LastMonthtimingExport {
else
if
(
lea
.
getCompensateId
()
==
2
)
{
method
=
"转加班费"
;
}
else
{
method
=
"转调休或加班费"
;}
rowData
.
remove
(
u
);
rowData
.
add
(
u
,(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"加班"
+
lea
.
getDuration
()+
company
+
"["
+
method
+
"]"
);
jiaban
=
"#"
+(
lea
.
getStartTime
()).
substring
(
5
,
16
)
+
"到"
+
(
lea
.
getEndTime
()).
substring
(
5
,
16
)+
"加班"
+
lea
.
getDuration
()+
company
+
"["
+
method
+
"]"
;
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]");
//防止多运算
if
(
lea
.
getOrdernum
()
==
lea
.
getTotals
())
{
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
...
...
@@ -611,6 +622,19 @@ public class LastMonthtimingExport {
}
}
if
(
rowData
.
size
()
==
p
)
{
sjs
=
""
;
if
((
""
).
equals
(
qinjia
)
&&
(
""
).
equals
(
chuaca
)
&&
(
""
).
equals
(
waichu
)
&&
(
""
).
equals
(
buka
)
&&
(
""
).
equals
(
jiaban
))
{
sjs
=
rowData
.
get
(
u
);
}
else
{
sjs
=
rowData
.
get
(
u
)+
";"
;
}
}
rowData
.
remove
(
u
);
rowData
.
add
(
u
,
sjs
+
qinjia
+
chuaca
+
waichu
+
buka
+
jiaban
);
/****/
////////
...
...
@@ -670,6 +694,7 @@ public class LastMonthtimingExport {
u
++;
p
++;
}
}
else
{
for
(
String
num2
:
range
)
{
...
...
src/main/resources/mapping/kqgl/PunchRecordMapper.xml
View file @
c490a256
...
...
@@ -386,6 +386,8 @@
where dkjl.attime
>
= #{start}
and dkjl.attime
<
= #{end}
and dkjl.user_id = #{userId,jdbcType=INTEGER}
and dkjl.`status` != 0
and dkjl.sort != 0
ORDER BY dkjl.id ASC
</select>
...
...
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
View file @
c490a256
...
...
@@ -133,7 +133,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.emp_num = 1
2
-->
<!-- and emp.emp_num = 1
00083
-->
<!-- and emp.job_status != 3 -->
</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