段飞宇
1 year ago
54 changed files with 1635 additions and 507 deletions
@ -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<BladePage<OperDefectStatisticsVO>> list(@SpringQueryMap OperDefectStatisticsVO entity); |
||||
|
||||
|
||||
|
||||
/** |
||||
* 巡检任务统计 |
||||
* @return |
||||
*/ |
||||
@GetMapping("/defect_statistic/defectStatistictCount") |
||||
public R<List<StatistictCountVo>> defectStatistictCount(); |
||||
} |
@ -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<BladePage<OperDefectStatisticsVO>> list(OperDefectStatisticsVO entity) { |
||||
throw new ServiceException("熔断错误"); |
||||
} |
||||
|
||||
/** |
||||
* 巡检任务统计 |
||||
* |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public R<List<StatistictCountVo>> defectStatistictCount() { |
||||
return null; |
||||
} |
||||
} |
@ -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; |
||||
|
||||
|
||||
} |
@ -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; |
||||
|
||||
|
||||
} |
@ -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<BladePage<TaskVo>> list(TaskListQuery task, Query query) { |
||||
|
||||
return R.fail("远程调用失败"); |
||||
} |
||||
|
||||
@Override |
||||
public R<TaskEntity> detail(Long id) { |
||||
return R.fail("远程调用失败"); |
||||
} |
||||
|
||||
/** |
||||
* 巡检任务分页 |
||||
* |
||||
* @param page |
||||
* @param size |
||||
* @param task |
||||
*/ |
||||
@Override |
||||
public R<BladePage<TaskVo>> 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<BladePage<TaskVo>> list(TaskListQuery task, Query query) {
|
||||
//
|
||||
// return R.fail("远程调用失败");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public R<TaskEntity> detail(Long id) {
|
||||
// return R.fail("远程调用失败");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 巡检任务分页
|
||||
// *
|
||||
// * @param page
|
||||
// * @param size
|
||||
// * @param task
|
||||
// */
|
||||
// @Override
|
||||
// public R<BladePage<TaskVo>> pageList(Long page, Long size, TaskListQuery task) {
|
||||
// return R.fail("远程调用失败");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public R<BladePage<EventListVO>> eventList(Long taskId, Query query, BladeUser bladeUser) {
|
||||
// return R.fail("远程调用失败");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取任务详情
|
||||
// *
|
||||
// * @param id
|
||||
// */
|
||||
// @Override
|
||||
// public R<List<TaskObjectVO>> getTaskById(Long id) {
|
||||
// return R.fail("远程调用失败");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 巡检计划统计
|
||||
// *
|
||||
// * @param startTime
|
||||
// * @param endTime
|
||||
// * @param deptId
|
||||
// */
|
||||
// @Override
|
||||
// public R<List<VoteChartVo>> getTaskListStatistics(String startTime, String endTime, Long deptId) {
|
||||
// return R.fail("远程调用失败");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
@ -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; |
@ -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; |
@ -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; |
@ -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; |
@ -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; |
@ -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<BladePage<RouteEntity>> list(Map<String, Object> 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("熔断错误"); |
||||
} |
||||
} |
@ -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<BladePage<RouteEntity>> list(@ApiIgnore @RequestParam Map<String, Object> 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); |
||||
} |
@ -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<String, Object> st_re_route, Query query) { |
||||
BladePage<RouteEntity> 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("删除成功"); |
||||
} |
||||
|
||||
|
||||
} |
@ -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<BladePage<OperDefectStatisticsVO>> list(@SpringQueryMap OperDefectStatisticsVO entity){ |
||||
|
||||
BladePage<OperDefectStatisticsVO> resultPage = statisticsService.list(entity); |
||||
return R.data(resultPage); |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
/** |
||||
* 巡检任务统计 |
||||
* @return |
||||
*/ |
||||
@GetMapping("/defectStatistictCount") |
||||
public R defectStatistictCount(){ |
||||
|
||||
List<StatistictCountVo> statistictCountVos = statisticsService.defectStatistictCount(); |
||||
return R.data(statistictCountVos); |
||||
} |
||||
} |
@ -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<BladePage<TaskVo>> 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<TaskVo> result = taskService.pageList(page, size, task); |
||||
return R.data(result); |
||||
|
||||
} |
||||
|
||||
|
||||
// /**
|
||||
// * 获取巡检情况列表信息
|
||||
// */
|
||||
// @RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST})
|
||||
// @ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId")
|
||||
// public R<BladePage<EventListVO>> list(Long taskId, Query query,
|
||||
// BladeUser bladeUser) {
|
||||
// BladePage<EventListVO> result = taskService.list(taskId, query, bladeUser);
|
||||
// return R.data(result);
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
/** |
||||
* 查看 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@GetMapping(value = "/detail") |
||||
@ApiOperation(value = "查看,下面列表再调用eventController.list", notes = "传入taskid") |
||||
public R<TaskEntity> 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<BladePage<EventListVO>> eventList(Long taskId, Query query, |
||||
BladeUser bladeUser) { |
||||
|
||||
BladePage<EventListVO> bladePage = taskService.eventList(taskId, query, bladeUser); |
||||
return R.data(bladePage); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 获取任务详情 |
||||
*/ |
||||
@RequestMapping(value = "/getTaskById", method = {RequestMethod.GET, RequestMethod.POST}) |
||||
@ApiOperation(value = "获取任务详情", notes = "传入taskId") |
||||
public R<List<TaskObjectVO>> getTaskById(@RequestParam Long id) { |
||||
List<TaskObjectVO> taskObjectVOS = taskService.getTaskById(id); |
||||
return R.data(taskObjectVOS); |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
/** |
||||
* 巡检计划统计 |
||||
*/ |
||||
@GetMapping("/getTaskListStatistics") |
||||
@ApiOperation(value = "巡检计划统计", notes = "传入计划id") |
||||
public R<List<VoteChartVo>> getTaskListStatistics(@RequestParam String startTime, @RequestParam String endTime, |
||||
@RequestParam Long deptId){ |
||||
List<VoteChartVo> taskObjectVOS = taskService.getTaskListStatistics(startTime,endTime,deptId); |
||||
return R.data(taskObjectVOS); |
||||
|
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
|
@ -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<RouteEntity> listRoute(Map<String, Object> stReRoute, Query query); |
||||
|
||||
/** |
||||
* 新增 |
||||
* @param stReRoute |
||||
*/ |
||||
void save(RouteEntity stReRoute); |
||||
|
||||
|
||||
/** |
||||
* 修改 |
||||
* @param stReRoute |
||||
*/ |
||||
void update(RouteEntity stReRoute); |
||||
|
||||
|
||||
/** |
||||
* 删除 |
||||
* @param ids |
||||
*/ |
||||
void remove(String ids); |
||||
} |
@ -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<OperDefectStatisticsVO> list(OperDefectStatisticsVO entity); |
||||
|
||||
|
||||
/** |
||||
* 巡检任务统计 |
||||
* @return |
||||
*/ |
||||
List<StatistictCountVo> defectStatistictCount(); |
||||
|
||||
} |
@ -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<TaskVo> pageList(Long page, Long size, TaskListQuery task); |
||||
|
||||
//
|
||||
// /**
|
||||
// * 获取巡检情况列表信息
|
||||
// * @param taskId
|
||||
// * @param query
|
||||
// * @param bladeUser
|
||||
// * @return
|
||||
// */
|
||||
// BladePage<EventListVO> list(Long taskId, Query query, BladeUser bladeUser);
|
||||
|
||||
|
||||
/** |
||||
* 根据id获取检修任务 |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
TaskEntity detail(Long id); |
||||
|
||||
|
||||
/** |
||||
* 任务查看弹窗下面的列表 |
||||
* @param taskId |
||||
* @param query |
||||
* @param bladeUser |
||||
* @return |
||||
*/ |
||||
BladePage<EventListVO> eventList(Long taskId, Query query, BladeUser bladeUser); |
||||
|
||||
|
||||
/** |
||||
* 获取任务详情 |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
List<TaskObjectVO> getTaskById(Long id); |
||||
|
||||
|
||||
/** |
||||
* 巡检计划统计 |
||||
* @param startTime |
||||
* @param endTime |
||||
* @param deptId |
||||
* @return |
||||
*/ |
||||
List<VoteChartVo> getTaskListStatistics(String startTime, String endTime, Long deptId); |
||||
} |
@ -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<RouteEntity> listRoute(Map<String, Object> stReRoute, Query query) { |
||||
R<BladePage<RouteEntity>> 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) { |
||||
|
||||
} |
||||
} |
@ -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<OperDefectStatisticsVO> list(OperDefectStatisticsVO entity) { |
||||
R<BladePage<OperDefectStatisticsVO>> list = statisticsFeignClient.list(entity); |
||||
if (list.isSuccess()) { |
||||
return list.getData(); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
/** |
||||
* 巡检任务统计 |
||||
* |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public List<StatistictCountVo> defectStatistictCount() { |
||||
|
||||
R<List<StatistictCountVo>> r = statisticsFeignClient.defectStatistictCount(); |
||||
if (r.isSuccess()) { |
||||
return r.getData(); |
||||
} |
||||
return null; |
||||
} |
||||
} |
@ -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<TaskVo> pageList(Long page, Long size, TaskListQuery task) { |
||||
R<BladePage<TaskVo>> 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<EventListVO> list(Long taskId, Query query, BladeUser bladeUser) {
|
||||
// R<BladePage<EventListVO>> 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<TaskEntity> detail = taskFeignClient.detail(id); |
||||
if (detail.isSuccess()) { |
||||
return detail.getData(); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
/** |
||||
* 任务查看弹窗下面的列表 |
||||
* |
||||
* @param taskId |
||||
* @param query |
||||
* @param bladeUser |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public BladePage<EventListVO> eventList(Long taskId, Query query, BladeUser bladeUser) { |
||||
R<BladePage<EventListVO>> eventList = taskFeignClient.eventList(taskId, query, bladeUser); |
||||
if (eventList.isSuccess()) { |
||||
return eventList.getData(); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
/** |
||||
* 获取任务详情 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public List<TaskObjectVO> getTaskById(Long id) { |
||||
R<List<TaskObjectVO>> taskById = taskFeignClient.getTaskById(id); |
||||
if (taskById.isSuccess()) { |
||||
return taskById.getData(); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
/** |
||||
* 巡检计划统计 |
||||
* |
||||
* @param startTime |
||||
* @param endTime |
||||
* @param deptId |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public List<VoteChartVo> getTaskListStatistics(String startTime, String endTime, Long deptId) { |
||||
R<List<VoteChartVo>> taskListStatistics = taskFeignClient.getTaskListStatistics(startTime, endTime, deptId); |
||||
if (taskListStatistics.isSuccess()) { |
||||
return taskListStatistics.getData(); |
||||
} |
||||
return null; |
||||
} |
||||
} |
Loading…
Reference in new issue