|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.elink.esua.epdc.service.impl; |
|
|
|
|
|
|
|
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import com.elink.esua.epdc.common.token.dto.WorkUserAuthorizationDTO; |
|
|
|
import com.elink.esua.epdc.common.token.dto.WorkUserLoginDTO; |
|
|
|
import com.elink.esua.epdc.common.token.dto.WorkUserTokenFormDTO; |
|
|
@ -133,8 +134,13 @@ public class WorkUserServiceImpl implements WorkUserService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Result<List<EpdcWorkUserResultDTO>> listWorkUser(EpdcWorkUserFromDTO workUserFromDto) { |
|
|
|
if (null == workUserFromDto.getGridId()||0 == workUserFromDto.getGridId()) { |
|
|
|
Long gridId = workUserFromDto.getGridId(); |
|
|
|
if (null == gridId || gridId <= NumConstant.ZERO_L) { |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
List<Long> deptIdList = user.getDeptIdList(); |
|
|
|
if (CollUtil.isEmpty(deptIdList)) { |
|
|
|
return new Result().error("获取用户部门权限失败"); |
|
|
|
} |
|
|
|
workUserFromDto.setGridIdList(user.getDeptIdList()); |
|
|
|
} |
|
|
|
return userFeignClient.getWorkUserList(workUserFromDto); |
|
|
@ -142,16 +148,15 @@ public class WorkUserServiceImpl implements WorkUserService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<Integer> getUnauthorizedAmount(EpdcUnauthorizedAmountFromDTO fromDto) { |
|
|
|
if (null == fromDto.getGridId()) { |
|
|
|
Long gridId = fromDto.getGridId(); |
|
|
|
if (null == gridId || gridId <= NumConstant.ZERO_L) { |
|
|
|
UserDetail user = SecurityUser.getUser(); |
|
|
|
List<Long> deptIdList = user.getDeptIdList(); |
|
|
|
if(deptIdList != null && deptIdList.size() > 0){ |
|
|
|
fromDto.setGridIdList(user.getDeptIdList()); |
|
|
|
}else { |
|
|
|
throw new RenException("用户信息有误,请重新登陆"); |
|
|
|
if (CollUtil.isEmpty(deptIdList)) { |
|
|
|
return new Result().error("获取用户部门权限失败"); |
|
|
|
} |
|
|
|
fromDto.setGridIdList(user.getDeptIdList()); |
|
|
|
} |
|
|
|
|
|
|
|
return userFeignClient.getUnauthorizedAmount(fromDto); |
|
|
|
} |
|
|
|
|
|
|
@ -250,9 +255,9 @@ public class WorkUserServiceImpl implements WorkUserService { |
|
|
|
// 组装返回数据
|
|
|
|
List<WorkAppMenuStatisticsResultDTO> resultDtoList = new ArrayList<>(); |
|
|
|
boolean isItem = false; |
|
|
|
for (EpdcAppIndexPanelResultDTO indexPanelDto: |
|
|
|
for (EpdcAppIndexPanelResultDTO indexPanelDto : |
|
|
|
adminResult.getData()) { |
|
|
|
for (EpdcAppChildNavResultDTO childDto: |
|
|
|
for (EpdcAppChildNavResultDTO childDto : |
|
|
|
indexPanelDto.getChildNav()) { |
|
|
|
if (NumConstant.ZERO_STR.equals(childDto.getNumFlag())) { |
|
|
|
continue; |
|
|
@ -295,11 +300,10 @@ public class WorkUserServiceImpl implements WorkUserService { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* 组装菜单数据 |
|
|
|
* |
|
|
|
* @params [menuCode, menuNum] |
|
|
|
* @return com.elink.esua.epdc.dto.result.WorkAppMenuStatisticsResultDTO |
|
|
|
* @params [menuCode, menuNum] |
|
|
|
* @author liuchuang |
|
|
|
* @since 2019/11/29 9:58 |
|
|
|
*/ |
|
|
|