Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
67e21ccf
Commit
67e21ccf
authored
Jul 20, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改考勤汇总
parent
9a438c73
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
30 deletions
+2
-30
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
...in/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
+2
-30
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
View file @
67e21ccf
...
...
@@ -139,21 +139,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
attendanceStatEntity
.
setHomeLeave
(
balanceEntity
.
getHomeLeave
());
attendanceStatEntity
.
setPersonalLeave
(
balanceEntity
.
getPersonalLeaveDays
());
attendanceStatService
.
save
(
attendanceStatEntity
);
//统计各级部门员工数量 todo 优化统计
if
(!
ObjectUtils
.
isEmpty
(
deptEntity
.
getAncestors
()))
{
String
[]
split
=
deptEntity
.
getAncestors
().
split
(
","
,
2
);
if
(
split
.
length
>
1
)
{
String
ancestor
=
split
[
1
];
String
[]
ancestors
=
ancestor
.
split
(
","
);
for
(
String
newAncestor
:
ancestors
)
{
DeptEntity
deptEntity2
=
deptService
.
get
(
Long
.
valueOf
(
newAncestor
));
if
(
Objects
.
nonNull
(
deptEntity2
))
{
deptEntity2
.
setPersonNum
(
deptEntity2
.
getPersonNum
()
+
1
);
deptService
.
update
(
deptEntity2
);
}
}
}
}
}
else
{
//更新
if
(!
ObjectUtils
.
isEmpty
(
deptEntity
))
{
...
...
@@ -170,21 +156,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
staffEntity
.
setUpdateUserId
(
1L
);
staffEntity
.
setUpdateTime
(
new
Date
());
staffService
.
update
(
staffEntity
);
//统计各级部门员工数量
if
(!
ObjectUtils
.
isEmpty
(
deptEntity
.
getAncestors
()))
{
String
[]
split
=
deptEntity
.
getAncestors
().
split
(
","
,
2
);
if
(
split
.
length
>
1
){
String
ancestor
=
split
[
1
];
String
[]
ancestors
=
ancestor
.
split
(
","
);
for
(
String
newAncestor
:
ancestors
)
{
DeptEntity
deptEntity2
=
deptService
.
get
(
Long
.
valueOf
(
newAncestor
));
if
(
Objects
.
nonNull
(
deptEntity2
))
{
deptEntity2
.
setPersonNum
(
deptEntity2
.
getPersonNum
()
+
1
);
deptService
.
update
(
deptEntity2
);
}
}
}
}
}
}
}
...
...
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