From 78f52274973d1c5e2f88b62434e2a178bb249de7 Mon Sep 17 00:00:00 2001
From: wr <1754607820@qq.com>
Date: Fri, 14 Jun 2024 17:55:43 +0800
Subject: [PATCH] =?UTF-8?q?1.=E6=8A=80=E6=9C=AF=E7=9B=91=E7=9D=A3=EF=BC=8C?=
=?UTF-8?q?=E7=BB=88=E7=AB=AF=E5=85=A5=E7=BD=91=E7=9B=91=E6=B5=8B=EF=BC=8C?=
=?UTF-8?q?=E7=9B=91=E6=B5=8B=E7=82=B9=E5=8F=B0=E8=B4=A6=E5=BD=95=E5=85=A5?=
=?UTF-8?q?=EF=BC=8C=E7=9B=91=E6=B5=8B=E7=82=B9=E8=81=94=E8=B0=83=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E6=A8=A1=E7=B3=8A=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=202.=E7=94=B5=E8=83=BD=E8=B4=A8=E9=87=8F=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=EF=BC=8C=E7=94=A8=E6=88=B7=E6=8A=95=E8=AF=89=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B4=A3=E4=BB=BB=E9=83=A8=E9=97=A8=203.?=
=?UTF-8?q?=E9=A2=84=E5=91=8A=E5=8D=95=E5=A2=9E=E5=8A=A0=E8=B4=A3=E4=BB=BB?=
=?UTF-8?q?=E9=83=A8=E9=97=A8=E5=88=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SupervisionUserComplaintParam.java | 3 ++
.../problem/SupervisionUserComplaintPO.java | 9 ++++
.../pojo/vo/leaflet/WarningLeafletVO.java | 9 +++-
.../leaflet/mapping/WarningLeafletMapper.xml | 48 ++++++++++++++++++-
...SupervisionDevMainReportPOServiceImpl.java | 11 ++++-
...SupervisionTempLineDebugPOServiceImpl.java | 12 +++++
.../SupervisionTempLineReportServiceImpl.java | 12 ++++-
.../impl/WarningLeafletServiceImpl.java | 36 ++++++++++++--
8 files changed, 131 insertions(+), 9 deletions(-)
diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/problem/SupervisionUserComplaintParam.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/problem/SupervisionUserComplaintParam.java
index 5b0485440..1aa4ac0fb 100644
--- a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/problem/SupervisionUserComplaintParam.java
+++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/problem/SupervisionUserComplaintParam.java
@@ -26,6 +26,9 @@ public class SupervisionUserComplaintParam {
@ApiModelProperty(value = "用户名称")
private String userName;
+ @ApiModelProperty(value = "责任单位id,取ISC平台上的组织id")
+ private String dutyOrgId;
+
@ApiModelProperty(value = "投诉名称")
private String complaintName;
diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/problem/SupervisionUserComplaintPO.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/problem/SupervisionUserComplaintPO.java
index 0dd35bb1f..0b5c2f5d6 100644
--- a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/problem/SupervisionUserComplaintPO.java
+++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/problem/SupervisionUserComplaintPO.java
@@ -45,6 +45,15 @@ public class SupervisionUserComplaintPO extends BaseEntity {
@TableField(value = "user_name")
private String userName;
+ /**
+ * 责任单位id,取ISC平台上的组织id
+ */
+ @TableField(value = "duty_Org_Id")
+ private String dutyOrgId;
+
+ @TableField(exist = false)
+ private String dutyOrgName;
+
/**
* 投诉名称
*/
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 1103641c4..13903343a 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
@@ -1,7 +1,6 @@
package com.njcn.supervision.pojo.vo.leaflet;
import com.njcn.db.bo.BaseEntity;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@@ -94,4 +93,12 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{
private String createBy;
+ /**
+ * 责任单位id,取ISC平台上的组织id
+ */
+ private String dutyOrgId;
+ /**
+ * 责任单位名称
+ */
+ private String dutyOrgName;
}
diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/leaflet/mapping/WarningLeafletMapper.xml b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/leaflet/mapping/WarningLeafletMapper.xml
index de4074bc6..919bac020 100644
--- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/leaflet/mapping/WarningLeafletMapper.xml
+++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/leaflet/mapping/WarningLeafletMapper.xml
@@ -4,13 +4,57 @@
diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionDevMainReportPOServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionDevMainReportPOServiceImpl.java
index e44702174..1524a440b 100644
--- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionDevMainReportPOServiceImpl.java
+++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionDevMainReportPOServiceImpl.java
@@ -143,8 +143,6 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl getDevReport(SupervisionDevMainReportParam.SupervisionDevMainReportQuery supervisionDevMainReportQuery) {
QueryWrapper queryWrapper = new QueryWrapper<>();
- String userIndex = RequestUtil.getUserIndex();
-
//获取当前用户部门所有同事的id,查看该部门下所有的数据
List colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
queryWrapper.in("supervision_dev_main_report.create_by", colleaguesIds)
@@ -157,6 +155,15 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImplx
+ .like("dev.substation_name", supervisionDevMainReportQuery.getSearchValue())
+ .or()
+ .like("dev.monitoring_terminal_code", supervisionDevMainReportQuery.getSearchValue())
+ .or()
+ .like("dev.monitoring_terminal_name", supervisionDevMainReportQuery.getSearchValue())
+ );
+ }
//添加上时间范围
queryWrapper.between("supervision_dev_main_report.Create_Time",
DateUtil.beginOfDay(DateUtil.parse(supervisionDevMainReportQuery.getSearchBeginTime())),
diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionTempLineDebugPOServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionTempLineDebugPOServiceImpl.java
index dc7b4ff98..8e22b034d 100644
--- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionTempLineDebugPOServiceImpl.java
+++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionTempLineDebugPOServiceImpl.java
@@ -158,6 +158,18 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImplx
+ .like("supervision_temp_line_report.Power_Substation_Name", supervisionTempLineDebugQuery.getSearchValue())
+ .or()
+ .like("supervision_temp_line_report.connected_bus", supervisionTempLineDebugQuery.getSearchValue())
+ .or()
+ .like("supervision_temp_line_report.monitoring_terminal_name", supervisionTempLineDebugQuery.getSearchValue())
+ .or()
+ .like("supervision_temp_line_report.line_name", supervisionTempLineDebugQuery.getSearchValue())
+ );
+ }
+
//添加上时间范围
queryWrapper.between("supervision_temp_line_report.Create_Time",
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionTempLineReportServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionTempLineReportServiceImpl.java
index a46ec71ad..e515a0357 100644
--- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionTempLineReportServiceImpl.java
+++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/SupervisionTempLineReportServiceImpl.java
@@ -136,7 +136,17 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImplx
+ .like("supervision_temp_line_report.Power_Substation_Name", supervisionTempLineReportQuery.getSearchValue())
+ .or()
+ .like("supervision_temp_line_report.connected_bus", supervisionTempLineReportQuery.getSearchValue())
+ .or()
+ .like("supervision_temp_line_report.monitoring_terminal_name", supervisionTempLineReportQuery.getSearchValue())
+ .or()
+ .like("supervision_temp_line_report.line_name", supervisionTempLineReportQuery.getSearchValue())
+ );
+ }
//添加上时间范围
queryWrapper.between("supervision_temp_line_report.Create_Time",
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineReportQuery.getSearchBeginTime())),
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 cb003129b..7c94a2591 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
@@ -1,6 +1,7 @@
package com.njcn.supervision.service.leaflet.impl;
import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
@@ -36,7 +37,9 @@ import com.njcn.supervision.utils.InstanceUtil;
import com.njcn.system.api.DicDataFeignClient;
import com.njcn.system.enums.DicDataTypeEnum;
import com.njcn.system.pojo.po.DictData;
+import com.njcn.user.api.DeptFeignClient;
import com.njcn.user.api.UserFeignClient;
+import com.njcn.user.pojo.po.Dept;
import com.njcn.web.factory.PageFactory;
import com.njcn.web.utils.RequestUtil;
import org.springframework.beans.BeanUtils;
@@ -72,6 +75,8 @@ public class WarningLeafletServiceImpl extends ServiceImpl(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
+ Page warningLeafletVOPage = this.baseMapper.warningPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
+ extracted(warningLeafletVOPage);
+ return warningLeafletVOPage;
+ }
+
+ private void extracted(Page warningLeafletVOPage) {
+ if(CollUtil.isNotEmpty(warningLeafletVOPage.getRecords())){
+ List deptIds = warningLeafletVOPage.getRecords().stream().distinct().map(WarningLeafletVO::getDutyOrgId).collect(Collectors.toList());
+ if(CollUtil.isNotEmpty(deptIds)){
+ List data = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
+ Map deptMap = data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName));
+ warningLeafletVOPage.getRecords().stream().peek(x -> {
+ if(deptMap.containsKey(x.getDutyOrgId())){
+ x.setDutyOrgName(deptMap.get(x.getDutyOrgId()));
+ }
+ });
+ }
+ }
+
}
@Override
@@ -206,17 +229,24 @@ public class WarningLeafletServiceImpl extends ServiceImpl records = warningLeafletVOPage.getRecords();
if(CollectionUtil.isNotEmpty(records)){
+ List deptIds = records.stream().distinct().map(WarningLeafletVO::getDutyOrgId).collect(Collectors.toList());
+ Map deptMap = new HashMap<>();
+ if(CollUtil.isNotEmpty(deptIds)){
+ List data = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
+ deptMap.putAll(data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName)));
+ }
for (WarningLeafletVO record : records) {
if(record.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode()) && StrUtil.isNotBlank(record.getProblemId())){
//查询到现场测试超标附件地址
SurveyTest surveyTest = surveyTestService.getById(record.getProblemId());
record.setProblemPath(surveyTest.getTestReport());
}
+ if(deptMap.containsKey(record.getDutyOrgId())){
+ record.setDutyOrgName(deptMap.get(record.getDutyOrgId()));
+ }
}
}
-
return warningLeafletVOPage;
-
}
@Override