发起绩效时增加搜索绩效管理员
This commit is contained in:
parent
ee7c9ebc4f
commit
c88eb0a9b3
@ -96,4 +96,6 @@ public interface StaffDao extends BaseMapper<StaffEntity> {
|
|||||||
StaffSimpleInfo selectStaffSimpleInfo(@Param("staffId") Long staffId);
|
StaffSimpleInfo selectStaffSimpleInfo(@Param("staffId") Long staffId);
|
||||||
|
|
||||||
List<StaffEntity> selectNamesByIds(@Param("list") List<Long> sIds);
|
List<StaffEntity> selectNamesByIds(@Param("list") List<Long> sIds);
|
||||||
|
|
||||||
|
List<StaffEntity> selectStaffsByGroupId(@Param("copyId") Long copyId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,5 +101,7 @@ public interface StaffService extends IService<StaffEntity> {
|
|||||||
StaffSimpleInfo selectStaffSimpleInfo(Long staffId);
|
StaffSimpleInfo selectStaffSimpleInfo(Long staffId);
|
||||||
|
|
||||||
List<StaffEntity> selectNamesByIds(List<Long> sIds);
|
List<StaffEntity> selectNamesByIds(List<Long> sIds);
|
||||||
|
//获取绩效考核管理员
|
||||||
|
List<StaffEntity> selectStaffsByGroupId(Long copyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -524,5 +524,10 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
|||||||
return staffDao.selectNamesByIds(sIds);
|
return staffDao.selectNamesByIds(sIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffEntity> selectStaffsByGroupId(Long copyId){
|
||||||
|
return staffDao.selectStaffsByGroupId(copyId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -181,7 +181,6 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, List<StaffEntity>> staffManages = new HashedMap();//部门(id+几级)和部门几级管理对应关系,减少数据库查找
|
Map<String, List<StaffEntity>> staffManages = new HashedMap();//部门(id+几级)和部门几级管理对应关系,减少数据库查找
|
||||||
//下面开始初始化流程
|
//下面开始初始化流程
|
||||||
List<Long> ids = Arrays.stream(flowStart.getGroupIds().split(",")).map(new Function<String, Long>() {
|
List<Long> ids = Arrays.stream(flowStart.getGroupIds().split(",")).map(new Function<String, Long>() {
|
||||||
@ -250,8 +249,9 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
Map<Long, String> chartNameMaps =
|
Map<Long, String> chartNameMaps =
|
||||||
flowCharts.stream().collect(Collectors.toMap(FlowChart::getId, FlowChart::getName));//流程节点与流程名称对应map,下面多次循环,减少数据库查找
|
flowCharts.stream().collect(Collectors.toMap(FlowChart::getId, FlowChart::getName));//流程节点与流程名称对应map,下面多次循环,减少数据库查找
|
||||||
|
|
||||||
List<StaffEntity> staffManagers = null;
|
//获取绩效考核管理员
|
||||||
if(!StringUtil.isEmpty(evaluationGroup.getManagerIds())){
|
List<StaffEntity> staffManagers = staffService.selectStaffsByGroupId(evaluationGroup.getCopyId());
|
||||||
|
/*if(!StringUtil.isEmpty(evaluationGroup.getManagerIds())){
|
||||||
List<Long> mIds = Arrays.stream(evaluationGroup.getManagerIds().split(","))
|
List<Long> mIds = Arrays.stream(evaluationGroup.getManagerIds().split(","))
|
||||||
.map(new Function<String, Long>() {
|
.map(new Function<String, Long>() {
|
||||||
@Override
|
@Override
|
||||||
@ -262,7 +262,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
//查找在职的管理人员
|
//查找在职的管理人员
|
||||||
staffManagers = staffService.selectOnJobByIds(mIds);
|
staffManagers = staffService.selectOnJobByIds(mIds);
|
||||||
|
|
||||||
}
|
}*/
|
||||||
if(staffManagers == null || staffManagers.size() == 0){
|
if(staffManagers == null || staffManagers.size() == 0){
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||||
return 4;
|
return 4;
|
||||||
|
|||||||
@ -538,4 +538,11 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectStaffsByGroupId" resultType="com.lz.modules.app.entity.StaffEntity">
|
||||||
|
select staff.* from (select * from lz_staff where id in (
|
||||||
|
select staff_id from lz_staff_role where is_delete = 0 and (evaluation_group_id = #{sIds} or evaluation_group_id = 0)
|
||||||
|
) and is_delete=0) as staff join lz_staff_occupation as occupation on staff.id = occupation.staff_id where occupation.staff_status=0
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user