Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -231,22 +231,6 @@ public class LineWarningServiceImpl extends MppServiceImpl<LineWarningMapper, Li
|
||||
});
|
||||
}
|
||||
|
||||
// //将装置无数据的统计入库 按运维要求,判断装置的最新数据不是当天,则认为装置无数据
|
||||
// List<LineDetailVO.noDataLineInfo> noDataLineInfo = lineFeignClient.getNoDataLine().getData();
|
||||
// if (CollUtil.isNotEmpty(noDataLineInfo)) {
|
||||
// LambdaQueryWrapper<LineWarning> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
// lambdaQueryWrapper.eq(LineWarning::getTargetType, "0").eq(LineWarning::getAlarmTime, date);
|
||||
// this.baseMapper.delete(lambdaQueryWrapper);
|
||||
// noDataLineInfo.forEach(item -> {
|
||||
// String deptId = Objects.isNull(deptLineMap.get(item.getLineId())) ? null : deptLineMap.get(item.getLineId()).get(0).getId();
|
||||
// LineWarning lineWarning = new LineWarning();
|
||||
// lineWarning.setAlarmTime(firstDayOfMonth);
|
||||
// lineWarning.setDeptId(deptId);
|
||||
// lineWarning.setLineId(item.getLineId());
|
||||
// lineWarning.setTargetType("0");
|
||||
// result.add(lineWarning);
|
||||
// });
|
||||
// }
|
||||
this.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,12 @@ public class PqDashboardPageParam {
|
||||
@ApiModelProperty("图标")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 页面名称
|
||||
*/
|
||||
@ApiModelProperty("用户id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.system.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
@@ -50,6 +51,12 @@ public class PqDashboardPageVO extends BaseEntity {
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField(value = "user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 0未激活,1激活
|
||||
*/
|
||||
|
||||
@@ -89,6 +89,16 @@ public class PqDashboardPageController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("/scopePage")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("全局的驾驶舱页面")
|
||||
public HttpResult<Boolean> scopePage(@RequestParam("id") String id,@RequestParam("userId") String userId){
|
||||
log.info("全局的驾驶舱页面");
|
||||
String methodDescribe = getMethodDescribe("scopePage");
|
||||
Boolean result = pqDashboardPageService.scopePage(id,userId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("/queryActivatePage")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("查询激活的驾驶舱页面")
|
||||
|
||||
@@ -33,4 +33,6 @@ public interface PqDashboardPageService extends IService<PqDashboardPage> {
|
||||
PqDashboardPageVO queryByPagePath(String pagePath);
|
||||
|
||||
List<PqDashboardPage> getDashboardPageByUserId(String id,boolean state);
|
||||
|
||||
Boolean scopePage(String id, String userId);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PqDashboardPageServiceImpl extends ServiceImpl<PqDashboardPageMappe
|
||||
BeanUtils.copyProperties(pqDashboardPageParam,pqDashboardPage);
|
||||
//根据前端传递状态赋值
|
||||
//pqDashboardPage.setState(0);
|
||||
pqDashboardPage.setUserId(RequestUtil.getUserIndex());
|
||||
// pqDashboardPage.setUserId(RequestUtil.getUserIndex());
|
||||
this.save(pqDashboardPage);
|
||||
return true;
|
||||
}
|
||||
@@ -74,6 +74,7 @@ public class PqDashboardPageServiceImpl extends ServiceImpl<PqDashboardPageMappe
|
||||
if(Objects.nonNull(param.getPageName())){
|
||||
queryWrapper.like("A.page_name",param.getPageName());
|
||||
}
|
||||
queryWrapper.orderByAsc("A.sort");
|
||||
return this.baseMapper.page(new Page<>(PageFactory.getPageNum(param), PageFactory.getPageSize(param)), queryWrapper);
|
||||
}
|
||||
|
||||
@@ -82,6 +83,11 @@ public class PqDashboardPageServiceImpl extends ServiceImpl<PqDashboardPageMappe
|
||||
return this.lambdaUpdate().set(PqDashboardPage::getState,state).eq(PqDashboardPage::getId,id).update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean scopePage(String id, String userId) {
|
||||
return this.lambdaUpdate().set(PqDashboardPage::getUserId,userId).eq(PqDashboardPage::getId,id).update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PqDashboardPageVO queryByPagePath(String pagePath) {
|
||||
List<String> userList = Arrays.asList("0",RequestUtil.getUserIndex());
|
||||
@@ -108,6 +114,8 @@ public class PqDashboardPageServiceImpl extends ServiceImpl<PqDashboardPageMappe
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 校验参数,检查是否存在相同编码的字典类型
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,8 @@ public enum AppRoleEnum {
|
||||
BXS_USER("bxs_user","便携式正式用户"),
|
||||
ROOT("root","超级管理员"),
|
||||
OPERATION_MANAGER("operation_manager","运维管理员"),
|
||||
REGULAR_USER_8000("regular_user_8000","正式用户综合电能质量"),
|
||||
REGULAR_USER("regular_user","正式用户物联云平台")
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
@@ -490,7 +490,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
||||
List<UserVO> users = new ArrayList<>();
|
||||
Role roleByCode1 = roleService.getRoleByCode(AppRoleEnum.APP_VIP_USER.getCode());
|
||||
Role roleByCode2 = roleService.getRoleByCode(AppRoleEnum.BXS_USER.getCode());
|
||||
List<UserRole> userRoles = userRoleMapper.selectUserRole(Stream.of(roleByCode1.getId(),roleByCode2.getId()).collect(Collectors.toList()));
|
||||
Role roleByCode3 = roleService.getRoleByCode(AppRoleEnum.REGULAR_USER_8000.getCode());
|
||||
Role roleByCode4 = roleService.getRoleByCode(AppRoleEnum.REGULAR_USER.getCode());
|
||||
List<UserRole> userRoles = userRoleMapper.selectUserRole(
|
||||
Stream.of(roleByCode1.getId()
|
||||
,roleByCode2.getId()
|
||||
,roleByCode3.getId()
|
||||
,roleByCode4.getId()
|
||||
).collect(Collectors.toList()));
|
||||
List<String> collect = userRoles.stream().map(UserRole::getUserId).distinct().collect(Collectors.toList());
|
||||
List<User> users1 = this.listByIds(collect);
|
||||
if (CollectionUtil.isNotEmpty(users1)) {
|
||||
|
||||
Reference in New Issue
Block a user