This commit is contained in:
杜建超 2020-10-30 14:23:14 +08:00
parent 0d35844250
commit 6b53b91544
3 changed files with 15 additions and 4 deletions

View File

@ -44,4 +44,6 @@ public interface EvaluationStartStaffMapper extends BaseMapper<EvaluationStartSt
int updateBatchToScore(@Param("startId") Long startId,@Param("evaluationId")Long evaluationId);
int deleteEvaluationStartStaffChangeAssess(@Param("startId") Long startId,@Param("staffIds") List<String> staffIds);
List<Long> selectStaffIdsByStart(@Param("startId") Long startId);
}

View File

@ -167,20 +167,25 @@ public class AssessManagerServiceImpl implements AssessManagerService {
//初始化添加用户的数据
List<GroupStaffs> groupS = new ArrayList<>();
//排除已发起过的
List<Long> longs = evaluationStartStaffMapper.selectStaffIdsByStart(req.getStartId());
for(EvaluationGroup group:evaluationGroups){
GroupStaffs groupStaffs = new GroupStaffs();
groupStaffs.setEvaluationGroup(group);
List<String> staffs = map.get(group.getId());
staffs.retainAll(notInGroup);
map.put(group.getId(),staffs);
GroupStaffs groupStaffs = new GroupStaffs();
groupStaffs.setGroupId(group.getId());
List<Long> collect = staffs.stream().map(s -> Long.valueOf(s)).collect(toList());
collect.removeAll(longs);
groupStaffs.setStaffIds(collect);
groupS.add(groupStaffs);
}
StartGroups startGroups = new StartGroups();
startGroups.setStartId(req.getStartId());
startGroups.setStaffIds(groupS);
startGroups.setGroups(groupS);
flowStartService.startStaffs(startGroups);
return ok;

View File

@ -163,5 +163,9 @@
</foreach>
)
</update>
<select id="selectStaffIdsByStart" resultType="long">
select staff_id from lz_evaluation_start_staff where start_id=#{startId} and is_delete = 0
</select>
</mapper>