Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
bc7eba2a
Commit
bc7eba2a
authored
Jun 12, 2020
by
tangzhaoqian
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效管理优化、bug修复、测试
parent
fc873d2f
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
435 additions
and
112 deletions
+435
-112
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisal.java
+9
-2
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalAssessment.java
+1
-1
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalIndicators.java
+3
-0
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalIndicatorsT.java
+3
-0
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalT.java
+2
-0
src/main/java/cn/timer/api/bean/jxgl/JxglPerformanceAppraisal.java
+22
-1
src/main/java/cn/timer/api/config/enuminterface/JxglEnumInterface.java
+1
-1
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
+247
-69
src/main/java/cn/timer/api/controller/jxgl/service/JxglService.java
+4
-0
src/main/java/cn/timer/api/controller/jxgl/service/JxglServiceImpl.java
+16
-0
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+20
-4
src/main/java/cn/timer/api/dto/jxgl/AppraisalDetail.java
+11
-1
src/main/java/cn/timer/api/dto/jxgl/EmpAppraisalQuery.java
+1
-5
src/main/java/cn/timer/api/dto/jxgl/EmpPerformanceQuery.java
+0
-4
src/main/java/cn/timer/api/dto/jxgl/PerformanceAppraisal.java
+4
-4
src/main/resources/mapping/jxgl/JxglAppraisalIndicatorsMapper.xml
+10
-0
src/main/resources/mapping/jxgl/JxglAppraisalIndicatorsTMapper.xml
+10
-0
src/main/resources/mapping/jxgl/JxglAppraisalMapper.xml
+51
-15
src/main/resources/mapping/jxgl/JxglAppraisalTMapper.xml
+2
-0
src/main/resources/mapping/jxgl/JxglPerformanceAppraisalMapper.xml
+17
-4
src/main/resources/mapping/jxgl/JxglProcessNodeMapper.xml
+1
-1
No files found.
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisal.java
View file @
bc7eba2a
...
...
@@ -66,6 +66,12 @@ public class JxglAppraisal extends Model<JxglAppraisal> {
@ApiModelProperty
(
value
=
"状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7归档"
,
example
=
"0"
)
private
Integer
sts
;
@ApiModelProperty
(
value
=
"总分"
,
example
=
"0"
)
private
Double
total
;
@ApiModelProperty
(
value
=
"等级"
,
example
=
"0"
)
private
String
level
;
// 已归档绩效
@TableField
(
exist
=
false
)
private
Integer
archivedPNum
;
...
...
@@ -99,9 +105,10 @@ public class JxglAppraisal extends Model<JxglAppraisal> {
@TableField
(
exist
=
false
)
private
String
executorName
;
@TableField
(
exist
=
false
)
private
Double
comprehensiveScore
;
private
Integer
executorId
;
@TableField
(
exist
=
false
)
private
String
level
;
private
Integer
noteSts
;
@TableField
(
exist
=
false
)
private
String
confirmor
;
...
...
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalAssessment.java
View file @
bc7eba2a
...
...
@@ -55,7 +55,7 @@ public class JxglAppraisalAssessment extends Model<JxglAppraisalAssessment> {
@NotBlank
(
message
=
ValidationMsg
.
NOTBLANK
)
@ApiModelProperty
(
value
=
"综合评分"
,
example
=
"综合评分"
)
private
String
comprehensiveScore
;
private
Double
comprehensiveScore
;
@ApiModelProperty
(
value
=
"评语"
,
example
=
"评语"
)
private
String
remarks
;
...
...
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalIndicators.java
View file @
bc7eba2a
...
...
@@ -47,6 +47,9 @@ public class JxglAppraisalIndicators extends Model<JxglAppraisalIndicators> {
@ApiModelProperty
(
value
=
"标题"
,
example
=
"标题"
)
private
String
title
;
@ApiModelProperty
(
value
=
"内容"
,
example
=
"内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"权重 整数,单位%"
,
example
=
"10"
)
private
Integer
weight
;
...
...
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalIndicatorsT.java
View file @
bc7eba2a
...
...
@@ -48,6 +48,9 @@ public class JxglAppraisalIndicatorsT extends Model<JxglAppraisalIndicatorsT> {
@ApiModelProperty
(
value
=
"标题"
,
example
=
"标题"
)
private
String
title
;
@ApiModelProperty
(
value
=
"内容"
,
example
=
"内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"权重 整数,单位%"
,
example
=
"10"
)
private
Integer
weight
;
...
...
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalT.java
View file @
bc7eba2a
...
...
@@ -66,6 +66,8 @@ public class JxglAppraisalT extends Model<JxglAppraisalT> {
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2020-10-10 10:10:10"
)
private
Date
updateTime
;
@Min
(
value
=
0
,
message
=
ValidationMsg
.
MIN
)
@Max
(
value
=
1
,
message
=
ValidationMsg
.
MAX
)
@ApiModelProperty
(
value
=
"是否可编辑 限制员工的权限"
,
example
=
"0"
)
private
Integer
isEdit
;
...
...
src/main/java/cn/timer/api/bean/jxgl/JxglPerformanceAppraisal.java
View file @
bc7eba2a
...
...
@@ -66,9 +66,12 @@ public class JxglPerformanceAppraisal extends Model<JxglPerformanceAppraisal> {
@ApiModelProperty
(
value
=
"范围"
,
example
=
"部门名称、被考核人名称"
)
private
String
scope
;
@ApiModelProperty
(
value
=
"考核模板名称"
,
example
=
"考
评组
名称"
)
@ApiModelProperty
(
value
=
"考核模板名称"
,
example
=
"考
核模板
名称"
)
private
String
appraisalTName
;
@ApiModelProperty
(
value
=
"考核模板id"
,
example
=
"考核模板id"
)
private
Integer
appraisalTId
;
@ApiModelProperty
(
value
=
"考核人数 考核人数"
,
example
=
"10"
)
private
Integer
appraisalPersonNum
;
...
...
@@ -98,6 +101,24 @@ public class JxglPerformanceAppraisal extends Model<JxglPerformanceAppraisal> {
@TableField
(
exist
=
false
)
private
Integer
performanceArchive
;
/**
* 考核完成
*/
@TableField
(
exist
=
false
)
private
Integer
assessmentComplete
;
/**
* 终止考核
*/
@TableField
(
exist
=
false
)
private
Integer
terminationAssessment
;
/**
* 考核节点状态
*/
@TableField
(
exist
=
false
)
private
Integer
noteSts
;
@TableField
(
exist
=
false
)
private
JxglAppraisal
appraisal
;
...
...
src/main/java/cn/timer/api/config/enuminterface/JxglEnumInterface.java
View file @
bc7eba2a
...
...
@@ -104,7 +104,7 @@ public interface JxglEnumInterface {
SELF_ASSESSMENT
(
2
,
"自评"
),
SUPERIOR_SCORE
(
3
,
"上级评分"
),
RESULT_VERIFICATION
(
4
,
"结果确认"
),
ASSESSMENT_COMPLETE
(
5
,
"考核完成"
),
TERMINATION_ASSESSMENT
(
6
,
"终止考核"
),
PERFORMANCE_ARCHIVE
(
7
,
"绩效归档"
);
private
Integer
type
;
private
String
name
;
...
...
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
View file @
bc7eba2a
...
...
@@ -29,7 +29,9 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.annotation.Role
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.jxgl.JxglAppraisal
;
import
cn.timer.api.bean.jxgl.JxglAppraisalAssessment
;
import
cn.timer.api.bean.jxgl.JxglAppraisalIndicators
;
...
...
@@ -60,6 +62,7 @@ import cn.timer.api.config.enuminterface.JxglEnumInterface.ProcessNodeSts;
import
cn.timer.api.config.enuminterface.JxglEnumInterface.ProcessType
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.config.validation.ValidList
;
import
cn.timer.api.controller.jxgl.service.JxglService
;
import
cn.timer.api.controller.yggl.service.YgglService
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dao.jxgl.JxglAppraisalAssessmentMapper
;
...
...
@@ -189,7 +192,7 @@ public class JxglController {
basicSetting
.
setOrgCode
(
orgCode
);
basicSetting
.
insert
();
if
(
listPr
!=
null
&&
listPr
.
size
()
>
0
)
{
if
(
listPr
!=
null
&&
!
listPr
.
isEmpty
()
)
{
listPr
.
stream
().
forEach
(
pr
->
pr
.
setBasicSettingId
(
basicSetting
.
getId
()));
int
i
=
jxglPerformanceRatingMapper
.
insertList
(
listPr
);
}
...
...
@@ -198,6 +201,9 @@ public class JxglController {
}
@Autowired
JxglService
jxglService
;
/**
* 查询-基础设置
*/
...
...
@@ -207,7 +213,7 @@ public class JxglController {
@Role
public
Result
<
Object
>
selectAT
(
@CurrentUser
UserBean
userBean
)
{
JxglBasicSetting
bS
=
jxgl
BasicSettingMapper
.
selectAll
(
userBean
.
getOrgCode
());
JxglBasicSetting
bS
=
jxgl
Service
.
selectAT
(
userBean
.
getOrgCode
());
return
ResultUtil
.
data
(
bS
);
...
...
@@ -254,12 +260,13 @@ public class JxglController {
if
(
aITs
!=
null
&&
aITs
.
size
()
>
0
)
{
for
(
JxglAppraisalIndicatorsT
aIT
:
aITs
)
{
if
(
aIT
.
getIsEditWeight
()
==
null
)
{
throw
new
CustomException
(
"权重编辑权限未设置"
);
}
//
if (aIT.getIsEditWeight() == null) {
//
throw new CustomException("权重编辑权限未设置");
//
}
if
(
aIT
.
getType
()
==
null
)
{
throw
new
CustomException
(
"指标类型未设置"
);
}
aIT
.
setWeight
(
aIT
.
getWeight
()
==
null
?
0
:
aIT
.
getWeight
());
aIT
.
setAppraisalTId
(
jxglAppraisalT
.
getId
());
// 新增 考核指标模板
if
(
aIT
.
insert
())
{
...
...
@@ -339,10 +346,11 @@ public class JxglController {
@Validated
@RequestBody
PerformanceAppraisal
performanceAppraisal
)
throws
Exception
{
Integer
orgCode
=
userBean
.
getOrgCode
();
JxglPerformanceAppraisal
pA
=
JxglPerformanceAppraisal
.
builder
().
build
();
BeanUtil
.
copyProperties
(
performanceAppraisal
,
pA
,
"processNode"
,
"beingAppraisalPerson"
,
"appraisalTId"
);
BeanUtil
.
copyProperties
(
performanceAppraisal
,
pA
,
"processNode"
,
"beingAppraisalPerson"
);
List
<
ProcessNode
>
listPN
=
performanceAppraisal
.
getProcessNode
();
List
<
BeingAppraisalPerson
>
listBAP
=
performanceAppraisal
.
getBeingAppraisalPerson
();
pA
.
setSts
(
PerformanceAppraisalSts
.
TARGET_SETING
.
getType
());
pA
.
setOrgCode
(
orgCode
);
pA
.
setProcessNode
(
ObjectUtil
.
serialize
(
listPN
));
pA
.
setBeingAppraisalPerson
(
ObjectUtil
.
serialize
(
listBAP
));
...
...
@@ -398,6 +406,7 @@ public class JxglController {
// 考核
appraisal
.
setPerformanceAppraisalId
(
pA
.
getId
());
appraisal
.
setEmpNum
(
bAP
);
appraisal
.
setIsEdit
(
aT
.
getIsEdit
());
appraisal
.
setName
(
aT
.
getName
());
appraisal
.
setAppraisalExplain
(
aT
.
getAppraisalExplain
());
appraisal
.
setSts
(
AppraisalSts
.
TARGET_FILL_IN
.
getType
());
...
...
@@ -405,6 +414,19 @@ public class JxglController {
appraisal
.
insert
();
System
.
out
.
println
(
"新增 考核:"
+
appraisal
);
List
<
Integer
>
pNWeights
=
listPN
.
stream
().
filter
(
p
->
p
.
getProcessType
()
==
2
||
p
.
getProcessType
()
==
3
).
map
(
ProcessNode:
:
getWeight
).
collect
(
Collectors
.
toList
());
Integer
sum
=
0
;
for
(
Integer
w
:
pNWeights
)
{
if
(
w
<
0
)
{
throw
new
CustomException
(
"评分权重不能小于0"
);
}
sum
+=
w
;
}
if
(
sum
!=
100
)
{
throw
new
CustomException
(
"权重总和必须等于100"
);
}
listPN
.
stream
().
forEach
(
pN
->
{
Integer
executeType
=
pN
.
getExecuteType
();
// 流程节点
...
...
@@ -675,26 +697,10 @@ public class JxglController {
listPN
=
jxglProcessNodeMapper
.
selectList
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
().
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
RESULT_VERIFICATION
.
getType
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
EXECUTED
.
getType
()));
.
in
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
NON_EXECUTION
.
getType
(),
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
listPN
=
jxglProcessNodeMapper
.
selectList
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
().
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
NON_EXECUTION
.
getType
()));
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
pNIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getId
).
collect
(
Collectors
.
toList
());
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
().
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
().
in
(
JxglProcessNode:
:
getId
,
pNIds
));
JxglAppraisal
.
builder
().
sts
(
AppraisalSts
.
SELF_ASSESSMENT
.
getType
()).
build
()
.
update
(
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
().
in
(
JxglAppraisal:
:
getId
,
aIds
));
}
throw
new
CustomException
(
"所有考核 确认结果后才能 归档"
);
}
}
break
;
...
...
@@ -706,12 +712,38 @@ public class JxglController {
jxglPerformanceAppraisalMapper
.
updateById
(
JxglPerformanceAppraisal
.
builder
().
id
(
appraisalUpdateSts
.
getId
()).
sts
(
sts
).
build
());
return
ResultUtil
.
success
();
}
/**
* 终止-绩效考核
*/
@PutMapping
(
value
=
"/termination_performance_appraisal"
)
@ApiOperation
(
value
=
"8.终止-绩效考核"
,
httpMethod
=
"PUT"
,
notes
=
"终止-绩效考核"
)
@ApiOperationSupport
(
order
=
8
)
public
Result
<
Object
>
terminationPA
(
@CurrentUser
UserBean
userBean
,
@NotNull
@RequestParam
Integer
id
)
{
JxglPerformanceAppraisal
performanceAppraisal
=
jxglPerformanceAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglPerformanceAppraisal
>().
lambda
()
.
eq
(
JxglPerformanceAppraisal:
:
getId
,
id
));
if
(
performanceAppraisal
==
null
)
{
return
ResultUtil
.
error
(
"绩效考核不存在"
);
}
if
(
performanceAppraisal
.
getSts
()
==
PerformanceAppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
())
{
return
ResultUtil
.
error
(
"考核已终止"
);
}
// 修改 绩效考核状态
jxglPerformanceAppraisalMapper
.
updateById
(
JxglPerformanceAppraisal
.
builder
().
id
(
id
).
sts
(
PerformanceAppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
()).
build
());
// 修改 考核状态
jxglAppraisalMapper
.
update
(
JxglAppraisal
.
builder
().
performanceAppraisalId
(
appraisalUpdateSts
.
getId
()).
sts
(
sts
).
build
(),
JxglAppraisal
.
builder
().
performanceAppraisalId
(
id
).
sts
(
PerformanceAppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
()
).
build
(),
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
appraisalUpdateSts
.
getId
()
)
.
eq
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
TARGET_CONFIRMED
.
getType
())
);
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
id
)
);
return
ResultUtil
.
success
();
}
...
...
@@ -804,7 +836,6 @@ public class JxglController {
@GetMapping
(
value
=
"/select_appraisal/{id}"
)
@ApiOperation
(
value
=
"11.查询-考核-详情"
,
httpMethod
=
"GET"
,
notes
=
"查询-考核-详情"
)
@ApiOperationSupport
(
order
=
11
)
@Role
public
Result
<
Object
>
selectA
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
AppraisalDetail
aD
=
jxglAppraisalMapper
.
selectDetailById
(
userBean
.
getOrgCode
(),
id
);
...
...
@@ -814,6 +845,8 @@ public class JxglController {
.
selectOne
(
new
QueryWrapper
<
JxglPerformanceAppraisal
>().
lambda
().
eq
(
JxglPerformanceAppraisal:
:
getId
,
aD
.
getPerformanceAppraisalId
()));
if
(
pA
!=
null
&&
pA
.
getIsVisible
()
==
0
)
{
return
ResultUtil
.
data
(
aD
);
}
else
{
...
...
@@ -908,6 +941,26 @@ public class JxglController {
IPage
<
JxglAppraisal
>
page
=
new
Page
<
JxglAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
List
<
Integer
>
empNums
=
CollUtil
.
toList
();
if
(
query
.
getBmId
()
!=
null
)
{
List
<
YgglMainEmp
>
usersQuery
=
zzglBmgwMService
.
selectOtherlistent
(
userBean
.
getOrgCode
(),
query
.
getBmId
());
if
(
usersQuery
!=
null
)
{
empNums
=
usersQuery
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
}
else
{
return
ResultUtil
.
data
(
null
);
}
if
(
empNums
==
null
||
empNums
.
size
()
==
0
)
{
return
ResultUtil
.
data
(
null
);
}
}
query
.
setEmpNums
(
empNums
);
IPage
<
JxglAppraisal
>
pageA
=
jxglAppraisalMapper
.
selectListEmpByQuery
(
page
,
query
);
...
...
@@ -937,6 +990,27 @@ public class JxglController {
return
ResultUtil
.
data
(
pagePA
,
listPA
);
}
/**
* 查询-我的绩效-考核我的-列表
*/
@PostMapping
(
value
=
"/selects_my_appraisal"
)
@ApiOperation
(
value
=
"15.查询-我的绩效-考核我的-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-我的绩效-考核我的-列表"
)
@ApiOperationSupport
(
order
=
15
)
public
Result
<
Object
>
selectsMA
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
EmpAppraisalQuery
query
)
{
IPage
<
JxglPerformanceAppraisal
>
page
=
new
Page
<
JxglPerformanceAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
query
.
setId
(
userBean
.
getEmpNum
());
IPage
<
JxglPerformanceAppraisal
>
pagePA
=
jxglPerformanceAppraisalMapper
.
selectListEmpByQuery
(
page
,
query
);
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
return
ResultUtil
.
data
(
pagePA
,
listPA
);
}
/**
* 查询-绩效考核-方案
...
...
@@ -951,21 +1025,27 @@ public class JxglController {
if
(
pA
==
null
)
{
return
ResultUtil
.
error
(
"方案不存在"
);
}
PerformanceAppraisal
paDto
=
PerformanceAppraisal
.
builder
().
name
(
pA
.
getName
()).
period
(
pA
.
getPeriod
())
.
appraisalStartTime
(
pA
.
getAppraisalStartTime
()).
appraisalEndTime
(
pA
.
getAppraisalEndTime
())
.
isVisible
(
pA
.
getIsVisible
()).
scope
(
pA
.
getScope
()).
appraisalTName
(
pA
.
getAppraisalTName
())
PerformanceAppraisal
paDto
=
PerformanceAppraisal
.
builder
()
.
name
(
pA
.
getName
())
.
period
(
pA
.
getPeriod
())
.
appraisalStartTime
(
pA
.
getAppraisalStartTime
())
.
appraisalEndTime
(
pA
.
getAppraisalEndTime
())
.
isVisible
(
pA
.
getIsVisible
())
.
scope
(
pA
.
getScope
())
.
appraisalTName
(
pA
.
getAppraisalTName
())
.
appraisalTId
(
pA
.
getAppraisalTId
())
.
processNode
(
ObjectUtil
.
deserialize
(
pA
.
getProcessNode
()))
.
beingAppraisalPerson
(
ObjectUtil
.
deserialize
(
pA
.
getBeingAppraisalPerson
())).
build
();
.
beingAppraisalPerson
(
ObjectUtil
.
deserialize
(
pA
.
getBeingAppraisalPerson
()))
.
build
();
return
ResultUtil
.
data
(
paDto
);
}
/**
* 查询-
我的绩效
-列表
* 查询-
目标待填写/目标待确认/评分/结果待确认
-列表
*/
@PostMapping
(
value
=
"/selects_my_performance"
)
@ApiOperation
(
value
=
"17.查询-
我的绩效-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-我的绩效-列表
"
)
@ApiOperation
(
value
=
"17.查询-
目标待填写/目标待确认/评分/结果待确认-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询
"
)
@ApiOperationSupport
(
order
=
17
)
public
Result
<
Object
>
selects
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
MyPerformance
query
)
{
...
...
@@ -1025,7 +1105,9 @@ public class JxglController {
// 查找 非固定 考核指标
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
().
select
(
JxglAppraisalIndicators:
:
getId
)
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
().
select
(
JxglAppraisalIndicators:
:
getId
,
JxglAppraisalIndicators:
:
getWeight
,
JxglAppraisalIndicators:
:
getIsEditWeight
)
.
eq
(
JxglAppraisalIndicators:
:
getType
,
IndicatorsType
.
NOT_FIXATION
.
getType
())
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
id
));
...
...
@@ -1118,6 +1200,7 @@ public class JxglController {
Integer
weightSum
=
0
;
if
(
listWeight
!=
null
&&
listWeight
.
size
()
>
0
)
{
for
(
Integer
i
:
listWeight
)
{
i
=
i
==
null
?
0
:
i
;
weightSum
+=
i
;
}
if
(!
weightSum
.
equals
(
100
))
...
...
@@ -1456,13 +1539,13 @@ public class JxglController {
}
/**
* 评分提交
-(缺-评分最大分数限制)
* 评分提交
*/
@PostMapping
(
value
=
"/save_score"
)
@ApiOperation
(
value
=
"22.评分提交"
,
httpMethod
=
"POST"
,
notes
=
"评分提交"
)
@ApiOperationSupport
(
order
=
22
)
public
Result
<
Object
>
saveScore
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ValidList
<
AppraisalAssessment
>
appraisalAssessments
)
{
@Validated
@RequestBody
ValidList
<
AppraisalAssessment
>
appraisalAssessments
)
throws
Exception
{
Integer
appraisalId
=
appraisalAssessments
.
get
(
0
).
getAppraisalId
();
...
...
@@ -1489,7 +1572,10 @@ public class JxglController {
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
}
JxglBasicSetting
bS
=
jxglService
.
selectAT
(
userBean
.
getOrgCode
());
Integer
maxScore
=
bS
.
getMaxScore
();
if
(
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
()
||
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
())
{
...
...
@@ -1497,28 +1583,37 @@ public class JxglController {
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
appraisalAssessments
.
stream
().
forEach
(
a
->
{
boolean
hasAppraisalAssessment
=
false
;
for
(
AppraisalAssessment
a
:
appraisalAssessments
)
{
Integer
type
=
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
()
?
AssessmentType
.
SELF_ASSESSMENT
.
getType
()
:
AssessmentType
.
SUPERIOR_SCORE
.
getType
();
if
(
Double
.
valueOf
(
a
.
getScore
())
>
maxScore
)
{
throw
new
CustomException
(
"评分值不能大于最高分"
);
}
if
(
a
.
getAppraisalIndicatorsId
()
!=
null
)
{
JxglAppraisalIndicatorsAssessment
.
builder
().
appraisalIndicatorsId
(
a
.
getAppraisalIndicatorsId
())
.
assessorId
(
userBean
.
getEmpNum
()).
assessorName
(
userBean
.
getUserInfo
().
getName
())
.
score
(
a
.
getScore
()).
remarks
(
a
.
getRemarks
()).
type
(
type
).
build
().
insert
();
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
())
.
sts
(
AppraisalSts
.
SUPERIOR_SCORE
.
getType
()).
build
());
}
else
{
JxglAppraisalAssessment
.
builder
().
appraisalId
(
a
.
getAppraisalId
()).
assessorId
(
userBean
.
getEmpNum
())
.
assessorName
(
userBean
.
getUserInfo
().
getName
()).
comprehensiveScore
(
a
.
getScore
(
))
.
assessorName
(
userBean
.
getUserInfo
().
getName
()).
comprehensiveScore
(
Double
.
valueOf
(
a
.
getScore
()
))
.
remarks
(
a
.
getRemarks
()).
type
(
type
).
level
(
a
.
getLevel
()).
build
().
insert
();
// jxglAppraisalMapper.updateById(JxglAppraisal.builder().id(appraisal.getId()).sts(AppraisalSts.RESULT_VERIFICATION.getType()).build())
;
hasAppraisalAssessment
=
true
;
}
});
};
if
(!
hasAppraisalAssessment
)
{
throw
new
CustomException
(
"必须填写综合评分"
);
}
// 修改 状态
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
EXECUTED
.
getType
()).
build
()
...
...
@@ -1526,26 +1621,83 @@ public class JxglController {
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
(),
JxglProcessNode:
:
getProcessType
,
ProcessType
.
RESULT_VERIFICATION
.
getType
())
.
eq
(
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
(),
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SUPERIOR_SCORE
.
getType
()));
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
selectById
(
appraisal
.
getPerformanceAppraisalId
());
if
(
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
())
{
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SUPERIOR_SCORE
.
getType
()));
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
())
.
sts
(
AppraisalSts
.
SUPERIOR_SCORE
.
getType
()).
build
());
}
else
if
(
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
())
{
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
selectById
(
appraisal
.
getPerformanceAppraisalId
());
if
(
pA
!=
null
&&
pA
.
getSts
()
>
PerformanceAppraisalSts
.
PERFORMANCE_SCORE
.
getType
())
{
if
(
pA
!=
null
&&
pA
.
getSts
()
>
PerformanceAppraisalSts
.
PERFORMANCE_SCORE
.
getType
())
{
if
(
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
())
{
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
RESULT_VERIFICATION
.
getType
()));
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
())
.
sts
(
AppraisalSts
.
RESULT_VERIFICATION
.
getType
()).
build
());
.
sts
(
AppraisalSts
.
RESULT_VERIFICATION
.
getType
()).
build
());
}
// 算 总评分 ---- 自评权重*自评分 + 上级评分权重*上级评分 = 总评分
List
<
JxglProcessNode
>
listProcessNode
=
jxglProcessNodeMapper
.
selectList
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
select
(
JxglProcessNode:
:
getWeight
,
JxglProcessNode:
:
getProcessType
)
.
orderByAsc
(
JxglProcessNode:
:
getProcessType
)
.
in
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SELF_ASSESSMENT
.
getType
(),
ProcessType
.
SUPERIOR_SCORE
.
getType
()));
List
<
JxglAppraisalAssessment
>
listAppraisalAssessment
=
jxglAppraisalAssessmentMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalAssessment
>().
lambda
()
.
select
(
JxglAppraisalAssessment:
:
getType
,
JxglAppraisalAssessment:
:
getComprehensiveScore
)
.
orderByAsc
(
JxglAppraisalAssessment:
:
getType
)
);
Double
selfAssessment
=
0
D
;
Double
superiorAssessment
=
0
D
;
Integer
aWeights
=
0
;
Integer
bWeights
=
0
;
Double
total
=
0
D
;
String
level
=
null
;
if
(
listProcessNode
!=
null
&&
listProcessNode
.
size
()
>
0
)
{
aWeights
=
listProcessNode
.
stream
().
filter
(
p
->
p
.
getProcessType
()
==
ProcessType
.
SELF_ASSESSMENT
.
getType
()).
map
(
JxglProcessNode:
:
getWeight
).
findFirst
().
orElse
(
null
);
bWeights
=
listProcessNode
.
stream
().
filter
(
p
->
p
.
getProcessType
()
==
ProcessType
.
SUPERIOR_SCORE
.
getType
()).
map
(
JxglProcessNode:
:
getWeight
).
findFirst
().
orElse
(
null
);
}
if
(
listAppraisalAssessment
!=
null
&&
listAppraisalAssessment
.
size
()
>
0
)
{
selfAssessment
=
listAppraisalAssessment
.
stream
().
filter
(
a
->
a
.
getType
()
==
AssessmentType
.
SELF_ASSESSMENT
.
getType
()).
map
(
JxglAppraisalAssessment:
:
getComprehensiveScore
).
findFirst
().
orElse
(
null
)
;
superiorAssessment
=
listAppraisalAssessment
.
stream
().
filter
(
a
->
a
.
getType
()
==
AssessmentType
.
SUPERIOR_SCORE
.
getType
()).
map
(
JxglAppraisalAssessment:
:
getComprehensiveScore
).
findFirst
().
orElse
(
null
);
}
if
(
selfAssessment
!=
null
&&
superiorAssessment
!=
null
)
{
System
.
out
.
println
(
aWeights
);
System
.
out
.
println
(
selfAssessment
);
System
.
out
.
println
(
bWeights
);
System
.
out
.
println
(
superiorAssessment
);
total
=
aWeights
*
0.01
*
selfAssessment
+
bWeights
*
0.01
*
superiorAssessment
;
List
<
JxglPerformanceRating
>
listPR
=
bS
.
getPerformanceRatings
();
for
(
JxglPerformanceRating
pR
:
listPR
)
{
level
=
pR
.
getSectionMaxScore
()
<=
total
&&
pR
.
getSectionMinScore
()
<
total
?
pR
.
getName
()
:
null
;
}
// 更新 考核-总分 等级
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
())
.
total
(
total
).
level
(
level
).
build
());
}
else
{
throw
new
CustomException
(
"评分数据存在异常"
);
}
}
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setExecutorId
(
userBean
.
getEmpNum
());
...
...
@@ -1604,8 +1756,7 @@ public class JxglController {
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
id
).
sts
(
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
()).
build
());
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
id
).
sts
(
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
()).
build
());
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
...
...
@@ -1627,6 +1778,7 @@ public class JxglController {
@PostMapping
(
value
=
"/change_score"
)
@ApiOperation
(
value
=
"24.结果确认-改分"
,
httpMethod
=
"POST"
,
notes
=
"结果确认-改分"
)
@ApiOperationSupport
(
order
=
24
)
@Log
(
title
=
"绩效管理-结果确认-改分"
,
businessType
=
BusinessType
.
UPDATE
)
public
Result
<
Object
>
changeScore
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AppraisalAssessment
appraisalAssessment
)
{
...
...
@@ -1652,16 +1804,23 @@ public class JxglController {
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
}
JxglBasicSetting
bS
=
jxglService
.
selectAT
(
userBean
.
getOrgCode
());
Integer
maxScore
=
bS
.
getMaxScore
();
if
(
Double
.
valueOf
(
appraisalAssessment
.
getScore
())
>
maxScore
)
{
throw
new
CustomException
(
"评分值不能大于最高分"
);
}
if
(
ProcessType
.
RESULT_VERIFICATION
.
getType
()
==
processNode
.
getProcessType
())
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
JxglAppraisalAssessment
.
builder
().
id
(
appraisalAssessment
.
getAppraisalAssessmentId
())
.
comprehensiveScore
(
appraisalAssessment
.
getScore
()).
level
(
appraisalAssessment
.
getLevel
()).
build
(
)
.
updateById
(
);
// 更新 考核-总分 等级
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
()
)
.
total
(
Double
.
valueOf
(
appraisalAssessment
.
getScore
())).
level
(
appraisalAssessment
.
getLevel
()).
build
()
);
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setRemarks
(
appraisalAssessment
.
getRemarks
());
...
...
@@ -1685,24 +1844,43 @@ public class JxglController {
@ApiOperation
(
value
=
"25.查询-我的绩效-员工绩效"
,
httpMethod
=
"POST"
,
notes
=
"查询-我的绩效-员工绩效"
)
@ApiOperationSupport
(
order
=
25
)
@Role
@Log
(
title
=
"绩效管理-查询-我的绩效-员工绩效"
)
public
Result
<
Object
>
selectsMEP
(
@CurrentUser
UserBean
userBean
,
@RequestBody
EmpPerformanceQuery
query
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
empNum
=
userBean
.
getEmpNum
();
IPage
<
JxglAppraisal
>
page
=
new
Page
<
JxglAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
orgCode
);
List
<
ZzglBmgwM
>
listBM
=
zzglBmgwMMapper
.
selectList
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
().
select
(
ZzglBmgwM:
:
getId
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
List
<
ZzglBmgwM
>
listBM
=
zzglBmgwMMapper
.
selectList
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
()
.
select
(
ZzglBmgwM:
:
getId
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
System
.
out
.
println
(
"listBM-----"
+
listBM
);
ZzglBmgwM
ZzglBmgwM
=
CollUtil
.
getFirst
(
listBM
);
if
(
ZzglBmgwM
==
null
)
{
return
ResultUtil
.
success
();
}
List
<
YgglMainEmp
>
users
=
zzglBmgwMService
.
selectOtherlistent
(
orgCode
,
ZzglBmgwM
.
getId
());
List
<
Integer
>
empNums
=
null
;
List
<
Integer
>
empNums
=
CollUtil
.
toList
()
;
if
(
users
!=
null
)
{
empNums
=
users
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
}
if
(
query
.
getBmId
()
!=
null
)
{
List
<
YgglMainEmp
>
usersQuery
=
zzglBmgwMService
.
selectOtherlistent
(
orgCode
,
query
.
getBmId
());
if
(
usersQuery
!=
null
)
{
List
<
Integer
>
empNumsQuery
=
usersQuery
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
empNums
=
empNums
.
stream
().
filter
(
e
->
empNumsQuery
.
contains
(
e
)).
collect
(
Collectors
.
toList
());
}
else
{
return
ResultUtil
.
data
(
null
);
}
}
if
(
empNums
==
null
||
empNums
.
size
()
==
0
)
{
return
ResultUtil
.
data
(
null
);
}
query
.
setEmpNums
(
empNums
);
IPage
<
JxglAppraisal
>
pageA
=
jxglAppraisalMapper
.
selectMyEmpByQuery
(
page
,
query
);
...
...
src/main/java/cn/timer/api/controller/jxgl/service/JxglService.java
View file @
bc7eba2a
package
cn
.
timer
.
api
.
controller
.
jxgl
.
service
;
import
cn.timer.api.bean.jxgl.JxglBasicSetting
;
public
interface
JxglService
{
public
JxglBasicSetting
selectAT
(
Integer
orgCode
);
}
src/main/java/cn/timer/api/controller/jxgl/service/JxglServiceImpl.java
View file @
bc7eba2a
package
cn
.
timer
.
api
.
controller
.
jxgl
.
service
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
cn.timer.api.bean.jxgl.JxglBasicSetting
;
import
cn.timer.api.dao.jxgl.JxglBasicSettingMapper
;
@Service
public
class
JxglServiceImpl
implements
JxglService
{
@Autowired
private
JxglBasicSettingMapper
jxglBasicSettingMapper
;
@Override
public
JxglBasicSetting
selectAT
(
Integer
orgCode
)
{
// TODO Auto-generated method stub
return
jxglBasicSettingMapper
.
selectAll
(
orgCode
);
}
}
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
bc7eba2a
...
...
@@ -68,12 +68,14 @@ import cn.timer.api.dto.spmk.ApprovingDto;
import
cn.timer.api.dto.spmk.FlowChildren
;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.dto.spmk.MySummaryQueryDto
;
import
cn.timer.api.dto.spmk.Relation
;
import
cn.timer.api.dto.spmk.Router
;
import
cn.timer.api.dto.spmk.SpmkApprovalTemplateDto
;
import
cn.timer.api.dto.spmk.SpmkApproveDetailDto
;
import
cn.timer.api.dto.spmk.SpmkApproveSummaryDto
;
import
cn.timer.api.dto.spmk.SpmkCustomApprovalDto
;
import
cn.timer.api.dto.spmk.SummaryQueryDto
;
import
cn.timer.api.dto.spmk.User
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.router.RouterUtils
;
...
...
@@ -473,8 +475,25 @@ public class SpmkController {
// List<SpmkApprovalG> saG = spmkService.selectListAg(userBean);
Router
router
=
spmkApproveSummaryDto
.
getRouter
();
List
<
Router
>
routers
=
router
.
getChildren
();
if
(
routers
!=
null
&&
routers
.
size
()
>
0
)
{
List
<
Relation
>
relations
=
routers
.
get
(
0
).
getRelation
();
if
(
relations
==
null
||
relations
.
size
()
<
1
)
{
return
ResultUtil
.
error
(
"无法发起,请完善审批流程"
);
}
List
<
User
>
users
=
relations
.
get
(
0
).
getUsers
();
if
(
users
==
null
||
users
.
size
()
<
1
)
{
return
ResultUtil
.
error
(
"无法发起,请完善审批流程"
);
}
}
else
{
return
ResultUtil
.
error
(
"无法发起,请完善审批流程"
);
}
List
<
Router
>
listRouter
=
new
ArrayList
<
Router
>();
listRouter
.
add
(
spmkApproveSummaryDto
.
getRouter
());
listRouter
.
add
(
router
);
JSONObject
jSONObject
=
spmkApproveSummaryDto
.
getRequestData
()
.
set
(
"orgCode"
,
FromData
.
builder
().
value
(
String
.
valueOf
(
userBean
.
getOrgCode
())).
build
())
.
set
(
"initiator"
,
FromData
.
builder
().
value
(
ygglMainEmp
.
getName
()).
build
())
...
...
@@ -599,8 +618,6 @@ public class SpmkController {
.
select
(
SpmkApproveSummary:
:
getSts
)
.
eq
(
SpmkApproveSummary:
:
getId
,
approvingDto
.
getAsId
()));
if
(
aSummary
.
getSts
()
>
SpmkEnumInterface
.
ApproveSummarySts
.
IN
.
ordinal
())
{
return
ResultUtil
.
error
(
"该审批已结束!"
);
}
...
...
@@ -621,7 +638,6 @@ public class SpmkController {
return
ResultUtil
.
error
(
"非当前审批人,无法审批!"
);
}
if
(
aSummary
.
getSts
()
==
0
)
{
List
<
FlowChildren
>
listFlowChildren
=
ObjectUtil
.
deserialize
(
ad
.
getFlowChildren
());
// 审批逻辑
...
...
src/main/java/cn/timer/api/dto/jxgl/AppraisalDetail.java
View file @
bc7eba2a
...
...
@@ -49,8 +49,14 @@ public class AppraisalDetail implements Serializable{
private
String
name
;
@ApiModelProperty
(
value
=
"考核说明"
,
example
=
"考核说明"
)
private
String
appraisalExplain
;
@ApiModelProperty
(
value
=
"总分"
,
example
=
"0"
)
private
Integer
total
;
@ApiModelProperty
(
value
=
"等级"
,
example
=
"0"
)
private
String
level
;
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2020-10-10 10:10:10"
)
private
Date
createTime
;
...
...
@@ -62,8 +68,12 @@ public class AppraisalDetail implements Serializable{
@ApiModelProperty
(
value
=
"状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7归档"
,
example
=
"0"
)
private
Integer
sts
;
private
Integer
isEdit
;
private
String
appraisalName
;
private
String
headUrl
;
private
List
<
JxglProcessNode
>
processNodes
;
private
List
<
JxglAppraisalAssessment
>
appraisalAssessments
;
...
...
src/main/java/cn/timer/api/dto/jxgl/EmpAppraisalQuery.java
View file @
bc7eba2a
package
cn
.
timer
.
api
.
dto
.
jxgl
;
import
javax.validation.constraints.NotNull
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -16,10 +13,9 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
public
class
EmpAppraisalQuery
extends
Page
{
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"员工id"
,
example
=
""
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"企业id"
,
example
=
""
)
private
Integer
orgCode
;
}
src/main/java/cn/timer/api/dto/jxgl/EmpPerformanceQuery.java
View file @
bc7eba2a
...
...
@@ -18,10 +18,6 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
public
class
EmpPerformanceQuery
extends
Page
{
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"绩效考核id"
,
example
=
""
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"企业id"
,
example
=
""
)
private
Integer
orgCode
;
...
...
src/main/java/cn/timer/api/dto/jxgl/PerformanceAppraisal.java
View file @
bc7eba2a
...
...
@@ -67,9 +67,9 @@ public class PerformanceAppraisal implements Serializable{
@ApiModelProperty
(
value
=
"是否可见 0是 1否。评分及评分结果能否被员工看见"
,
example
=
"1"
)
private
Integer
isVisible
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@Min
(
value
=
0
,
message
=
ValidationMsg
.
MIN
)
@Max
(
value
=
4
,
message
=
ValidationMsg
.
MAX
)
//
@NotNull(message = ValidationMsg.NOTNULL)
//
@Min(value = 0,message = ValidationMsg.MIN)
//
@Max(value = 4,message = ValidationMsg.MAX)
@ApiModelProperty
(
value
=
"状态 0目标制定 1绩效评分 2结果确认 3绩效归档 4终止考核"
,
example
=
"10"
)
private
Integer
sts
;
...
...
@@ -87,7 +87,7 @@ public class PerformanceAppraisal implements Serializable{
@ApiModelProperty
(
value
=
"考核人数 考核人数"
,
example
=
"10"
)
private
Integer
appraisalPersonNum
;
@
NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@
Valid
@ApiModelProperty
(
value
=
"流程节点"
,
example
=
""
)
private
List
<
ProcessNode
>
processNode
;
...
...
src/main/resources/mapping/jxgl/JxglAppraisalIndicatorsMapper.xml
View file @
bc7eba2a
...
...
@@ -7,6 +7,7 @@
<id
column=
"id"
property=
"id"
/>
<result
column=
"appraisal_id"
property=
"appraisalId"
/>
<result
column=
"title"
property=
"title"
/>
<result
column=
"content"
property=
"content"
/>
<result
column=
"weight"
property=
"weight"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
...
...
@@ -18,6 +19,7 @@
id,
appraisal_id,
title,
content,
weight,
create_time,
update_time,
...
...
@@ -29,6 +31,7 @@
id JxglAppraisalIndicators_id,
appraisal_id JxglAppraisalIndicators_appraisal_id,
title JxglAppraisalIndicators_title,
content JxglAppraisalIndicators_content,
weight JxglAppraisalIndicators_weight,
create_time JxglAppraisalIndicators_create_time,
update_time JxglAppraisalIndicators_update_time,
...
...
@@ -47,6 +50,9 @@
<if test ='null != title'>
title,
</if>
<if test ='null != content'>
content,
</if>
<if test ='null != weight'>
weight,
</if>
...
...
@@ -70,6 +76,9 @@
<if test ='null != title'>
#{title},
</if>
<if test ='null != content'>
#{content},
</if>
<if test ='null != weight'>
#{weight},
</if>
...
...
@@ -98,6 +107,7 @@
<set>
<if test ='null != appraisalId'>appraisal_id = #{appraisalId},</if>
<if test ='null != title'>title = #{title},</if>
<if test ='null != content'>content = #{content},</if>
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
...
...
src/main/resources/mapping/jxgl/JxglAppraisalIndicatorsTMapper.xml
View file @
bc7eba2a
...
...
@@ -7,6 +7,7 @@
<id
column=
"id"
property=
"id"
/>
<result
column=
"appraisal_t_id"
property=
"appraisalTId"
/>
<result
column=
"title"
property=
"title"
/>
<result
column=
"content"
property=
"content"
/>
<result
column=
"weight"
property=
"weight"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
...
...
@@ -18,6 +19,7 @@
id,
appraisal_t_id,
title,
content,
weight,
create_time,
update_time,
...
...
@@ -29,6 +31,7 @@
id JxglAppraisalIndicatorsT_id,
appraisal_t_id JxglAppraisalIndicatorsT_appraisal_t_id,
title JxglAppraisalIndicatorsT_title,
content JxglAppraisalIndicatorsT_content,
weight JxglAppraisalIndicatorsT_weight,
create_time JxglAppraisalIndicatorsT_create_time,
update_time JxglAppraisalIndicatorsT_update_time,
...
...
@@ -47,6 +50,9 @@
<if test ='null != title'>
title,
</if>
<if test ='null != title'>
content,
</if>
<if test ='null != weight'>
weight,
</if>
...
...
@@ -70,6 +76,9 @@
<if test ='null != title'>
#{title},
</if>
<if test ='null != content'>
#{content},
</if>
<if test ='null != weight'>
#{weight},
</if>
...
...
@@ -98,6 +107,7 @@
<set>
<if test ='null != appraisalTId'>appraisal_t_id = #{appraisalTId},</if>
<if test ='null != title'>title = #{title},</if>
<if test ='null != content'>content = #{content},</if>
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
...
...
src/main/resources/mapping/jxgl/JxglAppraisalMapper.xml
View file @
bc7eba2a
...
...
@@ -25,9 +25,12 @@
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"sts"
property=
"sts"
/>
<result
column=
"is_edit"
property=
"isEdit"
/>
<result
column=
"
executor_name"
property=
"executo
rName"
/>
<result
column=
"
user_name"
property=
"use
rName"
/>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"bm_name"
property=
"bmName"
/>
<result
column=
"executor_name"
property=
"executorName"
/>
<result
column=
"executor_id"
property=
"executorId"
/>
<result
column=
"note_sts"
property=
"noteSts"
/>
</resultMap>
<resultMap
id=
"BaseResultMap_All"
type=
"cn.timer.api.bean.jxgl.JxglAppraisal"
>
...
...
@@ -43,7 +46,7 @@
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"bm_name"
property=
"bmName"
/>
<result
column=
"executor_name"
property=
"executorName"
/>
<result
column=
"
comprehensive_score"
property=
"comprehensiveScore
"
/>
<result
column=
"
total"
property=
"total
"
/>
<result
column=
"level"
property=
"level"
/>
<result
column=
"confirmor"
property=
"confirmor"
/>
</resultMap>
...
...
@@ -74,6 +77,7 @@
<id
column=
"id"
property=
"id"
/>
<result
column=
"appraisal_id"
property=
"appraisalId"
/>
<result
column=
"title"
property=
"title"
/>
<result
column=
"content"
property=
"content"
/>
<result
column=
"weight"
property=
"weight"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
...
...
@@ -93,10 +97,14 @@
<result
column=
"emp_num"
property=
"empNum"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"appraisal_explain"
property=
"appraisalExplain"
/>
<result
column=
"total"
property=
"total"
/>
<result
column=
"level"
property=
"level"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"sts"
property=
"sts"
/>
<result
column=
"is_edit"
property=
"isEdit"
/>
<result
column=
"appraisal_name"
property=
"appraisalName"
/>
<result
column=
"head_url"
property=
"headUrl"
/>
<collection
column=
"JxglProcessNode_id"
property=
"processNodes"
ofType=
"cn.timer.api.bean.jxgl.JxglProcessNode"
resultMap=
"cn.timer.api.dao.jxgl.JxglProcessNodeMapper.BaseResultMap"
columnPrefix=
"JxglProcessNode_"
>
</collection>
...
...
@@ -131,6 +139,8 @@
a.emp_num,
a.name,
a.appraisal_explain,
a.total,
a.level,
a.create_time,
a.update_time,
a.sts,
...
...
@@ -178,6 +188,7 @@
e.id e_id,
e.appraisal_id e_id,
e.title e_title,
e.content e_content,
e.weight e_weight,
e.create_time e_create_time,
e.update_time e_update_time,
...
...
@@ -210,6 +221,8 @@
emp_num JxglAppraisal_emp_num,
name JxglAppraisal_name,
appraisal_explain JxglAppraisal_appraisal_explain,
total JxglAppraisal_total,
level JxglAppraisal_level,
create_time JxglAppraisal_create_time,
update_time JxglAppraisal_update_time,
sts JxglAppraisal_sts,
...
...
@@ -221,13 +234,10 @@
<include
refid=
"Base_Column_List_a"
/>
,
b.name user_name, b.phone,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = b.bmgw_id limit 1) limit 1) as bm_name,
(SELECT name FROM yggl_main_emp WHERE emp_num = c.executor_id AND org_code = #{param.orgCode}) as executor_name,
<!-- (SELECT executor_name FROM jxgl_process_node WHERE sts = 1 LIMIT 1) as confirmor, -->
d.comprehensive_score ,d.level
(SELECT name FROM yggl_main_emp WHERE emp_num = c.executor_id AND org_code = #{param.orgCode}) as executor_name
FROM jxgl_appraisal a
LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num AND b.org_code = #{param.orgCode}
LEFT JOIN jxgl_process_node c ON a.id = c.appraisal_id AND c.sts = 1
LEFT JOIN jxgl_appraisal_assessment d ON a.id = d.appraisal_id AND d.type = 1
<!-- 缺部门 搜索 -->
WHERE a.performance_appraisal_id = #{param.id}
<if
test=
"param.query != null and param.query != ''"
>
...
...
@@ -248,15 +258,12 @@
<include
refid=
"Base_Column_List_a"
/>
,
b.name user_name, b.phone,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = b.bmgw_id limit 1) limit 1) as bm_name,
(SELECT name FROM yggl_main_emp WHERE emp_num = c.executor_id AND org_code = #{param.orgCode}) as executor_name,
<!-- (SELECT executor_name FROM jxgl_process_node WHERE sts = 1 LIMIT 1) as confirmor, -->
d.comprehensive_score ,d.level
(SELECT name FROM yggl_main_emp WHERE emp_num = c.executor_id AND org_code = #{param.orgCode}) as executor_name
FROM jxgl_appraisal a
LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num AND b.org_code = #{param.orgCode}
LEFT JOIN jxgl_process_node c ON a.id = c.appraisal_id AND c.sts = 1
LEFT JOIN jxgl_appraisal_assessment d ON a.id = d.appraisal_id AND d.type = 1
<!-- 缺部门 搜索 -->
WHERE a.performance_appraisal_id = #{param.id}
<where>
<if
test=
"param.empNums != null and param.empNums.size() > 0"
>
<choose>
<when
test=
"param.empNums.size() > 1"
>
...
...
@@ -279,9 +286,7 @@
b.phone like CONCAT('%',#{param.query},'%')
)
</if>
<if
test=
"param.sts != null"
>
AND a.sts = #{param.sts}
</if>
</where>
ORDER BY a.id DESC
</select>
...
...
@@ -308,6 +313,21 @@
b.phone like CONCAT('%',#{param.query},'%')
)
</if>
<if
test=
"param.empNums != null and param.empNums.size() > 0"
>
<choose>
<when
test=
"param.empNums.size() > 1"
>
AND b.emp_num IN
(
<foreach
item=
"it"
index=
"index"
collection=
"param.empNums"
separator=
","
close=
""
>
#{it}
</foreach>
)
</when>
<otherwise>
AND asso_id = #{param.empNums[0]}
</otherwise>
</choose>
</if>
</where>
GROUP BY a.emp_num
ORDER BY a.id DESC
...
...
@@ -317,6 +337,7 @@
<select
id=
"selectDetailById"
resultMap=
"BaseResultMap_Detail"
>
SELECT
<include
refid=
"Base_Column_List_a"
/>
,
j.head_url head_url,
<include
refid=
"Base_Column_List_Alias_b"
/>
,
i.name JxglProcessNode_executor_name,
<include
refid=
"Base_Column_List_Alias_c"
/>
,
...
...
@@ -335,6 +356,7 @@
LEFT JOIN jxgl_appraisal_item g ON e.id = g.appraisal_indicators_id
LEFT JOIN jxgl_performance_appraisal h ON a.performance_appraisal_id = h.id
LEFT JOIN yggl_main_emp i ON b.executor_id = i.emp_num AND i.org_code = #{orgCode}
LEFT JOIN yggl_main_emp j ON a.emp_num = j.emp_num AND j.org_code = #{orgCode}
WHERE a.id = #{id}
ORDER BY c.id , d.id , b.process_type
</select>
...
...
@@ -356,6 +378,12 @@
<if test ='null != appraisalExplain'>
appraisal_explain,
</if>
<if test ='null != total'>
total,
</if>
<if test ='null != level'>
level,
</if>
<if test ='null != createTime'>
create_time,
</if>
...
...
@@ -379,6 +407,12 @@
<if test ='null != appraisalExplain'>
#{appraisalExplain},
</if>
<if test ='null != total'>
#{total},
</if>
<if test ='null != level'>
#{level},
</if>
<if test ='null != createTime'>
#{createTime},
</if>
...
...
@@ -403,6 +437,8 @@
<if test ='null != empNum'>emp_num = #{empNum},</if>
<if test ='null != name'>name = #{name},</if>
<if test ='null != appraisalExplain'>appraisal_explain = #{appraisalExplain},</if>
<if test ='null != total'>total = #{total},</if>
<if test ='null != level'>level = #{level},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != sts'>sts = #{sts}</if>
...
...
src/main/resources/mapping/jxgl/JxglAppraisalTMapper.xml
View file @
bc7eba2a
...
...
@@ -19,6 +19,7 @@
<id
column=
"id"
property=
"id"
/>
<result
column=
"appraisal_t_id"
property=
"appraisalTId"
/>
<result
column=
"title"
property=
"title"
/>
<result
column=
"content"
property=
"content"
/>
<result
column=
"weight"
property=
"weight"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
...
...
@@ -84,6 +85,7 @@
b.id JxglAppraisalIndicatorsT_id,
b.appraisal_t_id JxglAppraisalIndicatorsT_appraisal_t_id,
b.title JxglAppraisalIndicatorsT_title,
b.content JxglAppraisalIndicatorsT_content,
b.weight JxglAppraisalIndicatorsT_weight,
b.create_time JxglAppraisalIndicatorsT_create_time,
b.update_time JxglAppraisalIndicatorsT_update_time,
...
...
src/main/resources/mapping/jxgl/JxglPerformanceAppraisalMapper.xml
View file @
bc7eba2a
...
...
@@ -42,6 +42,10 @@
<result
column=
"performance_score"
property=
"performanceScore"
/>
<result
column=
"result_verification"
property=
"resultVerification"
/>
<result
column=
"performance_archive"
property=
"performanceArchive"
/>
<result
column=
"assessment_complete"
property=
"assessmentComplete"
/>
<result
column=
"termination_assessment"
property=
"terminationAssessment"
/>
<result
column=
"note_sts"
property=
"noteSts"
/>
<association
property=
"appraisal"
column=
"b_id"
javaType=
"cn.timer.api.bean.jxgl.JxglAppraisal"
columnPrefix=
"b_"
resultMap=
"cn.timer.api.dao.jxgl.JxglAppraisalMapper.BaseResultMap_My"
>
</association>
...
...
@@ -162,7 +166,9 @@
SUM((CASE WHEN b.sts in (0,1) THEN 1 ELSE 0 END)) AS target_seting,
SUM((CASE WHEN b.sts in (2,3) THEN 1 ELSE 0 END)) AS performance_score,
SUM((CASE WHEN b.sts in (4,5) THEN 1 ELSE 0 END)) AS result_verification,
SUM((CASE WHEN b.sts = 7 THEN 1 ELSE 0 END)) AS performance_archive
SUM((CASE WHEN b.sts = 7 THEN 1 ELSE 0 END)) AS performance_archive,
SUM((CASE WHEN b.sts = 5 THEN 1 ELSE 0 END)) AS assessment_complete,
SUM((CASE WHEN b.sts = 6 THEN 1 ELSE 0 END)) AS termination_assessment
FROM jxgl_performance_appraisal a
LEFT JOIN jxgl_appraisal b ON a.id = b.performance_appraisal_id
WHERE a.org_code = #{param.orgCode} AND a.sts = 3
...
...
@@ -185,14 +191,19 @@
<select
id=
"selectListEmpByQuery"
resultMap=
"BaseResultMap_ALl"
>
SELECT
a.name,a.appraisal_start_time,a.appraisal_end_time,
e.name b_user_name, e.phone b_phone,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = e.bmgw_id limit 1) limit 1) as b_bm_name,
b.id b_id, b.sts b_sts,
(SELECT name FROM yggl_main_emp WHERE emp_num = d.executor_id AND org_code = a.org_code) as b_executor_name,
d.executor_id b_executor_id,
d.sts b_note_sts,
c.comprehensive_score c_comprehensive_score,
c.level c_level
FROM jxgl_performance_appraisal a
LEFT JOIN jxgl_appraisal b ON b.performance_appraisal_id = a.id
LEFT JOIN jxgl_appraisal_assessment c ON b.id = c.appraisal_id AND c.type = 1
LEFT JOIN jxgl_process_node d ON b.id = d.appraisal_id AND d.sts = 1
LEFT JOIN jxgl_process_node d ON b.id = d.appraisal_id AND b.sts = d.process_type
LEFT JOIN yggl_main_emp e ON b.emp_num = e.emp_num AND a.org_code = e.org_code
WHERE a.org_code = #{param.orgCode} AND b.emp_num = #{param.id}
</select>
...
...
@@ -203,16 +214,18 @@
b.id b_id,b.sts b_sts,
c.comprehensive_score c_comprehensive_score,
c.level c_level,
e.name b_executor_name, e.phone b_phone,
d.sts note_sts,
e.name b_user_name, e.phone b_phone,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = e.bmgw_id limit 1) limit 1) as b_bm_name
FROM jxgl_performance_appraisal a
LEFT JOIN jxgl_appraisal b ON b.performance_appraisal_id = a.id
LEFT JOIN jxgl_appraisal_assessment c ON b.id = c.appraisal_id AND c.type = 1
LEFT JOIN jxgl_process_node d ON b.id = d.appraisal_id AND d.
sts = 1
LEFT JOIN jxgl_process_node d ON b.id = d.appraisal_id AND d.
process_type = b.sts
LEFT JOIN yggl_main_emp e ON b.emp_num = e.emp_num AND a.org_code = e.org_code
<where>
AND a.org_code = #{param.orgCode}
AND d.executor_id = #{param.id}
AND d.sts != 0
<if
test=
"param.sts != null and param.sts == 0"
>
AND b.sts = 0
</if>
...
...
src/main/resources/mapping/jxgl/JxglProcessNodeMapper.xml
View file @
bc7eba2a
...
...
@@ -72,7 +72,7 @@
leader_tier,
</if>
<if test ='null != weight'>
weight,
weight,
W
</if>
<if test ='null != sts'>
sts,
...
...
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