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
b2e07b36
Commit
b2e07b36
authored
Jun 09, 2020
by
tangzhaoqian
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效管理优化、bug修复
parent
aa29bdd6
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
488 additions
and
581 deletions
+488
-581
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalIndicators.java
+3
-0
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalIndicatorsT.java
+3
-2
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalT.java
+21
-6
src/main/java/cn/timer/api/bean/jxgl/JxglBasicSetting.java
+5
-2
src/main/java/cn/timer/api/bean/jxgl/JxglPerformanceRating.java
+5
-4
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
+381
-540
src/main/java/cn/timer/api/dto/jxgl/AppraisalAssessment.java
+5
-0
src/main/java/cn/timer/api/dto/jxgl/AppraisalQuery.java
+1
-1
src/main/java/cn/timer/api/dto/jxgl/AppraisalReject.java
+4
-0
src/main/java/cn/timer/api/dto/jxgl/AppraisalUpdate.java
+4
-0
src/main/java/cn/timer/api/dto/jxgl/AppraisalUpdateSts.java
+5
-0
src/main/java/cn/timer/api/dto/jxgl/MyPerformance.java
+0
-4
src/main/java/cn/timer/api/dto/jxgl/ProcessNodeUpdate.java
+5
-0
src/main/resources/mapping/jxgl/JxglAppraisalIndicatorsMapper.xml
+15
-5
src/main/resources/mapping/jxgl/JxglAppraisalIndicatorsTMapper.xml
+15
-5
src/main/resources/mapping/jxgl/JxglAppraisalMapper.xml
+6
-2
src/main/resources/mapping/jxgl/JxglAppraisalTMapper.xml
+3
-4
src/main/resources/mapping/jxgl/JxglBasicSettingMapper.xml
+1
-0
src/main/resources/mapping/jxgl/JxglPerformanceAppraisalMapper.xml
+6
-6
No files found.
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalIndicators.java
View file @
b2e07b36
...
@@ -62,6 +62,9 @@ public class JxglAppraisalIndicators extends Model<JxglAppraisalIndicators> {
...
@@ -62,6 +62,9 @@ public class JxglAppraisalIndicators extends Model<JxglAppraisalIndicators> {
@ApiModelProperty
(
value
=
"类型 0 非固定 1 固定"
,
example
=
"0"
)
@ApiModelProperty
(
value
=
"类型 0 非固定 1 固定"
,
example
=
"0"
)
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
value
=
"是否可编辑权重"
,
example
=
"0 是 1否"
)
private
Integer
isEditWeight
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
JxglAppraisalIndicatorsAssessment
>
appraisalIndicatorsAssessments
;
private
List
<
JxglAppraisalIndicatorsAssessment
>
appraisalIndicatorsAssessments
;
...
...
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalIndicatorsT.java
View file @
b2e07b36
...
@@ -63,8 +63,10 @@ public class JxglAppraisalIndicatorsT extends Model<JxglAppraisalIndicatorsT> {
...
@@ -63,8 +63,10 @@ public class JxglAppraisalIndicatorsT extends Model<JxglAppraisalIndicatorsT> {
@ApiModelProperty
(
value
=
"类型"
,
example
=
"0 非固定 1 固定"
)
@ApiModelProperty
(
value
=
"类型"
,
example
=
"0 非固定 1 固定"
)
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
value
=
"是否可编辑权重"
,
example
=
"0 是 1否"
)
private
Integer
isEditWeight
;
@TableField
(
exist
=
false
)
// 是否转换
@TableField
(
exist
=
false
)
// 是否转换
@ApiModelProperty
(
value
=
"考核项模板"
,
example
=
""
)
@ApiModelProperty
(
value
=
"考核项模板"
,
example
=
""
)
private
List
<
JxglAppraisalItemT
>
appraisalItemTs
;
private
List
<
JxglAppraisalItemT
>
appraisalItemTs
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/jxgl/JxglAppraisalT.java
View file @
b2e07b36
...
@@ -5,6 +5,10 @@ import java.util.List;
...
@@ -5,6 +5,10 @@ import java.util.List;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Null
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
...
@@ -12,6 +16,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -12,6 +16,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -38,35 +43,44 @@ public class JxglAppraisalT extends Model<JxglAppraisalT> {
...
@@ -38,35 +43,44 @@ public class JxglAppraisalT extends Model<JxglAppraisalT> {
@Id
@Id
@GeneratedValue
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"10"
)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"企业id
企业id
"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"企业id"
,
example
=
"10"
)
private
Integer
orgCode
;
private
Integer
orgCode
;
@NotBlank
(
message
=
ValidationMsg
.
NOTBLANK
)
@ApiModelProperty
(
value
=
"名称"
,
example
=
"名称"
)
@ApiModelProperty
(
value
=
"名称"
,
example
=
"名称"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"考核说明"
,
example
=
"考核说明"
)
@ApiModelProperty
(
value
=
"考核说明"
,
example
=
"考核说明"
)
private
String
appraisalExplain
;
private
String
appraisalExplain
;
@Null
(
message
=
ValidationMsg
.
NULL
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2020-10-10 10:10:10"
)
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2020-10-10 10:10:10"
)
private
Date
createTime
;
private
Date
createTime
;
@Null
(
message
=
ValidationMsg
.
NULL
)
@TableField
(
fill
=
FieldFill
.
UPDATE
)
@TableField
(
fill
=
FieldFill
.
UPDATE
)
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2020-10-10 10:10:10"
)
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2020-10-10 10:10:10"
)
private
Date
updateTime
;
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"是否可编辑 限制员工的权限"
,
example
=
"
1
0"
)
@ApiModelProperty
(
value
=
"是否可编辑 限制员工的权限"
,
example
=
"0"
)
private
Integer
isEdit
;
private
Integer
isEdit
;
@ApiModelProperty
(
value
=
"是否使用固定"
,
example
=
"10"
)
@Min
(
value
=
0
,
message
=
ValidationMsg
.
MIN
)
@Max
(
value
=
1
,
message
=
ValidationMsg
.
MAX
)
@ApiModelProperty
(
value
=
"是否使用固定"
,
example
=
"0"
)
private
Integer
isUseFixd
;
private
Integer
isUseFixd
;
@ApiModelProperty
(
value
=
"是否使用非固定"
,
example
=
"10"
)
@Min
(
value
=
0
,
message
=
ValidationMsg
.
MIN
)
@Max
(
value
=
1
,
message
=
ValidationMsg
.
MAX
)
@ApiModelProperty
(
value
=
"是否使用非固定"
,
example
=
"0"
)
private
Integer
isUseNotFixd
;
private
Integer
isUseNotFixd
;
@TableField
(
exist
=
false
)
// 是否转换
@TableField
(
exist
=
false
)
// 是否转换
@ApiModelProperty
(
value
=
"考核指标模板"
,
example
=
""
)
@ApiModelProperty
(
value
=
"考核指标模板"
,
example
=
""
)
private
List
<
JxglAppraisalIndicatorsT
>
appraisalIndicatorsTs
;
private
List
<
JxglAppraisalIndicatorsT
>
appraisalIndicatorsTs
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/jxgl/JxglBasicSetting.java
View file @
b2e07b36
...
@@ -5,6 +5,7 @@ import java.util.Date;
...
@@ -5,6 +5,7 @@ import java.util.Date;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
javax.validation.constraints.Min
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
...
@@ -12,6 +13,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -12,6 +13,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
cn.timer.api.config.validation.ValidList
;
import
cn.timer.api.config.validation.ValidList
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -39,13 +41,14 @@ public class JxglBasicSetting extends Model<JxglBasicSetting> {
...
@@ -39,13 +41,14 @@ public class JxglBasicSetting extends Model<JxglBasicSetting> {
@Id
@Id
@GeneratedValue
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号
编号
"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"编号"
,
example
=
"101"
)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"企业id 企业id"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"企业id 企业id"
,
example
=
"101"
)
private
Integer
orgCode
;
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"最高分 最高分"
,
example
=
"101"
)
@Min
(
value
=
0
,
message
=
ValidationMsg
.
MIN
)
@ApiModelProperty
(
value
=
"最高分"
,
example
=
"101"
)
private
Integer
maxScore
;
private
Integer
maxScore
;
@TableField
(
fill
=
FieldFill
.
INSERT
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
...
...
src/main/java/cn/timer/api/bean/jxgl/JxglPerformanceRating.java
View file @
b2e07b36
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -41,19 +42,19 @@ public class JxglPerformanceRating extends Model<JxglPerformanceRating> {
...
@@ -41,19 +42,19 @@ public class JxglPerformanceRating extends Model<JxglPerformanceRating> {
@ApiModelProperty
(
value
=
"绩效基础设置id"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"绩效基础设置id"
,
example
=
"10"
)
private
Integer
basicSettingId
;
private
Integer
basicSettingId
;
@NotBlank
(
message
=
"等级名称 不能为空"
)
@NotBlank
(
message
=
ValidationMsg
.
NOTBLANK
)
@ApiModelProperty
(
value
=
"等级名称"
,
example
=
"等级名称"
)
@ApiModelProperty
(
value
=
"等级名称"
,
example
=
"等级名称"
)
private
String
name
;
private
String
name
;
@NotNull
(
message
=
"区间最小分数 不能为空"
)
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"区间最小分数"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"区间最小分数"
,
example
=
"10"
)
private
Integer
sectionMinScore
;
private
Integer
sectionMinScore
;
@NotNull
(
message
=
"区间最大分数 不能为空"
)
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"区间最大分数"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"区间最大分数"
,
example
=
"10"
)
private
Integer
sectionMaxScore
;
private
Integer
sectionMaxScore
;
@NotNull
(
message
=
"排序 不能为空"
)
// @NotNull(message = ValidationMsg.NOTNULL
)
@ApiModelProperty
(
value
=
"排序"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"排序"
,
example
=
"10"
)
private
Integer
ranks
;
private
Integer
ranks
;
...
...
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
View file @
b2e07b36
...
@@ -75,7 +75,6 @@ import cn.timer.api.dao.jxgl.JxglBasicSettingMapper;
...
@@ -75,7 +75,6 @@ import cn.timer.api.dao.jxgl.JxglBasicSettingMapper;
import
cn.timer.api.dao.jxgl.JxglPerformanceAppraisalMapper
;
import
cn.timer.api.dao.jxgl.JxglPerformanceAppraisalMapper
;
import
cn.timer.api.dao.jxgl.JxglPerformanceRatingMapper
;
import
cn.timer.api.dao.jxgl.JxglPerformanceRatingMapper
;
import
cn.timer.api.dao.jxgl.JxglProcessNodeMapper
;
import
cn.timer.api.dao.jxgl.JxglProcessNodeMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.jxgl.AppraisalAssessment
;
import
cn.timer.api.dto.jxgl.AppraisalAssessment
;
...
@@ -101,14 +100,10 @@ import io.swagger.annotations.ApiOperation;
...
@@ -101,14 +100,10 @@ import io.swagger.annotations.ApiOperation;
@Api
(
tags
=
"3.1绩效管理"
)
@Api
(
tags
=
"3.1绩效管理"
)
@RestController
@RestController
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@RequestMapping
(
value
=
"/jxgl"
,
@RequestMapping
(
value
=
"/jxgl"
,
produces
=
{
"application/json"
,
"multipart/form-data"
})
produces
=
{
"application/json"
,
"multipart/form-data"
})
public
class
JxglController
{
public
class
JxglController
{
@Autowired
@Autowired
private
QyzxEmpEntAssoMapper
qyzxEmpEntAssoMapper
;
@Autowired
private
ZzglBmgwMMapper
zzglBmgwMMapper
;
private
ZzglBmgwMMapper
zzglBmgwMMapper
;
@Autowired
@Autowired
...
@@ -132,7 +127,34 @@ public class JxglController {
...
@@ -132,7 +127,34 @@ public class JxglController {
@Autowired
@Autowired
private
JxglAppraisalIndicatorsAssessmentMapper
jxglAppraisalIndicatorsAssessmentMapper
;
private
JxglAppraisalIndicatorsAssessmentMapper
jxglAppraisalIndicatorsAssessmentMapper
;
//TODO 基础设置
@Autowired
private
ZzglBmgwMService
zzglBmgwMService
;
@Autowired
private
YgglService
ygglService
;
@Autowired
private
JxglPerformanceAppraisalMapper
jxglPerformanceAppraisalMapper
;
@Autowired
private
JxglAppraisalMapper
jxglAppraisalMapper
;
@Autowired
private
JxglAppraisalIndicatorsMapper
jxglAppraisalIndicatorsMapper
;
@Autowired
private
JxglAppraisalLogMapper
jxglAppraisalLogMapper
;
@Autowired
private
YgglMainEmpMapper
ygglMainEmpMapper
;
@Autowired
private
JxglProcessNodeMapper
jxglProcessNodeMapper
;
@Autowired
private
JxglAppraisalItemMapper
jxglAppraisalItemMapper
;
// TODO 基础设置
/**
/**
* 新增或编辑-基础设置
* 新增或编辑-基础设置
*/
*/
...
@@ -140,29 +162,29 @@ public class JxglController {
...
@@ -140,29 +162,29 @@ public class JxglController {
@ApiOperation
(
value
=
"1.新增或编辑-基础设置"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-审批模板组"
)
@ApiOperation
(
value
=
"1.新增或编辑-基础设置"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-审批模板组"
)
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
1
)
@Role
@Role
public
Result
<
Object
>
saveAtg
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
JxglBasicSetting
basicSetting
)
throws
Exception
{
public
Result
<
Object
>
saveAtg
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
JxglBasicSetting
basicSetting
)
throws
Exception
{
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
orgCode
=
userBean
.
getOrgCode
();
List
<
JxglPerformanceRating
>
listPr
=
basicSetting
.
getPerformanceRatings
();
List
<
JxglPerformanceRating
>
listPr
=
basicSetting
.
getPerformanceRatings
();
if
(
listPr
!=
null
)
{
if
(
listPr
!=
null
)
{
for
(
JxglPerformanceRating
pr
:
listPr
)
{
for
(
JxglPerformanceRating
pr
:
listPr
)
{
if
(
pr
.
getSectionMaxScore
()
>
basicSetting
.
getMaxScore
())
{
if
(
pr
.
getSectionMaxScore
()
>
basicSetting
.
getMaxScore
())
{
return
ResultUtil
.
error
(
"区间值不能超过
最高分"
);
return
ResultUtil
.
error
(
"区间值不能超过最高分"
);
}
else
if
(
pr
.
getSectionMinScore
()
>=
pr
.
getSectionMaxScore
())
{
}
else
if
(
pr
.
getSectionMinScore
()
>=
pr
.
getSectionMaxScore
())
{
return
ResultUtil
.
error
(
"区间值
设置不正确"
);
return
ResultUtil
.
error
(
"区间值设置不正确"
);
}
}
}
}
}
}
JxglBasicSetting
bS
=
jxglBasicSettingMapper
.
selectOne
(
new
QueryWrapper
<
JxglBasicSetting
>().
lambda
()
JxglBasicSetting
bS
=
jxglBasicSettingMapper
.
selectOne
(
new
QueryWrapper
<
JxglBasicSetting
>().
lambda
()
.
select
(
JxglBasicSetting:
:
getId
)
.
select
(
JxglBasicSetting:
:
getId
).
eq
(
JxglBasicSetting:
:
getOrgCode
,
orgCode
));
.
eq
(
JxglBasicSetting:
:
getOrgCode
,
orgCode
));
if
(
bS
!=
null
)
{
if
(
bS
!=
null
)
{
// 删除 绩效等级
// 删除 绩效等级
jxglPerformanceRatingMapper
.
delete
(
new
QueryWrapper
<
JxglPerformanceRating
>().
lambda
()
jxglPerformanceRatingMapper
.
delete
(
new
QueryWrapper
<
JxglPerformanceRating
>().
lambda
()
.
eq
(
JxglPerformanceRating:
:
getBasicSettingId
,
bS
.
getId
()));
.
eq
(
JxglPerformanceRating:
:
getBasicSettingId
,
bS
.
getId
()));
// 删除 基础设置
// 删除 基础设置
jxglBasicSettingMapper
.
delete
(
new
QueryWrapper
<
JxglBasicSetting
>().
lambda
()
jxglBasicSettingMapper
.
eq
(
JxglBasicSetting:
:
getOrgCode
,
orgCode
));
.
delete
(
new
QueryWrapper
<
JxglBasicSetting
>().
lambda
().
eq
(
JxglBasicSetting:
:
getOrgCode
,
orgCode
));
}
}
basicSetting
.
setOrgCode
(
orgCode
);
basicSetting
.
setOrgCode
(
orgCode
);
...
@@ -183,7 +205,7 @@ public class JxglController {
...
@@ -183,7 +205,7 @@ public class JxglController {
@ApiOperation
(
value
=
"2.查询-基础设置"
,
httpMethod
=
"GET"
,
notes
=
"查询-基础设置"
)
@ApiOperation
(
value
=
"2.查询-基础设置"
,
httpMethod
=
"GET"
,
notes
=
"查询-基础设置"
)
@ApiOperationSupport
(
order
=
2
)
@ApiOperationSupport
(
order
=
2
)
@Role
@Role
public
Result
<
Object
>
selectAT
(
@CurrentUser
UserBean
userBean
){
public
Result
<
Object
>
selectAT
(
@CurrentUser
UserBean
userBean
)
{
JxglBasicSetting
bS
=
jxglBasicSettingMapper
.
selectAll
(
userBean
.
getOrgCode
());
JxglBasicSetting
bS
=
jxglBasicSettingMapper
.
selectAll
(
userBean
.
getOrgCode
());
...
@@ -191,9 +213,7 @@ public class JxglController {
...
@@ -191,9 +213,7 @@ public class JxglController {
}
}
// TODO 考核模板
//TODO 考核模板
/**
/**
* 新增或编辑-考核模板
* 新增或编辑-考核模板
*/
*/
...
@@ -201,21 +221,25 @@ public class JxglController {
...
@@ -201,21 +221,25 @@ public class JxglController {
@ApiOperation
(
value
=
"3.新增或编辑-考核模板"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-考核模板"
)
@ApiOperation
(
value
=
"3.新增或编辑-考核模板"
,
httpMethod
=
"POST"
,
notes
=
"新增或编辑-考核模板"
)
@ApiOperationSupport
(
order
=
3
)
@ApiOperationSupport
(
order
=
3
)
@Role
@Role
public
Result
<
Object
>
saveAtg
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
JxglAppraisalT
jxglAppraisalT
)
throws
Exception
{
public
Result
<
Object
>
saveAtg
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
JxglAppraisalT
jxglAppraisalT
)
throws
Exception
{
if
(
jxglAppraisalT
.
getId
()
!=
null
&&
jxglAppraisalT
.
selectCount
(
new
QueryWrapper
<
JxglAppraisalT
>().
lambda
()
if
(
jxglAppraisalT
.
getId
()
!=
null
&&
jxglAppraisalT
.
selectCount
(
.
eq
(
JxglAppraisalT:
:
getId
,
jxglAppraisalT
.
getId
()))
>
0
)
{
new
QueryWrapper
<
JxglAppraisalT
>().
lambda
()
.
eq
(
JxglAppraisalT:
:
getId
,
jxglAppraisalT
.
getId
()))
>
0
)
{
jxglAppraisalT
.
updateById
();
jxglAppraisalT
.
updateById
();
}
else
{
}
else
{
jxglAppraisalT
.
setOrgCode
(
userBean
.
getOrgCode
());
jxglAppraisalT
.
setOrgCode
(
userBean
.
getOrgCode
());
jxglAppraisalT
.
insert
();
jxglAppraisalT
.
insert
();
}
}
LambdaQueryWrapper
<
JxglAppraisalIndicatorsT
>
q
=
new
QueryWrapper
<
JxglAppraisalIndicatorsT
>().
lambda
()
LambdaQueryWrapper
<
JxglAppraisalIndicatorsT
>
q
=
new
QueryWrapper
<
JxglAppraisalIndicatorsT
>().
lambda
()
.
eq
(
JxglAppraisalIndicatorsT:
:
getAppraisalTId
,
jxglAppraisalT
.
getId
());
.
eq
(
JxglAppraisalIndicatorsT:
:
getAppraisalTId
,
jxglAppraisalT
.
getId
());
List
<
JxglAppraisalIndicatorsT
>
listAIT
=
jxglAppraisalIndicatorsTMapper
.
selectList
(
q
.
select
(
JxglAppraisalIndicatorsT:
:
getId
));
List
<
JxglAppraisalIndicatorsT
>
listAIT
=
jxglAppraisalIndicatorsTMapper
.
selectList
(
q
.
select
(
JxglAppraisalIndicatorsT:
:
getId
));
List
<
Integer
>
listAITId
=
listAIT
!=
null
&&
listAIT
.
size
()
>
0
?
listAIT
.
stream
().
map
(
JxglAppraisalIndicatorsT:
:
getId
).
collect
(
Collectors
.
toList
())
:
null
;
List
<
Integer
>
listAITId
=
listAIT
!=
null
&&
listAIT
.
size
()
>
0
?
listAIT
.
stream
().
map
(
JxglAppraisalIndicatorsT:
:
getId
).
collect
(
Collectors
.
toList
())
:
null
;
// 删除 原 考核指标模板
// 删除 原 考核指标模板
jxglAppraisalIndicatorsTMapper
.
delete
(
q
);
jxglAppraisalIndicatorsTMapper
.
delete
(
q
);
...
@@ -226,7 +250,16 @@ public class JxglController {
...
@@ -226,7 +250,16 @@ public class JxglController {
}
}
List
<
JxglAppraisalIndicatorsT
>
aITs
=
jxglAppraisalT
.
getAppraisalIndicatorsTs
();
List
<
JxglAppraisalIndicatorsT
>
aITs
=
jxglAppraisalT
.
getAppraisalIndicatorsTs
();
if
(
aITs
!=
null
&&
aITs
.
size
()
>
0
)
{
for
(
JxglAppraisalIndicatorsT
aIT
:
aITs
)
{
for
(
JxglAppraisalIndicatorsT
aIT
:
aITs
)
{
if
(
aIT
.
getIsEditWeight
()
==
null
)
{
throw
new
CustomException
(
"权重编辑权限未设置"
);
}
if
(
aIT
.
getType
()
==
null
)
{
throw
new
CustomException
(
"指标类型未设置"
);
}
aIT
.
setAppraisalTId
(
jxglAppraisalT
.
getId
());
aIT
.
setAppraisalTId
(
jxglAppraisalT
.
getId
());
// 新增 考核指标模板
// 新增 考核指标模板
if
(
aIT
.
insert
())
{
if
(
aIT
.
insert
())
{
...
@@ -236,16 +269,15 @@ public class JxglController {
...
@@ -236,16 +269,15 @@ public class JxglController {
aItemTs
.
stream
().
forEach
(
aItemT
->
aItemT
.
setAppraisalIndicatorsTId
(
aIT
.
getId
()));
aItemTs
.
stream
().
forEach
(
aItemT
->
aItemT
.
setAppraisalIndicatorsTId
(
aIT
.
getId
()));
int
c
=
jsxglAppraisalItemTMapper
.
insertList
(
aItemTs
);
int
c
=
jsxglAppraisalItemTMapper
.
insertList
(
aItemTs
);
}
}
}
else
{
}
else
{
throw
new
Exception
();
throw
new
Exception
();
}
}
}
}
}
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
}
/**
/**
* 查询-考核模板-列表
* 查询-考核模板-列表
*/
*/
...
@@ -253,12 +285,12 @@ public class JxglController {
...
@@ -253,12 +285,12 @@ public class JxglController {
@ApiOperation
(
value
=
"4.查询-考核模板-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-考核模板-列表"
)
@ApiOperation
(
value
=
"4.查询-考核模板-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-考核模板-列表"
)
@ApiOperationSupport
(
order
=
4
)
@ApiOperationSupport
(
order
=
4
)
@Role
@Role
public
Result
<
Object
>
selectListAT
(
@CurrentUser
UserBean
userBean
,
@RequestBody
cn
.
timer
.
api
.
utils
.
Page
page
)
{
public
Result
<
Object
>
selectListAT
(
@CurrentUser
UserBean
userBean
,
@RequestBody
cn
.
timer
.
api
.
utils
.
Page
page
)
{
IPage
<
JxglAppraisalT
>
p
=
new
Page
<
JxglAppraisalT
>(
page
.
getCurrentPage
(),
page
.
getTotalPage
());
IPage
<
JxglAppraisalT
>
p
=
new
Page
<
JxglAppraisalT
>(
page
.
getCurrentPage
(),
page
.
getTotalPage
());
IPage
<
JxglAppraisalT
>
pageAT
=
jxglAppraisalTMapper
.
selectPage
(
p
,
new
QueryWrapper
<
JxglAppraisalT
>().
lambda
()
IPage
<
JxglAppraisalT
>
pageAT
=
jxglAppraisalTMapper
.
selectPage
(
p
,
.
eq
(
JxglAppraisalT:
:
getOrgCode
,
userBean
.
getOrgCode
()));
new
QueryWrapper
<
JxglAppraisalT
>().
lambda
()
.
eq
(
JxglAppraisalT:
:
getOrgCode
,
userBean
.
getOrgCode
()));
List
<
JxglAppraisalT
>
listAT
=
pageAT
.
getRecords
();
List
<
JxglAppraisalT
>
listAT
=
pageAT
.
getRecords
();
...
@@ -273,7 +305,7 @@ public class JxglController {
...
@@ -273,7 +305,7 @@ public class JxglController {
@ApiOperation
(
value
=
"5.查询-考核模板-详情"
,
httpMethod
=
"GET"
,
notes
=
"查询-考核模板-详情"
)
@ApiOperation
(
value
=
"5.查询-考核模板-详情"
,
httpMethod
=
"GET"
,
notes
=
"查询-考核模板-详情"
)
@ApiOperationSupport
(
order
=
5
)
@ApiOperationSupport
(
order
=
5
)
@Role
@Role
public
Result
<
Object
>
selectAT
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
public
Result
<
Object
>
selectAT
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
JxglAppraisalT
aT
=
jxglAppraisalTMapper
.
selectDetailById
(
id
);
JxglAppraisalT
aT
=
jxglAppraisalTMapper
.
selectDetailById
(
id
);
...
@@ -288,50 +320,26 @@ public class JxglController {
...
@@ -288,50 +320,26 @@ public class JxglController {
@ApiOperation
(
value
=
"6.删除-考核模板"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-考核模板"
)
@ApiOperation
(
value
=
"6.删除-考核模板"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-考核模板"
)
@ApiOperationSupport
(
order
=
6
)
@ApiOperationSupport
(
order
=
6
)
@Role
@Role
public
Result
<
Object
>
delAT
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
throws
Exception
{
public
Result
<
Object
>
delAT
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
throws
Exception
{
jxglAppraisalTMapper
.
delete
(
new
QueryWrapper
<
JxglAppraisalT
>().
lambda
()
jxglAppraisalTMapper
.
delete
(
new
QueryWrapper
<
JxglAppraisalT
>().
lambda
().
eq
(
JxglAppraisalT:
:
getId
,
id
)
.
eq
(
JxglAppraisalT:
:
getId
,
id
)
.
eq
(
JxglAppraisalT:
:
getOrgCode
,
userBean
.
getOrgCode
()));
.
eq
(
JxglAppraisalT:
:
getOrgCode
,
userBean
.
getOrgCode
()));
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
}
@Autowired
private
ZzglBmgwMService
zzglBmgwMService
;
@Autowired
private
YgglService
ygglService
;
@Autowired
private
JxglPerformanceAppraisalMapper
jxglPerformanceAppraisalMapper
;
@Autowired
private
JxglAppraisalMapper
jxglAppraisalMapper
;
@Autowired
private
JxglAppraisalIndicatorsMapper
jxglAppraisalIndicatorsMapper
;
@Autowired
private
JxglAppraisalItemMapper
jsxglAppraisalItemMapper
;
@Autowired
private
JxglAppraisalLogMapper
jxglAppraisalLogMapper
;
@Autowired
private
YgglMainEmpMapper
ygglMainEmpMapper
;
/**
/**
* 新增-绩效考核
* 新增-绩效考核
*/
*/
@PostMapping
(
value
=
"/save_performance_appraisal"
)
@PostMapping
(
value
=
"/save_performance_appraisal"
)
@ApiOperation
(
value
=
"7.新增-绩效考核"
,
httpMethod
=
"POST"
,
notes
=
"新增-绩效考核"
)
@ApiOperation
(
value
=
"7.新增-绩效考核"
,
httpMethod
=
"POST"
,
notes
=
"新增-绩效考核"
)
@ApiOperationSupport
(
order
=
7
)
@ApiOperationSupport
(
order
=
7
)
public
Result
<
Object
>
savePA
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
PerformanceAppraisal
performanceAppraisal
)
throws
Exception
{
public
Result
<
Object
>
savePA
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
PerformanceAppraisal
performanceAppraisal
)
throws
Exception
{
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
orgCode
=
userBean
.
getOrgCode
();
JxglPerformanceAppraisal
pA
=
JxglPerformanceAppraisal
.
builder
().
build
();
JxglPerformanceAppraisal
pA
=
JxglPerformanceAppraisal
.
builder
().
build
();
BeanUtil
.
copyProperties
(
performanceAppraisal
,
pA
,
"processNode"
,
"beingAppraisalPerson"
,
"appraisalTId"
);
BeanUtil
.
copyProperties
(
performanceAppraisal
,
pA
,
"processNode"
,
"beingAppraisalPerson"
,
"appraisalTId"
);
List
<
ProcessNode
>
listPN
=
performanceAppraisal
.
getProcessNode
();
List
<
ProcessNode
>
listPN
=
performanceAppraisal
.
getProcessNode
();
List
<
BeingAppraisalPerson
>
listBAP
=
performanceAppraisal
.
getBeingAppraisalPerson
();
List
<
BeingAppraisalPerson
>
listBAP
=
performanceAppraisal
.
getBeingAppraisalPerson
();
...
@@ -341,39 +349,32 @@ public class JxglController {
...
@@ -341,39 +349,32 @@ public class JxglController {
// 被考核人员
// 被考核人员
List
<
Integer
>
listEmpId
=
listBAP
.
stream
()
List
<
Integer
>
listEmpId
=
listBAP
.
stream
()
.
filter
(
bAP
->
.
filter
(
bAP
->
BeingAppraisalType
.
EMPLOYEE
.
getType
().
equals
(
bAP
.
getType
())
BeingAppraisalType
.
EMPLOYEE
.
getType
().
equals
(
bAP
.
getType
())
&&
&&
BeingAppraisalSts
.
NEED
.
getType
().
equals
(
bAP
.
getSts
()))
BeingAppraisalSts
.
NEED
.
getType
().
equals
(
bAP
.
getSts
()))
.
map
(
BeingAppraisalPerson:
:
getId
).
collect
(
Collectors
.
toList
());
.
map
(
BeingAppraisalPerson:
:
getId
)
.
collect
(
Collectors
.
toList
());
// 被考核部门id
// 被考核部门id
List
<
Integer
>
listDeptId
=
listBAP
.
stream
()
List
<
Integer
>
listDeptId
=
listBAP
.
stream
()
.
filter
(
bAP
->
.
filter
(
bAP
->
BeingAppraisalType
.
DEPARTMENT
.
getType
().
equals
(
bAP
.
getType
()))
BeingAppraisalType
.
DEPARTMENT
.
getType
().
equals
(
bAP
.
getType
()))
.
map
(
BeingAppraisalPerson:
:
getId
).
collect
(
Collectors
.
toList
());
.
map
(
BeingAppraisalPerson:
:
getId
)
.
collect
(
Collectors
.
toList
());
List
<
YgglMainEmp
>
listEmp2
=
ListUtil
.
toList
();
List
<
YgglMainEmp
>
listEmp2
=
ListUtil
.
toList
();
for
(
Integer
deptId
:
listDeptId
)
{
for
(
Integer
deptId
:
listDeptId
)
{
CollUtil
.
addAll
(
listEmp2
,
zzglBmgwMService
.
selectOtherlistent
(
userBean
.
getOrgCode
(),
deptId
));
CollUtil
.
addAll
(
listEmp2
,
zzglBmgwMService
.
selectOtherlistent
(
userBean
.
getOrgCode
(),
deptId
));
}
}
if
(!
CollUtil
.
isEmpty
(
listEmp2
))
{
if
(!
CollUtil
.
isEmpty
(
listEmp2
))
{
// 员工信息数据 去重
// 员工信息数据 去重
List
<
Integer
>
listEmp2Id
=
listEmp2
.
stream
()
List
<
Integer
>
listEmp2Id
=
listEmp2
.
stream
().
filter
(
StreamUtils
.
distinctByKey
(
e
->
e
.
getEmpNum
()))
.
filter
(
StreamUtils
.
distinctByKey
(
e
->
e
.
getEmpNum
()))
.
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
.
map
(
YgglMainEmp:
:
getEmpNum
)
.
collect
(
Collectors
.
toList
());
// 合并 集合
// 合并 集合
CollUtil
.
addAll
(
listEmpId
,
listEmp2Id
);
CollUtil
.
addAll
(
listEmpId
,
listEmp2Id
);
}
}
// 无需被考核人id
// 无需被考核人id
List
<
Integer
>
listNotEmpId
=
listBAP
.
stream
()
List
<
Integer
>
listNotEmpId
=
listBAP
.
stream
()
.
filter
(
bAP
->
.
filter
(
bAP
->
BeingAppraisalType
.
EMPLOYEE
.
getType
().
equals
(
bAP
.
getType
())
BeingAppraisalType
.
EMPLOYEE
.
getType
().
equals
(
bAP
.
getType
())
&&
&&
BeingAppraisalSts
.
NOT_NEED
.
getType
().
equals
(
bAP
.
getSts
()))
BeingAppraisalSts
.
NOT_NEED
.
getType
().
equals
(
bAP
.
getSts
()))
.
map
(
BeingAppraisalPerson:
:
getId
).
collect
(
Collectors
.
toList
());
.
map
(
BeingAppraisalPerson:
:
getId
)
.
collect
(
Collectors
.
toList
());
// 去重+过滤掉 无需被考核人id
// 去重+过滤掉 无需被考核人id
listEmpId
=
listEmpId
.
stream
().
filter
(
e
->
!
listNotEmpId
.
contains
(
e
)).
distinct
().
collect
(
Collectors
.
toList
());
listEmpId
=
listEmpId
.
stream
().
filter
(
e
->
!
listNotEmpId
.
contains
(
e
)).
distinct
().
collect
(
Collectors
.
toList
());
...
@@ -392,7 +393,7 @@ public class JxglController {
...
@@ -392,7 +393,7 @@ public class JxglController {
JxglAppraisalItem
appraisalItem
=
JxglAppraisalItem
.
builder
().
build
();
JxglAppraisalItem
appraisalItem
=
JxglAppraisalItem
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
System
.
out
.
println
(
"listEmpId----"
+
listEmpId
);
System
.
out
.
println
(
"listEmpId----"
+
listEmpId
);
for
(
Integer
bAP
:
listEmpId
)
{
for
(
Integer
bAP
:
listEmpId
)
{
// 考核
// 考核
appraisal
.
setPerformanceAppraisalId
(
pA
.
getId
());
appraisal
.
setPerformanceAppraisalId
(
pA
.
getId
());
...
@@ -404,20 +405,6 @@ public class JxglController {
...
@@ -404,20 +405,6 @@ public class JxglController {
appraisal
.
insert
();
appraisal
.
insert
();
System
.
out
.
println
(
"新增 考核:"
+
appraisal
);
System
.
out
.
println
(
"新增 考核:"
+
appraisal
);
// List<Integer> weights = listPN.stream()
// .filter(p -> ProcessType.SELF_ASSESSMENT.getType().equals(p.getProcessType()) ||
// ProcessType.SUPERIOR_SCORE.getType().equals(p.getProcessType()))
// .map(ProcessNode::getWeight)
// .collect(Collectors.toList());
// Integer weightSum = 0;
// if (weights != null && weights.size() > 0) {
// for (Integer i : weights) {
// weightSum += i;
// }
// if (!weightSum.equals(100))
// throw new CustomException("权重总和要等于 100%");
// }
listPN
.
stream
().
forEach
(
pN
->
{
listPN
.
stream
().
forEach
(
pN
->
{
Integer
executeType
=
pN
.
getExecuteType
();
Integer
executeType
=
pN
.
getExecuteType
();
// 流程节点
// 流程节点
...
@@ -429,16 +416,17 @@ public class JxglController {
...
@@ -429,16 +416,17 @@ public class JxglController {
processNode
.
setProcessType
(
processType
);
processNode
.
setProcessType
(
processType
);
if
(
ProcessType
.
TARGET_FILL_IN
.
getType
().
equals
(
processType
))
{
if
(
ProcessType
.
TARGET_FILL_IN
.
getType
().
equals
(
processType
))
{
processNode
.
setSts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
());
processNode
.
setSts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
());
}
else
{
}
else
{
processNode
.
setSts
(
ProcessNodeSts
.
NON_EXECUTION
.
getType
());
processNode
.
setSts
(
ProcessNodeSts
.
NON_EXECUTION
.
getType
());
}
}
processNode
.
setWeight
(
pN
.
getWeight
());
processNode
.
setWeight
(
pN
.
getWeight
());
if
(
ExecuteType
.
BEING_APPRAISAL_PERSON
.
getType
().
equals
(
executeType
))
{
if
(
ExecuteType
.
BEING_APPRAISAL_PERSON
.
getType
().
equals
(
executeType
))
{
processNode
.
setExecutorId
(
bAP
);
processNode
.
setExecutorId
(
bAP
);
}
else
if
(
ExecuteType
.
LEADER
.
getType
().
equals
(
executeType
))
{
}
else
if
(
ExecuteType
.
LEADER
.
getType
().
equals
(
executeType
))
{
processNode
.
setExecutorId
(
ygglService
.
selectLeaderEmpNumById
(
userBean
.
getOrgCode
(),
bAP
,
pN
.
getLeaderTier
()));
processNode
.
setExecutorId
(
}
else
if
(
ExecuteType
.
SPECIFIED_MEMBER
.
getType
().
equals
(
executeType
))
{
ygglService
.
selectLeaderEmpNumById
(
userBean
.
getOrgCode
(),
bAP
,
pN
.
getLeaderTier
()));
}
else
if
(
ExecuteType
.
SPECIFIED_MEMBER
.
getType
().
equals
(
executeType
))
{
processNode
.
setExecutorId
(
pN
.
getExecutorId
());
processNode
.
setExecutorId
(
pN
.
getExecutorId
());
}
}
// 新增 流程节点
// 新增 流程节点
...
@@ -447,10 +435,13 @@ public class JxglController {
...
@@ -447,10 +435,13 @@ public class JxglController {
});
});
List
<
JxglAppraisalIndicatorsT
>
listAIT
=
jxglAppraisalIndicatorsTMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicatorsT
>().
lambda
()
List
<
JxglAppraisalIndicatorsT
>
listAIT
=
jxglAppraisalIndicatorsTMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicatorsT
>().
lambda
()
.
eq
(
JxglAppraisalIndicatorsT:
:
getAppraisalTId
,
aT
.
getId
())
.
eq
(
JxglAppraisalIndicatorsT:
:
getAppraisalTId
,
aT
.
getId
())
.
ne
(
aT
.
getIsUseFixd
()
==
1
,
JxglAppraisalIndicatorsT:
:
getType
,
IndicatorsType
.
FIXATION
.
getType
())
.
ne
(
aT
.
getIsUseFixd
()
==
1
,
JxglAppraisalIndicatorsT:
:
getType
,
.
ne
(
aT
.
getIsUseNotFixd
()
==
1
,
JxglAppraisalIndicatorsT:
:
getType
,
IndicatorsType
.
NOT_FIXATION
.
getType
()));
IndicatorsType
.
FIXATION
.
getType
())
.
ne
(
aT
.
getIsUseNotFixd
()
==
1
,
JxglAppraisalIndicatorsT:
:
getType
,
IndicatorsType
.
NOT_FIXATION
.
getType
()));
if
(
listAIT
==
null
||
listAIT
.
size
()
<=
0
)
{
if
(
listAIT
==
null
||
listAIT
.
size
()
<=
0
)
{
throw
new
CustomException
(
"考核指标不存在"
);
throw
new
CustomException
(
"考核指标不存在"
);
...
@@ -464,7 +455,8 @@ public class JxglController {
...
@@ -464,7 +455,8 @@ public class JxglController {
appraisalIndicators
.
insert
();
appraisalIndicators
.
insert
();
// System.out.println("新增 考核指标:" + appraisalIndicators);
// System.out.println("新增 考核指标:" + appraisalIndicators);
List
<
JxglAppraisalItemT
>
listAItemT
=
jsxglAppraisalItemTMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalItemT
>().
lambda
()
List
<
JxglAppraisalItemT
>
listAItemT
=
jsxglAppraisalItemTMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalItemT
>().
lambda
()
.
eq
(
JxglAppraisalItemT:
:
getAppraisalIndicatorsTId
,
aIT
.
getId
()));
.
eq
(
JxglAppraisalItemT:
:
getAppraisalIndicatorsTId
,
aIT
.
getId
()));
if
(
listAItemT
!=
null
&&
listAItemT
.
size
()
>
0
)
{
if
(
listAItemT
!=
null
&&
listAItemT
.
size
()
>
0
)
{
...
@@ -481,9 +473,7 @@ public class JxglController {
...
@@ -481,9 +473,7 @@ public class JxglController {
});
});
YgglMainEmp
yME
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
YgglMainEmp
yME
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
select
(
YgglMainEmp:
:
getName
)
.
select
(
YgglMainEmp:
:
getName
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
bAP
));
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
bAP
));
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setExecutorId
(
bAP
);
appraisalLog
.
setExecutorId
(
bAP
);
...
@@ -502,10 +492,10 @@ public class JxglController {
...
@@ -502,10 +492,10 @@ public class JxglController {
@ApiOperation
(
value
=
"8.删除-绩效考核"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-绩效考核"
)
@ApiOperation
(
value
=
"8.删除-绩效考核"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-绩效考核"
)
@ApiOperationSupport
(
order
=
8
)
@ApiOperationSupport
(
order
=
8
)
@Role
@Role
public
Result
<
Object
>
deletePA
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
public
Result
<
Object
>
deletePA
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglPerformanceAppraisal
>().
lambda
()
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
eq
(
JxglPerformanceAppraisal:
:
getId
,
id
)
.
selectOne
(
new
QueryWrapper
<
JxglPerformanceAppraisal
>().
lambda
().
eq
(
JxglPerformanceAppraisal:
:
getId
,
id
)
.
eq
(
JxglPerformanceAppraisal:
:
getOrgCode
,
userBean
.
getOrgCode
()));
.
eq
(
JxglPerformanceAppraisal:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
pA
==
null
)
{
if
(
pA
==
null
)
{
...
@@ -516,10 +506,10 @@ public class JxglController {
...
@@ -516,10 +506,10 @@ public class JxglController {
List
<
Integer
>
aIIds
=
CollUtil
.
toList
();
List
<
Integer
>
aIIds
=
CollUtil
.
toList
();
List
<
JxglAppraisal
>
listA
=
jxglAppraisalMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
List
<
JxglAppraisal
>
listA
=
jxglAppraisalMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
select
(
JxglAppraisal:
:
getId
)
.
select
(
JxglAppraisal:
:
getId
).
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
pA
.
getId
()));
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
pA
.
getId
()));
aIds
=
listA
!=
null
&&
listA
.
size
()
>
0
?
listA
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
())
:
aIds
;
aIds
=
listA
!=
null
&&
listA
.
size
()
>
0
?
listA
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
())
:
aIds
;
// 删除 绩效考核
// 删除 绩效考核
jxglPerformanceAppraisalMapper
.
deleteById
(
id
);
jxglPerformanceAppraisalMapper
.
deleteById
(
id
);
...
@@ -542,19 +532,22 @@ public class JxglController {
...
@@ -542,19 +532,22 @@ public class JxglController {
.
eq
(
aIds
.
size
()
==
1
,
JxglAppraisalLog:
:
getAppraisalId
,
aIds
)
.
eq
(
aIds
.
size
()
==
1
,
JxglAppraisalLog:
:
getAppraisalId
,
aIds
)
.
in
(
aIds
.
size
()
>
1
,
JxglAppraisalLog:
:
getAppraisalId
,
aIds
));
.
in
(
aIds
.
size
()
>
1
,
JxglAppraisalLog:
:
getAppraisalId
,
aIds
));
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
.
select
(
JxglAppraisalIndicators:
:
getId
)
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
.
select
(
JxglAppraisalIndicators:
:
getId
)
.
eq
(
aIds
.
size
()
==
1
,
JxglAppraisalIndicators:
:
getAppraisalId
,
aIds
)
.
eq
(
aIds
.
size
()
==
1
,
JxglAppraisalIndicators:
:
getAppraisalId
,
aIds
)
.
in
(
aIds
.
size
()
>
1
,
JxglAppraisalIndicators:
:
getAppraisalId
,
aIds
));
.
in
(
aIds
.
size
()
>
1
,
JxglAppraisalIndicators:
:
getAppraisalId
,
aIds
));
aIIds
=
listAI
!=
null
&&
listAI
.
size
()
>
0
?
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getId
).
collect
(
Collectors
.
toList
())
:
aIIds
;
aIIds
=
listAI
!=
null
&&
listAI
.
size
()
>
0
?
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getId
).
collect
(
Collectors
.
toList
())
:
aIIds
;
if
(
aIIds
.
size
()
>
0
)
{
if
(
aIIds
.
size
()
>
0
)
{
jxglAppraisalIndicatorsMapper
.
deleteBatchIds
(
aIIds
);
jxglAppraisalIndicatorsMapper
.
deleteBatchIds
(
aIIds
);
// 批量删除 考核指标评定
// 批量删除 考核指标评定
jxglAppraisalIndicatorsAssessmentMapper
.
delete
(
new
QueryWrapper
<
JxglAppraisalIndicatorsAssessment
>().
lambda
()
jxglAppraisalIndicatorsAssessmentMapper
.
delete
(
new
QueryWrapper
<
JxglAppraisalIndicatorsAssessment
>()
.
lambda
()
.
eq
(
aIds
.
size
()
==
1
,
JxglAppraisalIndicatorsAssessment:
:
getAppraisalIndicatorsId
,
aIIds
)
.
eq
(
aIds
.
size
()
==
1
,
JxglAppraisalIndicatorsAssessment:
:
getAppraisalIndicatorsId
,
aIIds
)
.
in
(
aIds
.
size
()
>
1
,
JxglAppraisalIndicatorsAssessment:
:
getAppraisalIndicatorsId
,
aIIds
));
.
in
(
aIds
.
size
()
>
1
,
JxglAppraisalIndicatorsAssessment:
:
getAppraisalIndicatorsId
,
aIIds
));
...
@@ -575,12 +568,13 @@ public class JxglController {
...
@@ -575,12 +568,13 @@ public class JxglController {
@PostMapping
(
value
=
"/update_performance_appraisal_sts"
)
@PostMapping
(
value
=
"/update_performance_appraisal_sts"
)
@ApiOperation
(
value
=
"8.修改-绩效管理状态"
,
httpMethod
=
"POST"
,
notes
=
"修改-绩效管理状态"
)
@ApiOperation
(
value
=
"8.修改-绩效管理状态"
,
httpMethod
=
"POST"
,
notes
=
"修改-绩效管理状态"
)
@ApiOperationSupport
(
order
=
8
)
@ApiOperationSupport
(
order
=
8
)
public
Result
<
Object
>
updatePAS
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalUpdateSts
appraisalUpdateSts
){
public
Result
<
Object
>
updatePAS
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AppraisalUpdateSts
appraisalUpdateSts
)
{
JxglPerformanceAppraisal
performanceAppraisal
=
jxglPerformanceAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglPerformanceAppraisal
>().
lambda
()
JxglPerformanceAppraisal
performanceAppraisal
=
jxglPerformanceAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglPerformanceAppraisal
>().
lambda
()
.
eq
(
JxglPerformanceAppraisal:
:
getId
,
appraisalUpdateSts
.
getId
())
.
eq
(
JxglPerformanceAppraisal:
:
getId
,
appraisalUpdateSts
.
getId
())
.
eq
(
JxglPerformanceAppraisal:
:
getSts
,
appraisalUpdateSts
.
getSts
())
.
eq
(
JxglPerformanceAppraisal:
:
getSts
,
appraisalUpdateSts
.
getSts
()));
);
if
(
performanceAppraisal
==
null
)
{
if
(
performanceAppraisal
==
null
)
{
return
ResultUtil
.
error
(
"绩效考核不存在"
);
return
ResultUtil
.
error
(
"绩效考核不存在"
);
...
@@ -597,45 +591,40 @@ public class JxglController {
...
@@ -597,45 +591,40 @@ public class JxglController {
List
<
JxglProcessNode
>
listPN
=
CollUtil
.
toList
();
List
<
JxglProcessNode
>
listPN
=
CollUtil
.
toList
();
List
<
Integer
>
pNIds
=
CollUtil
.
toList
();
List
<
Integer
>
pNIds
=
CollUtil
.
toList
();
switch
(
performanceAppraisal
.
getSts
())
{
switch
(
performanceAppraisal
.
getSts
())
{
case
0
:
case
0
:
sts
=
PerformanceAppraisalSts
.
PERFORMANCE_SCORE
.
getType
();
sts
=
PerformanceAppraisalSts
.
PERFORMANCE_SCORE
.
getType
();
listA
=
jxglAppraisalMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
listA
=
jxglAppraisalMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
select
(
JxglAppraisal:
:
getId
)
.
select
(
JxglAppraisal:
:
getId
).
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
id
));
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
id
));
if
(
listA
!=
null
&&
listA
.
size
()
>
0
)
{
if
(
listA
!=
null
&&
listA
.
size
()
>
0
)
{
aIds
=
listA
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
());
aIds
=
listA
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
());
listPN
=
jxglProcessNodeMapper
.
selectList
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
listPN
=
jxglProcessNodeMapper
.
selectList
(
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
EXECUTED
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
EXECUTED
.
getType
()));
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
"1------"
+
aIds
);
listPN
=
jxglProcessNodeMapper
.
selectList
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
listPN
=
jxglProcessNodeMapper
.
selectList
(
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SELF_ASSESSMENT
.
getType
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SELF_ASSESSMENT
.
getType
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
NON_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
NON_EXECUTION
.
getType
()));
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
pNIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getId
).
collect
(
Collectors
.
toList
());
pNIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getId
).
collect
(
Collectors
.
toList
());
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
"2------"
+
pNIds
);
System
.
out
.
println
(
"3------"
+
aIds
);
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
().
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getId
,
pNIds
));
Jxgl
Appraisal
.
builder
().
sts
(
AppraisalSts
.
SELF_ASSESSMENT
.
getType
()).
build
().
update
(
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
()
Jxgl
ProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
().
update
(
.
in
(
JxglAppraisal:
:
getId
,
a
Ids
));
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
().
in
(
JxglProcessNode:
:
getId
,
pN
Ids
));
}
JxglAppraisal
.
builder
().
sts
(
AppraisalSts
.
SELF_ASSESSMENT
.
getType
()).
build
()
.
update
(
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
().
in
(
JxglAppraisal:
:
getId
,
aIds
));
}
}
}
}
}
break
;
break
;
...
@@ -643,76 +632,70 @@ public class JxglController {
...
@@ -643,76 +632,70 @@ public class JxglController {
sts
=
PerformanceAppraisalSts
.
RESULT_VERIFICATION
.
getType
();
sts
=
PerformanceAppraisalSts
.
RESULT_VERIFICATION
.
getType
();
listA
=
jxglAppraisalMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
listA
=
jxglAppraisalMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
select
(
JxglAppraisal:
:
getId
)
.
select
(
JxglAppraisal:
:
getId
).
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
id
));
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
id
));
if
(
listA
!=
null
&&
listA
.
size
()
>
0
)
{
if
(
listA
!=
null
&&
listA
.
size
()
>
0
)
{
aIds
=
listA
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
());
aIds
=
listA
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
());
listPN
=
jxglProcessNodeMapper
.
selectList
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
listPN
=
jxglProcessNodeMapper
.
selectList
(
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SUPERIOR_SCORE
.
getType
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SUPERIOR_SCORE
.
getType
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
EXECUTED
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
EXECUTED
.
getType
()));
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
listPN
=
jxglProcessNodeMapper
.
selectList
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
listPN
=
jxglProcessNodeMapper
.
selectList
(
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
RESULT_VERIFICATION
.
getType
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
RESULT_VERIFICATION
.
getType
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
NON_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
NON_EXECUTION
.
getType
()));
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
pNIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getId
).
collect
(
Collectors
.
toList
());
pNIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getId
).
collect
(
Collectors
.
toList
());
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
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
()
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
().
update
(
.
in
(
JxglProcessNode:
:
getId
,
pNIds
));
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getId
,
pNIds
));
JxglAppraisal
.
builder
().
sts
(
AppraisalSts
.
RESULT_VERIFICATION
.
getType
()).
build
()
.
update
(
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
.
builder
().
sts
(
AppraisalSts
.
RESULT_VERIFICATION
.
getType
()).
build
()
.
in
(
JxglAppraisal:
:
getId
,
aIds
));
.
update
(
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
().
in
(
JxglAppraisal:
:
getId
,
aIds
));
}
}
}
}
}
}
break
;
break
;
case
2
:
case
2
:
sts
=
PerformanceAppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
();
sts
=
PerformanceAppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
();
listA
=
jxglAppraisalMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
listA
=
jxglAppraisalMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
select
(
JxglAppraisal:
:
getId
)
.
select
(
JxglAppraisal:
:
getId
).
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
id
));
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
id
));
if
(
listA
!=
null
&&
listA
.
size
()
>
0
)
{
if
(
listA
!=
null
&&
listA
.
size
()
>
0
)
{
aIds
=
listA
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
());
aIds
=
listA
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
());
listPN
=
jxglProcessNodeMapper
.
selectList
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
listPN
=
jxglProcessNodeMapper
.
selectList
(
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
RESULT_VERIFICATION
.
getType
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
RESULT_VERIFICATION
.
getType
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
EXECUTED
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
EXECUTED
.
getType
()));
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
collect
(
Collectors
.
toList
());
listPN
=
jxglProcessNodeMapper
.
selectList
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
listPN
=
jxglProcessNodeMapper
.
selectList
(
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getAppraisalId
,
aIds
)
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
NON_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
NON_EXECUTION
.
getType
()));
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
if
(
listPN
!=
null
&&
listPN
.
size
()
>
0
)
{
pNIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getId
).
collect
(
Collectors
.
toList
());
pNIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getId
).
collect
(
Collectors
.
toList
());
aIds
=
listPN
.
stream
().
map
(
JxglProcessNode:
:
getAppraisalId
).
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
()
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
().
update
(
.
in
(
JxglProcessNode:
:
getId
,
pNIds
));
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getId
,
pNIds
));
JxglAppraisal
.
builder
().
sts
(
AppraisalSts
.
SELF_ASSESSMENT
.
getType
()).
build
()
.
update
(
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
.
builder
().
sts
(
AppraisalSts
.
SELF_ASSESSMENT
.
getType
()).
build
()
.
in
(
JxglAppraisal:
:
getId
,
aIds
));
.
update
(
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
().
in
(
JxglAppraisal:
:
getId
,
aIds
));
}
}
}
}
}
}
break
;
break
;
default
:
default
:
...
@@ -720,19 +703,15 @@ public class JxglController {
...
@@ -720,19 +703,15 @@ public class JxglController {
}
}
// 修改 绩效考核状态
// 修改 绩效考核状态
jxglPerformanceAppraisalMapper
.
updateById
(
JxglPerformanceAppraisal
.
builder
()
jxglPerformanceAppraisalMapper
.
id
(
appraisalUpdateSts
.
getId
())
.
updateById
(
JxglPerformanceAppraisal
.
builder
().
id
(
appraisalUpdateSts
.
getId
()).
sts
(
sts
).
build
());
.
sts
(
sts
)
.
build
());
// 修改 考核状态
// 修改 考核状态
jxglAppraisalMapper
.
update
(
JxglAppraisal
.
builder
()
jxglAppraisalMapper
.
update
(
.
performanceAppraisalId
(
appraisalUpdateSts
.
getId
())
JxglAppraisal
.
builder
().
performanceAppraisalId
(
appraisalUpdateSts
.
getId
()).
sts
(
sts
).
build
(),
.
sts
(
sts
)
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
()
.
build
(),
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
appraisalUpdateSts
.
getId
())
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
appraisalUpdateSts
.
getId
())
.
eq
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
TARGET_CONFIRMED
.
getType
())
.
eq
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
TARGET_CONFIRMED
.
getType
()));
);
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
}
...
@@ -744,7 +723,7 @@ public class JxglController {
...
@@ -744,7 +723,7 @@ public class JxglController {
@ApiOperation
(
value
=
"99.删除-所有-绩效考核"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-所有-绩效考核"
)
@ApiOperation
(
value
=
"99.删除-所有-绩效考核"
,
httpMethod
=
"DELETE"
,
notes
=
"删除-所有-绩效考核"
)
@ApiOperationSupport
(
order
=
99
)
@ApiOperationSupport
(
order
=
99
)
@Role
@Role
public
Result
<
Object
>
deleteAllPA
(
@CurrentUser
UserBean
userBean
){
public
Result
<
Object
>
deleteAllPA
(
@CurrentUser
UserBean
userBean
)
{
jxglPerformanceAppraisalMapper
.
delete
(
null
);
jxglPerformanceAppraisalMapper
.
delete
(
null
);
jxglAppraisalMapper
.
delete
(
null
);
jxglAppraisalMapper
.
delete
(
null
);
...
@@ -765,9 +744,10 @@ public class JxglController {
...
@@ -765,9 +744,10 @@ public class JxglController {
@ApiOperation
(
value
=
"8.查询-绩效考核-列表-归档"
,
httpMethod
=
"POST"
,
notes
=
"查询-绩效考核-列表-归档"
)
@ApiOperation
(
value
=
"8.查询-绩效考核-列表-归档"
,
httpMethod
=
"POST"
,
notes
=
"查询-绩效考核-列表-归档"
)
@ApiOperationSupport
(
order
=
8
)
@ApiOperationSupport
(
order
=
8
)
@Role
@Role
public
Result
<
Object
>
selectsPAArchive
(
@CurrentUser
UserBean
userBean
,
@RequestBody
PerformanceAppraisalQuery
query
){
public
Result
<
Object
>
selectsPAArchive
(
@CurrentUser
UserBean
userBean
,
@RequestBody
PerformanceAppraisalQuery
query
)
{
IPage
<
SpmkApproveSummary
>
page
=
new
Page
<
SpmkApproveSummary
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
IPage
<
SpmkApproveSummary
>
page
=
new
Page
<
SpmkApproveSummary
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
...
@@ -775,8 +755,7 @@ public class JxglController {
...
@@ -775,8 +755,7 @@ public class JxglController {
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
return
ResultUtil
.
data
(
pagePA
,
listPA
);
return
ResultUtil
.
data
(
pagePA
,
listPA
);
}
}
/**
/**
...
@@ -786,9 +765,9 @@ public class JxglController {
...
@@ -786,9 +765,9 @@ public class JxglController {
@ApiOperation
(
value
=
"9.查询-绩效考核-列表-非归档"
,
httpMethod
=
"POST"
,
notes
=
"查询-绩效考核-列表-非归档"
)
@ApiOperation
(
value
=
"9.查询-绩效考核-列表-非归档"
,
httpMethod
=
"POST"
,
notes
=
"查询-绩效考核-列表-非归档"
)
@ApiOperationSupport
(
order
=
9
)
@ApiOperationSupport
(
order
=
9
)
@Role
@Role
public
Result
<
Object
>
selectsPA
(
@CurrentUser
UserBean
userBean
,
@RequestBody
PerformanceAppraisalQuery
query
)
{
public
Result
<
Object
>
selectsPA
(
@CurrentUser
UserBean
userBean
,
@RequestBody
PerformanceAppraisalQuery
query
)
{
IPage
<
SpmkApproveSummary
>
page
=
new
Page
<
SpmkApproveSummary
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
IPage
<
SpmkApproveSummary
>
page
=
new
Page
<
SpmkApproveSummary
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
...
@@ -796,8 +775,7 @@ public class JxglController {
...
@@ -796,8 +775,7 @@ public class JxglController {
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
return
ResultUtil
.
data
(
pagePA
,
listPA
);
return
ResultUtil
.
data
(
pagePA
,
listPA
);
}
}
/**
/**
...
@@ -807,16 +785,16 @@ public class JxglController {
...
@@ -807,16 +785,16 @@ public class JxglController {
@ApiOperation
(
value
=
"10.查询-考核-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-考核-列表"
)
@ApiOperation
(
value
=
"10.查询-考核-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-考核-列表"
)
@ApiOperationSupport
(
order
=
10
)
@ApiOperationSupport
(
order
=
10
)
@Role
@Role
public
Result
<
Object
>
selectsA
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalQuery
query
)
{
public
Result
<
Object
>
selectsA
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalQuery
query
)
{
IPage
<
JxglAppraisal
>
page
=
new
Page
<
JxglAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
IPage
<
JxglAppraisal
>
page
=
new
Page
<
JxglAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
IPage
<
JxglAppraisal
>
pageA
=
jxglAppraisalMapper
.
selectListByQuery
(
page
,
query
);
IPage
<
JxglAppraisal
>
pageA
=
jxglAppraisalMapper
.
selectListByQuery
(
page
,
query
);
List
<
JxglAppraisal
>
listPA
=
pageA
.
getRecords
();
List
<
JxglAppraisal
>
listPA
=
pageA
.
getRecords
();
return
ResultUtil
.
data
(
pageA
,
listPA
);
return
ResultUtil
.
data
(
pageA
,
listPA
);
}
}
...
@@ -827,20 +805,22 @@ public class JxglController {
...
@@ -827,20 +805,22 @@ public class JxglController {
@ApiOperation
(
value
=
"11.查询-考核-详情"
,
httpMethod
=
"GET"
,
notes
=
"查询-考核-详情"
)
@ApiOperation
(
value
=
"11.查询-考核-详情"
,
httpMethod
=
"GET"
,
notes
=
"查询-考核-详情"
)
@ApiOperationSupport
(
order
=
11
)
@ApiOperationSupport
(
order
=
11
)
@Role
@Role
public
Result
<
Object
>
selectA
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
public
Result
<
Object
>
selectA
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
AppraisalDetail
aD
=
jxglAppraisalMapper
.
selectDetailById
(
userBean
.
getOrgCode
(),
id
);
AppraisalDetail
aD
=
jxglAppraisalMapper
.
selectDetailById
(
userBean
.
getOrgCode
(),
id
);
if
(
aD
!=
null
)
{
if
(
aD
!=
null
)
{
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglPerformanceAppraisal
>().
lambda
()
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
eq
(
JxglPerformanceAppraisal:
:
getId
,
aD
.
getPerformanceAppraisalId
()));
.
selectOne
(
new
QueryWrapper
<
JxglPerformanceAppraisal
>().
lambda
().
eq
(
JxglPerformanceAppraisal:
:
getId
,
aD
.
getPerformanceAppraisalId
()));
if
(
pA
!=
null
&&
pA
.
getIsVisible
()
==
0
)
{
if
(
pA
!=
null
&&
pA
.
getIsVisible
()
==
0
)
{
return
ResultUtil
.
data
(
aD
);
return
ResultUtil
.
data
(
aD
);
}
else
{
}
else
{
List
<
JxglAppraisalAssessment
>
listAA
=
aD
.
getAppraisalAssessments
();
List
<
JxglAppraisalAssessment
>
listAA
=
aD
.
getAppraisalAssessments
();
if
(
listAA
!=
null
)
{
if
(
listAA
!=
null
)
{
listAA
=
listAA
.
stream
().
filter
(
a
->
!
userBean
.
getEmpNum
().
equals
(
a
.
getAssessorId
())).
collect
(
Collectors
.
toList
());
listAA
=
listAA
.
stream
().
filter
(
a
->
!
userBean
.
getEmpNum
().
equals
(
a
.
getAssessorId
()))
.
collect
(
Collectors
.
toList
());
aD
.
setAppraisalAssessments
(
listAA
);
aD
.
setAppraisalAssessments
(
listAA
);
}
}
}
}
...
@@ -857,20 +837,19 @@ public class JxglController {
...
@@ -857,20 +837,19 @@ public class JxglController {
@ApiOperation
(
value
=
"12.修改-流程执行人-转派"
,
httpMethod
=
"PUT"
,
notes
=
"修改-流程执行人-转派"
)
@ApiOperation
(
value
=
"12.修改-流程执行人-转派"
,
httpMethod
=
"PUT"
,
notes
=
"修改-流程执行人-转派"
)
@ApiOperationSupport
(
order
=
12
)
@ApiOperationSupport
(
order
=
12
)
@Role
@Role
public
Result
<
Object
>
updatePN
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ProcessNodeUpdate
processNodeUpdate
){
public
Result
<
Object
>
updatePN
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ProcessNodeUpdate
processNodeUpdate
)
{
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
processNodeUpdate
.
getAppraisalId
())
.
eq
(
JxglAppraisal:
:
getId
,
processNodeUpdate
.
getAppraisalId
()).
select
(
JxglAppraisal:
:
getId
));
.
select
(
JxglAppraisal:
:
getId
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核
不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
Integer
count
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
processNodeUpdate
.
getAppraisalId
())
.
eq
(
JxglAppraisal:
:
getId
,
processNodeUpdate
.
getAppraisalId
()).
in
(
JxglAppraisal:
:
getSts
,
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count
>
0
)
{
if
(
count
>
0
)
{
...
@@ -900,65 +879,24 @@ public class JxglController {
...
@@ -900,65 +879,24 @@ public class JxglController {
@ApiOperation
(
value
=
"13.终止-考核"
,
httpMethod
=
"PUT"
,
notes
=
"终止-考核"
)
@ApiOperation
(
value
=
"13.终止-考核"
,
httpMethod
=
"PUT"
,
notes
=
"终止-考核"
)
@ApiOperationSupport
(
order
=
13
)
@ApiOperationSupport
(
order
=
13
)
@Role
@Role
public
Result
<
Object
>
terminationAssessment
(
@CurrentUser
UserBean
userBean
,
@NotNull
@RequestParam
Integer
id
)
{
public
Result
<
Object
>
terminationAssessment
(
@CurrentUser
UserBean
userBean
,
@NotNull
@RequestParam
Integer
id
)
{
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectById
(
id
);
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectById
(
id
);
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核
不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
else
if
(
appraisal
.
getSts
()
<=
AppraisalSts
.
RESULT_VERIFICATION
.
getType
()
)
{
}
else
if
(
appraisal
.
getSts
()
<=
AppraisalSts
.
RESULT_VERIFICATION
.
getType
()
)
{
JxglAppraisal
.
builder
().
id
(
id
).
sts
(
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
()).
build
().
updateById
();
JxglAppraisal
.
builder
().
id
(
id
).
sts
(
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
()).
build
().
updateById
();
}
else
if
(
appraisal
.
getSts
()
==
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
())
{
}
else
if
(
appraisal
.
getSts
()
==
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
())
{
return
ResultUtil
.
error
(
"考核已完成,无法终止"
);
return
ResultUtil
.
error
(
"考核已完成,无法终止"
);
}
else
if
(
appraisal
.
getSts
()
==
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
())
{
}
else
if
(
appraisal
.
getSts
()
==
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
())
{
return
ResultUtil
.
error
(
"考核已终止,无法重复终止"
);
return
ResultUtil
.
error
(
"考核已终止,无法重复终止"
);
}
else
if
(
appraisal
.
getSts
()
==
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
())
{
}
else
if
(
appraisal
.
getSts
()
==
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
())
{
return
ResultUtil
.
error
(
"考核已归档,无法终止"
);
return
ResultUtil
.
error
(
"考核已归档,无法终止"
);
}
}
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
}
@Autowired
private
JxglAppraisalAssessmentMapper
appraisalAssessmentMapper
;
@Autowired
private
JxglProcessNodeMapper
processNodeMapper
;
/**
* 新增-考核评定
*/
@PutMapping
(
value
=
"/save_appraisal_assessment"
)
@ApiOperation
(
value
=
"13.新增-考核评定"
,
httpMethod
=
"PUT"
,
notes
=
"新增-考核评定"
)
@ApiOperationSupport
(
order
=
13
)
public
Result
<
Object
>
saveAA
(
@CurrentUser
UserBean
userBean
,
@RequestBody
JxglAppraisalAssessment
appraisalAssessment
){
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
appraisalAssessment
.
getAppraisalId
())
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count2
>
0
)
{
return
ResultUtil
.
error
(
"考核已结束"
);
}
Integer
empNum
=
userBean
.
getEmpNum
();
JxglProcessNode
pN
=
processNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
in
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SELF_ASSESSMENT
,
ProcessType
.
SUPERIOR_SCORE
));
if
(
pN
==
null
)
{
return
ResultUtil
.
error
(
"在该流程状态 无法评价"
);
}
else
if
(!
empNum
.
equals
(
pN
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限 评价"
);
}
appraisalAssessment
.
setAssessorName
(
userBean
.
getUserInfo
().
getName
());
appraisalAssessment
.
setAssessorId
(
userBean
.
getEmpNum
());
appraisalAssessment
.
insert
();
return
ResultUtil
.
data
(
appraisalAssessment
);
}
/**
/**
* 查询-所有员工绩效-汇总
* 查询-所有员工绩效-汇总
*/
*/
...
@@ -966,16 +904,16 @@ public class JxglController {
...
@@ -966,16 +904,16 @@ public class JxglController {
@ApiOperation
(
value
=
"14.查询-所有员工绩效-汇总"
,
httpMethod
=
"POST"
,
notes
=
"查询-所有员工绩效-汇总"
)
@ApiOperation
(
value
=
"14.查询-所有员工绩效-汇总"
,
httpMethod
=
"POST"
,
notes
=
"查询-所有员工绩效-汇总"
)
@ApiOperationSupport
(
order
=
14
)
@ApiOperationSupport
(
order
=
14
)
@Role
@Role
public
Result
<
Object
>
selectsEP
(
@CurrentUser
UserBean
userBean
,
@RequestBody
EmpPerformanceQuery
query
)
{
public
Result
<
Object
>
selectsEP
(
@CurrentUser
UserBean
userBean
,
@RequestBody
EmpPerformanceQuery
query
)
{
IPage
<
JxglAppraisal
>
page
=
new
Page
<
JxglAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
IPage
<
JxglAppraisal
>
page
=
new
Page
<
JxglAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
IPage
<
JxglAppraisal
>
pageA
=
jxglAppraisalMapper
.
selectListEmpByQuery
(
page
,
query
);
IPage
<
JxglAppraisal
>
pageA
=
jxglAppraisalMapper
.
selectListEmpByQuery
(
page
,
query
);
List
<
JxglAppraisal
>
listA
=
pageA
.
getRecords
();
List
<
JxglAppraisal
>
listA
=
pageA
.
getRecords
();
return
ResultUtil
.
data
(
pageA
,
listA
);
return
ResultUtil
.
data
(
pageA
,
listA
);
}
}
...
@@ -986,16 +924,17 @@ public class JxglController {
...
@@ -986,16 +924,17 @@ public class JxglController {
@ApiOperation
(
value
=
"15.查询-某员工考核-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-某员工考核-列表"
)
@ApiOperation
(
value
=
"15.查询-某员工考核-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-某员工考核-列表"
)
@ApiOperationSupport
(
order
=
15
)
@ApiOperationSupport
(
order
=
15
)
@Role
@Role
public
Result
<
Object
>
selectsEA
(
@CurrentUser
UserBean
userBean
,
@
RequestBody
EmpAppraisalQuery
query
)
{
public
Result
<
Object
>
selectsEA
(
@CurrentUser
UserBean
userBean
,
@
Validated
@RequestBody
EmpAppraisalQuery
query
)
{
IPage
<
JxglPerformanceAppraisal
>
page
=
new
Page
<
JxglPerformanceAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
IPage
<
JxglPerformanceAppraisal
>
page
=
new
Page
<
JxglPerformanceAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
IPage
<
JxglPerformanceAppraisal
>
pagePA
=
jxglPerformanceAppraisalMapper
.
selectListEmpByQuery
(
page
,
query
);
IPage
<
JxglPerformanceAppraisal
>
pagePA
=
jxglPerformanceAppraisalMapper
.
selectListEmpByQuery
(
page
,
query
);
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
return
ResultUtil
.
data
(
pagePA
,
listPA
);
return
ResultUtil
.
data
(
pagePA
,
listPA
);
}
}
...
@@ -1006,23 +945,17 @@ public class JxglController {
...
@@ -1006,23 +945,17 @@ public class JxglController {
@ApiOperation
(
value
=
"16.查询-绩效考核-方案"
,
httpMethod
=
"GET"
,
notes
=
"查询-绩效考核-方案"
)
@ApiOperation
(
value
=
"16.查询-绩效考核-方案"
,
httpMethod
=
"GET"
,
notes
=
"查询-绩效考核-方案"
)
@ApiOperationSupport
(
order
=
16
)
@ApiOperationSupport
(
order
=
16
)
@Role
@Role
public
Result
<
Object
>
selectPA
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
public
Result
<
Object
>
selectPA
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
selectById
(
id
);
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
selectById
(
id
);
if
(
pA
==
null
)
{
if
(
pA
==
null
)
{
return
ResultUtil
.
error
(
"方案不存在"
);
return
ResultUtil
.
error
(
"方案不存在"
);
}
}
PerformanceAppraisal
paDto
=
PerformanceAppraisal
.
builder
()
PerformanceAppraisal
paDto
=
PerformanceAppraisal
.
builder
().
name
(
pA
.
getName
()).
period
(
pA
.
getPeriod
())
.
name
(
pA
.
getName
())
.
appraisalStartTime
(
pA
.
getAppraisalStartTime
()).
appraisalEndTime
(
pA
.
getAppraisalEndTime
())
.
period
(
pA
.
getPeriod
())
.
isVisible
(
pA
.
getIsVisible
()).
scope
(
pA
.
getScope
()).
appraisalTName
(
pA
.
getAppraisalTName
())
.
appraisalStartTime
(
pA
.
getAppraisalStartTime
())
.
appraisalEndTime
(
pA
.
getAppraisalEndTime
())
.
isVisible
(
pA
.
getIsVisible
())
.
scope
(
pA
.
getScope
())
.
appraisalTName
(
pA
.
getAppraisalTName
())
.
processNode
(
ObjectUtil
.
deserialize
(
pA
.
getProcessNode
()))
.
processNode
(
ObjectUtil
.
deserialize
(
pA
.
getProcessNode
()))
.
beingAppraisalPerson
(
ObjectUtil
.
deserialize
(
pA
.
getBeingAppraisalPerson
()))
.
beingAppraisalPerson
(
ObjectUtil
.
deserialize
(
pA
.
getBeingAppraisalPerson
())).
build
();
.
build
();
return
ResultUtil
.
data
(
paDto
);
return
ResultUtil
.
data
(
paDto
);
...
@@ -1034,7 +967,7 @@ public class JxglController {
...
@@ -1034,7 +967,7 @@ public class JxglController {
@PostMapping
(
value
=
"/selects_my_performance"
)
@PostMapping
(
value
=
"/selects_my_performance"
)
@ApiOperation
(
value
=
"17.查询-我的绩效-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-我的绩效-列表"
)
@ApiOperation
(
value
=
"17.查询-我的绩效-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询-我的绩效-列表"
)
@ApiOperationSupport
(
order
=
17
)
@ApiOperationSupport
(
order
=
17
)
public
Result
<
Object
>
selects
(
@CurrentUser
UserBean
userBean
,
@
RequestBody
MyPerformance
query
)
{
public
Result
<
Object
>
selects
(
@CurrentUser
UserBean
userBean
,
@
Validated
@RequestBody
MyPerformance
query
)
{
IPage
<
JxglPerformanceAppraisal
>
page
=
new
Page
<
JxglPerformanceAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
IPage
<
JxglPerformanceAppraisal
>
page
=
new
Page
<
JxglPerformanceAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
...
@@ -1043,53 +976,38 @@ public class JxglController {
...
@@ -1043,53 +976,38 @@ public class JxglController {
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
List
<
JxglPerformanceAppraisal
>
listPA
=
pagePA
.
getRecords
();
return
ResultUtil
.
data
(
pagePA
,
listPA
);
return
ResultUtil
.
data
(
pagePA
,
listPA
);
}
}
@Autowired
private
JxglProcessNodeMapper
jxglProcessNodeMapper
;
@Autowired
private
JxglAppraisalItemMapper
jxglAppraisalItemMapper
;
/**
/**
* 目标填写-保存
* 目标填写-保存
*/
*/
@PostMapping
(
value
=
"/save_target_fill"
)
@PostMapping
(
value
=
"/save_target_fill"
)
@ApiOperation
(
value
=
"17.目标填写-保存"
,
httpMethod
=
"POST"
,
notes
=
"目标填写-保存"
)
@ApiOperation
(
value
=
"17.目标填写-保存"
,
httpMethod
=
"POST"
,
notes
=
"目标填写-保存"
)
@ApiOperationSupport
(
order
=
17
)
@ApiOperationSupport
(
order
=
17
)
public
Result
<
Object
>
saveTF
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalUpdate
appraisalUpdate
)
throws
Exception
{
public
Result
<
Object
>
saveTF
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalUpdate
appraisalUpdate
)
throws
Exception
{
Integer
id
=
appraisalUpdate
.
getId
();
Integer
id
=
appraisalUpdate
.
getId
();
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
id
)
.
eq
(
JxglAppraisal:
:
getId
,
id
).
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count2
>
0
)
{
if
(
count2
>
0
)
{
return
ResultUtil
.
error
(
"考核已结束"
);
return
ResultUtil
.
error
(
"考核已结束"
);
}
}
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
.
eq
(
JxglAppraisal:
:
getId
,
id
)
new
QueryWrapper
<
JxglAppraisal
>().
lambda
().
eq
(
JxglAppraisal:
:
getId
,
id
).
select
(
JxglAppraisal:
:
getId
));
.
select
(
JxglAppraisal:
:
getId
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
List
<
JxglAppraisalIndicators
>
listAI2
=
appraisalUpdate
.
getAppraisalIndicators
();
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
().
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
if
(
listAI2
==
null
)
{
return
ResultUtil
.
error
(
"考核指标不能为空"
);
}
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
processNode
==
null
)
{
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
return
ResultUtil
.
error
(
"流程不存在"
);
...
@@ -1098,20 +1016,22 @@ public class JxglController {
...
@@ -1098,20 +1016,22 @@ public class JxglController {
if
(
ProcessType
.
TARGET_FILL_IN
.
getType
()
==
processNode
.
getProcessType
())
{
if
(
ProcessType
.
TARGET_FILL_IN
.
getType
()
==
processNode
.
getProcessType
())
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限
操作该流程"
);
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
}
}
else
{
}
else
{
return
ResultUtil
.
error
(
"流程状态异常"
);
return
ResultUtil
.
error
(
"流程状态异常"
);
}
}
// 查找 非固定 考核指标
// 查找 非固定 考核指标
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
select
(
JxglAppraisalIndicators:
:
getId
)
.
select
List
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
().
select
(
JxglAppraisalIndicators:
:
getId
)
.
eq
(
JxglAppraisalIndicators:
:
getType
,
IndicatorsType
.
NOT_FIXATION
.
getType
())
.
eq
(
JxglAppraisalIndicators:
:
getType
,
IndicatorsType
.
NOT_FIXATION
.
getType
())
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
id
));
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
id
));
List
<
Integer
>
appraisalIndicatorIds
=
listAI
!=
null
?
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getId
).
collect
(
Collectors
.
toList
())
:
null
;
List
<
Integer
>
appraisalIndicatorIds
=
listAI
!=
null
?
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getId
).
collect
(
Collectors
.
toList
())
:
null
;
if
(
appraisalIndicatorIds
!=
null
)
{
if
(
appraisalIndicatorIds
!=
null
)
{
...
@@ -1125,6 +1045,9 @@ public class JxglController {
...
@@ -1125,6 +1045,9 @@ public class JxglController {
.
eq
(
JxglAppraisalIndicators:
:
getType
,
IndicatorsType
.
NOT_FIXATION
.
getType
())
.
eq
(
JxglAppraisalIndicators:
:
getType
,
IndicatorsType
.
NOT_FIXATION
.
getType
())
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
id
));
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
id
));
List
<
JxglAppraisalIndicators
>
listAI2
=
appraisalUpdate
.
getAppraisalIndicators
();
if
(
listAI2
!=
null
)
{
listAI2
.
forEach
(
aI
->
{
listAI2
.
forEach
(
aI
->
{
aI
.
setAppraisalId
(
id
);
aI
.
setAppraisalId
(
id
);
aI
.
setType
(
IndicatorsType
.
NOT_FIXATION
.
getType
());
aI
.
setType
(
IndicatorsType
.
NOT_FIXATION
.
getType
());
...
@@ -1136,27 +1059,14 @@ public class JxglController {
...
@@ -1136,27 +1059,14 @@ public class JxglController {
aItem
.
insert
();
aItem
.
insert
();
}
}
}
}
}
else
{
}
else
{
throw
new
CustomException
(
"保存异常"
);
throw
new
CustomException
(
"保存异常"
);
}
}
});
});
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
.
select
(
JxglAppraisalIndicators:
:
getWeight
)
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
id
));
List
<
Integer
>
listWeight
=
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getWeight
).
collect
(
Collectors
.
toList
());
Integer
weightSum
=
0
;
if
(
listWeight
!=
null
&&
listWeight
.
size
()
>
0
)
{
for
(
Integer
i
:
listWeight
)
{
weightSum
+=
i
;
System
.
out
.
println
(
"权重:"
+
i
);
}
if
(!
weightSum
.
equals
(
100
))
return
ResultUtil
.
error
(
"权重总和要等于 100%"
);
}
}
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
}
...
@@ -1166,28 +1076,25 @@ public class JxglController {
...
@@ -1166,28 +1076,25 @@ public class JxglController {
@PostMapping
(
value
=
"/submit_target_fill"
)
@PostMapping
(
value
=
"/submit_target_fill"
)
@ApiOperation
(
value
=
"17.目标填写-提交"
,
httpMethod
=
"POST"
,
notes
=
"目标填写-提交"
)
@ApiOperation
(
value
=
"17.目标填写-提交"
,
httpMethod
=
"POST"
,
notes
=
"目标填写-提交"
)
@ApiOperationSupport
(
order
=
17
)
@ApiOperationSupport
(
order
=
17
)
public
Result
<
Object
>
submitTF
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
id
)
{
public
Result
<
Object
>
submitTF
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
id
)
{
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
id
)
.
eq
(
JxglAppraisal:
:
getId
,
id
).
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count2
>
0
)
{
if
(
count2
>
0
)
{
return
ResultUtil
.
error
(
"考核已结束"
);
return
ResultUtil
.
error
(
"考核已结束"
);
}
}
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
.
eq
(
JxglAppraisal:
:
getId
,
id
)
new
QueryWrapper
<
JxglAppraisal
>().
lambda
().
eq
(
JxglAppraisal:
:
getId
,
id
).
select
(
JxglAppraisal:
:
getId
));
.
select
(
JxglAppraisal:
:
getId
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
processNode
==
null
)
{
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
return
ResultUtil
.
error
(
"流程不存在"
);
...
@@ -1196,16 +1103,18 @@ public class JxglController {
...
@@ -1196,16 +1103,18 @@ public class JxglController {
if
(
ProcessType
.
TARGET_FILL_IN
.
getType
()
==
processNode
.
getProcessType
())
{
if
(
ProcessType
.
TARGET_FILL_IN
.
getType
()
==
processNode
.
getProcessType
())
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限
操作该流程"
);
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
}
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
appraisal
.
getId
()));
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
appraisal
.
getId
()));
if
(
listAI
==
null
)
{
if
(
listAI
==
null
)
{
return
ResultUtil
.
error
(
"考核指标不能为空"
);
return
ResultUtil
.
error
(
"考核指标不能为空"
);
}
}
List
<
Integer
>
listWeight
=
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getWeight
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
listWeight
=
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getWeight
)
.
collect
(
Collectors
.
toList
());
Integer
weightSum
=
0
;
Integer
weightSum
=
0
;
if
(
listWeight
!=
null
&&
listWeight
.
size
()
>
0
)
{
if
(
listWeight
!=
null
&&
listWeight
.
size
()
>
0
)
{
for
(
Integer
i
:
listWeight
)
{
for
(
Integer
i
:
listWeight
)
{
...
@@ -1215,24 +1124,19 @@ public class JxglController {
...
@@ -1215,24 +1124,19 @@ public class JxglController {
return
ResultUtil
.
error
(
"权重总和要等于 100%"
);
return
ResultUtil
.
error
(
"权重总和要等于 100%"
);
}
}
// 修改 目标填写 状态
// 修改 目标填写 状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
EXECUTED
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
EXECUTED
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
// 修改 下一个节点状态
// 修改 下一个节点状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
()));
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
()));
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
id
).
sts
(
AppraisalSts
.
TARGET_CONFIRMED
.
getType
()).
build
());
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
id
).
sts
(
AppraisalSts
.
TARGET_CONFIRMED
.
getType
()).
build
());
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
...
@@ -1241,12 +1145,11 @@ public class JxglController {
...
@@ -1241,12 +1145,11 @@ public class JxglController {
appraisalLog
.
setType
(
AppraisalLogType
.
TARGET_FILL_IN
.
getType
());
appraisalLog
.
setType
(
AppraisalLogType
.
TARGET_FILL_IN
.
getType
());
appraisalLog
.
insert
();
appraisalLog
.
insert
();
}
else
{
}
else
{
return
ResultUtil
.
error
(
"流程状态异常"
);
return
ResultUtil
.
error
(
"流程状态异常"
);
}
}
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
}
}
/**
/**
...
@@ -1255,28 +1158,25 @@ public class JxglController {
...
@@ -1255,28 +1158,25 @@ public class JxglController {
@PostMapping
(
value
=
"/update_target_confirmed"
)
@PostMapping
(
value
=
"/update_target_confirmed"
)
@ApiOperation
(
value
=
"18.目标确认-同意"
,
httpMethod
=
"POST"
,
notes
=
"目标确认-同意"
)
@ApiOperation
(
value
=
"18.目标确认-同意"
,
httpMethod
=
"POST"
,
notes
=
"目标确认-同意"
)
@ApiOperationSupport
(
order
=
18
)
@ApiOperationSupport
(
order
=
18
)
public
Result
<
Object
>
updateTC
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
id
)
{
public
Result
<
Object
>
updateTC
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
id
)
{
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
id
)
.
eq
(
JxglAppraisal:
:
getId
,
id
).
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count2
>
0
)
{
if
(
count2
>
0
)
{
return
ResultUtil
.
error
(
"考核已结束"
);
return
ResultUtil
.
error
(
"考核已结束"
);
}
}
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
id
)
.
eq
(
JxglAppraisal:
:
getId
,
id
).
select
(
JxglAppraisal:
:
getId
,
JxglAppraisal:
:
getPerformanceAppraisalId
));
.
select
(
JxglAppraisal:
:
getId
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
processNode
==
null
)
{
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
return
ResultUtil
.
error
(
"流程不存在"
);
...
@@ -1285,41 +1185,34 @@ public class JxglController {
...
@@ -1285,41 +1185,34 @@ public class JxglController {
if
(
ProcessType
.
TARGET_CONFIRMED
.
getType
()
==
processNode
.
getProcessType
())
{
if
(
ProcessType
.
TARGET_CONFIRMED
.
getType
()
==
processNode
.
getProcessType
())
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限
操作该流程"
);
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
}
// 修改 目标确认 状态
// 修改 目标确认 状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
EXECUTED
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
EXECUTED
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
selectById
(
appraisal
.
getPerformanceAppraisalId
());
JxglPerformanceAppraisal
pA
=
jxglPerformanceAppraisalMapper
.
selectById
(
appraisal
.
getPerformanceAppraisalId
());
if
(
pA
!=
null
&&
pA
.
getSts
()
>
PerformanceAppraisalSts
.
TARGET_SETING
.
getType
())
{
if
(
pA
!=
null
&&
pA
.
getSts
()
>
PerformanceAppraisalSts
.
TARGET_SETING
.
getType
())
{
// 修改 下一个节点状态
// 修改 下一个节点状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SELF_ASSESSMENT
.
getType
()));
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SELF_ASSESSMENT
.
getType
()));
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
()).
sts
(
AppraisalSts
.
SELF_ASSESSMENT
.
getType
()).
build
());
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
())
.
sts
(
AppraisalSts
.
SELF_ASSESSMENT
.
getType
()).
build
());
}
}
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setExecutorId
(
userBean
.
getEmpNum
());
appraisalLog
.
setExecutorId
(
userBean
.
getEmpNum
());
appraisalLog
.
setExecutorName
(
userBean
.
getUserInfo
().
getName
());
appraisalLog
.
setExecutorName
(
userBean
.
getUserInfo
().
getName
());
appraisalLog
.
setType
(
AppraisalLogType
.
TARGET_CONFIRMED
.
getType
());
appraisalLog
.
setType
(
AppraisalLogType
.
TARGET_CONFIRMED
.
getType
());
appraisalLog
.
insert
();
appraisalLog
.
insert
();
}
else
{
}
else
{
return
ResultUtil
.
error
(
"流程状态异常"
);
return
ResultUtil
.
error
(
"流程状态异常"
);
}
}
...
@@ -1333,28 +1226,26 @@ public class JxglController {
...
@@ -1333,28 +1226,26 @@ public class JxglController {
@PostMapping
(
value
=
"/update_target_confirmed_reject"
)
@PostMapping
(
value
=
"/update_target_confirmed_reject"
)
@ApiOperation
(
value
=
"18.目标确认-驳回目标"
,
httpMethod
=
"POST"
,
notes
=
"目标确认-驳回目标"
)
@ApiOperation
(
value
=
"18.目标确认-驳回目标"
,
httpMethod
=
"POST"
,
notes
=
"目标确认-驳回目标"
)
@ApiOperationSupport
(
order
=
18
)
@ApiOperationSupport
(
order
=
18
)
public
Result
<
Object
>
updateTCR
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalReject
appraisalReject
){
public
Result
<
Object
>
updateTCR
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalReject
appraisalReject
)
{
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
.
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
())
new
QueryWrapper
<
JxglAppraisal
>().
lambda
().
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
()).
in
(
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count2
>
0
)
{
if
(
count2
>
0
)
{
return
ResultUtil
.
error
(
"考核已结束"
);
return
ResultUtil
.
error
(
"考核已结束"
);
}
}
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
())
.
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
()).
select
(
JxglAppraisal:
:
getId
));
.
select
(
JxglAppraisal:
:
getId
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核
不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
processNode
==
null
)
{
if
(
processNode
==
null
)
{
...
@@ -1364,29 +1255,22 @@ public class JxglController {
...
@@ -1364,29 +1255,22 @@ public class JxglController {
if
(
ProcessType
.
TARGET_CONFIRMED
.
getType
()
==
processNode
.
getProcessType
())
{
if
(
ProcessType
.
TARGET_CONFIRMED
.
getType
()
==
processNode
.
getProcessType
())
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限
操作该流程"
);
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
}
// 修改 目标确认 状态
// 修改 目标确认 状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
NON_EXECUTION
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
NON_EXECUTION
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
in
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
())
.
in
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
()));
);
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_FILL_IN
.
getType
()));
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_FILL_IN
.
getType
()));
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
()).
sts
(
AppraisalSts
.
TARGET_FILL_IN
.
getType
()).
build
());
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
()).
sts
(
AppraisalSts
.
TARGET_FILL_IN
.
getType
()).
build
());
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setRemarks
(
appraisalReject
.
getRejectReason
());
appraisalLog
.
setRemarks
(
appraisalReject
.
getRejectReason
());
...
@@ -1396,7 +1280,7 @@ public class JxglController {
...
@@ -1396,7 +1280,7 @@ public class JxglController {
appraisalLog
.
setType
(
AppraisalLogType
.
TARGET_DISMISS
.
getType
());
appraisalLog
.
setType
(
AppraisalLogType
.
TARGET_DISMISS
.
getType
());
appraisalLog
.
insert
();
appraisalLog
.
insert
();
}
else
{
}
else
{
return
ResultUtil
.
error
(
"流程状态异常"
);
return
ResultUtil
.
error
(
"流程状态异常"
);
}
}
...
@@ -1410,28 +1294,26 @@ public class JxglController {
...
@@ -1410,28 +1294,26 @@ public class JxglController {
@PostMapping
(
value
=
"/update_superior_score_reject"
)
@PostMapping
(
value
=
"/update_superior_score_reject"
)
@ApiOperation
(
value
=
"19.上级评价 -驳回目标"
,
httpMethod
=
"POST"
,
notes
=
"上级评价 -驳回目标"
)
@ApiOperation
(
value
=
"19.上级评价 -驳回目标"
,
httpMethod
=
"POST"
,
notes
=
"上级评价 -驳回目标"
)
@ApiOperationSupport
(
order
=
19
)
@ApiOperationSupport
(
order
=
19
)
public
Result
<
Object
>
updateSSR
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalReject
appraisalReject
){
public
Result
<
Object
>
updateSSR
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalReject
appraisalReject
)
{
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
.
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
())
new
QueryWrapper
<
JxglAppraisal
>().
lambda
().
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
()).
in
(
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count2
>
0
)
{
if
(
count2
>
0
)
{
return
ResultUtil
.
error
(
"考核已结束"
);
return
ResultUtil
.
error
(
"考核已结束"
);
}
}
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
())
.
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
()).
select
(
JxglAppraisal:
:
getId
));
.
select
(
JxglAppraisal:
:
getId
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核
不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
processNode
==
null
)
{
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
return
ResultUtil
.
error
(
"流程不存在"
);
...
@@ -1440,25 +1322,16 @@ public class JxglController {
...
@@ -1440,25 +1322,16 @@ public class JxglController {
if
(
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
())
{
if
(
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
())
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限
操作该流程"
);
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
}
// 修改 目标确认 状态
// 修改 目标确认 状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
NON_EXECUTION
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
NON_EXECUTION
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
()).
in
(
JxglProcessNode:
:
getProcessType
,
.
in
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_CONFIRMED
.
getType
(),
ProcessType
.
TARGET_CONFIRMED
.
getType
(),
ProcessType
.
SELF_ASSESSMENT
.
getType
()));
ProcessType
.
SELF_ASSESSMENT
.
getType
())
);
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
()
JxglProcessNode
.
builder
()
.
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_FILL_IN
.
getType
()));
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
TARGET_FILL_IN
.
getType
()));
...
@@ -1468,16 +1341,19 @@ public class JxglController {
...
@@ -1468,16 +1341,19 @@ public class JxglController {
.
eq
(
JxglAppraisalAssessment:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglAppraisalAssessment:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglAppraisalAssessment:
:
getType
,
AssessmentType
.
SELF_ASSESSMENT
.
getType
()));
.
eq
(
JxglAppraisalAssessment:
:
getType
,
AssessmentType
.
SELF_ASSESSMENT
.
getType
()));
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
.
select
(
JxglAppraisalIndicators:
:
getId
)
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
.
select
(
JxglAppraisalIndicators:
:
getId
)
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
appraisal
.
getId
()));
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
appraisal
.
getId
()));
List
<
Integer
>
listAIId
=
listAI
!=
null
&&
listAI
.
size
()
>
0
?
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getId
).
collect
(
Collectors
.
toList
())
:
null
;
List
<
Integer
>
listAIId
=
listAI
!=
null
&&
listAI
.
size
()
>
0
?
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getId
).
collect
(
Collectors
.
toList
())
:
null
;
// 删除 考核指标评定-自评
// 删除 考核指标评定-自评
jxglAppraisalIndicatorsAssessmentMapper
.
delete
(
new
QueryWrapper
<
JxglAppraisalIndicatorsAssessment
>()
.
lambda
()
jxglAppraisalIndicatorsAssessmentMapper
.
delete
(
new
QueryWrapper
<
JxglAppraisalIndicatorsAssessment
>()
.
in
(
JxglAppraisalIndicatorsAssessment:
:
getAppraisalIndicatorsId
,
listAIId
)
.
lambda
().
in
(
JxglAppraisalIndicatorsAssessment:
:
getAppraisalIndicatorsId
,
listAIId
)
.
eq
(
JxglAppraisalIndicatorsAssessment:
:
getType
,
AssessmentType
.
SELF_ASSESSMENT
.
getType
()));
.
eq
(
JxglAppraisalIndicatorsAssessment:
:
getType
,
AssessmentType
.
SELF_ASSESSMENT
.
getType
()));
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
()).
sts
(
AppraisalSts
.
TARGET_FILL_IN
.
getType
()).
build
());
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
()).
sts
(
AppraisalSts
.
TARGET_FILL_IN
.
getType
()).
build
());
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setRemarks
(
appraisalReject
.
getRejectReason
());
appraisalLog
.
setRemarks
(
appraisalReject
.
getRejectReason
());
...
@@ -1487,7 +1363,7 @@ public class JxglController {
...
@@ -1487,7 +1363,7 @@ public class JxglController {
appraisalLog
.
setType
(
AppraisalLogType
.
TARGET_DISMISS
.
getType
());
appraisalLog
.
setType
(
AppraisalLogType
.
TARGET_DISMISS
.
getType
());
appraisalLog
.
insert
();
appraisalLog
.
insert
();
}
else
{
}
else
{
return
ResultUtil
.
error
(
"流程状态异常"
);
return
ResultUtil
.
error
(
"流程状态异常"
);
}
}
...
@@ -1501,28 +1377,26 @@ public class JxglController {
...
@@ -1501,28 +1377,26 @@ public class JxglController {
@PostMapping
(
value
=
"/update_superior_reject_score"
)
@PostMapping
(
value
=
"/update_superior_reject_score"
)
@ApiOperation
(
value
=
"20.上级评价 -驳回评分"
,
httpMethod
=
"POST"
,
notes
=
"上级评价 -驳回评分"
)
@ApiOperation
(
value
=
"20.上级评价 -驳回评分"
,
httpMethod
=
"POST"
,
notes
=
"上级评价 -驳回评分"
)
@ApiOperationSupport
(
order
=
20
)
@ApiOperationSupport
(
order
=
20
)
public
Result
<
Object
>
updateSRS
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AppraisalReject
appraisalReject
)
{
public
Result
<
Object
>
updateSRS
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AppraisalReject
appraisalReject
)
{
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
.
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
())
new
QueryWrapper
<
JxglAppraisal
>().
lambda
().
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
()).
in
(
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count2
>
0
)
{
if
(
count2
>
0
)
{
return
ResultUtil
.
error
(
"考核已结束"
);
return
ResultUtil
.
error
(
"考核已结束"
);
}
}
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
())
.
eq
(
JxglAppraisal:
:
getId
,
appraisalReject
.
getId
()).
select
(
JxglAppraisal:
:
getId
));
.
select
(
JxglAppraisal:
:
getId
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
processNode
==
null
)
{
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
return
ResultUtil
.
error
(
"流程不存在"
);
...
@@ -1535,20 +1409,13 @@ public class JxglController {
...
@@ -1535,20 +1409,13 @@ public class JxglController {
}
}
// 修改 状态
// 修改 状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
NON_EXECUTION
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
NON_EXECUTION
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SUPERIOR_SCORE
.
getType
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SUPERIOR_SCORE
.
getType
()));
);
// 修改 上一个节点状态
// 修改 上一个节点状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SELF_ASSESSMENT
.
getType
()));
.
eq
(
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SELF_ASSESSMENT
.
getType
()));
...
@@ -1558,16 +1425,19 @@ public class JxglController {
...
@@ -1558,16 +1425,19 @@ public class JxglController {
.
eq
(
JxglAppraisalAssessment:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglAppraisalAssessment:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglAppraisalAssessment:
:
getType
,
AssessmentType
.
SELF_ASSESSMENT
.
getType
()));
.
eq
(
JxglAppraisalAssessment:
:
getType
,
AssessmentType
.
SELF_ASSESSMENT
.
getType
()));
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
List
<
JxglAppraisalIndicators
>
listAI
=
jxglAppraisalIndicatorsMapper
.
selectList
(
.
select
(
JxglAppraisalIndicators:
:
getId
)
new
QueryWrapper
<
JxglAppraisalIndicators
>().
lambda
()
.
select
(
JxglAppraisalIndicators:
:
getId
)
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
appraisal
.
getId
()));
.
eq
(
JxglAppraisalIndicators:
:
getAppraisalId
,
appraisal
.
getId
()));
List
<
Integer
>
listAIId
=
listAI
!=
null
&&
listAI
.
size
()
>
0
?
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getId
).
collect
(
Collectors
.
toList
())
:
null
;
List
<
Integer
>
listAIId
=
listAI
!=
null
&&
listAI
.
size
()
>
0
?
listAI
.
stream
().
map
(
JxglAppraisalIndicators:
:
getId
).
collect
(
Collectors
.
toList
())
:
null
;
// 删除 考核指标评定-自评
// 删除 考核指标评定-自评
jxglAppraisalIndicatorsAssessmentMapper
.
delete
(
new
QueryWrapper
<
JxglAppraisalIndicatorsAssessment
>()
.
lambda
()
jxglAppraisalIndicatorsAssessmentMapper
.
delete
(
new
QueryWrapper
<
JxglAppraisalIndicatorsAssessment
>()
.
in
(
JxglAppraisalIndicatorsAssessment:
:
getAppraisalIndicatorsId
,
listAIId
)
.
lambda
().
in
(
JxglAppraisalIndicatorsAssessment:
:
getAppraisalIndicatorsId
,
listAIId
)
.
eq
(
JxglAppraisalIndicatorsAssessment:
:
getType
,
AssessmentType
.
SELF_ASSESSMENT
.
getType
()));
.
eq
(
JxglAppraisalIndicatorsAssessment:
:
getType
,
AssessmentType
.
SELF_ASSESSMENT
.
getType
()));
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
()).
sts
(
AppraisalSts
.
SELF_ASSESSMENT
.
getType
()).
build
());
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
()).
sts
(
AppraisalSts
.
SELF_ASSESSMENT
.
getType
()).
build
());
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setRemarks
(
appraisalReject
.
getRejectReason
());
appraisalLog
.
setRemarks
(
appraisalReject
.
getRejectReason
());
...
@@ -1577,7 +1447,7 @@ public class JxglController {
...
@@ -1577,7 +1447,7 @@ public class JxglController {
appraisalLog
.
setType
(
AppraisalLogType
.
SCORE_DISMISS
.
getType
());
appraisalLog
.
setType
(
AppraisalLogType
.
SCORE_DISMISS
.
getType
());
appraisalLog
.
insert
();
appraisalLog
.
insert
();
}
else
{
}
else
{
return
ResultUtil
.
error
(
"流程状态异常"
);
return
ResultUtil
.
error
(
"流程状态异常"
);
}
}
...
@@ -1591,101 +1461,86 @@ public class JxglController {
...
@@ -1591,101 +1461,86 @@ public class JxglController {
@PostMapping
(
value
=
"/save_score"
)
@PostMapping
(
value
=
"/save_score"
)
@ApiOperation
(
value
=
"22.评分提交"
,
httpMethod
=
"POST"
,
notes
=
"评分提交"
)
@ApiOperation
(
value
=
"22.评分提交"
,
httpMethod
=
"POST"
,
notes
=
"评分提交"
)
@ApiOperationSupport
(
order
=
22
)
@ApiOperationSupport
(
order
=
22
)
public
Result
<
Object
>
saveScore
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ValidList
<
AppraisalAssessment
>
appraisalAssessments
){
public
Result
<
Object
>
saveScore
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ValidList
<
AppraisalAssessment
>
appraisalAssessments
)
{
Integer
appraisalId
=
appraisalAssessments
.
get
(
0
).
getAppraisalId
();
Integer
appraisalId
=
appraisalAssessments
.
get
(
0
).
getAppraisalId
();
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count
=
jxglAppraisalMapper
.
eq
(
JxglAppraisal:
:
getId
,
appraisalId
)
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
().
eq
(
JxglAppraisal:
:
getId
,
appraisalId
).
in
(
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count
2
>
0
)
{
if
(
count
>
0
)
{
return
ResultUtil
.
error
(
"考核已结束"
);
return
ResultUtil
.
error
(
"考核已结束"
);
}
}
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
eq
(
JxglAppraisal:
:
getId
,
appraisalId
)
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
().
eq
(
JxglAppraisal:
:
getId
,
appraisalId
)
.
select
(
JxglAppraisal:
:
get
Id
));
.
select
(
JxglAppraisal:
:
getId
,
JxglAppraisal:
:
getPerformanceAppraisal
Id
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
processNode
==
null
)
{
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
return
ResultUtil
.
error
(
"流程不存在"
);
}
}
if
(
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
()
||
if
(
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
()
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
())
{
||
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
())
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限
操作该流程"
);
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
}
appraisalAssessments
.
stream
().
forEach
(
a
->
{
appraisalAssessments
.
stream
().
forEach
(
a
->
{
Integer
type
=
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
()
?
AssessmentType
.
SELF_ASSESSMENT
.
getType
()
:
AssessmentType
.
SUPERIOR_SCORE
.
getType
();
Integer
type
=
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
()
?
AssessmentType
.
SELF_ASSESSMENT
.
getType
()
:
AssessmentType
.
SUPERIOR_SCORE
.
getType
();
if
(
a
.
getAppraisalIndicatorsId
()
!=
null
)
{
if
(
a
.
getAppraisalIndicatorsId
()
!=
null
)
{
JxglAppraisalIndicatorsAssessment
.
builder
()
JxglAppraisalIndicatorsAssessment
.
builder
().
appraisalIndicatorsId
(
a
.
getAppraisalIndicatorsId
())
.
appraisalIndicatorsId
(
a
.
getAppraisalIndicatorsId
())
.
assessorId
(
userBean
.
getEmpNum
()).
assessorName
(
userBean
.
getUserInfo
().
getName
())
.
assessorId
(
userBean
.
getEmpNum
())
.
score
(
a
.
getScore
()).
remarks
(
a
.
getRemarks
()).
type
(
type
).
build
().
insert
();
.
assessorName
(
userBean
.
getUserInfo
().
getName
())
.
score
(
a
.
getScore
())
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
())
.
remarks
(
a
.
getRemarks
())
.
sts
(
AppraisalSts
.
SUPERIOR_SCORE
.
getType
()).
build
());
.
type
(
type
)
.
build
()
}
else
{
.
insert
();
JxglAppraisalAssessment
.
builder
().
appraisalId
(
a
.
getAppraisalId
()).
assessorId
(
userBean
.
getEmpNum
())
.
assessorName
(
userBean
.
getUserInfo
().
getName
()).
comprehensiveScore
(
a
.
getScore
())
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
()).
sts
(
AppraisalSts
.
SUPERIOR_SCORE
.
getType
()).
build
());
.
remarks
(
a
.
getRemarks
()).
type
(
type
).
level
(
a
.
getLevel
()).
build
().
insert
();
}
else
{
JxglAppraisalAssessment
.
builder
()
.
appraisalId
(
a
.
getAppraisalId
())
.
assessorId
(
userBean
.
getEmpNum
())
.
assessorName
(
userBean
.
getUserInfo
().
getName
())
.
comprehensiveScore
(
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());
// jxglAppraisalMapper.updateById(JxglAppraisal.builder().id(appraisal.getId()).sts(AppraisalSts.RESULT_VERIFICATION.getType()).build());
}
}
});
});
// 修改 状态
// 修改 状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
EXECUTED
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
EXECUTED
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
IN_EXECUTION
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
(),
JxglProcessNode:
:
getProcessType
,
ProcessType
.
RESULT_VERIFICATION
.
getType
())
.
eq
(
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
(),
.
eq
(
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
(),
JxglProcessNode:
:
getProcessType
,
ProcessType
.
SUPERIOR_SCORE
.
getType
()));
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
());
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
())
{
if
(
ProcessType
.
SUPERIOR_SCORE
.
getType
()
==
processNode
.
getProcessType
())
{
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
()
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
())
.
id
(
appraisal
.
getId
())
.
sts
(
AppraisalSts
.
RESULT_VERIFICATION
.
getType
()).
build
());
.
sts
(
AppraisalSts
.
RESULT_VERIFICATION
.
getType
()).
build
());
}
}
...
@@ -1695,10 +1550,12 @@ public class JxglController {
...
@@ -1695,10 +1550,12 @@ public class JxglController {
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setExecutorId
(
userBean
.
getEmpNum
());
appraisalLog
.
setExecutorId
(
userBean
.
getEmpNum
());
appraisalLog
.
setExecutorName
(
userBean
.
getUserInfo
().
getName
());
appraisalLog
.
setExecutorName
(
userBean
.
getUserInfo
().
getName
());
appraisalLog
.
setType
(
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
()
?
AppraisalLogType
.
SELF_ASSESSMENT
.
getType
()
:
AppraisalLogType
.
SUPERIOR_SCORE
.
getType
());
appraisalLog
.
setType
(
ProcessType
.
SELF_ASSESSMENT
.
getType
()
==
processNode
.
getProcessType
()
?
AppraisalLogType
.
SELF_ASSESSMENT
.
getType
()
:
AppraisalLogType
.
SUPERIOR_SCORE
.
getType
());
appraisalLog
.
insert
();
appraisalLog
.
insert
();
}
else
{
}
else
{
return
ResultUtil
.
error
(
"流程状态异常"
);
return
ResultUtil
.
error
(
"流程状态异常"
);
}
}
...
@@ -1711,28 +1568,25 @@ public class JxglController {
...
@@ -1711,28 +1568,25 @@ public class JxglController {
@PostMapping
(
value
=
"/result_verification"
)
@PostMapping
(
value
=
"/result_verification"
)
@ApiOperation
(
value
=
"23.结果确认-确认"
,
httpMethod
=
"POST"
,
notes
=
"结果确认-确认"
)
@ApiOperation
(
value
=
"23.结果确认-确认"
,
httpMethod
=
"POST"
,
notes
=
"结果确认-确认"
)
@ApiOperationSupport
(
order
=
23
)
@ApiOperationSupport
(
order
=
23
)
public
Result
<
Object
>
resultVerification
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
id
)
{
public
Result
<
Object
>
resultVerification
(
@CurrentUser
UserBean
userBean
,
@RequestParam
Integer
id
)
{
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
id
)
.
eq
(
JxglAppraisal:
:
getId
,
id
).
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count
2
>
0
)
{
if
(
count
>
0
)
{
return
ResultUtil
.
error
(
"考核已结束"
);
return
ResultUtil
.
error
(
"考核已结束"
);
}
}
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
.
eq
(
JxglAppraisal:
:
getId
,
id
)
new
QueryWrapper
<
JxglAppraisal
>().
lambda
().
eq
(
JxglAppraisal:
:
getId
,
id
).
select
(
JxglAppraisal:
:
getId
));
.
select
(
JxglAppraisal:
:
getId
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核
不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
processNode
==
null
)
{
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
return
ResultUtil
.
error
(
"流程不存在"
);
...
@@ -1741,21 +1595,17 @@ public class JxglController {
...
@@ -1741,21 +1595,17 @@ public class JxglController {
if
(
ProcessType
.
RESULT_VERIFICATION
.
getType
()
==
processNode
.
getProcessType
())
{
if
(
ProcessType
.
RESULT_VERIFICATION
.
getType
()
==
processNode
.
getProcessType
())
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限
操作该流程"
);
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
}
// 修改 状态
// 修改 状态
JxglProcessNode
JxglProcessNode
.
builder
().
sts
(
ProcessNodeSts
.
EXECUTED
.
getType
()).
build
()
.
builder
()
.
sts
(
ProcessNodeSts
.
EXECUTED
.
getType
())
.
build
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
update
(
new
UpdateWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
()
jxglAppraisalMapper
.
id
(
id
)
.
updateById
(
JxglAppraisal
.
builder
().
id
(
id
).
sts
(
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
()).
build
());
.
sts
(
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
()).
build
());
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
...
@@ -1764,7 +1614,7 @@ public class JxglController {
...
@@ -1764,7 +1614,7 @@ public class JxglController {
appraisalLog
.
setType
(
AppraisalLogType
.
RESULT_VERIFICATION
.
getType
());
appraisalLog
.
setType
(
AppraisalLogType
.
RESULT_VERIFICATION
.
getType
());
appraisalLog
.
insert
();
appraisalLog
.
insert
();
}
else
{
}
else
{
return
ResultUtil
.
error
(
"流程状态异常"
);
return
ResultUtil
.
error
(
"流程状态异常"
);
}
}
...
@@ -1777,12 +1627,12 @@ public class JxglController {
...
@@ -1777,12 +1627,12 @@ public class JxglController {
@PostMapping
(
value
=
"/change_score"
)
@PostMapping
(
value
=
"/change_score"
)
@ApiOperation
(
value
=
"24.结果确认-改分"
,
httpMethod
=
"POST"
,
notes
=
"结果确认-改分"
)
@ApiOperation
(
value
=
"24.结果确认-改分"
,
httpMethod
=
"POST"
,
notes
=
"结果确认-改分"
)
@ApiOperationSupport
(
order
=
24
)
@ApiOperationSupport
(
order
=
24
)
public
Result
<
Object
>
changeScore
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AppraisalAssessment
appraisalAssessment
){
public
Result
<
Object
>
changeScore
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AppraisalAssessment
appraisalAssessment
)
{
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
Integer
count2
=
jxglAppraisalMapper
.
selectCount
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
appraisalAssessment
.
getAppraisalId
())
.
eq
(
JxglAppraisal:
:
getId
,
appraisalAssessment
.
getAppraisalId
()).
in
(
JxglAppraisal:
:
getSts
,
.
in
(
JxglAppraisal:
:
getSts
,
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
(),
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
()));
if
(
count2
>
0
)
{
if
(
count2
>
0
)
{
...
@@ -1790,15 +1640,14 @@ public class JxglController {
...
@@ -1790,15 +1640,14 @@ public class JxglController {
}
}
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
JxglAppraisal
appraisal
=
jxglAppraisalMapper
.
selectOne
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getId
,
appraisalAssessment
.
getAppraisalId
())
.
eq
(
JxglAppraisal:
:
getId
,
appraisalAssessment
.
getAppraisalId
()).
select
(
JxglAppraisal:
:
getId
));
.
select
(
JxglAppraisal:
:
getId
));
if
(
appraisal
==
null
)
{
if
(
appraisal
==
null
)
{
return
ResultUtil
.
error
(
"考核
不存在"
);
return
ResultUtil
.
error
(
"考核不存在"
);
}
}
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
JxglProcessNode
processNode
=
jxglProcessNodeMapper
.
selectOne
(
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
new
QueryWrapper
<
JxglProcessNode
>().
lambda
()
.
eq
(
JxglProcessNode:
:
getAppraisalId
,
appraisal
.
getId
())
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
.
eq
(
JxglProcessNode:
:
getSts
,
ProcessNodeSts
.
IN_EXECUTION
.
getType
()));
if
(
processNode
==
null
)
{
if
(
processNode
==
null
)
{
return
ResultUtil
.
error
(
"流程不存在"
);
return
ResultUtil
.
error
(
"流程不存在"
);
...
@@ -1807,14 +1656,11 @@ public class JxglController {
...
@@ -1807,14 +1656,11 @@ public class JxglController {
if
(
ProcessType
.
RESULT_VERIFICATION
.
getType
()
==
processNode
.
getProcessType
())
{
if
(
ProcessType
.
RESULT_VERIFICATION
.
getType
()
==
processNode
.
getProcessType
())
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
if
(!
userBean
.
getEmpNum
().
equals
(
processNode
.
getExecutorId
()))
{
return
ResultUtil
.
error
(
"无权限
操作该流程"
);
return
ResultUtil
.
error
(
"无权限操作该流程"
);
}
}
JxglAppraisalAssessment
.
builder
()
JxglAppraisalAssessment
.
builder
().
id
(
appraisalAssessment
.
getAppraisalAssessmentId
())
.
id
(
appraisalAssessment
.
getAppraisalAssessmentId
())
.
comprehensiveScore
(
appraisalAssessment
.
getScore
()).
level
(
appraisalAssessment
.
getLevel
()).
build
()
.
comprehensiveScore
(
appraisalAssessment
.
getScore
())
.
level
(
appraisalAssessment
.
getLevel
())
.
build
()
.
updateById
();
.
updateById
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
...
@@ -1825,7 +1671,7 @@ public class JxglController {
...
@@ -1825,7 +1671,7 @@ public class JxglController {
appraisalLog
.
setType
(
AppraisalLogType
.
UPDATE_SCORE
.
getType
());
appraisalLog
.
setType
(
AppraisalLogType
.
UPDATE_SCORE
.
getType
());
appraisalLog
.
insert
();
appraisalLog
.
insert
();
}
else
{
}
else
{
return
ResultUtil
.
error
(
"流程状态异常"
);
return
ResultUtil
.
error
(
"流程状态异常"
);
}
}
...
@@ -1839,16 +1685,14 @@ public class JxglController {
...
@@ -1839,16 +1685,14 @@ public class JxglController {
@ApiOperation
(
value
=
"25.查询-我的绩效-员工绩效"
,
httpMethod
=
"POST"
,
notes
=
"查询-我的绩效-员工绩效"
)
@ApiOperation
(
value
=
"25.查询-我的绩效-员工绩效"
,
httpMethod
=
"POST"
,
notes
=
"查询-我的绩效-员工绩效"
)
@ApiOperationSupport
(
order
=
25
)
@ApiOperationSupport
(
order
=
25
)
@Role
@Role
public
Result
<
Object
>
selectsMEP
(
@CurrentUser
UserBean
userBean
,
@RequestBody
EmpPerformanceQuery
query
)
{
public
Result
<
Object
>
selectsMEP
(
@CurrentUser
UserBean
userBean
,
@RequestBody
EmpPerformanceQuery
query
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
empNum
=
userBean
.
getEmpNum
();
IPage
<
JxglAppraisal
>
page
=
new
Page
<
JxglAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
IPage
<
JxglAppraisal
>
page
=
new
Page
<
JxglAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
orgCode
);
query
.
setOrgCode
(
orgCode
);
List
<
ZzglBmgwM
>
listBM
=
zzglBmgwMMapper
.
selectList
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
()
List
<
ZzglBmgwM
>
listBM
=
zzglBmgwMMapper
.
selectList
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
().
select
(
ZzglBmgwM:
:
getId
)
.
select
(
ZzglBmgwM:
:
getId
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
ZzglBmgwM
ZzglBmgwM
=
CollUtil
.
getFirst
(
listBM
);
ZzglBmgwM
ZzglBmgwM
=
CollUtil
.
getFirst
(
listBM
);
if
(
ZzglBmgwM
==
null
)
{
if
(
ZzglBmgwM
==
null
)
{
return
ResultUtil
.
success
();
return
ResultUtil
.
success
();
...
@@ -1856,7 +1700,7 @@ public class JxglController {
...
@@ -1856,7 +1700,7 @@ public class JxglController {
List
<
YgglMainEmp
>
users
=
zzglBmgwMService
.
selectOtherlistent
(
orgCode
,
ZzglBmgwM
.
getId
());
List
<
YgglMainEmp
>
users
=
zzglBmgwMService
.
selectOtherlistent
(
orgCode
,
ZzglBmgwM
.
getId
());
List
<
Integer
>
empNums
=
null
;
List
<
Integer
>
empNums
=
null
;
if
(
users
!=
null
)
{
if
(
users
!=
null
)
{
empNums
=
users
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
empNums
=
users
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
}
}
query
.
setEmpNums
(
empNums
);
query
.
setEmpNums
(
empNums
);
...
@@ -1864,11 +1708,8 @@ public class JxglController {
...
@@ -1864,11 +1708,8 @@ public class JxglController {
List
<
JxglAppraisal
>
listA
=
pageA
.
getRecords
();
List
<
JxglAppraisal
>
listA
=
pageA
.
getRecords
();
return
ResultUtil
.
data
(
pageA
,
listA
);
return
ResultUtil
.
data
(
pageA
,
listA
);
}
}
}
}
src/main/java/cn/timer/api/dto/jxgl/AppraisalAssessment.java
View file @
b2e07b36
...
@@ -2,6 +2,9 @@ package cn.timer.api.dto.jxgl;
...
@@ -2,6 +2,9 @@ package cn.timer.api.dto.jxgl;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
javax.validation.constraints.NotNull
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
...
@@ -19,6 +22,7 @@ public class AppraisalAssessment implements Serializable{
...
@@ -19,6 +22,7 @@ public class AppraisalAssessment implements Serializable{
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"考核id"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"考核id"
,
example
=
"1"
)
private
Integer
appraisalId
;
private
Integer
appraisalId
;
...
@@ -28,6 +32,7 @@ public class AppraisalAssessment implements Serializable{
...
@@ -28,6 +32,7 @@ public class AppraisalAssessment implements Serializable{
@ApiModelProperty
(
value
=
"考核评定id"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"考核评定id"
,
example
=
"1"
)
private
Integer
appraisalAssessmentId
;
private
Integer
appraisalAssessmentId
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"评分"
,
example
=
"86"
)
@ApiModelProperty
(
value
=
"评分"
,
example
=
"86"
)
private
String
score
;
private
String
score
;
...
...
src/main/java/cn/timer/api/dto/jxgl/AppraisalQuery.java
View file @
b2e07b36
...
@@ -28,7 +28,7 @@ public class AppraisalQuery extends Page{
...
@@ -28,7 +28,7 @@ public class AppraisalQuery extends Page{
@ApiModelProperty
(
value
=
"姓名、手机号"
,
example
=
""
)
@ApiModelProperty
(
value
=
"姓名、手机号"
,
example
=
""
)
private
String
query
;
private
String
query
;
@Max
(
value
=
4
,
message
=
ValidationMsg
.
MAX
+
" 只能为 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档"
)
@Max
(
value
=
7
,
message
=
ValidationMsg
.
MAX
+
" 只能为 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档"
)
@Min
(
value
=
0
,
message
=
ValidationMsg
.
MIN
+
" 只能为 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档"
)
@Min
(
value
=
0
,
message
=
ValidationMsg
.
MIN
+
" 只能为 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档"
)
@ApiModelProperty
(
value
=
"状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档"
,
example
=
"0"
)
@ApiModelProperty
(
value
=
"状态 0目标填写 1目标确认 2自评 3上级评分 4 结果确认 5考核完成 6终止考核 7绩效归档"
,
example
=
"0"
)
private
Integer
sts
;
private
Integer
sts
;
...
...
src/main/java/cn/timer/api/dto/jxgl/AppraisalReject.java
View file @
b2e07b36
package
cn
.
timer
.
api
.
dto
.
jxgl
;
package
cn
.
timer
.
api
.
dto
.
jxgl
;
import
javax.validation.constraints.NotNull
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
...
@@ -12,6 +15,7 @@ import lombok.NoArgsConstructor;
...
@@ -12,6 +15,7 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@AllArgsConstructor
public
class
AppraisalReject
{
public
class
AppraisalReject
{
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"考核id"
,
example
=
""
)
@ApiModelProperty
(
value
=
"考核id"
,
example
=
""
)
private
Integer
id
;
private
Integer
id
;
...
...
src/main/java/cn/timer/api/dto/jxgl/AppraisalUpdate.java
View file @
b2e07b36
...
@@ -4,11 +4,14 @@ import java.io.Serializable;
...
@@ -4,11 +4,14 @@ import java.io.Serializable;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
javax.validation.constraints.NotNull
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
cn.timer.api.bean.jxgl.JxglAppraisal
;
import
cn.timer.api.bean.jxgl.JxglAppraisal
;
import
cn.timer.api.bean.jxgl.JxglAppraisalIndicators
;
import
cn.timer.api.bean.jxgl.JxglAppraisalIndicators
;
import
cn.timer.api.bean.jxgl.JxglAppraisalItem
;
import
cn.timer.api.bean.jxgl.JxglAppraisalItem
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
...
@@ -26,6 +29,7 @@ public class AppraisalUpdate implements Serializable{
...
@@ -26,6 +29,7 @@ public class AppraisalUpdate implements Serializable{
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"考核id"
,
example
=
"16"
)
@ApiModelProperty
(
value
=
"考核id"
,
example
=
"16"
)
private
Integer
id
;
private
Integer
id
;
...
...
src/main/java/cn/timer/api/dto/jxgl/AppraisalUpdateSts.java
View file @
b2e07b36
package
cn
.
timer
.
api
.
dto
.
jxgl
;
package
cn
.
timer
.
api
.
dto
.
jxgl
;
import
javax.validation.constraints.NotNull
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
...
@@ -12,9 +15,11 @@ import lombok.NoArgsConstructor;
...
@@ -12,9 +15,11 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@AllArgsConstructor
public
class
AppraisalUpdateSts
{
public
class
AppraisalUpdateSts
{
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"绩效考核id"
,
example
=
""
)
@ApiModelProperty
(
value
=
"绩效考核id"
,
example
=
""
)
private
Integer
id
;
private
Integer
id
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"状态"
,
example
=
""
)
@ApiModelProperty
(
value
=
"状态"
,
example
=
""
)
private
Integer
sts
;
private
Integer
sts
;
...
...
src/main/java/cn/timer/api/dto/jxgl/MyPerformance.java
View file @
b2e07b36
package
cn
.
timer
.
api
.
dto
.
jxgl
;
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
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -16,7 +13,6 @@ import lombok.NoArgsConstructor;
...
@@ -16,7 +13,6 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@AllArgsConstructor
public
class
MyPerformance
extends
Page
{
public
class
MyPerformance
extends
Page
{
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"员工id"
,
example
=
""
)
@ApiModelProperty
(
value
=
"员工id"
,
example
=
""
)
private
Integer
id
;
private
Integer
id
;
...
...
src/main/java/cn/timer/api/dto/jxgl/ProcessNodeUpdate.java
View file @
b2e07b36
...
@@ -5,6 +5,7 @@ import java.util.Date;
...
@@ -5,6 +5,7 @@ import java.util.Date;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
javax.validation.constraints.NotNull
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
...
@@ -12,6 +13,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -12,6 +13,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
cn.timer.api.bean.jxgl.JxglProcessNode
;
import
cn.timer.api.bean.jxgl.JxglProcessNode
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
...
@@ -29,12 +31,15 @@ public class ProcessNodeUpdate implements Serializable{
...
@@ -29,12 +31,15 @@ public class ProcessNodeUpdate implements Serializable{
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"编号"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"编号"
,
example
=
"10"
)
private
Integer
id
;
private
Integer
id
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"考核id"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"考核id"
,
example
=
"10"
)
private
Integer
appraisalId
;
private
Integer
appraisalId
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"执行人id(员工id)"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"执行人id(员工id)"
,
example
=
"10"
)
private
Integer
executorId
;
private
Integer
executorId
;
...
...
src/main/resources/mapping/jxgl/JxglAppraisalIndicatorsMapper.xml
View file @
b2e07b36
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"is_edit_weight"
property=
"isEditWeight"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -20,7 +21,8 @@
...
@@ -20,7 +21,8 @@
weight,
weight,
create_time,
create_time,
update_time,
update_time,
type
type,
is_edit_weight
</sql>
</sql>
<sql
id=
"Base_Column_List_Alias"
>
<sql
id=
"Base_Column_List_Alias"
>
...
@@ -30,7 +32,8 @@
...
@@ -30,7 +32,8 @@
weight JxglAppraisalIndicators_weight,
weight JxglAppraisalIndicators_weight,
create_time JxglAppraisalIndicators_create_time,
create_time JxglAppraisalIndicators_create_time,
update_time JxglAppraisalIndicators_update_time,
update_time JxglAppraisalIndicators_update_time,
type JxglAppraisalIndicators_type
type JxglAppraisalIndicators_type,
is_edit_weight JxglAppraisalIndicators_is_edit_weight
</sql>
</sql>
<!--
<!--
...
@@ -54,7 +57,10 @@
...
@@ -54,7 +57,10 @@
update_time,
update_time,
</if>
</if>
<if test ='null != type'>
<if test ='null != type'>
type
type,
</if>
<if test ='null != isEditWeight'>
is_edit_weight
</if>
</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<trim prefix="values (" suffix=")" suffixOverrides=",">
...
@@ -74,7 +80,10 @@
...
@@ -74,7 +80,10 @@
#{updateTime},
#{updateTime},
</if>
</if>
<if test ='null != type'>
<if test ='null != type'>
#{type}
#{type},
</if>
<if test ='null != isEditWeight'>
#{isEditWeight}
</if>
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -92,7 +101,8 @@
...
@@ -92,7 +101,8 @@
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != type'>type = #{type}</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != isEditWeight'>is_edit_weight = #{isEditWeight}</if>
</set>
</set>
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
...
...
src/main/resources/mapping/jxgl/JxglAppraisalIndicatorsTMapper.xml
View file @
b2e07b36
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"is_edit_weight"
property=
"isEditWeight"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -20,7 +21,8 @@
...
@@ -20,7 +21,8 @@
weight,
weight,
create_time,
create_time,
update_time,
update_time,
type
type,
is_edit_weight
</sql>
</sql>
<sql
id=
"Base_Column_List_Alias"
>
<sql
id=
"Base_Column_List_Alias"
>
...
@@ -30,7 +32,8 @@
...
@@ -30,7 +32,8 @@
weight JxglAppraisalIndicatorsT_weight,
weight JxglAppraisalIndicatorsT_weight,
create_time JxglAppraisalIndicatorsT_create_time,
create_time JxglAppraisalIndicatorsT_create_time,
update_time JxglAppraisalIndicatorsT_update_time,
update_time JxglAppraisalIndicatorsT_update_time,
type JxglAppraisalIndicatorsT_type
type JxglAppraisalIndicatorsT_type,
is_edit_weight JxglAppraisalIndicatorsT_is_edit_weight
</sql>
</sql>
<!--
<!--
...
@@ -54,7 +57,10 @@
...
@@ -54,7 +57,10 @@
update_time,
update_time,
</if>
</if>
<if test ='null != type'>
<if test ='null != type'>
type
type,
</if>
<if test ='null != isEditWeight'>
is_edit_weight
</if>
</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<trim prefix="values (" suffix=")" suffixOverrides=",">
...
@@ -74,7 +80,10 @@
...
@@ -74,7 +80,10 @@
#{updateTime},
#{updateTime},
</if>
</if>
<if test ='null != type'>
<if test ='null != type'>
#{type}
#{type},
</if>
<if test ='null != isEditWeight'>
#{isEditWeight}
</if>
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -92,7 +101,8 @@
...
@@ -92,7 +101,8 @@
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != weight'>weight = #{weight},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != type'>type = #{type}</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != isEditWeight'>is_edit_weight = #{isEditWeight}</if>
</set>
</set>
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
...
...
src/main/resources/mapping/jxgl/JxglAppraisalMapper.xml
View file @
b2e07b36
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
<result
column=
"sts"
property=
"sts"
/>
<result
column=
"sts"
property=
"sts"
/>
<result
column=
"is_edit"
property=
"isEdit"
/>
<result
column=
"is_edit"
property=
"isEdit"
/>
<result
column=
"executor_name"
property=
"executorName"
/>
<result
column=
"executor_name"
property=
"executorName"
/>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"bm_name"
property=
"bmName"
/>
</resultMap>
</resultMap>
<resultMap
id=
"BaseResultMap_All"
type=
"cn.timer.api.bean.jxgl.JxglAppraisal"
>
<resultMap
id=
"BaseResultMap_All"
type=
"cn.timer.api.bean.jxgl.JxglAppraisal"
>
...
@@ -76,6 +78,7 @@
...
@@ -76,6 +78,7 @@
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"is_edit_weight"
property=
"isEditWeight"
/>
<collection
column=
"JxglAppraisalIndicatorsAssessment_id"
property=
"appraisalIndicatorsAssessments"
ofType=
"cn.timer.api.bean.jxgl.JxglAppraisalIndicatorsAssessment"
<collection
column=
"JxglAppraisalIndicatorsAssessment_id"
property=
"appraisalIndicatorsAssessments"
ofType=
"cn.timer.api.bean.jxgl.JxglAppraisalIndicatorsAssessment"
resultMap=
"cn.timer.api.dao.jxgl.JxglAppraisalIndicatorsAssessmentMapper.BaseResultMap"
columnPrefix=
"JxglAppraisalIndicatorsAssessment_"
>
resultMap=
"cn.timer.api.dao.jxgl.JxglAppraisalIndicatorsAssessmentMapper.BaseResultMap"
columnPrefix=
"JxglAppraisalIndicatorsAssessment_"
>
</collection>
</collection>
...
@@ -178,7 +181,8 @@
...
@@ -178,7 +181,8 @@
e.weight e_weight,
e.weight e_weight,
e.create_time e_create_time,
e.create_time e_create_time,
e.update_time e_update_time,
e.update_time e_update_time,
e.type e_type
e.type e_type,
e.is_edit_weight e_is_edit_weight
</sql>
</sql>
<sql
id=
"Base_Column_List_Alias_f"
>
<sql
id=
"Base_Column_List_Alias_f"
>
...
@@ -332,7 +336,7 @@
...
@@ -332,7 +336,7 @@
LEFT JOIN jxgl_performance_appraisal h ON a.performance_appraisal_id = h.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 i ON b.executor_id = i.emp_num AND i.org_code = #{orgCode}
WHERE a.id = #{id}
WHERE a.id = #{id}
ORDER BY c.id , d.id
ORDER BY c.id , d.id
, b.process_type
</select>
</select>
<!--
<!--
...
...
src/main/resources/mapping/jxgl/JxglAppraisalTMapper.xml
View file @
b2e07b36
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"is_edit_weight"
property=
"isEditWeight"
/>
<collection
column=
"JxglAppraisalItemT_id"
property=
"appraisalItemTs"
ofType=
"cn.timer.api.bean.jxgl.JxglAppraisalItemT"
<collection
column=
"JxglAppraisalItemT_id"
property=
"appraisalItemTs"
ofType=
"cn.timer.api.bean.jxgl.JxglAppraisalItemT"
resultMap=
"cn.timer.api.dao.jxgl.JxglAppraisalItemTMapper.BaseResultMap"
columnPrefix=
"JxglAppraisalItemT_"
>
resultMap=
"cn.timer.api.dao.jxgl.JxglAppraisalItemTMapper.BaseResultMap"
columnPrefix=
"JxglAppraisalItemT_"
>
</collection>
</collection>
...
@@ -86,7 +87,8 @@
...
@@ -86,7 +87,8 @@
b.weight JxglAppraisalIndicatorsT_weight,
b.weight JxglAppraisalIndicatorsT_weight,
b.create_time JxglAppraisalIndicatorsT_create_time,
b.create_time JxglAppraisalIndicatorsT_create_time,
b.update_time JxglAppraisalIndicatorsT_update_time,
b.update_time JxglAppraisalIndicatorsT_update_time,
b.type JxglAppraisalIndicatorsT_type
b.type JxglAppraisalIndicatorsT_type,
b.is_edit_weight JxglAppraisalIndicatorsT_is_edit_weight
</sql>
</sql>
<sql
id=
"Base_Column_List_Alias_c"
>
<sql
id=
"Base_Column_List_Alias_c"
>
...
@@ -108,10 +110,7 @@
...
@@ -108,10 +110,7 @@
WHERE a.id = #{id}
WHERE a.id = #{id}
</select>
</select>
<!--
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAppraisalT">
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAppraisalT">
INSERT INTO jxgl_appraisal_t
INSERT INTO jxgl_appraisal_t
<trim prefix="(" suffix=")" suffixOverrides=",">
<trim prefix="(" suffix=")" suffixOverrides=",">
...
...
src/main/resources/mapping/jxgl/JxglBasicSettingMapper.xml
View file @
b2e07b36
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
FROM jxgl_basic_setting a
FROM jxgl_basic_setting a
LEFT JOIN jxgl_performance_rating b ON a.id = b.basic_setting_id
LEFT JOIN jxgl_performance_rating b ON a.id = b.basic_setting_id
WHERE a.org_code = #{orgCode}
WHERE a.org_code = #{orgCode}
ORDER BY b.ranks
</select>
</select>
<!--
<!--
...
...
src/main/resources/mapping/jxgl/JxglPerformanceAppraisalMapper.xml
View file @
b2e07b36
...
@@ -200,17 +200,19 @@
...
@@ -200,17 +200,19 @@
<select
id=
"selectMyByQuery"
resultMap=
"BaseResultMap_ALl"
>
<select
id=
"selectMyByQuery"
resultMap=
"BaseResultMap_ALl"
>
SELECT
SELECT
a.name,a.appraisal_start_time,a.appraisal_end_time,
a.name,a.appraisal_start_time,a.appraisal_end_time,
b.sts b_sts,
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,
c.comprehensive_score c_comprehensive_score,
c.comprehensive_score c_comprehensive_score,
c.level c_level
c.level c_level,
e.name b_executor_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
FROM jxgl_performance_appraisal a
LEFT JOIN jxgl_appraisal b ON b.performance_appraisal_id = a.id
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_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.sts = 1
LEFT JOIN yggl_main_emp e ON b.emp_num = e.emp_num AND a.org_code = e.org_code
<where>
<where>
AND a.org_code = #{param.orgCode}
AND a.org_code = #{param.orgCode}
AND
b.emp_num
= #{param.id}
AND
d.executor_id
= #{param.id}
<if
test=
"param.sts != null and param.sts == 0"
>
<if
test=
"param.sts != null and param.sts == 0"
>
AND b.sts = 0
AND b.sts = 0
</if>
</if>
...
@@ -223,10 +225,8 @@
...
@@ -223,10 +225,8 @@
<if
test=
"param.sts != null and param.sts == 3"
>
<if
test=
"param.sts != null and param.sts == 3"
>
AND b.sts = 4
AND b.sts = 4
</if>
</if>
</where>
</where>
</select>
</select>
...
...
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