diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java index c8330eae..257dd299 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -473,32 +473,48 @@ public class ResultRecordController extends AbstractController { List staffs = new ArrayList<>(); Boolean isAllScore = true;//false表示返回所有的评分,true表示值返回评分了的人 Boolean isOrScore = false;//是否为或签 + int staffIndex = 0; for (FlowChartDetailRecord record:flowChartDetailRecords ) { List staffs1 = new ArrayList<>(); if(record.getOptType().intValue() == -1){ //自己 StaffEntity staffEntity = new StaffEntity(); - staffEntity.setId(resultRecord.getStaffId()); - staffEntity.setName(resultRecord.getStaffName()); + staffEntity.setId(flowRecords1.get(staffIndex).getApprovalStaffId()); + staffEntity.setName(flowRecords1.get(staffIndex).getApprovalStaffName()); staffs1.add(staffEntity); + staffIndex++; }else if(record.getOptType().intValue() == 0){ //指定人员 //获取人员信息 - List sIds = Arrays.stream(record.getOptIds().split(",")).map(new Function() { + int size = record.getOptIds().split(",").length; + List sIds = new ArrayList<>(); + for(int i =0; i < size; i++){ + StaffEntity staffEntity = new StaffEntity(); + staffEntity.setId(flowRecords1.get(staffIndex).getApprovalStaffId()); + staffEntity.setName(flowRecords1.get(staffIndex).getApprovalStaffName()); + staffs1.add(staffEntity); + staffIndex++; + } + /*List sIds = Arrays.stream(record.getOptIds().split(",")).map(new Function() { @Override public Long apply(String s) { return Long.parseLong(s); } }).collect(Collectors.toList()); - staffs1.addAll(staffService.selectNamesByIds(sIds));//这里不过滤离职人员,因为过滤了可能涉及到评分规则的变更 + staffs1.addAll(staffService.selectNamesByIds(sIds));//这里不过滤离职人员,因为过滤了可能涉及到评分规则的变更*/ - }else{ + }else{//暂时不支持多个领导吧 //领导 - DepartManagers departManagers = staffService.findLeader(resultRecord.getStaffId(), record.getOptType()); + /*DepartManagers departManagers = staffService.findLeader(resultRecord.getStaffId(), record.getOptType()); if(departManagers.getManagers().size() > 0){ staffs1.addAll(departManagers.getManagers()); - } + }*/ + StaffEntity staffEntity = new StaffEntity(); + staffEntity.setId(flowRecords1.get(staffIndex).getApprovalStaffId()); + staffEntity.setName(flowRecords1.get(staffIndex).getApprovalStaffName()); + staffs1.add(staffEntity); + staffIndex++; } if(staffs1.size() == 0){ log.info("无法找到评分人员,开始找绩效管理人员");