Browse Source

三维巡检接口

zhongwei
段飞宇 1 year ago
parent
commit
f1ef0d382c
  1. 1
      hzims-service-api/digital-twin-display-api/pom.xml
  2. 39
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClient.java
  3. 34
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClientFallback.java
  4. 24
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCount.java
  5. 35
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCountVo.java
  6. 46
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/TaskFeignClient.java
  7. 126
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/fallback/TaskFeignClientFallback.java
  8. 2
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java
  9. 2
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java
  10. 2
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java
  11. 2
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java
  12. 2
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java
  13. 63
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fallback/RouteFeignClientFallback.java
  14. 73
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fegin/RouteFeignClient.java
  15. 10
      hzims-service/digital-twin-display/pom.xml
  16. 4
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/DigitalTwinDisplayApplication.java
  17. 88
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/RouteController.java
  18. 64
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/StatisticsController.java
  19. 128
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/TaskController.java
  20. 44
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/RouteService.java
  21. 32
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/StatisticsService.java
  22. 78
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/TaskService.java
  23. 82
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/RouteServiceImpl.java
  24. 56
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/StatisticsServiceImpl.java
  25. 135
      hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/TaskServiceImpl.java
  26. 1
      hzims-service/digital-twin-display/src/main/resources/application.yml
  27. 7
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java
  28. 5
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java
  29. 18
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/EventController.java
  30. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java
  31. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.java
  32. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml
  33. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.java
  34. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml
  35. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectContentService.java
  36. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectService.java
  37. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectService.java
  38. 1
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskService.java
  39. 11
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectContentServiceImpl.java
  40. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectServiceImpl.java
  41. 3
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectServiceImpl.java
  42. 3
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java
  43. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/OperationApplication.java
  44. 20
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java
  45. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.java
  46. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml
  47. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java
  48. 54
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java
  49. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EstimateController.java

1
hzims-service-api/digital-twin-display-api/pom.xml

@ -9,6 +9,7 @@
<version>4.0.0-SNAPSHOT</version>
</parent>
<artifactId>digital-twin-display-api</artifactId>
<packaging>jar</packaging>
<version>${hzims.project.version}</version>

39
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<BladePage<OperDefectStatisticsVO>> list(@SpringQueryMap OperDefectStatisticsVO entity);
/**
* 巡检任务统计
* @return
*/
@GetMapping("/defect_statistic/defectStatistictCount")
public R<List<StatistictCountVo>> defectStatistictCount();
}

34
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<BladePage<OperDefectStatisticsVO>> list(OperDefectStatisticsVO entity) {
throw new ServiceException("熔断错误");
}
/**
* 巡检任务统计
*
* @return
*/
@Override
public R<List<StatistictCountVo>> defectStatistictCount() {
return null;
}
}

24
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;
}

35
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;
}

46
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<BladePage<TaskVo>> list(@SpringQueryMap TaskListQuery task,@SpringQueryMap Query query);
public R<BladePage<TaskVo>> list(@SpringQueryMap TaskListQuery task, @SpringQueryMap Query query);
@GetMapping(value = "/task/detail")
@ApiOperation(value = "查看,下面列表再调用eventController.list", notes = "传入taskid")
public R<TaskEntity> detail(@RequestParam Long id);
/**
* 巡检任务分页
*/
@GetMapping("/task/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,
@PathVariable("page") Long page,
@PathVariable("size") Long size,
@SpringQueryMap TaskListQuery task);
@GetMapping(value = "/task/event/list")
@ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId")
public R<BladePage<EventListVO>> eventList(@RequestParam Long taskId, @SpringQueryMap Query query,
@SpringQueryMap BladeUser bladeUser);
/**
* 获取任务详情
*/
@GetMapping(value = "/task/getTaskById")
@ApiOperation(value = "获取任务详情", notes = "传入taskId")
public R<List<TaskObjectVO>> getTaskById(@RequestParam Long id);
/**
* 巡检计划统计
*/
@GetMapping("task/getTaskListStatistics")
@ApiOperation(value = "巡检计划统计", notes = "传入计划id")
public R<List<VoteChartVo>> getTaskListStatistics(@RequestParam String startTime,@RequestParam String endTime,
@RequestParam Long deptId);
}

