diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java index 4c63d231..4ee8f93b 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java @@ -3,6 +3,7 @@ package org.jeecg.modules.demo.comp.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.base.Joiner; import io.swagger.annotations.Api; @@ -21,9 +22,11 @@ import org.jeecg.modules.demo.comp.entity.Comp; import org.jeecg.modules.demo.comp.service.ICompService; import org.jeecg.modules.demo.compexp.entity.CompExp; import org.jeecg.modules.demo.compexp.service.ICompExpService; +import org.jeecg.modules.demo.comptype.entity.CompType; import org.jeecg.modules.demo.comptype.service.ICompTypeService; import org.jeecg.modules.demo.expert.entity.Expert; import org.jeecg.modules.demo.expert.service.IExpertService; +import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysRole; import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.service.ISysDepartService; @@ -447,6 +450,28 @@ public class CompController extends JeecgController { @GetMapping(value = "/complistnolj") public Result> complistnolj() { List compList = compService.list(); + for(Comp comp : compList){ + if (comp.getCompAdmin()!= null) { + QueryChainWrapper query = sysUserService.query(); + query.eq("work_no", comp.getCompAdmin()); + SysUser sysUser = query.one(); + if (sysUser != null && sysUser.getRealname() != null) { + comp.setCompAdmin(sysUser.getRealname()); + } + } + if (comp.getCompOrgan() != null) { + SysDepart sysDepart = iSysDepartService.getById(comp.getCompOrgan()); + if (sysDepart != null && sysDepart.getDepartName() != null) { + comp.setComporderc(sysDepart.getDepartName()); + } + } + if (!comp.getCompTypeId().isEmpty()) { + CompType compType = compTypeService.getById(comp.getCompTypeId()); + if (compType != null && compType.getTypeName() != null) { + comp.setCompTypeId(compType.getTypeName()); + } + } + } return Result.OK(compList); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/entity/Comp.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/entity/Comp.java index cd93e3fe..c3c3c173 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/entity/Comp.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/entity/Comp.java @@ -147,4 +147,7 @@ public class Comp implements Serializable { @TableField(exist = false) private String compTypeName; + + @TableField(exist = false) + private String comporderc; } diff --git a/jeecgboot-vue3-master/src/router/routes/index.ts b/jeecgboot-vue3-master/src/router/routes/index.ts index 775778fd..ba930ba5 100644 --- a/jeecgboot-vue3-master/src/router/routes/index.ts +++ b/jeecgboot-vue3-master/src/router/routes/index.ts @@ -2,7 +2,7 @@ import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types'; import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic'; -// import { mainOutRoutes } from './mainOut'; +import { mainOutRoutes } from './mainOut'; import { PageEnum } from '/@/enums/pageEnum'; import { t } from '/@/hooks/web/useI18n'; @@ -173,4 +173,4 @@ export const TokenLoginRoute: AppRouteRecordRaw = { }; // Basic routing without permission -export const basicRoutes = [LoginRoute,compcom, RootRoute, REDIRECT_ROUTE, PAGE_NOT_FOUND_ROUTE, TokenLoginRoute, Oauth2LoginRoute]; +export const basicRoutes = [LoginRoute,compcom, RootRoute, REDIRECT_ROUTE, PAGE_NOT_FOUND_ROUTE, TokenLoginRoute, Oauth2LoginRoute,...mainOutRoutes];