Commit 459d3431 by leialin

Merge branch 'lal' into 'develop'

Lal

See merge request 8timerv2/8timerapiv200!302
parents 3243bc72 945f5d36
......@@ -628,6 +628,15 @@ public class JxglController {
public Result<Object> updatePAS(@CurrentUser UserBean userBean,
@Validated @RequestBody AppraisalUpdateSts appraisalUpdateSts) {
//查询绩效组是否还存在可开启的绩效
// JxglPerformanceAppraisal appisal = JxglPerformanceAppraisal.builder().id(appraisalUpdateSts.getId()).build().selectById();
// if(appisal.getAppraisalPersonNum() == 1) {
//
// }
List<JxglAppraisal> ais = JxglAppraisal.builder().build().selectList(new QueryWrapper<JxglAppraisal>().lambda().eq(JxglAppraisal::getPerformanceAppraisalId, appraisalUpdateSts.getId())
.eq(JxglAppraisal::getSts, 0));
if(ais.size() > 0) {
JxglPerformanceAppraisal performanceAppraisal = jxglPerformanceAppraisalMapper
.selectOne(new QueryWrapper<JxglPerformanceAppraisal>().lambda()
.eq(JxglPerformanceAppraisal::getId, appraisalUpdateSts.getId())
......@@ -783,6 +792,10 @@ public class JxglController {
.updateById(JxglPerformanceAppraisal.builder().id(appraisalUpdateSts.getId()).sts(sts).build());
return ResultUtil.success();
}else {
return ResultUtil.error("已无可开启的绩效节点");
}
}
/**
......@@ -1031,6 +1044,20 @@ public class JxglController {
} else if (appraisal.getSts() <= AppraisalSts.RESULT_VERIFICATION.getType()) {
JxglAppraisal.builder().id(id).sts(AppraisalSts.TERMINATION_ASSESSMENT.getType()).build().updateById();
//查询所属绩效组是否为一人
JxglPerformanceAppraisal appisal = JxglPerformanceAppraisal.builder().id(appraisal.getPerformanceAppraisalId()).build().selectById();
if(appisal.getAppraisalPersonNum() == 1) {
//绩效考核改为 “4, "终止考核"”
jxglPerformanceAppraisalMapper.updateById(JxglPerformanceAppraisal.builder().id(appraisal.getPerformanceAppraisalId()).sts(PerformanceAppraisalSts.TERMINATION_ASSESSMENT.getType()).build());
}else {
List<JxglAppraisal> ais = JxglAppraisal.builder().build().selectList(new QueryWrapper<JxglAppraisal>().lambda().eq(JxglAppraisal::getPerformanceAppraisalId, appraisal.getPerformanceAppraisalId())
.eq(JxglAppraisal::getSts, 0));
if(ais.size() == 0) {
//绩效考核改为 “4, "终止考核"”
jxglPerformanceAppraisalMapper.updateById(JxglPerformanceAppraisal.builder().id(appraisal.getPerformanceAppraisalId()).sts(PerformanceAppraisalSts.TERMINATION_ASSESSMENT.getType()).build());
}
}
JxglAppraisalLog appraisalLog = JxglAppraisalLog.builder().build();
appraisalLog.setAppraisalId(appraisal.getId());
appraisalLog.setExecutorId(userBean.getEmpNum());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment