From f1ef0d382c80a2ef426d3bc8d64cc97b61af03be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com>
Date: Tue, 29 Aug 2023 08:55:47 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E7=BB=B4=E5=B7=A1=E6=A3=80=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
hzims-service-api/digital-twin-display-api/pom.xml | 1 +
.../defect/feign/StatisticsFeignClient.java | 39 ++++
.../feign/StatisticsFeignClientFallback.java | 34 ++++
.../operational/defect/vo/StatistictCount.java | 24 +++
.../operational/defect/vo/StatistictCountVo.java | 35 ++++
.../inspect/areamonthly/feign/TaskFeignClient.java | 46 ++++-
.../feign/fallback/TaskFeignClientFallback.java | 126 ++++++++-----
.../hzinfo/inspect/areamonthly/vo/EventListVO.java | 49 +++++
.../areamonthly/vo/TaskObjectProjectContentVO.java | 138 ++++++++++++++
.../areamonthly/vo/TaskObjectProjectOfflineVO.java | 51 ++++++
.../areamonthly/vo/TaskObjectProjectVO.java | 34 ++++
.../inspect/areamonthly/vo/TaskObjectVO.java | 61 +++++++
.../fallback/RouteFeignClientFallback.java | 63 +++++++
.../threedimensional/fegin/RouteFeignClient.java | 73 ++++++++
hzims-service/digital-twin-display/pom.xml | 10 ++
.../twindisplay/DigitalTwinDisplayApplication.java | 4 +-
.../twindisplay/controller/RouteController.java | 88 +++++++++
.../controller/StatisticsController.java | 64 +++++++
.../twindisplay/controller/TaskController.java | 128 +++++++++++++
.../hzims/twindisplay/service/RouteService.java | 44 +++++
.../twindisplay/service/StatisticsService.java | 32 ++++
.../hzims/twindisplay/service/TaskService.java | 78 ++++++++
.../twindisplay/service/impl/RouteServiceImpl.java | 82 +++++++++
.../service/impl/StatisticsServiceImpl.java | 56 ++++++
.../twindisplay/service/impl/TaskServiceImpl.java | 135 ++++++++++++++
.../src/main/resources/application.yml | 1 +
.../service/impl/InspectOfflineServiceImpl.java | 7 +-
.../inspect/plan/controller/RouteController.java | 5 +-
.../inspect/task/controller/EventController.java | 18 +-
.../inspect/task/controller/TaskController.java | 2 +-
.../inspect/task/mapper/TaskObjectMapper.java | 2 +-
.../inspect/task/mapper/TaskObjectMapper.xml | 6 +-
.../task/mapper/TaskObjectProjectMapper.java | 2 +-
.../task/mapper/TaskObjectProjectMapper.xml | 2 +-
.../service/ITaskObjectProjectContentService.java | 2 +-
.../task/service/ITaskObjectProjectService.java | 2 +-
.../inspect/task/service/ITaskObjectService.java | 2 +-
.../hzinfo/inspect/task/service/ITaskService.java | 1 +
.../impl/TaskObjectProjectContentServiceImpl.java | 11 +-
.../service/impl/TaskObjectProjectServiceImpl.java | 2 +-
.../task/service/impl/TaskObjectServiceImpl.java | 3 +-
.../inspect/task/service/impl/TaskServiceImpl.java | 3 +
.../hnac/hzinfo/inspect/task/vo/EventListVO.java | 49 -----
.../task/vo/TaskObjectProjectContentVO.java | 138 --------------
.../task/vo/TaskObjectProjectOfflineVO.java | 51 ------
.../inspect/task/vo/TaskObjectProjectVO.java | 34 ----
.../hnac/hzinfo/inspect/task/vo/TaskObjectVO.java | 61 -------
.../hzims/operational/OperationApplication.java | 2 +-
.../controller/OperDefectStatisticsController.java | 20 ++-
.../defect/mapper/OperDefectStatisticsMapper.java | 8 +
.../defect/mapper/OperDefectStatisticsMapper.xml | 4 +
.../service/IOperDefectStatisticsService.java | 7 +
.../impl/OperDefectStatisticsServiceImpl.java | 198 +++++++++++++--------
.../station/controller/EstimateController.java | 4 +-
54 files changed, 1635 insertions(+), 507 deletions(-)
create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClient.java
create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClientFallback.java
create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCount.java
create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCountVo.java
create mode 100644 hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java
create mode 100644 hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java
create mode 100644 hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java
create mode 100644 hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java
create mode 100644 hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java
create mode 100644 hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fallback/RouteFeignClientFallback.java
create mode 100644 hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fegin/RouteFeignClient.java
create mode 100644 hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/RouteController.java
create mode 100644 hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/StatisticsController.java
create mode 100644 hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/TaskController.java
create mode 100644 hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/RouteService.java
create mode 100644 hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/StatisticsService.java
create mode 100644 hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/TaskService.java
create mode 100644 hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/RouteServiceImpl.java
create mode 100644 hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/StatisticsServiceImpl.java
create mode 100644 hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/TaskServiceImpl.java
delete mode 100644 hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/EventListVO.java
delete mode 100644 hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectContentVO.java
delete mode 100644 hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectOfflineVO.java
delete mode 100644 hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectVO.java
delete mode 100644 hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectVO.java
diff --git a/hzims-service-api/digital-twin-display-api/pom.xml b/hzims-service-api/digital-twin-display-api/pom.xml
index b0c5dd1..0ca55dc 100644
--- a/hzims-service-api/digital-twin-display-api/pom.xml
+++ b/hzims-service-api/digital-twin-display-api/pom.xml
@@ -9,6 +9,7 @@
4.0.0-SNAPSHOT
+
digital-twin-display-api
jar
${hzims.project.version}
diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClient.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClient.java
new file mode 100644
index 0000000..57651d8
--- /dev/null
+++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClient.java
@@ -0,0 +1,39 @@
+package com.hnac.hzims.operational.defect.feign;
+
+import com.hnac.hzims.operational.OperationalConstants;
+import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO;
+import com.hnac.hzims.operational.defect.vo.StatistictCountVo;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.tool.api.R;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.cloud.openfeign.SpringQueryMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import java.util.List;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 15:36
+ */
+@FeignClient(
+ value = OperationalConstants.APP_NAME,
+ fallback = StatisticsFeignClientFallback.class
+)
+public interface StatisticsFeignClient {
+
+
+ @GetMapping("/defect_statistic/list")
+ R> list(@SpringQueryMap OperDefectStatisticsVO entity);
+
+
+
+ /**
+ * 巡检任务统计
+ * @return
+ */
+ @GetMapping("/defect_statistic/defectStatistictCount")
+ public R> defectStatistictCount();
+}
diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClientFallback.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClientFallback.java
new file mode 100644
index 0000000..974aa1d
--- /dev/null
+++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClientFallback.java
@@ -0,0 +1,34 @@
+package com.hnac.hzims.operational.defect.feign;
+
+import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO;
+import com.hnac.hzims.operational.defect.vo.StatistictCountVo;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.tool.api.R;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 15:40
+ */
+@Component
+public class StatisticsFeignClientFallback implements StatisticsFeignClient {
+ @Override
+ public R> list(OperDefectStatisticsVO entity) {
+ throw new ServiceException("熔断错误");
+ }
+
+ /**
+ * 巡检任务统计
+ *
+ * @return
+ */
+ @Override
+ public R> defectStatistictCount() {
+ return null;
+ }
+}
diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCount.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCount.java
new file mode 100644
index 0000000..413e395
--- /dev/null
+++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCount.java
@@ -0,0 +1,24 @@
+package com.hnac.hzims.operational.defect.vo;
+
+import lombok.Data;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 16:46
+ */
+@Data
+public class StatistictCount {
+
+
+ private String createDept;
+
+
+ private Integer count;
+
+
+ private Integer handleStatus;
+
+
+}
diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCountVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCountVo.java
new file mode 100644
index 0000000..d5141c7
--- /dev/null
+++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCountVo.java
@@ -0,0 +1,35 @@
+package com.hnac.hzims.operational.defect.vo;
+
+import lombok.Data;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 17:03
+ */
+@Data
+public class StatistictCountVo {
+
+
+ private String createDept;
+
+
+
+ private String createDeptName;
+
+
+ /**
+ * 已处理
+ */
+ private Integer processedCount = 0;
+
+
+ /**
+ * 未处理
+ */
+
+ private Integer untreatedCount = 0;
+
+
+}
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/TaskFeignClient.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/TaskFeignClient.java
index 3f4803c..599e462 100644
--- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/TaskFeignClient.java
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/TaskFeignClient.java
@@ -1,19 +1,24 @@
package com.hnac.hzinfo.inspect.areamonthly.feign;
-import com.hnac.hzinfo.inspect.areamonthly.feign.fallback.TaskFeignClientFallback;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.hnac.hzims.vo.VoteChartVo;
+
+import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO;
import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO;
import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo;
import com.hnac.hzinfo.inspect.task.entity.TaskEntity;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
import static com.hnac.hzinfo.inspect.Constants.APP_NAME;
@@ -23,27 +28,50 @@ import static com.hnac.hzinfo.inspect.Constants.APP_NAME;
* @Serial 1.0
* @Date 2023/4/11 17:21
*/
-@FeignClient(value = APP_NAME, fallback = TaskFeignClientFallback.class)
+@FeignClient(value = APP_NAME)
public interface TaskFeignClient {
@GetMapping("/task/list")
@ApiOperation(value = "分页显示任务列表", notes = "传入task")
- public R> list(@SpringQueryMap TaskListQuery task,@SpringQueryMap Query query);
+ public R> list(@SpringQueryMap TaskListQuery task, @SpringQueryMap Query query);
@GetMapping(value = "/task/detail")
@ApiOperation(value = "查看,下面列表再调用eventController.list", notes = "传入taskid")
public R detail(@RequestParam Long id);
-
/**
* 巡检任务分页
*/
@GetMapping("/task/pageList/{page}/{size}")
@ApiOperation(value = "分页显示任务列表", notes = "传入task")
public R> pageList(
- @ApiParam(name = "page", value = "当前页", required = true) @PathVariable("page") Long page,
- @ApiParam(name = "size", value = "每页记录数", required = true) @PathVariable("size") Long size,
+ @PathVariable("page") Long page,
+ @PathVariable("size") Long size,
@SpringQueryMap TaskListQuery task);
+
+
+ @GetMapping(value = "/task/event/list")
+ @ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId")
+ public R> eventList(@RequestParam Long taskId, @SpringQueryMap Query query,
+ @SpringQueryMap BladeUser bladeUser);
+
+
+ /**
+ * 获取任务详情
+ */
+ @GetMapping(value = "/task/getTaskById")
+ @ApiOperation(value = "获取任务详情", notes = "传入taskId")
+ public R> getTaskById(@RequestParam Long id);
+
+
+ /**
+ * 巡检计划统计
+ */
+ @GetMapping("task/getTaskListStatistics")
+ @ApiOperation(value = "巡检计划统计", notes = "传入计划id")
+ public R> getTaskListStatistics(@RequestParam String startTime,@RequestParam String endTime,
+ @RequestParam Long deptId);
+
}
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/fallback/TaskFeignClientFallback.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/fallback/TaskFeignClientFallback.java
index 6acac03..dece8f3 100644
--- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/fallback/TaskFeignClientFallback.java
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/fallback/TaskFeignClientFallback.java
@@ -1,46 +1,80 @@
-package com.hnac.hzinfo.inspect.areamonthly.feign.fallback;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.hnac.hzinfo.inspect.areamonthly.feign.TaskFeignClient;
-import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery;
-import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo;
-import com.hnac.hzinfo.inspect.task.entity.TaskEntity;
-import lombok.extern.slf4j.Slf4j;
-import org.springblade.core.mp.support.BladePage;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author WL
- * @Version v1.0
- * @Serial 1.0
- * @Date 2023/4/11 17:23
- */
-@Slf4j
-@Service
-public class TaskFeignClientFallback implements TaskFeignClient {
- @Override
- public R> list(TaskListQuery task, Query query) {
-
- return R.fail("远程调用失败");
- }
-
- @Override
- public R detail(Long id) {
- return R.fail("远程调用失败");
- }
-
- /**
- * 巡检任务分页
- *
- * @param page
- * @param size
- * @param task
- */
- @Override
- public R> pageList(Long page, Long size, TaskListQuery task) {
- return R.fail("远程调用失败");
- }
-
-}
+// package com.hnac.hzinfo.inspect.areamonthly.feign.fallback;
+//
+// import com.baomidou.mybatisplus.core.metadata.IPage;
+// import com.hnac.hzims.vo.VoteChartVo;
+// import com.hnac.hzinfo.inspect.areamonthly.feign.TaskFeignClient;
+// import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO;
+// import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery;
+// import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO;
+// import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo;
+// import com.hnac.hzinfo.inspect.task.entity.TaskEntity;
+// import lombok.extern.slf4j.Slf4j;
+// import org.springblade.core.mp.support.BladePage;
+// import org.springblade.core.mp.support.Query;
+// import org.springblade.core.secure.BladeUser;
+// import org.springblade.core.tool.api.R;
+// import org.springframework.stereotype.Service;
+//
+// import java.util.List;
+//
+// /**
+// * @Author WL
+// * @Version v1.0
+// * @Serial 1.0
+// * @Date 2023/4/11 17:23
+// */
+// @Slf4j
+// @Service
+// public class TaskFeignClientFallback implements TaskFeignClient {
+// @Override
+// public R> list(TaskListQuery task, Query query) {
+//
+// return R.fail("远程调用失败");
+// }
+//
+// @Override
+// public R detail(Long id) {
+// return R.fail("远程调用失败");
+// }
+//
+// /**
+// * 巡检任务分页
+// *
+// * @param page
+// * @param size
+// * @param task
+// */
+// @Override
+// public R> pageList(Long page, Long size, TaskListQuery task) {
+// return R.fail("远程调用失败");
+// }
+//
+//
+// @Override
+// public R> eventList(Long taskId, Query query, BladeUser bladeUser) {
+// return R.fail("远程调用失败");
+// }
+//
+// /**
+// * 获取任务详情
+// *
+// * @param id
+// */
+// @Override
+// public R> getTaskById(Long id) {
+// return R.fail("远程调用失败");
+// }
+//
+// /**
+// * 巡检计划统计
+// *
+// * @param startTime
+// * @param endTime
+// * @param deptId
+// */
+// @Override
+// public R> getTaskListStatistics(String startTime, String endTime, Long deptId) {
+// return R.fail("远程调用失败");
+// }
+//
+// }
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java
new file mode 100644
index 0000000..2a2d68f
--- /dev/null
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java
@@ -0,0 +1,49 @@
+package com.hnac.hzinfo.inspect.areamonthly.vo;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+@ApiModel(value = "巡检情况列表")
+@Getter
+@Setter
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class EventListVO implements Serializable {
+
+ private static final long serialVersionUID = 3596553809412766823L;
+
+ @ApiModelProperty(value = "eventId")
+ private Long id;
+
+ @ApiModelProperty(value = "巡检对象名称")
+ private String objectName;
+ @ApiModelProperty(value = "巡检项目名称")
+ private String projectName;
+
+ /**
+ * 是否问题 0:否 1 是 默认0
+ */
+ @ApiModelProperty(value = "是否问题 0:否 1 是 默认0")
+ private String isProblem;
+
+ @DateTimeFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss"
+ )
+ @JsonFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss"
+ )
+ @ApiModelProperty(value = "登记时间")
+ private Date checkInTime;
+}
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java
new file mode 100644
index 0000000..701da86
--- /dev/null
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java
@@ -0,0 +1,138 @@
+package com.hnac.hzinfo.inspect.areamonthly.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.NullSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import org.springblade.core.tool.utils.DateUtil;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 任务对象项目内容
+ * @author ninglong
+ * @create 2020-08-24 8:55
+ */
+@Setter
+@Getter
+@ApiModel(value = "任务对象项目内容")
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class TaskObjectProjectContentVO implements Serializable {
+
+ /**
+ * 内容ID
+ */
+ @ApiModelProperty(value = "内容ID")
+ private Long contentId;
+
+ /**
+ * 内容名称
+ */
+ @ApiModelProperty(value = "内容名称")
+ private String name;
+ /**
+ * 检测标准
+ */
+ @ApiModelProperty(value = "检测标准")
+ private String description;
+
+ /**
+ * 完成标识
+ */
+ @ApiModelProperty(value = "完成标识 0 不可用 1 可用")
+ private String available;
+ /**
+ * 检测类型
+ */
+ @ApiModelProperty(value = "检测类型")
+ private String checkType;
+ /**
+ * 记录类型
+ */
+ @ApiModelProperty(value = "记录类型")
+ private String recordType;
+
+ /**
+ * 内容当前状态 0 异常 1 正常
+ */
+ @ApiModelProperty(value = "内容当前状态 0 异常 1 正常 ")
+ private String currentStatus;
+ /**
+ * 内容当前值
+ */
+ @ApiModelProperty(value = "内容当前值")
+ private String currentValue;
+
+ /**
+ * 文件地址
+ */
+ @ApiModelProperty(value = "文件地址")
+ private String fileUrl;
+
+ /**
+ * 表针识别,表盘ID
+ */
+ @JsonSerialize(nullsUsing = NullSerializer.class)
+ @ApiModelProperty(value = "表针识别,表盘ID")
+ private Long clockId;
+
+ /**
+ * 视频巡检摄像机ID
+ */
+ @JsonSerialize(nullsUsing = NullSerializer.class)
+ @ApiModelProperty(value = "视频巡检摄像机ID")
+ private Long cameraId;
+
+ /**
+ * 检测类型子类
+ */
+ @ApiModelProperty(value = "检测类型子类")
+ private String checkTypeSon;
+
+ /**
+ * 开关/灯/表盘在摄像机可视面二维坐标位置,例如:2,1 表示第三行第二列,行列均从0开始记录,默认 0,0,如果有多张图则:0,0,1( 最后一位表示所在图片,最后一位1表示第二张图),默认0,0,0
+ */
+ @ApiModelProperty(value = "开关/灯/表盘在摄像机可视面二维坐标位置,例如:2,1 表示第三行第二列,行列均从0开始记录,默认 0,0,如果有多张图则:0,0,1( 最后一位表示所在图片,最后一位1表示第二张图),默认0,0,0")
+ private String cameraAddr;
+
+
+ /**
+ * 其他参数,例如多联断路器内断路器的个数
+ */
+ @ApiModelProperty(value = "其他参数,例如多联断路器内断路器的个数")
+ private String otherParam;
+
+ /**
+ * 校验值,用来判断当前值是否正确:枚举数据通过 “ , ”隔开, 区间通过~隔开
+ */
+ @ApiModelProperty(value = "校验值,用来判断当前值是否正确:枚举数据通过 “ , ”隔开, 区间通过~隔开")
+ private String checkVal;
+
+ /**
+ * 记值方式为选择时选择值
+ */
+ @ApiModelProperty(value = "记值方式为选择时选择值")
+ private String dictType;
+
+ @ApiModelProperty(value = "实时数据")
+ private String realData;
+
+ @ApiModelProperty(value = "实时数据采集时间")
+ private String gatherTime;
+
+ @ApiModelProperty(value = "绑定物模型属性标识")
+ private String attrSignage;
+
+ @ApiModelProperty(value = "绑定物模型属性名称")
+ private String attrName;
+
+ @ApiModelProperty(value = "设备编号")
+ private String emCode;
+
+}
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java
new file mode 100644
index 0000000..0e7ee14
--- /dev/null
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java
@@ -0,0 +1,51 @@
+package com.hnac.hzinfo.inspect.areamonthly.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springblade.core.tenant.mp.TenantEntity;
+
+
+/**
+ * 实体类
+ *
+ * @author Chill
+ */
+@Data
+public class TaskObjectProjectOfflineVO extends TenantEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 任务ID
+ */
+ @ApiModelProperty(value = "任务ID")
+ private Long taskId;
+ /**
+ * 对象ID
+ */
+ @ApiModelProperty(value = "对象ID")
+ private Long objectId;
+ /**
+ * 项目ID
+ */
+ @ApiModelProperty(value = "项目ID")
+ private Long projectId;
+
+
+ /**
+ * 目标编码
+ */
+ @ApiModelProperty(value = "目标编码")
+ private String code;
+ /**
+ * 目标名称
+ */
+ @ApiModelProperty(value = "目标名称")
+ private String name;
+
+ /**
+ * 目标描述
+ */
+ @ApiModelProperty(value = "目标描述")
+ private String description;
+}
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java
new file mode 100644
index 0000000..5a2ef8a
--- /dev/null
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java
@@ -0,0 +1,34 @@
+package com.hnac.hzinfo.inspect.areamonthly.vo;
+
+import com.google.common.collect.Lists;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 任务对象项目
+ * @author ninglong
+ * @create 2020-08-24 8:52
+ */
+@Getter
+@Setter
+@ApiModel(value = "任务对象项目")
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class TaskObjectProjectVO implements Serializable {
+
+ @ApiModelProperty(value = "任务对象项目ID")
+ private Long projectId;
+ @ApiModelProperty(value = "任务对象项目名称")
+ private String projectName;
+ @ApiModelProperty(value = "项目状态")
+ private Integer status;
+
+ @Builder.Default
+ @ApiModelProperty(value = "任务对象项目内容")
+ private List contents = Lists.newArrayList();
+}
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java
new file mode 100644
index 0000000..7c14a37
--- /dev/null
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java
@@ -0,0 +1,61 @@
+package com.hnac.hzinfo.inspect.areamonthly.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.google.common.collect.Lists;
+import com.hnac.hzims.safeproduct.entity.DangerSourceEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import org.springblade.core.tool.utils.ObjectUtil;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 任务对象
+ * @author ninglong
+ * @create 2020-08-24 8:51
+ */
+@Setter
+@Getter
+@ApiModel(value = "任务对象")
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class TaskObjectVO implements Serializable {
+ /**
+ * 任务ID
+ */
+ @ApiModelProperty(value = "任务ID")
+ private Long taskId;
+
+ @ApiModelProperty(value = "任务对象ID")
+ private Long objId;
+ @ApiModelProperty(value = "任务对象名称")
+ private String objName;
+ @ApiModelProperty(value = "对象状态")
+ private Integer status;
+
+ /**
+ * 是否重复记录 0 不允许 1允许
+ */
+ @ApiModelProperty(value = "是否重复记录 0 不允许 1允许")
+ private String duplicateRecord;
+
+ @ApiModelProperty(value = "排序")
+ private Integer order;
+
+ @ApiModelProperty(value = "巡检对象危险点信息")
+ private List dangers;
+
+ @Builder.Default
+ @ApiModelProperty(value = "任务对象项目")
+ private List projects = Lists.newArrayList();
+
+ public Integer getOrder() {
+ if(ObjectUtil.isEmpty(this.order)){
+ return 1;
+ }
+ return order;
+ }
+}
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fallback/RouteFeignClientFallback.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fallback/RouteFeignClientFallback.java
new file mode 100644
index 0000000..8fa36c0
--- /dev/null
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fallback/RouteFeignClientFallback.java
@@ -0,0 +1,63 @@
+package com.hnac.hzinfo.inspect.threedimensional.fallback;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.hnac.hzinfo.inspect.plan.entity.RouteEntity;
+import com.hnac.hzinfo.inspect.threedimensional.fegin.RouteFeignClient;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 8:57
+ */
+@Component
+public class RouteFeignClientFallback implements RouteFeignClient {
+ /**
+ * 查询巡检路径管理列表
+ *
+ * @param st_re_route
+ * @param query
+ * @return
+ */
+ @Override
+ public R> list(Map st_re_route, Query query) {
+ throw new ServiceException("熔断错误");
+ }
+
+ /**
+ * 新增 代码自定义代号
+ *
+ * @param st_re_route
+ */
+ @Override
+ public R save(RouteEntity st_re_route) {
+ throw new ServiceException("熔断错误");
+ }
+
+ /**
+ * 修改 代码自定义代号
+ *
+ * @param st_re_route
+ */
+ @Override
+ public R update(RouteEntity st_re_route) {
+ throw new ServiceException("熔断错误");
+ }
+
+ /**
+ * 删除 代码自定义代号
+ *
+ * @param ids
+ */
+ @Override
+ public R remove(String ids) {
+ throw new ServiceException("熔断错误");
+ }
+}
diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fegin/RouteFeignClient.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fegin/RouteFeignClient.java
new file mode 100644
index 0000000..76881f3
--- /dev/null
+++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fegin/RouteFeignClient.java
@@ -0,0 +1,73 @@
+package com.hnac.hzinfo.inspect.threedimensional.fegin;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.hnac.hzinfo.inspect.Constants;
+import com.hnac.hzinfo.inspect.plan.entity.RouteEntity;
+import com.hnac.hzinfo.inspect.threedimensional.fallback.RouteFeignClientFallback;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.cloud.openfeign.SpringQueryMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.validation.Valid;
+import java.util.Map;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 8:55
+ */
+@FeignClient(value = Constants.APP_NAME)
+public interface RouteFeignClient {
+
+
+ /**
+ * 查询巡检路径管理列表
+ *
+ * @param st_re_route
+ * @param query
+ * @return
+ */
+ @GetMapping("/st_re_route/list")
+ public R> list(@ApiIgnore @RequestParam Map st_re_route,
+ @SpringQueryMap Query query);
+
+
+ /**
+ * 新增 代码自定义代号
+ */
+ @PostMapping("/st_re_route/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入st_re_route")
+ public R save(@RequestBody RouteEntity st_re_route);
+
+
+ /**
+ * 修改 代码自定义代号
+ */
+ @PostMapping("/st_re_route/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入st_re_route")
+ public R update(@RequestBody RouteEntity st_re_route);
+
+
+ /**
+ * 删除 代码自定义代号
+ */
+ @PostMapping("/st_re_route/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);
+}
diff --git a/hzims-service/digital-twin-display/pom.xml b/hzims-service/digital-twin-display/pom.xml
index b9ee3f2..7cd795d 100644
--- a/hzims-service/digital-twin-display/pom.xml
+++ b/hzims-service/digital-twin-display/pom.xml
@@ -73,5 +73,15 @@
${hzims.project.version}
-->
+
+
+ com.hnac.hzims
+ inspect-api
+
+
+
+ com.hnac.hzims
+ hzims-operational-api
+
\ No newline at end of file
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/DigitalTwinDisplayApplication.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/DigitalTwinDisplayApplication.java
index e5bed62..ad3bcd6 100644
--- a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/DigitalTwinDisplayApplication.java
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/DigitalTwinDisplayApplication.java
@@ -25,8 +25,8 @@ public class DigitalTwinDisplayApplication extends SpringBootServletInitializer
public final static String APP_NAME = "digital-twin-display";
static {
- System.setProperty("spring.cloud.nacos.discovery.server-addr", "http://192.168.65.105:8848");
- System.setProperty("spring.cloud.nacos.config.server-addr", "http://192.168.65.105:8848");
+ System.setProperty("spring.cloud.nacos.discovery.server-addr", "http://hadoop:8848");
+ System.setProperty("spring.cloud.nacos.config.server-addr", "http://hadoop:8848");
System.setProperty("spring.cloud.nacos.username", "nacos");
System.setProperty("spring.cloud.nacos.password", "nacos");
}
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/RouteController.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/RouteController.java
new file mode 100644
index 0000000..0e05da3
--- /dev/null
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/RouteController.java
@@ -0,0 +1,88 @@
+package com.hnac.hzims.twindisplay.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.hnac.hzims.twindisplay.service.RouteService;
+import com.hnac.hzinfo.inspect.plan.entity.RouteEntity;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.Map;
+
+/**
+ * 三维巡检
+ *
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 9:24
+ */
+@Slf4j
+@RestController
+@RequestMapping("/route")
+public class RouteController {
+
+
+ @Autowired
+ private RouteService routeService;
+
+
+ /**
+ * 查询巡检路径管理列表
+ *
+ * @param st_re_route
+ * @param query
+ * @return
+ */
+ @GetMapping("/list")
+ public R listRoute(@ApiIgnore @RequestParam Map st_re_route, Query query) {
+ BladePage pages = routeService.listRoute(st_re_route, query);
+ return R.data(pages);
+
+ }
+
+
+ /**
+ * 新增 代码自定义代号
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入st_re_route")
+ public R save(@RequestBody RouteEntity st_re_route) {
+ routeService.save(st_re_route);
+ return R.success("保存成功");
+ }
+
+
+ /**
+ * 修改 代码自定义代号
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入st_re_route")
+ public R update(@RequestBody RouteEntity st_re_route) {
+ routeService.update(st_re_route);
+ return R.success("修改成功");
+ }
+
+
+ /**
+ * 删除 代码自定义代号
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ routeService.remove(ids);
+ return R.success("删除成功");
+ }
+
+
+}
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/StatisticsController.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/StatisticsController.java
new file mode 100644
index 0000000..4023b80
--- /dev/null
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/StatisticsController.java
@@ -0,0 +1,64 @@
+package com.hnac.hzims.twindisplay.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.vo.OperDefectStatisticsVO;
+import com.hnac.hzims.operational.defect.vo.StatistictCountVo;
+import com.hnac.hzims.twindisplay.service.StatisticsService;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.tool.api.R;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cloud.openfeign.SpringQueryMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 15:27
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/defect_statistic")
+public class StatisticsController {
+
+
+ @Autowired
+ private StatisticsService statisticsService;
+
+
+
+ @GetMapping("/list")
+ @ApiOperation(value = "分页", notes = "传入statistics")
+ @ApiImplicitParams({
+ })
+ @OperationAnnotation(moduleName = "缺陷管理",title = "缺陷记录",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action
+ = "分页查询缺陷记录列表")
+ public R> list(@SpringQueryMap OperDefectStatisticsVO entity){
+
+ BladePage resultPage = statisticsService.list(entity);
+ return R.data(resultPage);
+
+ }
+
+
+
+ /**
+ * 巡检任务统计
+ * @return
+ */
+ @GetMapping("/defectStatistictCount")
+ public R defectStatistictCount(){
+
+ List statistictCountVos = statisticsService.defectStatistictCount();
+ return R.data(statistictCountVos);
+ }
+}
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/TaskController.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/TaskController.java
new file mode 100644
index 0000000..81c4dde
--- /dev/null
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/TaskController.java
@@ -0,0 +1,128 @@
+package com.hnac.hzims.twindisplay.controller;
+
+import com.hnac.hzims.twindisplay.service.TaskService;
+import com.hnac.hzims.vo.VoteChartVo;
+import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo;
+import com.hnac.hzinfo.inspect.task.entity.TaskEntity;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.tool.api.R;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cloud.openfeign.SpringQueryMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 13:45
+ */
+@Slf4j
+@RestController
+@RequestMapping("/task")
+public class TaskController {
+
+
+ @Autowired
+ private TaskService taskService;
+
+
+ /**
+ * 巡检任务分页
+ */
+ @GetMapping("/pageList/{page}/{size}")
+ @ApiOperation(value = "分页显示任务列表", notes = "传入task")
+ public R> pageList(
+ @ApiParam(name = "page", value = "当前页", required = true) @PathVariable("page") Long page,
+ @ApiParam(name = "size", value = "每页记录数", required = true) @PathVariable("size") Long size,
+ @SpringQueryMap TaskListQuery task) {
+
+ BladePage result = taskService.pageList(page, size, task);
+ return R.data(result);
+
+ }
+
+
+ // /**
+ // * 获取巡检情况列表信息
+ // */
+ // @RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST})
+ // @ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId")
+ // public R> list(Long taskId, Query query,
+ // BladeUser bladeUser) {
+ // BladePage result = taskService.list(taskId, query, bladeUser);
+ // return R.data(result);
+ //
+ // }
+
+
+ /**
+ * 查看
+ *
+ * @param id
+ * @return
+ */
+ @GetMapping(value = "/detail")
+ @ApiOperation(value = "查看,下面列表再调用eventController.list", notes = "传入taskid")
+ public R detail(@RequestParam Long id) {
+ TaskEntity task = taskService.detail(id);
+ return R.data(task);
+ }
+
+
+ /**
+ * 任务查看弹窗下面的列表
+ *
+ * @param taskId
+ * @param query
+ * @param bladeUser
+ * @return
+ */
+ @GetMapping(value = "/event/list")
+ @ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId")
+ public R> eventList(Long taskId, Query query,
+ BladeUser bladeUser) {
+
+ BladePage bladePage = taskService.eventList(taskId, query, bladeUser);
+ return R.data(bladePage);
+ }
+
+
+ /**
+ * 获取任务详情
+ */
+ @RequestMapping(value = "/getTaskById", method = {RequestMethod.GET, RequestMethod.POST})
+ @ApiOperation(value = "获取任务详情", notes = "传入taskId")
+ public R> getTaskById(@RequestParam Long id) {
+ List taskObjectVOS = taskService.getTaskById(id);
+ return R.data(taskObjectVOS);
+ }
+
+
+
+
+ /**
+ * 巡检计划统计
+ */
+ @GetMapping("/getTaskListStatistics")
+ @ApiOperation(value = "巡检计划统计", notes = "传入计划id")
+ public R> getTaskListStatistics(@RequestParam String startTime, @RequestParam String endTime,
+ @RequestParam Long deptId){
+ List taskObjectVOS = taskService.getTaskListStatistics(startTime,endTime,deptId);
+ return R.data(taskObjectVOS);
+
+ }
+}
+
+
+
+
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/RouteService.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/RouteService.java
new file mode 100644
index 0000000..5abf64f
--- /dev/null
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/RouteService.java
@@ -0,0 +1,44 @@
+package com.hnac.hzims.twindisplay.service;
+
+import com.hnac.hzinfo.inspect.plan.entity.RouteEntity;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Query;
+
+import java.util.Map;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 10:12
+ */
+public interface RouteService {
+
+ /**
+ * 查询巡检路径管理列表
+ * @param stReRoute
+ * @param query
+ * @return
+ */
+ BladePage listRoute(Map stReRoute, Query query);
+
+ /**
+ * 新增
+ * @param stReRoute
+ */
+ void save(RouteEntity stReRoute);
+
+
+ /**
+ * 修改
+ * @param stReRoute
+ */
+ void update(RouteEntity stReRoute);
+
+
+ /**
+ * 删除
+ * @param ids
+ */
+ void remove(String ids);
+}
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/StatisticsService.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/StatisticsService.java
new file mode 100644
index 0000000..2e856f1
--- /dev/null
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/StatisticsService.java
@@ -0,0 +1,32 @@
+package com.hnac.hzims.twindisplay.service;
+
+import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO;
+import com.hnac.hzims.operational.defect.vo.StatistictCountVo;
+import org.springblade.core.mp.support.BladePage;
+
+import java.util.List;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 15:28
+ */
+public interface StatisticsService {
+
+
+ /**
+ * 缺陷管理
+ * @param entity
+ * @return
+ */
+ BladePage list(OperDefectStatisticsVO entity);
+
+
+ /**
+ * 巡检任务统计
+ * @return
+ */
+ List defectStatistictCount();
+
+}
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/TaskService.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/TaskService.java
new file mode 100644
index 0000000..34f40ee
--- /dev/null
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/TaskService.java
@@ -0,0 +1,78 @@
+package com.hnac.hzims.twindisplay.service;
+
+import com.hnac.hzims.vo.VoteChartVo;
+import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo;
+import com.hnac.hzinfo.inspect.task.entity.TaskEntity;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+
+import java.util.List;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 13:49
+ */
+public interface TaskService {
+
+
+ /**
+ * 巡检任务分页
+ * @param page
+ * @param size
+ * @param task
+ * @return
+ */
+ BladePage pageList(Long page, Long size, TaskListQuery task);
+
+ //
+ // /**
+ // * 获取巡检情况列表信息
+ // * @param taskId
+ // * @param query
+ // * @param bladeUser
+ // * @return
+ // */
+ // BladePage list(Long taskId, Query query, BladeUser bladeUser);
+
+
+ /**
+ * 根据id获取检修任务
+ * @param id
+ * @return
+ */
+ TaskEntity detail(Long id);
+
+
+ /**
+ * 任务查看弹窗下面的列表
+ * @param taskId
+ * @param query
+ * @param bladeUser
+ * @return
+ */
+ BladePage eventList(Long taskId, Query query, BladeUser bladeUser);
+
+
+ /**
+ * 获取任务详情
+ * @param id
+ * @return
+ */
+ List getTaskById(Long id);
+
+
+ /**
+ * 巡检计划统计
+ * @param startTime
+ * @param endTime
+ * @param deptId
+ * @return
+ */
+ List getTaskListStatistics(String startTime, String endTime, Long deptId);
+}
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/RouteServiceImpl.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/RouteServiceImpl.java
new file mode 100644
index 0000000..71aff48
--- /dev/null
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/RouteServiceImpl.java
@@ -0,0 +1,82 @@
+package com.hnac.hzims.twindisplay.service.impl;
+
+import com.hnac.hzims.twindisplay.service.RouteService;
+import com.hnac.hzinfo.inspect.plan.entity.RouteEntity;
+import com.hnac.hzinfo.inspect.threedimensional.fegin.RouteFeignClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 10:12
+ */
+@Slf4j
+@Service("RouteServiceImpl")
+public class RouteServiceImpl implements RouteService {
+
+
+ @Autowired
+ private RouteFeignClient routeFeignClient;
+
+ /**
+ * 查询巡检路径管理列表
+ *
+ * @param stReRoute
+ * @param query
+ * @return
+ */
+ @Override
+ public BladePage listRoute(Map stReRoute, Query query) {
+ R> list = routeFeignClient.list(stReRoute, query);
+ if (list.isSuccess()) {
+ return list.getData();
+ }
+ log.error("RouteFeignClient 调用错误");
+ return null;
+ }
+
+ /**
+ * 新增
+ *
+ * @param stReRoute
+ */
+ @Override
+ public void save(RouteEntity stReRoute) {
+ R save = routeFeignClient.save(stReRoute);
+ if (!save.isSuccess()) {
+ throw new ServiceException("保存失败");
+ }
+ }
+
+ /**
+ * 修改
+ *
+ * @param stReRoute
+ */
+ @Override
+ public void update(RouteEntity stReRoute) {
+ R update = routeFeignClient.update(stReRoute);
+ if (!update.isSuccess()) {
+ throw new ServiceException("数据不存在");
+ }
+ }
+
+ /**
+ * 删除
+ *
+ * @param ids
+ */
+ @Override
+ public void remove(String ids) {
+
+ }
+}
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/StatisticsServiceImpl.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/StatisticsServiceImpl.java
new file mode 100644
index 0000000..fbb3cc8
--- /dev/null
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/StatisticsServiceImpl.java
@@ -0,0 +1,56 @@
+package com.hnac.hzims.twindisplay.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.hnac.hzims.operational.defect.feign.StatisticsFeignClient;
+import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO;
+import com.hnac.hzims.operational.defect.vo.StatistictCountVo;
+import com.hnac.hzims.twindisplay.service.StatisticsService;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.tool.api.R;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 15:30
+ */
+@Service
+public class StatisticsServiceImpl implements StatisticsService {
+
+ @Autowired
+ private StatisticsFeignClient statisticsFeignClient;
+
+ /**
+ * 缺陷管理
+ *
+ * @param entity
+ * @return
+ */
+ @Override
+ public BladePage list(OperDefectStatisticsVO entity) {
+ R> list = statisticsFeignClient.list(entity);
+ if (list.isSuccess()) {
+ return list.getData();
+ }
+ return null;
+ }
+
+ /**
+ * 巡检任务统计
+ *
+ * @return
+ */
+ @Override
+ public List defectStatistictCount() {
+
+ R> r = statisticsFeignClient.defectStatistictCount();
+ if (r.isSuccess()) {
+ return r.getData();
+ }
+ return null;
+ }
+}
diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/TaskServiceImpl.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/TaskServiceImpl.java
new file mode 100644
index 0000000..ab88bc4
--- /dev/null
+++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/TaskServiceImpl.java
@@ -0,0 +1,135 @@
+package com.hnac.hzims.twindisplay.service.impl;
+
+import com.hnac.hzims.twindisplay.service.TaskService;
+import com.hnac.hzims.vo.VoteChartVo;
+import com.hnac.hzinfo.inspect.areamonthly.feign.TaskFeignClient;
+import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo;
+import com.hnac.hzinfo.inspect.task.entity.TaskEntity;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.mp.support.BladePage;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.tool.api.R;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Author WL
+ * @Version v1.0
+ * @Serial 1.0
+ * @Date 2023/8/25 13:50
+ */
+@Slf4j
+@Service
+public class TaskServiceImpl implements TaskService {
+
+
+ @Autowired
+ @Lazy
+ private TaskFeignClient taskFeignClient;
+
+ /**
+ * 巡检任务分页
+ *
+ * @param page
+ * @param size
+ * @param task
+ * @return
+ */
+ @Override
+ public BladePage pageList(Long page, Long size, TaskListQuery task) {
+ R> pagedList = taskFeignClient.pageList(page, size, task);
+ if (pagedList.isSuccess()) {
+ return pagedList.getData();
+ }
+ log.error("巡检任务调用失败");
+ return null;
+ }
+
+ // /**
+ // * 获取巡检情况列表信息
+ // *
+ // * @param taskId
+ // * @param query
+ // * @param bladeUser
+ // * @return
+ // */
+ // @Override
+ // public BladePage list(Long taskId, Query query, BladeUser bladeUser) {
+ // R> bladePageR = taskFeignClient.list(taskId, query, bladeUser);
+ // if (bladePageR.isSuccess()) {
+ // return bladePageR.getData();
+ // }
+ // return null;
+ // }
+
+ /**
+ * 根据id获取检修任务
+ *
+ * @param id
+ * @return
+ */
+ @Override
+ public TaskEntity detail(Long id) {
+ R detail = taskFeignClient.detail(id);
+ if (detail.isSuccess()) {
+ return detail.getData();
+ }
+ return null;
+ }
+
+ /**
+ * 任务查看弹窗下面的列表
+ *
+ * @param taskId
+ * @param query
+ * @param bladeUser
+ * @return
+ */
+ @Override
+ public BladePage eventList(Long taskId, Query query, BladeUser bladeUser) {
+ R> eventList = taskFeignClient.eventList(taskId, query, bladeUser);
+ if (eventList.isSuccess()) {
+ return eventList.getData();
+ }
+ return null;
+ }
+
+ /**
+ * 获取任务详情
+ *
+ * @param id
+ * @return
+ */
+ @Override
+ public List getTaskById(Long id) {
+ R> taskById = taskFeignClient.getTaskById(id);
+ if (taskById.isSuccess()) {
+ return taskById.getData();
+ }
+ return null;
+ }
+
+ /**
+ * 巡检计划统计
+ *
+ * @param startTime
+ * @param endTime
+ * @param deptId
+ * @return
+ */
+ @Override
+ public List getTaskListStatistics(String startTime, String endTime, Long deptId) {
+ R> taskListStatistics = taskFeignClient.getTaskListStatistics(startTime, endTime, deptId);
+ if (taskListStatistics.isSuccess()) {
+ return taskListStatistics.getData();
+ }
+ return null;
+ }
+}
diff --git a/hzims-service/digital-twin-display/src/main/resources/application.yml b/hzims-service/digital-twin-display/src/main/resources/application.yml
index 0508456..de3d915 100644
--- a/hzims-service/digital-twin-display/src/main/resources/application.yml
+++ b/hzims-service/digital-twin-display/src/main/resources/application.yml
@@ -18,3 +18,4 @@ spring:
password: 1qaz2WSX!
+
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java
index b90016b..1d460b9 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java
@@ -1,6 +1,5 @@
package com.hnac.hzinfo.inspect.offline.service.impl;
-import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.equipment.feign.IEmInfoClient;
import com.hnac.hzims.equipment.vo.DeviceVO;
@@ -28,7 +27,7 @@ import com.hnac.hzinfo.inspect.plan.vo.PlanOfflineVO;
import com.hnac.hzinfo.inspect.task.entity.*;
import com.hnac.hzinfo.inspect.task.service.*;
import com.hnac.hzinfo.inspect.task.vo.TaskObjectOfflineVO;
-import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectOfflineVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectOfflineVO;
import com.hnac.hzinfo.inspect.task.vo.TaskOfflineVO;
import com.hnac.hzinfo.inspect.utils.JsonFileUtil;
import lombok.RequiredArgsConstructor;
@@ -39,8 +38,6 @@ import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.mp.base.BaseService;
@@ -55,8 +52,6 @@ import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.offline.service.IOfflineDataService;
import org.springblade.resource.feign.IOssClient;
-import org.springblade.system.user.entity.User;
-import org.springblade.system.user.feign.IUserClient;
import org.springblade.system.vo.CreateTableVO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary;
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java
index fb1ab29..b7d0859 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java
@@ -12,6 +12,7 @@ import javax.validation.Valid;
import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
@@ -62,11 +63,11 @@ public class RouteController extends BladeController {
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
action = "查询巡检路径管理列表")
- public R> list(@ApiIgnore @RequestParam Map st_re_route, Query query) {
+ public R> list(@ApiIgnore @RequestParam Map st_re_route, Query query) {
QueryWrapper queryWrapper = Condition.getQueryWrapper(st_re_route, RouteEntity.class);
queryWrapper.orderByDesc("create_time", "update_time");
IPage pages = st_re_routeService.page(Condition.getPage(query), queryWrapper);
- return R.data(pages);
+ return R.data(BladePage.of(pages));
}
/**
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/EventController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/EventController.java
index 7d6e194..de43b4c 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/EventController.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/EventController.java
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
+import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO;
import com.hnac.hzinfo.inspect.obj.entity.ObjectEntity;
import com.hnac.hzinfo.inspect.obj.entity.ProjectEntity;
import com.hnac.hzinfo.inspect.obj.services.ObjectService;
@@ -16,6 +17,7 @@ import com.hnac.hzinfo.inspect.task.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
+import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
@@ -23,11 +25,11 @@ import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.flow.core.constant.ProcessConstant;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.feign.IDictClient;
+import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -51,11 +53,17 @@ public class EventController{
/**
* 获取巡检情况列表信息
*/
- @RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST})
+ @GetMapping(value = "/list")
@ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId")
- public R> list(Long taskId, Query query, BladeUser bladeUser) {
+ public R> eventList(@RequestParam Long taskId, @SpringQueryMap Query query,
+ @SpringQueryMap BladeUser bladeUser) {
+ if (bladeUser == null) {
+ bladeUser = new BladeUser();
+ bladeUser.setTenantId("200000");
+ }
LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery().eq(EventEntity::getTaskId,taskId).orderByDesc(EventEntity::getCreateTime);
- IPage pages = eventService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ?
+ IPage pages = eventService.page(Condition.getPage(query),
+ (!BladeConstant.ADMIN_TENANT_ID.equals(bladeUser.getTenantId())) ?
queryWrapper.eq(EventEntity::getTenantId, bladeUser.getTenantId()).orderByDesc(EventEntity::getCreateTime) : queryWrapper);
IPage resultPages = new Page<>(pages.getCurrent(), pages.getSize(),pages.getTotal());
@@ -84,7 +92,7 @@ public class EventController{
result.add(EventListVO.builder().id(entity.getId()).objectName(objectName).projectName(projectName).isProblem(entity.getIsProblem()).checkInTime(entity.getCreateTime()).build());
});
resultPages.setRecords(result);
- return R.data(resultPages);
+ return R.data(BladePage.of(resultPages));
}
/**
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 3309ca8..fb68146 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
@@ -24,7 +24,7 @@ import com.hnac.hzinfo.inspect.task.service.IEventService;
import com.hnac.hzinfo.inspect.task.service.ITaskService;
import com.hnac.hzinfo.inspect.task.service.ITaskUserService;
import com.hnac.hzinfo.inspect.task.vo.TaskListQuery;
-import com.hnac.hzinfo.inspect.task.vo.TaskObjectVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO;
import com.hnac.hzinfo.inspect.task.vo.TaskVo;
import com.hnac.hzinfo.inspect.utils.Condition;
import io.swagger.annotations.*;
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.java
index 6366203..be9aae9 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.java
@@ -3,7 +3,7 @@ package com.hnac.hzinfo.inspect.task.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzinfo.inspect.task.entity.TaskObjectEntity;
import com.hnac.hzinfo.inspect.task.vo.TaskObjectOfflineVO;
-import com.hnac.hzinfo.inspect.task.vo.TaskObjectVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml
index 9c34318..a940162 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml
@@ -3,7 +3,7 @@
-
+
@@ -13,14 +13,14 @@
-
+
-
+
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.java
index 5576f33..e568a98 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.java
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.java
@@ -2,7 +2,7 @@ package com.hnac.hzinfo.inspect.task.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectEntity;
-import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectOfflineVO;
+import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectOfflineVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml
index b7716f6..f75d728 100644
--- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml
+++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml
@@ -15,7 +15,7 @@
-
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java
index 12b9695..6effa45 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO;
import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity;
import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO;
+import com.hnac.hzims.operational.defect.vo.StatistictCountVo;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
@@ -25,4 +26,10 @@ public interface IOperDefectStatisticsService extends BaseService getQueryWrapper(OperDefectStatisticsVO statistics);
+ /**
+ * 巡检任务统计
+ */
+ List defectStatistictCount();
+
+
}
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java
index 837e107..c48bfbf 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java
@@ -7,94 +7,142 @@ import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity;
import com.hnac.hzims.operational.defect.mapper.OperDefectStatisticsMapper;
import com.hnac.hzims.operational.defect.service.IOperDefectStatisticsService;
import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO;
+import com.hnac.hzims.operational.defect.vo.StatistictCount;
+import com.hnac.hzims.operational.defect.vo.StatistictCountVo;
+import com.hnac.hzims.operational.report.service.IDeptService;
+import org.apache.commons.lang3.math.NumberUtils;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
+import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.DictCache;
+import org.springblade.system.feign.ISysClient;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.ArrayList;
import java.util.List;
/**
- * 服务实现类
+ * 服务实现类
*
* @author Chill
*/
@Service
public class OperDefectStatisticsServiceImpl extends BaseServiceImpl implements IOperDefectStatisticsService {
- /**
- * 获取设备缺陷统计数据
- * @param emCode
- * @return
- */
- @Override
- public List getEMStaticstic(String emCode, String startTime, String endTime){
- List re = this.baseMapper.getEMStaticstic(emCode, startTime, endTime);
- for (OperDefectStatisticsDTO dto : re) {
- dto.setSourceCodeName(DictCache.getValue(dto.getSourceCode(), DefectConstant.SOURCE_CODE_DICT_KEY));
- }
- return re;
- }
-
- @Override
- public LambdaQueryWrapper getQueryWrapper(OperDefectStatisticsVO statistics) {
- LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new OperDefectStatisticsEntity(),statistics);
- if(Func.isNotEmpty(statistics)) {
- if (Func.isNotEmpty(statistics.getDefectCodeList())) {
- queryWrapper.in(OperDefectStatisticsEntity::getDefectCode, statistics.getDefectCodeList());
- }
- if (statistics.getActStartTime() != null) {
- queryWrapper.ge(OperDefectStatisticsEntity::getActStartTime, statistics.getActStartTime());
- }
- if (statistics.getActEndTime() != null) {
- queryWrapper.le(OperDefectStatisticsEntity::getActStartTime, statistics.getActEndTime());
- }
- if (statistics.getDefectLevel() != null) {
- queryWrapper.like(OperDefectStatisticsEntity::getDefectLevel, statistics.getDefectLevel());
- }
- if (statistics.getDisposer() != null) {
- queryWrapper.eq(OperDefectStatisticsEntity::getDisposer, statistics.getDisposer());
- }
- if (statistics.getConclusion() != null) {
- queryWrapper.like(OperDefectStatisticsEntity::getConclusion, statistics.getConclusion());
- }
- if (statistics.getName() != null) {
- queryWrapper.like(OperDefectStatisticsEntity::getName, statistics.getName());
- }
- if (statistics.getConclusionTime() != null) {
- queryWrapper.ge(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionTime());
- }
- if (Func.isNotEmpty(statistics.getConclusionEndTime())) {
- queryWrapper.le(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionEndTime());
- }
- if (statistics.getCreateTime() != null) {
- queryWrapper.ge(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateTime());
- }
- if (Func.isNotEmpty(statistics.getCreateEndTime())) {
- queryWrapper.le(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateEndTime());
- }
- if (statistics.getIsDefect() != null) {
- queryWrapper.eq(OperDefectStatisticsEntity::getIsDefect, statistics.getIsDefect());
- }
- if (statistics.getEmCode() != null) {
- queryWrapper.eq(OperDefectStatisticsEntity::getEmCode, statistics.getEmCode());
- }
- if (statistics.getIsWarehousing() != null) {
- queryWrapper.eq(OperDefectStatisticsEntity::getIsWarehousing, statistics.getIsWarehousing());
- }
- if (statistics.getSourceCode() != null) {
- queryWrapper.eq(OperDefectStatisticsEntity::getSourceCode, statistics.getSourceCode());
- }
- if (statistics.getConclusionPeople() != null) {
- queryWrapper.eq(OperDefectStatisticsEntity::getConclusionPeople, statistics.getConclusionPeople());
- }
- if (statistics.getCreateDept() != null) {
- queryWrapper.eq(OperDefectStatisticsEntity::getCreateDept, statistics.getCreateDept());
- }
-
- }
- queryWrapper.orderByDesc(OperDefectStatisticsEntity::getCreateTime);
- return queryWrapper;
- }
+
+ @Autowired
+ private ISysClient sysClient;
+
+
+ /**
+ * 获取设备缺陷统计数据
+ *
+ * @param emCode
+ * @return
+ */
+ @Override
+ public List getEMStaticstic(String emCode, String startTime, String endTime) {
+ List re = this.baseMapper.getEMStaticstic(emCode, startTime, endTime);
+ for (OperDefectStatisticsDTO dto : re) {
+ dto.setSourceCodeName(DictCache.getValue(dto.getSourceCode(), DefectConstant.SOURCE_CODE_DICT_KEY));
+ }
+ return re;
+ }
+
+ @Override
+ public LambdaQueryWrapper getQueryWrapper(OperDefectStatisticsVO statistics) {
+ LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new OperDefectStatisticsEntity(), statistics);
+ if (Func.isNotEmpty(statistics)) {
+ if (Func.isNotEmpty(statistics.getDefectCodeList())) {
+ queryWrapper.in(OperDefectStatisticsEntity::getDefectCode, statistics.getDefectCodeList());
+ }
+ if (statistics.getActStartTime() != null) {
+ queryWrapper.ge(OperDefectStatisticsEntity::getActStartTime, statistics.getActStartTime());
+ }
+ if (statistics.getActEndTime() != null) {
+ queryWrapper.le(OperDefectStatisticsEntity::getActStartTime, statistics.getActEndTime());
+ }
+ if (statistics.getDefectLevel() != null) {
+ queryWrapper.like(OperDefectStatisticsEntity::getDefectLevel, statistics.getDefectLevel());
+ }
+ if (statistics.getDisposer() != null) {
+ queryWrapper.eq(OperDefectStatisticsEntity::getDisposer, statistics.getDisposer());
+ }
+ if (statistics.getConclusion() != null) {
+ queryWrapper.like(OperDefectStatisticsEntity::getConclusion, statistics.getConclusion());
+ }
+ if (statistics.getName() != null) {
+ queryWrapper.like(OperDefectStatisticsEntity::getName, statistics.getName());
+ }
+ if (statistics.getConclusionTime() != null) {
+ queryWrapper.ge(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionTime());
+ }
+ if (Func.isNotEmpty(statistics.getConclusionEndTime())) {
+ queryWrapper.le(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionEndTime());
+ }
+ if (statistics.getCreateTime() != null) {
+ queryWrapper.ge(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateTime());
+ }
+ if (Func.isNotEmpty(statistics.getCreateEndTime())) {
+ queryWrapper.le(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateEndTime());
+ }
+ if (statistics.getIsDefect() != null) {
+ queryWrapper.eq(OperDefectStatisticsEntity::getIsDefect, statistics.getIsDefect());
+ }
+ if (statistics.getEmCode() != null) {
+ queryWrapper.eq(OperDefectStatisticsEntity::getEmCode, statistics.getEmCode());
+ }
+ if (statistics.getIsWarehousing() != null) {
+ queryWrapper.eq(OperDefectStatisticsEntity::getIsWarehousing, statistics.getIsWarehousing());
+ }
+ if (statistics.getSourceCode() != null) {
+ queryWrapper.eq(OperDefectStatisticsEntity::getSourceCode, statistics.getSourceCode());
+ }
+ if (statistics.getConclusionPeople() != null) {
+ queryWrapper.eq(OperDefectStatisticsEntity::getConclusionPeople, statistics.getConclusionPeople());
+ }
+ if (statistics.getCreateDept() != null) {
+ queryWrapper.eq(OperDefectStatisticsEntity::getCreateDept, statistics.getCreateDept());
+ }
+
+ }
+ queryWrapper.orderByDesc(OperDefectStatisticsEntity::getCreateTime);
+ return queryWrapper;
+ }
+
+ /**
+ * 巡检任务统计
+ */
+ @Override
+ public List defectStatistictCount() {
+ List statistictCounts = baseMapper.defectStatistictCount();
+
+ List result = new ArrayList<>();
+ for (StatistictCount statistictCount : statistictCounts) {
+ StatistictCountVo statistictCountVo = new StatistictCountVo();
+
+ R deptName = sysClient.getDeptName(Long.valueOf(statistictCount.getCreateDept()));
+ if (deptName != null) {
+ statistictCountVo.setCreateDeptName(deptName.getData());
+ }
+ statistictCountVo.setCreateDept(statistictCount.getCreateDept());
+ //未处理
+ if (statistictCount.getHandleStatus() == 0) {
+ statistictCountVo.setUntreatedCount(statistictCount.getCount());
+ }
+ //已处理
+ if (statistictCount.getHandleStatus() == 1) {
+ statistictCountVo.setProcessedCount(statistictCount.getCount());
+ }
+
+ result.add(statistictCountVo);
+
+ }
+
+ return result;
+
+
+ }
}
diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EstimateController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EstimateController.java
index f06ddf9..89e3e54 100644
--- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EstimateController.java
+++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EstimateController.java
@@ -54,7 +54,7 @@ public class EstimateController {
*/
@PutMapping("/update")
public R update(@RequestBody Estimate estimate) {
- estimateService.save(estimate);
+ estimateService.updateById(estimate);
return R.success("修改成功");
}
@@ -64,7 +64,7 @@ public class EstimateController {
*
* @return
*/
- @PutMapping("/remove/{id}")
+ @DeleteMapping("/remove/{id}")
public R remove(@PathVariable String id) {
estimateService.removeById(id);
return R.success("删除成功");