jiangbiao 2 weeks ago
parent
commit
335b52cd19
93 changed files with 1464 additions and 500 deletions
  1. 39 13
      master/src/main/java/com/ruoyi/common/utils/poi/QRCodeUtil.java
  2. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevAlarmController.java
  3. 33 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevCabinetController.java
  4. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevCallsystemController.java
  5. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevCofferController.java
  6. 25 6
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevCurtainController.java
  7. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevExtinguisherController.java
  8. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevEyewashController.java
  9. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevFgsController.java
  10. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevFiredoorController.java
  11. 37 6
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevHydrantController.java
  12. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevLiftController.java
  13. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevMonitorController.java
  14. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevPitController.java
  15. 26 6
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevRainvalveController.java
  16. 25 6
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevSteamController.java
  17. 23 4
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevSumpController.java
  18. 25 6
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevUtilitystationController.java
  19. 25 6
      master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevVentvalveController.java
  20. 74 0
      master/src/main/java/com/ruoyi/project/ps/dev/domain/TPsDevCabinet.java
  21. 59 0
      master/src/main/java/com/ruoyi/project/ps/dev/domain/TPsDevHydrant.java
  22. 7 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevAlarmMapper.java
  23. 7 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevCabinetMapper.java
  24. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevCallsystemMapper.java
  25. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevCofferMapper.java
  26. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevCurtainMapper.java
  27. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevExtinguisherMapper.java
  28. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevEyewashMapper.java
  29. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevFgsMapper.java
  30. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevFiredoorMapper.java
  31. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevHydrantMapper.java
  32. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevLiftMapper.java
  33. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevMonitorMapper.java
  34. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevPitMapper.java
  35. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevRainvalveMapper.java
  36. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevSteamMapper.java
  37. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevSumpMapper.java
  38. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevUtilitystationMapper.java
  39. 8 0
      master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevVentvalveMapper.java
  40. 63 335
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionAppController.java
  41. 5 0
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCabinetController.java
  42. 3 2
      master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionHydrantController.java
  43. 92 0
      master/src/main/java/com/ruoyi/project/ps/inspection/domain/TPsInspectionCabinet.java
  44. 2 1
      master/src/main/java/com/ruoyi/project/ps/inspection/domain/TPsInspectionExtinguisher.java
  45. 32 7
      master/src/main/java/com/ruoyi/project/ps/inspection/domain/TPsInspectionHydrant.java
  46. 2 3
      master/src/main/java/com/ruoyi/project/ps/inspection/dto/InspectionQueryRequest.java
  47. 14 3
      master/src/main/java/com/ruoyi/project/ps/patrol/controller/TPsPatrolPlanController.java
  48. 8 0
      master/src/main/java/com/ruoyi/project/ps/patrol/mapper/TPsPatrolMainMapper.java
  49. 8 0
      master/src/main/java/com/ruoyi/project/ps/patrol/service/ITPsPatrolMainService.java
  50. 128 0
      master/src/main/java/com/ruoyi/project/ps/patrol/service/impl/TPsPatrolMainServiceImpl.java
  51. 4 0
      master/src/main/resources/mybatis/ps/dev/TPsDevAlarmMapper.xml
  52. 31 1
      master/src/main/resources/mybatis/ps/dev/TPsDevCabinetMapper.xml
  53. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevCallsystemMapper.xml
  54. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevCofferMapper.xml
  55. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevCurtainMapper.xml
  56. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevExtinguisherMapper.xml
  57. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevEyewashMapper.xml
  58. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevFgsMapper.xml
  59. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevFiredoorMapper.xml
  60. 32 1
      master/src/main/resources/mybatis/ps/dev/TPsDevHydrantMapper.xml
  61. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevLiftMapper.xml
  62. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevMonitorMapper.xml
  63. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevPitMapper.xml
  64. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevRainvalveMapper.xml
  65. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevSteamMapper.xml
  66. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevSumpMapper.xml
  67. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevUtilitystationMapper.xml
  68. 5 0
      master/src/main/resources/mybatis/ps/dev/TPsDevVentvalveMapper.xml
  69. 26 1
      master/src/main/resources/mybatis/ps/inspection/TPsInspectionCabinetMapper.xml
  70. 20 6
      master/src/main/resources/mybatis/ps/inspection/TPsInspectionHydrantMapper.xml
  71. 9 0
      master/src/main/resources/mybatis/ps/patrol/TPsPatrolMainMapper.xml
  72. 1 1
      ui/src/views/ps/dev/alarm/index.vue
  73. 33 3
      ui/src/views/ps/dev/cabinet/index.vue
  74. 1 1
      ui/src/views/ps/dev/callsystem/index.vue
  75. 1 1
      ui/src/views/ps/dev/coffer/index.vue
  76. 1 1
      ui/src/views/ps/dev/curtain/index.vue
  77. 1 1
      ui/src/views/ps/dev/extinguisher/index.vue
  78. 1 1
      ui/src/views/ps/dev/eyewash/index.vue
  79. 1 1
      ui/src/views/ps/dev/fgs/index.vue
  80. 1 1
      ui/src/views/ps/dev/firedoor/index.vue
  81. 69 8
      ui/src/views/ps/dev/hydrant/index.vue
  82. 1 1
      ui/src/views/ps/dev/lift/index.vue
  83. 1 1
      ui/src/views/ps/dev/monitor/index.vue
  84. 1 1
      ui/src/views/ps/dev/pit/index.vue
  85. 1 1
      ui/src/views/ps/dev/rainvalve/index.vue
  86. 1 1
      ui/src/views/ps/dev/steam/index.vue
  87. 1 1
      ui/src/views/ps/dev/sump/index.vue
  88. 1 1
      ui/src/views/ps/dev/utilitystation/index.vue
  89. 1 1
      ui/src/views/ps/dev/ventvalve/index.vue
  90. 11 1
      ui/src/views/ps/inspection/cabinet/index.vue
  91. 10 5
      ui/src/views/ps/inspection/extinguisher/index.vue
  92. 8 7
      ui/src/views/ps/inspection/hydrant/index.vue
  93. 0 3
      ui/src/views/ps/patrol/main/index.vue

+ 39 - 13
master/src/main/java/com/ruoyi/common/utils/poi/QRCodeUtil.java

