提匀修
This commit is contained in:
commit
c843474fee
@ -18,6 +18,7 @@ public enum WorkMsgTypeEnum {
|
|||||||
END(5, "绩效终止", "去查看", "# 绩效终止\n ## @,你的绩效终止"),
|
END(5, "绩效终止", "去查看", "# 绩效终止\n ## @,你的绩效终止"),
|
||||||
START_WORK(6, "绩效考评待办事项", "去查看", "# 绩效目标制定\n ## @,你的绩效需要制定目标"),
|
START_WORK(6, "绩效考评待办事项", "去查看", "# 绩效目标制定\n ## @,你的绩效需要制定目标"),
|
||||||
START_SCORE(7, "绩效考评待办事项", "去查看", "# 绩效结果输入\n ## @,你的绩效需要输入结果"),
|
START_SCORE(7, "绩效考评待办事项", "去查看", "# 绩效结果输入\n ## @,你的绩效需要输入结果"),
|
||||||
|
PROCESS(8, "绩效考评待办事项", "去查看", "# @的绩效\n ## 需您去处理"),
|
||||||
// 您的2020年10月绩效考核已经开始,请尽快制定绩效目标
|
// 您的2020年10月绩效考核已经开始,请尽快制定绩效目标
|
||||||
// 吴林的2020年12月绩效考核的目标需要您确认,点击前往确认
|
// 吴林的2020年12月绩效考核的目标需要您确认,点击前往确认
|
||||||
;
|
;
|
||||||
|
|||||||
@ -387,6 +387,9 @@ public class ResultRecordController extends AbstractController {
|
|||||||
staffs.addAll(departManagers.getManagers());
|
staffs.addAll(departManagers.getManagers());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*if(staffs.size() == 0){
|
||||||
|
return R.error("找不到有效的评分人,设置的评分人不存在");
|
||||||
|
}*/
|
||||||
|
|
||||||
for (StaffEntity staff:staffs
|
for (StaffEntity staff:staffs
|
||||||
) {
|
) {
|
||||||
@ -423,45 +426,48 @@ public class ResultRecordController extends AbstractController {
|
|||||||
//下面设置计算公式
|
//下面设置计算公式
|
||||||
dto.setCalculate(setCalculateValue(calculateModels, dto)) ;
|
dto.setCalculate(setCalculateValue(calculateModels, dto)) ;
|
||||||
weight = weight.add(dto.getCheckWeight());
|
weight = weight.add(dto.getCheckWeight());
|
||||||
//获取评分详细
|
if(scoreDtos.size() > 0){
|
||||||
List<ResultScore> scores =
|
//获取评分详细
|
||||||
resultScoreService.selectResultScoresByDetailIdAndOrderByStaffIds(dto.getId(), scoreDtos);
|
List<ResultScore> scores =
|
||||||
if(scores.size() > 0){
|
resultScoreService.selectResultScoresByDetailIdAndOrderByStaffIds(dto.getId(), scoreDtos);
|
||||||
//
|
if(scores.size() > 0){
|
||||||
List<ResultScoreDto> scoreDtos1 = new ArrayList<>();
|
|
||||||
for (ResultScoreDto scoreDto: scoreDtos
|
|
||||||
) {//
|
|
||||||
//
|
//
|
||||||
boolean isAdd = false;
|
List<ResultScoreDto> scoreDtos1 = new ArrayList<>();
|
||||||
for (ResultScore score:
|
for (ResultScoreDto scoreDto: scoreDtos
|
||||||
scores) {
|
) {//
|
||||||
if(scoreDto.getApprovalId().longValue() == score.getApprovalId().longValue()){
|
//
|
||||||
|
boolean isAdd = false;
|
||||||
|
for (ResultScore score:
|
||||||
|
scores) {
|
||||||
|
if(scoreDto.getApprovalId().longValue() == score.getApprovalId().longValue()){
|
||||||
|
ResultScoreDto scoreDto1 = new ResultScoreDto();
|
||||||
|
BeanUtils.copyProperties(score, scoreDto1);
|
||||||
|
scoreDto1.setApprovalId(scoreDto.getApprovalId());
|
||||||
|
scoreDto1.setApprovalName(scoreDto.getApprovalName());
|
||||||
|
scoreDto1.setWeight(scoreDto.getWeight());
|
||||||
|
scoreDtos1.add(scoreDto1);
|
||||||
|
scores.remove(score);
|
||||||
|
isAdd = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!isAdd){
|
||||||
ResultScoreDto scoreDto1 = new ResultScoreDto();
|
ResultScoreDto scoreDto1 = new ResultScoreDto();
|
||||||
BeanUtils.copyProperties(score, scoreDto1);
|
|
||||||
scoreDto1.setApprovalId(scoreDto.getApprovalId());
|
scoreDto1.setApprovalId(scoreDto.getApprovalId());
|
||||||
scoreDto1.setApprovalName(scoreDto.getApprovalName());
|
scoreDto1.setApprovalName(scoreDto.getApprovalName());
|
||||||
scoreDto1.setWeight(scoreDto.getWeight());
|
scoreDto1.setWeight(scoreDto.getWeight());
|
||||||
scoreDtos1.add(scoreDto1);
|
scoreDtos1.add(scoreDto1);
|
||||||
scores.remove(score);
|
|
||||||
isAdd = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!isAdd){
|
dto.setScoreDtos(scoreDtos1);
|
||||||
ResultScoreDto scoreDto1 = new ResultScoreDto();
|
}else{
|
||||||
scoreDto1.setApprovalId(scoreDto.getApprovalId());
|
dto.setScoreDtos(scoreDtos);
|
||||||
scoreDto1.setApprovalName(scoreDto.getApprovalName());
|
|
||||||
scoreDto1.setWeight(scoreDto.getWeight());
|
|
||||||
scoreDtos1.add(scoreDto1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
dto.setScoreDtos(scoreDtos1);
|
|
||||||
}else{
|
|
||||||
dto.setScoreDtos(scoreDtos);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
resultRecortModelDto.setDetailDtos(detailDtos);
|
resultRecortModelDto.setDetailDtos(detailDtos);
|
||||||
resultRecortModelDtos.add(resultRecortModelDto);
|
resultRecortModelDtos.add(resultRecortModelDto);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ package com.lz.modules.flow.dao;
|
|||||||
*/
|
*/
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.lz.modules.app.dto.EvaluationGroupInfo;
|
import com.lz.modules.app.dto.EvaluationGroupInfo;
|
||||||
|
import com.lz.modules.flow.entity.StaffRole;
|
||||||
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;
|
||||||
@ -40,5 +41,9 @@ public interface StaffRoleEvaluationGroupMapper extends BaseMapper<StaffRoleEval
|
|||||||
|
|
||||||
void deleteStaffRoleEvaluationGroupByRoleId(@Param("roleId") Long roleId);
|
void deleteStaffRoleEvaluationGroupByRoleId(@Param("roleId") Long roleId);
|
||||||
|
|
||||||
|
|
||||||
|
List<StaffRoleEvaluationGroup> selectStaffRoleEvaluationsGroupByStaffRoles(@Param("list") List<StaffRole> staffRoles);
|
||||||
|
|
||||||
StaffRoleEvaluationGroup selectEvaluationGroupIdsByRoleIdGroupId(@Param("roleId") Long roleId, @Param("groupId") Long groupId);
|
StaffRoleEvaluationGroup selectEvaluationGroupIdsByRoleIdGroupId(@Param("roleId") Long roleId, @Param("groupId") Long groupId);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -59,7 +59,11 @@ public interface StaffRoleMapper extends BaseMapper<StaffRole> {
|
|||||||
|
|
||||||
List<StaffMenu> selectAllMenus(@Param("userId") Long userId);
|
List<StaffMenu> selectAllMenus(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
List<StaffRole> selectMastRoles();
|
||||||
|
|
||||||
|
List<StaffRole> selectAllGroupManageRoles();
|
||||||
List<StaffRole> selectAllStaffRoleByDepartmentLevel(@Param("departmentLevels") List<String> departmentLevels);
|
List<StaffRole> selectAllStaffRoleByDepartmentLevel(@Param("departmentLevels") List<String> departmentLevels);
|
||||||
|
|
||||||
StaffRole selectStaffRolesByStaffIdDepartmentLevelList(@Param("staffId") Long staffId, @Param("departmentLevels") List<String> departmentLevels);
|
StaffRole selectStaffRolesByStaffIdDepartmentLevelList(@Param("staffId") Long staffId, @Param("departmentLevels") List<String> departmentLevels);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -8,6 +8,7 @@ import com.lz.modules.flow.entity.EvaluationGroup;
|
|||||||
import com.lz.modules.flow.req.EvaluationGroupReq;
|
import com.lz.modules.flow.req.EvaluationGroupReq;
|
||||||
import com.lz.modules.performance.dto.CheckStaffDto;
|
import com.lz.modules.performance.dto.CheckStaffDto;
|
||||||
import com.lz.modules.performance.req.CheckStaffReq;
|
import com.lz.modules.performance.req.CheckStaffReq;
|
||||||
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -41,7 +42,7 @@ public interface EvaluationGroupService extends IService<EvaluationGroup> {
|
|||||||
List<String> selectAllStaffIdsByGroupId(Long id);
|
List<String> selectAllStaffIdsByGroupId(Long id);
|
||||||
|
|
||||||
|
|
||||||
PageUtils selectEvaluationGroupByReq(EvaluationGroupReq req);
|
PageUtils selectEvaluationGroupByReq(EvaluationGroupReq req, SysUserEntity sysUserEntity);
|
||||||
|
|
||||||
List<EvaluationGroup> selectEvaluationGroupByIds(List<Long> ids);
|
List<EvaluationGroup> selectEvaluationGroupByIds(List<Long> ids);
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.lz.modules.flow.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.modules.app.dto.EvaluationGroupInfo;
|
import com.lz.modules.app.dto.EvaluationGroupInfo;
|
||||||
|
import com.lz.modules.flow.entity.StaffRole;
|
||||||
import com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
import com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -39,5 +40,9 @@ public interface StaffRoleEvaluationGroupService extends IService<StaffRoleEvalu
|
|||||||
|
|
||||||
void deleteStaffRoleEvaluationGroupByRoleId(Long roleId);
|
void deleteStaffRoleEvaluationGroupByRoleId(Long roleId);
|
||||||
|
|
||||||
|
|
||||||
|
List<StaffRoleEvaluationGroup> selectStaffRoleEvaluationsGroupByStaffRoles(List<StaffRole> staffRoles);
|
||||||
|
|
||||||
StaffRoleEvaluationGroup selectEvaluationGroupIdsByRoleIdGroupId(Long roleId, Long groupId);
|
StaffRoleEvaluationGroup selectEvaluationGroupIdsByRoleIdGroupId(Long roleId, Long groupId);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -65,6 +65,11 @@ public interface StaffRoleService extends IService<StaffRole> {
|
|||||||
List<StaffRole> selectAllByStaffId(Long userId);
|
List<StaffRole> selectAllByStaffId(Long userId);
|
||||||
|
|
||||||
Map<String, Integer> getRoleByUserId(Long userId);
|
Map<String, Integer> getRoleByUserId(Long userId);
|
||||||
|
//获取主管理员
|
||||||
|
List<StaffRole> selectMastRoles();
|
||||||
|
//获取管理全部考评组
|
||||||
|
List<StaffRole> selectAllGroupManageRoles();
|
||||||
List<StaffRole> selectAllStaffRoleByDepartmentLevel(List<String> asList);
|
List<StaffRole> selectAllStaffRoleByDepartmentLevel(List<String> asList);
|
||||||
|
|
||||||
|
List<StaffRole> selectByEvaluationGroupId(Long id);
|
||||||
}
|
}
|
||||||
@ -19,11 +19,16 @@ import com.lz.modules.flow.dao.EvaluationGroupMapper;
|
|||||||
import com.lz.modules.flow.dao.EvaluationStartStaffMapper;
|
import com.lz.modules.flow.dao.EvaluationStartStaffMapper;
|
||||||
import com.lz.modules.flow.entity.EvaluationGroup;
|
import com.lz.modules.flow.entity.EvaluationGroup;
|
||||||
import com.lz.modules.flow.entity.FlowStart;
|
import com.lz.modules.flow.entity.FlowStart;
|
||||||
|
import com.lz.modules.flow.entity.StaffRole;
|
||||||
|
import com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
||||||
import com.lz.modules.flow.req.EvaluationGroupReq;
|
import com.lz.modules.flow.req.EvaluationGroupReq;
|
||||||
import com.lz.modules.flow.service.EvaluationGroupService;
|
import com.lz.modules.flow.service.EvaluationGroupService;
|
||||||
import com.lz.modules.flow.service.FlowStartService;
|
import com.lz.modules.flow.service.FlowStartService;
|
||||||
|
import com.lz.modules.flow.service.StaffRoleEvaluationGroupService;
|
||||||
|
import com.lz.modules.flow.service.StaffRoleService;
|
||||||
import com.lz.modules.performance.dto.CheckStaffDto;
|
import com.lz.modules.performance.dto.CheckStaffDto;
|
||||||
import com.lz.modules.performance.req.CheckStaffReq;
|
import com.lz.modules.performance.req.CheckStaffReq;
|
||||||
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@ -35,7 +40,9 @@ import java.util.*;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
import java.util.function.ToLongFunction;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static java.util.stream.Collectors.toList;
|
import static java.util.stream.Collectors.toList;
|
||||||
|
|
||||||
@ -71,6 +78,12 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
@Autowired
|
@Autowired
|
||||||
private EvaluationStartStaffMapper evaluationStartStaffMapper;
|
private EvaluationStartStaffMapper evaluationStartStaffMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StaffRoleService staffRoleService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StaffRoleEvaluationGroupService staffRoleEvaluationGroupService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -108,9 +121,9 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils selectEvaluationGroupByReq(EvaluationGroupReq req){
|
public PageUtils selectEvaluationGroupByReq(EvaluationGroupReq req, SysUserEntity sysUserEntity){
|
||||||
List<Long> gIds = null;
|
List<Long> gIds = null;
|
||||||
if(req.getStartId() != null){
|
if(req.getStartId() != null){//发起评分时调用,传发起的id
|
||||||
FlowStart flowStart = flowStartService.selectFlowStartById(req.getStartId());
|
FlowStart flowStart = flowStartService.selectFlowStartById(req.getStartId());
|
||||||
if(flowStart == null){
|
if(flowStart == null){
|
||||||
return null;
|
return null;
|
||||||
@ -123,6 +136,30 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
}else{
|
||||||
|
//考评组管理
|
||||||
|
List<StaffRole> staffRoles = staffRoleService.selectAllByStaffId(sysUserEntity.getUserId());
|
||||||
|
if(staffRoles.size() == 0){
|
||||||
|
log.info("非绩效管理员登录查询");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<StaffRoleEvaluationGroup> staffRoleEvaluationGroups =
|
||||||
|
staffRoleEvaluationGroupService.selectStaffRoleEvaluationsGroupByStaffRoles(staffRoles);
|
||||||
|
if(staffRoleEvaluationGroups.size() == 0){
|
||||||
|
log.info("查询的管理组为空");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
gIds = new ArrayList<>();
|
||||||
|
for (StaffRoleEvaluationGroup staffRoleEvaluationGroup:staffRoleEvaluationGroups
|
||||||
|
) {
|
||||||
|
if(staffRoleEvaluationGroup.getEvaluationGroupId().longValue() == 0l){//管理所有组
|
||||||
|
gIds = null;
|
||||||
|
log.info("管理所有组");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
gIds.add(staffRoleEvaluationGroup.getEvaluationGroupId());//管理特定组
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
List<Long> finalGIds = gIds;
|
List<Long> finalGIds = gIds;
|
||||||
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize())
|
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize())
|
||||||
@ -308,8 +345,8 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
//是否存在其他组成员
|
//是否存在其他组成员
|
||||||
staffIdsByGroup.retainAll(allStaffIdsByGroup);
|
staffIdsByGroup.retainAll(allStaffIdsByGroup);
|
||||||
if(CollectionUtils.isNotEmpty(staffIdsByGroup)){
|
if(CollectionUtils.isNotEmpty(staffIdsByGroup)){
|
||||||
List<Long> collect = staffIdsByGroup.stream().map(s -> Long.valueOf(s)).distinct().collect(toList());
|
List<Long> longCollect = staffIdsByGroup.stream().distinct().map(s -> Long.valueOf(s)).collect(toList());
|
||||||
List<StaffSimpleDto> staffSimpleDtos = staffService.selectStaffSimpleInfoByIds(collect);
|
List<StaffSimpleDto> staffSimpleDtos = staffService.selectStaffSimpleInfoByIds(longCollect);
|
||||||
String notInGroupNames = StringUtil.EMPTY;
|
String notInGroupNames = StringUtil.EMPTY;
|
||||||
for(StaffSimpleDto dto:staffSimpleDtos){
|
for(StaffSimpleDto dto:staffSimpleDtos){
|
||||||
notInGroupNames = notInGroupNames + dto.getName() + " ";
|
notInGroupNames = notInGroupNames + dto.getName() + " ";
|
||||||
@ -318,14 +355,17 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
if(evaluationGroup.getConfirm()==0){
|
if(evaluationGroup.getConfirm()==0){
|
||||||
return R.error(504,notInGroupNames + "已在其他类型为月度的考评组中,是否改为到此考评组中进行考核");
|
return R.error(504,notInGroupNames + "已在其他类型为月度的考评组中,是否改为到此考评组中进行考核");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> stringCollect = staffIdsByGroup.stream().distinct().collect(toList());
|
||||||
evaluationGroups.forEach(evaluationGroup12 -> {
|
evaluationGroups.forEach(evaluationGroup12 -> {
|
||||||
List<String> staffs = map.get(evaluationGroup12.getId());
|
List<String> staffs = map.get(evaluationGroup12.getId());
|
||||||
staffs.retainAll(collect);
|
//如果组里面有他,删除掉
|
||||||
|
staffs.retainAll(stringCollect);
|
||||||
if(CollectionUtils.isNotEmpty(staffs)){
|
if(CollectionUtils.isNotEmpty(staffs)){
|
||||||
//添加到保存时添加
|
//添加到保存时添加
|
||||||
//删除存在得
|
//删除存在得
|
||||||
log.info("需删除其他组信息,staffs:" + JSON.toJSONString(staffs));
|
log.info("需删除其他组信息,staffs:" + JSON.toJSONString(staffs));
|
||||||
removeStaffsToAssessGroup(collect,evaluationGroup12);
|
removeStaffsToAssessGroup(stringCollect,evaluationGroup12);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -336,7 +376,7 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int removeStaffsToAssessGroup(List<Long> ids,EvaluationGroup group) {
|
private int removeStaffsToAssessGroup(List<String> ids,EvaluationGroup group) {
|
||||||
String staffIds = group.getStaffIds();
|
String staffIds = group.getStaffIds();
|
||||||
if(StringUtil.isNotBlank(staffIds)){
|
if(StringUtil.isNotBlank(staffIds)){
|
||||||
String[] split = staffIds.split(",");
|
String[] split = staffIds.split(",");
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import com.lz.modules.sys.entity.app.ResultDetail;
|
|||||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||||
import com.lz.modules.sys.service.app.ResultDetailService;
|
import com.lz.modules.sys.service.app.ResultDetailService;
|
||||||
import com.lz.modules.sys.service.app.ResultRecordService;
|
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.map.HashedMap;
|
import org.apache.commons.collections.map.HashedMap;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -41,6 +42,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart> implements FlowStartService {
|
public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart> implements FlowStartService {
|
||||||
|
|
||||||
|
|
||||||
@ -130,8 +132,10 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
//发起指定用户的绩效,中途添加的时候
|
//发起指定用户的绩效,中途添加的时候
|
||||||
public R startStaffs(StartGroups startGroupStaffIds){
|
public R startStaffs(StartGroups startGroupStaffIds){
|
||||||
|
log.info("发起指定用户的绩效,中途添加的时候{}", startGroupStaffIds);
|
||||||
FlowStart flowStart = flowStartMapper.selectFlowStartById(startGroupStaffIds.getStartId());
|
FlowStart flowStart = flowStartMapper.selectFlowStartById(startGroupStaffIds.getStartId());
|
||||||
if(flowStart == null){
|
if(flowStart == null){
|
||||||
|
log.info("发起任务不存在");
|
||||||
return R.error("发起任务不存在");
|
return R.error("发起任务不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,6 +146,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
) {
|
) {
|
||||||
List<StaffSimpleInfo> staffSimpleInfos = staffService.selectStaffSimpleInfos(groupStaffs.getStaffIds());
|
List<StaffSimpleInfo> staffSimpleInfos = staffService.selectStaffSimpleInfos(groupStaffs.getStaffIds());
|
||||||
if(staffSimpleInfos.size() == 0){
|
if(staffSimpleInfos.size() == 0){
|
||||||
|
log.info("无有效考核人员");
|
||||||
R.error(groupStaffs.getEvaluationGroup().getName() + "——无有效考核人员");
|
R.error(groupStaffs.getEvaluationGroup().getName() + "——无有效考核人员");
|
||||||
}
|
}
|
||||||
switch (start(groupStaffs.getEvaluationGroup(), flowStart, staffManages, staffSimpleInfos, mustRole, selfMustRole)){
|
switch (start(groupStaffs.getEvaluationGroup(), flowStart, staffManages, staffSimpleInfos, mustRole, selfMustRole)){
|
||||||
@ -158,6 +163,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
return R.error(groupStaffs.getEvaluationGroup().getName() + "——初始化考核流程失败");
|
return R.error(groupStaffs.getEvaluationGroup().getName() + "——初始化考核流程失败");
|
||||||
}
|
}
|
||||||
dingtalkBusiness.sendWorkMSGWithAsyn(staffSimpleInfos, WorkMsgTypeEnum.START_WORK.getType());
|
dingtalkBusiness.sendWorkMSGWithAsyn(staffSimpleInfos, WorkMsgTypeEnum.START_WORK.getType());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok("发起成功").put("data", flowStart);
|
return R.ok("发起成功").put("data", flowStart);
|
||||||
@ -165,8 +171,10 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R saveStart(FlowStart flowStart){
|
public R saveStart(FlowStart flowStart){
|
||||||
|
log.info("发起考核{}", flowStart);
|
||||||
//下面生成或者合并发起绩效
|
//下面生成或者合并发起绩效
|
||||||
if(flowStart.getStartTime() == null){
|
if(flowStart.getStartTime() == null){
|
||||||
|
log.info("未设置有效考核月份");
|
||||||
return R.error("未设置有效考核月份");
|
return R.error("未设置有效考核月份");
|
||||||
}
|
}
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月");
|
||||||
@ -175,6 +183,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
if(flowStart.getCycleType().intValue() != 0){
|
if(flowStart.getCycleType().intValue() != 0){
|
||||||
//月份
|
//月份
|
||||||
if(flowStart.getEndTime() == null){
|
if(flowStart.getEndTime() == null){
|
||||||
|
log.info("未设置有效考核结束月份");
|
||||||
return R.error("未设置有效考核结束月份");
|
return R.error("未设置有效考核结束月份");
|
||||||
}
|
}
|
||||||
String endDate = sdf.format(flowStart.getStartTime());
|
String endDate = sdf.format(flowStart.getStartTime());
|
||||||
@ -244,7 +253,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
List<StaffSimpleInfo> staffIds = evaluationGroupService.selectAllStaffSimpleInfoByGroupId(evaluationGroup);
|
List<StaffSimpleInfo> staffIds = evaluationGroupService.selectAllStaffSimpleInfoByGroupId(evaluationGroup);
|
||||||
if(staffIds.size() == 0){
|
if(staffIds.size() == 0){
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||||
|
log.info("无有效考核人员");
|
||||||
return R.error(evaluationGroup.getName() + "——无有效考核人员");
|
return R.error(evaluationGroup.getName() + "——无有效考核人员");
|
||||||
}
|
}
|
||||||
if(flowStart.getIsDelete() != null){//已经发起过的
|
if(flowStart.getIsDelete() != null){//已经发起过的
|
||||||
@ -260,6 +269,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
staffIds = map.values().stream().collect(Collectors.toList());
|
staffIds = map.values().stream().collect(Collectors.toList());
|
||||||
|
|
||||||
if(staffIds.size() == 0){
|
if(staffIds.size() == 0){
|
||||||
|
log.info("本次发起参与人员为0");
|
||||||
return R.error(evaluationGroup.getName() + "——本次发起参与人员为0");
|
return R.error(evaluationGroup.getName() + "——本次发起参与人员为0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -294,12 +304,14 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
List<ResultModelDto> resultModelDtos = resultModelService.selectResultDtoByGroupId(evaluationGroup.getId());
|
List<ResultModelDto> resultModelDtos = resultModelService.selectResultDtoByGroupId(evaluationGroup.getId());
|
||||||
if(resultModelDtos.size() == 0){
|
if(resultModelDtos.size() == 0){
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||||
|
log.info("没有设置考核模板");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<FlowChart> flowCharts = flowChartService.selectFlowChartsByGroupId(evaluationGroup.getId());
|
List<FlowChart> flowCharts = flowChartService.selectFlowChartsByGroupId(evaluationGroup.getId());
|
||||||
if(flowCharts.size() == 0){
|
if(flowCharts.size() == 0){
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||||
|
log.info("无有效绩效流程节点");
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
List<FlowChartDetailRecord> flowChartDetailRecords = new ArrayList<>();
|
List<FlowChartDetailRecord> flowChartDetailRecords = new ArrayList<>();
|
||||||
@ -312,6 +324,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
if(flowChartDetailRecords.size() == 0){
|
if(flowChartDetailRecords.size() == 0){
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||||
|
log.info("没有设置考核流程");
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
Map<Long, String> chartNameMaps =
|
Map<Long, String> chartNameMaps =
|
||||||
@ -322,6 +335,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
if(staffManagers == null || staffManagers.size() == 0){
|
if(staffManagers == null || staffManagers.size() == 0){
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||||
|
log.info("没有设置绩效管理人员");
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -646,6 +660,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
//如果有下面通知所有管理人员
|
//如果有下面通知所有管理人员
|
||||||
}else{
|
}else{
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||||
|
log.info("初始化考核流程失败");
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.lz.modules.flow.service.impl;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.lz.modules.app.dto.EvaluationGroupInfo;
|
import com.lz.modules.app.dto.EvaluationGroupInfo;
|
||||||
import com.lz.modules.flow.dao.StaffRoleEvaluationGroupMapper;
|
import com.lz.modules.flow.dao.StaffRoleEvaluationGroupMapper;
|
||||||
|
import com.lz.modules.flow.entity.StaffRole;
|
||||||
import com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
import com.lz.modules.flow.entity.StaffRoleEvaluationGroup;
|
||||||
import com.lz.modules.flow.service.StaffRoleEvaluationGroupService;
|
import com.lz.modules.flow.service.StaffRoleEvaluationGroupService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -81,4 +82,9 @@ public class StaffRoleEvaluationGroupServiceImpl extends ServiceImpl<StaffRoleEv
|
|||||||
public List<Long> selectEvaluationGroupIdsByRoleId(Long roleId) {
|
public List<Long> selectEvaluationGroupIdsByRoleId(Long roleId) {
|
||||||
return staffRoleEvaluationGroupMapper.selectEvaluationGroupIdsByRoleId(roleId);
|
return staffRoleEvaluationGroupMapper.selectEvaluationGroupIdsByRoleId(roleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffRoleEvaluationGroup> selectStaffRoleEvaluationsGroupByStaffRoles(List<StaffRole> staffRoles){
|
||||||
|
return staffRoleEvaluationGroupMapper.selectStaffRoleEvaluationsGroupByStaffRoles(staffRoles);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -550,4 +550,19 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
|||||||
}
|
}
|
||||||
parent.setChilds(childs);
|
parent.setChilds(childs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffRole> selectMastRoles(){
|
||||||
|
return staffRoleMapper.selectMastRoles();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffRole> selectAllGroupManageRoles(){
|
||||||
|
return staffRoleMapper.selectAllGroupManageRoles();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffRole> selectByEvaluationGroupId(Long groupId){
|
||||||
|
return staffRoleMapper.selectByEvaluationGroupId(groupId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -193,6 +193,31 @@ public class DingtalkBusiness {
|
|||||||
return sendWorkMSGByEntity(appid, fromStaffEntity, toStaffEntity, workMsgTypeEnum, "https://www.baidu.com");
|
return sendWorkMSGByEntity(appid, fromStaffEntity, toStaffEntity, workMsgTypeEnum, "https://www.baidu.com");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String sendWorkMSGWithAsyn(StaffSimpleInfo fromStaff, List<StaffSimpleInfo> toStaffids, int type) {
|
||||||
|
|
||||||
|
if(toStaffids.get(0).getEmployeeId() == null || toStaffids.get(0).getEmployeeId().length() == 0){
|
||||||
|
//查询第三方id
|
||||||
|
List<Long> ids = toStaffids.stream().map(new Function<StaffSimpleInfo, Long>() {
|
||||||
|
@Override
|
||||||
|
public Long apply(StaffSimpleInfo staffSimpleInfo) {
|
||||||
|
return staffSimpleInfo.getId();
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
List<StaffSimpleInfo> staffSimpleInfos = staffService.selectStaffSimpleInfos(ids);
|
||||||
|
Map<Long, StaffSimpleInfo> map = toStaffids.stream().collect(Collectors.toMap(StaffSimpleInfo::getId, e->e));
|
||||||
|
for (StaffSimpleInfo staff:staffSimpleInfos
|
||||||
|
) {
|
||||||
|
StaffSimpleInfo staff1 = map.get(staff.getId());
|
||||||
|
staff1.setEmployeeId(staff1.getEmployeeId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
WorkMsgTypeEnum workMsgTypeEnum = WorkMsgTypeEnum.findRoleTypeByCode(type);
|
||||||
|
|
||||||
|
ThreadSendMessage threadSendMessage = new ThreadSendMessage(fromStaff, toStaffids, workMsgTypeEnum, appid);
|
||||||
|
Thread thread = new Thread(threadSendMessage);
|
||||||
|
thread.start();
|
||||||
|
return "OK";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public String sendWorkMSGWithAsyn(List<StaffSimpleInfo> toStaffids, int type) {
|
public String sendWorkMSGWithAsyn(List<StaffSimpleInfo> toStaffids, int type) {
|
||||||
@ -215,7 +240,7 @@ public class DingtalkBusiness {
|
|||||||
}
|
}
|
||||||
WorkMsgTypeEnum workMsgTypeEnum = WorkMsgTypeEnum.findRoleTypeByCode(type);
|
WorkMsgTypeEnum workMsgTypeEnum = WorkMsgTypeEnum.findRoleTypeByCode(type);
|
||||||
|
|
||||||
ThreadSendMessage threadSendMessage = new ThreadSendMessage(toStaffids, workMsgTypeEnum, appid);
|
ThreadSendMessage threadSendMessage = new ThreadSendMessage(null, toStaffids, workMsgTypeEnum, appid);
|
||||||
Thread thread = new Thread(threadSendMessage);
|
Thread thread = new Thread(threadSendMessage);
|
||||||
thread.start();
|
thread.start();
|
||||||
return "OK";
|
return "OK";
|
||||||
@ -287,12 +312,14 @@ public class DingtalkBusiness {
|
|||||||
|
|
||||||
public class ThreadSendMessage implements Runnable{
|
public class ThreadSendMessage implements Runnable{
|
||||||
List<StaffSimpleInfo> toStaffids;
|
List<StaffSimpleInfo> toStaffids;
|
||||||
|
StaffSimpleInfo fromStaff = null;
|
||||||
WorkMsgTypeEnum workMsgTypeEnum;
|
WorkMsgTypeEnum workMsgTypeEnum;
|
||||||
String appid;
|
String appid;
|
||||||
String hostUrl = "https://lzmanagement.ldxinyong.com/digitization/dingTalkLogin";
|
String hostUrl = "https://lzmanagement.ldxinyong.com/digitization/dingTalkLogin";
|
||||||
public ThreadSendMessage(List<StaffSimpleInfo> toStaffids, WorkMsgTypeEnum typeEnum, String appid){
|
public ThreadSendMessage(StaffSimpleInfo fromStaff, List<StaffSimpleInfo> toStaffids, WorkMsgTypeEnum typeEnum, String appid){
|
||||||
this.toStaffids = toStaffids;
|
this.toStaffids = toStaffids;
|
||||||
workMsgTypeEnum = typeEnum;
|
workMsgTypeEnum = typeEnum;
|
||||||
|
this.fromStaff = fromStaff;
|
||||||
this.appid = appid;
|
this.appid = appid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,9 +342,16 @@ public class DingtalkBusiness {
|
|||||||
url = URLEncoder.encode(url);
|
url = URLEncoder.encode(url);
|
||||||
|
|
||||||
|
|
||||||
url = "dingtalk://dingtalkclient/page/link?pc_slide=true&url=" + url;
|
url = "dingtalk://dingtalkclient/action/openapp?corpid=" + thirdAppConfig.getCorpId() +
|
||||||
|
"&container_type=work_platform&app_id=0_" +
|
||||||
|
appid + "&redirect_type=jump&redirect_url=" + url;
|
||||||
|
String content = null;
|
||||||
|
if(fromStaff == null){
|
||||||
|
content = workMsgTypeEnum.getContent().replace("@", info.getName());
|
||||||
|
}else{
|
||||||
|
content = workMsgTypeEnum.getContent().replace("@", fromStaff.getName());
|
||||||
|
}
|
||||||
|
|
||||||
String content = workMsgTypeEnum.getContent().replace("@", info.getName());
|
|
||||||
StaffEntity entity = new StaffEntity();
|
StaffEntity entity = new StaffEntity();
|
||||||
entity.setId(info.getId());
|
entity.setId(info.getId());
|
||||||
entity.setEmployeeId(info.getEmployeeId());
|
entity.setEmployeeId(info.getEmployeeId());
|
||||||
|
|||||||
@ -117,13 +117,11 @@ public class AssessManagerController extends AbstractController{
|
|||||||
return R.error("变动人员不能为空");
|
return R.error("变动人员不能为空");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
assessManagerService.assessChange(req);
|
return assessManagerService.assessChange(req);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("考核管理变更异常" ,e);
|
log.error("考核管理变更异常" ,e);
|
||||||
return R.error(e.getMessage());
|
return R.error(e.getMessage());
|
||||||
}
|
}
|
||||||
return R.ok();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,14 +8,13 @@ import com.lz.common.utils.StringUtil;
|
|||||||
import com.lz.modules.app.dto.DepartmentsSimpleDto;
|
import com.lz.modules.app.dto.DepartmentsSimpleDto;
|
||||||
import com.lz.modules.app.dto.StaffSimpleDto;
|
import com.lz.modules.app.dto.StaffSimpleDto;
|
||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
import com.lz.modules.flow.entity.EvaluationGroup;
|
import com.lz.modules.flow.entity.*;
|
||||||
import com.lz.modules.flow.entity.FlowManager;
|
|
||||||
import com.lz.modules.flow.entity.ResultModel;
|
|
||||||
import com.lz.modules.flow.entity.StaffRole;
|
|
||||||
import com.lz.modules.flow.model.EvaluationGroupDto;
|
import com.lz.modules.flow.model.EvaluationGroupDto;
|
||||||
import com.lz.modules.flow.req.EvaluationGroupReq;
|
import com.lz.modules.flow.req.EvaluationGroupReq;
|
||||||
import com.lz.modules.flow.service.*;
|
import com.lz.modules.flow.service.*;
|
||||||
import com.lz.modules.performance.req.CheckStaffReq;
|
import com.lz.modules.performance.req.CheckStaffReq;
|
||||||
|
import com.lz.modules.sys.controller.AbstractController;
|
||||||
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -28,7 +27,7 @@ import java.util.stream.Collectors;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/evaluationGroup")
|
@RequestMapping("/evaluationGroup")
|
||||||
@Api(tags="考评组")
|
@Api(tags="考评组")
|
||||||
public class EvaluationGroupController {
|
public class EvaluationGroupController extends AbstractController {
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -47,6 +46,8 @@ public class EvaluationGroupController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StaffRoleService staffRoleService;
|
private StaffRoleService staffRoleService;
|
||||||
|
@Autowired
|
||||||
|
private StaffRoleEvaluationGroupService staffRoleEvaluationGroupService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -115,7 +116,8 @@ public class EvaluationGroupController {
|
|||||||
@ApiOperation("获取考评组列表")
|
@ApiOperation("获取考评组列表")
|
||||||
@ApiResponses({@ApiResponse(code=200,message = "成功", response=EvaluationGroup.class)})
|
@ApiResponses({@ApiResponse(code=200,message = "成功", response=EvaluationGroup.class)})
|
||||||
public R getGroups(@RequestBody @ApiParam EvaluationGroupReq req) {
|
public R getGroups(@RequestBody @ApiParam EvaluationGroupReq req) {
|
||||||
PageUtils pageUtils = evaluationGroupService.selectEvaluationGroupByReq(req);
|
SysUserEntity sysUserEntity = getUser();
|
||||||
|
PageUtils pageUtils = evaluationGroupService.selectEvaluationGroupByReq(req, sysUserEntity);
|
||||||
return R.ok().put("data",pageUtils);
|
return R.ok().put("data",pageUtils);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,6 +135,7 @@ public class EvaluationGroupController {
|
|||||||
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = EvaluationGroup.class)})
|
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = EvaluationGroup.class)})
|
||||||
public R save(@RequestBody @ApiParam EvaluationGroup evaluationGroup) {
|
public R save(@RequestBody @ApiParam EvaluationGroup evaluationGroup) {
|
||||||
EvaluationGroup evaluationGroup1 = evaluationGroupService.selectEvaluationGroupByName(evaluationGroup.getName());
|
EvaluationGroup evaluationGroup1 = evaluationGroupService.selectEvaluationGroupByName(evaluationGroup.getName());
|
||||||
|
List<StaffRole> staffRoles = null;
|
||||||
if(evaluationGroup.getId() != null && evaluationGroup.getId().intValue() > 0){
|
if(evaluationGroup.getId() != null && evaluationGroup.getId().intValue() > 0){
|
||||||
if(evaluationGroup1 == null || evaluationGroup1.getId().equals(evaluationGroup.getId())){
|
if(evaluationGroup1 == null || evaluationGroup1.getId().equals(evaluationGroup.getId())){
|
||||||
if(evaluationGroup.getDepIds() == null){
|
if(evaluationGroup.getDepIds() == null){
|
||||||
@ -148,6 +151,8 @@ public class EvaluationGroupController {
|
|||||||
evaluationGroup.setOutIds("");
|
evaluationGroup.setOutIds("");
|
||||||
}
|
}
|
||||||
evaluationGroupService.updateEvaluationGroupById(evaluationGroup);
|
evaluationGroupService.updateEvaluationGroupById(evaluationGroup);
|
||||||
|
|
||||||
|
staffRoles = staffRoleService.selectByEvaluationGroupId(evaluationGroup.getId());//查询已经管理改组的管理员
|
||||||
}else {
|
}else {
|
||||||
return R.error("已经存在相同名称考核组");
|
return R.error("已经存在相同名称考核组");
|
||||||
}
|
}
|
||||||
@ -160,37 +165,49 @@ public class EvaluationGroupController {
|
|||||||
}
|
}
|
||||||
//更新组管理员信息
|
//更新组管理员信息
|
||||||
if(evaluationGroup.getManagerIds() != null && evaluationGroup.getManagerIds().length() > 0){
|
if(evaluationGroup.getManagerIds() != null && evaluationGroup.getManagerIds().length() > 0){
|
||||||
List<Long> mIds = Arrays.stream(evaluationGroup.getManagerIds().split(",")).map(new Function<String, Long>() {
|
Map<Long, Long> mapIds = Arrays.stream(evaluationGroup.getManagerIds().split(",")).map(new Function<String, Long>() {
|
||||||
@Override
|
@Override
|
||||||
public Long apply(String s) {
|
public Long apply(String s) {
|
||||||
return Long.parseLong(s);
|
return Long.parseLong(s);
|
||||||
}
|
}
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toMap(Long::longValue, Function.identity(), (e, replace) -> e));
|
||||||
|
|
||||||
List<StaffRole> staffRoles = staffRoleService.selectByGroupId(evaluationGroup.getId());
|
for (StaffRole staffRole:staffRoles
|
||||||
if(staffRoles.size() > 0){
|
) {//去掉已经在管理本组的管理员
|
||||||
Map<Long, StaffRole> staffRoleMap =
|
if(mapIds.containsKey(staffRole.getStaffId())){
|
||||||
staffRoles.stream().collect(Collectors.toMap(StaffRole::getStaffId, Function.identity(), (e, repace) -> e));
|
mapIds.remove(staffRole.getStaffId());
|
||||||
for(int i = 0; i < mIds.size();){
|
}else{//删除管理的组信息
|
||||||
Long l = mIds.get(i);
|
staffRoleEvaluationGroupService.deleteStaffRoleEvaluationGroupByRoleId(staffRole.getId());
|
||||||
if(staffRoleMap.containsKey(l)){
|
}
|
||||||
mIds.remove(l);
|
}
|
||||||
continue;
|
|
||||||
|
//去掉管理全考评组
|
||||||
|
staffRoles = staffRoleService.selectAllGroupManageRoles();
|
||||||
|
for (StaffRole staffRole:staffRoles
|
||||||
|
) {
|
||||||
|
if(mapIds.containsKey(staffRole.getStaffId())){
|
||||||
|
mapIds.remove(staffRole.getStaffId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(mapIds.size() > 0){
|
||||||
|
List<Long> ids = mapIds.values().stream().collect(Collectors.toList());
|
||||||
|
staffRoles = staffRoleService.selectStaffRolesByStaffId(ids);
|
||||||
|
|
||||||
|
if(staffRoles.size() > 0){
|
||||||
|
List<StaffRoleEvaluationGroup> staffRoleEvaluationGroups = new ArrayList<>();
|
||||||
|
for (StaffRole staffRole:staffRoles
|
||||||
|
) {
|
||||||
|
StaffRoleEvaluationGroup staffRoleEvaluationGroup = new StaffRoleEvaluationGroup();
|
||||||
|
staffRoleEvaluationGroup.setRoleId(staffRole.getId());
|
||||||
|
staffRoleEvaluationGroup.setEvaluationGroupId(evaluationGroup.getId());
|
||||||
|
staffRoleEvaluationGroups.add(staffRoleEvaluationGroup);
|
||||||
}
|
}
|
||||||
i++;
|
staffRoleEvaluationGroupService.saveBatch(staffRoleEvaluationGroups);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(mIds.size() > 0){
|
|
||||||
staffRoles = new ArrayList<>();
|
|
||||||
for (Long id:mIds
|
|
||||||
) {
|
|
||||||
StaffRole staffRole = new StaffRole();
|
|
||||||
staffRole.setStaffId(id);
|
|
||||||
staffRole.setEvaluationGroupId(evaluationGroup.getId());
|
|
||||||
staffRoles.add(staffRole);
|
|
||||||
}
|
|
||||||
staffRoleService.saveBatch(staffRoles);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return R.ok().put("data", evaluationGroup);
|
return R.ok().put("data", evaluationGroup);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,11 +116,11 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
res.setCycleTime(name.substring(0,name.lastIndexOf("绩效考核")));
|
res.setCycleTime(name.substring(0,name.lastIndexOf("绩效考核")));
|
||||||
}
|
}
|
||||||
//过滤非自己管理的人员
|
//过滤非自己管理的人员
|
||||||
ResultRecord resultRecord = resultRecordMapper.selectOneByStartId(flowStart.getId());
|
|
||||||
//没有管理的部门
|
//没有管理的部门
|
||||||
if(mandepartmentIds!=null && mandepartmentIds.size()==0){
|
if(mandepartmentIds!=null && mandepartmentIds.size()==0){
|
||||||
res.setJoinNum("0人");
|
res.setJoinNum("0人");
|
||||||
}else {
|
}else {
|
||||||
|
ResultRecord resultRecord = resultRecordMapper.selectOneByStartId(flowStart.getId(),mandepartmentIds);
|
||||||
int i = resultRecordMapper.countStartAndGroupNum(flowStart.getId(),mandepartmentIds);
|
int i = resultRecordMapper.countStartAndGroupNum(flowStart.getId(),mandepartmentIds);
|
||||||
res.setJoinNum(resultRecord == null? StringUtil.EMPTY : resultRecord.getStaffName() + i + "等人");
|
res.setJoinNum(resultRecord == null? StringUtil.EMPTY : resultRecord.getStaffName() + i + "等人");
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
String[] split = flowStart.getGroupIds().split(",");
|
String[] split = flowStart.getGroupIds().split(",");
|
||||||
List<String> strings = Arrays.asList(split);
|
List<String> strings = Arrays.asList(split);
|
||||||
List<Long> ids = strings.stream().map(s -> Long.valueOf(s)).collect(toList());
|
List<Long> ids = strings.stream().map(s -> Long.valueOf(s)).collect(toList());
|
||||||
List<EvaluationGroup> otheEvaluationGroups = evaluationGroupService.selectEvaluationGroupByNotIds(ids);
|
List<EvaluationGroup> evaluationGroups = evaluationGroupService.selectEvaluationGroupByIds(ids);
|
||||||
|
|
||||||
//获取变更人员
|
//获取变更人员
|
||||||
String[] changeStaffIds = req.getStaffIds().split(",");
|
String[] changeStaffIds = req.getStaffIds().split(",");
|
||||||
@ -200,7 +200,7 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
|
|
||||||
//根据组id成员分组
|
//根据组id成员分组
|
||||||
Map<Long,List<String>> map = Maps.newHashMap();
|
Map<Long,List<String>> map = Maps.newHashMap();
|
||||||
for(EvaluationGroup group:otheEvaluationGroups){
|
for(EvaluationGroup group:evaluationGroups){
|
||||||
List<String> staff = evaluationGroupService.selectAllStaffIdsByGroupId(group.getId());
|
List<String> staff = evaluationGroupService.selectAllStaffIdsByGroupId(group.getId());
|
||||||
all.addAll(staff);
|
all.addAll(staff);
|
||||||
map.put(group.getId(),staff);
|
map.put(group.getId(),staff);
|
||||||
@ -227,31 +227,30 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
//排除已发起过的
|
//排除已发起过的
|
||||||
List<Long> longs = evaluationStartStaffMapper.selectStaffIdsByStart(req.getStartId());
|
List<Long> longs = evaluationStartStaffMapper.selectStaffIdsByStart(req.getStartId());
|
||||||
|
|
||||||
for(EvaluationGroup group:otheEvaluationGroups){
|
for(EvaluationGroup group:evaluationGroups){
|
||||||
GroupStaffs groupStaffs = new GroupStaffs();
|
GroupStaffs groupStaffs = new GroupStaffs();
|
||||||
groupStaffs.setEvaluationGroup(group);
|
groupStaffs.setEvaluationGroup(group);
|
||||||
|
|
||||||
List<String> staffs = map.get(group.getId());
|
List<String> staffs = map.get(group.getId());
|
||||||
staffs.retainAll(change);
|
staffs.retainAll(change);
|
||||||
List<Long> collect = staffs.stream().map(s -> Long.valueOf(s)).collect(toList());
|
List<Long> collect = staffs.stream().distinct().map(s -> Long.valueOf(s)).collect(toList());
|
||||||
collect.removeAll(longs);
|
collect.removeAll(longs);
|
||||||
if(CollectionUtils.isNotEmpty(collect)){
|
if(CollectionUtils.isNotEmpty(collect)){
|
||||||
groupStaffs.setStaffIds(collect);
|
groupStaffs.setStaffIds(collect);
|
||||||
groupS.add(groupStaffs);
|
groupS.add(groupStaffs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(CollectionUtils.isEmpty(groupS)){
|
||||||
|
log.info("暂无人员需要添加");
|
||||||
|
return R.ok("暂无人员需要添加");
|
||||||
|
}
|
||||||
|
|
||||||
StartGroups startGroups = new StartGroups();
|
StartGroups startGroups = new StartGroups();
|
||||||
startGroups.setStartId(req.getStartId());
|
startGroups.setStartId(req.getStartId());
|
||||||
startGroups.setGroups(groupS);
|
startGroups.setGroups(groupS);
|
||||||
try {
|
R r = flowStartService.startStaffs(startGroups);
|
||||||
flowStartService.startStaffs(startGroups);
|
log.info("添加人员初始化返回:" + JSON.toJSONString(r));
|
||||||
} catch (Exception e) {
|
return r;
|
||||||
log.error("调用初始化失败");
|
|
||||||
return R.error("初始化失败");
|
|
||||||
}
|
|
||||||
return R.ok();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if(req.getChangeType() == 1){
|
if(req.getChangeType() == 1){
|
||||||
|
|||||||
@ -5,7 +5,9 @@ import com.google.common.collect.Lists;
|
|||||||
import com.lz.common.utils.DateUtils;
|
import com.lz.common.utils.DateUtils;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
|
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
import com.lz.modules.flow.entity.FlowStart;
|
import com.lz.modules.flow.entity.FlowStart;
|
||||||
import com.lz.modules.flow.entity.StaffRole;
|
import com.lz.modules.flow.entity.StaffRole;
|
||||||
@ -52,6 +54,8 @@ public class AssessServiceImpl implements AssessService {
|
|||||||
private StaffRoleService staffRoleService;
|
private StaffRoleService staffRoleService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private FlowStartService flowStartService;
|
private FlowStartService flowStartService;
|
||||||
|
@Autowired
|
||||||
|
private DepartmentsStaffRelateService departmentsStaffRelateService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils userTaskList(AssessTaskReq req,Long userId) {
|
public PageUtils userTaskList(AssessTaskReq req,Long userId) {
|
||||||
@ -101,21 +105,29 @@ public class AssessServiceImpl implements AssessService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
List<StaffRoleDepartment> staffRoleDepartments = staffRoleDepartmentService.selectStaffRoleDepartmentByStaffRoleId(staffRole.getId());
|
if (staffRole.getDepartmentId() == 1) {
|
||||||
if (CollectionUtils.isNotEmpty(staffRoleDepartments)) {
|
DepartmentsStaffRelateEntity entity = departmentsStaffRelateService.selectByStaffId(staffId);
|
||||||
List<String> allDepart = new ArrayList<>();
|
List<String> strings = staffService.selectAllDeparmentIdsByDepartmentParentId(entity.getDepartmentId());
|
||||||
staffRoleDepartments.forEach(staffRoleDepartment -> {
|
log.info("获取到权限对应的部门 " + JSON.toJSONString(strings));
|
||||||
List<String> strings = staffService.selectAllDeparmentIdsByDepartmentParentId(staffRoleDepartment.getDepartmentId());
|
return strings;
|
||||||
allDepart.addAll(strings);
|
|
||||||
});
|
|
||||||
|
|
||||||
List<String> collect = allDepart.stream().distinct().collect(Collectors.toList());
|
|
||||||
log.info("获取到权限对应的部门 " + JSON.toJSONString(collect));
|
|
||||||
return collect;
|
|
||||||
}
|
}
|
||||||
log.info("未获取到用户权限对应的部门 roleID: " + staffRole.getId());
|
else if(staffRole.getDepartmentId() == 2){
|
||||||
return Collections.EMPTY_LIST;
|
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<String> collect = allDepart.stream().distinct().collect(Collectors.toList());
|
||||||
|
log.info("获取到权限对应的部门 " + JSON.toJSONString(collect));
|
||||||
|
return collect;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.info("未获取到用户权限对应的部门 roleID: " + staffRole.getId());
|
||||||
|
return Collections.EMPTY_LIST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,7 +85,7 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
|
|||||||
|
|
||||||
int countStartAndGroupNum(@Param("startId")Long startId,@Param("departmentIds")List<String> departmentIds);
|
int countStartAndGroupNum(@Param("startId")Long startId,@Param("departmentIds")List<String> departmentIds);
|
||||||
|
|
||||||
ResultRecord selectOneByStartId(@Param("startId")Long startId);
|
ResultRecord selectOneByStartId(@Param("startId")Long startId,@Param("departmentIds")List<String> departmentIds);
|
||||||
|
|
||||||
List<AssessManagerDetailRes> selectAssessListByStartId(@Param("page") IPage page, @Param("req")AssessDetailReq req);
|
List<AssessManagerDetailRes> selectAssessListByStartId(@Param("page") IPage page, @Param("req")AssessDetailReq req);
|
||||||
|
|
||||||
|
|||||||
@ -436,7 +436,15 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOneByStartId" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
<select id="selectOneByStartId" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
||||||
select * from lz_result_record where is_delete = 0 and start_id = #{startId} limit 1
|
select * from lz_result_record where is_delete = 0 and start_id = #{startId}
|
||||||
|
<if test="departmentIds !=null and departmentIds.size()!=0">
|
||||||
|
and department_id in (
|
||||||
|
<foreach collection="departmentIds" item="department_id" separator=",">
|
||||||
|
#{department_id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAssessListByStartId" resultType="com.lz.modules.performance.res.AssessManagerDetailRes">
|
<select id="selectAssessListByStartId" resultType="com.lz.modules.performance.res.AssessManagerDetailRes">
|
||||||
@ -447,7 +455,7 @@
|
|||||||
and r.start_id = #{req.startId}
|
and r.start_id = #{req.startId}
|
||||||
<if test="req.copyEvaluationIds !=null and req.copyEvaluationIds !=''">
|
<if test="req.copyEvaluationIds !=null and req.copyEvaluationIds !=''">
|
||||||
and r.evaluation_id in(
|
and r.evaluation_id in(
|
||||||
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
|
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" separator=",">
|
||||||
#{evaluation_id}
|
#{evaluation_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
@ -460,7 +468,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="req.staffIds !=null and req.staffIds !=''">
|
<if test="req.staffIds !=null and req.staffIds !=''">
|
||||||
and r.staff_id in(
|
and r.staff_id in(
|
||||||
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
|
<foreach collection="req.staffIds.split(',')" item="staff_id" separator=",">
|
||||||
#{staff_id}
|
#{staff_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
@ -483,7 +491,7 @@
|
|||||||
and r.start_id =#{req.startId}
|
and r.start_id =#{req.startId}
|
||||||
<if test="req.copyEvaluationIds !=null and req.copyEvaluationIds !=''">
|
<if test="req.copyEvaluationIds !=null and req.copyEvaluationIds !=''">
|
||||||
and r.evaluation_id in(
|
and r.evaluation_id in(
|
||||||
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
|
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" separator=",">
|
||||||
#{evaluation_id}
|
#{evaluation_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
@ -496,7 +504,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="req.staffIds !=null and req.staffIds !=''">
|
<if test="req.staffIds !=null and req.staffIds !=''">
|
||||||
and r.staff_id in(
|
and r.staff_id in(
|
||||||
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
|
<foreach collection="req.staffIds.split(',')" item="staff_id" separator=",">
|
||||||
#{staff_id}
|
#{staff_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
@ -520,7 +528,7 @@
|
|||||||
and r.start_id =#{req.startId}
|
and r.start_id =#{req.startId}
|
||||||
<if test="req.copyEvaluationIds !=null and req.copyEvaluationIds !=''">
|
<if test="req.copyEvaluationIds !=null and req.copyEvaluationIds !=''">
|
||||||
and r.evaluation_id in(
|
and r.evaluation_id in(
|
||||||
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" open="(" separator="," close=")">
|
<foreach collection="req.copyEvaluationIds.split(',')" item="evaluation_id" separator=",">
|
||||||
#{evaluation_id}
|
#{evaluation_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
@ -533,7 +541,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="req.staffIds !=null and req.staffIds !=''">
|
<if test="req.staffIds !=null and req.staffIds !=''">
|
||||||
and r.staff_id in(
|
and r.staff_id in(
|
||||||
<foreach collection="req.staffIds.split(',')" item="staff_id" open="(" separator="," close=")">
|
<foreach collection="req.staffIds.split(',')" item="staff_id" separator="," >
|
||||||
#{staff_id}
|
#{staff_id}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -96,6 +96,7 @@
|
|||||||
<if test="name !=null and name !=''">
|
<if test="name !=null and name !=''">
|
||||||
and name LIKE CONCAT('%',#{name},'%')
|
and name LIKE CONCAT('%',#{name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectFlowStartByName" resultType="FlowStart" >
|
<select id="selectFlowStartByName" resultType="FlowStart" >
|
||||||
|
|||||||
@ -97,6 +97,14 @@
|
|||||||
select evaluation_group_id from lz_staff_role_evaluation_group where is_delete = 0 and role_id = #{roleId} and is_select = 1
|
select evaluation_group_id from lz_staff_role_evaluation_group where is_delete = 0 and role_id = #{roleId} and is_select = 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectStaffRoleEvaluationsGroupByStaffRoles" resultType="StaffRoleEvaluationGroup" >
|
||||||
|
select * from lz_staff_role_evaluation_group where is_delete = 0 and
|
||||||
|
role_id in (
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
#{item.id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</select>
|
||||||
<select id="selectEvaluationGroupIdsByRoleIdGroupId"
|
<select id="selectEvaluationGroupIdsByRoleIdGroupId"
|
||||||
resultType="com.lz.modules.flow.entity.StaffRoleEvaluationGroup">
|
resultType="com.lz.modules.flow.entity.StaffRoleEvaluationGroup">
|
||||||
select * from lz_staff_role_evaluation_group where is_delete = 0 and role_id = #{roleId} and evaluation_group_id = #{groupId}
|
select * from lz_staff_role_evaluation_group where is_delete = 0 and role_id = #{roleId} and evaluation_group_id = #{groupId}
|
||||||
|
|||||||
@ -183,6 +183,14 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMastRoles" resultType="StaffRole" >
|
||||||
|
select * from lz_staff_role where department_level='MASTER_PM' and is_delete = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAllGroupManageRoles" resultType="StaffRole" >
|
||||||
|
select * from lz_staff_role where evaluation_group_id=0 and is_delete=0 and is_delete=0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user