Просмотр исходного кода

- 为 WaterPipeInfo 供水管网信息分页查询数据接口添加时间查询条件
- 为 WaterPumpStation 供水泵站信息分页查询数据接口添加时间查询条件
- 为 WaterPlantInfo 供水水厂信息分页查询数据接口添加时间查询条件
- 为 WaterSourceInfo 供水水源地信息分页查询数据接口添加时间查询条件

Kazerin 1 месяц назад
Родитель
Сommit
1442b768eb
20 измененных файлов с 192 добавлено и 74 удалено
  1. 13 8
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/WaterSupply/WaterPipeInfo/WaterPipeInfoController.java
  2. 11 6
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/WaterSupply/WaterPlantInfo/WaterPlantInfoController.java
  3. 11 6
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/WaterSupply/WaterPumpStation/WaterPumpStationController.java
  4. 11 6
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/WaterSupply/WaterSourceInfo/WaterSourceInfoController.java
  5. 7 3
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPipeInfo/mapper/WaterPipeInfoMapper.java
  6. 7 2
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPipeInfo/service/IWaterPipeInfoService.java
  7. 12 19
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPipeInfo/service/impl/WaterPipeInfoServiceImpl.java
  8. 7 2
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPlantInfo/mapper/WaterPlantInfoMapper.java
  9. 7 2
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPlantInfo/service/IWaterPlantInfoService.java
  10. 9 4
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPlantInfo/service/impl/WaterPlantInfoServiceImpl.java
  11. 7 2
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPumpStation/mapper/WaterPumpStationMapper.java
  12. 7 2
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPumpStation/service/IWaterPumpStationService.java
  13. 9 4
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPumpStation/service/impl/WaterPumpStationServiceImpl.java
  14. 8 2
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterSourceInfo/mapper/WaterSourceInfoMapper.java
  15. 8 2
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterSourceInfo/service/IWaterSourceInfoService.java
  16. 10 4
      pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterSourceInfo/service/impl/WaterSourceInfoServiceImpl.java
  17. 12 0
      pipe-network-service/zksy-system/src/main/resources/mapper/WaterSupply/WaterPipeInfo/WaterPipeInfoMapper.xml
  18. 12 0
      pipe-network-service/zksy-system/src/main/resources/mapper/WaterSupply/WaterPlantInfo/WaterPlantInfoMapper.xml
  19. 12 0
      pipe-network-service/zksy-system/src/main/resources/mapper/WaterSupply/WaterPumpStation/WaterPumpStationMapper.xml
  20. 12 0
      pipe-network-service/zksy-system/src/main/resources/mapper/WaterSupply/WaterSourceInfo/WaterSourceInfoMapper.xml

+ 13 - 8
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/WaterSupply/WaterPipeInfo/WaterPipeInfoController.java

@@ -15,6 +15,7 @@ import io.swagger.annotations.ApiResponses;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.web.bind.annotation.*;
 
 import java.time.LocalDateTime;
