From a8a5d58c268dd19a35209eb4af9f302ddc47b89b Mon Sep 17 00:00:00 2001 From: hongawen <83944980@qq.com> Date: Wed, 29 May 2024 19:00:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=A2=84=E5=91=8A=E8=AD=A6=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E9=97=AE=E9=A2=98=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enums/SupervisionResponseEnum.java | 2 +- .../pojo/vo/leaflet/WarningLeafletVO.java | 1 + .../leaflet/impl/WarningLeafletServiceImpl.java | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/enums/SupervisionResponseEnum.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/enums/SupervisionResponseEnum.java index f046ae897..fe72ce7b6 100644 --- a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/enums/SupervisionResponseEnum.java +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/enums/SupervisionResponseEnum.java @@ -16,7 +16,7 @@ public enum SupervisionResponseEnum { * A00550 ~ A00649 */ SUPERVISION_COMMON_ERROR("A00550","监督管理模块异常"), - NO_POWER("A00550","很抱歉,该流程不是您创建的,没有权限操作!") + NO_POWER("A00550","不能操作非自己创建的任务!") ; private final String code; diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java index e7d70c748..1442c0691 100644 --- a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java @@ -44,6 +44,7 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{ */ private String problemId; + /** * 单子类型:1:预警单;2:告警单 */ diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java index 096c0a5bc..242926a26 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java @@ -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; @@ -158,7 +159,20 @@ public class WarningLeafletServiceImpl extends ServiceImpl(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper); + Page warningLeafletVOPage = this.baseMapper.alarmPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper); + //目前仅知道现场测试超标会有附件 + List 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; } From 8e975782590e69746a4ce167af98486676493454 Mon Sep 17 00:00:00 2001 From: hongawen <83944980@qq.com> Date: Wed, 29 May 2024 19:33:46 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/service/impl/RoleServiceImpl.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/RoleServiceImpl.java b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/RoleServiceImpl.java index 685e740b3..87dee44b4 100644 --- a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/RoleServiceImpl.java +++ b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/RoleServiceImpl.java @@ -100,7 +100,7 @@ public class RoleServiceImpl extends ServiceImpl implements IR @Override public List getCodeByList(List 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 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 implements IR @Override public List selectRoleDetail(Integer id) { List 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 implements IR } QueryWrapper 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 roleVOList = this.baseMapper.selectList(queryWrapper); return roleVOList; } @@ -201,7 +201,7 @@ public class RoleServiceImpl extends ServiceImpl 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 implements IR return this.baseMapper.selectList(queryWrapper); } + /** + * 角色类型 0:超级管理员;1:管理员;2:普通用户 + */ @Override public List simpleList() { LambdaQueryWrapper 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); } From 1ab7a8ad38fc98cfad40e03117fc7dbd4acd9637 Mon Sep 17 00:00:00 2001 From: cdf <857448963@qq.com> Date: Thu, 30 May 2024 11:18:40 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E7=9B=91=E7=9D=A3?= =?UTF-8?q?=E6=9C=88=E6=8A=A5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/njcn/process/pojo/po/SupvReportM.java | 6 -- .../service/impl/SupvReportMServiceImpl.java | 61 +++++++++---------- 2 files changed, 30 insertions(+), 37 deletions(-) diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvReportM.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvReportM.java index c90694fbe..9e25e0dad 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvReportM.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvReportM.java @@ -284,12 +284,6 @@ public class SupvReportM { - - - /** - * 各类型本年监督数量 - */ - @TableField(exist = false) private Integer planYearCountNum; /** diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java index 7c79523ad..b052ab9ad 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java @@ -154,6 +154,8 @@ public class SupvReportMServiceImpl extends MppServiceImpl processPublicDTODianYaListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); List processPublicDTODianYaListAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); + List processPublicDTODianYaYearPlan = this.baseMapper.statisticPlanReportYear(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); + //供电电压问题数量 List processPublicDTODianYaGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); @@ -196,7 +198,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl 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 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()+ From cfbe643eddb3c898ba24507b7a1f6ea72a0010df Mon Sep 17 00:00:00 2001 From: cdf <857448963@qq.com> Date: Thu, 30 May 2024 13:11:05 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B2=B3=E5=8C=97=E5=9B=BD=E7=BD=91?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PqTypicalSourceCreatePOServiceImpl.java | 4 ++-- .../impl/PointStatisticalDataServiceImpl.java | 2 +- .../upload/impl/REvaluationDataServiceImpl.java | 4 ++-- .../RSubstationStatisticalDataServiceImpl.java | 2 -- .../RUploadPointStatisticalDataDServiceImpl.java | 16 ++++++++++++++-- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/send/impl/PqTypicalSourceCreatePOServiceImpl.java b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/send/impl/PqTypicalSourceCreatePOServiceImpl.java index 30a0d5422..cc3c42143 100644 --- a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/send/impl/PqTypicalSourceCreatePOServiceImpl.java +++ b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/send/impl/PqTypicalSourceCreatePOServiceImpl.java @@ -137,7 +137,7 @@ public class PqTypicalSourceCreatePOServiceImpl extends ServiceImpl 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 runMonitorIds = Arrays.stream(StrUtil.isNotBlank(item.getRunMonitorIds())?item.getRunMonitorIds().split(StrUtil.COMMA):new String[]{}).collect(toList()); List onlineMonitorIds = Arrays.stream(StrUtil.isNotBlank(item.getOnlineMonitorIds())?item.getOnlineMonitorIds().split(StrUtil.COMMA):new String[]{}).collect(toList()); List runDevIds = Arrays.stream(StrUtil.isNotBlank(item.getRunDevIds())?item.getRunDevIds().split(StrUtil.COMMA):new String[]{}).collect(toList()); - List lineDTOList = commLineClient.getLineDetailBatch(onlineMonitorIds).getData(); + + List lineDTOList; + if(CollUtil.isNotEmpty(onlineMonitorIds)) { + lineDTOList = commLineClient.getLineDetailBatch(onlineMonitorIds).getData(); + }else { + lineDTOList = new ArrayList<>(); + } List deptRStatIntegrityDList = rStatIntegrityDList.stream().filter(it->runMonitorIds.contains(it.getLineIndex())).collect(toList()); @@ -461,7 +468,12 @@ public class RUploadPointStatisticalDataDServiceImpl extends MppServiceImpl runMonitorIds = Arrays.stream(StrUtil.isNotBlank(item.getRunMonitorIds())?item.getRunMonitorIds().split(StrUtil.COMMA):new String[]{}).collect(toList()); List onlineMonitorIds = Arrays.stream(StrUtil.isNotBlank(item.getOnlineMonitorIds())?item.getOnlineMonitorIds().split(StrUtil.COMMA):new String[]{}).collect(toList()); List runDevIds = Arrays.stream(StrUtil.isNotBlank(item.getRunDevIds())?item.getRunDevIds().split(StrUtil.COMMA):new String[]{}).collect(toList()); - List lineDTOList = commLineClient.getLineDetailBatch(onlineMonitorIds).getData(); + List lineDTOList; + if(CollUtil.isNotEmpty(onlineMonitorIds)) { + lineDTOList = commLineClient.getLineDetailBatch(onlineMonitorIds).getData(); + }else { + lineDTOList = new ArrayList<>(); + } List deptRStatIntegrityDList = rStatIntegrityDList.stream().filter(it->runMonitorIds.contains(it.getLineIndex())).collect(toList()); int due = deptRStatIntegrityDList.stream().mapToInt(RStatIntegrityD::getDueTime).sum();