From 42050b76b23190fca15606f78ee276ce43180214 Mon Sep 17 00:00:00 2001
From: yang_shj <1069818635@QQ.com>
Date: Tue, 16 May 2023 16:44:46 +0800
Subject: [PATCH] =?UTF-8?q?#bug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/com/hnac/hzinfo/inspect/plan/vo/PlanListQueryVO.java | 4 ++++
.../java/com/hnac/hzinfo/inspect/obj/mapper/InspectObjectMapper.xml | 3 +++
.../main/java/com/hnac/hzinfo/inspect/obj/vo/ContentListQueryVO.java | 4 ++++
.../main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectListQueryVO.java | 4 ++++
.../java/com/hnac/hzinfo/inspect/obj/vo/TemplateListQueryVO.java | 4 +++-
.../java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java | 3 +++
.../java/com/hnac/hzinfo/inspect/task/controller/TaskController.java | 2 +-
.../src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml | 3 +++
.../src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskListQuery.java | 5 ++++-
.../hzims/operational/access/mapper/OperAccessStatisticsMapper.xml | 3 +++
.../alert/service/impl/HistoryAbnormalAlarmServiceImpl.java | 1 -
.../hzims/operational/defect/controller/OperDefectController.java | 3 +++
.../defect/controller/OperDefectStatisticsController.java | 4 ++++
.../operational/defect/controller/OperPhenomenonController.java | 3 +++
.../com/hnac/hzims/operational/main/mapper/MainWorkBenchMapper.xml | 2 +-
.../operational/main/service/impl/MainWorkBenchServiceImpl.java | 2 +-
.../operational/station/service/impl/RealMonitorServiceImpl.java | 2 +-
.../standardTicket/service/impl/StandardTicketInfoServiceImpl.java | 1 +
.../ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java | 1 +
19 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/plan/vo/PlanListQueryVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/plan/vo/PlanListQueryVO.java
index 7face56..a0fa371 100644
--- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/plan/vo/PlanListQueryVO.java
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/plan/vo/PlanListQueryVO.java
@@ -86,4 +86,8 @@ public class PlanListQueryVO implements Serializable {
@ApiModelProperty("业务状态 0:待审核-->1:已审核-->2:派发中-->3:暂停-->4:结束-->5审核不通过-->6待提交")
@QueryField(condition = SqlCondition.EQUAL)
private Integer status;
+
+ @ApiModelProperty("创建机构")
+ @QueryField(condition = SqlCondition.EQUAL)
+ private Long createDept;
}
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/mapper/InspectObjectMapper.xml b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/mapper/InspectObjectMapper.xml
index 1f53260..7a6f8a9 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/mapper/InspectObjectMapper.xml
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/mapper/InspectObjectMapper.xml
@@ -28,6 +28,9 @@
and OBJ.`TENANT_ID` = #{obj.tenantId}
+
+ and OBJ.`CREATE_DEPT` = #{obj.createDept}
+
ORDER BY OBJ.UPDATE_TIME DESC
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ContentListQueryVO.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ContentListQueryVO.java
index d0fa012..af027cf 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ContentListQueryVO.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ContentListQueryVO.java
@@ -67,4 +67,8 @@ public class ContentListQueryVO implements Serializable {
@QueryField(condition = SqlCondition.EQUAL)
@ApiModelProperty(value = "支持的巡检类型 0普通巡检,1视频自动巡检,2机器人巡检")
private Integer supportAutoVideo;
+
+ @QueryField(condition = SqlCondition.EQUAL)
+ @ApiModelProperty(value = "创建机构")
+ private Long createDept;
}
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectListQueryVO.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectListQueryVO.java
index 417ff9c..9f8eac1 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectListQueryVO.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectListQueryVO.java
@@ -51,4 +51,8 @@ public class ProjectListQueryVO implements Serializable {
@ApiModelProperty(value = " inspectType 支持的巡检类型 0普通巡检,1视频自动巡检,2机器人巡检")
private String supportAutoVideo;
+ @QueryField(condition = SqlCondition.EQUAL)
+ @ApiModelProperty(value = "创建机构")
+ private Long createDept;
+
}
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/TemplateListQueryVO.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/TemplateListQueryVO.java
index b92d646..087b09b 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/TemplateListQueryVO.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/vo/TemplateListQueryVO.java
@@ -51,5 +51,7 @@ public class TemplateListQueryVO implements Serializable {
@ApiModelProperty(value = "是否支持视频自动巡检")
private Integer supportAutoVideo;
-
+ @QueryField(condition = SqlCondition.EQUAL)
+ @ApiModelProperty(value = "创建机构")
+ private Long createDept;
}
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java
index c41efa0..d2c07ac 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java
@@ -80,6 +80,9 @@ public class PlanController extends BladeController {
if(plan.getStatus()==null){
queryWrapper.ne(PlanEntity::getStatus, PlanContants.PlanStatusEnum.PLAN_AUTH.getStatus());
}
+ if(plan.getCreateDept()!=null){
+ queryWrapper.eq(PlanEntity::getCreateDept,plan.getCreateDept());
+ }
queryWrapper.orderByDesc(PlanEntity::getUpdateTime);
IPage pages = planService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.eq(PlanEntity::getTenantId, bladeUser.getTenantId()) : queryWrapper);
return R.data(pages);
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java
index 3f4ac5d..99cda99 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java
@@ -113,7 +113,7 @@ public class TaskController extends BladeController {
task.setCurUserId(AuthUtil.getUserId());
task.setTenantId(AuthUtil.getTenantId());
}
- if (task.getCurUserId().longValue() == -1) {
+ if (task.getCurUserId() == -1) {
task.setCurUserId(null);
}
List list = taskService.getListPage(pages,task);
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml
index e441257..02bd105 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml
@@ -74,6 +74,9 @@
and t.AUTO_VIDEO=#{task.autoVideo}
+
+ and t.CREATE_DEPT=#{task.createDept}
+
order by t.UPDATE_TIME desc
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskListQuery.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskListQuery.java
index ef51dd3..b36c94d 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskListQuery.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskListQuery.java
@@ -126,5 +126,8 @@ public class TaskListQuery implements Serializable {
*/
private String areaId;
-
+ /**
+ * 创建机构
+ */
+ private Long createDept;
}
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessStatisticsMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessStatisticsMapper.xml
index a9703bd..e390f35 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessStatisticsMapper.xml
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessStatisticsMapper.xml
@@ -40,6 +40,9 @@
and OT.CREATE_DEPT = #{dto.areaId}
+
+ and OT.CREATE_DEPT = #{dto.createDept}
+
and date_format(OT.PLAN_START_TIME,'%Y-%m') = #{dto.yearMonth}
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java
index a0cd6d6..23a3cf7 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java
@@ -23,7 +23,6 @@ import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation;
import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result;
-import com.hnac.hzinfo.sdk.v5.soe.SoeClient;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.logstash.logback.encoder.org.apache.commons.lang3.ObjectUtils;
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java
index 1ec49af..dbe05cf 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectController.java
@@ -85,6 +85,9 @@ public class OperDefectController extends BladeController {
if (defect.getEndTime() != null) {
queryWrapper.le(OperDefectEntity::getCreateTime, defect.getEndTime());
}
+ if (defect.getCreateDept() != null) {
+ queryWrapper.eq(OperDefectEntity::getCreateDept, defect.getCreateDept());
+ }
queryWrapper.orderByDesc(OperDefectEntity::getActStartTime);
IPage pages = defectService.page(Condition.getPage(query), queryWrapper);
IPage vos = OperDefectWrapper.build().pageVO(pages);
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java
index d4ba2f9..c2d7f0c 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java
@@ -7,6 +7,7 @@ import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO;
+import com.hnac.hzims.operational.defect.entity.OperDefectEntity;
import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity;
import com.hnac.hzims.operational.defect.entity.OperFaultEntity;
import com.hnac.hzims.operational.defect.service.IOperDefectStatisticsService;
@@ -79,6 +80,9 @@ public class OperDefectStatisticsController extends BladeController {
if(entity.getActEndTime()!=null){
queryWrapper.le(OperDefectStatisticsEntity::getActStartTime,entity.getActEndTime());
}
+ if (entity.getCreateDept() != null) {
+ queryWrapper.eq(OperDefectStatisticsEntity::getCreateDept, entity.getCreateDept());
+ }
queryWrapper.orderByDesc(OperDefectStatisticsEntity::getActStartTime);
IPage pages = statisticsService.page(Condition.getPage(query), queryWrapper);
IPage vos = OperDefectStatisticsWrapper.build().pageVO(pages);
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperPhenomenonController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperPhenomenonController.java
index 7c4e715..cb94c94 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperPhenomenonController.java
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperPhenomenonController.java
@@ -86,6 +86,9 @@ public class OperPhenomenonController extends BladeController {
if (Func.isNotEmpty(entity.getDiscriminateStatus())) {
queryWrapper.eq(OperPhenomenonEntity::getDiscriminateStatus, entity.getDiscriminateStatus());
}
+ if (Func.isNotEmpty(entity.getCreateDept())) {
+ queryWrapper.eq(OperPhenomenonEntity::getCreateDept, entity.getCreateDept());
+ }
// // 区域Id
// if (Func.isNotEmpty(entity.getAreaId())) {
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/mapper/MainWorkBenchMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/mapper/MainWorkBenchMapper.xml
index e67e305..b5b700f 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/mapper/MainWorkBenchMapper.xml
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/mapper/MainWorkBenchMapper.xml
@@ -69,7 +69,7 @@
and (NOT EXCLUDE_DEPT like #{excludeDept} OR EXCLUDE_DEPT IS NULL OR EXCLUDE_DEPT = '')
- and (ASCRIPTION_USER like #{ascriptionUser} OR ASCRIPTION_USER IS NULL OR ASCRIPTION_USER = '')
+ and (ASCRIPTION_USER like concat('%',#{ascriptionUser},'%') OR ASCRIPTION_USER IS NULL OR ASCRIPTION_USER = '')
order by ord
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java
index ef98cb7..527f060 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java
@@ -163,7 +163,7 @@ public class MainWorkBenchServiceImpl extends BaseServiceImpl optionalDept = deptByCurrentUser.getData().stream().min(Comparator.comparing(Dept::getDeptCategory));
Integer deptCategory = optionalDept.isPresent() ? optionalDept.map(Dept::getDeptCategory).orElse(null) : null;
- Dept dept = optionalDept.isPresent() ? optionalDept.get() : null;
+ Dept dept = optionalDept.orElse(null);
//Integer deptCategory = deptByCurrentUser.getData().stream().min(Comparator.comparing(Dept::getDeptCategory)).get().getDeptCategory();
// 所属机构
List deptList = deptByCurrentUser.getData().stream().map(Dept::getId).collect(Collectors.toList());
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java
index f3f2bc7..6fdd376 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java
@@ -895,7 +895,6 @@ public class RealMonitorServiceImpl implements IRealMonitorService {
weather.setIcon(now.getIcon());
weather.setTemp(now.getTemp());
weather.setText(now.getText());
- station.setPrecipitation(now.getPrecip());
}
}
// 站点七日内天气
@@ -906,6 +905,7 @@ public class RealMonitorServiceImpl implements IRealMonitorService {
Daily daily = dailyList.stream().sorted(Comparator.comparing(Daily::getFxDate)).collect(Collectors.toList()).get(0);
weather.setTempMin(daily.getTempMin());
weather.setTempMax(daily.getTempMax());
+ station.setPrecipitation(daily.getPrecip());
}
}
station.setNowWater(weather);
diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
index 0ae6d17..4437116 100644
--- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
+++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
@@ -107,6 +107,7 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl> queryList(StandardTicketInfoDto req, Query query) {
LambdaQueryWrapper queryWrapper = this.getQueryWrapper(req);
+ queryWrapper.eq(StandardTicketInfoEntity::getCreateDept,req.getCreateDept());
queryWrapper.orderByDesc(StandardTicketInfoEntity::getCreateTime);
IPage pages = super.page(Condition.getPage(query), queryWrapper);
return R.data(pages.setRecords(StandardTicketInfoWrapper.build().listVO(pages.getRecords())));
diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java
index 40ace2c..a885c55 100644
--- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java
+++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java
@@ -236,6 +236,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl> queryList(WorkTicketInfoDto req, Query query) {
LambdaQueryWrapper lqw = this.getQueryWrapper(req);
+ lqw.eq(WorkTicketInfoEntity::getCreateDept,req.getCreateDept());
lqw.orderByDesc(WorkTicketInfoEntity::getCreateTime).orderByDesc(WorkTicketInfoEntity::getUpdateTime);
IPage pages = super.page(Condition.getPage(query), lqw);
pages.setRecords(WorkTicketInfoWrapper.build().listVO(pages.getRecords()));