物联用户权限功能添加

This commit is contained in:
xy
2025-11-14 10:01:55 +08:00
parent 340ba18f99
commit adb811e9df
24 changed files with 588 additions and 36 deletions

View File

@@ -6,6 +6,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.csdevice.enums.DeviceOperate;
import com.njcn.csdevice.pojo.param.UserDevParam;
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
import com.njcn.csdevice.pojo.vo.DevCountVO;
import com.njcn.csdevice.pojo.vo.DevUserVO;
@@ -140,4 +141,24 @@ public class DeviceUserController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/findDevByUserId")
@ApiOperation("根据用户Id查询设备集合")
@ApiImplicitParam(name = "id", value = "用户id", required = true)
public HttpResult<List<String>> findDevByUserId(@RequestParam("id") String id){
String methodDescribe = getMethodDescribe("findDevByUserId");
List<String> list = csDeviceUserPOService.findDevByUserId(id);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/channelDevByUserId")
@ApiOperation("根据用户Id解绑设备集合")
@ApiImplicitParam(name = "param", value = "参数", required = true)
public HttpResult<List<String>> channelDevByUserId(@RequestBody UserDevParam param){
String methodDescribe = getMethodDescribe("channelDevByUserId");
csDeviceUserPOService.channelDevByUserId(param);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
}

View File

@@ -405,4 +405,13 @@ public class EquipmentDeliveryController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getRunPortableDev")
@ApiOperation("获取在运的便携式设备")
public HttpResult<List<CsEquipmentDeliveryPO>> getRunPortableDev(){
String methodDescribe = getMethodDescribe("getRunPortableDev");
List<CsEquipmentDeliveryPO> result = csEquipmentDeliveryService.getRunPortableDev();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
}

View File

@@ -165,5 +165,25 @@ public class CsLedgerController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getInfoByIds")
@ApiOperation("根据设备集合查询工程,设备信息")
@ApiImplicitParam(name = "list", value = "查询条件", required = true)
public HttpResult<List<DevDetailDTO>> getInfoByIds(@RequestBody @Validated List<String> list){
String methodDescribe = getMethodDescribe("getInfoByIds");
List<DevDetailDTO> details = csLedgerService.getInfoByIds(list);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, details, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getDevInfoByEngineerIds")
@ApiOperation("根据工程获取设备信息")
@ApiImplicitParam(name = "list", value = "查询条件", required = true)
public HttpResult<List<DevDetailDTO>> getDevInfoByEngineerIds(@RequestBody @Validated List<String> list){
String methodDescribe = getMethodDescribe("getDevInfoByEngineerIds");
List<DevDetailDTO> details = csLedgerService.getDevInfoByEngineerIds(list);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, details, methodDescribe);
}
}

View File

@@ -93,7 +93,7 @@
from
cs_equipment_delivery
<where>
1=1
dev_access_method = 'MQTT'
<if test="queryParam.process != null and queryParam.process !=''">
and process = #{queryParam.process}
</if>

View File

@@ -1,6 +1,7 @@
package com.njcn.csdevice.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.csdevice.pojo.param.UserDevParam;
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
import com.njcn.csdevice.pojo.vo.DevCountVO;
import com.njcn.csdevice.pojo.vo.DevUserVO;
@@ -48,4 +49,8 @@ public interface CsDeviceUserPOService extends IService<CsDeviceUserPO>{
* @return
*/
List<String> findUserById(String devId);
List<String> findDevByUserId(String userId);
void channelDevByUserId(UserDevParam param);
}

View File

@@ -193,4 +193,6 @@ public interface CsEquipmentDeliveryService extends IService<CsEquipmentDelivery
List<CsEquipmentDeliveryPO> getListByIds(List<String> devList);
List<CsEquipmentDeliveryPO> getRunPortableDev();
}

View File

@@ -85,4 +85,8 @@ public interface ICsLedgerService extends IService<CsLedger> {
List<CsLedgerVO> getProAndEngineer(List<String> id);
CsLedgerVO cldTree();
List<DevDetailDTO> getInfoByIds(List<String> list);
List<DevDetailDTO> getDevInfoByEngineerIds(List<String> list);
}

View File

