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
be458d01
Commit
be458d01
authored
Mar 06, 2025
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改异常考勤事假在绩效考核时变为请假的bug
parent
9cd604df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceLeaveRecordServiceImpl.java
...ndance/service/impl/AttendanceLeaveRecordServiceImpl.java
+19
-10
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceLeaveRecordServiceImpl.java
View file @
be458d01
...
@@ -46,10 +46,7 @@ import com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService;
...
@@ -46,10 +46,7 @@ import com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService;
import
org.springframework.util.StopWatch
;
import
org.springframework.util.StopWatch
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_ATTENDANCE_STAT_CACHE
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_ATTENDANCE_STAT_CACHE
;
...
@@ -277,11 +274,11 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
...
@@ -277,11 +274,11 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
String
leaveKey
=
cacheService
.
get
(
LEAVE_REIDS_KEY
+
redisKey
);
String
leaveKey
=
cacheService
.
get
(
LEAVE_REIDS_KEY
+
redisKey
);
if
(
StringUtils
.
isEmpty
(
leaveKey
))
{
if
(
StringUtils
.
isEmpty
(
leaveKey
))
{
cacheService
.
set
(
LEAVE_REIDS_KEY
+
redisKey
,
redisKey
,
300
);
//五分钟内不会重复
cacheService
.
set
(
LEAVE_REIDS_KEY
+
redisKey
,
redisKey
,
300
);
//五分钟内不会重复
PerformAttendRecordEntity
recordEntity
=
conversionLeaveRecord
(
entity
);
PerformAttendRecordEntity
recordEntity
=
conversionLeaveRecord
(
entity
,
multiple
);
recordEntity
.
setCreateTime
(
new
Date
());
recordEntity
.
setCreateTime
(
new
Date
());
recordEntity
.
setCreateUserId
(
1
l
);
recordEntity
.
setCreateUserId
(
1
l
);
recordEntity
.
setErrorTime
(
entity
.
getStartTime
());
recordEntity
.
setErrorTime
(
entity
.
getStartTime
());
recordEntity
.
setScore
(
recordEntity
.
getScore
().
multiply
(
new
BigDecimal
(
multiple
)));
//
recordEntity.setScore(recordEntity.getScore().multiply(new BigDecimal(multiple)));
performAttendRecordService
.
save
(
recordEntity
,
context
);
performAttendRecordService
.
save
(
recordEntity
,
context
);
}
}
}
}
...
@@ -300,7 +297,7 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
...
@@ -300,7 +297,7 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
}
}
private
PerformAttendRecordEntity
conversionLeaveRecord
(
AttendanceLeaveRecordEntity
entity
)
{
private
PerformAttendRecordEntity
conversionLeaveRecord
(
AttendanceLeaveRecordEntity
entity
,
int
multiple
)
{
PerformAttendRecordEntity
recordEntity
=
new
PerformAttendRecordEntity
();
PerformAttendRecordEntity
recordEntity
=
new
PerformAttendRecordEntity
();
recordEntity
.
initAttrValue
();
recordEntity
.
initAttrValue
();
StaffEntity
staffEntity
=
staffService
.
get
(
entity
.
getLeavePersonId
());
StaffEntity
staffEntity
=
staffService
.
get
(
entity
.
getLeavePersonId
());
...
@@ -318,17 +315,29 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
...
@@ -318,17 +315,29 @@ public class AttendanceLeaveRecordServiceImpl extends AbstractCRUDServiceImpl<At
recordEntity
.
setAttendanceGroupId
(
groupStaffEntity
.
getGroupId
());
recordEntity
.
setAttendanceGroupId
(
groupStaffEntity
.
getGroupId
());
recordEntity
.
setAttendanceGroupName
(
groupStaffEntity
.
getGroupName
());
recordEntity
.
setAttendanceGroupName
(
groupStaffEntity
.
getGroupName
());
}
}
PerformRulesEntity
performRulesEntity
=
performRulesService
.
selectOne
(
new
PerformRulesQuery
().
ruleCode
(
"ATTEND1009"
));
String
ruleCode
=
"ATTEND1009"
;
if
(
multiple
%
2
>
0
){
//奇数,半天
ruleCode
=
"ATTEND1010"
;
}
if
(
multiple
%
2
==
0
){
//偶数,全天
ruleCode
=
"ATTEND1011"
;
}
PerformRulesEntity
performRulesEntity
=
performRulesService
.
selectOne
(
new
PerformRulesQuery
().
ruleCode
(
ruleCode
));
if
(
performRulesEntity
!=
null
)
{
if
(
performRulesEntity
!=
null
)
{
recordEntity
.
setRuleId
(
performRulesEntity
.
getId
());
recordEntity
.
setRuleId
(
performRulesEntity
.
getId
());
recordEntity
.
setRuleName
(
performRulesEntity
.
getName
());
recordEntity
.
setRuleName
(
performRulesEntity
.
getName
());
recordEntity
.
setCategoryId
(
performRulesEntity
.
getCategoryId
());
recordEntity
.
setCategoryId
(
performRulesEntity
.
getCategoryId
());
recordEntity
.
setCategoryName
(
performRulesEntity
.
getCategoryName
());
recordEntity
.
setCategoryName
(
performRulesEntity
.
getCategoryName
());
recordEntity
.
setSubAddType
(
performRulesEntity
.
getSubAddType
());
recordEntity
.
setSubAddType
(
performRulesEntity
.
getSubAddType
());
recordEntity
.
setScore
(
performRulesEntity
.
getScore
());
if
(
ruleCode
.
equals
(
"ATTEND1011"
)){
int
m
=
multiple
/
2
;
recordEntity
.
setScore
(
performRulesEntity
.
getScore
().
multiply
(
new
BigDecimal
(
m
)));
}
else
{
recordEntity
.
setScore
(
performRulesEntity
.
getScore
().
multiply
(
new
BigDecimal
(
multiple
)));
}
recordEntity
.
setRemark
(
performRulesEntity
.
getContent
());
recordEntity
.
setRemark
(
performRulesEntity
.
getContent
());
}
else
{
}
else
{
throw
new
AppException
(
"没有查询到请假扣分规则:
ATTEND1009"
);
throw
new
AppException
(
"没有查询到请假扣分规则:
"
+
ruleCode
);
}
}
recordEntity
.
setSubMethod
(
SubMethodEnum
.
系统自动
.
getValue
());
recordEntity
.
setSubMethod
(
SubMethodEnum
.
系统自动
.
getValue
());
recordEntity
.
setDeductPerson
(
"系统管理员"
);
recordEntity
.
setDeductPerson
(
"系统管理员"
);
...
...
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