|
|
|
@ -13,17 +13,17 @@ import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
import org.jeecg.common.system.base.controller.JeecgController; |
|
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
import org.jeecg.modules.modulex.entity.Modulex; |
|
|
|
|
import org.jeecg.modules.modulex.mapper.ModulexMapper; |
|
|
|
|
import org.jeecg.modules.modulex.service.IModulexService; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.servlet.ModelAndView; |
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.HashSet; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -39,6 +39,8 @@ import java.util.stream.Collectors; |
|
|
|
|
public class ModulexController extends JeecgController<Modulex, IModulexService> { |
|
|
|
|
@Autowired |
|
|
|
|
private IModulexService modulexService; |
|
|
|
|
@Resource |
|
|
|
|
private ModulexMapper modulexMapper; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
@ -59,6 +61,27 @@ public class ModulexController extends JeecgController<Modulex, IModulexService> |
|
|
|
|
QueryWrapper<Modulex> queryWrapper = QueryGenerator.initQueryWrapper(modulex, req.getParameterMap()); |
|
|
|
|
Page<Modulex> page = new Page<Modulex>(pageNo, pageSize); |
|
|
|
|
IPage<Modulex> pageList = modulexService.page(page, queryWrapper); |
|
|
|
|
List<Modulex> modulexList = pageList.getRecords(); |
|
|
|
|
for (Modulex modu :modulexList) { |
|
|
|
|
if (!StringUtils.hasText(modu.getManagerUsers())){ |
|
|
|
|
break; |
|
|
|
|
}else { |
|
|
|
|
String[] split = modu.getManagerUsers().split(","); |
|
|
|
|
List<String> stringList = Arrays.asList(split); |
|
|
|
|
List<String> strings = new ArrayList<>(); |
|
|
|
|
stringList.forEach(manager -> { |
|
|
|
|
String realName = modulexMapper.getRealName(manager); |
|
|
|
|
if (StringUtils.hasText(realName)) { |
|
|
|
|
strings.add(realName); |
|
|
|
|
} else { |
|
|
|
|
strings.add(manager); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
String toString = strings.toString(); |
|
|
|
|
String substring = toString.substring(1, toString.length() - 1); |
|
|
|
|
modu.setManagerUsers_dictText(substring); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|