From 9972a921b3b28872cc91a61308da60ac7731d4c5 Mon Sep 17 00:00:00 2001 From: wulin Date: Fri, 18 Dec 2020 16:13:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=AF=84=E5=88=86=E8=BD=AC?= =?UTF-8?q?=E4=BA=A4=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResultRecordController.java | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) 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("无法找到评分人员,开始找绩效管理人员");