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
45f94f6a
Commit
45f94f6a
authored
Jan 31, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
14007a04
9868dd55
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
233 additions
and
28 deletions
+233
-28
attendance-performance-manager-ui/admin/src/views/check/attend/record/list.vue
...e-manager-ui/admin/src/views/check/attend/record/list.vue
+6
-6
attendance-performance-manager/src/main/java/com/mortals/xhx/common/pdu/WeightPdu.java
...r/src/main/java/com/mortals/xhx/common/pdu/WeightPdu.java
+19
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
...dule/check/service/impl/CheckAttendRecordServiceImpl.java
+43
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
...dule/check/service/impl/CheckEffectRecordServiceImpl.java
+42
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
...dule/check/service/impl/CheckGoworkRecordServiceImpl.java
+41
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
...dule/check/service/impl/CheckReviewRecordServiceImpl.java
+42
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckWindowWorkmanPerformServiceImpl.java
...ck/service/impl/CheckWindowWorkmanPerformServiceImpl.java
+40
-5
No files found.
attendance-performance-manager-ui/admin/src/views/check/attend/record/list.vue
View file @
45f94f6a
...
...
@@ -288,12 +288,12 @@ export default {
{
label
:
"
核查人员
"
,
prop
:
"
checkPerson
"
,
formatter
:
this
.
formatter
},
{
label
:
"
核查时间
"
,
prop
:
"
checkTime
"
,
width
:
150
,
formatter
:
this
.
formatterDate
,
},
//
{
//
label: "核查时间",
//
prop: "checkTime",
//
width: 150,
//
formatter: this.formatterDate,
//
},
{
label
:
"
分值
"
,
prop
:
"
score
"
,
formatter
:
this
.
formatter
},
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/common/pdu/WeightPdu.java
View file @
45f94f6a
...
...
@@ -2,12 +2,14 @@ package com.mortals.xhx.common.pdu;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* 权重pdu
*/
@Data
public
class
WeightPdu
{
private
static
BigDecimal
NUMBER_100
=
new
BigDecimal
(
100
);
/**
* 自评权重
*/
...
...
@@ -34,4 +36,20 @@ public class WeightPdu {
private
Integer
reviewWeight
=
20
;
public
BigDecimal
selfWeight
(){
return
new
BigDecimal
(
this
.
selfWeight
).
divide
(
NUMBER_100
);
}
public
BigDecimal
attendWeight
(){
return
new
BigDecimal
(
this
.
attendWeight
).
divide
(
NUMBER_100
);
}
public
BigDecimal
effectWeight
(){
return
new
BigDecimal
(
this
.
effectWeight
).
divide
(
NUMBER_100
);
}
public
BigDecimal
goworkWeight
(){
return
new
BigDecimal
(
this
.
goworkWeight
).
divide
(
NUMBER_100
);
}
public
BigDecimal
reviewWeight
(){
return
new
BigDecimal
(
this
.
reviewWeight
).
divide
(
NUMBER_100
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
View file @
45f94f6a
package
com.mortals.xhx.module.check.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
...
...
@@ -10,7 +11,9 @@ import com.mortals.framework.util.DateUtils;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.ThreadPool
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.pdu.WeightPdu
;
import
com.mortals.xhx.common.utils.AttendPostServiceThread
;
import
com.mortals.xhx.common.utils.AuditUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
...
...
@@ -48,6 +51,8 @@ import java.util.Calendar;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
/**
* CheckAttendRecordService
* 考勤绩效记录核查信息 service实现
...
...
@@ -79,6 +84,9 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
ParamService
paramService
;
@Override
protected
void
saveBefore
(
CheckAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
...
...
@@ -205,6 +213,13 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
}
List
<
StaffCheckSummaryVo
>
summaryVoList
=
dao
.
summaryCheck
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
summaryVoList
))
{
String
value
=
paramService
.
getValueByKey
(
SYS_PARAM_WEIGHT
);
WeightPdu
weightPdu
;
if
(
ObjectUtils
.
isEmpty
(
value
)){
weightPdu
=
new
WeightPdu
();
}
else
{
weightPdu
=
JSONObject
.
parseObject
(
value
,
WeightPdu
.
class
);
}
for
(
StaffCheckSummaryVo
vo
:
summaryVoList
)
{
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
staffPerformSummaryEntity
.
initAttrValue
();
...
...
@@ -239,8 +254,9 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
erro
));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setUpdateTime
(
new
Date
());
staffPerformSummaryService
.
update
(
staffPerformSummaryEntity
);
...
...
@@ -251,8 +267,9 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setErrorScore
(
vo
.
getSumScore
());
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
vo
.
getSumScore
()));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setCreateUserId
(
1
l
);
staffPerformSummaryEntity
.
setCreateTime
(
new
Date
());
staffPerformSummaryService
.
save
(
staffPerformSummaryEntity
);
...
...
@@ -406,4 +423,26 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeSummary
(
StaffPerformSummaryEntity
staffPerformSummaryEntity
,
WeightPdu
weightPdu
){
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
reviewScore
=
total
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
//评价
reviewScore
=
reviewScore
.
multiply
(
weightPdu
.
reviewWeight
());
BigDecimal
attendScore
=
total
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
//考勤
attendScore
=
attendScore
.
multiply
(
weightPdu
.
attendWeight
());
BigDecimal
otherScore
=
staffPerformSummaryEntity
.
getOtherScore
();
//自评不用加100
otherScore
=
otherScore
.
multiply
(
weightPdu
.
selfWeight
());
BigDecimal
goworkScore
=
total
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
//办件
goworkScore
=
goworkScore
.
multiply
(
weightPdu
.
goworkWeight
());
BigDecimal
effectScore
=
total
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
//效能
effectScore
=
effectScore
.
multiply
(
weightPdu
.
effectWeight
());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal
summary
=
new
BigDecimal
(
0
);
summary
=
summary
.
add
(
reviewScore
);
summary
=
summary
.
add
(
attendScore
);
summary
=
summary
.
add
(
otherScore
);
summary
=
summary
.
add
(
goworkScore
);
summary
=
summary
.
add
(
effectScore
);
staffPerformSummaryEntity
.
setTotalScore
(
summary
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
View file @
45f94f6a
package
com.mortals.xhx.module.check.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
...
...
@@ -9,7 +10,9 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.pdu.WeightPdu
;
import
com.mortals.xhx.common.utils.AuditUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckEffectRecordDao
;
...
...
@@ -48,6 +51,8 @@ import java.util.Calendar;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
/**
* CheckEffectRecordService
* 效能绩效核查信息 service实现
...
...
@@ -78,6 +83,8 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
ParamService
paramService
;
@Override
protected
void
saveBefore
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
...
@@ -200,6 +207,13 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
}
List
<
StaffCheckSummaryVo
>
summaryVoList
=
dao
.
summaryCheck
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
summaryVoList
)){
String
value
=
paramService
.
getValueByKey
(
SYS_PARAM_WEIGHT
);
WeightPdu
weightPdu
;
if
(
ObjectUtils
.
isEmpty
(
value
)){
weightPdu
=
new
WeightPdu
();
}
else
{
weightPdu
=
JSONObject
.
parseObject
(
value
,
WeightPdu
.
class
);
}
for
(
StaffCheckSummaryVo
vo:
summaryVoList
){
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
staffPerformSummaryEntity
.
initAttrValue
();
...
...
@@ -234,8 +248,9 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
erro
));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setUpdateTime
(
new
Date
());
staffPerformSummaryService
.
update
(
staffPerformSummaryEntity
);
...
...
@@ -249,8 +264,9 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
staffPerformSummaryEntity
.
setGoworkScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setErrorScore
(
vo
.
getSumScore
());
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
vo
.
getSumScore
()));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setCreateUserId
(
1
l
);
staffPerformSummaryEntity
.
setCreateTime
(
new
Date
());
staffPerformSummaryService
.
save
(
staffPerformSummaryEntity
);
...
...
@@ -404,4 +420,26 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeSummary
(
StaffPerformSummaryEntity
staffPerformSummaryEntity
,
WeightPdu
weightPdu
){
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
reviewScore
=
total
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
//评价
reviewScore
=
reviewScore
.
multiply
(
weightPdu
.
reviewWeight
());
BigDecimal
attendScore
=
total
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
//考勤
attendScore
=
attendScore
.
multiply
(
weightPdu
.
attendWeight
());
BigDecimal
otherScore
=
staffPerformSummaryEntity
.
getOtherScore
();
//自评不用加100
otherScore
=
otherScore
.
multiply
(
weightPdu
.
selfWeight
());
BigDecimal
goworkScore
=
total
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
//办件
goworkScore
=
goworkScore
.
multiply
(
weightPdu
.
goworkWeight
());
BigDecimal
effectScore
=
total
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
//效能
effectScore
=
effectScore
.
multiply
(
weightPdu
.
effectWeight
());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal
summary
=
new
BigDecimal
(
0
);
summary
=
summary
.
add
(
reviewScore
);
summary
=
summary
.
add
(
attendScore
);
summary
=
summary
.
add
(
otherScore
);
summary
=
summary
.
add
(
goworkScore
);
summary
=
summary
.
add
(
effectScore
);
staffPerformSummaryEntity
.
setTotalScore
(
summary
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
View file @
45f94f6a
package
com.mortals.xhx.module.check.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
...
...
@@ -9,7 +10,9 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.pdu.WeightPdu
;
import
com.mortals.xhx.common.utils.AuditUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckGoworkRecordDao
;
...
...
@@ -48,6 +51,8 @@ import java.util.Calendar;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
/**
* CheckGoworkRecordService
* 办件绩效核查信息 service实现
...
...
@@ -78,6 +83,8 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
ParamService
paramService
;
@Override
protected
void
saveBefore
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
...
@@ -197,6 +204,13 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
}
List
<
StaffCheckSummaryVo
>
summaryVoList
=
dao
.
summaryCheck
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
summaryVoList
)){
String
value
=
paramService
.
getValueByKey
(
SYS_PARAM_WEIGHT
);
WeightPdu
weightPdu
;
if
(
ObjectUtils
.
isEmpty
(
value
)){
weightPdu
=
new
WeightPdu
();
}
else
{
weightPdu
=
JSONObject
.
parseObject
(
value
,
WeightPdu
.
class
);
}
for
(
StaffCheckSummaryVo
vo:
summaryVoList
){
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
staffPerformSummaryEntity
.
initAttrValue
();
...
...
@@ -231,8 +245,9 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
erro
));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setUpdateTime
(
new
Date
());
staffPerformSummaryService
.
update
(
staffPerformSummaryEntity
);
...
...
@@ -246,8 +261,9 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setErrorScore
(
vo
.
getSumScore
());
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
vo
.
getSumScore
()));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setCreateUserId
(
1
l
);
staffPerformSummaryEntity
.
setCreateTime
(
new
Date
());
staffPerformSummaryService
.
save
(
staffPerformSummaryEntity
);
...
...
@@ -402,4 +418,25 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeSummary
(
StaffPerformSummaryEntity
staffPerformSummaryEntity
,
WeightPdu
weightPdu
){
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
reviewScore
=
total
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
//评价
reviewScore
=
reviewScore
.
multiply
(
weightPdu
.
reviewWeight
());
BigDecimal
attendScore
=
total
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
//考勤
attendScore
=
attendScore
.
multiply
(
weightPdu
.
attendWeight
());
BigDecimal
otherScore
=
staffPerformSummaryEntity
.
getOtherScore
();
//自评不用加100
otherScore
=
otherScore
.
multiply
(
weightPdu
.
selfWeight
());
BigDecimal
goworkScore
=
total
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
//办件
goworkScore
=
goworkScore
.
multiply
(
weightPdu
.
goworkWeight
());
BigDecimal
effectScore
=
total
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
//效能
effectScore
=
effectScore
.
multiply
(
weightPdu
.
effectWeight
());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal
summary
=
new
BigDecimal
(
0
);
summary
=
summary
.
add
(
reviewScore
);
summary
=
summary
.
add
(
attendScore
);
summary
=
summary
.
add
(
otherScore
);
summary
=
summary
.
add
(
goworkScore
);
summary
=
summary
.
add
(
effectScore
);
staffPerformSummaryEntity
.
setTotalScore
(
summary
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
View file @
45f94f6a
package
com.mortals.xhx.module.check.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.pdu.WeightPdu
;
import
com.mortals.xhx.common.utils.AuditUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
...
...
@@ -50,6 +53,8 @@ import java.util.Calendar;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
/**
* CheckReviewRecordService
* 评价差评绩效核查信息 service实现
...
...
@@ -81,6 +86,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
ParamService
paramService
;
@Override
protected
void
saveBefore
(
CheckReviewRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
...
@@ -202,6 +209,13 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
}
List
<
StaffCheckSummaryVo
>
summaryVoList
=
dao
.
summaryCheck
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
summaryVoList
))
{
String
value
=
paramService
.
getValueByKey
(
SYS_PARAM_WEIGHT
);
WeightPdu
weightPdu
;
if
(
ObjectUtils
.
isEmpty
(
value
)){
weightPdu
=
new
WeightPdu
();
}
else
{
weightPdu
=
JSONObject
.
parseObject
(
value
,
WeightPdu
.
class
);
}
for
(
StaffCheckSummaryVo
vo
:
summaryVoList
)
{
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
staffPerformSummaryEntity
.
initAttrValue
();
...
...
@@ -236,8 +250,9 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
erro
));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setUpdateTime
(
new
Date
());
staffPerformSummaryService
.
update
(
staffPerformSummaryEntity
);
...
...
@@ -251,8 +266,9 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setErrorScore
(
vo
.
getSumScore
());
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
vo
.
getSumScore
()));
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setCreateUserId
(
1
l
);
staffPerformSummaryEntity
.
setCreateTime
(
new
Date
());
staffPerformSummaryService
.
save
(
staffPerformSummaryEntity
);
...
...
@@ -406,4 +422,26 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
totalScore
=
totalScore
.
subtract
(
totalSubScore
);
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeSummary
(
StaffPerformSummaryEntity
staffPerformSummaryEntity
,
WeightPdu
weightPdu
){
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
reviewScore
=
total
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
//评价
reviewScore
=
reviewScore
.
multiply
(
weightPdu
.
reviewWeight
());
BigDecimal
attendScore
=
total
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
//考勤
attendScore
=
attendScore
.
multiply
(
weightPdu
.
attendWeight
());
BigDecimal
otherScore
=
staffPerformSummaryEntity
.
getOtherScore
();
//自评不用加100
otherScore
=
otherScore
.
multiply
(
weightPdu
.
selfWeight
());
BigDecimal
goworkScore
=
total
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
//办件
goworkScore
=
goworkScore
.
multiply
(
weightPdu
.
goworkWeight
());
BigDecimal
effectScore
=
total
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
//效能
effectScore
=
effectScore
.
multiply
(
weightPdu
.
effectWeight
());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal
summary
=
new
BigDecimal
(
0
);
summary
=
summary
.
add
(
reviewScore
);
summary
=
summary
.
add
(
attendScore
);
summary
=
summary
.
add
(
otherScore
);
summary
=
summary
.
add
(
goworkScore
);
summary
=
summary
.
add
(
effectScore
);
staffPerformSummaryEntity
.
setTotalScore
(
summary
);
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckWindowWorkmanPerformServiceImpl.java
View file @
45f94f6a
package
com.mortals.xhx.module.check.service.impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.pdu.WeightPdu
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckWindowPerformEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
...
...
@@ -25,6 +28,7 @@ import com.mortals.xhx.module.check.dao.CheckWindowWorkmanPerformDao;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity
;
import
com.mortals.xhx.module.check.service.CheckWindowWorkmanPerformService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
...
...
@@ -32,6 +36,8 @@ import java.util.Calendar;
import
java.util.Date
;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
/**
* CheckWindowWorkmanPerformService
* 窗口人员考核汇总核查 service实现
...
...
@@ -45,6 +51,8 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
@Autowired
private
StaffPerformSummaryService
staffPerformSummaryService
;
@Autowired
private
ParamService
paramService
;
@Override
public
void
examine
(
CheckWindowWorkmanPerformEntity
entity
,
Context
context
)
throws
AppException
{
...
...
@@ -75,6 +83,13 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
private
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
{
List
<
StaffCheckSummaryVo
>
summaryVoList
=
dao
.
summaryCheck
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
summaryVoList
))
{
String
value
=
paramService
.
getValueByKey
(
SYS_PARAM_WEIGHT
);
WeightPdu
weightPdu
;
if
(
ObjectUtils
.
isEmpty
(
value
)){
weightPdu
=
new
WeightPdu
();
}
else
{
weightPdu
=
JSONObject
.
parseObject
(
value
,
WeightPdu
.
class
);
}
for
(
StaffCheckSummaryVo
vo
:
summaryVoList
)
{
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
staffPerformSummaryEntity
.
initAttrValue
();
...
...
@@ -104,13 +119,12 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
BigDecimal
erro
=
new
BigDecimal
(
0
);
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getOtherScore
());
//
erro = erro.add(staffPerformSummaryEntity.getOtherScore());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
erro
=
erro
.
add
(
staffPerformSummaryEntity
.
getComplainScore
());
staffPerformSummaryEntity
.
setErrorScore
(
erro
);
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
erro
));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setUpdateTime
(
new
Date
());
staffPerformSummaryService
.
update
(
staffPerformSummaryEntity
);
...
...
@@ -124,8 +138,7 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setComplainScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setErrorScore
(
vo
.
getSumScore
());
BigDecimal
total
=
new
BigDecimal
(
100
);
staffPerformSummaryEntity
.
setTotalScore
(
total
.
add
(
vo
.
getSumScore
()));
computeSummary
(
staffPerformSummaryEntity
,
weightPdu
);
staffPerformSummaryEntity
.
setCreateUserId
(
1
l
);
staffPerformSummaryEntity
.
setCreateTime
(
new
Date
());
staffPerformSummaryService
.
save
(
staffPerformSummaryEntity
);
...
...
@@ -136,4 +149,26 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
return
summaryVoList
;
}
private
void
computeSummary
(
StaffPerformSummaryEntity
staffPerformSummaryEntity
,
WeightPdu
weightPdu
){
BigDecimal
total
=
new
BigDecimal
(
100
);
BigDecimal
reviewScore
=
total
.
add
(
staffPerformSummaryEntity
.
getReviewScore
());
//评价
reviewScore
=
reviewScore
.
multiply
(
weightPdu
.
reviewWeight
());
BigDecimal
attendScore
=
total
.
add
(
staffPerformSummaryEntity
.
getAttendScore
());
//考勤
attendScore
=
attendScore
.
multiply
(
weightPdu
.
attendWeight
());
BigDecimal
otherScore
=
staffPerformSummaryEntity
.
getOtherScore
();
//自评不用加100
otherScore
=
otherScore
.
multiply
(
weightPdu
.
selfWeight
());
BigDecimal
goworkScore
=
total
.
add
(
staffPerformSummaryEntity
.
getGoworkScore
());
//办件
goworkScore
=
goworkScore
.
multiply
(
weightPdu
.
goworkWeight
());
BigDecimal
effectScore
=
total
.
add
(
staffPerformSummaryEntity
.
getEffectScore
());
//效能
effectScore
=
effectScore
.
multiply
(
weightPdu
.
effectWeight
());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal
summary
=
new
BigDecimal
(
0
);
summary
=
summary
.
add
(
reviewScore
);
summary
=
summary
.
add
(
attendScore
);
summary
=
summary
.
add
(
otherScore
);
summary
=
summary
.
add
(
goworkScore
);
summary
=
summary
.
add
(
effectScore
);
staffPerformSummaryEntity
.
setTotalScore
(
summary
);
}
}
\ No newline at end of file
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