相关方入职离职
parent
e28191ae74
commit
9c3fd671d0
|
|
@ -102,18 +102,6 @@ public class UserQueryExe {
|
|||
UserDO userDO = userRepository.getInfoById(id);
|
||||
UserCO userCO = new UserCO();
|
||||
BeanUtils.copyProperties(userDO, userCO);
|
||||
//如果是相关方流动人员,查找岗位部门
|
||||
UserCorpDO userCorpDO = userCorpRepository.getInfoByUserId(userCO.getId(),AuthContext.getTenantId());
|
||||
if(userCorpDO != null){
|
||||
userCO.setDepartmentId(userCorpDO.getDepartmentId());
|
||||
userCO.setPostId(userCorpDO.getPostId());
|
||||
userCO.setPostName(userCorpDO.getPostName());
|
||||
userCO.setRoleId(userCorpDO.getRoleId());
|
||||
userCO.setSort(userCorpDO.getSort());
|
||||
userCO.setCorpinfoId(userCorpDO.getCorpinfoId());
|
||||
userCO.setEmploymentFlag(userCorpDO.getEmploymentFlag());
|
||||
}
|
||||
|
||||
return SingleResponse.of(userCO);
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +234,7 @@ public class UserQueryExe {
|
|||
userLoginCO.setIsInfoComplete(b);
|
||||
|
||||
List<Long> userIds = userDOList.stream().map(UserDO::getId).collect(Collectors.toList());
|
||||
List<UserCorpInfoDO> userCorpDOS = userCorpRepository.getListByUserIds(userIds);
|
||||
List<UserCorpInfoDO> userCorpDOS = userRepository.getListByUserIds(userIds);
|
||||
List<UserCorpInfoCO> corpInfoCOS = corpInfoCoConvertor.converUserInfoDOsToCOs(userCorpDOS);
|
||||
|
||||
userLoginCO.setUserCorpInfoCOList(corpInfoCOS);
|
||||
|
|
@ -262,7 +250,7 @@ public class UserQueryExe {
|
|||
List<UserDO> userDOList = userRepository.getListByPhone(userDO.getPhone());
|
||||
|
||||
List<Long> userIds = userDOList.stream().map(UserDO::getId).collect(Collectors.toList());
|
||||
List<UserCorpInfoDO> userCorpDOS = userCorpRepository.getListByUserIds(userIds);
|
||||
List<UserCorpInfoDO> userCorpDOS = userRepository.getListByUserIds(userIds);
|
||||
List<UserCorpInfoCO> corpInfoCOS = corpInfoCoConvertor.converUserInfoDOsToCOs(userCorpDOS);
|
||||
return corpInfoCOS;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,5 @@ public interface UserCorpMapper extends BaseMapper<UserCorpDO> {
|
|||
|
||||
UserCorpDO getInfoByUserId(Long userId, Long corpinfoId);
|
||||
|
||||
List<UserCorpInfoDO> getListByUserIds(List<Long> userIds);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.jjb.saas.framework.datascope.annotation.DataScope;
|
||||
import com.jjb.saas.framework.datascope.annotation.DataScopes;
|
||||
import com.zcloud.basic.info.persistence.dataobject.DepartmentLeaderStatictiscDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.UserCorpInfoDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.UserDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -36,5 +37,7 @@ public interface UserMapper extends BaseMapper<UserDO> {
|
|||
Integer countUser(@Param("params") Map<String, Object> params);
|
||||
|
||||
IPage<UserDO> listXgf(IPage<UserDO> iPage, Map<String, Object> params, String menuPerms);
|
||||
|
||||
List<UserCorpInfoDO> getListByUserIds(List<Long> userIds);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,5 @@ public interface UserCorpRepository extends BaseRepository<UserCorpDO> {
|
|||
|
||||
List<UserCorpDO> getONCorpInfo(@NotNull(message = "用户id不能为空") Long id);
|
||||
|
||||
List<UserCorpInfoDO> getListByUserIds(List<Long> userIds);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.jjb.saas.framework.repository.repo.BaseRepository;
|
|||
import com.jjb.saas.system.client.role.response.RoleCO;
|
||||
import com.zcloud.basic.info.domain.model.CorpInfoE;
|
||||
import com.zcloud.basic.info.domain.model.UserE;
|
||||
import com.zcloud.basic.info.persistence.dataobject.UserCorpInfoDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.UserDO;
|
||||
import org.apache.catalina.User;
|
||||
|
||||
|
|
@ -81,5 +82,7 @@ public interface UserRepository extends BaseRepository<UserDO> {
|
|||
void checkUserIdCard(@NotNull(message = "主键id不能为空") Long id, String userIdCard);
|
||||
|
||||
List<UserDO> getListByPhone(String phone);
|
||||
|
||||
List<UserCorpInfoDO> getListByUserIds(List<Long> userIds);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,9 +118,6 @@ public class UserCorpRepositoryImpl extends BaseRepositoryImpl<UserCorpMapper, U
|
|||
return userCorpMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserCorpInfoDO> getListByUserIds(List<Long> userIds) {
|
||||
return userCorpMapper.getListByUserIds(userIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import com.zcloud.basic.info.domain.enums.MenuEnum;
|
|||
import com.zcloud.basic.info.domain.enums.UserEmploymentFlagEnum;
|
||||
import com.zcloud.basic.info.domain.model.UserE;
|
||||
import com.zcloud.basic.info.persistence.dataobject.DepartmentLeaderStatictiscDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.UserCorpInfoDO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.UserDO;
|
||||
import com.zcloud.basic.info.persistence.mapper.UserMapper;
|
||||
import com.zcloud.basic.info.persistence.repository.UserRepository;
|
||||
|
|
@ -534,5 +535,10 @@ public class UserRepositoryImpl extends BaseRepositoryImpl<UserMapper, UserDO> i
|
|||
queryWrapper.eq("phone", phone);
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserCorpInfoDO> getListByUserIds(List<Long> userIds) {
|
||||
return userMapper.getListByUserIds(userIds);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,16 +14,6 @@
|
|||
and uc.delete_enum = 'FALSE'
|
||||
</select>
|
||||
|
||||
<select id="getListByUserIds" resultType="com.zcloud.basic.info.persistence.dataobject.UserCorpInfoDO">
|
||||
select u.id as userId, ci.corp_name as corpinfoName,ci.id as corpinfoId
|
||||
from user u
|
||||
left join corp_info ci on u.corpinfo_id = ci.id
|
||||
where u.user_id in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and ci.use_flag=1
|
||||
and u.delete_enum = 'FALSE'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
|
|
@ -340,6 +340,16 @@
|
|||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getListByUserIds" resultType="com.zcloud.basic.info.persistence.dataobject.UserCorpInfoDO">
|
||||
select u.id as userId, ci.corp_name as corpinfoName,ci.id as corpinfoId
|
||||
from user u
|
||||
left join corp_info ci on u.corpinfo_id = ci.id
|
||||
where u.user_id in
|
||||
<foreach collection="userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and ci.use_flag=1
|
||||
and u.delete_enum = 'FALSE'
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue