From f8e5c61f661347a53001421c9c8af2237cf81e64 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Sun, 4 Feb 2024 19:16:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E4=BB=BB=E5=8A=A1=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspect/task/vo/InspectTaskExportVO.java | 4 ++ .../inspect/task/controller/TaskController.java | 14 ++--- .../hzinfo/inspect/task/mapper/TaskMapper.java | 4 ++ .../hnac/hzinfo/inspect/task/mapper/TaskMapper.xml | 26 +++++++++ .../hzinfo/inspect/task/service/ITaskService.java | 2 +- .../inspect/task/service/impl/TaskServiceImpl.java | 61 ++++++++++++---------- 6 files changed, 76 insertions(+), 35 deletions(-) diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/vo/InspectTaskExportVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/vo/InspectTaskExportVO.java index 09ebb52..8dcb112 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/vo/InspectTaskExportVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/vo/InspectTaskExportVO.java @@ -71,5 +71,9 @@ public class InspectTaskExportVO { @ExcelProperty(value = "巡检状态", index = 9) @ColumnWidth(value = 20) private String status; + @ApiModelProperty("巡检类型") + @ExcelProperty(value = "巡检类型", index = 10) + @ColumnWidth(value = 20) + private String type; } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java index 314dff3..c82d332 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java @@ -120,7 +120,7 @@ public class TaskController extends BladeController { @PostMapping("/listPage") @ApiOperation(value = "巡检任务分页查询-站长级", notes = "传入task") @ApiOperationSupport(order = 1) - public R> listPage(@RequestBody TaskDTO taskDTO) { + public R> listPage(@RequestBody TaskDTO taskDTO) { return R.data(taskService.page(taskDTO)); } @@ -158,12 +158,12 @@ public class TaskController extends BladeController { @ApiOperation(value = "巡检任务导出", notes = "传入计划id") public void exportTaskList(HttpServletResponse response,@RequestBody TaskDTO task) { try { - if(ObjectUtils.isEmpty(task.getStartTime())&&ObjectUtils.isEmpty(task.getEndTime())){ - LocalDateTime date = LocalDateTime.now(); - LocalDateTime firstDay = date.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0); - task.setStartTime(firstDay); - task.setEndTime(date); - } +// if(ObjectUtils.isEmpty(task.getStartTime())&&ObjectUtils.isEmpty(task.getEndTime())){ +// LocalDateTime date = LocalDateTime.now(); +// LocalDateTime firstDay = date.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0); +// task.setStartTime(firstDay); +// task.setEndTime(date); +// } response.setContentType("application/vnd.ms-excel"); response.setCharacterEncoding("UTF-8"); // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.java index c2a70ef..b540c27 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.java @@ -1,5 +1,6 @@ package com.hnac.hzinfo.inspect.task.mapper; +import com.hnac.hzinfo.inspect.task.dto.TaskDTO; import com.hnac.hzinfo.inspect.task.vo.TaskCountVO; import com.hnac.hzinfo.inspect.task.vo.TaskOfflineVO; import org.springblade.core.datascope.annotation.UserDataAuth; @@ -27,6 +28,9 @@ public interface TaskMapper extends UserDataScopeBaseMapper { */ List getListPage(@Param("page") IPage page, @Param("task") TaskListQuery task); + List getAllPageList(@Param("page") IPage page, @Param("task") TaskDTO taskDTO); + List getAllExportList(@Param("task") TaskDTO taskDTO); + List mainQueryPage(@Param("page") IPage page, @Param("task") TaskListQuery task); /** diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml index 6197bb8..1d984f9 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml @@ -173,6 +173,32 @@ order by t.UPDATE_TIME desc + +