Compare commits

...

2 Commits

Author SHA1 Message Date
dy
2cc45acc37 Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
Some checks failed
/ build-parent-pom (push) Successful in 2m3s
/ build-and-push-services (ruoyi-auth) (push) Failing after 1m6s
/ build-and-push-services (ruoyi-gateway) (push) Failing after 1m5s
/ build-and-push-services (ruoyi-modules/Sis) (push) Failing after 32s
/ build-and-push-services (ruoyi-modules/ruoyi-gen) (push) Failing after 49s
/ build-and-push-services (ruoyi-modules/ruoyi-resource) (push) Waiting to run
/ build-and-push-services (ruoyi-modules/ruoyi-system) (push) Waiting to run
/ build-and-push-services (ruoyi-modules/ruoyi-workflow) (push) Waiting to run
/ build-and-push-services (ruoyi-seata-server) (push) Waiting to run
/ build-and-push-services (ruoyi-sentinel-dashboard) (push) Waiting to run
/ build-and-push-services (ruoyi-snailjob-server) (push) Waiting to run
/ build-and-push-services (ruoyi-visual/ruoyi-monitor) (push) Waiting to run
/ build-and-push-services (ruoyi-visual/ruoyi-nacos) (push) Waiting to run
/ build-and-push-services (ruoyi-modules/ruoyi-job) (push) Has been cancelled
/ build-and-push-services (ruoyi-modules/Property) (push) Has been cancelled
2025-08-14 15:17:13 +08:00
dy
74e5323934 部门名称 2025-08-14 15:16:53 +08:00
3 changed files with 29 additions and 8 deletions

View File

@ -89,5 +89,7 @@ public class AttendanceUserGroupVo implements Serializable {
private RemoteUserVo remoteUserVo; private RemoteUserVo remoteUserVo;
private String deptName;
} }

View File

@ -80,11 +80,14 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
List<AttendanceUserGroupVo> userGroupList = userGroupMapper.selectVoList(Wrappers.<AttendanceUserGroup>lambdaQuery().eq(AttendanceUserGroup::getScheduleId, id)); List<AttendanceUserGroupVo> userGroupList = userGroupMapper.selectVoList(Wrappers.<AttendanceUserGroup>lambdaQuery().eq(AttendanceUserGroup::getScheduleId, id));
//查询所有的用户信息 //查询所有的用户信息
userGroupList.forEach(userGroup -> { userGroupList.forEach(userGroup -> {
// SysUserVo sysUserVo = sysUserService.selectUserById(userGroup.getEmployeeId());
// userGroup.setSysUser(sysUserVo);
RemoteUserVo userInfoById = remoteUserService.getUserInfoById(userGroup.getEmployeeId()); RemoteUserVo userInfoById = remoteUserService.getUserInfoById(userGroup.getEmployeeId());
userGroup.setRemoteUserVo(userInfoById); userGroup.setRemoteUserVo(userInfoById);
//获取deptId
Long deptId = userGroup.getDeptId();
//根据deptId查询出部门名称
String deptName = remoteUserService.selectDeptNamesByIds(Arrays.asList(deptId)).get(deptId);
userGroup.setDeptName(deptName);
}); });
//将排班人员信息添加到排班信息中 //将排班人员信息添加到排班信息中
vo.setUserGroupList(userGroupList); vo.setUserGroupList(userGroupList);
@ -128,6 +131,11 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
RemoteUserVo userInfoById = remoteUserService.getUserInfoById(userGroup.getEmployeeId()); RemoteUserVo userInfoById = remoteUserService.getUserInfoById(userGroup.getEmployeeId());
userGroup.setRemoteUserVo(userInfoById); userGroup.setRemoteUserVo(userInfoById);
//获取deptId
Long deptId = userGroup.getDeptId();
//根据deptId查询出部门名称
String deptName = remoteUserService.selectDeptNamesByIds(Arrays.asList(deptId)).get(deptId);
userGroup.setDeptName(deptName);
} }
); );

View File

@ -15,16 +15,14 @@ import org.dromara.property.domain.constant.StatusConstant;
import org.dromara.property.domain.vo.AttendanceUserGroupVo; import org.dromara.property.domain.vo.AttendanceUserGroupVo;
import org.dromara.property.mapper.*; import org.dromara.property.mapper.*;
import org.dromara.property.service.IAttendanceUserGroupService; import org.dromara.property.service.IAttendanceUserGroupService;
import org.dromara.system.api.RemoteDeptService;
import org.dromara.system.api.RemoteUserService; import org.dromara.system.api.RemoteUserService;
import org.dromara.system.api.domain.vo.RemoteUserVo; import org.dromara.system.api.domain.vo.RemoteUserVo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.util.Collection; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -53,6 +51,9 @@ public class AttendanceUserGroupServiceImpl implements IAttendanceUserGroupServi
@DubboReference @DubboReference
private RemoteUserService remoteUserService; private RemoteUserService remoteUserService;
@DubboReference
private RemoteDeptService remoteDeptService;
/** /**
* 查询排班明细 * 查询排班明细
@ -177,10 +178,20 @@ public class AttendanceUserGroupServiceImpl implements IAttendanceUserGroupServi
Long scheduleId = vo.getScheduleId(); Long scheduleId = vo.getScheduleId();
//根据employeeId查询出用户的详细信息 //根据employeeId查询出用户的详细信息
// SysUserVo sysUserVo = sysUserService.selectUserById(vo.getEmployeeId());
RemoteUserVo userInfoById = remoteUserService.getUserInfoById(vo.getEmployeeId()); RemoteUserVo userInfoById = remoteUserService.getUserInfoById(vo.getEmployeeId());
vo.setRemoteUserVo(userInfoById); vo.setRemoteUserVo(userInfoById);
Long deptId = vo.getDeptId();
String deptName = remoteUserService.selectDeptNamesByIds(Arrays.asList(deptId)).get(deptId);
vo.setDeptName(deptName);
// //通过employeeId查询出用户的部门信息
// String deptInfo = remoteDeptService.selectDeptNameByIds(String.valueOf(vo.getDeptId()));
// vo.setDeptName(deptInfo);
//根据scheduleId查询出排班的详细信息 //根据scheduleId查询出排班的详细信息
AttendanceArrangement attendanceArrangement = arrangementMapper.selectOne(Wrappers.<AttendanceArrangement>lambdaQuery().eq(AttendanceArrangement::getId, scheduleId)); AttendanceArrangement attendanceArrangement = arrangementMapper.selectOne(Wrappers.<AttendanceArrangement>lambdaQuery().eq(AttendanceArrangement::getId, scheduleId));
// 假设每个vo只有一个scheduleId // 假设每个vo只有一个scheduleId