@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONArray;
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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.common.pojo.exception.BusinessException;
@@ -12,6 +11,7 @@ import com.njcn.csdevice.enums.AlgorithmResponseEnum;
import com.njcn.csdevice.mapper.CsDeviceUserPOMapper;
import com.njcn.csdevice.mapper.CsEquipmentDeliveryMapper;
import com.njcn.csdevice.mapper.CsMarketDataMapper;
import com.njcn.csdevice.pojo.param.UserDevParam;
import com.njcn.csdevice.pojo.po.*;
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
import com.njcn.csdevice.pojo.vo.DevCountVO;
@@ -51,22 +51,17 @@ import static java.util.Objects.isNull;
@Service
@RequiredArgsConstructor
public class CsDeviceUserPOServiceImpl extends ServiceImpl<CsDeviceUserPOMapper, CsDeviceUserPO> implements CsDeviceUserPOService{
private final CsDevModelRelationService csDevModelRelationService;
private final CsDevModelRelationService csDevModelRelationService;
private final ICsLedgerService iCsLedgerService;
// private final CsEquipmentAlarmFeignClient csEquipmentAlarmFeignClient;
private final CsEquipmentDeliveryMapper csEquipmentDeliveryMapper;
private final RoleEngineerDevService roleEngineerDevService;
private final AppLineTopologyDiagramService appLineTopologyDiagramService;
private final CsTouristDataPOService csTouristDataPOService;
private final CsLinePOService csLinePOService;
private final CsMarketDataMapper csMarketDataMapper;
private final EventUserFeignClient eventUserFeignClient;
private final UserFeignClient userFeignClient;
private final FeedBackFeignClient feedBackFeignClient;
private final IMqttUserService mqttUserService;
@@ -407,4 +402,22 @@ public class CsDeviceUserPOServiceImpl extends ServiceImpl<CsDeviceUserPOMapper,
}
return result;
}
@Override
public List<String> findDevByUserId(String userId) {
List<String> result = new ArrayList<>();
List<CsDeviceUserPO> list = this.lambdaQuery().eq(CsDeviceUserPO::getPrimaryUserId,userId).list();
if (CollectionUtil.isNotEmpty(list)){
result = list.stream().map(CsDeviceUserPO::getDeviceId).collect(Collectors.toList());
}
return result;
}
@Override
public void channelDevByUserId(UserDevParam param) {
LambdaQueryWrapper<CsDeviceUserPO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CsDeviceUserPO::getPrimaryUserId,param.getUserId())
.in(CsDeviceUserPO::getDeviceId,param.getList());
this.remove(queryWrapper);
}
}

View File

