From 543a284ecfe246d359dfc6e4f622fca2ea9209a0 Mon Sep 17 00:00:00 2001 From: wulin Date: Fri, 13 Nov 2020 15:20:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=97=B6=E8=8E=B7=E5=8F=96=E7=9A=84=E5=88=86=E6=95=B0?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/controller/ResultRecordController.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 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 287a3ea4..cebf697c 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -369,12 +369,13 @@ public class ResultRecordController extends AbstractController { Boolean isAllScore = true;//false表示返回所有的评分,true表示值返回评分了的人 for (FlowChartDetailRecord record:flowChartDetailRecords ) { + List 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 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); }