fix
This commit is contained in:
parent
7ae7f60fc0
commit
d9a67cbd99
@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface StaffRoleEvaluationGroupMapper extends BaseMapper<StaffRoleEvaluationGroup> {
|
||||
|
||||
@ -29,5 +32,7 @@ public interface StaffRoleEvaluationGroupMapper extends BaseMapper<StaffRoleEval
|
||||
|
||||
int deleteStaffRoleEvaluationGroupById(@Param("id") Long id);
|
||||
|
||||
List<Long> selectEvaluationGroupIdsByRoleId(@Param("roleId")Long roleId);
|
||||
|
||||
|
||||
}
|
||||
@ -3,6 +3,8 @@ package com.lz.modules.flow.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 绩效管理菜单表 服务类
|
||||
@ -29,5 +31,7 @@ public interface StaffRoleEvaluationGroupService extends IService<StaffRoleEvalu
|
||||
|
||||
int deleteStaffRoleEvaluationGroupById(Long id);
|
||||
|
||||
List<Long> selectEvaluationGroupIdsByRoleId(Long roleId);
|
||||
|
||||
|
||||
}
|
||||
@ -7,6 +7,8 @@ import com.lz.modules.flow.service.StaffRoleEvaluationGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 绩效管理菜单表 服务类
|
||||
@ -59,5 +61,8 @@ public class StaffRoleEvaluationGroupServiceImpl extends ServiceImpl<StaffRoleEv
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<Long> selectEvaluationGroupIdsByRoleId(Long roleId) {
|
||||
return staffRoleEvaluationGroupMapper.selectEvaluationGroupIdsByRoleId(roleId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,18 +10,24 @@ import com.lz.modules.flow.entity.StaffRoleDepartment;
|
||||
import com.lz.modules.flow.service.FlowChangeService;
|
||||
import com.lz.modules.flow.service.FlowRecordService;
|
||||
import com.lz.modules.flow.service.StaffRoleDepartmentService;
|
||||
import com.lz.modules.flow.service.StaffRoleEvaluationGroupService;
|
||||
import com.lz.modules.performance.dto.TaskListDto;
|
||||
import com.lz.modules.performance.req.AssessTaskReq;
|
||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||
import com.lz.modules.performance.res.TaskListRes;
|
||||
import com.lz.modules.performance.service.AssessService;
|
||||
import net.bytebuddy.asm.Advice;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: djc
|
||||
@ -38,6 +44,8 @@ public class AssessServiceImpl implements AssessService {
|
||||
private FlowChangeService flowChangeService;
|
||||
@Autowired
|
||||
private StaffRoleDepartmentService staffRoleDepartmentService;
|
||||
@Autowired
|
||||
private StaffRoleEvaluationGroupService staffRoleEvaluationGroupService;
|
||||
|
||||
@Override
|
||||
public PageUtils userTaskList(AssessTaskReq req,Long userId) {
|
||||
@ -74,13 +82,35 @@ public class AssessServiceImpl implements AssessService {
|
||||
|
||||
@Override
|
||||
public List<Long> roleDepartment(StaffRole staffRole) {
|
||||
List<StaffRoleDepartment> staffRoleDepartments = staffRoleDepartmentService.selectStaffRoleDepartmentByStaffRoleId(staffRole.getId());
|
||||
return null;
|
||||
if (staffRole.getDepartmentId() == 0) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
List<StaffRoleDepartment> staffRoleDepartments = staffRoleDepartmentService.selectStaffRoleDepartmentByStaffRoleId(staffRole.getId());
|
||||
if (CollectionUtils.isNotEmpty(staffRoleDepartments)) {
|
||||
List<String> allDepart = new ArrayList<>();
|
||||
staffRoleDepartments.forEach(staffRoleDepartment -> {
|
||||
List<String> strings = staffService.selectAllDeparmentIdsByDepartmentParentId(staffRoleDepartment.getDepartmentId());
|
||||
allDepart.addAll(strings);
|
||||
});
|
||||
|
||||
List<Long> collect = allDepart.stream().distinct().map(s -> Long.valueOf(s)).collect(Collectors.toList());
|
||||
return collect;
|
||||
}
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Long> roleEvgroup(StaffRole staffRole) {
|
||||
return null;
|
||||
if (staffRole.getDepartmentId() == 0) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return staffRoleEvaluationGroupService.selectEvaluationGroupIdsByRoleId(staffRole.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -79,5 +79,10 @@
|
||||
update lz_staff_role_evaluation_group set is_delete = 1 where id=#{id} limit 1
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectEvaluationGroupIdsByRoleId">
|
||||
select evaluation_group_id from lz_staff_role_evaluation_group where is_delete = 0 and role_id = #{roleId} and is_select = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user