|
|
|
@ -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<Comp, ICompService> { |
|
|
|
|
@GetMapping(value = "/complistnolj") |
|
|
|
|
public Result<List<Comp>> complistnolj() { |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|