远程调用
This commit is contained in:
parent
a6b586836d
commit
e41835c95e
@ -120,12 +120,6 @@
|
||||
<artifactId>sis-api</artifactId>
|
||||
<version>2.4.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
<version>2.4.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-websocket</artifactId>
|
||||
|
@ -1,15 +1,13 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.system.domain.SysUser;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 排班明细对象 attendance_user_group
|
||||
|
@ -1,20 +1,17 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.*;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.system.domain.SysUser;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
import org.dromara.property.api.domain.vo.RemoteBuildingVo;
|
||||
import org.dromara.property.domain.*;
|
||||
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
@ -88,7 +85,9 @@ public class AttendanceUserGroupVo implements Serializable {
|
||||
|
||||
private AttendanceScheduleCycle scheduleCycle;
|
||||
|
||||
private SysUserVo sysUser;
|
||||
// private SysUserVo sysUser;
|
||||
|
||||
private RemoteUserVo remoteUserVo;
|
||||
|
||||
|
||||
}
|
||||
|
@ -5,9 +5,7 @@ import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.property.api.RemoteBuildingService;
|
||||
import org.dromara.property.api.domain.vo.RemoteBuildingVo;
|
||||
import org.dromara.property.domain.vo.TbBuildingVo;
|
||||
import org.dromara.property.domain.vo.TbUnitVo;
|
||||
import org.dromara.property.service.ITbBuildingService;
|
||||
import org.dromara.property.service.ITbUnitService;
|
||||
|
||||
/**
|
||||
* 对外提供的远程服务调用
|
||||
|
@ -21,10 +21,8 @@ import org.dromara.property.domain.vo.AttendanceArrangementVo;
|
||||
import org.dromara.property.domain.vo.AttendanceUserGroupVo;
|
||||
import org.dromara.property.mapper.*;
|
||||
import org.dromara.property.service.IAttendanceArrangementService;
|
||||
import org.dromara.system.domain.SysUser;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
import org.dromara.system.mapper.SysUserMapper;
|
||||
import org.dromara.system.service.ISysUserService;
|
||||
import org.dromara.system.api.RemoteUserService;
|
||||
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -62,7 +60,7 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
||||
private final AttendanceScheduleCycleMapper scheduleCycleMapper;
|
||||
|
||||
@DubboReference
|
||||
private final ISysUserService sysUserService;
|
||||
private RemoteUserService remoteUserService;
|
||||
/**
|
||||
* 查询排班
|
||||
*
|
||||
@ -82,8 +80,11 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
||||
List<AttendanceUserGroupVo> userGroupList = userGroupMapper.selectVoList(Wrappers.<AttendanceUserGroup>lambdaQuery().eq(AttendanceUserGroup::getScheduleId, id));
|
||||
//查询所有的用户信息
|
||||
userGroupList.forEach(userGroup -> {
|
||||
SysUserVo sysUserVo = sysUserService.selectUserById(userGroup.getEmployeeId());
|
||||
userGroup.setSysUser(sysUserVo);
|
||||
// SysUserVo sysUserVo = sysUserService.selectUserById(userGroup.getEmployeeId());
|
||||
// userGroup.setSysUser(sysUserVo);
|
||||
|
||||
RemoteUserVo userInfoById = remoteUserService.getUserInfoById(userGroup.getEmployeeId());
|
||||
userGroup.setRemoteUserVo(userInfoById);
|
||||
});
|
||||
//将排班人员信息添加到排班信息中
|
||||
vo.setUserGroupList(userGroupList);
|
||||
@ -124,10 +125,9 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
|
||||
|
||||
//将userList存到userGroupList中
|
||||
userGroupVoList.forEach(userGroup -> {
|
||||
SysUserVo sysUserVo = sysUserService.selectUserById(userGroup.getEmployeeId());
|
||||
// SysUserVo sysUserVo1 = sysUserService.selectUserById(userGroupVoList.get(0).getEmployeeId());
|
||||
userGroup.setSysUser(sysUserVo);
|
||||
// userGroup.setSysUser(sysUserVo1);
|
||||
|
||||
RemoteUserVo userInfoById = remoteUserService.getUserInfoById(userGroup.getEmployeeId());
|
||||
userGroup.setRemoteUserVo(userInfoById);
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -1,32 +1,30 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.*;
|
||||
import org.dromara.property.domain.bo.AttendanceArrangementBo;
|
||||
import org.dromara.property.domain.constant.StatusConstant;
|
||||
import org.dromara.property.domain.vo.AttendanceArrangementVo;
|
||||
import org.dromara.property.mapper.*;
|
||||
import org.dromara.system.domain.vo.SysUserVo;
|
||||
import org.dromara.system.service.ISysUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.AttendanceUserGroupBo;
|
||||
import org.dromara.property.domain.constant.StatusConstant;
|
||||
import org.dromara.property.domain.vo.AttendanceUserGroupVo;
|
||||
import org.dromara.property.mapper.*;
|
||||
import org.dromara.property.service.IAttendanceUserGroupService;
|
||||
import org.dromara.system.api.RemoteUserService;
|
||||
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -53,7 +51,7 @@ public class AttendanceUserGroupServiceImpl implements IAttendanceUserGroupServi
|
||||
private final AttendanceScheduleCycleMapper scheduleCycleMapper;
|
||||
|
||||
@DubboReference
|
||||
private ISysUserService sysUserService;
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
|
||||
/**
|
||||
@ -179,8 +177,9 @@ public class AttendanceUserGroupServiceImpl implements IAttendanceUserGroupServi
|
||||
Long scheduleId = vo.getScheduleId();
|
||||
|
||||
//根据employeeId查询出用户的详细信息
|
||||
SysUserVo sysUserVo = sysUserService.selectUserById(vo.getEmployeeId());
|
||||
vo.setSysUser(sysUserVo);
|
||||
// SysUserVo sysUserVo = sysUserService.selectUserById(vo.getEmployeeId());
|
||||
RemoteUserVo userInfoById = remoteUserService.getUserInfoById(vo.getEmployeeId());
|
||||
vo.setRemoteUserVo(userInfoById);
|
||||
|
||||
//根据scheduleId查询出排班的详细信息
|
||||
AttendanceArrangement attendanceArrangement = arrangementMapper.selectOne(Wrappers.<AttendanceArrangement>lambdaQuery().eq(AttendanceArrangement::getId, scheduleId));
|
||||
|
@ -45,7 +45,6 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
public class SysUserServiceImpl implements ISysUserService {
|
||||
|
||||
private final SysUserMapper baseMapper;
|
||||
|
Loading…
Reference in New Issue
Block a user