修复获取详情时获取的分数不对的问题
This commit is contained in:
parent
00966dd7e2
commit
543a284ecf
@ -369,12 +369,13 @@ public class ResultRecordController extends AbstractController {
|
||||
Boolean isAllScore = true;//false表示返回所有的评分,true表示值返回评分了的人
|
||||
for (FlowChartDetailRecord record:flowChartDetailRecords
|
||||
) {
|
||||
List<StaffEntity> staffs1 = new ArrayList<>();
|
||||
if(record.getOptType().intValue() == -1){
|
||||
//自己
|
||||
StaffEntity staffEntity = new StaffEntity();
|
||||
staffEntity.setId(resultRecord.getId());
|
||||
staffEntity.setName(resultRecord.getStaffName());
|
||||
staffs.add(staffEntity);
|
||||
staffs1.add(staffEntity);
|
||||
}else if(record.getOptType().intValue() == 0){
|
||||
//指定人员
|
||||
//获取人员信息
|
||||
@ -384,18 +385,18 @@ public class ResultRecordController extends AbstractController {
|
||||
return Long.parseLong(s);
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
staffs.addAll(staffService.selectNamesByIds(sIds));//这里不过滤离职人员,因为过滤了可能涉及到评分规则的变更
|
||||
staffs1.addAll(staffService.selectNamesByIds(sIds));//这里不过滤离职人员,因为过滤了可能涉及到评分规则的变更
|
||||
|
||||
}else{
|
||||
//领导
|
||||
DepartManagers departManagers = staffService.findLeader(resultRecord.getStaffId(), record.getOptType());
|
||||
if(departManagers.getManagers().size() > 0){
|
||||
staffs.addAll(departManagers.getManagers());
|
||||
staffs1.addAll(departManagers.getManagers());
|
||||
}
|
||||
}
|
||||
if(staffs.size() == 0){
|
||||
if(staffs1.size() == 0){
|
||||
log.info("无法找到评分人员,开始找绩效管理人员");
|
||||
staffs = staffService.findManger(resultRecord.getId(), ChartFlowType.SCORE.getCode());
|
||||
staffs1 = staffService.findManger(resultRecord.getId(), ChartFlowType.SCORE.getCode());
|
||||
}
|
||||
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(resultRecord.getId(), 0);//获取未执行的节点
|
||||
if(flowRecords.size() > 0){
|
||||
@ -416,11 +417,7 @@ public class ResultRecordController extends AbstractController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (StaffEntity staff:staffs
|
||||
for (StaffEntity staff:staffs1
|
||||
) {
|
||||
ResultScoreDto resultScore = new ResultScoreDto();
|
||||
resultScore.setApprovalId(staff.getId());
|
||||
@ -428,6 +425,7 @@ public class ResultRecordController extends AbstractController {
|
||||
resultScore.setWeight(record.getWeight());
|
||||
scoreDtos.add(resultScore);
|
||||
}
|
||||
staffs.addAll(staffs1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user