@@ -39,12 +39,12 @@ public class QRCodeUtil<T> {
     private String title;
     private static XWPFDocument doc;
 
-    //CODE_WIDTH:二维码宽度,单位像素
-    private static final int CODE_WIDTH = 300;
+    //CODE_WIDTH:二维码宽度,单位像素(适当提高分辨率,让文字更清晰)
+    private static final int CODE_WIDTH = 400;
     //CODE_HEIGHT:二维码高度,单位像素
-    private static final int CODE_HEIGHT = 300;
-    //FONT_WIDTH:字体大小
-    private static final int FONT_WIDTH = 16;
+    private static final int CODE_HEIGHT = 400;
+    //FONT_WIDTH:字体大小(稍微放大一点)
+    private static final int FONT_WIDTH = 18;
     //FRONT_COLOR:二维码前景色,0x000000 表示黑色
     private static final int FRONT_COLOR = 0x000000;
     //BACKGROUND_COLOR:二维码背景色,0xFFFFFF 表示白色
@@ -129,16 +129,17 @@ public class QRCodeUtil<T> {
             BufferedImage qrCodeImage = getBufferedImage(content);
 
             // 计算总高度:顶部文字区域 + 二维码 + 底部文字区域
-            int topMargin = StringUtils.isNotEmpty(topText) ? 30 : 0; // 顶部文字区域高度
-            int bottomMargin = 30; // 底部文字区域高度
+            int topMargin = StringUtils.isNotEmpty(topText) ? 40 : 0; // 顶部文字区域高度
+            int bottomMargin = 80; // 底部文字区域高度,适当加大以容纳多行文字
             int totalHeight = CODE_HEIGHT + topMargin + bottomMargin;
 
             // 创建包含顶部和底部文字的组合图片
             BufferedImage combinedImage = new BufferedImage(CODE_WIDTH, totalHeight, BufferedImage.TYPE_INT_RGB);
             Graphics2D g = combinedImage.createGraphics();
 
-            // 设置抗锯齿
+            // 设置抗锯齿(图像和文字)
             g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+            g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
 
             // 设置背景颜色为白色
             g.setColor(Color.WHITE);
@@ -158,15 +159,40 @@ public class QRCodeUtil<T> {
             // 绘制二维码(向下偏移顶部文字区域的高度)
             g.drawImage(qrCodeImage, 0, topMargin, null);
 
-            // 绘制底部文字
+            // 绘制底部文字(支持自动换行)
             if (StringUtils.isNotEmpty(bottomText)) {
                 g.setColor(Color.BLACK);
                 g.setFont(new Font("微软雅黑", Font.PLAIN, FONT_WIDTH));
                 FontMetrics fm = g.getFontMetrics();
-                int textWidth = fm.stringWidth(bottomText);
-                int textX = (CODE_WIDTH - textWidth) / 2;
-                int textY = topMargin + CODE_HEIGHT + 20; // 文字在底部区域垂直居中
-                g.drawString(bottomText, textX, textY);
+
+                int maxWidth = CODE_WIDTH - 20; // 留左右 10 像素边距
+                List<String> lines = new ArrayList<>();
+                StringBuilder currentLine = new StringBuilder();
+
+                for (int i = 0; i < bottomText.length(); i++) {
+                    char c = bottomText.charAt(i);
+                    currentLine.append(c);
+                    if (fm.stringWidth(currentLine.toString()) > maxWidth) {
+                        // 超出宽度,回退一个字符作为下一行开始
+                        currentLine.deleteCharAt(currentLine.length() - 1);
+                        lines.add(currentLine.toString());
+                        currentLine = new StringBuilder().append(c);
+                    }
+                }
+                if (currentLine.length() > 0) {
+                    lines.add(currentLine.toString());
+                }
+
+                int lineHeight = fm.getHeight();
+                int startY = topMargin + CODE_HEIGHT + (bottomMargin - lineHeight * lines.size()) / 2 + fm.getAscent();
+
+                for (int i = 0; i < lines.size(); i++) {
+                    String line = lines.get(i);
+                    int textWidth = fm.stringWidth(line);
+                    int textX = (CODE_WIDTH - textWidth) / 2;
+                    int textY = startY + i * lineHeight;
+                    g.drawString(line, textX, textY);
+                }
             }
 
             g.dispose();

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevAlarmController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevAlarm;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevAlarmService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevAlarmController extends BaseController {
     @Autowired
     private ITPsDevAlarmService tPsDevAlarmService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询手动启动火灾报警器基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevAlarmController extends BaseController {
     @Log(title = "手动启动火灾报警器基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevAlarm tPsDevAlarm) {
-        return toAjax(tPsDevAlarmService.insertTPsDevAlarm(tPsDevAlarm));
+        int result = tPsDevAlarmService.insertTPsDevAlarm(tPsDevAlarm);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("1");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevAlarmController extends BaseController {
     @Log(title = "手动启动火灾报警器基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevAlarm tPsDevAlarm) {
-        return toAjax(tPsDevAlarmService.updateTPsDevAlarm(tPsDevAlarm));
+        int result = tPsDevAlarmService.updateTPsDevAlarm(tPsDevAlarm);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("1");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevAlarmController extends BaseController {
     @Log(title = "手动启动火灾报警器基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevAlarmService.deleteTPsDevAlarmByIds(ids));
+        int result = tPsDevAlarmService.deleteTPsDevAlarmByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("1");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -193,7 +212,7 @@ public class TPsDevAlarmController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 33 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevCabinetController.java

@@ -11,6 +11,7 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevCabinet;
 import com.ruoyi.project.ps.dev.service.ITPsDevCabinetService;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
@@ -37,6 +38,9 @@ public class TPsDevCabinetController extends BaseController {
     @Autowired
     private ITPsDevCabinetService tPsDevCabinetService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询玻璃门消火栓箱和泡沫栓箱基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevCabinetController extends BaseController {
     @Log(title = "玻璃门消火栓箱和泡沫栓箱基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevCabinet tPsDevCabinet) {
-        return toAjax(tPsDevCabinetService.insertTPsDevCabinet(tPsDevCabinet));
+        int result = tPsDevCabinetService.insertTPsDevCabinet(tPsDevCabinet);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("2");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevCabinetController extends BaseController {
     @Log(title = "玻璃门消火栓箱和泡沫栓箱基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevCabinet tPsDevCabinet) {
-        return toAjax(tPsDevCabinetService.updateTPsDevCabinet(tPsDevCabinet));
+        int result = tPsDevCabinetService.updateTPsDevCabinet(tPsDevCabinet);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("2");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevCabinetController extends BaseController {
     @Log(title = "玻璃门消火栓箱和泡沫栓箱基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevCabinetService.deleteTPsDevCabinetByIds(ids));
+        int result = tPsDevCabinetService.deleteTPsDevCabinetByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("2");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -150,6 +169,16 @@ public class TPsDevCabinetController extends BaseController {
                     } else if (j == 2) {
                         entity.setBoxNo(cellValue);
                     } else if (j == 3) {
+                        entity.setValveType(cellValue);
+                    } else if (j == 4) {
+                        entity.setValveSpecification(cellValue);
+                    } else if (j == 5) {
+                        entity.setValveLength(cellValue);
+                    } else if (j == 6) {
+                        entity.setBoltPointDistance(cellValue);
+                    } else if (j == 7) {
+                        entity.setBoltHoleCount(cellValue);
+                    } else if (j == 8) {
                         entity.setRemarks(cellValue);
                     }
                 }
@@ -195,7 +224,7 @@ public class TPsDevCabinetController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevCallsystemController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevCallsystem;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevCallsystemService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevCallsystemController extends BaseController {
     @Autowired
     private ITPsDevCallsystemService tPsDevCallsystemService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询现场呼叫系统基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevCallsystemController extends BaseController {
     @Log(title = "现场呼叫系统基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevCallsystem tPsDevCallsystem) {
-        return toAjax(tPsDevCallsystemService.insertTPsDevCallsystem(tPsDevCallsystem));
+        int result = tPsDevCallsystemService.insertTPsDevCallsystem(tPsDevCallsystem);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("3");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevCallsystemController extends BaseController {
     @Log(title = "现场呼叫系统基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevCallsystem tPsDevCallsystem) {
-        return toAjax(tPsDevCallsystemService.updateTPsDevCallsystem(tPsDevCallsystem));
+        int result = tPsDevCallsystemService.updateTPsDevCallsystem(tPsDevCallsystem);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("3");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevCallsystemController extends BaseController {
     @Log(title = "现场呼叫系统基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevCallsystemService.deleteTPsDevCallsystemByIds(ids));
+        int result = tPsDevCallsystemService.deleteTPsDevCallsystemByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("3");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -193,7 +212,7 @@ public class TPsDevCallsystemController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevCofferController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevCoffer;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevCofferService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevCofferController extends BaseController {
     @Autowired
     private ITPsDevCofferService tPsDevCofferService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询围堰基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevCofferController extends BaseController {
     @Log(title = "围堰基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevCoffer tPsDevCoffer) {
-        return toAjax(tPsDevCofferService.insertTPsDevCoffer(tPsDevCoffer));
+        int result = tPsDevCofferService.insertTPsDevCoffer(tPsDevCoffer);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("4");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevCofferController extends BaseController {
     @Log(title = "围堰基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevCoffer tPsDevCoffer) {
-        return toAjax(tPsDevCofferService.updateTPsDevCoffer(tPsDevCoffer));
+        int result = tPsDevCofferService.updateTPsDevCoffer(tPsDevCoffer);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("4");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevCofferController extends BaseController {
     @Log(title = "围堰基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevCofferService.deleteTPsDevCofferByIds(ids));
+        int result = tPsDevCofferService.deleteTPsDevCofferByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("4");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -193,7 +212,7 @@ public class TPsDevCofferController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 25 - 6
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevCurtainController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevCurtain;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevCurtainService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevCurtainController extends BaseController {
     @Autowired
     private ITPsDevCurtainService tPsDevCurtainService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询现场消防水幕检测记录列表
      */
@@ -88,7 +92,12 @@ public class TPsDevCurtainController extends BaseController {
     @Log(title = "现场消防水幕检测记录", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevCurtain tPsDevCurtain) {
-        return toAjax(tPsDevCurtainService.insertTPsDevCurtain(tPsDevCurtain));
+        int result = tPsDevCurtainService.insertTPsDevCurtain(tPsDevCurtain);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("5");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevCurtainController extends BaseController {
     @Log(title = "现场消防水幕检测记录", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevCurtain tPsDevCurtain) {
-        return toAjax(tPsDevCurtainService.updateTPsDevCurtain(tPsDevCurtain));
+        int result = tPsDevCurtainService.updateTPsDevCurtain(tPsDevCurtain);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("5");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevCurtainController extends BaseController {
     @Log(title = "现场消防水幕检测记录", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevCurtainService.deleteTPsDevCurtainByIds(ids));
+        int result = tPsDevCurtainService.deleteTPsDevCurtainByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("5");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -144,9 +163,9 @@ public class TPsDevCurtainController extends BaseController {
                     String cellValue = ExcelUtils.getCellValue(cell);
                     logger.info("cellValue:" + cellValue);
                     if (j == 0) {
-                        entity.setCurtainName(cellValue);
-                    } else if (j == 1) {
                         entity.setPosition(cellValue);
+                    } else if (j == 1) {
+                        entity.setCurtainName(cellValue);
                     } else if (j == 2) {
                         entity.setRemarks(cellValue);
                     }
@@ -193,7 +212,7 @@ public class TPsDevCurtainController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevExtinguisherController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevExtinguisher;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevExtinguisherService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevExtinguisherController extends BaseController {
     @Autowired
     private ITPsDevExtinguisherService tPsDevExtinguisherService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询现场灭火器基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevExtinguisherController extends BaseController {
     @Log(title = "现场灭火器基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevExtinguisher tPsDevExtinguisher) {
-        return toAjax(tPsDevExtinguisherService.insertTPsDevExtinguisher(tPsDevExtinguisher));
+        int result = tPsDevExtinguisherService.insertTPsDevExtinguisher(tPsDevExtinguisher);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("6");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevExtinguisherController extends BaseController {
     @Log(title = "现场灭火器基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevExtinguisher tPsDevExtinguisher) {
-        return toAjax(tPsDevExtinguisherService.updateTPsDevExtinguisher(tPsDevExtinguisher));
+        int result = tPsDevExtinguisherService.updateTPsDevExtinguisher(tPsDevExtinguisher);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("6");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevExtinguisherController extends BaseController {
     @Log(title = "现场灭火器基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevExtinguisherService.deleteTPsDevExtinguisherByIds(ids));
+        int result = tPsDevExtinguisherService.deleteTPsDevExtinguisherByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("6");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -197,7 +216,7 @@ public class TPsDevExtinguisherController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevEyewashController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevEyewash;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevEyewashService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevEyewashController extends BaseController {
     @Autowired
     private ITPsDevEyewashService tPsDevEyewashService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询洗眼器巡检记录列表
      */
@@ -88,7 +92,12 @@ public class TPsDevEyewashController extends BaseController {
     @Log(title = "洗眼器巡检记录", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevEyewash tPsDevEyewash) {
-        return toAjax(tPsDevEyewashService.insertTPsDevEyewash(tPsDevEyewash));
+        int result = tPsDevEyewashService.insertTPsDevEyewash(tPsDevEyewash);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("7");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevEyewashController extends BaseController {
     @Log(title = "洗眼器巡检记录", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevEyewash tPsDevEyewash) {
-        return toAjax(tPsDevEyewashService.updateTPsDevEyewash(tPsDevEyewash));
+        int result = tPsDevEyewashService.updateTPsDevEyewash(tPsDevEyewash);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("7");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevEyewashController extends BaseController {
     @Log(title = "洗眼器巡检记录", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevEyewashService.deleteTPsDevEyewashByIds(ids));
+        int result = tPsDevEyewashService.deleteTPsDevEyewashByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("7");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -191,7 +210,7 @@ public class TPsDevEyewashController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevFgsController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevFgs;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevFgsService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevFgsController extends BaseController {
     @Autowired
     private ITPsDevFgsService tPsDevFgsService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询FGS Mini板基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevFgsController extends BaseController {
     @Log(title = "FGS Mini板基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevFgs tPsDevFgs) {
-        return toAjax(tPsDevFgsService.insertTPsDevFgs(tPsDevFgs));
+        int result = tPsDevFgsService.insertTPsDevFgs(tPsDevFgs);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("8");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevFgsController extends BaseController {
     @Log(title = "FGS Mini板基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevFgs tPsDevFgs) {
-        return toAjax(tPsDevFgsService.updateTPsDevFgs(tPsDevFgs));
+        int result = tPsDevFgsService.updateTPsDevFgs(tPsDevFgs);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("8");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevFgsController extends BaseController {
     @Log(title = "FGS Mini板基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevFgsService.deleteTPsDevFgsByIds(ids));
+        int result = tPsDevFgsService.deleteTPsDevFgsByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("8");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -193,7 +212,7 @@ public class TPsDevFgsController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevFiredoorController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevFiredoor;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevFiredoorService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevFiredoorController extends BaseController {
     @Autowired
     private ITPsDevFiredoorService tPsDevFiredoorService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询安全防火门防爆门基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevFiredoorController extends BaseController {
     @Log(title = "安全防火门防爆门基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevFiredoor tPsDevFiredoor) {
-        return toAjax(tPsDevFiredoorService.insertTPsDevFiredoor(tPsDevFiredoor));
+        int result = tPsDevFiredoorService.insertTPsDevFiredoor(tPsDevFiredoor);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("9");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevFiredoorController extends BaseController {
     @Log(title = "安全防火门防爆门基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevFiredoor tPsDevFiredoor) {
-        return toAjax(tPsDevFiredoorService.updateTPsDevFiredoor(tPsDevFiredoor));
+        int result = tPsDevFiredoorService.updateTPsDevFiredoor(tPsDevFiredoor);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("9");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevFiredoorController extends BaseController {
     @Log(title = "安全防火门防爆门基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevFiredoorService.deleteTPsDevFiredoorByIds(ids));
+        int result = tPsDevFiredoorService.deleteTPsDevFiredoorByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("9");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -195,7 +214,7 @@ public class TPsDevFiredoorController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 37 - 6
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevHydrantController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevHydrant;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevHydrantService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevHydrantController extends BaseController {
     @Autowired
     private ITPsDevHydrantService tPsDevHydrantService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询地上消火栓和消防水带箱基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevHydrantController extends BaseController {
     @Log(title = "地上消火栓和消防水带箱基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevHydrant tPsDevHydrant) {
-        return toAjax(tPsDevHydrantService.insertTPsDevHydrant(tPsDevHydrant));
+        int result = tPsDevHydrantService.insertTPsDevHydrant(tPsDevHydrant);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("10");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevHydrantController extends BaseController {
     @Log(title = "地上消火栓和消防水带箱基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevHydrant tPsDevHydrant) {
-        return toAjax(tPsDevHydrantService.updateTPsDevHydrant(tPsDevHydrant));
+        int result = tPsDevHydrantService.updateTPsDevHydrant(tPsDevHydrant);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("10");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevHydrantController extends BaseController {
     @Log(title = "地上消火栓和消防水带箱基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevHydrantService.deleteTPsDevHydrantByIds(ids));
+        int result = tPsDevHydrantService.deleteTPsDevHydrantByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("10");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -146,10 +165,22 @@ public class TPsDevHydrantController extends BaseController {
                     if (j == 0) {
                         entity.setPosition(cellValue);
                     } else if (j == 1) {
-                        entity.setEquipId(cellValue);
+                        // 组号(同一消火栓 + 多个水带箱)
+                        entity.setGroupNo(cellValue);
                     } else if (j == 2) {
-                        entity.setDevType(cellValue);
+                        entity.setEquipId(cellValue);
                     } else if (j == 3) {
+                        entity.setDevType(cellValue);
+                    } else if (j == 4) {
+                        // 消防水枪数量
+                        entity.setHydrantQty(cellValue);
+                    } else if (j == 5) {
+                        // 消防带数量
+                        entity.setHoseQty(cellValue);
+                    } else if (j == 6) {
+                        // 消防扳手数量
+                        entity.setWrenchQty(cellValue);
+                    } else if (j == 7) {
                         entity.setRemarks(cellValue);
                     }
                 }
@@ -195,7 +226,7 @@ public class TPsDevHydrantController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevLiftController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevLift;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevLiftService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevLiftController extends BaseController {
     @Autowired
     private ITPsDevLiftService tPsDevLiftService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询电梯基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevLiftController extends BaseController {
     @Log(title = "电梯基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevLift tPsDevLift) {
-        return toAjax(tPsDevLiftService.insertTPsDevLift(tPsDevLift));
+        int result = tPsDevLiftService.insertTPsDevLift(tPsDevLift);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("11");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevLiftController extends BaseController {
     @Log(title = "电梯基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevLift tPsDevLift) {
-        return toAjax(tPsDevLiftService.updateTPsDevLift(tPsDevLift));
+        int result = tPsDevLiftService.updateTPsDevLift(tPsDevLift);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("11");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevLiftController extends BaseController {
     @Log(title = "电梯基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevLiftService.deleteTPsDevLiftByIds(ids));
+        int result = tPsDevLiftService.deleteTPsDevLiftByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("11");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -193,7 +212,7 @@ public class TPsDevLiftController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevMonitorController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevMonitor;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevMonitorService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevMonitorController extends BaseController {
     @Autowired
     private ITPsDevMonitorService tPsDevMonitorService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询现场消防炮基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevMonitorController extends BaseController {
     @Log(title = "现场消防炮基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevMonitor tPsDevMonitor) {
-        return toAjax(tPsDevMonitorService.insertTPsDevMonitor(tPsDevMonitor));
+        int result = tPsDevMonitorService.insertTPsDevMonitor(tPsDevMonitor);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("12");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevMonitorController extends BaseController {
     @Log(title = "现场消防炮基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevMonitor tPsDevMonitor) {
-        return toAjax(tPsDevMonitorService.updateTPsDevMonitor(tPsDevMonitor));
+        int result = tPsDevMonitorService.updateTPsDevMonitor(tPsDevMonitor);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("12");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevMonitorController extends BaseController {
     @Log(title = "现场消防炮基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevMonitorService.deleteTPsDevMonitorByIds(ids));
+        int result = tPsDevMonitorService.deleteTPsDevMonitorByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("12");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -193,7 +212,7 @@ public class TPsDevMonitorController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevPitController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevPit;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevPitService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevPitController extends BaseController {
     @Autowired
     private ITPsDevPitService tPsDevPitService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询现场地井基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevPitController extends BaseController {
     @Log(title = "现场地井基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevPit tPsDevPit) {
-        return toAjax(tPsDevPitService.insertTPsDevPit(tPsDevPit));
+        int result = tPsDevPitService.insertTPsDevPit(tPsDevPit);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("13");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevPitController extends BaseController {
     @Log(title = "现场地井基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevPit tPsDevPit) {
-        return toAjax(tPsDevPitService.updateTPsDevPit(tPsDevPit));
+        int result = tPsDevPitService.updateTPsDevPit(tPsDevPit);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("13");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevPitController extends BaseController {
     @Log(title = "现场地井基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevPitService.deleteTPsDevPitByIds(ids));
+        int result = tPsDevPitService.deleteTPsDevPitByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("13");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -193,7 +212,7 @@ public class TPsDevPitController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 26 - 6
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevRainvalveController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevRainvalve;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevRainvalveService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevRainvalveController extends BaseController {
     @Autowired
     private ITPsDevRainvalveService tPsDevRainvalveService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询污水/雨排切换阀门检查列表
      */
@@ -88,7 +92,12 @@ public class TPsDevRainvalveController extends BaseController {
     @Log(title = "污水/雨排切换阀门检查", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevRainvalve tPsDevRainvalve) {
-        return toAjax(tPsDevRainvalveService.insertTPsDevRainvalve(tPsDevRainvalve));
+        int result = tPsDevRainvalveService.insertTPsDevRainvalve(tPsDevRainvalve);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("14");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevRainvalveController extends BaseController {
     @Log(title = "污水/雨排切换阀门检查", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevRainvalve tPsDevRainvalve) {
-        return toAjax(tPsDevRainvalveService.updateTPsDevRainvalve(tPsDevRainvalve));
+        int result = tPsDevRainvalveService.updateTPsDevRainvalve(tPsDevRainvalve);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("14");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevRainvalveController extends BaseController {
     @Log(title = "污水/雨排切换阀门检查", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevRainvalveService.deleteTPsDevRainvalveByIds(ids));
+        int result = tPsDevRainvalveService.deleteTPsDevRainvalveByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("14");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -144,9 +163,9 @@ public class TPsDevRainvalveController extends BaseController {
                     String cellValue = ExcelUtils.getCellValue(cell);
                     logger.info("cellValue:" + cellValue);
                     if (j == 0) {
-                        entity.setValveName(cellValue);
-                    } else if (j == 1) {
                         entity.setPosition(cellValue);
+                    } else if (j == 1) {
+                        entity.setValveName(cellValue);
                     } else if (j == 2) {
                         entity.setRemarks(cellValue);
                     }
@@ -172,6 +191,7 @@ public class TPsDevRainvalveController extends BaseController {
                 // 检查是否存在相同的valveName
                 TPsDevRainvalve exist = new TPsDevRainvalve();
                 exist.setValveName(t.getValveName());
+                exist.setPosition(t.getPosition());
                 List<TPsDevRainvalve> existList = tPsDevRainvalveService.selectTPsDevRainvalveList(exist);
                 if (existList != null && !existList.isEmpty()) {
                     // 更新已存在的数据
@@ -193,7 +213,7 @@ public class TPsDevRainvalveController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 25 - 6
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevSteamController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevSteam;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevSteamService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevSteamController extends BaseController {
     @Autowired
     private ITPsDevSteamService tPsDevSteamService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询消防蒸汽系统基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevSteamController extends BaseController {
     @Log(title = "消防蒸汽系统基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevSteam tPsDevSteam) {
-        return toAjax(tPsDevSteamService.insertTPsDevSteam(tPsDevSteam));
+        int result = tPsDevSteamService.insertTPsDevSteam(tPsDevSteam);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("15");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevSteamController extends BaseController {
     @Log(title = "消防蒸汽系统基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevSteam tPsDevSteam) {
-        return toAjax(tPsDevSteamService.updateTPsDevSteam(tPsDevSteam));
+        int result = tPsDevSteamService.updateTPsDevSteam(tPsDevSteam);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("15");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevSteamController extends BaseController {
     @Log(title = "消防蒸汽系统基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevSteamService.deleteTPsDevSteamByIds(ids));
+        int result = tPsDevSteamService.deleteTPsDevSteamByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("15");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -144,9 +163,9 @@ public class TPsDevSteamController extends BaseController {
                     String cellValue = ExcelUtils.getCellValue(cell);
                     logger.info("cellValue:" + cellValue);
                     if (j == 0) {
-                        entity.setSteamName(cellValue);
-                    } else if (j == 1) {
                         entity.setPosition(cellValue);
+                    } else if (j == 1) {
+                        entity.setSteamName(cellValue);
                     } else if (j == 2) {
                         entity.setRemarks(cellValue);
                     }
@@ -193,7 +212,7 @@ public class TPsDevSteamController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 23 - 4
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevSumpController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevSump;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevSumpService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevSumpController extends BaseController {
     @Autowired
     private ITPsDevSumpService tPsDevSumpService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询雨排井基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevSumpController extends BaseController {
     @Log(title = "雨排井基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevSump tPsDevSump) {
-        return toAjax(tPsDevSumpService.insertTPsDevSump(tPsDevSump));
+        int result = tPsDevSumpService.insertTPsDevSump(tPsDevSump);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("16");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevSumpController extends BaseController {
     @Log(title = "雨排井基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevSump tPsDevSump) {
-        return toAjax(tPsDevSumpService.updateTPsDevSump(tPsDevSump));
+        int result = tPsDevSumpService.updateTPsDevSump(tPsDevSump);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("16");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevSumpController extends BaseController {
     @Log(title = "雨排井基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevSumpService.deleteTPsDevSumpByIds(ids));
+        int result = tPsDevSumpService.deleteTPsDevSumpByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("16");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -193,7 +212,7 @@ public class TPsDevSumpController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 25 - 6
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevUtilitystationController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevUtilitystation;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevUtilitystationService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevUtilitystationController extends BaseController {
     @Autowired
     private ITPsDevUtilitystationService tPsDevUtilitystationService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询公用站基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevUtilitystationController extends BaseController {
     @Log(title = "公用站基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevUtilitystation tPsDevUtilitystation) {
-        return toAjax(tPsDevUtilitystationService.insertTPsDevUtilitystation(tPsDevUtilitystation));
+        int result = tPsDevUtilitystationService.insertTPsDevUtilitystation(tPsDevUtilitystation);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("17");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevUtilitystationController extends BaseController {
     @Log(title = "公用站基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevUtilitystation tPsDevUtilitystation) {
-        return toAjax(tPsDevUtilitystationService.updateTPsDevUtilitystation(tPsDevUtilitystation));
+        int result = tPsDevUtilitystationService.updateTPsDevUtilitystation(tPsDevUtilitystation);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("17");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevUtilitystationController extends BaseController {
     @Log(title = "公用站基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevUtilitystationService.deleteTPsDevUtilitystationByIds(ids));
+        int result = tPsDevUtilitystationService.deleteTPsDevUtilitystationByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("17");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -144,9 +163,9 @@ public class TPsDevUtilitystationController extends BaseController {
                     String cellValue = ExcelUtils.getCellValue(cell);
                     logger.info("cellValue:" + cellValue);
                     if (j == 0) {
-                        entity.setUtilityStationName(cellValue);
-                    } else if (j == 1) {
                         entity.setPosition(cellValue);
+                    } else if (j == 1) {
+                        entity.setUtilityStationName(cellValue);
                     } else if (j == 2) {
                         entity.setRemarks(cellValue);
                     }
@@ -193,7 +212,7 @@ public class TPsDevUtilitystationController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 25 - 6
master/src/main/java/com/ruoyi/project/ps/dev/controller/TPsDevVentvalveController.java

@@ -10,6 +10,7 @@ import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.dev.domain.TPsDevVentvalve;
+import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import com.ruoyi.project.ps.dev.service.ITPsDevVentvalveService;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -37,6 +38,9 @@ public class TPsDevVentvalveController extends BaseController {
     @Autowired
     private ITPsDevVentvalveService tPsDevVentvalveService;
 
+    @Autowired
+    private ITPsPatrolMainService tPsPatrolMainService;
+
     /**
      * 查询余压阀基础信息列表
      */
@@ -88,7 +92,12 @@ public class TPsDevVentvalveController extends BaseController {
     @Log(title = "余压阀基础信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPsDevVentvalve tPsDevVentvalve) {
-        return toAjax(tPsDevVentvalveService.insertTPsDevVentvalve(tPsDevVentvalve));
+        int result = tPsDevVentvalveService.insertTPsDevVentvalve(tPsDevVentvalve);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("18");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -98,7 +107,12 @@ public class TPsDevVentvalveController extends BaseController {
     @Log(title = "余压阀基础信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPsDevVentvalve tPsDevVentvalve) {
-        return toAjax(tPsDevVentvalveService.updateTPsDevVentvalve(tPsDevVentvalve));
+        int result = tPsDevVentvalveService.updateTPsDevVentvalve(tPsDevVentvalve);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("18");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -108,7 +122,12 @@ public class TPsDevVentvalveController extends BaseController {
     @Log(title = "余压阀基础信息", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(tPsDevVentvalveService.deleteTPsDevVentvalveByIds(ids));
+        int result = tPsDevVentvalveService.deleteTPsDevVentvalveByIds(ids);
+        if (result > 0) {
+            // 更新检查策略中的设备数量
+            tPsPatrolMainService.updateDevNumByPatrolType("18");
+        }
+        return toAjax(result);
     }
 
     /**
@@ -144,9 +163,9 @@ public class TPsDevVentvalveController extends BaseController {
                     String cellValue = ExcelUtils.getCellValue(cell);
                     logger.info("cellValue:" + cellValue);
                     if (j == 0) {
-                        entity.setVentvalveNo(cellValue);
-                    } else if (j == 1) {
                         entity.setPosition(cellValue);
+                    } else if (j == 1) {
+                        entity.setVentvalveNo(cellValue);
                     } else if (j == 2) {
                         entity.setRemarks(cellValue);
                     }
@@ -193,7 +212,7 @@ public class TPsDevVentvalveController extends BaseController {
         logger.info("successNumber:" + String.valueOf(successNumber));
         logger.info("failNumber:" + String.valueOf(failNumber));
         logger.info("failRow:" + String.valueOf(failRow));
-        return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
 
 }

+ 74 - 0
master/src/main/java/com/ruoyi/project/ps/dev/domain/TPsDevCabinet.java

@@ -95,6 +95,35 @@ public class TPsDevCabinet extends BaseEntity {
     @Excel(name = "设备类型")
     private String patrolType;
 
+    /**
+     * 阀门类型
+     */
+    @Excel(name = "阀门类型")
+    private String valveType;
+
+    /**
+     * 阀门规格
+     */
+    @Excel(name = "阀门规格")
+    private String valveSpecification;
+
+    /**
+     * 阀门长度
+     */
+    @Excel(name = "阀门长度")
+    private String valveLength;
+
+    /**
+     * 螺栓点距
+     */
+    @Excel(name = "螺栓点距")
+    private String boltPointDistance;
+
+    /**
+     * 螺栓孔数
+     */
+    @Excel(name = "螺栓孔数")
+    private String boltHoleCount;
 
     private String deptName;
 
@@ -210,6 +239,46 @@ public class TPsDevCabinet extends BaseEntity {
         return patrolType;
     }
 
+    public void setValveType(String valveType) {
+        this.valveType = valveType;
+    }
+
+    public String getValveType() {
+        return valveType;
+    }
+
+    public void setValveSpecification(String valveSpecification) {
+        this.valveSpecification = valveSpecification;
+    }
+
+    public String getValveSpecification() {
+        return valveSpecification;
+    }
+
+    public void setValveLength(String valveLength) {
+        this.valveLength = valveLength;
+    }
+
+    public String getValveLength() {
+        return valveLength;
+    }
+
+    public void setBoltPointDistance(String boltPointDistance) {
+        this.boltPointDistance = boltPointDistance;
+    }
+
+    public String getBoltPointDistance() {
+        return boltPointDistance;
+    }
+
+    public void setBoltHoleCount(String boltHoleCount) {
+        this.boltHoleCount = boltHoleCount;
+    }
+
+    public String getBoltHoleCount() {
+        return boltHoleCount;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -226,6 +295,11 @@ public class TPsDevCabinet extends BaseEntity {
                 .append("deptId", getDeptId())
                 .append("status", getStatus())
                 .append("patrolType", getPatrolType())
+                .append("valveType", getValveType())
+                .append("valveSpecification", getValveSpecification())
+                .append("valveLength", getValveLength())
+                .append("boltPointDistance", getBoltPointDistance())
+                .append("boltHoleCount", getBoltHoleCount())
                 .toString();
     }
 }

+ 59 - 0
master/src/main/java/com/ruoyi/project/ps/dev/domain/TPsDevHydrant.java

@@ -34,6 +34,12 @@ public class TPsDevHydrant extends BaseEntity {
     @Excel(name = "器材编号")
     private String equipId;
 
+    /**
+     * 组号(同一消火栓 + 多个水带箱,用同一组号标识)
+     */
+    @Excel(name = "组号")
+    private String groupNo;
+
     /**
      * 设备类型
      */
@@ -96,6 +102,24 @@ public class TPsDevHydrant extends BaseEntity {
     private String patrolType;
 
 
+    /**
+     * 消防水枪
+     */
+    @Excel(name = "消防水枪")
+    private String hydrantQty;
+
+    /**
+     * 消防带数量
+     */
+    @Excel(name = "消防带数量")
+    private String hoseQty;
+
+    /**
+     * 消防扳手数量
+     */
+    @Excel(name = "消防扳手数量")
+    private String wrenchQty;
+
     private String deptName;
 
     public String getDeptName() {
@@ -130,6 +154,14 @@ public class TPsDevHydrant extends BaseEntity {
         return equipId;
     }
 
+    public String getGroupNo() {
+        return groupNo;
+    }
+
+    public void setGroupNo(String groupNo) {
+        this.groupNo = groupNo;
+    }
+
     public void setDevType(String devType) {
         this.devType = devType;
     }
@@ -210,6 +242,30 @@ public class TPsDevHydrant extends BaseEntity {
         return patrolType;
     }
 
+    public String getHydrantQty() {
+        return hydrantQty;
+    }
+
+    public void setHydrantQty(String hydrantQty) {
+        this.hydrantQty = hydrantQty;
+    }
+
+    public String getHoseQty() {
+        return hoseQty;
+    }
+
+    public void setHoseQty(String hoseQty) {
+        this.hoseQty = hoseQty;
+    }
+
+    public String getWrenchQty() {
+        return wrenchQty;
+    }
+
+    public void setWrenchQty(String wrenchQty) {
+        this.wrenchQty = wrenchQty;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -226,6 +282,9 @@ public class TPsDevHydrant extends BaseEntity {
                 .append("deptId", getDeptId())
                 .append("status", getStatus())
                 .append("patrolType", getPatrolType())
+                .append("hydrantQty", getHydrantQty())
+                .append("hoseQty", getHoseQty())
+                .append("wrenchQty", getWrenchQty())
                 .toString();
     }
 }

+ 7 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevAlarmMapper.java

@@ -60,4 +60,11 @@ public interface TPsDevAlarmMapper {
      * @return 结果
      */
     public int deleteTPsDevAlarmByIds(Long[] ids);
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 7 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevCabinetMapper.java

@@ -60,4 +60,11 @@ public interface TPsDevCabinetMapper {
      * @return 结果
      */
     public int deleteTPsDevCabinetByIds(Long[] ids);
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevCallsystemMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevCallsystemMapper {
      * @return 结果
      */
     public int deleteTPsDevCallsystemByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevCofferMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevCofferMapper {
      * @return 结果
      */
     public int deleteTPsDevCofferByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevCurtainMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevCurtainMapper {
      * @return 结果
      */
     public int deleteTPsDevCurtainByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevExtinguisherMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevExtinguisherMapper {
      * @return 结果
      */
     public int deleteTPsDevExtinguisherByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevEyewashMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevEyewashMapper {
      * @return 结果
      */
     public int deleteTPsDevEyewashByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevFgsMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevFgsMapper {
      * @return 结果
      */
     public int deleteTPsDevFgsByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevFiredoorMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevFiredoorMapper {
      * @return 结果
      */
     public int deleteTPsDevFiredoorByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevHydrantMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevHydrantMapper {
      * @return 结果
      */
     public int deleteTPsDevHydrantByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevLiftMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevLiftMapper {
      * @return 结果
      */
     public int deleteTPsDevLiftByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevMonitorMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevMonitorMapper {
      * @return 结果
      */
     public int deleteTPsDevMonitorByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevPitMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevPitMapper {
      * @return 结果
      */
     public int deleteTPsDevPitByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevRainvalveMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevRainvalveMapper {
      * @return 结果
      */
     public int deleteTPsDevRainvalveByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevSteamMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevSteamMapper {
      * @return 结果
      */
     public int deleteTPsDevSteamByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevSumpMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevSumpMapper {
      * @return 结果
      */
     public int deleteTPsDevSumpByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevUtilitystationMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevUtilitystationMapper {
      * @return 结果
      */
     public int deleteTPsDevUtilitystationByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/dev/mapper/TPsDevVentvalveMapper.java

@@ -60,4 +60,12 @@ public interface TPsDevVentvalveMapper {
      * @return 结果
      */
     public int deleteTPsDevVentvalveByIds(Long[] ids);
+
+
+    /**
+     * 统计在用设备数量
+     *
+     * @return 设备数量
+     */
+    public long countByStatus();
 }

+ 63 - 335
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionAppController.java

@@ -1,15 +1,13 @@
 package com.ruoyi.project.ps.inspection.controller;
 
+import com.alibaba.fastjson.JSON;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.ps.inspection.domain.*;
 import com.ruoyi.project.ps.inspection.dto.InspectionQueryRequest;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.Map;
 
@@ -21,7 +19,7 @@ import java.util.Map;
  * @date 2025-01-XX
  */
 @RestController
-@RequestMapping("/app/ps/inspection")
+@RequestMapping("/ps/dev")
 public class TPsInspectionAppController extends BaseController {
 
     // 注入各个Controller
@@ -68,14 +66,14 @@ public class TPsInspectionAppController extends BaseController {
      * @param request 查询请求参数
      * @return 查询结果
      */
-    @PostMapping("/list")
-    public AjaxResult list(@RequestBody InspectionQueryRequest request) {
+    @GetMapping("/list")
+    public AjaxResult list(InspectionQueryRequest request) {
         if (request.getType() == null || request.getType().isEmpty()) {
             return AjaxResult.error("巡检记录类型不能为空");
         }
 
         try {
-            TableDataInfo dataTable = queryByType(request);
+            TableDataInfo dataTable = queryByType(request.getType(), JSON.toJSONString(request));
             return AjaxResult.success(dataTable);
         } catch (Exception e) {
             logger.error("查询巡检记录失败", e);
@@ -89,7 +87,7 @@ public class TPsInspectionAppController extends BaseController {
      * @param request 修改请求参数(包含type和具体的数据对象)
      * @return 修改结果
      */
-    @PostMapping("/update")
+    @PutMapping("/update")
     public AjaxResult update(@RequestBody Map<String, Object> request) {
         String type = (String) request.get("type");
         if (type == null || type.isEmpty()) {
@@ -107,98 +105,80 @@ public class TPsInspectionAppController extends BaseController {
     /**
      * 根据类型查询数据,调用对应Controller的list方法
      */
-    private TableDataInfo queryByType(InspectionQueryRequest request) {
-        String type = request.getType().toLowerCase();
+    private TableDataInfo queryByType(String type, String dataJson) {
+        type = type.toLowerCase();
 
         switch (type) {
             case "alarm":
-                TPsInspectionAlarm alarm = new TPsInspectionAlarm();
-                copyCommonFields(request, alarm);
+                TPsInspectionAlarm alarm = (TPsInspectionAlarm) setFilterFields(dataJson, TPsInspectionAlarm.class);
                 return alarmController.list(alarm);
 
             case "extinguisher":
-                TPsInspectionExtinguisher extinguisher = new TPsInspectionExtinguisher();
-                copyCommonFields(request, extinguisher);
+                TPsInspectionExtinguisher extinguisher = (TPsInspectionExtinguisher) setFilterFields(dataJson, TPsInspectionExtinguisher.class);
                 return extinguisherController.list(extinguisher);
 
             case "hydrant":
-                TPsInspectionHydrant hydrant = new TPsInspectionHydrant();
-                copyCommonFields(request, hydrant);
+                TPsInspectionHydrant hydrant = (TPsInspectionHydrant) setFilterFields(dataJson, TPsInspectionHydrant.class);
                 return hydrantController.list(hydrant);
 
             case "firedoor":
-                TPsInspectionFiredoor firedoor = new TPsInspectionFiredoor();
-                copyCommonFields(request, firedoor);
+                TPsInspectionFiredoor firedoor = (TPsInspectionFiredoor) setFilterFields(dataJson, TPsInspectionFiredoor.class);
                 return firedoorController.list(firedoor);
 
             case "lift":
-                TPsInspectionLift lift = new TPsInspectionLift();
-                copyCommonFields(request, lift);
+                TPsInspectionLift lift = (TPsInspectionLift) setFilterFields(dataJson, TPsInspectionLift.class);
                 return liftController.list(lift);
 
             case "cabinet":
-                TPsInspectionCabinet cabinet = new TPsInspectionCabinet();
-                copyCommonFields(request, cabinet);
+                TPsInspectionCabinet cabinet = (TPsInspectionCabinet) setFilterFields(dataJson, TPsInspectionCabinet.class);
                 return cabinetController.list(cabinet);
 
             case "callsystem":
-                TPsInspectionCallsystem callsystem = new TPsInspectionCallsystem();
-                copyCommonFields(request, callsystem);
+                TPsInspectionCallsystem callsystem = (TPsInspectionCallsystem) setFilterFields(dataJson, TPsInspectionCallsystem.class);
                 return callsystemController.list(callsystem);
 
             case "fgs":
-                TPsInspectionFgs fgs = new TPsInspectionFgs();
-                copyCommonFields(request, fgs);
+                TPsInspectionFgs fgs = (TPsInspectionFgs) setFilterFields(dataJson, TPsInspectionFgs.class);
                 return fgsController.list(fgs);
 
             case "curtain":
-                TPsInspectionCurtain curtain = new TPsInspectionCurtain();
-                copyCommonFields(request, curtain);
+                TPsInspectionCurtain curtain = (TPsInspectionCurtain) setFilterFields(dataJson, TPsInspectionCurtain.class);
                 return curtainController.list(curtain);
 
             case "steam":
-                TPsInspectionSteam steam = new TPsInspectionSteam();
-                copyCommonFields(request, steam);
+                TPsInspectionSteam steam = (TPsInspectionSteam) setFilterFields(dataJson, TPsInspectionSteam.class);
                 return steamController.list(steam);
 
             case "monitor":
-                TPsInspectionMonitor monitor = new TPsInspectionMonitor();
-                copyCommonFields(request, monitor);
+                TPsInspectionMonitor monitor = (TPsInspectionMonitor) setFilterFields(dataJson, TPsInspectionMonitor.class);
                 return monitorController.list(monitor);
 
             case "coffer":
-                TPsInspectionCoffer coffer = new TPsInspectionCoffer();
-                copyCommonFields(request, coffer);
+                TPsInspectionCoffer coffer = (TPsInspectionCoffer) setFilterFields(dataJson, TPsInspectionCoffer.class);
                 return cofferController.list(coffer);
 
             case "sump":
-                TPsInspectionSump sump = new TPsInspectionSump();
-                copyCommonFields(request, sump);
+                TPsInspectionSump sump = (TPsInspectionSump) setFilterFields(dataJson, TPsInspectionSump.class);
                 return sumpController.list(sump);
 
             case "pit":
-                TPsInspectionPit pit = new TPsInspectionPit();
-                copyCommonFields(request, pit);
+                TPsInspectionPit pit = (TPsInspectionPit) setFilterFields(dataJson, TPsInspectionPit.class);
                 return pitController.list(pit);
 
             case "rainvalve":
-                TPsInspectionRainvalve rainvalve = new TPsInspectionRainvalve();
-                copyCommonFields(request, rainvalve);
+                TPsInspectionRainvalve rainvalve = (TPsInspectionRainvalve) setFilterFields(dataJson, TPsInspectionRainvalve.class);
                 return rainvalveController.list(rainvalve);
 
             case "ventvalve":
-                TPsInspectionVentvalve ventvalve = new TPsInspectionVentvalve();
-                copyCommonFields(request, ventvalve);
+                TPsInspectionVentvalve ventvalve = (TPsInspectionVentvalve) setFilterFields(dataJson, TPsInspectionVentvalve.class);
                 return ventvalveController.list(ventvalve);
 
             case "utilitystation":
-                TPsInspectionUtilitystation utilitystation = new TPsInspectionUtilitystation();
-                copyCommonFields(request, utilitystation);
+                TPsInspectionUtilitystation utilitystation = (TPsInspectionUtilitystation) setFilterFields(dataJson, TPsInspectionUtilitystation.class);
                 return utilitystationController.list(utilitystation);
 
             case "eyewash":
-                TPsInspectionEyewash eyewash = new TPsInspectionEyewash();
-                copyCommonFields(request, eyewash);
+                TPsInspectionEyewash eyewash = (TPsInspectionEyewash) setFilterFields(dataJson, TPsInspectionEyewash.class);
                 return eyewashController.list(eyewash);
 
             default:
@@ -209,86 +189,87 @@ public class TPsInspectionAppController extends BaseController {
     /**
      * 根据类型更新数据,调用对应Controller的edit方法
      */
-    @SuppressWarnings("unchecked")
     private AjaxResult updateByType(String type, Map<String, Object> request) {
         type = type.toLowerCase();
-        Map<String, Object> data = (Map<String, Object>) request.get("data");
+        Object dataObj = request.get("data");
 
-        if (data == null) {
+        if (dataObj == null) {
             throw new IllegalArgumentException("更新数据不能为空");
         }
 
+        String dataJson = JSON.toJSONString(dataObj);
+
         switch (type) {
             case "alarm":
-                TPsInspectionAlarm alarm = convertToAlarm(data);
+                TPsInspectionAlarm alarm = JSON.parseObject(dataJson, TPsInspectionAlarm.class);
                 return alarmController.edit(alarm);
 
             case "extinguisher":
-                TPsInspectionExtinguisher extinguisher = convertToExtinguisher(data);
+                TPsInspectionExtinguisher extinguisher = JSON.parseObject(dataJson, TPsInspectionExtinguisher.class);
                 return extinguisherController.edit(extinguisher);
 
             case "hydrant":
-                TPsInspectionHydrant hydrant = convertToHydrant(data);
+                TPsInspectionHydrant hydrant = JSON.parseObject(dataJson, TPsInspectionHydrant.class);
                 return hydrantController.edit(hydrant);
 
             case "firedoor":
-                TPsInspectionFiredoor firedoor = convertToFiredoor(data);
+                TPsInspectionFiredoor firedoor = JSON.parseObject(dataJson, TPsInspectionFiredoor.class);
                 return firedoorController.edit(firedoor);
 
             case "lift":
-                TPsInspectionLift lift = convertToLift(data);
+                TPsInspectionLift lift = JSON.parseObject(dataJson, TPsInspectionLift.class);
                 return liftController.edit(lift);
 
             case "cabinet":
-                TPsInspectionCabinet cabinet = convertToCabinet(data);
+                TPsInspectionCabinet cabinet = JSON.parseObject(dataJson, TPsInspectionCabinet.class);
                 return cabinetController.edit(cabinet);
 
             case "callsystem":
-                TPsInspectionCallsystem callsystem = convertToCallsystem(data);
+                TPsInspectionCallsystem callsystem = JSON.parseObject(dataJson, TPsInspectionCallsystem.class);
                 return callsystemController.edit(callsystem);
 
             case "fgs":
-                TPsInspectionFgs fgs = convertToFgs(data);
+                TPsInspectionFgs fgs = JSON.parseObject(dataJson, TPsInspectionFgs.class);
                 return fgsController.edit(fgs);
 
             case "curtain":
-                TPsInspectionCurtain curtain = convertToCurtain(data);
+                TPsInspectionCurtain curtain = JSON.parseObject(dataJson, TPsInspectionCurtain.class);
                 return curtainController.edit(curtain);
 
             case "steam":
-                TPsInspectionSteam steam = convertToSteam(data);
+                TPsInspectionSteam steam = JSON.parseObject(dataJson, TPsInspectionSteam.class);
                 return steamController.edit(steam);
 
             case "monitor":
-                TPsInspectionMonitor monitor = convertToMonitor(data);
+                TPsInspectionMonitor monitor = JSON.parseObject(dataJson, TPsInspectionMonitor.class);
                 return monitorController.edit(monitor);
 
             case "coffer":
-                TPsInspectionCoffer coffer = convertToCoffer(data);
+                TPsInspectionCoffer coffer = JSON.parseObject(dataJson, TPsInspectionCoffer.class);
                 return cofferController.edit(coffer);
 
             case "sump":
-                TPsInspectionSump sump = convertToSump(data);
+                TPsInspectionSump sump = JSON.parseObject(dataJson, TPsInspectionSump.class);
                 return sumpController.edit(sump);
 
             case "pit":
-                TPsInspectionPit pit = convertToPit(data);
+                TPsInspectionPit pit = JSON.parseObject(dataJson, TPsInspectionPit.class);
                 return pitController.edit(pit);
 
             case "rainvalve":
-                TPsInspectionRainvalve rainvalve = convertToRainvalve(data);
+                TPsInspectionRainvalve rainvalve = JSON.parseObject(dataJson, TPsInspectionRainvalve.class);
                 return rainvalveController.edit(rainvalve);
 
             case "ventvalve":
-                TPsInspectionVentvalve ventvalve = convertToVentvalve(data);
+                TPsInspectionVentvalve ventvalve = JSON.parseObject(dataJson, TPsInspectionVentvalve.class);
                 return ventvalveController.edit(ventvalve);
 
             case "utilitystation":
-                TPsInspectionUtilitystation utilitystation = convertToUtilitystation(data);
+                TPsInspectionUtilitystation utilitystation = JSON.parseObject(dataJson, TPsInspectionUtilitystation.class);
                 return utilitystationController.edit(utilitystation);
 
             case "eyewash":
-                TPsInspectionEyewash eyewash = convertToEyewash(data);
+                TPsInspectionEyewash eyewash = JSON.parseObject(dataJson, TPsInspectionEyewash.class);
                 return eyewashController.edit(eyewash);
 
             default:
@@ -297,281 +278,28 @@ public class TPsInspectionAppController extends BaseController {
     }
 
     /**
-     * 复制通用字段到实体对象
+     * 使用 FastJSON 解析 JSON 字符串为对象
      */
-    private void copyCommonFields(InspectionQueryRequest request, Object entity) {
-        if (request.getId() != null) {
-            setFieldValue(entity, "id", request.getId());
-        }
-        if (request.getDevNo() != null) {
-            setFieldValue(entity, "devNo", request.getDevNo());
-        }
-        if (request.getPosition() != null) {
-            setFieldValue(entity, "position", request.getPosition());
-        }
-        if (request.getMonth() != null) {
-            setFieldValue(entity, "month", request.getMonth());
-        }
-        if (request.getYear() != null) {
-            setFieldValue(entity, "year", request.getYear());
-        }
-        if (request.getPlanId() != null) {
-            setFieldValue(entity, "planId", request.getPlanId());
-        }
-        if (request.getDeptId() != null) {
-            setFieldValue(entity, "deptId", request.getDeptId());
-        }
-        if (request.getCheckStatus() != null) {
-            setFieldValue(entity, "checkStatus", request.getCheckStatus());
-        }
-        if (request.getIssuesStatus() != null) {
-            setFieldValue(entity, "issuesStatus", request.getIssuesStatus());
-        }
-        if (request.getIssuesFlag() != null) {
-            setFieldValue(entity, "issuesFlag", request.getIssuesFlag());
+    private Object setFilterFields(String dataJson, Class<?> entityClass) {
+        if (dataJson == null || dataJson.isEmpty()) {
+            try {
+                return entityClass.newInstance();
+            } catch (Exception e) {
+                logger.error("创建对象失败: {}", entityClass.getName(), e);
+                throw new RuntimeException("创建对象失败: " + entityClass.getName(), e);
+            }
         }
-    }
-
-    /**
-     * 使用反射设置字段值
-     */
-    private void setFieldValue(Object obj, String fieldName, Object value) {
         try {
-            java.lang.reflect.Field field = obj.getClass().getDeclaredField(fieldName);
-            field.setAccessible(true);
-            field.set(obj, value);
+            return JSON.parseObject(dataJson, entityClass);
         } catch (Exception e) {
-            // 忽略不存在的字段
-        }
-    }
-
-    /**
-     * 将Map转换为Alarm对象
-     */
-    private TPsInspectionAlarm convertToAlarm(Map<String, Object> data) {
-        TPsInspectionAlarm alarm = new TPsInspectionAlarm();
-        convertMapToObject(data, alarm);
-        return alarm;
-    }
-
-    /**
-     * 将Map转换为Extinguisher对象
-     */
-    private TPsInspectionExtinguisher convertToExtinguisher(Map<String, Object> data) {
-        TPsInspectionExtinguisher extinguisher = new TPsInspectionExtinguisher();
-        convertMapToObject(data, extinguisher);
-        return extinguisher;
-    }
-
-    /**
-     * 将Map转换为Hydrant对象
-     */
-    private TPsInspectionHydrant convertToHydrant(Map<String, Object> data) {
-        TPsInspectionHydrant hydrant = new TPsInspectionHydrant();
-        convertMapToObject(data, hydrant);
-        return hydrant;
-    }
-
-    /**
-     * 将Map转换为Firedoor对象
-     */
-    private TPsInspectionFiredoor convertToFiredoor(Map<String, Object> data) {
-        TPsInspectionFiredoor firedoor = new TPsInspectionFiredoor();
-        convertMapToObject(data, firedoor);
-        return firedoor;
-    }
-
-    /**
-     * 将Map转换为Lift对象
-     */
-    private TPsInspectionLift convertToLift(Map<String, Object> data) {
-        TPsInspectionLift lift = new TPsInspectionLift();
-        convertMapToObject(data, lift);
-        return lift;
-    }
-
-    /**
-     * 将Map转换为Cabinet对象
-     */
-    private TPsInspectionCabinet convertToCabinet(Map<String, Object> data) {
-        TPsInspectionCabinet cabinet = new TPsInspectionCabinet();
-        convertMapToObject(data, cabinet);
-        return cabinet;
-    }
-
-    /**
-     * 将Map转换为Callsystem对象
-     */
-    private TPsInspectionCallsystem convertToCallsystem(Map<String, Object> data) {
-        TPsInspectionCallsystem callsystem = new TPsInspectionCallsystem();
-        convertMapToObject(data, callsystem);
-        return callsystem;
-    }
-
-    /**
-     * 将Map转换为Fgs对象
-     */
-    private TPsInspectionFgs convertToFgs(Map<String, Object> data) {
-        TPsInspectionFgs fgs = new TPsInspectionFgs();
-        convertMapToObject(data, fgs);
-        return fgs;
-    }
-
-    /**
-     * 将Map转换为Curtain对象
-     */
-    private TPsInspectionCurtain convertToCurtain(Map<String, Object> data) {
-        TPsInspectionCurtain curtain = new TPsInspectionCurtain();
-        convertMapToObject(data, curtain);
-        return curtain;
-    }
-
-    /**
-     * 将Map转换为Steam对象
-     */
-    private TPsInspectionSteam convertToSteam(Map<String, Object> data) {
-        TPsInspectionSteam steam = new TPsInspectionSteam();
-        convertMapToObject(data, steam);
-        return steam;
-    }
-
-    /**
-     * 将Map转换为Monitor对象
-     */
-    private TPsInspectionMonitor convertToMonitor(Map<String, Object> data) {
-        TPsInspectionMonitor monitor = new TPsInspectionMonitor();
-        convertMapToObject(data, monitor);
-        return monitor;
-    }
-
-    /**
-     * 将Map转换为Coffer对象
-     */
-    private TPsInspectionCoffer convertToCoffer(Map<String, Object> data) {
-        TPsInspectionCoffer coffer = new TPsInspectionCoffer();
-        convertMapToObject(data, coffer);
-        return coffer;
-    }
-
-    /**
-     * 将Map转换为Sump对象
-     */
-    private TPsInspectionSump convertToSump(Map<String, Object> data) {
-        TPsInspectionSump sump = new TPsInspectionSump();
-        convertMapToObject(data, sump);
-        return sump;
-    }
-
-    /**
-     * 将Map转换为Pit对象
-     */
-    private TPsInspectionPit convertToPit(Map<String, Object> data) {
-        TPsInspectionPit pit = new TPsInspectionPit();
-        convertMapToObject(data, pit);
-        return pit;
-    }
-
-    /**
-     * 将Map转换为Rainvalve对象
-     */
-    private TPsInspectionRainvalve convertToRainvalve(Map<String, Object> data) {
-        TPsInspectionRainvalve rainvalve = new TPsInspectionRainvalve();
-        convertMapToObject(data, rainvalve);
-        return rainvalve;
-    }
-
-    /**
-     * 将Map转换为Ventvalve对象
-     */
-    private TPsInspectionVentvalve convertToVentvalve(Map<String, Object> data) {
-        TPsInspectionVentvalve ventvalve = new TPsInspectionVentvalve();
-        convertMapToObject(data, ventvalve);
-        return ventvalve;
-    }
-
-    /**
-     * 将Map转换为Utilitystation对象
-     */
-    private TPsInspectionUtilitystation convertToUtilitystation(Map<String, Object> data) {
-        TPsInspectionUtilitystation utilitystation = new TPsInspectionUtilitystation();
-        convertMapToObject(data, utilitystation);
-        return utilitystation;
-    }
-
-    /**
-     * 将Map转换为Eyewash对象
-     */
-    private TPsInspectionEyewash convertToEyewash(Map<String, Object> data) {
-        TPsInspectionEyewash eyewash = new TPsInspectionEyewash();
-        convertMapToObject(data, eyewash);
-        return eyewash;
-    }
-
-    /**
-     * 将Map转换为对象(使用反射)
-     */
-    private void convertMapToObject(Map<String, Object> map, Object obj) {
-        for (Map.Entry<String, Object> entry : map.entrySet()) {
-            String key = entry.getKey();
-            Object value = entry.getValue();
-
-            // 将下划线命名转换为驼峰命名
-            String fieldName = toCamelCase(key);
-
+            logger.warn("解析JSON失败: {}", e.getMessage());
             try {
-                java.lang.reflect.Field field = obj.getClass().getDeclaredField(fieldName);
-                field.setAccessible(true);
-
-                // 类型转换
-                if (value != null) {
-                    Class<?> fieldType = field.getType();
-                    if (fieldType == Long.class || fieldType == long.class) {
-                        if (value instanceof Number) {
-                            field.set(obj, ((Number) value).longValue());
-                        } else if (value instanceof String) {
-                            field.set(obj, Long.parseLong((String) value));
-                        }
-                    } else if (fieldType == Integer.class || fieldType == int.class) {
-                        if (value instanceof Number) {
-                            field.set(obj, ((Number) value).intValue());
-                        } else if (value instanceof String) {
-                            field.set(obj, Integer.parseInt((String) value));
-                        }
-                    } else if (fieldType == String.class) {
-                        field.set(obj, value.toString());
-                    } else {
-                        field.set(obj, value);
-                    }
-                }
-            } catch (Exception e) {
-                // 忽略不存在的字段
+                return entityClass.newInstance();
+            } catch (Exception ex) {
+                throw new RuntimeException("创建对象失败: " + entityClass.getName(), ex);
             }
         }
     }
 
-    /**
-     * 下划线命名转驼峰命名
-     */
-    private String toCamelCase(String str) {
-        if (str == null || str.isEmpty()) {
-            return str;
-        }
-        StringBuilder result = new StringBuilder();
-        boolean nextUpperCase = false;
-        for (int i = 0; i < str.length(); i++) {
-            char c = str.charAt(i);
-            if (c == '_') {
-                nextUpperCase = true;
-            } else {
-                if (nextUpperCase) {
-                    result.append(Character.toUpperCase(c));
-                    nextUpperCase = false;
-                } else {
-                    result.append(c);
-                }
-            }
-        }
-        return result.toString();
-    }
 }
 

+ 5 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionCabinetController.java

@@ -123,6 +123,11 @@ public class TPsInspectionCabinetController extends BaseController {
             entity.setInternalItems(tPsInspectionCabinet.getInternalItems());
             entity.setValve(tPsInspectionCabinet.getValve());
             entity.setPassage(tPsInspectionCabinet.getPassage());
+            entity.setValveType(cabinet.getValveType());
+            entity.setValveSpecification(cabinet.getValveSpecification());
+            entity.setValveLength(cabinet.getValveLength());
+            entity.setBoltPointDistance(cabinet.getBoltPointDistance());
+            entity.setBoltHoleCount(cabinet.getBoltHoleCount());
             entity.setMonth(cabinet.getMonth());
             entity.setYear(cabinet.getYear());
             entity.setPlanId(cabinet.getPlanId());

+ 3 - 2
master/src/main/java/com/ruoyi/project/ps/inspection/controller/TPsInspectionHydrantController.java

@@ -107,7 +107,7 @@ public class TPsInspectionHydrantController extends BaseController {
         }
 
         // 检查是否存在异常项
-        if (StringUtils.isNotEquals("1", tPsInspectionHydrant.getHydrantStatus(), tPsInspectionHydrant.getHoseQty(), tPsInspectionHydrant.getWrenchQty(), tPsInspectionHydrant.getAppearance(), tPsInspectionHydrant.getLeakStatus(), tPsInspectionHydrant.getItemStatus(), tPsInspectionHydrant.getAccessStatus())) {
+        if (StringUtils.isNotEquals("1", tPsInspectionHydrant.getHydrantQty(), tPsInspectionHydrant.getHoseQty(), tPsInspectionHydrant.getWrenchQty(), tPsInspectionHydrant.getAppearance(), tPsInspectionHydrant.getLeakStatus(), tPsInspectionHydrant.getItemStatus(), tPsInspectionHydrant.getAccessStatus())) {
             // 当前数据标记为存在问题
             tPsInspectionHydrant.setIssuesStatus(1L);
             tPsInspectionHydrant.setUpdatedate(date);
@@ -118,7 +118,8 @@ public class TPsInspectionHydrantController extends BaseController {
             TPsInspectionHydrant entity = new TPsInspectionHydrant();
             entity.setEquipId(hydrant.getEquipId());
             entity.setPosition(hydrant.getPosition());
-            entity.setHydrantStatus(tPsInspectionHydrant.getHydrantStatus());
+            entity.setGroupNo(hydrant.getGroupNo());
+            entity.setHydrantQty(tPsInspectionHydrant.getHydrantQty());
             entity.setHoseQty(tPsInspectionHydrant.getHoseQty());
             entity.setWrenchQty(tPsInspectionHydrant.getWrenchQty());
             entity.setAppearance(tPsInspectionHydrant.getAppearance());

+ 92 - 0
master/src/main/java/com/ruoyi/project/ps/inspection/domain/TPsInspectionCabinet.java

@@ -33,6 +33,24 @@ public class TPsInspectionCabinet extends BaseEntity {
         this.createrCode = createrCode;
     }
 
+    public TPsInspectionCabinet(String position, String modelNo, String boxNo, Long month, Long year, Long planId, String createrCode, String valveType, String valveSpecification, String valveLength, String boltPointDistance, String boltHoleCount) {
+        this.planId = planId;
+        this.year = year;
+        this.month = month;
+        this.boxNo = boxNo;
+        this.modelNo = modelNo;
+        this.position = position;
+        this.valveType = valveType;
+        this.valveSpecification = valveSpecification;
+        this.valveLength = valveLength;
+        this.boltPointDistance = boltPointDistance;
+        this.boltHoleCount = boltHoleCount;
+        this.issuesStatus = 0L;
+        this.checkStatus = "0";
+        this.createdate = new Date();
+        this.createrCode = createrCode;
+    }
+
     /**
      * id
      */
@@ -172,6 +190,35 @@ public class TPsInspectionCabinet extends BaseEntity {
     @Excel(name = "是否为问题记录数据")
     private Long issuesFlag;
 
+    /**
+     * 阀门类型
+     */
+    @Excel(name = "阀门类型")
+    private String valveType;
+
+    /**
+     * 阀门规格
+     */
+    @Excel(name = "阀门规格")
+    private String valveSpecification;
+
+    /**
+     * 阀门长度
+     */
+    @Excel(name = "阀门长度")
+    private String valveLength;
+
+    /**
+     * 螺栓点距
+     */
+    @Excel(name = "螺栓点距")
+    private String boltPointDistance;
+
+    /**
+     * 螺栓孔数
+     */
+    @Excel(name = "螺栓孔数")
+    private String boltHoleCount;
 
     private String deptName;
 
@@ -367,6 +414,46 @@ public class TPsInspectionCabinet extends BaseEntity {
         return issuesFlag;
     }
 
+    public void setValveType(String valveType) {
+        this.valveType = valveType;
+    }
+
+    public String getValveType() {
+        return valveType;
+    }
+
+    public void setValveSpecification(String valveSpecification) {
+        this.valveSpecification = valveSpecification;
+    }
+
+    public String getValveSpecification() {
+        return valveSpecification;
+    }
+
+    public void setValveLength(String valveLength) {
+        this.valveLength = valveLength;
+    }
+
+    public String getValveLength() {
+        return valveLength;
+    }
+
+    public void setBoltPointDistance(String boltPointDistance) {
+        this.boltPointDistance = boltPointDistance;
+    }
+
+    public String getBoltPointDistance() {
+        return boltPointDistance;
+    }
+
+    public void setBoltHoleCount(String boltHoleCount) {
+        this.boltHoleCount = boltHoleCount;
+    }
+
+    public String getBoltHoleCount() {
+        return boltHoleCount;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -393,6 +480,11 @@ public class TPsInspectionCabinet extends BaseEntity {
                 .append("planId", getPlanId())
                 .append("issuesStatus", getIssuesStatus())
                 .append("issuesFlag", getIssuesFlag())
+                .append("valveType", getValveType())
+                .append("valveSpecification", getValveSpecification())
+                .append("valveLength", getValveLength())
+                .append("boltPointDistance", getBoltPointDistance())
+                .append("boltHoleCount", getBoltHoleCount())
                 .toString();
     }
 }

+ 2 - 1
master/src/main/java/com/ruoyi/project/ps/inspection/domain/TPsInspectionExtinguisher.java

@@ -17,10 +17,11 @@ import java.util.Date;
 public class TPsInspectionExtinguisher extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    public TPsInspectionExtinguisher(String fireExtinguisherNo, String position, String fireExtinguisherModel, Long month, Long year, String createrCode, Long planId, String devType) {
+    public TPsInspectionExtinguisher(String fireExtinguisherNo, String position, String fireExtinguisherModel, String detectionFrequency, Long month, Long year, String createrCode, Long planId, String devType) {
         this.fireExtinguisherNo = fireExtinguisherNo;
         this.position = position;
         this.fireExtinguisherModel = fireExtinguisherModel;
+        this.detectionFrequency = detectionFrequency;
         this.month = month;
         this.year = year;
         this.issuesStatus = 0L;

+ 32 - 7
master/src/main/java/com/ruoyi/project/ps/inspection/domain/TPsInspectionHydrant.java

@@ -17,9 +17,20 @@ import java.util.Date;
 public class TPsInspectionHydrant extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    public TPsInspectionHydrant(String position, String equipId, Long month, Long year, String createrCode, Long planId) {
+    public TPsInspectionHydrant(String position,
+                                String equipId,
+                                String hydrantQty,
+                                String hoseQty,
+                                String wrenchQty,
+                                Long month,
+                                Long year,
+                                String createrCode,
+                                Long planId) {
         this.position = position;
         this.equipId = equipId;
+        this.hydrantQty = hydrantQty;
+        this.hoseQty = hoseQty;
+        this.wrenchQty = wrenchQty;
         this.month = month;
         this.year = year;
         this.issuesStatus = 0L;
@@ -49,11 +60,17 @@ public class TPsInspectionHydrant extends BaseEntity {
     @Excel(name = "器材编号")
     private String equipId;
 
+    /**
+     * 组号(同一消火栓 + 多个水带箱,用同一组号标识)
+     */
+    @Excel(name = "组号")
+    private String groupNo;
+
     /**
      * 消防水枪
      */
     @Excel(name = "消防水枪")
-    private String hydrantStatus;
+    private String hydrantQty;
 
     /**
      * 消防带数量
@@ -224,12 +241,20 @@ public class TPsInspectionHydrant extends BaseEntity {
         return equipId;
     }
 
-    public void setHydrantStatus(String hydrantStatus) {
-        this.hydrantStatus = hydrantStatus;
+    public String getGroupNo() {
+        return groupNo;
+    }
+
+    public void setGroupNo(String groupNo) {
+        this.groupNo = groupNo;
+    }
+
+    public void setHydrantQty(String hydrantQty) {
+        this.hydrantQty = hydrantQty;
     }
 
-    public String getHydrantStatus() {
-        return hydrantStatus;
+    public String getHydrantQty() {
+        return hydrantQty;
     }
 
     public void setHoseQty(String hoseQty) {
@@ -414,7 +439,7 @@ public class TPsInspectionHydrant extends BaseEntity {
                 .append("id", getId())
                 .append("position", getPosition())
                 .append("equipId", getEquipId())
-                .append("hydrantStatus", getHydrantStatus())
+                .append("hydrantQty", getHydrantQty())
                 .append("hoseQty", getHoseQty())
                 .append("wrenchQty", getWrenchQty())
                 .append("appearance", getAppearance())

+ 2 - 3
master/src/main/java/com/ruoyi/project/ps/inspection/dto/InspectionQueryRequest.java

@@ -1,6 +1,6 @@
 package com.ruoyi.project.ps.inspection.dto;
 
-import java.io.Serializable;
+import com.ruoyi.framework.web.domain.BaseEntity;
 
 /**
  * 巡检记录查询请求DTO
@@ -8,8 +8,7 @@ import java.io.Serializable;
  * @author system
  * @date 2025-01-XX
  */
-public class InspectionQueryRequest implements Serializable {
-    private static final long serialVersionUID = 1L;
+public class InspectionQueryRequest extends BaseEntity {
 
     /**
      * 巡检记录类型

+ 14 - 3
master/src/main/java/com/ruoyi/project/ps/patrol/controller/TPsPatrolPlanController.java

@@ -225,7 +225,7 @@ public class TPsPatrolPlanController extends BaseController {
                     List<TPsDevCabinet> tPsDevCabinets = tPsDevCabinetService.selectTPsDevCabinetList(tPsDevCabinet);
                     devNum = tPsDevCabinets.size();
                     for (TPsDevCabinet dev : tPsDevCabinets) {
-                        TPsInspectionCabinet inspectionCabinet = new TPsInspectionCabinet(dev.getPosition(), dev.getModelNo(), dev.getBoxNo(), tPsPatrolPlan.getPlanMonth(), tPsPatrolPlan.getPlanYear(), tPsPatrolPlan.getId(), userId);
+                        TPsInspectionCabinet inspectionCabinet = new TPsInspectionCabinet(dev.getPosition(), dev.getModelNo(), dev.getBoxNo(), tPsPatrolPlan.getPlanMonth(), tPsPatrolPlan.getPlanYear(), tPsPatrolPlan.getId(), userId, dev.getValveType(), dev.getValveSpecification(), dev.getValveLength(), dev.getBoltPointDistance(), dev.getBoltHoleCount());
                         tPsInspectionCabinetService.insertTPsInspectionCabinet(inspectionCabinet);
                     }
                     break;
@@ -265,7 +265,7 @@ public class TPsPatrolPlanController extends BaseController {
                     List<TPsDevExtinguisher> tPsDevExtinguishers = tPsDevExtinguisherService.selectTPsDevExtinguisherList(tPsDevExtinguisher);
                     devNum = tPsDevExtinguishers.size();
                     for (TPsDevExtinguisher dev : tPsDevExtinguishers) {
-                        TPsInspectionExtinguisher inspectionExtinguisher = new TPsInspectionExtinguisher(dev.getFireExtinguisherNo(), dev.getPosition(), dev.getFireExtinguisherModel(), tPsPatrolPlan.getPlanMonth(), tPsPatrolPlan.getPlanYear(), userId, tPsPatrolPlan.getId(), dev.getDevType());
+                        TPsInspectionExtinguisher inspectionExtinguisher = new TPsInspectionExtinguisher(dev.getFireExtinguisherNo(), dev.getPosition(), dev.getFireExtinguisherModel(), tPsPatrolPlan.getDetectionFrequency(), tPsPatrolPlan.getPlanMonth(), tPsPatrolPlan.getPlanYear(), userId, tPsPatrolPlan.getId(), dev.getDevType());
                         tPsInspectionExtinguisherService.insertTPsInspectionExtinguisher(inspectionExtinguisher);
                     }
                     // 若检测频率为“每半个月一次”,且为上半月的,则截止时间为当前月 15号
@@ -309,7 +309,18 @@ public class TPsPatrolPlanController extends BaseController {
                     List<TPsDevHydrant> tPsDevHydrants = tPsDevHydrantService.selectTPsDevHydrantList(tPsDevHydrant);
                     devNum = tPsDevHydrants.size();
                     for (TPsDevHydrant dev : tPsDevHydrants) {
-                        TPsInspectionHydrant inspectionHydrant = new TPsInspectionHydrant(dev.getPosition(), dev.getEquipId(), tPsPatrolPlan.getPlanMonth(), tPsPatrolPlan.getPlanYear(), userId, tPsPatrolPlan.getId());
+                        TPsInspectionHydrant inspectionHydrant = new TPsInspectionHydrant(
+                                dev.getPosition(),
+                                dev.getEquipId(),
+                                dev.getHydrantQty(),
+                                dev.getHoseQty(),
+                                dev.getWrenchQty(),
+                                tPsPatrolPlan.getPlanMonth(),
+                                tPsPatrolPlan.getPlanYear(),
+                                userId,
+                                tPsPatrolPlan.getId()
+                        );
+                        inspectionHydrant.setGroupNo(dev.getGroupNo());
                         tPsInspectionHydrantService.insertTPsInspectionHydrant(inspectionHydrant);
                     }
                     break;

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/patrol/mapper/TPsPatrolMainMapper.java

@@ -60,4 +60,12 @@ public interface TPsPatrolMainMapper {
      * @return 结果
      */
     public int deleteTPsPatrolMainByIds(Long[] ids);
+
+    /**
+     * 根据巡检类型更新设备数量
+     *
+     * @param tPsPatrolMain 检查策略
+     * @return 结果
+     */
+    public int updateDevNumByPatrolType(TPsPatrolMain tPsPatrolMain);
 }

+ 8 - 0
master/src/main/java/com/ruoyi/project/ps/patrol/service/ITPsPatrolMainService.java

@@ -58,4 +58,12 @@ public interface ITPsPatrolMainService {
      * @return 结果
      */
     public int deleteTPsPatrolMainById(Long id);
+
+    /**
+     * 根据巡检类型更新设备数量
+     *
+     * @param patrolType 巡检类型
+     * @return 结果
+     */
+    public int updateDevNumByPatrolType(String patrolType);
 }

+ 128 - 0
master/src/main/java/com/ruoyi/project/ps/patrol/service/impl/TPsPatrolMainServiceImpl.java

@@ -1,11 +1,14 @@
 package com.ruoyi.project.ps.patrol.service.impl;
 
+import com.ruoyi.project.ps.dev.mapper.*;
 import com.ruoyi.project.ps.patrol.domain.TPsPatrolMain;
 import com.ruoyi.project.ps.patrol.mapper.TPsPatrolMainMapper;
 import com.ruoyi.project.ps.patrol.service.ITPsPatrolMainService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Calendar;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -18,6 +21,43 @@ import java.util.List;
 public class TPsPatrolMainServiceImpl implements ITPsPatrolMainService {
     @Autowired
     private TPsPatrolMainMapper tPsPatrolMainMapper;
+    @Autowired
+    private TPsDevAlarmMapper tPsDevAlarmMapper;
+    @Autowired
+    private TPsDevCabinetMapper tPsDevCabinetMapper;
+    @Autowired
+    private TPsDevCallsystemMapper tPsDevCallsystemMapper;
+    @Autowired
+    private TPsDevCofferMapper tPsDevCofferMapper;
+    @Autowired
+    private TPsDevCurtainMapper tPsDevCurtainMapper;
+    @Autowired
+    private TPsDevExtinguisherMapper tPsDevExtinguisherMapper;
+    @Autowired
+    private TPsDevEyewashMapper tPsDevEyewashMapper;
+    @Autowired
+    private TPsDevFgsMapper tPsDevFgsMapper;
+    @Autowired
+    private TPsDevFiredoorMapper tPsDevFiredoorMapper;
+    @Autowired
+    private TPsDevHydrantMapper tPsDevHydrantMapper;
+    @Autowired
+    private TPsDevLiftMapper tPsDevLiftMapper;
+    @Autowired
+    private TPsDevMonitorMapper tPsDevMonitorMapper;
+    @Autowired
+    private TPsDevPitMapper tPsDevPitMapper;
+    @Autowired
+    private TPsDevRainvalveMapper tPsDevRainvalveMapper;
+    @Autowired
+    private TPsDevSteamMapper tPsDevSteamMapper;
+    @Autowired
+    private TPsDevSumpMapper tPsDevSumpMapper;
+    @Autowired
+    private TPsDevUtilitystationMapper tPsDevUtilitystationMapper;
+    @Autowired
+    private TPsDevVentvalveMapper tPsDevVentvalveMapper;
+
 
     /**
      * 查询检查策略
@@ -84,4 +124,92 @@ public class TPsPatrolMainServiceImpl implements ITPsPatrolMainService {
     public int deleteTPsPatrolMainById(Long id) {
         return tPsPatrolMainMapper.deleteTPsPatrolMainById(id);
     }
+
+    /**
+     * 根据巡检类型更新设备数量
+     *
+     * @param patrolType 巡检类型
+     * @return 结果
+     */
+    @Override
+    public int updateDevNumByPatrolType(String patrolType) {
+        if (patrolType == null || patrolType.isEmpty()) {
+            return 0;
+        }
+
+        // 统计在用设备数量
+        long devNum = 0;
+        switch (patrolType) {
+            case "1":
+                devNum = tPsDevAlarmMapper.countByStatus();
+                break;
+            case "2":
+                devNum = tPsDevCabinetMapper.countByStatus();
+                break;
+            case "3":
+                devNum = tPsDevCallsystemMapper.countByStatus();
+                break;
+            case "4":
+                devNum = tPsDevCofferMapper.countByStatus();
+                break;
+            case "5":
+                devNum = tPsDevCurtainMapper.countByStatus();
+                break;
+            case "6":
+                devNum = tPsDevExtinguisherMapper.countByStatus();
+                break;
+            case "7":
+                devNum = tPsDevEyewashMapper.countByStatus();
+                break;
+            case "8":
+                devNum = tPsDevFgsMapper.countByStatus();
+                break;
+            case "9":
+                devNum = tPsDevFiredoorMapper.countByStatus();
+                break;
+            case "10":
+                devNum = tPsDevHydrantMapper.countByStatus();
+                break;
+            case "11":
+                devNum = tPsDevLiftMapper.countByStatus();
+                break;
+            case "12":
+                devNum = tPsDevMonitorMapper.countByStatus();
+                break;
+            case "13":
+                devNum = tPsDevPitMapper.countByStatus();
+                break;
+            case "14":
+                devNum = tPsDevRainvalveMapper.countByStatus();
+                break;
+            case "15":
+                devNum = tPsDevSteamMapper.countByStatus();
+                break;
+            case "16":
+                devNum = tPsDevSumpMapper.countByStatus();
+                break;
+            case "17":
+                devNum = tPsDevUtilitystationMapper.countByStatus();
+                break;
+            case "18":
+                devNum = tPsDevVentvalveMapper.countByStatus();
+                break;
+            default:
+                return 0;
+        }
+
+        // 获取当前年份
+        Calendar calendar = Calendar.getInstance();
+        int currentYear = calendar.get(Calendar.YEAR);
+
+        // 更新检查策略的设备数量(只更新今年的记录)
+        TPsPatrolMain patrolMain = new TPsPatrolMain();
+        patrolMain.setPatrolType(patrolType);
+        patrolMain.setYear(String.valueOf(currentYear));
+        patrolMain.setDevNum(String.valueOf(devNum));
+        patrolMain.setUpdaterCode("1");
+        patrolMain.setUpdatedate(new Date());
+
+        return tPsPatrolMainMapper.updateDevNumByPatrolType(patrolMain);
+    }
 }

+ 4 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevAlarmMapper.xml

@@ -112,5 +112,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_alarm where status = '1' and del_flag = 0
+    </select>
     
 </mapper>

+ 31 - 1
master/src/main/resources/mybatis/ps/dev/TPsDevCabinetMapper.xml

@@ -18,11 +18,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptId"    column="dept_id"    />
         <result property="status"    column="status"    />
         <result property="patrolType"    column="patrol_type"    />
+        <result property="valveType"    column="valve_type"    />
+        <result property="valveSpecification"    column="valve_specification"    />
+        <result property="valveLength"    column="valve_length"    />
+        <result property="boltPointDistance"    column="bolt_point_distance"    />
+        <result property="boltHoleCount"    column="bolt_hole_count"    />
         <result property="deptName" column="dept_name" />
     </resultMap>
 
     <sql id="selectTPsDevCabinetVo">
-        select d.id, d.position, d.model_no, d.box_no, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.status, d.patrol_type ,s.dept_name from t_ps_dev_cabinet d
+        select d.id, d.position, d.model_no, d.box_no, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.status, d.patrol_type, d.valve_type, d.valve_specification, d.valve_length, d.bolt_point_distance, d.bolt_hole_count ,s.dept_name from t_ps_dev_cabinet d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -40,6 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             <if test="status != null  and status != ''"> and d.status = #{status}</if>
             <if test="patrolType != null  and patrolType != ''"> and patrol_type = #{patrolType}</if>
+            <if test="valveType != null  and valveType != ''"> and valve_type = #{valveType}</if>
+            <if test="valveSpecification != null  and valveSpecification != ''"> and valve_specification = #{valveSpecification}</if>
+            <if test="valveLength != null  and valveLength != ''"> and valve_length = #{valveLength}</if>
+            <if test="boltPointDistance != null  and boltPointDistance != ''"> and bolt_point_distance = #{boltPointDistance}</if>
+            <if test="boltHoleCount != null  and boltHoleCount != ''"> and bolt_hole_count = #{boltHoleCount}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -70,6 +80,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id,</if>
             <if test="status != null">status,</if>
             <if test="patrolType != null">patrol_type,</if>
+            <if test="valveType != null">valve_type,</if>
+            <if test="valveSpecification != null">valve_specification,</if>
+            <if test="valveLength != null">valve_length,</if>
+            <if test="boltPointDistance != null">bolt_point_distance,</if>
+            <if test="boltHoleCount != null">bolt_hole_count,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -85,6 +100,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">#{deptId},</if>
             <if test="status != null">#{status},</if>
             <if test="patrolType != null">#{patrolType},</if>
+            <if test="valveType != null">#{valveType},</if>
+            <if test="valveSpecification != null">#{valveSpecification},</if>
+            <if test="valveLength != null">#{valveLength},</if>
+            <if test="boltPointDistance != null">#{boltPointDistance},</if>
+            <if test="boltHoleCount != null">#{boltHoleCount},</if>
          </trim>
     </insert>
 
@@ -103,6 +123,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="status != null">status = #{status},</if>
             <if test="patrolType != null">patrol_type = #{patrolType},</if>
+            <if test="valveType != null">valve_type = #{valveType},</if>
+            <if test="valveSpecification != null">valve_specification = #{valveSpecification},</if>
+            <if test="valveLength != null">valve_length = #{valveLength},</if>
+            <if test="boltPointDistance != null">bolt_point_distance = #{boltPointDistance},</if>
+            <if test="boltHoleCount != null">bolt_hole_count = #{boltHoleCount},</if>
         </trim>
         where id = #{id}
     </update>
@@ -118,4 +143,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_cabinet where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevCallsystemMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_callsystem where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevCofferMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_coffer where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevCurtainMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_curtain where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevExtinguisherMapper.xml

@@ -123,4 +123,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_extinguisher where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevEyewashMapper.xml

@@ -108,4 +108,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_eyewash where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevFgsMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_fgs where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevFiredoorMapper.xml

@@ -118,4 +118,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_firedoor where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 32 - 1
master/src/main/resources/mybatis/ps/dev/TPsDevHydrantMapper.xml

@@ -8,7 +8,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="position"    column="position"    />
         <result property="equipId"    column="equip_id"    />
+        <result property="groupNo"    column="group_no"    />
         <result property="devType"    column="dev_type"    />
+        <result property="hydrantQty"    column="hydrant_qty"    />
+        <result property="hoseQty"    column="hose_qty"    />
+        <result property="wrenchQty"    column="wrench_qty"    />
         <result property="delFlag"    column="del_flag"    />
         <result property="createrCode"    column="creater_code"    />
         <result property="createdate"    column="createdate"    />
@@ -22,7 +26,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTPsDevHydrantVo">
-        select d.id, d.position, d.equip_id, d.dev_type, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.status, d.patrol_type ,s.dept_name from t_ps_dev_hydrant d
+        select d.id, d.position, d.equip_id, d.group_no, d.dev_type,
+               d.hydrant_qty, d.hose_qty, d.wrench_qty,
+               d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate,
+               d.remarks, d.dept_id, d.status, d.patrol_type,
+               s.dept_name
+        from t_ps_dev_hydrant d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -31,7 +40,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="position != null  and position != ''"> and position = #{position}</if>
             <if test="equipId != null  and equipId != ''"> and equip_id = #{equipId}</if>
+            <if test="groupNo != null  and groupNo != ''"> and group_no = #{groupNo}</if>
             <if test="devType != null  and devType != ''"> and dev_type = #{devType}</if>
+            <if test="hydrantQty != null  and hydrantQty != ''"> and hydrant_qty = #{hydrantQty}</if>
+            <if test="hoseQty != null  and hoseQty != ''"> and hose_qty = #{hoseQty}</if>
+            <if test="wrenchQty != null  and wrenchQty != ''"> and wrench_qty = #{wrenchQty}</if>
             <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
             <if test="createdate != null "> and createdate = #{createdate}</if>
             <if test="updaterCode != null  and updaterCode != ''"> and updater_code = #{updaterCode}</if>
@@ -44,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
+        order by group_no, dev_type
     </select>
     
     <select id="selectTPsDevHydrantById" parameterType="Long" resultMap="TPsDevHydrantResult">
@@ -60,7 +74,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="id != null">id,</if>
             <if test="position != null">position,</if>
             <if test="equipId != null">equip_id,</if>
+            <if test="groupNo != null">group_no,</if>
             <if test="devType != null">dev_type,</if>
+            <if test="hydrantQty != null">hydrant_qty,</if>
+            <if test="hoseQty != null">hose_qty,</if>
+            <if test="wrenchQty != null">wrench_qty,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="createrCode != null">creater_code,</if>
             <if test="createdate != null">createdate,</if>
@@ -75,7 +93,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="id != null">#{id},</if>
             <if test="position != null">#{position},</if>
             <if test="equipId != null">#{equipId},</if>
+            <if test="groupNo != null">#{groupNo},</if>
             <if test="devType != null">#{devType},</if>
+            <if test="hydrantQty != null">#{hydrantQty},</if>
+            <if test="hoseQty != null">#{hoseQty},</if>
+            <if test="wrenchQty != null">#{wrenchQty},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createrCode != null">#{createrCode},</if>
             <if test="createdate != null">#{createdate},</if>
@@ -93,7 +115,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="position != null">position = #{position},</if>
             <if test="equipId != null">equip_id = #{equipId},</if>
+            <if test="groupNo != null">group_no = #{groupNo},</if>
             <if test="devType != null">dev_type = #{devType},</if>
+            <if test="hydrantQty != null">hydrant_qty = #{hydrantQty},</if>
+            <if test="hoseQty != null">hose_qty = #{hoseQty},</if>
+            <if test="wrenchQty != null">wrench_qty = #{wrenchQty},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="createrCode != null">creater_code = #{createrCode},</if>
             <if test="createdate != null">createdate = #{createdate},</if>
@@ -118,4 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_hydrant where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevLiftMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_lift where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevMonitorMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_monitor where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevPitMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_pit where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevRainvalveMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_rainvalve where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevSteamMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_steam where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevSumpMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_sump where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevUtilitystationMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_utilitystation where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 5 - 0
master/src/main/resources/mybatis/ps/dev/TPsDevVentvalveMapper.xml

@@ -113,4 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
     
+
+    <select id="countByStatus" resultType="long">
+        select count(*) from t_ps_dev_ventvalve where status = '1' and del_flag = 0
+    </select>
+
 </mapper>

+ 26 - 1
master/src/main/resources/mybatis/ps/inspection/TPsInspectionCabinetMapper.xml

@@ -28,11 +28,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="planId"    column="plan_id"    />
         <result property="issuesStatus"    column="issues_status"    />
         <result property="issuesFlag"    column="issues_flag"    />
+        <result property="valveType"    column="valve_type"    />
+        <result property="valveSpecification"    column="valve_specification"    />
+        <result property="valveLength"    column="valve_length"    />
+        <result property="boltPointDistance"    column="bolt_point_distance"    />
+        <result property="boltHoleCount"    column="bolt_hole_count"    />
         <result property="deptName" column="dept_name" />
     </resultMap>
 
     <sql id="selectTPsInspectionCabinetVo">
-        select d.id, d.position, d.model_no, d.box_no, d.appearance, d.internal_items, d.valve, d.passage, d.confirmer, d.check_status, d.check_date, d.month, d.year, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.plan_id, d.issues_status, d.issues_flag ,s.dept_name from t_ps_inspection_cabinet d
+        select d.id, d.position, d.model_no, d.box_no, d.appearance, d.internal_items, d.valve, d.passage, d.confirmer, d.check_status, d.check_date, d.month, d.year, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.plan_id, d.issues_status, d.issues_flag, d.valve_type, d.valve_specification, d.valve_length, d.bolt_point_distance, d.bolt_hole_count ,s.dept_name from t_ps_inspection_cabinet d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -61,6 +66,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planId != null "> and plan_id = #{planId}</if>
             <if test="issuesStatus != null "> and issues_status = #{issuesStatus}</if>
             <if test="issuesFlag != null "> and issues_flag = #{issuesFlag}</if>
+            <if test="valveType != null  and valveType != ''"> and valve_type = #{valveType}</if>
+            <if test="valveSpecification != null  and valveSpecification != ''"> and valve_specification = #{valveSpecification}</if>
+            <if test="valveLength != null  and valveLength != ''"> and valve_length = #{valveLength}</if>
+            <if test="boltPointDistance != null  and boltPointDistance != ''"> and bolt_point_distance = #{boltPointDistance}</if>
+            <if test="boltHoleCount != null  and boltHoleCount != ''"> and bolt_hole_count = #{boltHoleCount}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -101,6 +111,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planId != null">plan_id,</if>
             <if test="issuesStatus != null">issues_status,</if>
             <if test="issuesFlag != null">issues_flag,</if>
+            <if test="valveType != null">valve_type,</if>
+            <if test="valveSpecification != null">valve_specification,</if>
+            <if test="valveLength != null">valve_length,</if>
+            <if test="boltPointDistance != null">bolt_point_distance,</if>
+            <if test="boltHoleCount != null">bolt_hole_count,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -126,6 +141,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planId != null">#{planId},</if>
             <if test="issuesStatus != null">#{issuesStatus},</if>
             <if test="issuesFlag != null">#{issuesFlag},</if>
+            <if test="valveType != null">#{valveType},</if>
+            <if test="valveSpecification != null">#{valveSpecification},</if>
+            <if test="valveLength != null">#{valveLength},</if>
+            <if test="boltPointDistance != null">#{boltPointDistance},</if>
+            <if test="boltHoleCount != null">#{boltHoleCount},</if>
          </trim>
     </insert>
 
@@ -154,6 +174,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planId != null">plan_id = #{planId},</if>
             <if test="issuesStatus != null">issues_status = #{issuesStatus},</if>
             <if test="issuesFlag != null">issues_flag = #{issuesFlag},</if>
+            <if test="valveType != null">valve_type = #{valveType},</if>
+            <if test="valveSpecification != null">valve_specification = #{valveSpecification},</if>
+            <if test="valveLength != null">valve_length = #{valveLength},</if>
+            <if test="boltPointDistance != null">bolt_point_distance = #{boltPointDistance},</if>
+            <if test="boltHoleCount != null">bolt_hole_count = #{boltHoleCount},</if>
         </trim>
         where id = #{id}
     </update>

+ 20 - 6
master/src/main/resources/mybatis/ps/inspection/TPsInspectionHydrantMapper.xml

@@ -8,7 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="position"    column="position"    />
         <result property="equipId"    column="equip_id"    />
-        <result property="hydrantStatus"    column="hydrant_status"    />
+        <result property="groupNo"    column="group_no"    />
+        <result property="hydrantQty"    column="hydrant_status"    />
         <result property="hoseQty"    column="hose_qty"    />
         <result property="wrenchQty"    column="wrench_qty"    />
         <result property="appearance"    column="appearance"    />
@@ -35,7 +36,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTPsInspectionHydrantVo">
-        select d.id, d.position, d.equip_id, d.hydrant_status, d.hose_qty, d.wrench_qty, d.appearance, d.leak_status, d.item_status, d.access_status, d.dev_type, d.confirmer, d.check_status, d.check_date, d.month, d.year, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.plan_id, d.issues_status, d.issues_flag ,s.dept_name from t_ps_inspection_hydrant d
+        select d.id, d.position, d.equip_id, d.group_no,
+               d.hydrant_status, d.hose_qty, d.wrench_qty,
+               d.appearance, d.leak_status, d.item_status, d.access_status,
+               d.dev_type, d.confirmer, d.check_status, d.check_date,
+               d.month, d.year, d.del_flag, d.creater_code, d.createdate,
+               d.updater_code, d.updatedate, d.remarks, d.dept_id, d.plan_id,
+               d.issues_status, d.issues_flag,
+               s.dept_name
+        from t_ps_inspection_hydrant d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -45,7 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="id != null "> and d.id = #{id}</if>
             <if test="position != null  and position != ''"> and position like concat(concat('%', #{position}), '%')</if>
             <if test="equipId != null  and equipId != ''"> and equip_id like concat(concat('%', #{equipId}), '%')</if>
-            <if test="hydrantStatus != null  and hydrantStatus != ''"> and hydrant_status = #{hydrantStatus}</if>
+            <if test="groupNo != null  and groupNo != ''"> and group_no = #{groupNo}</if>
+            <if test="hydrantQty != null  and hydrantQty != ''"> and hydrant_status = #{hydrantQty}</if>
             <if test="hoseQty != null  and hoseQty != ''"> and hose_qty = #{hoseQty}</if>
             <if test="wrenchQty != null  and wrenchQty != ''"> and wrench_qty = #{wrenchQty}</if>
             <if test="appearance != null  and appearance != ''"> and appearance = #{appearance}</if>
@@ -71,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
+        order by group_no, dev_type
     </select>
     
     <select id="selectTPsInspectionHydrantById" parameterType="Long" resultMap="TPsInspectionHydrantResult">
@@ -87,7 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="id != null">id,</if>
             <if test="position != null">position,</if>
             <if test="equipId != null">equip_id,</if>
-            <if test="hydrantStatus != null">hydrant_status,</if>
+            <if test="groupNo != null">group_no,</if>
+            <if test="hydrantQty != null">hydrant_status,</if>
             <if test="hoseQty != null">hose_qty,</if>
             <if test="wrenchQty != null">wrench_qty,</if>
             <if test="appearance != null">appearance,</if>
@@ -115,7 +127,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="id != null">#{id},</if>
             <if test="position != null">#{position},</if>
             <if test="equipId != null">#{equipId},</if>
-            <if test="hydrantStatus != null">#{hydrantStatus},</if>
+            <if test="groupNo != null">#{groupNo},</if>
+            <if test="hydrantQty != null">#{hydrantQty},</if>
             <if test="hoseQty != null">#{hoseQty},</if>
             <if test="wrenchQty != null">#{wrenchQty},</if>
             <if test="appearance != null">#{appearance},</if>
@@ -146,7 +159,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="position != null">position = #{position},</if>
             <if test="equipId != null">equip_id = #{equipId},</if>
-            <if test="hydrantStatus != null">hydrant_status = #{hydrantStatus},</if>
+            <if test="groupNo != null">group_no = #{groupNo},</if>
+            <if test="hydrantQty != null">hydrant_status = #{hydrantQty},</if>
             <if test="hoseQty != null">hose_qty = #{hoseQty},</if>
             <if test="wrenchQty != null">wrench_qty = #{wrenchQty},</if>
             <if test="appearance != null">appearance = #{appearance},</if>

+ 9 - 0
master/src/main/resources/mybatis/ps/patrol/TPsPatrolMainMapper.xml

@@ -72,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
+        order by to_number(d.patrol_type)
     </select>
     
     <select id="selectTPsPatrolMainById" parameterType="Long" resultMap="TPsPatrolMainResult">
@@ -187,5 +188,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
+
+    <update id="updateDevNumByPatrolType" parameterType="TPsPatrolMain">
+        update t_ps_patrol_main
+        set dev_num = #{devNum},
+            updater_code = #{updaterCode},
+            updatedate = #{updatedate}
+        where patrol_type = #{patrolType} and year = #{year} and del_flag = 0
+    </update>
     
 </mapper>

+ 1 - 1
ui/src/views/ps/dev/alarm/index.vue

@@ -240,7 +240,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/alarm/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/alarm/importData"
       },
       // 查询参数
       queryParams: {

+ 33 - 3
ui/src/views/ps/dev/cabinet/index.vue

@@ -107,6 +107,11 @@
       <el-table-column label="编号" align="center" prop="boxNo" :show-overflow-tooltip="true"/>
       <el-table-column label="位置" align="center" prop="position" :show-overflow-tooltip="true"/>
       <el-table-column label="型号" align="center" prop="modelNo" :show-overflow-tooltip="true"/>
+      <el-table-column label="阀门类型" align="center" prop="valveType" :show-overflow-tooltip="true"/>
+      <el-table-column label="阀门规格" align="center" prop="valveSpecification" :show-overflow-tooltip="true"/>
+      <el-table-column label="阀门长度" align="center" prop="valveLength" :show-overflow-tooltip="true"/>
+      <el-table-column label="螺栓点距" align="center" prop="boltPointDistance" :show-overflow-tooltip="true"/>
+      <el-table-column label="螺栓孔数" align="center" prop="boltHoleCount" :show-overflow-tooltip="true"/>
       <el-table-column label="状态" align="center" prop="status" >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.dev_status" :value="scope.row.status"/>
@@ -155,6 +160,21 @@
         <el-form-item label="型号" prop="modelNo">
           <el-input v-model="form.modelNo" placeholder="请输入型号"/>
         </el-form-item>
+        <el-form-item label="阀门类型" prop="valveType">
+          <el-input v-model="form.valveType" placeholder="请输入阀门类型"/>
+        </el-form-item>
+        <el-form-item label="阀门规格" prop="valveSpecification">
+          <el-input v-model="form.valveSpecification" placeholder="请输入阀门规格"/>
+        </el-form-item>
+        <el-form-item label="阀门长度" prop="valveLength">
+          <el-input v-model="form.valveLength" placeholder="请输入阀门长度"/>
+        </el-form-item>
+        <el-form-item label="螺栓点距" prop="boltPointDistance">
+          <el-input v-model="form.boltPointDistance" placeholder="请输入螺栓点距"/>
+        </el-form-item>
+        <el-form-item label="螺栓孔数" prop="boltHoleCount">
+          <el-input v-model="form.boltHoleCount" placeholder="请输入螺栓孔数"/>
+        </el-form-item>
         <el-form-item label="状态" prop="status">
           <el-radio-group v-model="form.status">
             <el-radio label="1">启用</el-radio>
@@ -260,7 +280,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/cabinet/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/cabinet/importData"
       },
       // 查询参数
       queryParams: {
@@ -276,7 +296,12 @@ export default {
         remarks: null,
         deptId: null,
         status: null,
-        patrolType: null
+        patrolType: null,
+        valveType: null,
+        valveSpecification: null,
+        valveLength: null,
+        boltPointDistance: null,
+        boltHoleCount: null
       },
       // 表单参数
       form: {},
@@ -347,7 +372,12 @@ export default {
         remarks: null,
         deptId: null,
         status: "1",
-        patrolType: null
+        patrolType: null,
+        valveType: null,
+        valveSpecification: null,
+        valveLength: null,
+        boltPointDistance: null,
+        boltHoleCount: null
       };
       this.resetForm("form");
     },

+ 1 - 1
ui/src/views/ps/dev/callsystem/index.vue

@@ -247,7 +247,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/callsystem/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/callsystem/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/coffer/index.vue

@@ -247,7 +247,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/coffer/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/coffer/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/curtain/index.vue

@@ -247,7 +247,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/curtain/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/curtain/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/extinguisher/index.vue

@@ -264,7 +264,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/extinguisher/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/extinguisher/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/eyewash/index.vue

@@ -234,7 +234,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/eyewash/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/eyewash/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/fgs/index.vue

@@ -240,7 +240,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/fgs/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/fgs/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/firedoor/index.vue

@@ -260,7 +260,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/firedoor/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/firedoor/importData"
       },
       // 查询参数
       queryParams: {

+ 69 - 8
ui/src/views/ps/dev/hydrant/index.vue

@@ -95,9 +95,11 @@
     <el-table v-loading="loading" :data="hydrantList" @selection-change="handleSelectionChange" :height="clientHeight"
               border>
       <el-table-column type="selection" width="55" align="center"/>
-      <el-table-column label="器材编号" align="center" prop="equipId" :show-overflow-tooltip="true"/>
       <el-table-column label="位置" align="center" prop="position" :show-overflow-tooltip="true"/>
-      <el-table-column label="设备类型" align="center" prop="devType" :show-overflow-tooltip="true"/>
+      <el-table-column label="器材编号" align="center" prop="equipId" :show-overflow-tooltip="true"/>
+      <el-table-column label="消防水枪" align="center" prop="hydrantQty" :show-overflow-tooltip="true"/>
+      <el-table-column label="消防带数量" align="center" prop="hoseQty" :show-overflow-tooltip="true"/>
+      <el-table-column label="消防扳手数量" align="center" prop="wrenchQty" :show-overflow-tooltip="true"/>
       <el-table-column label="状态" align="center" prop="status" >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.dev_status" :value="scope.row.status"/>
@@ -137,14 +139,36 @@
     <!-- 添加或修改地上消火栓和消防水带箱基础信息对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-form-item label="器材编号" prop="equipId">
-          <el-input v-model="form.equipId" placeholder="请输入器材编号"/>
-        </el-form-item>
         <el-form-item label="位置" prop="position">
           <el-input v-model="form.position" placeholder="请输入位置"/>
         </el-form-item>
+        <el-form-item label="器材编号" prop="equipId">
+          <el-input v-model="form.equipId" placeholder="请输入器材编号"/>
+        </el-form-item>
         <el-form-item label="设备类型" prop="devType">
-          <el-input v-model="form.devType" placeholder="请输入设备类型"/>
+          <el-select v-model="form.devType" placeholder="请选择设备类型" @change="handleDevTypeChange">
+            <el-option label="地上消火栓" value="1" />
+            <el-option label="消防水带箱" value="2" />
+          </el-select>
+        </el-form-item>
+        <el-form-item v-if="form.devType === '2'" label="对应消火栓" prop="groupNo">
+          <el-select v-model="form.groupNo" placeholder="请选择对应消火栓">
+            <el-option
+              v-for="item in hydrantOptions"
+              :key="item.id"
+              :label="item.position + '(' + item.equipId + ')'"
+              :value="item.groupNo"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item v-if="form.devType === '2'" label="消防水枪" prop="hydrantQty">
+          <el-input v-model="form.hydrantQty" placeholder="请输入消防水枪数量"/>
+        </el-form-item>
+        <el-form-item v-if="form.devType === '2'" label="消防带数量" prop="hoseQty">
+          <el-input v-model="form.hoseQty" placeholder="请输入消防带数量"/>
+        </el-form-item>
+        <el-form-item v-if="form.devType === '2'" label="消防扳手数量" prop="wrenchQty">
+          <el-input v-model="form.wrenchQty" placeholder="请输入消防扳手数量"/>
         </el-form-item>
         <el-form-item label="状态" prop="status">
           <el-radio-group v-model="form.status">
@@ -230,6 +254,8 @@ export default {
       total: 0,
       // 地上消火栓和消防水带箱基础信息表格数据
       hydrantList: [],
+      // 消火栓选项(用于水带箱选择对应消火栓)
+      hydrantOptions: [],
       // 弹出层标题
       title: "",
       // 部门树选项
@@ -251,15 +277,19 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/hydrant/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/hydrant/importData"
       },
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 20,
+        groupNo: null,
         position: null,
         equipId: null,
         devType: null,
+        hydrantQty: null,
+        hoseQty: null,
+        wrenchQty: null,
         createrCode: null,
         createdate: null,
         updaterCode: null,
@@ -312,6 +342,18 @@ export default {
         this.loading = false;
       });
     },
+    /** 查询用于选择的地上消火栓列表(设备类型=1) */
+    getHydrantOptions() {
+      const query = {
+        pageNum: 1,
+        pageSize: 9999,
+        devType: '1',
+        status: '1'
+      };
+      listHydrant(query).then(response => {
+        this.hydrantOptions = response.rows || [];
+      });
+    },
     /** 查询部门下拉树结构 */
     getTreeselect() {
       treeselect().then(response => {
@@ -327,9 +369,13 @@ export default {
     reset() {
       this.form = {
         id: null,
+        groupNo: null,
         position: null,
         equipId: null,
-        devType: null,
+        devType: '1',
+        hydrantQty: null,
+        hoseQty: null,
+        wrenchQty: null,
         delFlag: null,
         createrCode: null,
         createdate: null,
@@ -352,6 +398,21 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
+    /** 设备类型切换 */
+    handleDevTypeChange(val) {
+      if (val === '1') {
+        // 地上消火栓:不需要组号和数量,清空这些字段
+        this.form.groupNo = null;
+        this.form.hydrantQty = null;
+        this.form.hoseQty = null;
+        this.form.wrenchQty = null;
+      } else if (val === '2') {
+        // 消防水带箱:需要选择对应消火栓和填数量
+        if (!this.hydrantOptions.length) {
+          this.getHydrantOptions();
+        }
+      }
+    },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)

+ 1 - 1
ui/src/views/ps/dev/lift/index.vue

@@ -240,7 +240,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/lift/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/lift/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/monitor/index.vue

@@ -247,7 +247,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/monitor/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/monitor/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/pit/index.vue

@@ -240,7 +240,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/pit/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/pit/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/rainvalve/index.vue

@@ -247,7 +247,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/rainvalve/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/rainvalve/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/steam/index.vue

@@ -240,7 +240,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/steam/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/steam/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/sump/index.vue

@@ -240,7 +240,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/sump/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/sump/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/utilitystation/index.vue

@@ -247,7 +247,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/utilitystation/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/utilitystation/importData"
       },
       // 查询参数
       queryParams: {

+ 1 - 1
ui/src/views/ps/dev/ventvalve/index.vue

@@ -247,7 +247,7 @@ export default {
         // 设置上传的请求头部
         headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/dev/ventvalve/importData"
+        url: process.env.VUE_APP_BASE_API + "/ps/dev/ventvalve/importData"
       },
       // 查询参数
       queryParams: {

+ 11 - 1
ui/src/views/ps/inspection/cabinet/index.vue

@@ -90,6 +90,11 @@
       <el-table-column label="位置" align="center" prop="position" :show-overflow-tooltip="true"/>
       <el-table-column label="型号" align="center" prop="modelNo" :show-overflow-tooltip="true"/>
       <el-table-column label="编号" align="center" prop="boxNo" :show-overflow-tooltip="true"/>
+      <el-table-column label="阀门类型" align="center" prop="valveType" :show-overflow-tooltip="true"/>
+      <el-table-column label="阀门规格" align="center" prop="valveSpecification" :show-overflow-tooltip="true"/>
+      <el-table-column label="阀门长度" align="center" prop="valveLength" :show-overflow-tooltip="true"/>
+      <el-table-column label="螺栓点距" align="center" prop="boltPointDistance" :show-overflow-tooltip="true"/>
+      <el-table-column label="螺栓孔数" align="center" prop="boltHoleCount" :show-overflow-tooltip="true"/>
       <el-table-column label="外观" align="center" prop="appearance" :show-overflow-tooltip="true"/>
       <el-table-column label="内物品" align="center" prop="internalItems" :show-overflow-tooltip="true"/>
       <el-table-column label="阀门" align="center" prop="valve" :show-overflow-tooltip="true"/>
@@ -209,7 +214,12 @@ export default {
         deptId: null,
         planId: null,
         issuesStatus: null,
-        issuesFlag: null
+        issuesFlag: null,
+        valveType: null,
+        valveSpecification: null,
+        valveLength: null,
+        boltPointDistance: null,
+        boltHoleCount: null
            }
     };
   },

+ 10 - 5
ui/src/views/ps/inspection/extinguisher/index.vue

@@ -37,6 +37,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="周期" prop="rate">
+        <el-radio v-model="queryParams.detectionFrequency" label="1" @change="handleQuery">上半月</el-radio>
+        <el-radio v-model="queryParams.detectionFrequency" label="2" @change="handleQuery">下半月</el-radio>
+      </el-form-item>
       <el-form-item label="巡检计划" prop="planId">
         <el-select
           v-model="queryParams.planId"
@@ -191,6 +195,7 @@ export default {
         fireExtinguisherNo: null,
         position: null,
         fireExtinguisherModel: null,
+        detectionFrequency: null,
         check1: null,
         check2: null,
         check3: null,
@@ -283,16 +288,16 @@ export default {
       const now = new Date();
       const currentYear = now.getFullYear();
       const currentMonth = now.getMonth() + 1;
-      
+
       const query = {
         planYear: currentYear,
         planMonth: currentMonth,
         patrolType: '6'
       };
-      
+
       listPlan(query).then(response => {
         this.planOptions = response.rows || [];
-        
+
         // 如果没有从路由参数传入planId,则默认选择当月最后一个计划
         if (!this.$route.query.planId && this.planOptions.length > 0) {
           // 按创建时间降序排序,取第一个(最新的)
@@ -301,11 +306,11 @@ export default {
             const dateB = new Date(b.createdate);
             return dateB - dateA;
           });
-          
+
           // 选择当月最后一个计划(创建时间最新的)
           this.queryParams.planId = sortedPlans[0].id;
         }
-        
+
         // 获取计划列表后再查询数据
         this.getList();
       }).catch(() => {

+ 8 - 7
ui/src/views/ps/inspection/hydrant/index.vue

@@ -80,7 +80,7 @@
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="位置" align="center" prop="position" :show-overflow-tooltip="true"/>
       <el-table-column label="器材编号" align="center" prop="equipId" :show-overflow-tooltip="true"/>
-      <el-table-column label="消防水枪" align="center" prop="hydrantStatus" :show-overflow-tooltip="true"/>
+      <el-table-column label="消防水枪" align="center" prop="hydrantQty" :show-overflow-tooltip="true"/>
       <el-table-column label="消防带数量" align="center" prop="hoseQty" :show-overflow-tooltip="true"/>
       <el-table-column label="消防扳手数量" align="center" prop="wrenchQty" :show-overflow-tooltip="true"/>
       <el-table-column label="外观" align="center" prop="appearance" :show-overflow-tooltip="true"/>
@@ -184,7 +184,8 @@ export default {
         pageSize: 20,
         position: null,
         equipId: null,
-        hydrantStatus: null,
+        groupNo: null,
+        hydrantQty: null,
         hoseQty: null,
         wrenchQty: null,
         appearance: null,
@@ -275,16 +276,16 @@ export default {
       const now = new Date();
       const currentYear = now.getFullYear();
       const currentMonth = now.getMonth() + 1;
-      
+
       const query = {
         planYear: currentYear,
         planMonth: currentMonth,
         patrolType: '10'
       };
-      
+
       listPlan(query).then(response => {
         this.planOptions = response.rows || [];
-        
+
         // 如果没有从路由参数传入planId,则默认选择当月最后一个计划
         if (!this.$route.query.planId && this.planOptions.length > 0) {
           // 按创建时间降序排序,取第一个(最新的)
@@ -293,11 +294,11 @@ export default {
             const dateB = new Date(b.createdate);
             return dateB - dateA;
           });
-          
+
           // 选择当月最后一个计划(创建时间最新的)
           this.queryParams.planId = sortedPlans[0].id;
         }
-        
+
         // 获取计划列表后再查询数据
         this.getList();
       }).catch(() => {

+ 0 - 3
ui/src/views/ps/patrol/main/index.vue

@@ -211,9 +211,6 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="设施数量" prop="devNum">
-          <el-input v-model="form.devNum" placeholder="请输入设施数量"/>
-        </el-form-item>
         <el-form-item label="检查周期" prop="checkCycle">
           <el-select v-model="form.checkCycle" placeholder="请选择检查周期">
             <el-option