|
@@ -87,6 +87,62 @@ public class SysIndexController extends BaseController
|
|
|
mmap.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
|
|
|
mmap.put("isMobile", ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")));
|
|
|
|
|
|
+ UserRelate userRelate = new UserRelate();
|
|
|
+ userRelate.setUserId(getUserId());
|
|
|
+ List<UserRelate> userRelates = userRelateService.selectUserRelateList(userRelate);
|
|
|
+ //获取档案列表
|
|
|
+// List<Dangan> danganList = danganService.selectDanganList(new Dangan());
|
|
|
+
|
|
|
+ //23年2月14日新增,加入档案信息
|
|
|
+ if(!CollectionUtils.isEmpty(userRelates)) {
|
|
|
+ for (UserRelate relate : userRelates) {
|
|
|
+ Dangan dangan = danganService.selectDanganById(relate.getDanganId());
|
|
|
+ if(!ObjectUtils.isEmpty(dangan)){
|
|
|
+ if(!StringUtils.isEmpty(dangan.getIconInfo())){
|
|
|
+ if(dangan.getIconInfo().contains("/upload")){
|
|
|
+ //期望给用户展示用的可直接访问的URL
|
|
|
+ String newStr = dangan.getIconInfo();
|
|
|
+ String[] ipPorts = ipPort.split(",");
|
|
|
+ //分ip+端口号 和 域名情况
|
|
|
+ if(ipPorts.length>=2){
|
|
|
+ //说明是由ip,端口组成的参数
|
|
|
+ newStr = "http://"+ipPorts[0]+":"+ipPorts[1]+"/iconShow"+newStr;
|
|
|
+ }else if(ipPorts.length==1){
|
|
|
+ //说明ip配置的是域名
|
|
|
+ newStr = "http://"+ipPorts[0]+"/iconShow"+newStr;
|
|
|
+ }
|
|
|
+ dangan.setIconInfo(newStr);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ //说明档案图标未上传,那么使用默认图标
|
|
|
+ SysConfig configQuery = new SysConfig();
|
|
|
+ configQuery.setConfigKey("sys.main.defaultIcon");
|
|
|
+ SysConfig configEntity = configMapper.selectConfig(configQuery);
|
|
|
+ if(!ObjectUtils.isEmpty(configEntity)) {
|
|
|
+ String config = configEntity.getConfigValue();
|
|
|
+ if (!StringUtils.isEmpty(config)) {
|
|
|
+ //说明全局config表中已配置
|
|
|
+ //期望给用户展示用的可直接访问的URL
|
|
|
+ String newStr = config;
|
|
|
+// String[] ipPorts = ipPort.split(",");
|
|
|
+// //分ip+端口号 和 域名情况
|
|
|
+// if (ipPorts.length >= 2) {
|
|
|
+// //说明是由ip,端口组成的参数
|
|
|
+// newStr = "http://" + ipPorts[0] + ":" + ipPorts[1] + "/iconShow" + newStr;
|
|
|
+// } else if (ipPorts.length == 1) {
|
|
|
+// //说明ip配置的是域名
|
|
|
+// newStr = "http://" + ipPorts[0] + "/iconShow" + newStr;
|
|
|
+// }
|
|
|
+ dangan.setIconInfo(newStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ relate.setDangan(dangan);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mmap.put("danganList",userRelates);
|
|
|
+
|
|
|
// 菜单导航显示风格
|
|
|
String menuStyle = configService.selectConfigByKey("sys.index.menuStyle");
|
|
|
// 移动端,默认使左侧导航菜单,否则取默认配置
|