126
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<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("远程调用失败");
// }
//
// }

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/EventListVO.java → 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;

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectContentVO.java → 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;

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectOfflineVO.java → 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;

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectVO.java → 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;

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectVO.java → 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;

63
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<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("熔断错误");
}
}

73
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<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);
}

10
hzims-service/digital-twin-display/pom.xml

@ -73,5 +73,15 @@
<version>${hzims.project.version}</version>
</dependency>-->
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>inspect-api</artifactId>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-operational-api</artifactId>
</dependency>
</dependencies>
</project>

4
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");
}

88
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<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("删除成功");
}
}

64
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<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);
}
}

128
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<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);
}
}

44
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<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);
}

32
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<OperDefectStatisticsVO> list(OperDefectStatisticsVO entity);
/**
* 巡检任务统计
* @return
*/
List<StatistictCountVo> defectStatistictCount();
}

78
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<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);
}

82
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<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) {
}
}

56
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<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;
}
}

135
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<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;
}
}

1
hzims-service/digital-twin-display/src/main/resources/application.yml

@ -18,3 +18,4 @@ spring:
password: 1qaz2WSX!

7
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;

5
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<IPage<RouteEntity>> list(@ApiIgnore @RequestParam Map<String, Object> st_re_route, Query query) {
public R<BladePage<RouteEntity>> list(@ApiIgnore @RequestParam Map<String, Object> st_re_route, Query query) {
QueryWrapper<RouteEntity> queryWrapper = Condition.getQueryWrapper(st_re_route, RouteEntity.class);
queryWrapper.orderByDesc("create_time", "update_time");
IPage<RouteEntity> pages = st_re_routeService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
return R.data(BladePage.of(pages));
}
/**

18
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<IPage<EventListVO>> list(Long taskId, Query query, BladeUser bladeUser) {
public R<BladePage<EventListVO>> eventList(@RequestParam Long taskId, @SpringQueryMap Query query,
@SpringQueryMap BladeUser bladeUser) {
if (bladeUser == null) {
bladeUser = new BladeUser();
bladeUser.setTenantId("200000");
}
LambdaQueryWrapper<EventEntity> queryWrapper = Wrappers.<EventEntity>lambdaQuery().eq(EventEntity::getTaskId,taskId).orderByDesc(EventEntity::getCreateTime);
IPage<EventEntity> pages = eventService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ?
IPage<EventEntity> pages = eventService.page(Condition.getPage(query),
(!BladeConstant.ADMIN_TENANT_ID.equals(bladeUser.getTenantId())) ?
queryWrapper.eq(EventEntity::getTenantId, bladeUser.getTenantId()).orderByDesc(EventEntity::getCreateTime) : queryWrapper);
IPage<EventListVO> 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));
}
/**

2
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.*;

2
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;

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.hnac.hzinfo.inspect.task.mapper.TaskObjectMapper">
<resultMap id="TaskObjectMap" type="com.hnac.hzinfo.inspect.task.vo.TaskObjectVO">
<resultMap id="TaskObjectMap" type="com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO">
<result column="TASK_ID" property="taskId"/>
<result column="OBJECT_ID" property="objId"/>
<result column="NAME" property="objName"/>
@ -13,14 +13,14 @@
</resultMap>
<resultMap id="TaskObjectProjectMap" type="com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectVO">
<resultMap id="TaskObjectProjectMap" type="com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectVO">
<result column="PROJECT_ID" property="projectId"/>
<result column="PROJECT_NAME" property="projectName"/>
<result column="PRJ_STATUS" property="status"/>
<collection property="contents" resultMap="TaskObjectProjectContentMap" />
</resultMap>
<resultMap id="TaskObjectProjectContentMap" type="com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectContentVO">
<resultMap id="TaskObjectProjectContentMap" type="com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectContentVO">
<result column="CONTENT_ID" property="contentId"/>
<result column="CONTENT_NAME" property="name"/>
<result column="AVAILABLE" property="available"/>

2
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;

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml

@ -15,7 +15,7 @@
</select>
<select id="getObjectProjectData" resultType="com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectOfflineVO">
<select id="getObjectProjectData" resultType="com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectOfflineVO">
SELECT * from hz_st_ex_object_project
where IS_DELETED = 0
AND task_id IN

2
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;

2
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;

2
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;

1
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;

11
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;
/**
* 服务实现类

2
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;

3
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;

3
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;

2
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");

20
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<IPage<OperDefectStatisticsVO>> list(@RequestBody OperDefectStatisticsVO entity) {
public R<BladePage<OperDefectStatisticsVO>> 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<List<StatistictCountVo>> defectStatistictCount(){
List<StatistictCountVo> statistictCountVos = statisticsService.defectStatistictCount();
return R.data(statistictCountVos);
}
}

8
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<Oper
@UserDataAuth
List<OperDefectStatisticsDTO> getEMStaticstic(@Param("emCode") String emCode, @Param("startTime") String startTime, @Param("endTime") String endTime);
/**
* 巡检任务统计
* @return
*/
List<StatistictCount> defectStatistictCount();
}

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml

