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
dd107ff9
Commit
dd107ff9
authored
Mar 26, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改同步人员接口
parent
0a2b8d27
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
83 deletions
+76
-83
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
...in/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
+1
-5
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
...rtals/xhx/module/staff/service/impl/StaffServiceImpl.java
+62
-73
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffController.java
...ava/com/mortals/xhx/module/staff/web/StaffController.java
+13
-5
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
View file @
dd107ff9
...
...
@@ -100,12 +100,8 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
}
}
else
{
//todo 设备直连
deptService
.
syncDeptByDevice
(
null
);
// deptService.syncDeptByDevice(null);
staffService
.
syncPersonsByDevices
(
null
);
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
View file @
dd107ff9
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffController.java
View file @
dd107ff9
...
...
@@ -33,6 +33,7 @@ import com.mortals.xhx.module.staff.model.vo.StaffCheckAuthorizePdu;
import
com.mortals.xhx.module.staff.model.vo.StaffInfoVo
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -70,6 +71,9 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
@Autowired
private
AttendanceLeaveRecordService
leaveRecordService
;
@Value
(
"${hik.host:}"
)
protected
String
hikhost
;
public
StaffController
()
{
super
.
setModuleDesc
(
"员工基本信息"
);
...
...
@@ -227,11 +231,15 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
JSONObject
jsonObject
=
new
JSONObject
();
String
busiDesc
=
this
.
getModuleDesc
()
+
"同步"
;
try
{
//同步部门
deptService
.
syncDept
(
getContext
());
Rest
<
Void
>
rest
=
this
.
service
.
syncPersons
(
getContext
());
if
(
rest
.
getCode
()
==
YesNoEnum
.
NO
.
getValue
())
{
throw
new
AppException
(
"同步异常!"
);
if
(!
ObjectUtils
.
isEmpty
(
hikhost
))
{
//同步部门
deptService
.
syncDept
(
getContext
());
Rest
<
Void
>
rest
=
this
.
service
.
syncPersons
(
getContext
());
if
(
rest
.
getCode
()
==
YesNoEnum
.
NO
.
getValue
())
{
throw
new
AppException
(
"同步异常!"
);
}
}
else
{
this
.
service
.
syncPersonsByDevices
(
null
);
}
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
...
...
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