From 53a90cc0433f10db423114c53da407f038eef9a4 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 29 六月 2026 13:38:36 +0800
Subject: [PATCH] Revert "feat: 添加线路巡检和安全设施巡检模块"
---
/dev/null | 59 -----------------------------------------------------------
1 files changed, 0 insertions(+), 59 deletions(-)
diff --git a/sql/device_inspection.sql b/sql/device_inspection.sql
deleted file mode 100644
index c8b360c..0000000
--- a/sql/device_inspection.sql
+++ /dev/null
@@ -1,88 +0,0 @@
--- 绾胯矾宸℃鍜屽畨鍏ㄨ鏂藉贰妫�妯″潡SQL
-
--- 1. 绾胯矾宸℃璁板綍琛�
-CREATE TABLE IF NOT EXISTS `line_inspection` (
- `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '涓婚敭ID',
- `task_name` VARCHAR(100) NOT NULL COMMENT '宸℃浠诲姟鍚嶇О',
- `inspection_type` VARCHAR(50) DEFAULT '绾胯矾宸℃' COMMENT '宸℃绫诲瀷',
- `route_name` VARCHAR(100) COMMENT '绾胯矾鍚嶇О',
- `device_id` BIGINT COMMENT '鍏宠仈璁惧ID',
- `inspector_id` VARCHAR(50) COMMENT '宸℃浜篒D',
- `inspector` VARCHAR(50) COMMENT '宸℃浜哄鍚�',
- `inspection_time` DATETIME COMMENT '宸℃鏃堕棿',
- `inspection_result` VARCHAR(20) COMMENT '宸℃缁撴灉锛氭甯�/寮傚父',
- `hazard_description` TEXT COMMENT '闅愭偅鎻忚堪',
- `status` VARCHAR(20) DEFAULT '寰呭贰妫�' COMMENT '鐘舵�侊細寰呭贰妫�/杩涜涓�/宸插畬鎴�',
- `remarks` VARCHAR(500) COMMENT '澶囨敞',
- `deleted` INT DEFAULT 0 COMMENT '杞垹闄ゆ爣蹇楋細0=鏈垹闄わ紝1=宸插垹闄�',
- `create_user` INT COMMENT '鍒涘缓浜�',
- `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '鍒涘缓鏃堕棿',
- `update_user` INT COMMENT '鏇存柊浜�',
- `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '鏇存柊鏃堕棿',
- `tenant_id` BIGINT COMMENT '绉熸埛ID',
- `dept_id` BIGINT COMMENT '閮ㄩ棬ID',
- PRIMARY KEY (`id`),
- KEY `idx_device_id` (`device_id`),
- KEY `idx_inspector_id` (`inspector_id`),
- KEY `idx_tenant_id` (`tenant_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='绾胯矾宸℃璁板綍琛�';
-
--- 2. 瀹夊叏璁炬柦鍙拌处琛�
-CREATE TABLE IF NOT EXISTS `safety_facility` (
- `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '涓婚敭ID',
- `facility_name` VARCHAR(100) NOT NULL COMMENT '璁炬柦鍚嶇О',
- `facility_type` VARCHAR(50) COMMENT '璁炬柦绫诲瀷锛氭秷闃插櫒鏉�/瀹夊叏璁惧绛�',
- `location` VARCHAR(200) COMMENT '鎵�鍦ㄤ綅缃�',
- `device_id` BIGINT COMMENT '鍏宠仈璁惧ID',
- `status` VARCHAR(20) DEFAULT '姝e父' COMMENT '璁炬柦鐘舵�侊細姝e父/寮傚父/鍋滅敤',
- `last_inspection_time` DATETIME COMMENT '涓婃宸℃鏃堕棿',
- `next_inspection_time` DATETIME COMMENT '涓嬫宸℃鏃堕棿',
- `responsibility_dept` VARCHAR(100) COMMENT '璐d换閮ㄩ棬',
- `responsibility_person` VARCHAR(50) COMMENT '璐d换浜�',
- `remarks` VARCHAR(500) COMMENT '澶囨敞',
- `deleted` INT DEFAULT 0 COMMENT '杞垹闄ゆ爣蹇楋細0=鏈垹闄わ紝1=宸插垹闄�',
- `create_user` INT COMMENT '鍒涘缓浜�',
- `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '鍒涘缓鏃堕棿',
- `update_user` INT COMMENT '鏇存柊浜�',
- `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '鏇存柊鏃堕棿',
- `tenant_id` BIGINT COMMENT '绉熸埛ID',
- `dept_id` BIGINT COMMENT '閮ㄩ棬ID',
- PRIMARY KEY (`id`),
- KEY `idx_facility_type` (`facility_type`),
- KEY `idx_status` (`status`),
- KEY `idx_tenant_id` (`tenant_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='瀹夊叏璁炬柦鍙拌处琛�';
-
--- 3. 闅愭偅涓婃姤璁板綍琛�
-CREATE TABLE IF NOT EXISTS `hazard_report` (
- `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '涓婚敭ID',
- `report_type` VARCHAR(50) COMMENT '涓婃姤绫诲瀷锛氱嚎璺贰妫�/瀹夊叏璁炬柦宸℃',
- `facility_id` BIGINT COMMENT '鍏宠仈璁炬柦ID',
- `hazard_description` TEXT NOT NULL COMMENT '闅愭偅鎻忚堪',
- `severity` VARCHAR(20) COMMENT '涓ラ噸绋嬪害锛氳交寰�/涓�鑸�/涓ラ噸',
- `reporter_id` VARCHAR(50) COMMENT '涓婃姤浜篒D',
- `reporter` VARCHAR(50) COMMENT '涓婃姤浜哄鍚�',
- `report_time` DATETIME COMMENT '涓婃姤鏃堕棿',
- `rectification_status` VARCHAR(20) DEFAULT '寰呮暣鏀�' COMMENT '鏁存敼鐘舵�侊細寰呮暣鏀�/鏁存敼涓�/宸插畬鎴�',
- `rectification_person_id` VARCHAR(50) COMMENT '鏁存敼璐d换浜篒D',
- `rectification_person` VARCHAR(50) COMMENT '鏁存敼璐d换浜哄鍚�',
- `rectification_time` DATETIME COMMENT '鏁存敼瀹屾垚鏃堕棿',
- `rectification_description` TEXT COMMENT '鏁存敼鎻忚堪',
- `acceptance_person_id` VARCHAR(50) COMMENT '楠屾敹浜篒D',
- `acceptance_person` VARCHAR(50) COMMENT '楠屾敹浜哄鍚�',
- `acceptance_time` DATETIME COMMENT '楠屾敹鏃堕棿',
- `acceptance_result` VARCHAR(20) COMMENT '楠屾敹缁撴灉',
- `remarks` VARCHAR(500) COMMENT '澶囨敞',
- `deleted` INT DEFAULT 0 COMMENT '杞垹闄ゆ爣蹇楋細0=鏈垹闄わ紝1=宸插垹闄�',
- `create_user` INT COMMENT '鍒涘缓浜�',
- `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '鍒涘缓鏃堕棿',
- `update_user` INT COMMENT '鏇存柊浜�',
- `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '鏇存柊鏃堕棿',
- `tenant_id` BIGINT COMMENT '绉熸埛ID',
- `dept_id` BIGINT COMMENT '閮ㄩ棬ID',
- PRIMARY KEY (`id`),
- KEY `idx_facility_id` (`facility_id`),
- KEY `idx_report_type` (`report_type`),
- KEY `idx_rectification_status` (`rectification_status`),
- KEY `idx_tenant_id` (`tenant_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='闅愭偅涓婃姤璁板綍琛�';
diff --git a/src/main/java/com/ruoyi/device/controller/HazardReportController.java b/src/main/java/com/ruoyi/device/controller/HazardReportController.java
deleted file mode 100644
index 61f93f6..0000000
--- a/src/main/java/com/ruoyi/device/controller/HazardReportController.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.ruoyi.device.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.ruoyi.device.dto.HazardReportDto;
-import com.ruoyi.device.pojo.HazardReport;
-import com.ruoyi.device.service.IHazardReportService;
-import com.ruoyi.framework.web.domain.AjaxResult;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
-
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- * 闅愭偅涓婃姤Controller
- * 鎻愪緵闅愭偅涓婃姤銆佹暣鏀广�侀獙鏀剁瓑鍔熻兘
- */
-@Tag(name = "闅愭偅涓婃姤")
-@RestController
-@RequestMapping("/device/hazardReport")
-@RequiredArgsConstructor
-public class HazardReportController {
-
- private final IHazardReportService hazardReportService;
-
- /**
- * 鏌ヨ闅愭偅涓婃姤鍒楄〃
- */
- @Operation(summary = "鏌ヨ闅愭偅涓婃姤鍒楄〃")
- @GetMapping("/list")
- public AjaxResult list(Page<HazardReport> page, HazardReportDto dto) {
- return AjaxResult.success(hazardReportService.queryPage(page, dto));
- }
-
- /**
- * 鏂板闅愭偅涓婃姤
- */
- @Operation(summary = "鏂板闅愭偅涓婃姤")
- @PostMapping("/add")
- @Transactional(rollbackFor = Exception.class)
- public AjaxResult add(@RequestBody HazardReportDto dto) {
- int result = hazardReportService.add(dto);
- if (result > 0) {
- return AjaxResult.success("涓婃姤鎴愬姛");
- }
- return AjaxResult.error("涓婃姤澶辫触");
- }
-
- /**
- * 璁板綍鏁存敼缁撴灉
- */
- @Operation(summary = "璁板綍鏁存敼缁撴灉")
- @PostMapping("/rectify")
- @Transactional(rollbackFor = Exception.class)
- public AjaxResult rectify(@RequestBody HazardReportDto dto) {
- int result = hazardReportService.rectify(dto);
- if (result > 0) {
- return AjaxResult.success("鏁存敼璁板綍鎴愬姛");
- }
- return AjaxResult.error("鏁存敼璁板綍澶辫触");
- }
-
- /**
- * 璁板綍楠屾敹缁撴灉
- */
- @Operation(summary = "璁板綍楠屾敹缁撴灉")
- @PostMapping("/accept")
- @Transactional(rollbackFor = Exception.class)
- public AjaxResult accept(@RequestBody HazardReportDto dto) {
- int result = hazardReportService.accept(dto);
- if (result > 0) {
- return AjaxResult.success("楠屾敹璁板綍鎴愬姛");
- }
- return AjaxResult.error("楠屾敹璁板綍澶辫触");
- }
-
- /**
- * 鍒犻櫎闅愭偅涓婃姤璁板綍
- */
- @Operation(summary = "鍒犻櫎闅愭偅涓婃姤璁板綍")
- @DeleteMapping("/delete")
- @Transactional(rollbackFor = Exception.class)
- public AjaxResult delete(@RequestBody Long[] ids) {
- for (Long id : ids) {
- hazardReportService.removeById(id);
- }
- return AjaxResult.success("鍒犻櫎鎴愬姛");
- }
-
- /**
- * 瀵煎嚭闅愭偅涓婃姤璁板綍
- */
- @Operation(summary = "瀵煎嚭闅愭偅涓婃姤璁板綍")
- @PostMapping("/export")
- public void export(HttpServletResponse response, HazardReportDto dto) {
- hazardReportService.export(response, dto);
- }
-}
diff --git a/src/main/java/com/ruoyi/device/controller/LineInspectionController.java b/src/main/java/com/ruoyi/device/controller/LineInspectionController.java
deleted file mode 100644
index ae9efe7..0000000
--- a/src/main/java/com/ruoyi/device/controller/LineInspectionController.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.ruoyi.device.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.ruoyi.device.dto.LineInspectionDto;
-import com.ruoyi.device.pojo.LineInspection;
-import com.ruoyi.device.service.ILineInspectionService;
-import com.ruoyi.framework.web.domain.AjaxResult;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
-
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- * 绾胯矾宸℃Controller
- * 鎻愪緵绾胯矾宸℃璁板綍鐨勫鍒犳敼鏌ュ拰瀵煎嚭鍔熻兘
- */
-@Tag(name = "绾胯矾宸℃")
-@RestController
-@RequestMapping("/device/lineInspection")
-@RequiredArgsConstructor
-public class LineInspectionController {
-
- private final ILineInspectionService lineInspectionService;
-
- /**
- * 鏌ヨ绾胯矾宸℃鍒楄〃
- */
- @Operation(summary = "鏌ヨ绾胯矾宸℃鍒楄〃")
- @GetMapping("/list")
- public AjaxResult list(Page<LineInspection> page, LineInspectionDto dto) {
- return AjaxResult.success(lineInspectionService.queryPage(page, dto));
- }
-
- /**
- * 鏂板鎴栦慨鏀圭嚎璺贰妫�璁板綍
- */
- @Operation(summary = "鏂板鎴栦慨鏀圭嚎璺贰妫�璁板綍")
- @PostMapping("/addOrEdit")
- @Transactional(rollbackFor = Exception.class)
- public AjaxResult addOrEdit(@RequestBody LineInspectionDto dto) {
- int result = lineInspectionService.addOrEdit(dto);
- if (result > 0) {
- return AjaxResult.success("鎿嶄綔鎴愬姛");
- }
- return AjaxResult.error("鎿嶄綔澶辫触");
- }
-
- /**
- * 鍒犻櫎绾胯矾宸℃璁板綍
- */
- @Operation(summary = "鍒犻櫎绾胯矾宸℃璁板綍")
- @DeleteMapping("/delete")
- @Transactional(rollbackFor = Exception.class)
- public AjaxResult delete(@RequestBody Long[] ids) {
- for (Long id : ids) {
- lineInspectionService.removeById(id);
- }
- return AjaxResult.success("鍒犻櫎鎴愬姛");
- }
-
- /**
- * 瀵煎嚭绾胯矾宸℃璁板綍
- */
- @Operation(summary = "瀵煎嚭绾胯矾宸℃璁板綍")
- @PostMapping("/export")
- public void export(HttpServletResponse response, LineInspectionDto dto) {
- lineInspectionService.export(response, dto);
- }
-}
diff --git a/src/main/java/com/ruoyi/device/controller/SafetyFacilityController.java b/src/main/java/com/ruoyi/device/controller/SafetyFacilityController.java
deleted file mode 100644
index 349cdf3..0000000
--- a/src/main/java/com/ruoyi/device/controller/SafetyFacilityController.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.ruoyi.device.controller;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.ruoyi.device.dto.SafetyFacilityDto;
-import com.ruoyi.device.pojo.SafetyFacility;
-import com.ruoyi.device.service.ISafetyFacilityService;
-import com.ruoyi.framework.web.domain.AjaxResult;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
-
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- * 瀹夊叏璁炬柦Controller
- * 鎻愪緵瀹夊叏璁炬柦鍙拌处鐨勫鍒犳敼鏌ュ拰瀵煎嚭鍔熻兘
- */
-@Tag(name = "瀹夊叏璁炬柦宸℃")
-@RestController
-@RequestMapping("/device/safetyFacility")
-@RequiredArgsConstructor
-public class SafetyFacilityController {
-
- private final ISafetyFacilityService safetyFacilityService;
-
- /**
- * 鏌ヨ瀹夊叏璁炬柦鍒楄〃
- */
- @Operation(summary = "鏌ヨ瀹夊叏璁炬柦鍒楄〃")
- @GetMapping("/list")
- public AjaxResult list(Page<SafetyFacility> page, SafetyFacilityDto dto) {
- return AjaxResult.success(safetyFacilityService.queryPage(page, dto));
- }
-
- /**
- * 鏂板鎴栦慨鏀瑰畨鍏ㄨ鏂�
- */
- @Operation(summary = "鏂板鎴栦慨鏀瑰畨鍏ㄨ鏂�")
- @PostMapping("/addOrEdit")
- @Transactional(rollbackFor = Exception.class)
- public AjaxResult addOrEdit(@RequestBody SafetyFacilityDto dto) {
- int result = safetyFacilityService.addOrEdit(dto);
- if (result > 0) {
- return AjaxResult.success("鎿嶄綔鎴愬姛");
- }
- return AjaxResult.error("鎿嶄綔澶辫触");
- }
-
- /**
- * 鍒犻櫎瀹夊叏璁炬柦
- */
- @Operation(summary = "鍒犻櫎瀹夊叏璁炬柦")
- @DeleteMapping("/delete")
- @Transactional(rollbackFor = Exception.class)
- public AjaxResult delete(@RequestBody Long[] ids) {
- for (Long id : ids) {
- safetyFacilityService.removeById(id);
- }
- return AjaxResult.success("鍒犻櫎鎴愬姛");
- }
-
- /**
- * 瀵煎嚭瀹夊叏璁炬柦璁板綍
- */
- @Operation(summary = "瀵煎嚭瀹夊叏璁炬柦璁板綍")
- @PostMapping("/export")
- public void export(HttpServletResponse response, SafetyFacilityDto dto) {
- safetyFacilityService.export(response, dto);
- }
-}
diff --git a/src/main/java/com/ruoyi/device/dto/HazardReportDto.java b/src/main/java/com/ruoyi/device/dto/HazardReportDto.java
deleted file mode 100644
index b442137..0000000
--- a/src/main/java/com/ruoyi/device/dto/HazardReportDto.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.ruoyi.device.dto;
-
-import com.ruoyi.device.pojo.HazardReport;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-/**
- * 闅愭偅涓婃姤DTO
- * 鎵╁睍瀹炰綋绫伙紝鐢ㄤ簬鏌ヨ鏉′欢鍜岃繑鍥炴暟鎹�
- */
-@Data
-public class HazardReportDto extends HazardReport {
-
- @Schema(description = "璁炬柦鍚嶇О")
- private String facilityName;
-
- @Schema(description = "璁炬柦绫诲瀷")
- private String facilityType;
-}
diff --git a/src/main/java/com/ruoyi/device/dto/LineInspectionDto.java b/src/main/java/com/ruoyi/device/dto/LineInspectionDto.java
deleted file mode 100644
index 53eabb1..0000000
--- a/src/main/java/com/ruoyi/device/dto/LineInspectionDto.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.ruoyi.device.dto;
-
-import com.ruoyi.device.pojo.LineInspection;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-/**
- * 绾胯矾宸℃DTO
- * 鎵╁睍瀹炰綋绫伙紝鐢ㄤ簬鏌ヨ鏉′欢鍜岃繑鍥炴暟鎹�
- */
-@Data
-public class LineInspectionDto extends LineInspection {
-
- @Schema(description = "璁惧鍚嶇О")
- private String deviceName;
-
- @Schema(description = "璁惧鍨嬪彿")
- private String deviceModel;
-}
diff --git a/src/main/java/com/ruoyi/device/dto/SafetyFacilityDto.java b/src/main/java/com/ruoyi/device/dto/SafetyFacilityDto.java
deleted file mode 100644
index 796a95a..0000000
--- a/src/main/java/com/ruoyi/device/dto/SafetyFacilityDto.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.ruoyi.device.dto;
-
-import com.ruoyi.device.pojo.SafetyFacility;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-/**
- * 瀹夊叏璁炬柦DTO
- * 鎵╁睍瀹炰綋绫伙紝鐢ㄤ簬鏌ヨ鏉′欢鍜岃繑鍥炴暟鎹�
- */
-@Data
-public class SafetyFacilityDto extends SafetyFacility {
-
- @Schema(description = "璁惧鍚嶇О")
- private String deviceName;
-
- @Schema(description = "璁惧鍨嬪彿")
- private String deviceModel;
-}
diff --git a/src/main/java/com/ruoyi/device/mapper/HazardReportMapper.java b/src/main/java/com/ruoyi/device/mapper/HazardReportMapper.java
deleted file mode 100644
index 738633e..0000000
--- a/src/main/java/com/ruoyi/device/mapper/HazardReportMapper.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.ruoyi.device.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.device.dto.HazardReportDto;
-import com.ruoyi.device.pojo.HazardReport;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-
-import java.util.List;
-
-/**
- * 闅愭偅涓婃姤Mapper鎺ュ彛
- */
-@Mapper
-public interface HazardReportMapper extends BaseMapper<HazardReport> {
-
- /**
- * 鏌ヨ闅愭偅涓婃姤鍒楄〃锛堝叧鑱旇鏂戒俊鎭級
- */
- @Select("<script>" +
- "SELECT hr.*, sf.facility_name, sf.facility_type " +
- "FROM hazard_report hr " +
- "LEFT JOIN safety_facility sf ON hr.facility_id = sf.id " +
- "WHERE hr.deleted = 0 " +
- "<if test='dto.reportType != null and dto.reportType != \"\"'> " +
- "AND hr.report_type = #{dto.reportType} " +
- "</if>" +
- "<if test='dto.severity != null and dto.severity != \"\"'> " +
- "AND hr.severity = #{dto.severity} " +
- "</if>" +
- "<if test='dto.rectificationStatus != null and dto.rectificationStatus != \"\"'> " +
- "AND hr.rectification_status = #{dto.rectificationStatus} " +
- "</if>" +
- "<if test='dto.reporter != null and dto.reporter != \"\"'> " +
- "AND hr.reporter LIKE CONCAT('%', #{dto.reporter}, '%') " +
- "</if>" +
- "ORDER BY hr.create_time DESC" +
- "</script>")
- List<HazardReportDto> selectHazardReportList(@Param("dto") HazardReportDto dto);
-}
diff --git a/src/main/java/com/ruoyi/device/mapper/LineInspectionMapper.java b/src/main/java/com/ruoyi/device/mapper/LineInspectionMapper.java
deleted file mode 100644
index 68705c2..0000000
--- a/src/main/java/com/ruoyi/device/mapper/LineInspectionMapper.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.ruoyi.device.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.device.dto.LineInspectionDto;
-import com.ruoyi.device.pojo.LineInspection;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-
-import java.util.List;
-
-/**
- * 绾胯矾宸℃Mapper鎺ュ彛
- */
-@Mapper
-public interface LineInspectionMapper extends BaseMapper<LineInspection> {
-
- /**
- * 鏌ヨ绾胯矾宸℃鍒楄〃锛堝叧鑱旇澶囦俊鎭級
- */
- @Select("<script>" +
- "SELECT li.*, dl.device_name, dl.device_model " +
- "FROM line_inspection li " +
- "LEFT JOIN device_ledger dl ON li.device_id = dl.id " +
- "WHERE li.deleted = 0 " +
- "<if test='dto.taskName != null and dto.taskName != \"\"'> " +
- "AND li.task_name LIKE CONCAT('%', #{dto.taskName}, '%') " +
- "</if>" +
- "<if test='dto.routeName != null and dto.routeName != \"\"'> " +
- "AND li.route_name LIKE CONCAT('%', #{dto.routeName}, '%') " +
- "</if>" +
- "<if test='dto.inspector != null and dto.inspector != \"\"'> " +
- "AND li.inspector LIKE CONCAT('%', #{dto.inspector}, '%') " +
- "</if>" +
- "<if test='dto.status != null and dto.status != \"\"'> " +
- "AND li.status = #{dto.status} " +
- "</if>" +
- "ORDER BY li.create_time DESC" +
- "</script>")
- List<LineInspectionDto> selectLineInspectionList(@Param("dto") LineInspectionDto dto);
-}
diff --git a/src/main/java/com/ruoyi/device/mapper/SafetyFacilityMapper.java b/src/main/java/com/ruoyi/device/mapper/SafetyFacilityMapper.java
deleted file mode 100644
index 3f78636..0000000
--- a/src/main/java/com/ruoyi/device/mapper/SafetyFacilityMapper.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.ruoyi.device.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.ruoyi.device.dto.SafetyFacilityDto;
-import com.ruoyi.device.pojo.SafetyFacility;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-
-import java.util.List;
-
-/**
- * 瀹夊叏璁炬柦Mapper鎺ュ彛
- */
-@Mapper
-public interface SafetyFacilityMapper extends BaseMapper<SafetyFacility> {
-
- /**
- * 鏌ヨ瀹夊叏璁炬柦鍒楄〃锛堝叧鑱旇澶囦俊鎭級
- */
- @Select("<script>" +
- "SELECT sf.*, dl.device_name, dl.device_model " +
- "FROM safety_facility sf " +
- "LEFT JOIN device_ledger dl ON sf.device_id = dl.id " +
- "WHERE sf.deleted = 0 " +
- "<if test='dto.facilityName != null and dto.facilityName != \"\"'> " +
- "AND sf.facility_name LIKE CONCAT('%', #{dto.facilityName}, '%') " +
- "</if>" +
- "<if test='dto.facilityType != null and dto.facilityType != \"\"'> " +
- "AND sf.facility_type = #{dto.facilityType} " +
- "</if>" +
- "<if test='dto.status != null and dto.status != \"\"'> " +
- "AND sf.status = #{dto.status} " +
- "</if>" +
- "<if test='dto.location != null and dto.location != \"\"'> " +
- "AND sf.location LIKE CONCAT('%', #{dto.location}, '%') " +
- "</if>" +
- "ORDER BY sf.create_time DESC" +
- "</script>")
- List<SafetyFacilityDto> selectSafetyFacilityList(@Param("dto") SafetyFacilityDto dto);
-}
diff --git a/src/main/java/com/ruoyi/device/pojo/HazardReport.java b/src/main/java/com/ruoyi/device/pojo/HazardReport.java
deleted file mode 100644
index ace2b56..0000000
--- a/src/main/java/com/ruoyi/device/pojo/HazardReport.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package com.ruoyi.device.pojo;
-
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.framework.aspectj.lang.annotation.Excel;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-/**
- * 闅愭偅涓婃姤璁板綍瀹炰綋绫�
- * 鐢ㄤ簬璁板綍宸℃杩囩▼涓彂鐜扮殑闅愭偅锛岃窡韪暣鏀圭姸鎬�
- */
-@Data
-@Schema
-@TableName("hazard_report")
-public class HazardReport {
-
- @TableId(type = IdType.AUTO)
- @Schema(description = "涓婚敭ID")
- private Long id;
-
- @Schema(description = "涓婃姤绫诲瀷锛氱嚎璺贰妫�/瀹夊叏璁炬柦宸℃")
- @Excel(name = "涓婃姤绫诲瀷")
- private String reportType;
-
- @Schema(description = "鍏宠仈璁炬柦ID")
- private Long facilityId;
-
- @Schema(description = "闅愭偅鎻忚堪")
- @Excel(name = "闅愭偅鎻忚堪")
- private String hazardDescription;
-
- @Schema(description = "涓ラ噸绋嬪害锛氳交寰�/涓�鑸�/涓ラ噸")
- @Excel(name = "涓ラ噸绋嬪害")
- private String severity;
-
- @Schema(description = "涓婃姤浜篒D")
- private String reporterId;
-
- @Schema(description = "涓婃姤浜哄鍚�")
- @Excel(name = "涓婃姤浜�")
- private String reporter;
-
- @Schema(description = "涓婃姤鏃堕棿")
- @Excel(name = "涓婃姤鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime reportTime;
-
- @Schema(description = "鏁存敼鐘舵�侊細寰呮暣鏀�/鏁存敼涓�/宸插畬鎴�")
- @Excel(name = "鏁存敼鐘舵��")
- private String rectificationStatus;
-
- @Schema(description = "鏁存敼璐d换浜篒D")
- private String rectificationPersonId;
-
- @Schema(description = "鏁存敼璐d换浜哄鍚�")
- @Excel(name = "鏁存敼璐d换浜�")
- private String rectificationPerson;
-
- @Schema(description = "鏁存敼瀹屾垚鏃堕棿")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime rectificationTime;
-
- @Schema(description = "鏁存敼鎻忚堪")
- @Excel(name = "鏁存敼鎻忚堪")
- private String rectificationDescription;
-
- @Schema(description = "楠屾敹浜篒D")
- private String acceptancePersonId;
-
- @Schema(description = "楠屾敹浜哄鍚�")
- @Excel(name = "楠屾敹浜�")
- private String acceptancePerson;
-
- @Schema(description = "楠屾敹鏃堕棿")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime acceptanceTime;
-
- @Schema(description = "楠屾敹缁撴灉")
- @Excel(name = "楠屾敹缁撴灉")
- private String acceptanceResult;
-
- @Schema(description = "澶囨敞")
- @Excel(name = "澶囨敞")
- private String remarks;
-
- @Schema(description = "杞垹闄ゆ爣蹇楋細0=鏈垹闄わ紝1=宸插垹闄�")
- private Integer deleted;
-
- @Schema(description = "鍒涘缓浜�")
- @TableField(fill = FieldFill.INSERT)
- private Integer createUser;
-
- @Schema(description = "鍒涘缓鏃堕棿")
- @TableField(fill = FieldFill.INSERT)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime createTime;
-
- @Schema(description = "鏇存柊浜�")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Integer updateUser;
-
- @Schema(description = "鏇存柊鏃堕棿")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime updateTime;
-
- @Schema(description = "绉熸埛ID")
- @TableField(fill = FieldFill.INSERT)
- private Long tenantId;
-
- @TableField(fill = FieldFill.INSERT)
- private Long deptId;
-}
diff --git a/src/main/java/com/ruoyi/device/pojo/LineInspection.java b/src/main/java/com/ruoyi/device/pojo/LineInspection.java
deleted file mode 100644
index 6cdf7ad..0000000
--- a/src/main/java/com/ruoyi/device/pojo/LineInspection.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.ruoyi.device.pojo;
-
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.framework.aspectj.lang.annotation.Excel;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-/**
- * 绾胯矾宸℃璁板綍瀹炰綋绫�
- * 鐢ㄤ簬璁板綍绾胯矾宸℃浠诲姟鐨勬墽琛屾儏鍐碉紝鍖呮嫭宸℃缁撴灉銆侀殣鎮d笂鎶ョ瓑
- */
-@Data
-@Schema
-@TableName("line_inspection")
-public class LineInspection {
-
- @TableId(type = IdType.AUTO)
- @Schema(description = "涓婚敭ID")
- private Long id;
-
- @Schema(description = "宸℃浠诲姟鍚嶇О")
- @Excel(name = "宸℃浠诲姟鍚嶇О")
- private String taskName;
-
- @Schema(description = "宸℃绫诲瀷锛氱嚎璺贰妫�")
- private String inspectionType;
-
- @Schema(description = "绾胯矾鍚嶇О")
- @Excel(name = "绾胯矾鍚嶇О")
- private String routeName;
-
- @Schema(description = "鍏宠仈璁惧ID")
- private Long deviceId;
-
- @Schema(description = "宸℃浜篒D")
- private String inspectorId;
-
- @Schema(description = "宸℃浜哄鍚�")
- @Excel(name = "宸℃浜�")
- private String inspector;
-
- @Schema(description = "宸℃鏃堕棿")
- @Excel(name = "宸℃鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime inspectionTime;
-
- @Schema(description = "宸℃缁撴灉锛氭甯�/寮傚父")
- @Excel(name = "宸℃缁撴灉")
- private String inspectionResult;
-
- @Schema(description = "闅愭偅鎻忚堪")
- @Excel(name = "闅愭偅鎻忚堪")
- private String hazardDescription;
-
- @Schema(description = "鐘舵�侊細寰呭贰妫�/杩涜涓�/宸插畬鎴�")
- @Excel(name = "鐘舵��")
- private String status;
-
- @Schema(description = "澶囨敞")
- @Excel(name = "澶囨敞")
- private String remarks;
-
- @Schema(description = "杞垹闄ゆ爣蹇楋細0=鏈垹闄わ紝1=宸插垹闄�")
- private Integer deleted;
-
- @Schema(description = "鍒涘缓浜�")
- @TableField(fill = FieldFill.INSERT)
- private Integer createUser;
-
- @Schema(description = "鍒涘缓鏃堕棿")
- @TableField(fill = FieldFill.INSERT)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime createTime;
-
- @Schema(description = "鏇存柊浜�")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Integer updateUser;
-
- @Schema(description = "鏇存柊鏃堕棿")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime updateTime;
-
- @Schema(description = "绉熸埛ID")
- @TableField(fill = FieldFill.INSERT)
- private Long tenantId;
-
- @TableField(fill = FieldFill.INSERT)
- private Long deptId;
-}
diff --git a/src/main/java/com/ruoyi/device/pojo/SafetyFacility.java b/src/main/java/com/ruoyi/device/pojo/SafetyFacility.java
deleted file mode 100644
index 0dc8327..0000000
--- a/src/main/java/com/ruoyi/device/pojo/SafetyFacility.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.ruoyi.device.pojo;
-
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.framework.aspectj.lang.annotation.Excel;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-/**
- * 瀹夊叏璁炬柦鍙拌处瀹炰綋绫�
- * 鐢ㄤ簬绠$悊瀹夊叏璁炬柦鐨勫熀鏈俊鎭紝鍖呮嫭娑堥槻鍣ㄦ潗銆佸畨鍏ㄨ澶囩瓑
- */
-@Data
-@Schema
-@TableName("safety_facility")
-public class SafetyFacility {
-
- @TableId(type = IdType.AUTO)
- @Schema(description = "涓婚敭ID")
- private Long id;
-
- @Schema(description = "璁炬柦鍚嶇О")
- @Excel(name = "璁炬柦鍚嶇О")
- private String facilityName;
-
- @Schema(description = "璁炬柦绫诲瀷锛氭秷闃插櫒鏉�/瀹夊叏璁惧绛�")
- @Excel(name = "璁炬柦绫诲瀷")
- private String facilityType;
-
- @Schema(description = "鎵�鍦ㄤ綅缃�")
- @Excel(name = "鎵�鍦ㄤ綅缃�")
- private String location;
-
- @Schema(description = "鍏宠仈璁惧ID")
- private Long deviceId;
-
- @Schema(description = "璁炬柦鐘舵�侊細姝e父/寮傚父/鍋滅敤")
- @Excel(name = "璁炬柦鐘舵��")
- private String status;
-
- @Schema(description = "涓婃宸℃鏃堕棿")
- @Excel(name = "涓婃宸℃鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime lastInspectionTime;
-
- @Schema(description = "涓嬫宸℃鏃堕棿")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime nextInspectionTime;
-
- @Schema(description = "璐d换閮ㄩ棬")
- @Excel(name = "璐d换閮ㄩ棬")
- private String responsibilityDept;
-
- @Schema(description = "璐d换浜�")
- @Excel(name = "璐d换浜�")
- private String responsibilityPerson;
-
- @Schema(description = "澶囨敞")
- @Excel(name = "澶囨敞")
- private String remarks;
-
- @Schema(description = "杞垹闄ゆ爣蹇楋細0=鏈垹闄わ紝1=宸插垹闄�")
- private Integer deleted;
-
- @Schema(description = "鍒涘缓浜�")
- @TableField(fill = FieldFill.INSERT)
- private Integer createUser;
-
- @Schema(description = "鍒涘缓鏃堕棿")
- @TableField(fill = FieldFill.INSERT)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime createTime;
-
- @Schema(description = "鏇存柊浜�")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- private Integer updateUser;
-
- @Schema(description = "鏇存柊鏃堕棿")
- @TableField(fill = FieldFill.INSERT_UPDATE)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime updateTime;
-
- @Schema(description = "绉熸埛ID")
- @TableField(fill = FieldFill.INSERT)
- private Long tenantId;
-
- @TableField(fill = FieldFill.INSERT)
- private Long deptId;
-}
diff --git a/src/main/java/com/ruoyi/device/service/IHazardReportService.java b/src/main/java/com/ruoyi/device/service/IHazardReportService.java
deleted file mode 100644
index 49b2044..0000000
--- a/src/main/java/com/ruoyi/device/service/IHazardReportService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.ruoyi.device.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.device.dto.HazardReportDto;
-import com.ruoyi.device.pojo.HazardReport;
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- * 闅愭偅涓婃姤Service鎺ュ彛
- */
-public interface IHazardReportService extends IService<HazardReport> {
-
- /**
- * 鍒嗛〉鏌ヨ闅愭偅涓婃姤鍒楄〃
- */
- IPage<HazardReportDto> queryPage(Page<HazardReport> page, HazardReportDto dto);
-
- /**
- * 鏂板闅愭偅涓婃姤
- */
- int add(HazardReportDto dto);
-
- /**
- * 璁板綍鏁存敼缁撴灉
- */
- int rectify(HazardReportDto dto);
-
- /**
- * 璁板綍楠屾敹缁撴灉
- */
- int accept(HazardReportDto dto);
-
- /**
- * 瀵煎嚭闅愭偅涓婃姤璁板綍
- */
- void export(HttpServletResponse response, HazardReportDto dto);
-}
diff --git a/src/main/java/com/ruoyi/device/service/ILineInspectionService.java b/src/main/java/com/ruoyi/device/service/ILineInspectionService.java
deleted file mode 100644
index ed39485..0000000
--- a/src/main/java/com/ruoyi/device/service/ILineInspectionService.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.ruoyi.device.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.device.dto.LineInspectionDto;
-import com.ruoyi.device.pojo.LineInspection;
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- * 绾胯矾宸℃Service鎺ュ彛
- */
-public interface ILineInspectionService extends IService<LineInspection> {
-
- /**
- * 鍒嗛〉鏌ヨ绾胯矾宸℃鍒楄〃
- */
- IPage<LineInspectionDto> queryPage(Page<LineInspection> page, LineInspectionDto dto);
-
- /**
- * 鏂板鎴栦慨鏀圭嚎璺贰妫�璁板綍
- */
- int addOrEdit(LineInspectionDto dto);
-
- /**
- * 瀵煎嚭绾胯矾宸℃璁板綍
- */
- void export(HttpServletResponse response, LineInspectionDto dto);
-}
diff --git a/src/main/java/com/ruoyi/device/service/ISafetyFacilityService.java b/src/main/java/com/ruoyi/device/service/ISafetyFacilityService.java
deleted file mode 100644
index ef7de29..0000000
--- a/src/main/java/com/ruoyi/device/service/ISafetyFacilityService.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.ruoyi.device.service;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.device.dto.SafetyFacilityDto;
-import com.ruoyi.device.pojo.SafetyFacility;
-import jakarta.servlet.http.HttpServletResponse;
-
-/**
- * 瀹夊叏璁炬柦Service鎺ュ彛
- */
-public interface ISafetyFacilityService extends IService<SafetyFacility> {
-
- /**
- * 鍒嗛〉鏌ヨ瀹夊叏璁炬柦鍒楄〃
- */
- IPage<SafetyFacilityDto> queryPage(Page<SafetyFacility> page, SafetyFacilityDto dto);
-
- /**
- * 鏂板鎴栦慨鏀瑰畨鍏ㄨ鏂�
- */
- int addOrEdit(SafetyFacilityDto dto);
-
- /**
- * 瀵煎嚭瀹夊叏璁炬柦璁板綍
- */
- void export(HttpServletResponse response, SafetyFacilityDto dto);
-}
diff --git a/src/main/java/com/ruoyi/device/service/impl/HazardReportServiceImpl.java b/src/main/java/com/ruoyi/device/service/impl/HazardReportServiceImpl.java
deleted file mode 100644
index b6f33af..0000000
--- a/src/main/java/com/ruoyi/device/service/impl/HazardReportServiceImpl.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.ruoyi.device.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.device.dto.HazardReportDto;
-import com.ruoyi.device.mapper.HazardReportMapper;
-import com.ruoyi.device.pojo.HazardReport;
-import com.ruoyi.device.service.IHazardReportService;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Service;
-
-import jakarta.servlet.http.HttpServletResponse;
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * 闅愭偅涓婃姤Service瀹炵幇绫�
- */
-@Service
-@RequiredArgsConstructor
-public class HazardReportServiceImpl extends ServiceImpl<HazardReportMapper, HazardReport> implements IHazardReportService {
-
- private final HazardReportMapper hazardReportMapper;
-
- /**
- * 鍒嗛〉鏌ヨ闅愭偅涓婃姤鍒楄〃
- */
- @Override
- public IPage<HazardReportDto> queryPage(Page<HazardReport> page, HazardReportDto dto) {
- List<HazardReportDto> list = hazardReportMapper.selectHazardReportList(dto);
- Page<HazardReportDto> resultPage = new Page<>(page.getCurrent(), page.getSize(), list.size());
- resultPage.setRecords(list);
- return resultPage;
- }
-
- /**
- * 鏂板闅愭偅涓婃姤
- */
- @Override
- public int add(HazardReportDto dto) {
- // 璁剧疆鍒濆鐘舵�佷负寰呮暣鏀�
- dto.setRectificationStatus("寰呮暣鏀�");
- dto.setReportTime(LocalDateTime.now());
- return hazardReportMapper.insert(dto) ? 1 : 0;
- }
-
- /**
- * 璁板綍鏁存敼缁撴灉
- */
- @Override
- public int rectify(HazardReportDto dto) {
- // 鏌ヨ鍘熻褰�
- HazardReport existing = hazardReportMapper.selectById(dto.getId());
- if (existing == null) {
- return 0;
- }
- // 鏇存柊鏁存敼淇℃伅
- existing.setRectificationStatus("宸插畬鎴�");
- existing.setRectificationPerson(dto.getRectificationPerson());
- existing.setRectificationTime(LocalDateTime.now());
- existing.setRectificationDescription(dto.getRectificationDescription());
- return hazardReportMapper.updateById(existing) ? 1 : 0;
- }
-
- /**
- * 璁板綍楠屾敹缁撴灉
- */
- @Override
- public int accept(HazardReportDto dto) {
- // 鏌ヨ鍘熻褰�
- HazardReport existing = hazardReportMapper.selectById(dto.getId());
- if (existing == null) {
- return 0;
- }
- // 鏇存柊楠屾敹淇℃伅
- existing.setAcceptancePerson(dto.getAcceptancePerson());
- existing.setAcceptanceTime(LocalDateTime.now());
- existing.setAcceptanceResult(dto.getAcceptanceResult());
- return hazardReportMapper.updateById(existing) ? 1 : 0;
- }
-
- /**
- * 瀵煎嚭闅愭偅涓婃姤璁板綍
- */
- @Override
- public void export(HttpServletResponse response, HazardReportDto dto) {
- List<HazardReportDto> list = hazardReportMapper.selectHazardReportList(dto);
- ExcelUtil<HazardReportDto> util = new ExcelUtil<>(HazardReportDto.class);
- util.exportExcel(response, list, "闅愭偅涓婃姤璁板綍");
- }
-}
diff --git a/src/main/java/com/ruoyi/device/service/impl/LineInspectionServiceImpl.java b/src/main/java/com/ruoyi/device/service/impl/LineInspectionServiceImpl.java
deleted file mode 100644
index d1ae807..0000000
--- a/src/main/java/com/ruoyi/device/service/impl/LineInspectionServiceImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.ruoyi.device.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.device.dto.LineInspectionDto;
-import com.ruoyi.device.mapper.LineInspectionMapper;
-import com.ruoyi.device.pojo.LineInspection;
-import com.ruoyi.device.service.ILineInspectionService;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Service;
-
-import jakarta.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * 绾胯矾宸℃Service瀹炵幇绫�
- */
-@Service
-@RequiredArgsConstructor
-public class LineInspectionServiceImpl extends ServiceImpl<LineInspectionMapper, LineInspection> implements ILineInspectionService {
-
- private final LineInspectionMapper lineInspectionMapper;
-
- /**
- * 鍒嗛〉鏌ヨ绾胯矾宸℃鍒楄〃
- */
- @Override
- public IPage<LineInspectionDto> queryPage(Page<LineInspection> page, LineInspectionDto dto) {
- List<LineInspectionDto> list = lineInspectionMapper.selectLineInspectionList(dto);
- Page<LineInspectionDto> resultPage = new Page<>(page.getCurrent(), page.getSize(), list.size());
- resultPage.setRecords(list);
- return resultPage;
- }
-
- /**
- * 鏂板鎴栦慨鏀圭嚎璺贰妫�璁板綍
- */
- @Override
- public int addOrEdit(LineInspectionDto dto) {
- // 濡傛灉鏄柊澧烇紝璁剧疆鍒濆鐘舵��
- if (dto.getId() == null) {
- dto.setStatus("寰呭贰妫�");
- }
- return lineInspectionMapper.insertOrUpdate(dto) ? 1 : 0;
- }
-
- /**
- * 瀵煎嚭绾胯矾宸℃璁板綍
- */
- @Override
- public void export(HttpServletResponse response, LineInspectionDto dto) {
- List<LineInspectionDto> list = lineInspectionMapper.selectLineInspectionList(dto);
- ExcelUtil<LineInspectionDto> util = new ExcelUtil<>(LineInspectionDto.class);
- util.exportExcel(response, list, "绾胯矾宸℃璁板綍");
- }
-}
diff --git a/src/main/java/com/ruoyi/device/service/impl/SafetyFacilityServiceImpl.java b/src/main/java/com/ruoyi/device/service/impl/SafetyFacilityServiceImpl.java
deleted file mode 100644
index 2e0b5b4..0000000
--- a/src/main/java/com/ruoyi/device/service/impl/SafetyFacilityServiceImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.ruoyi.device.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.device.dto.SafetyFacilityDto;
-import com.ruoyi.device.mapper.SafetyFacilityMapper;
-import com.ruoyi.device.pojo.SafetyFacility;
-import com.ruoyi.device.service.ISafetyFacilityService;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Service;
-
-import jakarta.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * 瀹夊叏璁炬柦Service瀹炵幇绫�
- */
-@Service
-@RequiredArgsConstructor
-public class SafetyFacilityServiceImpl extends ServiceImpl<SafetyFacilityMapper, SafetyFacility> implements ISafetyFacilityService {
-
- private final SafetyFacilityMapper safetyFacilityMapper;
-
- /**
- * 鍒嗛〉鏌ヨ瀹夊叏璁炬柦鍒楄〃
- */
- @Override
- public IPage<SafetyFacilityDto> queryPage(Page<SafetyFacility> page, SafetyFacilityDto dto) {
- List<SafetyFacilityDto> list = safetyFacilityMapper.selectSafetyFacilityList(dto);
- Page<SafetyFacilityDto> resultPage = new Page<>(page.getCurrent(), page.getSize(), list.size());
- resultPage.setRecords(list);
- return resultPage;
- }
-
- /**
- * 鏂板鎴栦慨鏀瑰畨鍏ㄨ鏂�
- */
- @Override
- public int addOrEdit(SafetyFacilityDto dto) {
- // 濡傛灉鏄柊澧烇紝璁剧疆鍒濆鐘舵��
- if (dto.getId() == null) {
- dto.setStatus("姝e父");
- }
- return safetyFacilityMapper.insertOrUpdate(dto) ? 1 : 0;
- }
-
- /**
- * 瀵煎嚭瀹夊叏璁炬柦璁板綍
- */
- @Override
- public void export(HttpServletResponse response, SafetyFacilityDto dto) {
- List<SafetyFacilityDto> list = safetyFacilityMapper.selectSafetyFacilityList(dto);
- ExcelUtil<SafetyFacilityDto> util = new ExcelUtil<>(SafetyFacilityDto.class);
- util.exportExcel(response, list, "瀹夊叏璁炬柦鍙拌处");
- }
-}
--
Gitblit v1.9.3