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/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/EventListVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java similarity index 96% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/EventListVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java index 89c396b..2a2d68f 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/EventListVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import java.io.Serializable; import java.util.Date; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectContentVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java similarity index 98% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectContentVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java index 3f129b5..701da86 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectContentVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectOfflineVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java similarity index 94% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectOfflineVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java index 5bf8aa6..0e7ee14 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectOfflineVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java similarity index 94% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java index 7a36742..5a2ef8a 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import com.google.common.collect.Lists; import io.swagger.annotations.ApiModel; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java similarity index 96% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java index 040e03c..7c14a37 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import com.baomidou.mybatisplus.annotation.TableField; import com.google.common.collect.Lists; 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 @@ - SELECT * from hz_st_ex_object_project where IS_DELETED = 0 AND task_id IN diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectContentService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectContentService.java index 12008f7..d0a2ef0 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectContentService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectContentService.java @@ -1,6 +1,6 @@ package com.hnac.hzinfo.inspect.task.service; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectContentVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectContentVO; import org.springblade.core.mp.base.BaseService; import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectContentEntity; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectService.java index 64628ae..1f49aec 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectService.java @@ -1,6 +1,6 @@ package com.hnac.hzinfo.inspect.task.service; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectOfflineVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectOfflineVO; import org.springblade.core.mp.base.BaseService; import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectEntity; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectService.java index 469e963..66a1265 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectService.java @@ -1,7 +1,7 @@ package com.hnac.hzinfo.inspect.task.service; 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.springblade.core.mp.base.BaseService; import com.hnac.hzinfo.inspect.task.entity.TaskObjectEntity; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskService.java index 7f62c5a..5715b8b 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hnac.hzims.vo.SafeCheckStatisticVO; import com.hnac.hzims.vo.VoteChartVo; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import com.hnac.hzinfo.inspect.task.dto.TaskDTO; import com.hnac.hzinfo.inspect.task.entity.InspectionTaskSMS; import com.hnac.hzinfo.inspect.task.entity.TaskEntity; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectContentServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectContentServiceImpl.java index 0beb398..daf4e6c 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectContentServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectContentServiceImpl.java @@ -1,16 +1,13 @@ package com.hnac.hzinfo.inspect.task.service.impl; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Lists; -import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.feign.IStationClient; import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO; import com.hnac.hzinfo.inspect.obj.entity.ContentEntity; import com.hnac.hzinfo.inspect.obj.services.ContentService; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectContentVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectContentVO; import com.hnac.hzinfo.sdk.v5.redis.RedisClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -21,15 +18,9 @@ import com.hnac.hzinfo.inspect.task.service.ITaskObjectProjectContentService; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.Func; -import org.springblade.core.tool.utils.ObjectUtil; -import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.ZoneId; import java.util.List; -import java.util.Optional; /** * 服务实现类 diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectServiceImpl.java index b115b5c..1004aa1 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectServiceImpl.java @@ -1,6 +1,6 @@ package com.hnac.hzinfo.inspect.task.service.impl; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectOfflineVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectOfflineVO; import org.springblade.core.mp.base.BaseServiceImpl; import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectEntity; import com.hnac.hzinfo.inspect.task.mapper.TaskObjectProjectMapper; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectServiceImpl.java index d421097..3643624 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectServiceImpl.java @@ -7,8 +7,7 @@ import com.hnac.hzinfo.inspect.task.mapper.TaskObjectMapper; import com.hnac.hzinfo.inspect.task.service.ITaskObjectProjectContentService; import com.hnac.hzinfo.inspect.task.service.ITaskObjectService; import com.hnac.hzinfo.inspect.task.vo.TaskObjectOfflineVO; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectContentVO; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import lombok.AllArgsConstructor; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.utils.CollectionUtil; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java index d7527c4..a710273 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java @@ -16,6 +16,9 @@ import com.hnac.hzims.safeproduct.feign.IImsMonCameraInfoClient; import com.hnac.hzims.vo.SafeCheckStatisticVO; import com.hnac.hzims.vo.VoteChartVo; import com.hnac.hzinfo.inspect.ai.service.IRobotService; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectContentVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import com.hnac.hzinfo.inspect.obj.ObjContants; import com.hnac.hzinfo.inspect.obj.services.IObjectDangerService; import com.hnac.hzinfo.inspect.plan.PlanContants; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/OperationApplication.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/OperationApplication.java index efb9cf6..f17bc99 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/OperationApplication.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/OperationApplication.java @@ -40,7 +40,7 @@ public class OperationApplication extends SpringBootServletInitializer { static { - System.setProperty("spring.cloud.nacos.discovery.server-addr", "http://hadoop:8848"); + System.setProperty("spring.cloud.nacos.discovery.erver-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/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 cd4e5b2..6045079 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 @@ -10,6 +10,7 @@ import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO; import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity; import com.hnac.hzims.operational.defect.service.IOperDefectStatisticsService; import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; +import com.hnac.hzims.operational.defect.vo.StatistictCountVo; import com.hnac.hzims.operational.defect.wrapper.OperDefectStatisticsWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; @@ -18,6 +19,7 @@ import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.log.annotation.ApiLog; +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; @@ -25,6 +27,7 @@ import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.system.entity.Dept; import org.springblade.system.feign.ISysClient; +import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -61,14 +64,14 @@ public class OperDefectStatisticsController extends BladeController { * 分页 代码自定义代号 */ @ApiLog - @PostMapping("/list") + @GetMapping("/list") @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入statistics") @ApiImplicitParams({ }) @OperationAnnotation(moduleName = "缺陷管理",title = "缺陷记录",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action = "分页查询缺陷记录列表") - public R> list(@RequestBody OperDefectStatisticsVO entity) { + public R> list(@SpringQueryMap OperDefectStatisticsVO entity) { Query query=new Query(); query.setCurrent(entity.getCurrent()); query.setSize(entity.getSize()); @@ -84,7 +87,7 @@ public class OperDefectStatisticsController extends BladeController { return o; }).collect(Collectors.toList())); } - return R.data(vos); + return R.data(BladePage.of(vos)); } /** @@ -141,4 +144,15 @@ public class OperDefectStatisticsController extends BladeController { return R.status(statisticsService.deleteLogic(Func.toLongList(ids))); }*/ + + /** + * 巡检任务统计 + * @return + */ + @GetMapping("/defectStatistictCount") + public R> defectStatistictCount(){ + List statistictCountVos = statisticsService.defectStatistictCount(); + return R.data(statistictCountVos); + } + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.java index 2a2714e..ebbf25b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.java @@ -1,5 +1,6 @@ package com.hnac.hzims.operational.defect.mapper; +import com.hnac.hzims.operational.defect.vo.StatistictCount; import org.springblade.core.datascope.annotation.UserDataAuth; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO; @@ -26,4 +27,11 @@ public interface OperDefectStatisticsMapper extends UserDataScopeBaseMapper getEMStaticstic(@Param("emCode") String emCode, @Param("startTime") String startTime, @Param("endTime") String endTime); + + /** + * 巡检任务统计 + * @return + */ + List defectStatistictCount(); + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml index a996ca2..77ec3d9 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml @@ -15,4 +15,8 @@ GROUP BY SOURCE_CODE + 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("删除成功");