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
b9193eb7
Commit
b9193eb7
authored
May 27, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
01a2690a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
33 deletions
+13
-33
dber/考勤管理.dmj
+0
-0
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+13
-33
No files found.
dber/考勤管理.dmj
View file @
b9193eb7
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
b9193eb7
...
...
@@ -51,13 +51,13 @@ import cn.timer.api.utils.DateUtil;
/**
* @author lal
*
*
考勤报表汇总数据
*/
@Component
@Lazy
public
class
AttendanceTaskTiming
implements
SchedulingConfigurer
{
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
//
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
static
String
tablename
=
null
;
@Autowired
...
...
@@ -125,7 +125,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
//逻辑
if
(
implement
)
{
System
.
err
.
println
(
"当前
时间:"
+
dateFormat
.
format
(
new
Date
()));
// System.err.println("
时间:" + dateFormat.format(new Date()));
Calendar
c
=
Calendar
.
getInstance
();
c
.
add
(
Calendar
.
MONTH
,
0
);
...
...
@@ -148,8 +148,8 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
KqglAssoMonthPunchSummary
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoMonthPunchSummary
>().
lambda
().
eq
(
KqglAssoMonthPunchSummary:
:
getBelongYear
,
year
).
eq
(
KqglAssoMonthPunchSummary:
:
getBelongMonth
,
month
));
//
for(int t = 0;t<orgcodelist.size();t++){
int
org_code
=
117
;
//
orgcodelist.get(t).getId();//企业组织代码
for
(
int
t
=
0
;
t
<
orgcodelist
.
size
();
t
++){
int
org_code
=
orgcodelist
.
get
(
t
).
getId
();
//企业组织代码
List
<
AdditionalDto
>
userlist
=
kqglassoleavebalancemapper
.
selectAdditionalList
(
org_code
);
for
(
AdditionalDto
user
:
userlist
)
{
double
traveltotal
=
0
,
egresstotal
=
0
,
overtimetotal
=
0
;
...
...
@@ -193,7 +193,6 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
//具体打卡时间入汇总表(打卡成功才会录入汇总表)
// KqglAssoMonthPunchSummary isyessum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda()
// .eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
String
[]
ycqts
=
new
String
[
31
];
//应上班的具体天数(yyyy-MM-dd)
String
[]
xxts
=
new
String
[
31
];
//休息的具体天数(yyyy-MM-dd)
List
<
String
>
rowData
=
new
ArrayList
<
String
>();
...
...
@@ -204,16 +203,12 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
double
workinghours
=
0
,
seriouslatetimes
=
0
,
seriouslatehours
=
0
,
absenlatetimes
=
0
;
// 迟到次数 迟到时长 早退次数 早退时长
int
latenum
=
0
,
latehours
=
0
,
leanum
=
0
,
leahours
=
0
;
// 迟到次数
double
workingturncompenleave
=
0
;
//工作日(转调休)
double
restturncompenleave
=
0
;
//休息日(转调休)
double
holidayturncompenleave
=
0
;
//节假日(转调休)
double
workingtransferovertime
=
0
;
//工作日(转加班费)
double
resttransferovertime
=
0
;
//休息日(转加班费)
double
holidaytransferovertime
=
0
;
//节假日(转加班费)
int
answer
=
0
;
//班次ID
//工作日(转调休)、休息日(转调休)、节假日(转调休)
double
workingturncompenleave
=
0
,
restturncompenleave
=
0
,
holidayturncompenleave
=
0
;
//工作日(转调休)
//工作日(转加班费)、休息日(转加班费)、节假日(转加班费)
double
workingtransferovertime
=
0
,
resttransferovertime
=
0
,
holidaytransferovertime
=
0
;
int
attgroid
=
0
;
if
(
attgro
!=
null
){
//该员工是否加入到考勤组 排班方式 1:固定排班;2:自由排班;3:自由工时 计算出应出勤,实际出勤,休息天数
attgroid
=
attgro
.
getId
();
// KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
...
...
@@ -221,7 +216,6 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
// double daysOff = 0,daysOnDuty = 0;//,actualAttDays = 0;
// int zjgzts = 0;//目前为止应该出勤的天数
if
(
attgro
.
getPbfs
()
==
1
){
//固定排班
List
<
KqglAssoTeshu
>
bxdklist
=
kqglassoteshumapper
.
ShouldSpecialDatessetByKqzid
(
attgro
.
getId
(),
ttstr
,
1
);
//当前月 必须打卡日期
int
bxdk
=
bxdklist
.
size
();
String
[]
bxdkss
=
new
String
[
bxdk
];
////特殊-必须打卡天数(工作日)
...
...
@@ -237,8 +231,6 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
appmaps
[
d1
]
=
spe
.
getTsrq
();
d1
++;
}
List
<
AttendanceWeeklySch
>
atwek
=
attendanceweeklyschmapper
.
selectAttendanceMadeByUserid
(
user
.
getEmpnum
());
String
[]
week
=
new
String
[
atwek
.
size
()];
String
[]
needfig
=
new
String
[
atwek
.
size
()];
//应打卡周期时间
...
...
@@ -296,7 +288,6 @@ 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
()];
...
...
@@ -445,9 +436,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
//排查请假是否在最后一次打卡范围内
List
<
KqglAssoRelationSummary
>
leainv
=
kqglassorelationsummarymapper
.
LeaveInvestigation
(
user
.
getEmpnum
(),
2
,
ttstr
);
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
String
beginTime
=
sdf1
.
format
(
new
Date
());
// List<String> rowData = new ArrayList<String>();
//遍历目前为止所有日期 结合该用户发起的审批进行结合
...
...
@@ -479,7 +468,6 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
}
rowData
.
add
(
lea
.
getStartTime
()
+
"到"
+
lea
.
getEndTime
()+
"请"
+
leavetype
+
lea
.
getDuration
()+
company
);
}
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
()+
"天"
);
...
...
@@ -490,7 +478,6 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
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
.
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
=
"无"
;
//加班单位、加班补偿方式
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
...
...
@@ -550,8 +537,6 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
}
/****************************************/
if
(
attgro
.
getPbfs
()
==
1
){
int
several
=
Integer
.
valueOf
(
ClockInTool
.
dateToWeek
(
num
));
//
KqglAssoTeshu
tesu
=
KqglAssoTeshu
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoTeshu
>().
lambda
().
eq
(
KqglAssoTeshu:
:
getKqzid
,
attgro
.
getId
()).
eq
(
KqglAssoTeshu:
:
getTsrq
,
num
));
...
...
@@ -580,8 +565,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
if
(
shif
!=
null
&&
shif
.
getSxbcs
()
!=
null
)
{
System
.
out
.
println
(
shif
.
getSxbcs
());
int
answer
=
shif
.
getSxbcs
();
//1=2次 2=4次 3=6次
answer
=
shif
.
getSxbcs
();
//1=2次 2=4次 3=6次
//未打最后一次卡的时候 判断最后一次打卡时间是否在请假范围内 相对应减少下班缺卡次数
//最后一次应打卡时间
String
latimeclock
=
""
;
...
...
@@ -611,7 +595,6 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
System
.
err
.
print
(
"该员工未加入考勤组"
);
}
String
[]
range1
=
ClockInTool
.
listToString
(
rowData
).
split
(
";"
);
String
[]
noticesArray
=
range1
[
0
].
split
(
","
);
noticesArray
=
ClockInTool
.
arrycopy
(
noticesArray
);
...
...
@@ -630,8 +613,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
}
KqglAssoMonthPunchSummary
summary
=
KqglAssoMonthPunchSummary
.
builder
().
name
(
user
.
getEmpname
()).
num
(
user
.
getEmpnum
()).
dept
(
department
)
.
post
(
position
).
attGroup
(
attgroid
).
build
();
.
post
(
position
).
attGroup
(
attgroid
).
shift
(
answer
).
build
();
summary
.
setDaysOnDuty
(
daysOnDuty
);
//应出勤天数
summary
.
setActualAttDays
(
Double
.
valueOf
(
dkjl
));
//实际出勤天数
summary
.
setDaysOff
(
daysOff
);
//休息天数
...
...
@@ -663,7 +645,6 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
summary
.
setWorkingTransferOvertime
(
workingtransferovertime
);
//工作日(转加班费)
summary
.
setRestTransferOvertime
(
resttransferovertime
);
//休息日(转加班费)
summary
.
setHolidayTransferOvertime
(
holidaytransferovertime
);
//节假日(转加班费)
summary
.
setDay1
(
noticesArray
[
0
]);
summary
.
setDay2
(
noticesArray
[
1
]);
summary
.
setDay3
(
noticesArray
[
2
]);
...
...
@@ -697,8 +678,7 @@ public class AttendanceTaskTiming implements SchedulingConfigurer {
summary
.
setDay31
(
noticesArray
[
30
]);
summary
.
insert
();
}
// }
}
// KqglTaskTiming.builder().task("AttendanceTask").id(sockid).executionStatus(0).lastExecutionTime(new Date().getTime()).build().updateById();
return
new
Exception
().
getStackTrace
()[
0
].
getMethodName
();
...
...
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