解决没有领导时,从绩效管理员里面找人评分

This commit is contained in:
wulin 2020-11-12 09:40:30 +08:00
parent 751bf254ee
commit 4d52ed7432
6 changed files with 21 additions and 4 deletions

View File

@ -387,9 +387,10 @@ public class ResultRecordController extends AbstractController {
staffs.addAll(departManagers.getManagers());
}
}
/*if(staffs.size() == 0){
return R.error("找不到有效的评分人,设置的评分人不存在");
}*/
if(staffs.size() == 0){
log.info("无法找到评分人员,开始找绩效管理人员");
staffs = staffService.findManger(resultRecord.getId(), 4);
}
for (StaffEntity staff:staffs
) {

View File

@ -98,4 +98,6 @@ public interface StaffDao extends BaseMapper<StaffEntity> {
List<StaffEntity> selectNamesByIds(@Param("list") List<Long> sIds);
List<StaffEntity> selectStaffsByGroupId(@Param("copyId") Long copyId);
List<StaffEntity> findManger(@Param("recordId") Long recordId, @Param("flowProcess") int flowProcess);
}

View File

@ -103,5 +103,7 @@ public interface StaffService extends IService<StaffEntity> {
List<StaffEntity> selectNamesByIds(List<Long> sIds);
//获取绩效考核管理员
List<StaffEntity> selectStaffsByGroupId(Long copyId);
List<StaffEntity> findManger(Long recordId, int flowProcess);
}

View File

@ -529,5 +529,10 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
return staffDao.selectStaffsByGroupId(copyId);
}
@Override
public List<StaffEntity> findManger(Long recordId, int flowProcess){
return staffDao.findManger(recordId, flowProcess);
}
}

View File

@ -383,7 +383,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
evaluationGroup =
evaluationGroupService.selectEvaluationGroupByCopyId(evaluationGroup.getId(),flowStart.getId());
if(evaluationGroup == null){
log.info("无法找到拷贝组信息");
log.info("无法assess/manager/detail找到拷贝组信息");
return 5;
}
//以下代码没必要更新因为这个拷贝分用不到正确的对应关系清查看lz_evaluation_start_staff

View File

@ -545,4 +545,11 @@
) and is_delete=0) as staff join lz_staff_occupation as occupation on staff.id = occupation.staff_id where occupation.staff_status=0
</select>
<select id="findManger" resultType="com.lz.modules.app.entity.StaffEntity">
select staff.* from lz_staff as staff join lz_flow_record as record
on record.approval_staff_id = staff.id
where record.record_id = #{recordId} and record.flow_process=#{flowProcess}
</select>
</mapper>