@@ -48,6 +48,7 @@ import com.njcn.system.enums.DicDataEnum;
import com.njcn.system.enums.DicDataTypeEnum;
import com.njcn.system.enums.DicTreeEnum;
import com.njcn.system.pojo.po.SysDicTreePO;
import com.njcn.system.pojo.vo.DictTreeVO;
import com.njcn.user.enums.AppRoleEnum;
import com.njcn.web.utils.RequestUtil;
import lombok.RequiredArgsConstructor;
@@ -985,6 +986,20 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
return this.lambdaQuery().in(CsEquipmentDeliveryPO::getId,devList).list();
}
@Override
public List<CsEquipmentDeliveryPO> getRunPortableDev() {
List<CsEquipmentDeliveryPO> result = new ArrayList<>();
DictTreeVO vo = dictTreeFeignClient.queryByCode(DicDataEnum.PORTABLE.getCode()).getData();
if (ObjectUtil.isNotNull(vo)) {
LambdaQueryWrapper<CsEquipmentDeliveryPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(CsEquipmentDeliveryPO::getDevType,vo.getId())
.ne(CsEquipmentDeliveryPO::getRunStatus,0)
.eq(CsEquipmentDeliveryPO::getUsageStatus,1);
result = this.list(lambdaQueryWrapper);
}
return result;
}
//根据前置机id获取装置数量
public List<CsEquipmentDeliveryPO> getListByNodeId(String nodeId) {
LambdaQueryWrapper<CsEquipmentDeliveryPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();

View File

@@ -4,10 +4,12 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.csdevice.constant.DataParam;
import com.njcn.csdevice.controller.project.EngineeringController;
import com.njcn.csdevice.enums.LineBaseEnum;
import com.njcn.csdevice.mapper.*;
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
@@ -22,6 +24,8 @@ import com.njcn.system.api.DictTreeFeignClient;
import com.njcn.system.enums.DicDataEnum;
import com.njcn.system.pojo.po.Area;
import com.njcn.system.pojo.vo.DictTreeVO;
import com.njcn.user.enums.AppRoleEnum;
import com.njcn.web.utils.RequestUtil;
import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -53,6 +57,8 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
private final CsEquipmentDeliveryMapper csEquipmentDeliveryMapper;
private final ICsDataSetService csDataSetService;
private final DictTreeFeignClient dictTreeFeignClient;
private final EngineeringController engineeringController;
private final CsDeviceUserPOMapper csDeviceUserPOMapper;
@Override
public List<CsLedgerVO> getLedgerTree() {
@@ -190,10 +196,29 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
portable.setName(DataParam.portableDev);
portable.setPid("0");
portable.setId(IdUtil.simpleUUID());
//针对未启用的装置判断
List<CsLedgerVO> ledger = allList.stream()
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
.collect(Collectors.toList());
//根据当前用户获取便携式设备
List<CsLedgerVO> ledger;
String role = RequestUtil.getUserRole();
List<String> roles = JSONArray.parseArray(role, String.class);
if(roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode())){
ledger = allList.stream()
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
.collect(Collectors.toList());
} else {
LambdaQueryWrapper<CsDeviceUserPO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CsDeviceUserPO::getPrimaryUserId,RequestUtil.getUserIndex());
List<CsDeviceUserPO> list1 = csDeviceUserPOMapper.selectList(queryWrapper);
List<String> result = new ArrayList<>();
if (CollectionUtil.isNotEmpty(list1)){
result = list1.stream().map(CsDeviceUserPO::getDeviceId).collect(Collectors.toList());
}
//针对未启用的装置判断
List<String> finalResult = result;
ledger = allList.stream()
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0") && finalResult.contains(item.getId()))
.collect(Collectors.toList());
}
Map<String, CsEquipmentDeliveryPO> poMap2 = ledger.stream()
.collect(Collectors.toMap(
CsLedgerVO::getId,
@@ -376,10 +401,28 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
portable.setPid("0");
portable.setId(IdUtil.simpleUUID());
//针对未启用的装置判断
List<CsLedgerVO> ledger = allList.stream()
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
.collect(Collectors.toList());
List<CsLedgerVO> ledger;
String role = RequestUtil.getUserRole();
List<String> roles = JSONArray.parseArray(role, String.class);
if(roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode())){
ledger = allList.stream()
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
.collect(Collectors.toList());
} else {
LambdaQueryWrapper<CsDeviceUserPO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CsDeviceUserPO::getPrimaryUserId,RequestUtil.getUserIndex());
List<CsDeviceUserPO> list1 = csDeviceUserPOMapper.selectList(queryWrapper);
List<String> result = new ArrayList<>();
if (CollectionUtil.isNotEmpty(list1)){
result = list1.stream().map(CsDeviceUserPO::getDeviceId).collect(Collectors.toList());
}
//针对未启用的装置判断
List<String> finalResult = result;
ledger = allList.stream()
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0") && finalResult.contains(item.getId()))
.collect(Collectors.toList());
}
Map<String, CsEquipmentDeliveryPO> poMap2 = ledger.stream()
.collect(Collectors.toMap(
CsLedgerVO::getId,
@@ -743,6 +786,57 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
return government;
}
@Override
public List<DevDetailDTO> getInfoByIds(List<String> list) {
List<DevDetailDTO> details = new ArrayList<>();
List<CsLedger> ledgers = this.listByIds(list);
Set<String> enginingeringIds = new HashSet<>();
ledgers.forEach(item->{
DevDetailDTO device = new DevDetailDTO();
if(Objects.equals(item.getPid(),"0")){
device.setEquipmentName(item.getName());
device.setEquipmentId(item.getId());
device.setProjectId("/");
device.setProjectName("/");
device.setEngineeringid("/");
device.setEngineeringName("/");
details.add(device);
} else {
enginingeringIds.add(item.getPids().split(",")[1]);
}
});
if (CollectionUtil.isNotEmpty(enginingeringIds)) {
List<CsLedger> engineer = this.listByIds(enginingeringIds);
engineer.forEach(item->{
DevDetailDTO detail = new DevDetailDTO();
detail.setEngineeringid(item.getId());
detail.setEngineeringName(item.getName());
details.add(detail);
});
}
return details;
}
@Override
public List<DevDetailDTO> getDevInfoByEngineerIds(List<String> list) {
List<DevDetailDTO> details = new ArrayList<>();
LambdaQueryWrapper<CsLedger> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(CsLedger::getPid, list);
List<CsLedger> project = this.list(queryWrapper);
//工程id
List<String> projectIds = project.stream().map(CsLedger::getId).collect(Collectors.toList());
LambdaQueryWrapper<CsLedger> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.in(CsLedger::getPid, projectIds);
List<CsLedger> dev = this.list(queryWrapper2);
dev.forEach(item->{
DevDetailDTO detail = new DevDetailDTO();
detail.setEquipmentName(item.getName());
detail.setEquipmentId(item.getId());
details.add(detail);
});
return details;
}
/**
* 获取子节点
*/

View File

@@ -11,6 +11,7 @@ import com.alibaba.csp.sentinel.util.StringUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.njcn.access.utils.ChannelObjectUtil;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.csdevice.mapper.OverlimitMapper;
import com.njcn.csdevice.param.IcdBzParam;
import com.njcn.csdevice.param.IcdLedgerParam;
import com.njcn.csdevice.param.IcdParam;
@@ -23,6 +24,8 @@ import com.njcn.csdevice.pojo.vo.DeviceInfo;
import com.njcn.csdevice.service.*;
import com.njcn.csharmonic.api.EventFeignClient;
import com.njcn.csharmonic.pojo.po.CsEventPO;
import com.njcn.device.biz.pojo.po.Overlimit;
import com.njcn.device.biz.utils.COverlimitUtil;
import com.njcn.mq.message.BZEventMessage;
import com.njcn.mq.template.BZEventMessageTemplate;
import com.njcn.redis.pojo.enums.AppRedisKey;
@@ -58,6 +61,7 @@ class IcdServiceImpl implements IcdService {
private final EventFeignClient eventFeignClient;
private final ICsTerminalLogsService csTerminalLogsService;
private final ICsTerminalReplyService csTerminalReplyService;
private final OverlimitMapper overlimitMapper;
private final DateTimeFormatter microsecondFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSS");
@Override
@@ -123,7 +127,6 @@ class IcdServiceImpl implements IcdService {
}
@Override
@Transactional(rollbackFor = Exception.class)
public void addLedgerInfo(IcdLedgerParam param) {
// 第一种:全流程创建
if (isAllIndicesNull(param)) {
@@ -579,7 +582,8 @@ class IcdServiceImpl implements IcdService {
&& ObjectUtil.isNull(param.getDevIndex());
}
private void handleFullProcessCreation(@NotNull IcdLedgerParam param) {
@Transactional(rollbackFor = Exception.class)
public void handleFullProcessCreation(@NotNull IcdLedgerParam param) {
if (ObjectUtil.isNotNull(param.getEngineering())) {
CsEngineeringPO po1 = csEngineeringService.addEngineering(param.getEngineering());
param.setEngineeringIndex(po1.getId());
@@ -587,15 +591,18 @@ class IcdServiceImpl implements IcdService {
}
}
private void handleFromEngineeringCreation(IcdLedgerParam param) {
@Transactional(rollbackFor = Exception.class)
public void handleFromEngineeringCreation(IcdLedgerParam param) {
createProjectAndDevices(param);
}
private void handleFromProjectCreation(IcdLedgerParam param) {
@Transactional(rollbackFor = Exception.class)
public void handleFromProjectCreation(IcdLedgerParam param) {
saveDevicesAndLines(param);
}
private void handleFromDeviceCreation(IcdLedgerParam param) {
@Transactional(rollbackFor = Exception.class)
public void handleFromDeviceCreation(IcdLedgerParam param) {
saveLines(param);
}
@@ -628,8 +635,8 @@ class IcdServiceImpl implements IcdService {
saveLines(param);
}
private void saveLines(IcdLedgerParam param) {
List<CsLinePO> list = new ArrayList<>();
@Transactional(rollbackFor = Exception.class)
public void saveLines(IcdLedgerParam param) {
List<CsLineParam> lineList = param.getLine();
if (CollectionUtil.isNotEmpty(lineList)) {
boolean result = checkAndAlertDuplicates(lineList);
@@ -651,7 +658,10 @@ class IcdServiceImpl implements IcdService {
line.setDevId(param.getDevIndex());
}
CsLinePO po = csLinePOService.addCldLine(line);
list.add(po);
//新增监测点限值
Overlimit overlimit = COverlimitUtil.globalAssemble(line.getVolGrade().floatValue(), line.getProtocolCapacity().floatValue(),line.getDevCapacity().floatValue(),line.getShortCircuitCapacity().floatValue(),0,0);
overlimit.setId(po.getLineId());
overlimitMapper.insert(overlimit);
}
//新增台账日志

View File

@@ -61,26 +61,24 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
});
List<CsDeviceUserPO> csDeviceUserPOS = csDeviceUserPOMapper.selectList(csDeviceUserPOQueryWrapper);
List<String> collect1 = csDeviceUserPOS.stream().map(CsDeviceUserPO::getDeviceId).distinct().collect(Collectors.toList());
if(CollectionUtils.isEmpty(collect1)){
return collect;
}else{
csLedgerQueryWrapper.in("id",collect1).eq("level",2);
if (!CollectionUtils.isEmpty(collect1)) {
csLedgerQueryWrapper.in("id", collect1).eq("level", 2);
List<CsLedger> csLedgers = csLedgerMapper.selectList(csLedgerQueryWrapper);
List<String> collect2 = csLedgers.stream().map(CsLedger::getPid).distinct().collect(Collectors.toList());
csLedgerQueryWrapper.clear();
if(CollectionUtils.isEmpty(collect2)){
if (CollectionUtils.isEmpty(collect2)) {
return collect;
}
csLedgerQueryWrapper.in("id",collect2).eq("level",1);
csLedgerQueryWrapper.in("id", collect2).eq("level", 1);
csLedgers = csLedgerMapper.selectList(csLedgerQueryWrapper);
List<String> collect3 = csLedgers.stream().map(CsLedger::getPid).distinct().collect(Collectors.toList());
if(CollectionUtils.isEmpty(collect3)){
return collect;
if (CollectionUtils.isEmpty(collect3)) {
return collect;
}
collect.addAll(collect3);
collect = collect.stream().distinct().collect(Collectors.toList());
return collect;
}
return collect;
} else if ( Objects.equals(role,AppRoleEnum.MARKET_USER.getCode())||
Objects.equals(role, AppRoleEnum.ENGINEERING_USER.getCode())) {
@@ -94,7 +92,9 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
List<CsTouristDataPO> csTouristDataPOS = csTouristDataPOMapper.selectList(null);
collect = csTouristDataPOS.stream().map(CsTouristDataPO::getEnginerId).distinct().collect(Collectors.toList());
} else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode())||Objects.equals(role,"bxs_user")){
}
// ||Objects.equals(role,"bxs_user")
else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode())){
List<CsEngineeringPO> csEngineeringPOS = csEngineeringMapper.selectList(null);
collect =csEngineeringPOS.stream().filter(temp->Objects.equals(temp.getStatus(),"1")).map(CsEngineeringPO::getId).collect(Collectors.toList());
}
@@ -196,7 +196,9 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
List<CsTouristDataPO> csTouristDataPOS = csTouristDataPOMapper.selectList(null);
collect = csTouristDataPOS.stream().map(CsTouristDataPO::getDeviceId).distinct().collect(Collectors.toList());
}else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode())||Objects.equals(role,"bxs_user")){
}
// ||Objects.equals(role,"bxs_user")
else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode())){
csLedgerQueryWrapper.clear();
csLedgerQueryWrapper.eq("level",2).eq("state",1);
List<CsLedger> csLedgers = csLedgerMapper.selectList(csLedgerQueryWrapper);