mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 17:36:47 +08:00
fix:修改机构表的获取字段,统一从name修改为分部门级别的namePath字段
This commit is contained in:
@@ -28,6 +28,7 @@ import com.xboe.school.study.dto.*;
|
||||
import com.xboe.school.study.entity.*;
|
||||
import com.xboe.school.study.service.*;
|
||||
import com.xboe.school.vo.StudyTimeVo;
|
||||
import com.xboe.system.organization.entity.Organization;
|
||||
import com.xboe.system.organization.service.IOrganizationService;
|
||||
import com.xboe.system.user.entity.User;
|
||||
import com.xboe.system.user.service.IUserService;
|
||||
@@ -200,7 +201,9 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
? userInfo.getUserNo()
|
||||
: "");
|
||||
// 3. 填部门:通过departId查部门名称
|
||||
String departName = organizationService.getName(userInfo.getDepartId());
|
||||
// 获取部门信息(参考现有机构表,获取namePath字段)
|
||||
Organization organization = organizationService.get(userInfo.getDepartId());
|
||||
String departName = organization != null ? organization.getNamePath() : "";
|
||||
resultVo.setOrgInfo(StringUtils.isNotBlank(departName)
|
||||
? departName
|
||||
: "");
|
||||
@@ -418,7 +421,10 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
if (Objects.equals(userId, studyCourse1.getAid())) {
|
||||
log.info("【导出课程学习记录】查询boe人员表,机构id:{}", userInfo.getDepartId());
|
||||
// 和技术沟通后,确认这里机构名称是redis获取的,获取不到返回null,因此正常遍历没有效率和空值问题
|
||||
studyCourse1.setOrgInfo(organizationService.getName(userInfo.getDepartId()));
|
||||
// 获取部门信息(参考现有机构表,获取namePath字段)
|
||||
Organization organization = organizationService.get(userInfo.getDepartId());
|
||||
String departName = organization != null ? organization.getNamePath() : "";
|
||||
studyCourse1.setOrgInfo(departName);
|
||||
// 取userNo为工号
|
||||
studyCourse1.setUserNo(userInfo.getUserNo());
|
||||
}
|
||||
@@ -1331,8 +1337,9 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
UserSimpleVo userSimpleVo = new UserSimpleVo();
|
||||
userSimpleVo.setAid(userInfo.getId());
|
||||
userSimpleVo.setCode(userInfo.getUserNo());
|
||||
// 获取部门信息
|
||||
String departName = organizationService.getName(userInfo.getDepartId());
|
||||
// 获取部门信息(参考现有机构表,获取namePath字段)
|
||||
Organization organization = organizationService.get(userInfo.getDepartId());
|
||||
String departName = organization != null ? organization.getNamePath() : "";
|
||||
userSimpleVo.setOrgInfo(StringUtils.isNotBlank(departName) ? departName : "");
|
||||
userList.add(userSimpleVo);
|
||||
log.info("【资源学习情况导出-考试信息】查询boe人员表,用户id:{}", userId);
|
||||
@@ -1468,8 +1475,9 @@ public class StudyCourseApi extends ApiBaseController{
|
||||
UserSimpleVo userSimpleVo = new UserSimpleVo();
|
||||
userSimpleVo.setAid(userInfo.getId());
|
||||
userSimpleVo.setCode(userInfo.getUserNo());
|
||||
// 获取部门信息
|
||||
String departName = organizationService.getName(userInfo.getDepartId());
|
||||
// 获取部门信息(参考现有机构表,获取namePath字段)
|
||||
Organization organization = organizationService.get(userInfo.getDepartId());
|
||||
String departName = organization != null ? organization.getNamePath() : "";
|
||||
userSimpleVo.setOrgInfo(StringUtils.isNotBlank(departName) ? departName : "");
|
||||
userList.add(userSimpleVo);
|
||||
log.info("【资源学习情况导出-作业信息】查询boe人员表,用户id:{}", userId);
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.xboe.school.study.entity.StudyCourseItem;
|
||||
import com.xboe.school.study.entity.StudySignup;
|
||||
import com.xboe.school.study.service.IStudyCourseService;
|
||||
import com.xboe.school.study.service.IStudySignupService;
|
||||
import com.xboe.system.organization.entity.Organization;
|
||||
import com.xboe.system.organization.service.IOrganizationService;
|
||||
import com.xboe.system.user.entity.User;
|
||||
import com.xboe.system.user.service.IUserService;
|
||||
@@ -216,8 +217,10 @@ public class StudyCourseServiceImpl implements IStudyCourseService{
|
||||
for (StudyCourse studyCourse1 : studyCourses) {
|
||||
if (Objects.equals(userId, studyCourse1.getAid())) {
|
||||
log.info("【分页查询课程学习记录】查询boe人员表,机构id:{}", userInfo.getDepartId());
|
||||
// 和技术沟通后,确认这里机构名称是redis获取的,获取不到返回null,因此正常遍历没有效率和空值问题
|
||||
studyCourse1.setOrgInfo(organizationService.getName(userInfo.getDepartId()));
|
||||
// 获取部门信息(参考现有机构表,获取namePath字段)
|
||||
Organization organization = organizationService.get(userInfo.getDepartId());
|
||||
String departName = organization != null ? organization.getNamePath() : "";
|
||||
studyCourse1.setOrgInfo(departName);
|
||||
// 取userNo为工号
|
||||
studyCourse1.setUserNo(userInfo.getUserNo());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user