@ -15,4 +15,8 @@
</if>
GROUP BY SOURCE_CODE
</select>
<select id="defectStatistictCount" resultType="com.hnac.hzims.operational.defect.vo.StatistictCount">
select create_dept createDept,count(1) count,handle_status handleStatus from hzims_oper_defect_statistics
where CREATE_DEPT is not null and IS_DEFECT = 0 and SOURCE_CODE = 'XJ' group by create_dept, handle_status
</select>
</mapper>

7
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<OperDefectStat
LambdaQueryWrapper<OperDefectStatisticsEntity> getQueryWrapper(OperDefectStatisticsVO statistics);
/**
* 巡检任务统计
*/
List<StatistictCountVo> defectStatistictCount();
}

54
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java

@ -7,12 +7,20 @@ 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;
/**
@ -23,13 +31,19 @@ import java.util.List;
@Service
public class OperDefectStatisticsServiceImpl extends BaseServiceImpl<OperDefectStatisticsMapper, OperDefectStatisticsEntity> implements IOperDefectStatisticsService {
@Autowired
private ISysClient sysClient;
/**
* 获取设备缺陷统计数据
*
* @param emCode
* @return
*/
@Override
public List<OperDefectStatisticsDTO> getEMStaticstic(String emCode, String startTime, String endTime){
public List<OperDefectStatisticsDTO> getEMStaticstic(String emCode, String startTime, String endTime) {
List<OperDefectStatisticsDTO> re = this.baseMapper.getEMStaticstic(emCode, startTime, endTime);
for (OperDefectStatisticsDTO dto : re) {
dto.setSourceCodeName(DictCache.getValue(dto.getSourceCode(), DefectConstant.SOURCE_CODE_DICT_KEY));
@ -39,8 +53,8 @@ public class OperDefectStatisticsServiceImpl extends BaseServiceImpl<OperDefectS
@Override
public LambdaQueryWrapper<OperDefectStatisticsEntity> getQueryWrapper(OperDefectStatisticsVO statistics) {
LambdaQueryWrapper<OperDefectStatisticsEntity> queryWrapper = Condition.getQueryWrapper(new OperDefectStatisticsEntity(),statistics);
if(Func.isNotEmpty(statistics)) {
LambdaQueryWrapper<OperDefectStatisticsEntity> queryWrapper = Condition.getQueryWrapper(new OperDefectStatisticsEntity(), statistics);
if (Func.isNotEmpty(statistics)) {
if (Func.isNotEmpty(statistics.getDefectCodeList())) {
queryWrapper.in(OperDefectStatisticsEntity::getDefectCode, statistics.getDefectCodeList());
}
@ -97,4 +111,38 @@ public class OperDefectStatisticsServiceImpl extends BaseServiceImpl<OperDefectS
queryWrapper.orderByDesc(OperDefectStatisticsEntity::getCreateTime);
return queryWrapper;
}
/**
* 巡检任务统计
*/
@Override
public List<StatistictCountVo> defectStatistictCount() {
List<StatistictCount> statistictCounts = baseMapper.defectStatistictCount();
List<StatistictCountVo> result = new ArrayList<>();
for (StatistictCount statistictCount : statistictCounts) {
StatistictCountVo statistictCountVo = new StatistictCountVo();
R<String> 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;
}
}

4
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("删除成功");

Loading…
Cancel
Save