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
beba6113
Commit
beba6113
authored
Jul 18, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改考勤汇总
parent
7b738ddf
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
463 additions
and
77 deletions
+463
-77
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
...dule/check/service/impl/CheckAttendRecordServiceImpl.java
+29
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckComplainRecordServiceImpl.java
...le/check/service/impl/CheckComplainRecordServiceImpl.java
+68
-39
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
...dule/check/service/impl/CheckEffectRecordServiceImpl.java
+30
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
...dule/check/service/impl/CheckGoworkRecordServiceImpl.java
+30
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
...odule/check/service/impl/CheckOtherRecordServiceImpl.java
+29
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
...dule/check/service/impl/CheckReviewRecordServiceImpl.java
+40
-10
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformAttendRecordServiceImpl.java
.../perform/service/impl/PerformAttendRecordServiceImpl.java
+36
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformComplainRecordServiceImpl.java
...erform/service/impl/PerformComplainRecordServiceImpl.java
+35
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformEffectRecordServiceImpl.java
.../perform/service/impl/PerformEffectRecordServiceImpl.java
+49
-14
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformGoworkRecordServiceImpl.java
.../perform/service/impl/PerformGoworkRecordServiceImpl.java
+34
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformOtherRecordServiceImpl.java
...e/perform/service/impl/PerformOtherRecordServiceImpl.java
+34
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformReviewRecordServiceImpl.java
.../perform/service/impl/PerformReviewRecordServiceImpl.java
+49
-14
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
View file @
beba6113
...
...
@@ -28,6 +28,9 @@ import com.mortals.xhx.module.dept.service.DeptPerformStatService;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformReviewRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
...
...
@@ -71,6 +74,32 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformRulesService
rulesService
;
@Override
protected
void
saveBefore
(
CheckAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
CheckAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
CheckAttendRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
CheckAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
//发送钉钉通知信息
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckComplainRecordServiceImpl.java
View file @
beba6113
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
View file @
beba6113
...
...
@@ -15,6 +15,7 @@ import com.mortals.xhx.common.code.SubMethodEnum;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckEffectRecordDao
;
import
com.mortals.xhx.module.check.model.CheckComplainRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
...
...
@@ -27,6 +28,8 @@ import com.mortals.xhx.module.dept.service.DeptPerformStatService;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
...
...
@@ -70,6 +73,33 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformRulesService
rulesService
;
@Override
protected
void
saveBefore
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
CheckEffectRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
//发送钉钉通知信息
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
View file @
beba6113
...
...
@@ -15,6 +15,7 @@ import com.mortals.xhx.common.code.SubMethodEnum;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckGoworkRecordDao
;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
...
...
@@ -27,6 +28,8 @@ import com.mortals.xhx.module.dept.service.DeptPerformStatService;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
...
...
@@ -70,6 +73,33 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformRulesService
rulesService
;
@Override
protected
void
saveBefore
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
CheckGoworkRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
//发送钉钉通知信息
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
View file @
beba6113
...
...
@@ -11,6 +11,7 @@ import com.mortals.xhx.common.code.PerformTypeEnum;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckReviewRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
...
...
@@ -21,6 +22,8 @@ import com.mortals.xhx.module.dept.service.DeptPerformStatService;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
...
...
@@ -71,6 +74,32 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformRulesService
rulesService
;
@Override
protected
void
saveBefore
(
CheckOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
CheckOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
CheckOtherRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
CheckOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
View file @
beba6113
...
...
@@ -11,6 +11,7 @@ import com.mortals.xhx.common.code.PerformTypeEnum;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
...
...
@@ -23,6 +24,8 @@ import com.mortals.xhx.module.dingding.personal.model.req.workmsg.Link;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.Msg
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
...
...
@@ -73,6 +76,33 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
private
DeptService
deptService
;
@Autowired
private
PerformRulesService
rulesService
;
@Override
protected
void
saveBefore
(
CheckReviewRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
CheckReviewRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
CheckReviewRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
CheckReviewRecordEntity
entity
,
Context
context
)
throws
AppException
{
try
{
...
...
@@ -235,8 +265,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
StaffPerformStatEntity
>
performStatList
=
dao
.
getStaffPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
StaffPerformStatEntity
entity:
performStatList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
StaffPerformStatEntity
entity
:
performStatList
)
{
StaffPerformStatQuery
tempQuery
=
new
StaffPerformStatQuery
();
tempQuery
.
setStaffId
(
entity
.
getStaffId
());
tempQuery
.
setYear
(
entity
.
getYear
());
...
...
@@ -253,7 +283,7 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
statEntity
.
setReviewScoreSub
(
entity
.
getReviewScoreSub
());
computeStaff
(
statEntity
);
staffPerformStatService
.
update
(
statEntity
);
}
else
{
}
else
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
...
...
@@ -280,8 +310,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
DeptPerformStatEntity
>
performStatList
=
dao
.
getDeptPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
DeptPerformStatEntity
entity:
performStatList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
DeptPerformStatEntity
entity
:
performStatList
)
{
DeptPerformStatQuery
tempQuery
=
new
DeptPerformStatQuery
();
tempQuery
.
setDeptId
(
entity
.
getDeptId
());
tempQuery
.
setYear
(
entity
.
getYear
());
...
...
@@ -298,7 +328,7 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
statEntity
.
setReviewScoreSub
(
entity
.
getReviewScoreSub
());
computeDept
(
statEntity
);
deptPerformStatService
.
update
(
statEntity
);
}
else
{
}
else
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
...
...
@@ -312,7 +342,7 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
}
}
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
){
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
)
{
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
...
...
@@ -335,14 +365,14 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeDept
(
DeptPerformStatEntity
statEntity
){
private
void
computeDept
(
DeptPerformStatEntity
statEntity
)
{
DeptEntity
deptEntity
=
deptService
.
get
(
statEntity
.
getDeptId
());
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
if
(
deptEntity
!=
null
)
{
if
(
deptEntity
!=
null
)
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
deptEntity
.
getPersonNum
()));
}
else
{
}
else
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
10
));
}
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformAttendRecordServiceImpl.java
View file @
beba6113
...
...
@@ -5,6 +5,12 @@ import com.mortals.xhx.common.code.SubMethodEnum;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckAttendRecordEntity
;
import
com.mortals.xhx.module.check.service.CheckAttendRecordService
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -15,6 +21,7 @@ import com.mortals.xhx.module.perform.dao.PerformAttendRecordDao;
import
com.mortals.xhx.module.perform.model.PerformAttendRecordEntity
;
import
com.mortals.xhx.module.perform.service.PerformAttendRecordService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
...
...
@@ -31,6 +38,35 @@ public class PerformAttendRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
@Autowired
private
CheckAttendRecordService
checkAttendRecordService
;
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
StaffService
staffService
;
@Override
protected
void
saveBefore
(
PerformAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
PerformAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
PerformAttendRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
PerformAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformComplainRecordServiceImpl.java
View file @
beba6113
...
...
@@ -4,6 +4,11 @@ import com.mortals.xhx.common.code.SubMethodEnum;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckComplainRecordEntity
;
import
com.mortals.xhx.module.check.service.CheckComplainRecordService
;
import
com.mortals.xhx.module.perform.model.PerformAttendRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -14,6 +19,7 @@ import com.mortals.xhx.module.perform.dao.PerformComplainRecordDao;
import
com.mortals.xhx.module.perform.model.PerformComplainRecordEntity
;
import
com.mortals.xhx.module.perform.service.PerformComplainRecordService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
...
...
@@ -31,6 +37,35 @@ public class PerformComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Pe
@Autowired
private
CheckComplainRecordService
checkComplainRecordService
;
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
StaffService
staffService
;
@Override
protected
void
saveBefore
(
PerformComplainRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
PerformComplainRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
PerformComplainRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
PerformComplainRecordEntity
entity
,
Context
context
)
throws
AppException
{
CheckComplainRecordEntity
checkComplainRecordEntity
=
new
CheckComplainRecordEntity
();
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformEffectRecordServiceImpl.java
View file @
beba6113
package
com.mortals.xhx.module.perform.service.impl
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
import
com.mortals.xhx.module.check.service.CheckEffectRecordService
;
import
com.mortals.xhx.module.perform.model.PerformComplainRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -14,16 +20,17 @@ import com.mortals.xhx.module.perform.dao.PerformEffectRecordDao;
import
com.mortals.xhx.module.perform.model.PerformEffectRecordEntity
;
import
com.mortals.xhx.module.perform.service.PerformEffectRecordService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
/**
* PerformEffectRecordService
* 效能绩效记录信息 service实现
*
* @author zxfei
* @date 2023-07-11
*/
* PerformEffectRecordService
* 效能绩效记录信息 service实现
*
* @author zxfei
* @date 2023-07-11
*/
@Service
(
"performEffectRecordService"
)
@Slf4j
public
class
PerformEffectRecordServiceImpl
extends
AbstractCRUDServiceImpl
<
PerformEffectRecordDao
,
PerformEffectRecordEntity
,
Long
>
implements
PerformEffectRecordService
{
...
...
@@ -31,33 +38,61 @@ public class PerformEffectRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
@Autowired
private
CheckEffectRecordService
checkEffectRecordService
;
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
StaffService
staffService
;
@Override
protected
void
saveBefore
(
PerformEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
PerformEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
PerformEffectRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
PerformEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
CheckEffectRecordEntity
checkEffectRecordEntity
=
new
CheckEffectRecordEntity
();
checkEffectRecordEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
checkEffectRecordEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
BeanUtils
.
copyProperties
(
entity
,
checkEffectRecordEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
checkEffectRecordEntity
.
setId
(
null
);
checkEffectRecordEntity
.
setRecordId
(
entity
.
getId
());
if
(
entity
.
getSubMethod
()==
SubMethodEnum
.
系统自动
.
getValue
())
{
if
(
entity
.
getSubMethod
()
==
SubMethodEnum
.
系统自动
.
getValue
())
{
checkEffectRecordEntity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//自动扣分相设置为已处理
checkEffectRecordEntity
.
setCheckTime
(
new
Date
());
}
else
{
}
else
{
checkEffectRecordEntity
.
setCheckStatus
(
CheckStatusEnum
.
未处理
.
getValue
());
//非自动扣分相设置为未处理
}
checkEffectRecordService
.
save
(
checkEffectRecordEntity
,
context
);
checkEffectRecordService
.
save
(
checkEffectRecordEntity
,
context
);
}
@Override
public
void
updateProcessStatus
(
Long
id
,
Integer
status
)
throws
AppException
{
if
(
id
==
null
)
{
if
(
id
==
null
)
{
throw
new
AppException
(
"效能绩效记录Id不能为空"
);
}
PerformEffectRecordEntity
entity
=
this
.
get
(
id
);
if
(
entity
==
null
)
{
if
(
entity
==
null
)
{
throw
new
AppException
(
"无效的效能绩效记录Id"
);
}
if
(
status
==
null
)
{
status
=
1
;
//处理状态(1.未核查,2.已核查)
if
(
status
==
null
)
{
status
=
1
;
//处理状态(1.未核查,2.已核查)
}
PerformEffectRecordEntity
update
=
new
PerformEffectRecordEntity
();
update
.
setId
(
id
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformGoworkRecordServiceImpl.java
View file @
beba6113
...
...
@@ -4,6 +4,11 @@ import com.mortals.xhx.common.code.SubMethodEnum;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.service.CheckGoworkRecordService
;
import
com.mortals.xhx.module.perform.model.PerformEffectRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -14,6 +19,7 @@ import com.mortals.xhx.module.perform.dao.PerformGoworkRecordDao;
import
com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity
;
import
com.mortals.xhx.module.perform.service.PerformGoworkRecordService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
...
...
@@ -31,6 +37,34 @@ public class PerformGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
@Autowired
private
CheckGoworkRecordService
checkGoworkRecordService
;
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
StaffService
staffService
;
@Override
protected
void
saveBefore
(
PerformGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
PerformGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
PerformGoworkRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
PerformGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
CheckGoworkRecordEntity
checkGoworkRecordEntity
=
new
CheckGoworkRecordEntity
();
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformOtherRecordServiceImpl.java
View file @
beba6113
...
...
@@ -4,6 +4,11 @@ import com.mortals.xhx.common.code.SubMethodEnum;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
import
com.mortals.xhx.module.check.service.CheckOtherRecordService
;
import
com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -14,6 +19,7 @@ import com.mortals.xhx.module.perform.dao.PerformOtherRecordDao;
import
com.mortals.xhx.module.perform.model.PerformOtherRecordEntity
;
import
com.mortals.xhx.module.perform.service.PerformOtherRecordService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
...
...
@@ -31,6 +37,34 @@ public class PerformOtherRecordServiceImpl extends AbstractCRUDServiceImpl<Perfo
@Autowired
private
CheckOtherRecordService
checkOtherRecordService
;
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
StaffService
staffService
;
@Override
protected
void
saveBefore
(
PerformOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
PerformOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
PerformOtherRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
PerformOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
CheckOtherRecordEntity
checkOtherRecordEntity
=
new
CheckOtherRecordEntity
();
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformReviewRecordServiceImpl.java
View file @
beba6113
package
com.mortals.xhx.module.perform.service.impl
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckReviewRecordEntity
;
import
com.mortals.xhx.module.check.service.CheckReviewRecordService
;
import
com.mortals.xhx.module.perform.model.PerformOtherRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -14,16 +20,17 @@ import com.mortals.xhx.module.perform.dao.PerformReviewRecordDao;
import
com.mortals.xhx.module.perform.model.PerformReviewRecordEntity
;
import
com.mortals.xhx.module.perform.service.PerformReviewRecordService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
/**
* PerformReviewRecordService
* 评价差评绩效记录信息 service实现
*
* @author zxfei
* @date 2023-07-11
*/
* PerformReviewRecordService
* 评价差评绩效记录信息 service实现
*
* @author zxfei
* @date 2023-07-11
*/
@Service
(
"performReviewRecordService"
)
@Slf4j
public
class
PerformReviewRecordServiceImpl
extends
AbstractCRUDServiceImpl
<
PerformReviewRecordDao
,
PerformReviewRecordEntity
,
Long
>
implements
PerformReviewRecordService
{
...
...
@@ -31,33 +38,61 @@ public class PerformReviewRecordServiceImpl extends AbstractCRUDServiceImpl<Perf
@Autowired
private
CheckReviewRecordService
checkReviewRecordService
;
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
StaffService
staffService
;
@Override
protected
void
saveBefore
(
PerformReviewRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
@Override
protected
void
updateBefore
(
PerformReviewRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
}
private
void
updateStaffRuleNames
(
PerformReviewRecordEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRuleId
()))
{
PerformRulesEntity
rulesEntity
=
rulesService
.
getCache
(
entity
.
getRuleId
().
toString
());
entity
.
setRuleName
(
rulesEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getStaffId
()))
{
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
entity
.
setStaffName
(
staffCache
==
null
?
""
:
staffCache
.
getName
());
entity
.
setDeptName
(
staffCache
==
null
?
""
:
staffCache
.
getDeptName
());
}
}
@Override
protected
void
saveAfter
(
PerformReviewRecordEntity
entity
,
Context
context
)
throws
AppException
{
CheckReviewRecordEntity
checkReviewRecordEntity
=
new
CheckReviewRecordEntity
();
BeanUtils
.
copyProperties
(
entity
,
checkReviewRecordEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
BeanUtils
.
copyProperties
(
entity
,
checkReviewRecordEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
checkReviewRecordEntity
.
setId
(
null
);
checkReviewRecordEntity
.
setRecordId
(
entity
.
getId
());
if
(
entity
.
getSubMethod
()==
SubMethodEnum
.
系统自动
.
getValue
())
{
if
(
entity
.
getSubMethod
()
==
SubMethodEnum
.
系统自动
.
getValue
())
{
checkReviewRecordEntity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//自动扣分相设置为已处理
checkReviewRecordEntity
.
setCheckTime
(
new
Date
());
}
else
{
}
else
{
checkReviewRecordEntity
.
setCheckStatus
(
CheckStatusEnum
.
未处理
.
getValue
());
//非自动扣分相设置为未处理
}
checkReviewRecordService
.
save
(
checkReviewRecordEntity
,
context
);
checkReviewRecordService
.
save
(
checkReviewRecordEntity
,
context
);
}
@Override
public
void
updateProcessStatus
(
Long
id
,
Integer
status
)
throws
AppException
{
if
(
id
==
null
)
{
if
(
id
==
null
)
{
throw
new
AppException
(
"评价差评绩效记录Id不能为空"
);
}
PerformReviewRecordEntity
entity
=
this
.
get
(
id
);
if
(
entity
==
null
)
{
if
(
entity
==
null
)
{
throw
new
AppException
(
"无效的评价差评绩效记录Id"
);
}
if
(
status
==
null
)
{
status
=
1
;
//处理状态(1.未核查,2.已核查)
if
(
status
==
null
)
{
status
=
1
;
//处理状态(1.未核查,2.已核查)
}
PerformReviewRecordEntity
update
=
new
PerformReviewRecordEntity
();
update
.
setId
(
id
);
...
...
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