Merge branch 'master' of http://192.168.1.22:3000/root/pqs
This commit is contained in:
@@ -137,7 +137,7 @@ public class PqTypicalSourceCreatePOServiceImpl extends ServiceImpl<PqTypicalSou
|
||||
.eq(PqTypicalSourceCreatePO::getComputeDate,uploadParam.getTime())
|
||||
.in(PqTypicalSourceCreatePO::getId,uploadParam.getList())
|
||||
.isNotNull(PqTypicalSourceCreatePO::getComputeDate)
|
||||
.in(PqTypicalSourceCreatePO::getStatisticalLevel,Stream.of("3","4").collect(Collectors.toList()))
|
||||
.in(PqTypicalSourceCreatePO::getStatisticalLevel,Stream.of("3","4","5").collect(Collectors.toList()))
|
||||
.list();
|
||||
}
|
||||
//未指定数据上送,则将所有未上送的数据,上送上去
|
||||
@@ -145,7 +145,7 @@ public class PqTypicalSourceCreatePOServiceImpl extends ServiceImpl<PqTypicalSou
|
||||
list = this.lambdaQuery()
|
||||
.eq(PqTypicalSourceCreatePO::getComputeDate,uploadParam.getTime())
|
||||
.isNotNull(PqTypicalSourceCreatePO::getComputeDate)
|
||||
.in(PqTypicalSourceCreatePO::getStatisticalLevel, Stream.of("3","4").collect(Collectors.toList()))
|
||||
.in(PqTypicalSourceCreatePO::getStatisticalLevel, Stream.of("3","4","5").collect(Collectors.toList()))
|
||||
.list();
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ public class PointStatisticalDataServiceImpl extends ServiceImpl<RUploadPointSta
|
||||
else {
|
||||
list = this.lambdaQuery()
|
||||
.eq(RUploadPointStatisticalDataD::getComputeDate,param.getTime())
|
||||
.in(RUploadPointStatisticalDataD::getStatisticalLevel, Stream.of("3","4").collect(Collectors.toList()))
|
||||
.in(RUploadPointStatisticalDataD::getStatisticalLevel, Stream.of("3","4","5").collect(Collectors.toList()))
|
||||
.list();
|
||||
}
|
||||
|
||||
|
||||
@@ -130,11 +130,11 @@ public class REvaluationDataServiceImpl extends ServiceImpl<RUploadEvaluationDat
|
||||
.in(RUploadEvaluationDataD::getId, param.getList())
|
||||
.list();
|
||||
}
|
||||
//未指定数据上送,则上送省级数据(包含日、月数据)
|
||||
//未指定数据上送,则上送省市县级数据(包含日、月数据)
|
||||
else {
|
||||
list = this.lambdaQuery()
|
||||
.eq(RUploadEvaluationDataD::getComputeDate, param.getTime())
|
||||
.in(RUploadEvaluationDataD::getStatisticalLevel, Stream.of("3", "4").collect(Collectors.toList()))
|
||||
.in(RUploadEvaluationDataD::getStatisticalLevel, Stream.of("3", "4","5").collect(Collectors.toList()))
|
||||
.list();
|
||||
}
|
||||
|
||||
|
||||
@@ -82,9 +82,7 @@ public class RSubstationStatisticalDataServiceImpl extends ServiceImpl<RUploadSu
|
||||
else {
|
||||
list = this.lambdaQuery()
|
||||
.eq(RUploadSubstationStatisticalDataD::getStatisticalDate,param.getTime())
|
||||
//.eq(RUploadSubstationStatisticalDataD::getCityId,"")
|
||||
.isNotNull(RUploadSubstationStatisticalDataD::getComputeDate)
|
||||
.eq(RUploadSubstationStatisticalDataD::getCountyId,"")
|
||||
.list();
|
||||
}
|
||||
//以尺寸100分片
|
||||
|
||||
@@ -315,6 +315,7 @@ public class RUploadPointStatisticalDataDServiceImpl extends MppServiceImpl<RUpl
|
||||
List<RUploadPointStatisticalDataD> resultPO = new ArrayList<>();
|
||||
pmsRunStatisticMap.forEach((deptId,item)->{
|
||||
PvTerminalTreeVO dept = deptMap.get(deptId);
|
||||
|
||||
//跳过全国这个单位
|
||||
if (Objects.equals(Integer.parseInt(UploadEnum.NJCN_DEPT_LEVEL_1.getCode()), dept.getLevel())) {
|
||||
return;
|
||||
@@ -322,7 +323,13 @@ public class RUploadPointStatisticalDataDServiceImpl extends MppServiceImpl<RUpl
|
||||
List<String> runMonitorIds = Arrays.stream(StrUtil.isNotBlank(item.getRunMonitorIds())?item.getRunMonitorIds().split(StrUtil.COMMA):new String[]{}).collect(toList());
|
||||
List<String> onlineMonitorIds = Arrays.stream(StrUtil.isNotBlank(item.getOnlineMonitorIds())?item.getOnlineMonitorIds().split(StrUtil.COMMA):new String[]{}).collect(toList());
|
||||
List<String> runDevIds = Arrays.stream(StrUtil.isNotBlank(item.getRunDevIds())?item.getRunDevIds().split(StrUtil.COMMA):new String[]{}).collect(toList());
|
||||
List<LineDTO> lineDTOList = commLineClient.getLineDetailBatch(onlineMonitorIds).getData();
|
||||
|
||||
List<LineDTO> lineDTOList;
|
||||
if(CollUtil.isNotEmpty(onlineMonitorIds)) {
|
||||
lineDTOList = commLineClient.getLineDetailBatch(onlineMonitorIds).getData();
|
||||
}else {
|
||||
lineDTOList = new ArrayList<>();
|
||||
}
|
||||
|
||||
List<RStatIntegrityD> deptRStatIntegrityDList = rStatIntegrityDList.stream().filter(it->runMonitorIds.contains(it.getLineIndex())).collect(toList());
|
||||
|
||||
@@ -461,7 +468,12 @@ public class RUploadPointStatisticalDataDServiceImpl extends MppServiceImpl<RUpl
|
||||
List<String> runMonitorIds = Arrays.stream(StrUtil.isNotBlank(item.getRunMonitorIds())?item.getRunMonitorIds().split(StrUtil.COMMA):new String[]{}).collect(toList());
|
||||
List<String> onlineMonitorIds = Arrays.stream(StrUtil.isNotBlank(item.getOnlineMonitorIds())?item.getOnlineMonitorIds().split(StrUtil.COMMA):new String[]{}).collect(toList());
|
||||
List<String> runDevIds = Arrays.stream(StrUtil.isNotBlank(item.getRunDevIds())?item.getRunDevIds().split(StrUtil.COMMA):new String[]{}).collect(toList());
|
||||
List<LineDTO> lineDTOList = commLineClient.getLineDetailBatch(onlineMonitorIds).getData();
|
||||
List<LineDTO> lineDTOList;
|
||||
if(CollUtil.isNotEmpty(onlineMonitorIds)) {
|
||||
lineDTOList = commLineClient.getLineDetailBatch(onlineMonitorIds).getData();
|
||||
}else {
|
||||
lineDTOList = new ArrayList<>();
|
||||
}
|
||||
|
||||
List<RStatIntegrityD> deptRStatIntegrityDList = rStatIntegrityDList.stream().filter(it->runMonitorIds.contains(it.getLineIndex())).collect(toList());
|
||||
int due = deptRStatIntegrityDList.stream().mapToInt(RStatIntegrityD::getDueTime).sum();
|
||||
|
||||
@@ -284,12 +284,6 @@ public class SupvReportM {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 各类型本年监督数量
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer planYearCountNum;
|
||||
|
||||
/**
|
||||
|
||||
@@ -154,6 +154,8 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
//供电电压本月前统计
|
||||
List<ProcessPublicDTO> processPublicDTODianYaListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTODianYaListAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTODianYaYearPlan = this.baseMapper.statisticPlanReportYear(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
|
||||
|
||||
|
||||
//供电电压问题数量
|
||||
List<ProcessPublicDTO> processPublicDTODianYaGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
|
||||
@@ -196,7 +198,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
if(deptGetBase.getDeptLevel() !=2 && deptGetBase.getDeptLevel() !=3 && deptGetBase.getDeptLevel() !=4){
|
||||
continue;
|
||||
}
|
||||
//月累计监督数量
|
||||
Integer all = 0;
|
||||
Integer yearAll = 0;
|
||||
SupvReportM supvReportM = new SupvReportM();
|
||||
supvReportM.setStatisticsDate(timeId.with(TemporalAdjusters.firstDayOfMonth()));
|
||||
supvReportM.setStatisticsDept(deptGetBase.getUnitId());
|
||||
@@ -204,66 +208,64 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
List<String> childrenDeptList = deptGetBase.getUnitChildrenList();
|
||||
if(CollUtil.isNotEmpty(childrenDeptList)){
|
||||
supvReportM.setConvertMonthSupvNum(dealData(childrenDeptList,processPublicDTOListM));
|
||||
|
||||
|
||||
supvReportM.setConvertYearSupvNum(dealData(childrenDeptList,processPublicDTOListY));
|
||||
yearAll+=supvReportM.getConvertYearSupvNum();
|
||||
|
||||
Integer a = dealData(childrenDeptList,processPublicDTOListAll);
|
||||
supvReportM.setConvertTotalSupvNum(a);
|
||||
all+=a;
|
||||
supvReportM.setConvertTotalSupvNum(dealData(childrenDeptList,processPublicDTOListAll));
|
||||
all+=supvReportM.getConvertTotalSupvNum();
|
||||
supvReportM.setEnergyMonthSupvNum(dealData(childrenDeptList,processPublicDTOListNewM));
|
||||
supvReportM.setEnergyYearSupvNum(dealData(childrenDeptList,processPublicDTOListNewY));
|
||||
|
||||
Integer b = dealData(childrenDeptList,processPublicDTOListNewAll);
|
||||
supvReportM.setEnergyTotalSupvNum(b);
|
||||
all+=b;
|
||||
|
||||
supvReportM.setEnergyYearSupvNum(dealData(childrenDeptList,processPublicDTOListNewY));
|
||||
yearAll+=supvReportM.getEnergyYearSupvNum();
|
||||
|
||||
|
||||
supvReportM.setEnergyTotalSupvNum(dealData(childrenDeptList,processPublicDTOListNewAll));
|
||||
all+=supvReportM.getEnergyTotalSupvNum();
|
||||
|
||||
|
||||
supvReportM.setEnergyMonthSupvNewNum(dealData(childrenDeptList,processPublicDTOListNewZM));
|
||||
supvReportM.setEnergyYearSupvNewNum(dealData(childrenDeptList,processPublicDTOListNewZY));
|
||||
yearAll+=supvReportM.getEnergyYearSupvNewNum();
|
||||
supvReportM.setEnergyTotalSupvNewNum(dealData(childrenDeptList,processPublicDTOListNewZAll));
|
||||
|
||||
|
||||
|
||||
supvReportM.setConvertMonthQuesNum(dealData(childrenDeptList,processPublicDTOQesM));
|
||||
supvReportM.setConvertTotalQuesNum(dealData(childrenDeptList,processPublicDTOQesAll));
|
||||
|
||||
supvReportM.setConvertMonthReformNum(dealData(childrenDeptList,processPublicDTOQesYesM));
|
||||
supvReportM.setConvertTotalReformNum(dealData(childrenDeptList,processPublicDTOQesYesAll));
|
||||
|
||||
supvReportM.setEnergyMonthQuesNum(dealData(childrenDeptList,processPublicDTOQesNewM));
|
||||
supvReportM.setEnergyTotalQuesNum(dealData(childrenDeptList,processPublicDTOQesNewAll));
|
||||
|
||||
supvReportM.setEnergyMonthReformNum(dealData(childrenDeptList,processPublicDTOQesNewYesM));
|
||||
supvReportM.setEnergyTotalReformNum(dealData(childrenDeptList,processPublicDTOQesNewYesAll));
|
||||
|
||||
supvReportM.setEnergyMonthQuesNewNum(dealData(childrenDeptList,processPublicDTOQesNewGaiM));
|
||||
supvReportM.setEnergyTotalQuesNewNum(dealData(childrenDeptList,processPublicDTOQesNewGaiAll));
|
||||
|
||||
supvReportM.setEnergyMonthReformNewNum(dealData(childrenDeptList,processPublicDTOQesNewGaiYesM));
|
||||
supvReportM.setEnergyTotalReformNewNum(dealData(childrenDeptList,processPublicDTOQesNewGaiYesAll));
|
||||
|
||||
//敏感用户
|
||||
supvReportM.setSensitiveMonthSupvNum(dealData(childrenDeptList,processPublicDTOMingGanM));
|
||||
supvReportM.setSensitiveYearSupvNum(dealData(childrenDeptList,processPublicDTOMingGanY));
|
||||
|
||||
Integer c = dealData(childrenDeptList,processPublicDTOMingGanAll);
|
||||
supvReportM.setSensitiveTotalSupvNum(c);
|
||||
all+=c;
|
||||
|
||||
yearAll+=supvReportM.getSensitiveYearSupvNum();
|
||||
supvReportM.setSensitiveTotalSupvNum(dealData(childrenDeptList,processPublicDTOMingGanAll));
|
||||
all+=supvReportM.getSensitiveTotalSupvNum();
|
||||
supvReportM.setSensitiveMonthQuesNum(dealData(childrenDeptList,processPublicDTOQesMingGanM));
|
||||
supvReportM.setSensitiveTotalQuesNum(dealData(childrenDeptList,processPublicDTOQesMingGanAll));
|
||||
|
||||
supvReportM.setSensitiveMonthReformNum(dealData(childrenDeptList,processPublicDTOQesMingGanYesM));
|
||||
supvReportM.setSensitiveTotalReformNum(dealData(childrenDeptList,processPublicDTOQesMingGanYesAll));
|
||||
|
||||
//电压
|
||||
supvReportM.setPowerMonthPlanNum(dealData(childrenDeptList,processPublicDTODianYaListM));
|
||||
Integer d = dealData(childrenDeptList,processPublicDTODianYaListAll);
|
||||
supvReportM.setPowerMonthConductedNum(d);
|
||||
|
||||
supvReportM.setPowerMonthConductedNum(dealData(childrenDeptList,processPublicDTODianYaListAll));
|
||||
all+=supvReportM.getPowerMonthConductedNum();
|
||||
Integer dd = dealData(childrenDeptList,processPublicDTODianYaYearPlan);
|
||||
yearAll+=dd;
|
||||
supvReportM.setPowerMonthQuesNum(dealData(childrenDeptList,processPublicDTODianYaGanM));
|
||||
supvReportM.setPowerTotalQuesNum(dealData(childrenDeptList,processPublicDTODianYaGanAll));
|
||||
supvReportM.setPowerMonthReformNum(dealData(childrenDeptList,processPublicDTODianYaGanYesM));
|
||||
supvReportM.setPowerTotalReformNum(dealData(childrenDeptList,processPublicDTODianYaGanYesAll));
|
||||
all+=d;
|
||||
|
||||
|
||||
//电容器组
|
||||
supvReportM.setCapacitorYearSupvNum(dealData(childrenDeptList,processPublicYearDTOS));
|
||||
@@ -274,6 +276,7 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
supvReportM.setCapacitorMonthReformNum(dealData(childrenDeptList,processPublicDTOCapacitorGanYesM));
|
||||
supvReportM.setCapacitorTotalReformNum(dealData(childrenDeptList,processPublicDTOCapacitorYesAll));
|
||||
all+=supvReportM.getCapacitorTotalSupvNum();
|
||||
yearAll+=supvReportM.getCapacitorYearSupvNum();
|
||||
//评估报告
|
||||
supvReportM.setAppraisalReportYearSupvNum(dealData(childrenDeptList,processPublicYearDTOAppraisalS));
|
||||
supvReportM.setAppraisalReportMonthSupvNum(dealData(childrenDeptList,processPublicDTOAppraisalListM));
|
||||
@@ -283,7 +286,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
supvReportM.setAppraisalReportMonthReformNum(dealData(childrenDeptList,processPublicDTOAppraisalGanYesM));
|
||||
supvReportM.setAppraisalReportTotalReformNum(dealData(childrenDeptList,processPublicDTOAppraisalYesAll));
|
||||
all+=supvReportM.getAppraisalReportTotalSupvNum();
|
||||
yearAll+=supvReportM.getAppraisalReportYearSupvNum();
|
||||
|
||||
supvReportM.setPlanYearCountNum(yearAll);
|
||||
|
||||
}
|
||||
|
||||
@@ -351,13 +356,7 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
List<SupvReportM> records = page.getRecords();
|
||||
if(CollUtil.isNotEmpty(records)){
|
||||
for (SupvReportM record : records) {
|
||||
record.setPlanYearCountNum(record.getConvertYearSupvNum()+
|
||||
record.getEnergyYearSupvNum()+
|
||||
record.getEnergyYearSupvNewNum()+
|
||||
record.getSensitiveYearSupvNum()+
|
||||
record.getCapacitorYearSupvNum()+
|
||||
record.getAppraisalReportYearSupvNum()
|
||||
);
|
||||
|
||||
record.setPlanCountNum(record.getConvertTotalSupvNum()+
|
||||
record.getEnergyTotalSupvNum()+
|
||||
record.getEnergyTotalSupvNewNum()+
|
||||
|
||||
@@ -16,7 +16,7 @@ public enum SupervisionResponseEnum {
|
||||
* A00550 ~ A00649
|
||||
*/
|
||||
SUPERVISION_COMMON_ERROR("A00550","监督管理模块异常"),
|
||||
NO_POWER("A00550","很抱歉,该流程不是您创建的,没有权限操作!")
|
||||
NO_POWER("A00550","不能操作非自己创建的任务!")
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
@@ -44,6 +44,7 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{
|
||||
*/
|
||||
private String problemId;
|
||||
|
||||
|
||||
/**
|
||||
* 单子类型:1:预警单;2:告警单
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -163,7 +164,20 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
.eq("supervision_warning_leaflet.state",DataStateEnum.ENABLE.getCode())
|
||||
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.ALARM.getCode())
|
||||
.orderByDesc("supervision_warning_leaflet.Update_Time");
|
||||
return this.baseMapper.alarmPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
|
||||
Page<WarningLeafletVO> warningLeafletVOPage = this.baseMapper.alarmPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
|
||||
//目前仅知道现场测试超标会有附件
|
||||
List<WarningLeafletVO> records = warningLeafletVOPage.getRecords();
|
||||
if(CollectionUtil.isNotEmpty(records)){
|
||||
for (WarningLeafletVO record : records) {
|
||||
if(record.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode()) && StrUtil.isNotBlank(record.getProblemId())){
|
||||
//查询到现场测试超标附件地址
|
||||
SupervisionGeneralSurveyPlanPO generalSurveyPlanPO = supervisionGeneralSurveyPlanPOService.getById(record.getProblemId());
|
||||
record.setProblemPath(generalSurveyPlanPO.getFilePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return warningLeafletVOPage;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
|
||||
@Override
|
||||
public List<String> getCodeByList(List<String> list) {
|
||||
return this.lambdaQuery().in(Role::getId,list).list().stream().map(Role::getCode).distinct().collect(Collectors.toList());
|
||||
return this.lambdaQuery().in(Role::getId, list).list().stream().map(Role::getCode).distinct().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -115,10 +115,10 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
}
|
||||
}
|
||||
queryWrapper.ne("sys_role.state", DataStateEnum.DELETED.getCode());
|
||||
if (queryParam.getType().equals(0)){
|
||||
queryWrapper.in("sys_role.type", queryParam.getType(),1);
|
||||
}else if(queryParam.getType().equals(1)){
|
||||
queryWrapper.eq("sys_role.type",2);
|
||||
if (queryParam.getType().equals(0)) {
|
||||
queryWrapper.in("sys_role.type", queryParam.getType(), 1);
|
||||
} else if (queryParam.getType().equals(1)) {
|
||||
queryWrapper.eq("sys_role.type", 2);
|
||||
}
|
||||
//初始化分页数据
|
||||
return this.baseMapper.page(new Page<>(PageFactory.getPageNum(queryParam), PageFactory.getPageSize(queryParam)), queryWrapper);
|
||||
@@ -127,7 +127,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
@Override
|
||||
public List<Role> selectRoleDetail(Integer id) {
|
||||
List<Integer> role = new ArrayList<>();
|
||||
if (Objects.equals(id, RoleType.SUPER_ADMINISTRATOR)){
|
||||
if (Objects.equals(id, RoleType.SUPER_ADMINISTRATOR)) {
|
||||
role.add(RoleType.ADMINISTRATOR);
|
||||
} else {
|
||||
role.add(RoleType.USER);
|
||||
@@ -135,7 +135,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
}
|
||||
QueryWrapper<Role> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.ne("sys_role.state", DataStateEnum.DELETED.getCode());
|
||||
queryWrapper.in("sys_role.type",role).orderByAsc("sys_role.type");
|
||||
queryWrapper.in("sys_role.type", role).orderByAsc("sys_role.type");
|
||||
List<Role> roleVOList = this.baseMapper.selectList(queryWrapper);
|
||||
return roleVOList;
|
||||
}
|
||||
@@ -201,7 +201,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
|
||||
@Override
|
||||
public Role getRoleByCode(String code) {
|
||||
return this.lambdaQuery().eq(Role::getCode,code).eq(Role::getState,1).one();
|
||||
return this.lambdaQuery().eq(Role::getCode, code).eq(Role::getState, 1).one();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -211,10 +211,13 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
return this.baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色类型 0:超级管理员;1:管理员;2:普通用户
|
||||
*/
|
||||
@Override
|
||||
public List<Role> simpleList() {
|
||||
LambdaQueryWrapper<Role> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.select(Role::getId,Role::getName).eq(Role::getState,DataStateEnum.ENABLE.getCode());
|
||||
lambdaQueryWrapper.select(Role::getId, Role::getName).eq(Role::getState, DataStateEnum.ENABLE.getCode()).eq(Role::getType, 2);
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user