提交修改
This commit is contained in:
commit
225e07be09
@ -35,5 +35,8 @@ public interface StaffRoleEvaluationGroupMapper extends BaseMapper<StaffRoleEval
|
||||
|
||||
List<EvaluationGroupInfo> selectStaffRoleEvaluationGroupBy(@Param("roleId") Long roleId);
|
||||
|
||||
List<Long> selectEvaluationGroupIdsByRoleId(@Param("roleId")Long roleId);
|
||||
|
||||
|
||||
void deleteStaffRoleEvaluationGroupByRoleId(@Param("roleId") Long roleId);
|
||||
}
|
||||
@ -32,6 +32,8 @@ public interface StaffRoleEvaluationGroupService extends IService<StaffRoleEvalu
|
||||
|
||||
int deleteStaffRoleEvaluationGroupById(Long id);
|
||||
|
||||
List<Long> selectEvaluationGroupIdsByRoleId(Long roleId);
|
||||
|
||||
|
||||
List<EvaluationGroupInfo> selectStaffRoleEvaluationGroupBy(Long id);
|
||||
|
||||
|
||||
@ -71,5 +71,8 @@ public class StaffRoleEvaluationGroupServiceImpl extends ServiceImpl<StaffRoleEv
|
||||
staffRoleEvaluationGroupMapper.deleteStaffRoleEvaluationGroupByRoleId(roleId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Long> selectEvaluationGroupIdsByRoleId(Long roleId) {
|
||||
return staffRoleEvaluationGroupMapper.selectEvaluationGroupIdsByRoleId(roleId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.lz.modules.performance.service;
|
||||
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.modules.flow.entity.StaffRole;
|
||||
import com.lz.modules.performance.req.AssessTaskReq;
|
||||
import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||
|
||||
@ -14,5 +15,8 @@ import java.util.List;
|
||||
public interface AssessService {
|
||||
PageUtils userTaskList(AssessTaskReq req,Long userId);
|
||||
|
||||
//List<ChartStatisticalRes> chartResult(ChartResultReq req);
|
||||
List<Long> roleDepartment(StaffRole staffRole);
|
||||
|
||||
List<Long> roleEvgroup(StaffRole staffRole);
|
||||
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
||||
//更新流程绩效
|
||||
ApprovalDto approvalDto = new ApprovalDto();
|
||||
approvalDto.setStatus(1);
|
||||
approvalDto.setResultRecordId(1L);
|
||||
approvalDto.setResultRecordId(aLong);
|
||||
approvalDto.setMenuName("开始评分");
|
||||
try {
|
||||
resultRecordService.newApproval(approvalDto);
|
||||
|
||||
@ -5,20 +5,29 @@ import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.StringUtil;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.flow.entity.StaffRole;
|
||||
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
|
||||
@ -33,6 +42,10 @@ public class AssessServiceImpl implements AssessService {
|
||||
private StaffService staffService;
|
||||
@Autowired
|
||||
private FlowChangeService flowChangeService;
|
||||
@Autowired
|
||||
private StaffRoleDepartmentService staffRoleDepartmentService;
|
||||
@Autowired
|
||||
private StaffRoleEvaluationGroupService staffRoleEvaluationGroupService;
|
||||
|
||||
@Override
|
||||
public PageUtils userTaskList(AssessTaskReq req,Long userId) {
|
||||
@ -66,4 +79,39 @@ public class AssessServiceImpl implements AssessService {
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Long> roleDepartment(StaffRole staffRole) {
|
||||
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) {
|
||||
if (staffRole.getDepartmentId() == 0) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return staffRoleEvaluationGroupService.selectEvaluationGroupIdsByRoleId(staffRole.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -93,5 +93,9 @@
|
||||
delete from lz_staff_role_evaluation_group where role_id = #{roleId}
|
||||
</delete>
|
||||
|
||||
<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