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
71c012ef
Commit
71c012ef
authored
Jul 09, 2024
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OtherCheck作为绩效总开关,启用时新增当月绩效初始值,关闭时删除当月绩效数据
parent
063db303
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
4 deletions
+37
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
...rtals/xhx/module/staff/service/impl/StaffServiceImpl.java
+37
-4
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
View file @
71c012ef
...
@@ -42,13 +42,12 @@ import com.mortals.xhx.module.hik.staff.service.IHikStaffService;
...
@@ -42,13 +42,12 @@ import com.mortals.xhx.module.hik.staff.service.IHikStaffService;
import
com.mortals.xhx.module.staff.dao.StaffDao
;
import
com.mortals.xhx.module.staff.dao.StaffDao
;
import
com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl
;
import
com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl
;
import
com.mortals.xhx.module.staff.dao.ibatis.StaffLeaveDaoImpl
;
import
com.mortals.xhx.module.staff.dao.ibatis.StaffLeaveDaoImpl
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.model.StaffLeaveEntity
;
import
com.mortals.xhx.module.staff.model.StaffLeaveQuery
;
import
com.mortals.xhx.module.staff.model.StaffQuery
;
import
com.mortals.xhx.module.staff.model.vo.StaffCheckAuthorizePdu
;
import
com.mortals.xhx.module.staff.model.vo.StaffCheckAuthorizePdu
;
import
com.mortals.xhx.module.staff.model.vo.StaffInfoVo
;
import
com.mortals.xhx.module.staff.model.vo.StaffInfoVo
;
import
com.mortals.xhx.module.staff.service.StaffLeaveService
;
import
com.mortals.xhx.module.staff.service.StaffLeaveService
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
...
@@ -58,6 +57,7 @@ import org.springframework.util.ObjectUtils;
...
@@ -58,6 +57,7 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -105,6 +105,8 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
...
@@ -105,6 +105,8 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
private
UploadService
uploadService
;
private
UploadService
uploadService
;
@Autowired
@Autowired
private
IHikFaceService
hikFaceService
;
private
IHikFaceService
hikFaceService
;
@Autowired
private
StaffPerformSummaryService
staffPerformSummaryService
;
@Override
@Override
protected
String
getExtKey
(
StaffEntity
data
)
{
protected
String
getExtKey
(
StaffEntity
data
)
{
...
@@ -495,6 +497,37 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
...
@@ -495,6 +497,37 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
if
(
context
.
getUser
()
!=
null
)
{
if
(
context
.
getUser
()
!=
null
)
{
update
.
setUpdateUserId
(
context
.
getUser
().
getId
());
update
.
setUpdateUserId
(
context
.
getUser
().
getId
());
}
}
//OtherCheck作为绩效总开关,启用时新增当月绩效初始值,关闭时删除当月绩效数据
Calendar
calendar
=
Calendar
.
getInstance
();
int
year
=
calendar
.
get
(
Calendar
.
YEAR
);
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)+
1
;
StaffPerformSummaryQuery
summaryQuery
=
new
StaffPerformSummaryQuery
();
summaryQuery
.
setStaffId
(
temp
.
getId
());
summaryQuery
.
setYear
(
year
);
summaryQuery
.
setMonth
(
month
);
StaffPerformSummaryEntity
tempSummary
=
staffPerformSummaryService
.
selectOne
(
summaryQuery
);
if
(
update
.
getOtherCheck
()
==
1
){
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
staffPerformSummaryEntity
.
initAttrValue
();
staffPerformSummaryEntity
.
setStaffId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setStaffName
(
temp
.
getName
());
staffPerformSummaryEntity
.
setDeptId
(
temp
.
getDeptId
());
staffPerformSummaryEntity
.
setDeptName
(
temp
.
getDeptName
());
staffPerformSummaryEntity
.
setSalaId
(
temp
.
getSalaId
());
staffPerformSummaryEntity
.
setSalaName
(
temp
.
getSalaName
());
staffPerformSummaryEntity
.
setYear
(
year
);
staffPerformSummaryEntity
.
setMonth
(
month
);
staffPerformSummaryEntity
.
setTotalScore
(
new
BigDecimal
(
100
));
staffPerformSummaryEntity
.
setCreateUserId
(
1
l
);
staffPerformSummaryEntity
.
setCreateTime
(
new
Date
());
if
(
tempSummary
==
null
)
{
staffPerformSummaryService
.
save
(
staffPerformSummaryEntity
);
}
}
else
{
if
(
tempSummary
!=
null
)
{
staffPerformSummaryService
.
remove
(
tempSummary
.
getId
(),
null
);
}
}
return
dao
.
update
(
update
);
return
dao
.
update
(
update
);
}
}
...
...
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