소스 검색

用户列表,employWay和employType返回中文内容

dzx 9 달 전
부모
커밋
8e192e3922
1개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 9 4
      src/main/java/com/xjrsoft/module/organization/controller/UserController.java

+ 9 - 4
src/main/java/com/xjrsoft/module/organization/controller/UserController.java

@@ -65,6 +65,7 @@ import com.xjrsoft.module.organization.utils.OrganizationUtil;
 import com.xjrsoft.module.organization.vo.*;
 import com.xjrsoft.module.oss.factory.OssFactory;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
+import com.xjrsoft.module.system.entity.DictionaryDetail;
 import com.xjrsoft.module.system.entity.File;
 import com.xjrsoft.module.system.service.IFileService;
 import com.xjrsoft.module.teacher.entity.BaseTeacher;
@@ -194,13 +195,15 @@ public class UserController {
                     .eq(ObjectUtil.isNotNull(dto.getEmployWay()), BaseTeacher::getEmployWay, dto.getEmployWay())
                     .orderByDesc(User::getId)
                     .select(User::getId)
-                    .selectAs(BaseTeacher::getEmployWay, UserPageVo::getEmployWay)
-                    .selectAs(BaseTeacher::getEmployType, UserPageVo::getEmployType)
+                    .select("d1.name", UserPageVo::getEmployWay)
+                    .select("d2.name", UserPageVo::getEmployType)
                     .select(User.class, x -> VoToColumnUtil.fieldsToColumns(UserPageVo.class).contains(x.getProperty()))
                     .leftJoin(UserDeptRelation.class, UserDeptRelation::getUserId, User::getId)
                     .leftJoin(UserRoleRelation.class, UserRoleRelation::getUserId, User::getId)
                     .leftJoin(BaseTeacher.class, BaseTeacher::getUserId, User::getId)
                     .leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, User::getId)
+                    .leftJoin(DictionaryDetail.class, "d1", DictionaryDetail::getCode, BaseTeacher::getEmployWay)
+                    .leftJoin(DictionaryDetail.class, "d2", DictionaryDetail::getCode, BaseTeacher::getEmployType)
                     .leftJoin(Role.class, Role::getId, UserRoleRelation::getRoleId);
             IPage<UserPageVo> page = userService.selectJoinListPage(ConventPage.getPage(dto), UserPageVo.class, queryUser);
             for (UserPageVo record : page.getRecords()) {
@@ -242,13 +245,15 @@ public class UserController {
                             .eq(ObjectUtil.isNotNull(dto.getEmployWay()), BaseTeacher::getEmployWay, dto.getEmployWay())
                             .orderByDesc(User::getId)
                             .select(User::getId)
-                            .selectAs(BaseTeacher::getEmployWay, UserPageVo::getEmployWay)
-                            .selectAs(BaseTeacher::getEmployType, UserPageVo::getEmployType)
+                            .select("d1.name", UserPageVo::getEmployWay)
+                            .select("d2.name", UserPageVo::getEmployType)
                             .select(User.class, x -> VoToColumnUtil.fieldsToColumns(UserPageVo.class).contains(x.getProperty()))
                             .leftJoin(UserRoleRelation.class, UserRoleRelation::getUserId, User::getId)
                             .leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, User::getId)
                             .leftJoin(UserDeptRelation.class, UserDeptRelation::getUserId, User::getId)
                             .leftJoin(BaseTeacher.class, BaseTeacher::getUserId, User::getId)
+                            .leftJoin(DictionaryDetail.class, "d1", DictionaryDetail::getCode, BaseTeacher::getEmployWay)
+                            .leftJoin(DictionaryDetail.class, "d2", DictionaryDetail::getCode, BaseTeacher::getEmployType)
                             .leftJoin(Role.class, Role::getId, UserRoleRelation::getRoleId);
             IPage<UserPageVo> page = userService.selectJoinListPage(ConventPage.getPage(dto), UserPageVo.class,queryUser);
             for (UserPageVo record : page.getRecords()) {