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 com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StaffRoleEvaluationGroupMapper extends BaseMapper<StaffRoleEvaluationGroup> {
|
public interface StaffRoleEvaluationGroupMapper extends BaseMapper<StaffRoleEvaluationGroup> {
|
||||||
|
|
||||||
@ -29,5 +32,7 @@ public interface StaffRoleEvaluationGroupMapper extends BaseMapper<StaffRoleEval
|
|||||||
|
|
||||||
int deleteStaffRoleEvaluationGroupById(@Param("id") Long id);
|
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.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
import com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 绩效管理菜单表 服务类
|
* 绩效管理菜单表 服务类
|
||||||
@ -29,5 +31,7 @@ public interface StaffRoleEvaluationGroupService extends IService<StaffRoleEvalu
|
|||||||
|
|
||||||
int deleteStaffRoleEvaluationGroupById(Long id);
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <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.FlowChangeService;
|
||||||
import com.lz.modules.flow.service.FlowRecordService;
|
import com.lz.modules.flow.service.FlowRecordService;
|
||||||
import com.lz.modules.flow.service.StaffRoleDepartmentService;
|
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.dto.TaskListDto;
|
||||||
import com.lz.modules.performance.req.AssessTaskReq;
|
import com.lz.modules.performance.req.AssessTaskReq;
|
||||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||||
import com.lz.modules.performance.res.TaskListRes;
|
import com.lz.modules.performance.res.TaskListRes;
|
||||||
import com.lz.modules.performance.service.AssessService;
|
import com.lz.modules.performance.service.AssessService;
|
||||||
|
import net.bytebuddy.asm.Advice;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: djc
|
* @Author: djc
|
||||||
@ -38,6 +44,8 @@ public class AssessServiceImpl implements AssessService {
|
|||||||
private FlowChangeService flowChangeService;
|
private FlowChangeService flowChangeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private StaffRoleDepartmentService staffRoleDepartmentService;
|
private StaffRoleDepartmentService staffRoleDepartmentService;
|
||||||
|
@Autowired
|
||||||
|
private StaffRoleEvaluationGroupService staffRoleEvaluationGroupService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils userTaskList(AssessTaskReq req,Long userId) {
|
public PageUtils userTaskList(AssessTaskReq req,Long userId) {
|
||||||
@ -74,13 +82,35 @@ public class AssessServiceImpl implements AssessService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> roleDepartment(StaffRole staffRole) {
|
public List<Long> roleDepartment(StaffRole staffRole) {
|
||||||
List<StaffRoleDepartment> staffRoleDepartments = staffRoleDepartmentService.selectStaffRoleDepartmentByStaffRoleId(staffRole.getId());
|
if (staffRole.getDepartmentId() == 0) {
|
||||||
return null;
|
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
|
@Override
|
||||||
public List<Long> roleEvgroup(StaffRole staffRole) {
|
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 lz_staff_role_evaluation_group set is_delete = 1 where id=#{id} limit 1
|
||||||
</update>
|
</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>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user