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
d303d7c7
Commit
d303d7c7
authored
Jul 17, 2020
by
lal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
f592bbfc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
34 deletions
+32
-34
src/main/java/cn/timer/api/controller/LoginController.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+25
-31
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+6
-2
No files found.
src/main/java/cn/timer/api/controller/LoginController.java
View file @
d303d7c7
...
...
@@ -655,7 +655,7 @@ public class LoginController {
}
//加班基础设置
KqglAssoOvertimeBasics
.
builder
().
minimumUnit
(
3
).
modifyUserid
(
999
).
modifyTime
(
new
Date
().
getTime
()).
orgCode
(
qyzxEntInfoM
.
getId
());
KqglAssoOvertimeBasics
.
builder
().
minimumUnit
(
3
).
modifyUserid
(
999
).
modifyTime
(
new
Date
().
getTime
()).
orgCode
(
qyzxEntInfoM
.
getId
())
.
build
().
insert
()
;
// 绩效设置初始化
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
d303d7c7
...
...
@@ -115,9 +115,11 @@ public class AttendanceTaskTiming{
//3.添加定时任务 每四小时执行一次
// @Scheduled(cron = "0 0 */4 * * ?")
// @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
//typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 37 18 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?")
@Scheduled
(
cron
=
"0 30 19 * * ?"
)
//
@Scheduled(cron = "0 30 19 * * ?")
public
void
AttendanceTask
()
throws
ParseException
{
// boolean implement = false;
...
...
@@ -139,8 +141,6 @@ public class AttendanceTaskTiming{
//逻辑
if
(
implement
)
{
// System.err.println("时间:" + dateFormat.format(new Date()));
Calendar
c
=
Calendar
.
getInstance
();
c
.
add
(
Calendar
.
MONTH
,
0
);
c
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
//设置为1号,当前日期既为本月第一天
...
...
@@ -165,14 +165,24 @@ public class AttendanceTaskTiming{
int
year
=
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
);
int
month
=
Calendar
.
getInstance
().
get
(
Calendar
.
MONTH
)
+
1
;
int
summaryid
=
0
;
//汇总id
for
(
int
t
=
0
;
t
<
orgcodelist
.
size
();
t
++){
int
org_code
=
orgcodelist
.
get
(
t
).
getId
();
//企业组织代码
KqglAssoMonthPunchSummary
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoMonthPunchSummary
>().
lambda
().
eq
(
KqglAssoMonthPunchSummary:
:
getBelongYear
,
year
)
.
eq
(
KqglAssoMonthPunchSummary:
:
getBelongMonth
,
month
).
eq
(
KqglAssoMonthPunchSummary:
:
getOrgCode
,
org_code
));
List
<
AdditionalDto
>
userlist
=
kqglassoleavebalancemapper
.
selectAdditionalList
(
org_code
);
for
(
AdditionalDto
user
:
userlist
)
{
// KqglAssoMonthPunchSummary.builder().build().delete(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getBelongYear, year)
// .eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
KqglAssoMonthPunchSummary
sum
=
KqglAssoMonthPunchSummary
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoMonthPunchSummary
>().
lambda
().
eq
(
KqglAssoMonthPunchSummary:
:
getOrgCode
,
org_code
)
.
eq
(
KqglAssoMonthPunchSummary:
:
getBelongYear
,
year
).
eq
(
KqglAssoMonthPunchSummary:
:
getBelongMonth
,
month
).
eq
(
KqglAssoMonthPunchSummary:
:
getNum
,
user
.
getEmpnum
()));
if
(
sum
!=
null
)
{
summaryid
=
sum
.
getId
();
}
double
traveltotal
=
0
,
egresstotal
=
0
,
overtimetotal
=
0
;
//出差总时长
KqglAssoRelationSummary
travel
=
kqglassorelationsummarymapper
.
SecondaryValue
(
user
.
getEmpnum
(),
3
,
ttstr
);
...
...
@@ -545,31 +555,8 @@ public class AttendanceTaskTiming{
rowData
.
add
(
"正常"
);
}
}
/*
* else{ if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0)
* { rowData.add("上班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班缺卡,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0) {
* rowData.add("上班迟到"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("上班迟到,下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 &&
* Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("上班迟到,下班早退"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
* rowData.add("下班缺卡"); }else
* if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) {
* rowData.add("下班早退"); }else { rowData.add("正常"); } }
*/
}
if
(
ClockInTool
.
contains
(
ClockInTool
.
deleteArrayNull
(
leaves
),
num
))
{
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
=
"未知"
;
//请假类型
...
...
@@ -739,6 +726,8 @@ public class AttendanceTaskTiming{
position
=
user
.
getPosition
();
}
KqglAssoMonthPunchSummary
summary
=
KqglAssoMonthPunchSummary
.
builder
().
name
(
user
.
getEmpname
()).
num
(
user
.
getEmpnum
()).
dept
(
department
)
.
post
(
position
).
attGroup
(
attgroid
).
shift
(
answer
).
build
();
summary
.
setDaysOnDuty
(
daysOnDuty
);
//应出勤天数
...
...
@@ -803,7 +792,12 @@ public class AttendanceTaskTiming{
summary
.
setDay29
(
noticesArray
[
28
]);
summary
.
setDay30
(
noticesArray
[
29
]);
summary
.
setDay31
(
noticesArray
[
30
]);
summary
.
insert
();
if
(
summaryid
>
0
)
{
summary
.
setId
(
summaryid
);
}
summary
.
insertOrUpdate
();
}
}
...
...
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
d303d7c7
...
...
@@ -156,7 +156,8 @@ public class RouterUtils {
router
.
setExecute
(
EXECUTING
);
// if (r != null && RELATION_TYPE_USERS.equals(r.getType())) {
if
(
router
.
getRelation
().
size
()
>
0
)
{
// if (r != null && RELATION_TYPE_USERS.equals(r.getType())) {
List
<
User
>
listUser
=
router
.
getRelation
().
get
(
0
).
getUsers
();
user:
for
(
int
i
=
0
;
i
<
listUser
.
size
();
i
++)
{
...
...
@@ -174,7 +175,10 @@ public class RouterUtils {
}
}
// }
// }
}
else
{
throw
new
Exception
(
"审批人为空"
);
}
}
NextNode
(
router
.
getChildren
(),
obj
,
isFirse
,
isAuditNext
);
...
...
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