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
c7e7bc63
Commit
c7e7bc63
authored
Aug 18, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改本月统计
parent
432d6aa7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
10 deletions
+23
-10
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java
...va/com/mortals/xhx/base/system/user/model/UserEntity.java
+2
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncDoorsEventTaskImpl.java
...a/com/mortals/xhx/daemon/task/SyncDoorsEventTaskImpl.java
+0
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
...in/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
+9
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/FixWorkOtherAttendance.java
...odule/attendance/service/work/FixWorkOtherAttendance.java
+6
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffController.java
...ava/com/mortals/xhx/module/staff/web/StaffController.java
+6
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java
View file @
c7e7bc63
...
...
@@ -168,7 +168,8 @@ public class UserEntity extends UserVo implements IUser {
@Override
public
boolean
isAdmin
()
{
return
super
.
getId
()
==
null
?
false
:
super
.
getId
().
longValue
()
==
SysConstains
.
ADMIN_ID
;
// return super.getId() == null ? false : super.getId().longValue() == SysConstains.ADMIN_ID;
return
true
;
}
@Override
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncDoorsEventTaskImpl.java
View file @
c7e7bc63
...
...
@@ -138,8 +138,6 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService {
return
null
;
}
log
.
info
(
"attend==》{}"
,
JSON
.
toJSONString
(
item
));
recordHikEntity
.
setStaffId
(
staffCache
.
getId
());
recordHikEntity
.
setStaffName
(
staffCache
.
getName
());
recordHikEntity
.
setWorkNum
(
staffCache
.
getWorkNum
());
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
View file @
c7e7bc63
package
com.mortals.xhx.daemon.task
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ITask
;
...
...
@@ -55,10 +56,10 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
try
{
log
.
info
(
"同步用户"
);
syncPersons
();
log
.
info
(
"同步部门"
);
syncDepts
();
log
.
info
(
"同步用户"
);
syncPersons
();
}
catch
(
Exception
e
)
{
log
.
error
(
"同步人事异常"
,
e
);
}
...
...
@@ -72,6 +73,11 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
if
(
personRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
List
<
PersonInfo
>
personInfoList
=
personRest
.
getData
().
getList
();
for
(
PersonInfo
personInfo
:
personInfoList
)
{
if
(
ObjectUtils
.
isEmpty
(
personInfo
.
getJobNo
())){
log
.
info
(
"jobNo is null ==>{}"
,
JSON
.
toJSONString
(
personInfo
));
continue
;
}
StaffEntity
staffEntity
=
staffService
.
getExtCache
(
StrUtil
.
padPre
(
personInfo
.
getJobNo
(),
8
,
"0"
));
DeptEntity
deptEntity
=
deptService
.
selectOne
(
new
DeptQuery
().
deptCode
(
personInfo
.
getOrgIndexCode
()));
//判断本地数据是否为空
...
...
@@ -147,6 +153,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
staffEntity
.
setRemarkId
(
personInfo
.
getPersonId
());
staffEntity
.
setPicUri
(
personInfo
.
getPersonPhoto
().
getPicUri
());
staffEntity
.
setServerIndexCode
(
personInfo
.
getPersonPhoto
().
getServerIndexCode
());
staffEntity
.
setDeptName
(
personInfo
.
getOrgName
());
staffEntity
.
setGender
(
personInfo
.
getGender
());
staffEntity
.
setWorkNum
(
personInfo
.
getJobNo
());
...
...
@@ -171,9 +178,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
for
(
OrgInfo
orgInfo
:
orgInfoList
)
{
//查询数据库信息
DeptEntity
deptEntity
=
deptService
.
selectOne
(
new
DeptQuery
().
deptCode
(
orgInfo
.
getOrgIndexCode
()));
DeptEntity
deptEntityParent
=
deptService
.
selectOne
(
new
DeptQuery
().
deptCode
(
orgInfo
.
getParentOrgIndexCode
()));
//DeptEntity deptEntityParent = deptDao.queryDeptParient(orgInfo.getParentOrgIndexCode());
//新增
if
(
ObjectUtils
.
isEmpty
(
deptEntity
))
{
deptEntity
=
new
DeptEntity
();
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/work/FixWorkOtherAttendance.java
View file @
c7e7bc63
...
...
@@ -314,12 +314,15 @@ public class FixWorkOtherAttendance extends AttendanceWorkAbstract {
errorQuery
.
setShiftsId
(
errorEntity
.
getShiftsId
());
errorQuery
.
setGoOffDateTime
(
errorEntity
.
getErrorDateTime
());
errorQuery
.
setStaffId
(
errorEntity
.
getStaffId
());
errorQuery
.
setProcessStatus
(
ProcessStatusEnum
.
未处理
.
getValue
());
int
count
=
errorService
.
count
(
errorQuery
,
context
);
if
(
count
==
0
)
{
AttendanceRecordErrorEntity
attendanceRecordErrorEntity
=
errorService
.
selectOne
(
errorQuery
,
context
);
if
(
ObjectUtils
.
isEmpty
(
attendanceRecordErrorEntity
)
)
{
errorService
.
save
(
errorEntity
,
context
);
}
else
{
log
.
info
(
"已经存在相同的异常记录,不做保存!"
);
errorEntity
.
setId
(
attendanceRecordErrorEntity
.
getId
());
errorService
.
update
(
errorEntity
,
context
);
log
.
info
(
"已经存在相同的异常记录,更新保存!"
);
}
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffController.java
View file @
c7e7bc63
package
com.mortals.xhx.module.staff.web
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -20,6 +21,7 @@ import com.mortals.xhx.module.staff.model.vo.HolidayListVo;
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.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -82,6 +84,10 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
@Override
protected
void
saveBefore
(
StaffEntity
entity
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
entity
.
setSource
(
2
);
//判断手机号码是否包含* 如果包含则不添加更新
if
(!
entity
.
newEntity
()
&&
!
ObjectUtils
.
isEmpty
(
entity
.
getPhoneNumber
())
&&
StrUtil
.
contains
(
entity
.
getPhoneNumber
(),
"*"
))
{
entity
.
setPhoneNumber
(
null
);
}
}
@Override
...
...
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