gstadmin
王家东 2 months ago
parent f9047827fe
commit 282de55ae8
  1. 25
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java
  2. 3
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/entity/Comp.java
  3. 4
      jeecgboot-vue3-master/src/router/routes/index.ts

@ -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.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import io.swagger.annotations.Api; 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.comp.service.ICompService;
import org.jeecg.modules.demo.compexp.entity.CompExp; import org.jeecg.modules.demo.compexp.entity.CompExp;
import org.jeecg.modules.demo.compexp.service.ICompExpService; 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.comptype.service.ICompTypeService;
import org.jeecg.modules.demo.expert.entity.Expert; import org.jeecg.modules.demo.expert.entity.Expert;
import org.jeecg.modules.demo.expert.service.IExpertService; 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.SysRole;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysDepartService;
@ -447,6 +450,28 @@ public class CompController extends JeecgController<Comp, ICompService> {
@GetMapping(value = "/complistnolj") @GetMapping(value = "/complistnolj")
public Result<List<Comp>> complistnolj() { public Result<List<Comp>> complistnolj() {
List<Comp> compList = compService.list(); List<Comp> compList = compService.list();
for(Comp comp : compList){
if (comp.getCompAdmin()!= null) {
QueryChainWrapper<SysUser> 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); return Result.OK(compList);
} }

@ -147,4 +147,7 @@ public class Comp implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String compTypeName; private String compTypeName;
@TableField(exist = false)
private String comporderc;
} }

@ -2,7 +2,7 @@ import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types';
import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic'; 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 { PageEnum } from '/@/enums/pageEnum';
import { t } from '/@/hooks/web/useI18n'; import { t } from '/@/hooks/web/useI18n';
@ -173,4 +173,4 @@ export const TokenLoginRoute: AppRouteRecordRaw = {
}; };
// Basic routing without permission // 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];

Loading…
Cancel
Save