@@ -35,7 +36,7 @@ public class WaterPipeInfoController {
 
     // -------------------------- 基础CRUD接口 --------------------------
     @GetMapping("/page")
-    @ApiOperation(value = "分页查询管网数据", notes = "支持按管网编号、名称、材质、状态模糊查询")
+    @ApiOperation(value = "分页查询管网数据", notes = "支持按管网编号、名称、材质、状态、时间范围模糊查询")
     @ApiResponses({
             @ApiResponse(code = 200, message = "查询成功", response = AjaxResult.class),
             @ApiResponse(code = 500, message = "服务器内部错误,查询失败", response = AjaxResult.class)
@@ -46,10 +47,12 @@ public class WaterPipeInfoController {
             @ApiParam(value = "管网编号") @RequestParam(required = false) String pipeCode,
             @ApiParam(value = "管网名称") @RequestParam(required = false) String pipeName,
             @ApiParam(value = "管网材质") @RequestParam(required = false) String pipeMaterial,
-            @ApiParam(value = "状态(0正常 1停用)") @RequestParam(required = false) String status) {
+            @ApiParam(value = "状态(0正常 1停用)") @RequestParam(required = false) String status,
+            @ApiParam(value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-01-01 00:00:00") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
+            @ApiParam(value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-12-31 23:59:59") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
         try {
             Page<WaterPipeInfo> page = new Page<>(pageNum, pageSize);
-            IPage<WaterPipeInfo> resultPage = waterPipeInfoService.queryPage(page, pipeCode, pipeName, pipeMaterial, status);
+            IPage<WaterPipeInfo> resultPage = waterPipeInfoService.queryPage(page, pipeCode, pipeName, pipeMaterial, status, startTime, endTime);
             return AjaxResult.success("查询成功", resultPage);
         } catch (Exception e) {
             log.error("分页查询管网数据异常", e);
@@ -213,20 +216,22 @@ public class WaterPipeInfoController {
 
     // -------------------------- 回收站接口 --------------------------
     @GetMapping("/recycle/list")
-    @ApiOperation(value = "查询回收站数据", notes = "分页查询已删除的管网数据,支持筛选")
+    @ApiOperation(value = "查询回收站数据", notes = "分页查询已删除的管网数据,支持筛选和时间范围")
     @ApiResponses({
-            @ApiResponse(code = 200, message = "统计成功", response = AjaxResult.class),
-            @ApiResponse(code = 500, message = "服务器内部错误,统计失败", response = AjaxResult.class)
+            @ApiResponse(code = 200, message = "查询成功", response = AjaxResult.class),
+            @ApiResponse(code = 500, message = "服务器内部错误,查询失败", response = AjaxResult.class)
     })
     public AjaxResult recycleList(
             @ApiParam(value = "页码", defaultValue = "1") @RequestParam(defaultValue = "1") Integer pageNum,
             @ApiParam(value = "每页大小", defaultValue = "10") @RequestParam(defaultValue = "10") Integer pageSize,
             @ApiParam(value = "管网编号") @RequestParam(required = false) String pipeCode,
             @ApiParam(value = "管网名称") @RequestParam(required = false) String pipeName,
-            @ApiParam(value = "管网材质") @RequestParam(required = false) String pipeMaterial) {
+            @ApiParam(value = "管网材质") @RequestParam(required = false) String pipeMaterial,
+            @ApiParam(value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-01-01 00:00:00") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
+            @ApiParam(value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-12-31 23:59:59") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
         try {
             Page<WaterPipeInfo> page = new Page<>(pageNum, pageSize);
-            IPage<WaterPipeInfo> resultPage = waterPipeInfoService.queryDeletedPage(page, pipeCode, pipeName, pipeMaterial);
+            IPage<WaterPipeInfo> resultPage = waterPipeInfoService.queryDeletedPage(page, pipeCode, pipeName, pipeMaterial, startTime, endTime);
             return AjaxResult.success("查询成功", resultPage);
         } catch (Exception e) {
             log.error("查询回收站数据异常", e);

+ 11 - 6
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/WaterSupply/WaterPlantInfo/WaterPlantInfoController.java

@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiResponses;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.web.bind.annotation.*;
 
 import java.time.LocalDateTime;
@@ -34,7 +35,7 @@ public class WaterPlantInfoController {
 
     // -------------------------- 基础CRUD接口 --------------------------
     @GetMapping("/page")
-    @ApiOperation(value = "分页查询水厂数据", notes = "支持按水厂编号、名称、状态、负责人模糊查询")
+    @ApiOperation(value = "分页查询水厂数据", notes = "支持按水厂编号、名称、状态、负责人、时间范围模糊查询")
     @ApiResponses({
             @ApiResponse(code = 200, message = "查询成功", response = AjaxResult.class),
             @ApiResponse(code = 500, message = "服务器内部错误,查询失败", response = AjaxResult.class)
@@ -45,10 +46,12 @@ public class WaterPlantInfoController {
             @ApiParam(value = "水厂编号") @RequestParam(required = false) String plantCode,
             @ApiParam(value = "水厂名称") @RequestParam(required = false) String plantName,
             @ApiParam(value = "运行状态(0正常 1停产)") @RequestParam(required = false) String status,
-            @ApiParam(value = "负责人") @RequestParam(required = false) String principal) {
+            @ApiParam(value = "负责人") @RequestParam(required = false) String principal,
+            @ApiParam(value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-01-01 00:00:00") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
+            @ApiParam(value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-12-31 23:59:59") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
         try {
             Page<WaterPlantInfo> page = new Page<>(pageNum, pageSize);
-            IPage<WaterPlantInfo> resultPage = waterPlantInfoService.queryPage(page, plantCode, plantName, status, principal);
+            IPage<WaterPlantInfo> resultPage = waterPlantInfoService.queryPage(page, plantCode, plantName, status, principal, startTime, endTime);
             return AjaxResult.success("查询成功", resultPage);
         } catch (Exception e) {
             log.error("分页查询水厂数据异常", e);
@@ -150,7 +153,7 @@ public class WaterPlantInfoController {
 
     // -------------------------- 回收站接口 --------------------------
     @GetMapping("/recycle/list")
-    @ApiOperation(value = "查询回收站数据", notes = "分页查询已删除的水厂数据,支持筛选")
+    @ApiOperation(value = "查询回收站数据", notes = "分页查询已删除的水厂数据,支持筛选和时间范围")
     @ApiResponses({
             @ApiResponse(code = 200, message = "查询成功", response = AjaxResult.class),
             @ApiResponse(code = 500, message = "服务器内部错误,查询失败", response = AjaxResult.class)
@@ -160,10 +163,12 @@ public class WaterPlantInfoController {
             @ApiParam(value = "每页大小", defaultValue = "10") @RequestParam(defaultValue = "10") Integer pageSize,
             @ApiParam(value = "水厂编号") @RequestParam(required = false) String plantCode,
             @ApiParam(value = "水厂名称") @RequestParam(required = false) String plantName,
-            @ApiParam(value = "运行状态(0正常 1停产)") @RequestParam(required = false) String status) {
+            @ApiParam(value = "运行状态(0正常 1停产)") @RequestParam(required = false) String status,
+            @ApiParam(value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-01-01 00:00:00") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
+            @ApiParam(value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-12-31 23:59:59") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
         try {
             Page<WaterPlantInfo> page = new Page<>(pageNum, pageSize);
-            IPage<WaterPlantInfo> resultPage = waterPlantInfoService.queryDeletedPage(page, plantCode, plantName, status);
+            IPage<WaterPlantInfo> resultPage = waterPlantInfoService.queryDeletedPage(page, plantCode, plantName, status, startTime, endTime);
             return AjaxResult.success("查询成功", resultPage);
         } catch (Exception e) {
             log.error("查询回收站数据异常", e);

+ 11 - 6
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/WaterSupply/WaterPumpStation/WaterPumpStationController.java

@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiResponses;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.web.bind.annotation.*;
 
 import java.time.LocalDateTime;
@@ -34,7 +35,7 @@ public class WaterPumpStationController {
 
     // -------------------------- 基础CRUD接口 --------------------------
     @GetMapping("/page")
-    @ApiOperation(value = "分页查询泵站数据", notes = "支持按泵站编号、名称、状态、负责人模糊查询")
+    @ApiOperation(value = "分页查询泵站数据", notes = "支持按泵站编号、名称、状态、负责人、时间范围模糊查询")
     @ApiResponses({
             @ApiResponse(code = 200, message = "查询成功", response = AjaxResult.class),
             @ApiResponse(code = 500, message = "服务器内部错误,查询失败", response = AjaxResult.class)
@@ -45,10 +46,12 @@ public class WaterPumpStationController {
             @ApiParam(value = "泵站编号") @RequestParam(required = false) String stationCode,
             @ApiParam(value = "泵站名称") @RequestParam(required = false) String stationName,
             @ApiParam(value = "运行状态(0正常 1故障 2检修)") @RequestParam(required = false) String status,
-            @ApiParam(value = "负责人") @RequestParam(required = false) String principal) {
+            @ApiParam(value = "负责人") @RequestParam(required = false) String principal,
+            @ApiParam(value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-01-01 00:00:00") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
+            @ApiParam(value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-12-31 23:59:59") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
         try {
             Page<WaterPumpStation> page = new Page<>(pageNum, pageSize);
-            IPage<WaterPumpStation> resultPage = pumpStationService.queryPage(page, stationCode, stationName, status, principal);
+            IPage<WaterPumpStation> resultPage = pumpStationService.queryPage(page, stationCode, stationName, status, principal, startTime, endTime);
             return AjaxResult.success("查询成功", resultPage);
         } catch (Exception e) {
             log.error("分页查询泵站数据异常", e);
@@ -150,7 +153,7 @@ public class WaterPumpStationController {
 
     // -------------------------- 回收站接口 --------------------------
     @GetMapping("/recycle/list")
-    @ApiOperation(value = "查询回收站数据", notes = "分页查询已删除的泵站数据,支持筛选")
+    @ApiOperation(value = "查询回收站数据", notes = "分页查询已删除的泵站数据,支持筛选和时间范围")
     @ApiResponses({
             @ApiResponse(code = 200, message = "查询成功", response = AjaxResult.class),
             @ApiResponse(code = 500, message = "服务器内部错误,查询失败", response = AjaxResult.class)
@@ -160,10 +163,12 @@ public class WaterPumpStationController {
             @ApiParam(value = "每页大小", defaultValue = "10") @RequestParam(defaultValue = "10") Integer pageSize,
             @ApiParam(value = "泵站编号") @RequestParam(required = false) String stationCode,
             @ApiParam(value = "泵站名称") @RequestParam(required = false) String stationName,
-            @ApiParam(value = "运行状态(0正常 1故障 2检修)") @RequestParam(required = false) String status) {
+            @ApiParam(value = "运行状态(0正常 1故障 2检修)") @RequestParam(required = false) String status,
+            @ApiParam(value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-01-01 00:00:00") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
+            @ApiParam(value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-12-31 23:59:59") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
         try {
             Page<WaterPumpStation> page = new Page<>(pageNum, pageSize);
-            IPage<WaterPumpStation> resultPage = pumpStationService.queryDeletedPage(page, stationCode, stationName, status);
+            IPage<WaterPumpStation> resultPage = pumpStationService.queryDeletedPage(page, stationCode, stationName, status, startTime, endTime);
             return AjaxResult.success("查询成功", resultPage);
         } catch (Exception e) {
             log.error("查询回收站数据异常", e);

+ 11 - 6
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/WaterSupply/WaterSourceInfo/WaterSourceInfoController.java

@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiResponses;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.web.bind.annotation.*;
 import java.time.LocalDateTime;
 import java.util.List;
@@ -33,7 +34,7 @@ public class WaterSourceInfoController {
 
     // -------------------------- 基础CRUD接口 --------------------------
     @GetMapping("/page")
-    @ApiOperation(value = "分页查询水源地数据", notes = "支持按水源地ID、名称、状态、所属单位模糊查询")
+    @ApiOperation(value = "分页查询水源地数据", notes = "支持按水源地ID、名称、状态、所属单位、时间范围模糊查询")
     @ApiResponses({
             @ApiResponse(code = 200, message = "查询成功", response = AjaxResult.class),
             @ApiResponse(code = 500, message = "服务器内部错误,查询失败", response = AjaxResult.class)
@@ -44,10 +45,12 @@ public class WaterSourceInfoController {
             @ApiParam(value = "水源地ID") @RequestParam(required = false) String sourceId,
             @ApiParam(value = "水源地名称") @RequestParam(required = false) String sourceName,
             @ApiParam(value = "状态(0正常 1异常)") @RequestParam(required = false) String status,
-            @ApiParam(value = "所属单位") @RequestParam(required = false) String unit) {
+            @ApiParam(value = "所属单位") @RequestParam(required = false) String unit,
+            @ApiParam(value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-01-01 00:00:00") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
+            @ApiParam(value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2026-12-31 23:59:59") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
         try {
             Page<WaterSourceInfo> page = new Page<>(pageNum, pageSize);
-            IPage<WaterSourceInfo> resultPage = waterSourceInfoService.queryPage(page, sourceId, sourceName, status, unit);
+            IPage<WaterSourceInfo> resultPage = waterSourceInfoService.queryPage(page, sourceId, sourceName, status, unit, startTime, endTime);
             return AjaxResult.success("查询成功", resultPage);
         } catch (Exception e) {
             log.error("分页查询水源地数据异常", e);
@@ -148,7 +151,7 @@ public class WaterSourceInfoController {
 
     // -------------------------- 回收站接口 --------------------------
     @GetMapping("/recycle/list")
-    @ApiOperation(value = "查询回收站数据", notes = "分页查询已删除的水源地数据,支持筛选")
+    @ApiOperation(value = "查询回收站数据", notes = "分页查询已删除的水源地数据,支持筛选和时间范围")
     @ApiResponses({
             @ApiResponse(code = 200, message = "查询成功", response = AjaxResult.class),
             @ApiResponse(code = 500, message = "服务器内部错误,查询失败", response = AjaxResult.class)
@@ -158,10 +161,12 @@ public class WaterSourceInfoController {
             @ApiParam(value = "每页大小", defaultValue = "10") @RequestParam(defaultValue = "10") Integer pageSize,
             @ApiParam(value = "水源地ID") @RequestParam(required = false) String sourceId,
             @ApiParam(value = "水源地名称") @RequestParam(required = false) String sourceName,
-            @ApiParam(value = "状态(0正常 1异常)") @RequestParam(required = false) String status) {
+            @ApiParam(value = "状态(0正常 1异常)") @RequestParam(required = false) String status,
+            @ApiParam(value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2025-01-01 00:00:00") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
+            @ApiParam(value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", example = "2025-12-31 23:59:59") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) {
         try {
             Page<WaterSourceInfo> page = new Page<>(pageNum, pageSize);
-            IPage<WaterSourceInfo> resultPage = waterSourceInfoService.queryDeletedPage(page, sourceId, sourceName, status);
+            IPage<WaterSourceInfo> resultPage = waterSourceInfoService.queryDeletedPage(page, sourceId, sourceName, status, startTime, endTime);
             return AjaxResult.success("查询成功", resultPage);
         } catch (Exception e) {
             log.error("查询回收站数据异常", e);

+ 7 - 3
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPipeInfo/mapper/WaterPipeInfoMapper.java

@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Update;
 
+import java.time.LocalDateTime;
 import java.util.List;
 import java.util.Map;
 
@@ -18,7 +19,9 @@ public interface WaterPipeInfoMapper extends BaseMapper<WaterPipeInfo> {
     List<WaterPipeInfo> selectPipeList(@Param("pipeCode") String pipeCode,
                                        @Param("pipeName") String pipeName,
                                        @Param("pipeMaterial") String pipeMaterial,
-                                       @Param("status") String status);
+                                       @Param("status") String status,
+                                       @Param("startTime") LocalDateTime startTime,
+                                       @Param("endTime") LocalDateTime endTime);
 
     /**
      * 按状态统计管网
@@ -45,8 +48,9 @@ public interface WaterPipeInfoMapper extends BaseMapper<WaterPipeInfo> {
      */
     List<WaterPipeInfo> selectDeletedList(@Param("pipeCode") String pipeCode,
                                           @Param("pipeName") String pipeName,
-                                          @Param("pipeMaterial") String pipeMaterial);
-
+                                          @Param("pipeMaterial") String pipeMaterial,
+                                          @Param("startTime") LocalDateTime startTime,
+                                          @Param("endTime") LocalDateTime endTime);
     /**
      * 批量恢复已删除数据
      */

+ 7 - 2
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPipeInfo/service/IWaterPipeInfoService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.zksy.WaterSupply.WaterPipeInfo.domain.WaterPipeInfo;
 
+import java.time.LocalDateTime;
 import java.util.List;
 import java.util.Map;
 
@@ -20,7 +21,9 @@ public interface IWaterPipeInfoService extends IService<WaterPipeInfo> {
                                    String pipeCode,
                                    String pipeName,
                                    String pipeMaterial,
-                                   String status);
+                                   String status,
+                                   LocalDateTime startTime,
+                                   LocalDateTime endTime);
 
     /**
      * 按状态统计管网
@@ -48,7 +51,9 @@ public interface IWaterPipeInfoService extends IService<WaterPipeInfo> {
     IPage<WaterPipeInfo> queryDeletedPage(Page<WaterPipeInfo> page,
                                           String pipeCode,
                                           String pipeName,
-                                          String pipeMaterial);
+                                          String pipeMaterial,
+                                          LocalDateTime startTime,
+                                          LocalDateTime endTime);
 
     /**
      * 批量恢复已删除数据

+ 12 - 19
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPipeInfo/service/impl/WaterPipeInfoServiceImpl.java

@@ -10,6 +10,7 @@ import com.zksy.WaterSupply.WaterPipeInfo.service.IWaterPipeInfoService;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import java.time.LocalDateTime;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -23,23 +24,13 @@ public class WaterPipeInfoServiceImpl extends ServiceImpl<WaterPipeInfoMapper, W
                                           String pipeCode,
                                           String pipeName,
                                           String pipeMaterial,
-                                          String status) {
-        LambdaQueryWrapper<WaterPipeInfo> wrapper = new LambdaQueryWrapper<>();
-        if (StringUtils.hasText(pipeCode)) {
-            wrapper.like(WaterPipeInfo::getPipeCode, pipeCode);
-        }
-        if (StringUtils.hasText(pipeName)) {
-            wrapper.like(WaterPipeInfo::getPipeName, pipeName);
-        }
-        if (StringUtils.hasText(pipeMaterial)) {
-            wrapper.eq(WaterPipeInfo::getPipeMaterial, pipeMaterial);
-        }
-        if (StringUtils.hasText(status)) {
-            wrapper.eq(WaterPipeInfo::getStatus, status);
-        }
-        wrapper.eq(WaterPipeInfo::getDelFlag, "0");
-        wrapper.orderByDesc(WaterPipeInfo::getCreateTime);
-        return this.page(page, wrapper);
+                                          String status,
+                                          LocalDateTime startTime,
+                                          LocalDateTime endTime) {
+        List<WaterPipeInfo> list = baseMapper.selectPipeList(pipeCode, pipeName, pipeMaterial, status, startTime, endTime);
+        page.setRecords(list);
+        page.setTotal(list.size());
+        return page;
     }
 
     @Override
@@ -66,8 +57,10 @@ public class WaterPipeInfoServiceImpl extends ServiceImpl<WaterPipeInfoMapper, W
     public IPage<WaterPipeInfo> queryDeletedPage(Page<WaterPipeInfo> page,
                                                  String pipeCode,
                                                  String pipeName,
-                                                 String pipeMaterial) {
-        List<WaterPipeInfo> list = baseMapper.selectDeletedList(pipeCode, pipeName, pipeMaterial);
+                                                 String pipeMaterial,
+                                                 LocalDateTime startTime,
+                                                 LocalDateTime endTime) {
+        List<WaterPipeInfo> list = baseMapper.selectDeletedList(pipeCode, pipeName, pipeMaterial, startTime, endTime);
         page.setRecords(list);
         page.setTotal(list.size());
         return page;

+ 7 - 2
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPlantInfo/mapper/WaterPlantInfoMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zksy.WaterSupply.WaterPlantInfo.domain.WaterPlantInfo;
 import org.apache.ibatis.annotations.Param;
 
+import java.time.LocalDateTime;
 import java.util.List;
 
 public interface WaterPlantInfoMapper extends BaseMapper<WaterPlantInfo> {
@@ -15,7 +16,9 @@ public interface WaterPlantInfoMapper extends BaseMapper<WaterPlantInfo> {
             @Param("plantCode") String plantCode,
             @Param("plantName") String plantName,
             @Param("status") String status,
-            @Param("principal") String principal);
+            @Param("principal") String principal,
+            @Param("startTime") LocalDateTime startTime,
+            @Param("endTime") LocalDateTime endTime);
 
     /**
      * 查询已删除的水厂数据
@@ -23,7 +26,9 @@ public interface WaterPlantInfoMapper extends BaseMapper<WaterPlantInfo> {
     List<WaterPlantInfo> selectDeletedList(
             @Param("plantCode") String plantCode,
             @Param("plantName") String plantName,
-            @Param("status") String status);
+            @Param("status") String status,
+            @Param("startTime") LocalDateTime startTime,
+            @Param("endTime") LocalDateTime endTime);
 
     /**
      * 批量恢复已删除数据

+ 7 - 2
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPlantInfo/service/IWaterPlantInfoService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.zksy.WaterSupply.WaterPlantInfo.domain.WaterPlantInfo;
 
+import java.time.LocalDateTime;
 import java.util.List;
 
 public interface IWaterPlantInfoService extends IService<WaterPlantInfo> {
@@ -16,7 +17,9 @@ public interface IWaterPlantInfoService extends IService<WaterPlantInfo> {
                                     String plantCode,
                                     String plantName,
                                     String status,
-                                    String principal);
+                                    String principal,
+                                    LocalDateTime startTime,
+                                    LocalDateTime endTime);
 
     /**
      * 分页查询回收站数据
@@ -24,7 +27,9 @@ public interface IWaterPlantInfoService extends IService<WaterPlantInfo> {
     IPage<WaterPlantInfo> queryDeletedPage(Page<WaterPlantInfo> page,
                                            String plantCode,
                                            String plantName,
-                                           String status);
+                                           String status,
+                                           LocalDateTime startTime,
+                                           LocalDateTime endTime);
 
     /**
      * 批量恢复已删除数据

+ 9 - 4
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPlantInfo/service/impl/WaterPlantInfoServiceImpl.java

@@ -8,6 +8,7 @@ import com.zksy.WaterSupply.WaterPlantInfo.mapper.WaterPlantInfoMapper;
 import com.zksy.WaterSupply.WaterPlantInfo.service.IWaterPlantInfoService;
 import org.springframework.stereotype.Service;
 
+import java.time.LocalDateTime;
 import java.util.List;
 
 @Service
@@ -19,8 +20,10 @@ public class WaterPlantInfoServiceImpl extends ServiceImpl<WaterPlantInfoMapper,
                                            String plantCode,
                                            String plantName,
                                            String status,
-                                           String principal) {
-        List<WaterPlantInfo> list = baseMapper.selectPlantList(plantCode, plantName, status, principal);
+                                           String principal,
+                                           LocalDateTime startTime,
+                                           LocalDateTime endTime) {
+        List<WaterPlantInfo> list = baseMapper.selectPlantList(plantCode, plantName, status, principal, startTime, endTime);
         page.setRecords(list);
         page.setTotal(list.size());
         return page;
@@ -30,8 +33,10 @@ public class WaterPlantInfoServiceImpl extends ServiceImpl<WaterPlantInfoMapper,
     public IPage<WaterPlantInfo> queryDeletedPage(Page<WaterPlantInfo> page,
                                                   String plantCode,
                                                   String plantName,
-                                                  String status) {
-        List<WaterPlantInfo> list = baseMapper.selectDeletedList(plantCode, plantName, status);
+                                                  String status,
+                                                  LocalDateTime startTime,
+                                                  LocalDateTime endTime) {
+        List<WaterPlantInfo> list = baseMapper.selectDeletedList(plantCode, plantName, status, startTime, endTime);
         page.setRecords(list);
         page.setTotal(list.size());
         return page;

+ 7 - 2
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPumpStation/mapper/WaterPumpStationMapper.java

@@ -5,6 +5,7 @@ import com.zksy.WaterSupply.WaterPumpStation.domain.WaterPumpStation;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Update;
 
+import java.time.LocalDateTime;
 import java.util.List;
 
 public interface WaterPumpStationMapper extends BaseMapper<WaterPumpStation> {
@@ -16,7 +17,9 @@ public interface WaterPumpStationMapper extends BaseMapper<WaterPumpStation> {
             @Param("stationCode") String stationCode,
             @Param("stationName") String stationName,
             @Param("status") String status,
-            @Param("principal") String principal);
+            @Param("principal") String principal,
+            @Param("startTime") LocalDateTime startTime,
+            @Param("endTime") LocalDateTime endTime);
 
     /**
      * 查询已删除的泵站数据
@@ -24,7 +27,9 @@ public interface WaterPumpStationMapper extends BaseMapper<WaterPumpStation> {
     List<WaterPumpStation> selectDeletedList(
             @Param("stationCode") String stationCode,
             @Param("stationName") String stationName,
-            @Param("status") String status);
+            @Param("status") String status,
+            @Param("startTime") LocalDateTime startTime,
+            @Param("endTime") LocalDateTime endTime);
 
     /**
      * 批量恢复已删除数据

+ 7 - 2
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPumpStation/service/IWaterPumpStationService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.zksy.WaterSupply.WaterPumpStation.domain.WaterPumpStation;
 
+import java.time.LocalDateTime;
 import java.util.List;
 
 public interface IWaterPumpStationService extends IService<WaterPumpStation> {
@@ -16,7 +17,9 @@ public interface IWaterPumpStationService extends IService<WaterPumpStation> {
                                       String stationCode,
                                       String stationName,
                                       String status,
-                                      String principal);
+                                      String principal,
+                                      LocalDateTime startTime,
+                                      LocalDateTime endTime);
 
     /**
      * 分页查询回收站数据
@@ -24,7 +27,9 @@ public interface IWaterPumpStationService extends IService<WaterPumpStation> {
     IPage<WaterPumpStation> queryDeletedPage(Page<WaterPumpStation> page,
                                              String stationCode,
                                              String stationName,
-                                             String status);
+                                             String status,
+                                             LocalDateTime startTime,
+                                             LocalDateTime endTime);
 
     /**
      * 批量恢复已删除数据

+ 9 - 4
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterPumpStation/service/impl/WaterPumpStationServiceImpl.java

@@ -8,6 +8,7 @@ import com.zksy.WaterSupply.WaterPumpStation.mapper.WaterPumpStationMapper;
 import com.zksy.WaterSupply.WaterPumpStation.service.IWaterPumpStationService;
 import org.springframework.stereotype.Service;
 
+import java.time.LocalDateTime;
 import java.util.List;
 
 @Service
@@ -19,8 +20,10 @@ public class WaterPumpStationServiceImpl extends ServiceImpl<WaterPumpStationMap
                                              String stationCode,
                                              String stationName,
                                              String status,
-                                             String principal) {
-        List<WaterPumpStation> list = baseMapper.selectStationList(stationCode, stationName, status, principal);
+                                             String principal,
+                                             LocalDateTime startTime,
+                                             LocalDateTime endTime) {
+        List<WaterPumpStation> list = baseMapper.selectStationList(stationCode, stationName, status, principal, startTime, endTime);
         page.setRecords(list);
         page.setTotal(list.size());
         return page;
@@ -30,8 +33,10 @@ public class WaterPumpStationServiceImpl extends ServiceImpl<WaterPumpStationMap
     public IPage<WaterPumpStation> queryDeletedPage(Page<WaterPumpStation> page,
                                                     String stationCode,
                                                     String stationName,
-                                                    String status) {
-        List<WaterPumpStation> list = baseMapper.selectDeletedList(stationCode, stationName, status);
+                                                    String status,
+                                                    LocalDateTime startTime,
+                                                    LocalDateTime endTime) {
+        List<WaterPumpStation> list = baseMapper.selectDeletedList(stationCode, stationName, status, startTime, endTime);
         page.setRecords(list);
         page.setTotal(list.size());
         return page;

+ 8 - 2
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterSourceInfo/mapper/WaterSourceInfoMapper.java

@@ -3,6 +3,8 @@ package com.zksy.WaterSupply.WaterSourceInfo.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zksy.WaterSupply.WaterSourceInfo.domain.WaterSourceInfo;
 import org.apache.ibatis.annotations.Param;
+
+import java.time.LocalDateTime;
 import java.util.List;
 
 public interface WaterSourceInfoMapper extends BaseMapper<WaterSourceInfo> {
@@ -11,12 +13,16 @@ public interface WaterSourceInfoMapper extends BaseMapper<WaterSourceInfo> {
             @Param("sourceId") String sourceId,
             @Param("sourceName") String sourceName,
             @Param("status") String status,
-            @Param("unit") String unit);
+            @Param("unit") String unit,
+            @Param("startTime") LocalDateTime startTime,
+            @Param("endTime") LocalDateTime endTime);
 
     List<WaterSourceInfo> selectDeletedList(
             @Param("sourceId") String sourceId,
             @Param("sourceName") String sourceName,
-            @Param("status") String status);
+            @Param("status") String status,
+            @Param("startTime") LocalDateTime startTime,
+            @Param("endTime") LocalDateTime endTime);
 
     int restoreByIds(@Param("ids") List<Long> ids, @Param("updateBy") String updateBy);
 

+ 8 - 2
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterSourceInfo/service/IWaterSourceInfoService.java

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.zksy.WaterSupply.WaterSourceInfo.domain.WaterSourceInfo;
+
+import java.time.LocalDateTime;
 import java.util.List;
 
 public interface IWaterSourceInfoService extends IService<WaterSourceInfo> {
@@ -12,12 +14,16 @@ public interface IWaterSourceInfoService extends IService<WaterSourceInfo> {
                                      String sourceId,
                                      String sourceName,
                                      String status,
-                                     String unit);
+                                     String unit,
+                                     LocalDateTime startTime,
+                                     LocalDateTime endTime);
 
     IPage<WaterSourceInfo> queryDeletedPage(Page<WaterSourceInfo> page,
                                             String sourceId,
                                             String sourceName,
-                                            String status);
+                                            String status,
+                                            LocalDateTime startTime,
+                                            LocalDateTime endTime);
 
     boolean restoreByIds(List<Long> ids, String updateBy);
 

+ 10 - 4
pipe-network-service/zksy-system/src/main/java/com/zksy/WaterSupply/WaterSourceInfo/service/impl/WaterSourceInfoServiceImpl.java

@@ -7,6 +7,8 @@ import com.zksy.WaterSupply.WaterSourceInfo.domain.WaterSourceInfo;
 import com.zksy.WaterSupply.WaterSourceInfo.mapper.WaterSourceInfoMapper;
 import com.zksy.WaterSupply.WaterSourceInfo.service.IWaterSourceInfoService;
 import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
 import java.util.List;
 
 @Service
@@ -18,8 +20,10 @@ public class WaterSourceInfoServiceImpl extends ServiceImpl<WaterSourceInfoMappe
                                             String sourceId,
                                             String sourceName,
                                             String status,
-                                            String unit) {
-        List<WaterSourceInfo> list = baseMapper.selectSourceList(sourceId, sourceName, status, unit);
+                                            String unit,
+                                            LocalDateTime startTime,
+                                            LocalDateTime endTime) {
+        List<WaterSourceInfo> list = baseMapper.selectSourceList(sourceId, sourceName, status, unit, startTime, endTime);
         page.setRecords(list);
         page.setTotal(list.size());
         return page;
@@ -29,8 +33,10 @@ public class WaterSourceInfoServiceImpl extends ServiceImpl<WaterSourceInfoMappe
     public IPage<WaterSourceInfo> queryDeletedPage(Page<WaterSourceInfo> page,
                                                    String sourceId,
                                                    String sourceName,
-                                                   String status) {
-        List<WaterSourceInfo> list = baseMapper.selectDeletedList(sourceId, sourceName, status);
+                                                   String status,
+                                                   LocalDateTime startTime,
+                                                   LocalDateTime endTime) {
+        List<WaterSourceInfo> list = baseMapper.selectDeletedList(sourceId, sourceName, status, startTime, endTime);
         page.setRecords(list);
         page.setTotal(list.size());
         return page;

+ 12 - 0
pipe-network-service/zksy-system/src/main/resources/mapper/WaterSupply/WaterPipeInfo/WaterPipeInfoMapper.xml

@@ -44,6 +44,12 @@
         <if test="status != null and status != ''">
             AND status = #{status}
         </if>
+        <if test="startTime != null">
+            AND create_time &gt;= #{startTime}
+        </if>
+        <if test="endTime != null">
+            AND create_time &lt;= #{endTime}
+        </if>
         ORDER BY create_time DESC
     </select>
 
@@ -97,6 +103,12 @@
         <if test="pipeMaterial != null and pipeMaterial != ''">
             AND pipe_material = #{pipeMaterial}
         </if>
+        <if test="startTime != null">
+            AND update_time &gt;= #{startTime}
+        </if>
+        <if test="endTime != null">
+            AND update_time &lt;= #{endTime}
+        </if>
         ORDER BY update_time DESC
     </select>
 

+ 12 - 0
pipe-network-service/zksy-system/src/main/resources/mapper/WaterSupply/WaterPlantInfo/WaterPlantInfoMapper.xml

@@ -48,6 +48,12 @@
         <if test="principal != null and principal != ''">
             AND principal LIKE CONCAT('%', #{principal}, '%')
         </if>
+        <if test="startTime != null">
+            AND create_time &gt;= #{startTime}
+        </if>
+        <if test="endTime != null">
+            AND create_time &lt;= #{endTime}
+        </if>
         ORDER BY create_time DESC
     </select>
 
@@ -64,6 +70,12 @@
         <if test="status != null and status != ''">
             AND status = #{status}
         </if>
+        <if test="startTime != null">
+            AND update_time &gt;= #{startTime}
+        </if>
+        <if test="endTime != null">
+            AND update_time &lt;= #{endTime}
+        </if>
         ORDER BY update_time DESC
     </select>
 

+ 12 - 0
pipe-network-service/zksy-system/src/main/resources/mapper/WaterSupply/WaterPumpStation/WaterPumpStationMapper.xml

@@ -46,6 +46,12 @@
         <if test="principal != null and principal != ''">
             AND principal LIKE CONCAT('%', #{principal}, '%')
         </if>
+        <if test="startTime != null">
+            AND create_time &gt;= #{startTime}
+        </if>
+        <if test="endTime != null">
+            AND create_time &lt;= #{endTime}
+        </if>
         ORDER BY create_time DESC
     </select>
 
@@ -63,6 +69,12 @@
         <if test="status != null and status != ''">
             AND status = #{status}
         </if>
+        <if test="startTime != null">
+            AND update_time &gt;= #{startTime}
+        </if>
+        <if test="endTime != null">
+            AND update_time &lt;= #{endTime}
+        </if>
         ORDER BY update_time DESC
     </select>
 

+ 12 - 0
pipe-network-service/zksy-system/src/main/resources/mapper/WaterSupply/WaterSourceInfo/WaterSourceInfoMapper.xml

@@ -46,6 +46,12 @@
         <if test="unit != null and unit != ''">
             AND unit LIKE CONCAT('%', #{unit}, '%')
         </if>
+        <if test="startTime != null">
+            AND create_time &gt;= #{startTime}
+        </if>
+        <if test="endTime != null">
+            AND create_time &lt;= #{endTime}
+        </if>
         ORDER BY create_time DESC
     </select>
 
@@ -62,6 +68,12 @@
         <if test="status != null and status != ''">
             AND status = #{status}
         </if>
+        <if test="startTime != null">
+            AND update_time &gt;= #{startTime}
+        </if>
+        <if test="endTime != null">
+            AND update_time &lt;= #{endTime}
+        </if>
         ORDER BY update_time DESC
     </select>