Browse Source

事故上报

Zimo 3 days ago
parent
commit
9de017197b
16 changed files with 1063 additions and 0 deletions
  1. 94 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/IotAccidentReportController.java
  2. 98 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/IotAccidentReportProcessController.java
  3. 72 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportPageReqVO.java
  4. 39 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportProcessPageReqVO.java
  5. 45 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportProcessRespVO.java
  6. 29 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportProcessSaveReqVO.java
  7. 84 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportRespVO.java
  8. 73 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportSaveReqVO.java
  9. 92 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/qhse/accident/IotAccidentReportDO.java
  10. 52 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/qhse/accident/IotAccidentReportProcessDO.java
  11. 38 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/qhse/accident/IotAccidentReportMapper.java
  12. 31 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/qhse/accident/IotAccidentReportProcessMapper.java
  13. 57 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/accident/IotAccidentReportProcessService.java
  14. 76 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/accident/IotAccidentReportProcessServiceImpl.java
  15. 57 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/accident/IotAccidentReportService.java
  16. 126 0
      yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/accident/IotAccidentReportServiceImpl.java

+ 94 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/IotAccidentReportController.java

@@ -0,0 +1,94 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.accident;
+
+import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportRespVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportSaveReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident.IotAccidentReportDO;
+import cn.iocoder.yudao.module.pms.service.qhse.accident.IotAccidentReportService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.io.IOException;
+import java.util.List;
+
+import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+
+@Tag(name = "管理后台 - QHSE事故上报")
+@RestController
+@RequestMapping("/rq/iot-accident-report")
+@Validated
+public class IotAccidentReportController {
+
+    @Resource
+    private IotAccidentReportService iotAccidentReportService;
+
+    @PostMapping("/create")
+    @Operation(summary = "创建QHSE事故上报")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report:create')")
+    public CommonResult<Long> createIotAccidentReport(@Valid @RequestBody IotAccidentReportSaveReqVO createReqVO) {
+        return success(iotAccidentReportService.createIotAccidentReport(createReqVO));
+    }
+
+    @PutMapping("/update")
+    @Operation(summary = "更新QHSE事故上报")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report:update')")
+    public CommonResult<Boolean> updateIotAccidentReport(@Valid @RequestBody IotAccidentReportSaveReqVO updateReqVO) {
+        iotAccidentReportService.updateIotAccidentReport(updateReqVO);
+        return success(true);
+    }
+
+    @DeleteMapping("/delete")
+    @Operation(summary = "删除QHSE事故上报")
+    @Parameter(name = "id", description = "编号", required = true)
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report:delete')")
+    public CommonResult<Boolean> deleteIotAccidentReport(@RequestParam("id") Long id) {
+        iotAccidentReportService.deleteIotAccidentReport(id);
+        return success(true);
+    }
+
+    @GetMapping("/get")
+    @Operation(summary = "获得QHSE事故上报")
+    @Parameter(name = "id", description = "编号", required = true, example = "1024")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report:query')")
+    public CommonResult<IotAccidentReportRespVO> getIotAccidentReport(@RequestParam("id") Long id) {
+        IotAccidentReportDO iotAccidentReport = iotAccidentReportService.getIotAccidentReport(id);
+        return success(BeanUtils.toBean(iotAccidentReport, IotAccidentReportRespVO.class));
+    }
+
+    @GetMapping("/page")
+    @Operation(summary = "获得QHSE事故上报分页")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report:query')")
+    public CommonResult<PageResult<IotAccidentReportRespVO>> getIotAccidentReportPage(@Valid IotAccidentReportPageReqVO pageReqVO) {
+        PageResult<IotAccidentReportDO> pageResult = iotAccidentReportService.getIotAccidentReportPage(pageReqVO);
+        return success(BeanUtils.toBean(pageResult, IotAccidentReportRespVO.class));
+    }
+
+    @GetMapping("/export-excel")
+    @Operation(summary = "导出QHSE事故上报 Excel")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report:export')")
+    @ApiAccessLog(operateType = EXPORT)
+    public void exportIotAccidentReportExcel(@Valid IotAccidentReportPageReqVO pageReqVO,
+              HttpServletResponse response) throws IOException {
+        pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+        List<IotAccidentReportDO> list = iotAccidentReportService.getIotAccidentReportPage(pageReqVO).getList();
+        // 导出 Excel
+        ExcelUtils.write(response, "QHSE事故上报.xls", "数据", IotAccidentReportRespVO.class,
+                        BeanUtils.toBean(list, IotAccidentReportRespVO.class));
+    }
+
+}

+ 98 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/IotAccidentReportProcessController.java

@@ -0,0 +1,98 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.accident;
+
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportProcessPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportProcessRespVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportProcessSaveReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident.IotAccidentReportProcessDO;
+import cn.iocoder.yudao.module.pms.service.qhse.accident.IotAccidentReportProcessService;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
+
+import java.util.*;
+import java.io.IOException;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+
+import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
+
+
+@Tag(name = "管理后台 - QHSE事故上报过程明细")
+@RestController
+@RequestMapping("/rq/iot-accident-report-process")
+@Validated
+public class IotAccidentReportProcessController {
+
+    @Resource
+    private IotAccidentReportProcessService iotAccidentReportProcessService;
+
+    @PostMapping("/create")
+    @Operation(summary = "创建QHSE事故上报过程明细")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report-process:create')")
+    public CommonResult<Long> createIotAccidentReportProcess(@Valid @RequestBody IotAccidentReportProcessSaveReqVO createReqVO) {
+        return success(iotAccidentReportProcessService.createIotAccidentReportProcess(createReqVO));
+    }
+
+    @PutMapping("/update")
+    @Operation(summary = "更新QHSE事故上报过程明细")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report-process:update')")
+    public CommonResult<Boolean> updateIotAccidentReportProcess(@Valid @RequestBody IotAccidentReportProcessSaveReqVO updateReqVO) {
+        iotAccidentReportProcessService.updateIotAccidentReportProcess(updateReqVO);
+        return success(true);
+    }
+
+    @DeleteMapping("/delete")
+    @Operation(summary = "删除QHSE事故上报过程明细")
+    @Parameter(name = "id", description = "编号", required = true)
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report-process:delete')")
+    public CommonResult<Boolean> deleteIotAccidentReportProcess(@RequestParam("id") Long id) {
+        iotAccidentReportProcessService.deleteIotAccidentReportProcess(id);
+        return success(true);
+    }
+
+    @GetMapping("/get")
+    @Operation(summary = "获得QHSE事故上报过程明细")
+    @Parameter(name = "id", description = "编号", required = true, example = "1024")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report-process:query')")
+    public CommonResult<IotAccidentReportProcessRespVO> getIotAccidentReportProcess(@RequestParam("id") Long id) {
+        IotAccidentReportProcessDO iotAccidentReportProcess = iotAccidentReportProcessService.getIotAccidentReportProcess(id);
+        return success(BeanUtils.toBean(iotAccidentReportProcess, IotAccidentReportProcessRespVO.class));
+    }
+
+    @GetMapping("/page")
+    @Operation(summary = "获得QHSE事故上报过程明细分页")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report-process:query')")
+    public CommonResult<PageResult<IotAccidentReportProcessRespVO>> getIotAccidentReportProcessPage(@Valid IotAccidentReportProcessPageReqVO pageReqVO) {
+        PageResult<IotAccidentReportProcessDO> pageResult = iotAccidentReportProcessService.getIotAccidentReportProcessPage(pageReqVO);
+        return success(BeanUtils.toBean(pageResult, IotAccidentReportProcessRespVO.class));
+    }
+
+    @GetMapping("/export-excel")
+    @Operation(summary = "导出QHSE事故上报过程明细 Excel")
+    @PreAuthorize("@ss.hasPermission('rq:iot-accident-report-process:export')")
+    @ApiAccessLog(operateType = EXPORT)
+    public void exportIotAccidentReportProcessExcel(@Valid IotAccidentReportProcessPageReqVO pageReqVO,
+              HttpServletResponse response) throws IOException {
+        pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+        List<IotAccidentReportProcessDO> list = iotAccidentReportProcessService.getIotAccidentReportProcessPage(pageReqVO).getList();
+        // 导出 Excel
+        ExcelUtils.write(response, "QHSE事故上报过程明细.xls", "数据", IotAccidentReportProcessRespVO.class,
+                        BeanUtils.toBean(list, IotAccidentReportProcessRespVO.class));
+    }
+
+}

+ 72 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportPageReqVO.java

@@ -0,0 +1,72 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - QHSE事故上报分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class IotAccidentReportPageReqVO extends PageParam {
+
+    @Schema(description = "事件事件")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime[] actualTime;
+
+    @Schema(description = "事件级别")
+    private String accidentGrade;
+
+    @Schema(description = "事件类型", example = "2")
+    private String accidentType;
+
+    @Schema(description = "事件地址")
+    private String accidentAddress;
+
+    @Schema(description = "部门id", example = "13049")
+    private Long deptId;
+
+    @Schema(description = "队伍名称", example = "李四")
+    private String deptName;
+
+    @Schema(description = "现场负责人")
+    private String dutyPerson;
+
+    @Schema(description = "事件损失情况")
+    private String lossSituation;
+
+    @Schema(description = "现场采取措施")
+    private String emergencyMeasure;
+
+    @Schema(description = "事件简要经过", example = "随便")
+    private String description;
+
+    @Schema(description = "附件/现场图片")
+    private String pic;
+
+    @Schema(description = "创建时间")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime[] createTime;
+
+    /**
+     * 当前处理人
+     */
+    private Long currentPerson;
+    /**
+     * 流程状态位
+     */
+    private String flowStatus;
+    /**
+     * 事件状态
+     */
+    private String status;
+
+    @Schema(description = "备注", example = "随便")
+    private String remark;
+
+}

+ 39 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportProcessPageReqVO.java

@@ -0,0 +1,39 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - QHSE事故上报过程明细分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class IotAccidentReportProcessPageReqVO extends PageParam {
+
+    private Long accidentId;
+
+    @Schema(description = "操作人")
+    private String operator;
+
+    @Schema(description = "审批状态", example = "2")
+    private String status;
+
+    @Schema(description = "审批建议", example = "随便")
+    private String description;
+
+    @Schema(description = "审批节点", example = "王五")
+    private String nodeName;
+
+    @Schema(description = "创建时间")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime[] createTime;
+
+    @Schema(description = "备注", example = "随便")
+    private String remark;
+
+}

+ 45 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportProcessRespVO.java

@@ -0,0 +1,45 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+import com.alibaba.excel.annotation.*;
+
+@Schema(description = "管理后台 - QHSE事故上报过程明细 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class IotAccidentReportProcessRespVO {
+
+    @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1804")
+    @ExcelProperty("主键id")
+    private Long id;
+
+    private Long accidentId;
+
+    @Schema(description = "操作人")
+    @ExcelProperty("操作人")
+    private String operator;
+
+    @Schema(description = "审批状态", example = "2")
+    @ExcelProperty("审批状态")
+    private String status;
+
+    @Schema(description = "审批建议", example = "随便")
+    @ExcelProperty("审批建议")
+    private String description;
+
+    @Schema(description = "审批节点", example = "王五")
+    @ExcelProperty("审批节点")
+    private String nodeName;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("创建时间")
+    private LocalDateTime createTime;
+
+    @Schema(description = "备注", example = "随便")
+    @ExcelProperty("备注")
+    private String remark;
+
+}

+ 29 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportProcessSaveReqVO.java

@@ -0,0 +1,29 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+
+@Schema(description = "管理后台 - QHSE事故上报过程明细新增/修改 Request VO")
+@Data
+public class IotAccidentReportProcessSaveReqVO {
+
+    @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1804")
+    private Long id;
+
+    @Schema(description = "操作人")
+    private String operator;
+
+    @Schema(description = "审批状态", example = "2")
+    private String status;
+
+    @Schema(description = "审批建议", example = "随便")
+    private String description;
+
+    @Schema(description = "审批节点", example = "王五")
+    private String nodeName;
+
+    @Schema(description = "备注", example = "随便")
+    private String remark;
+
+}

+ 84 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportRespVO.java

@@ -0,0 +1,84 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+import com.alibaba.excel.annotation.*;
+
+@Schema(description = "管理后台 - QHSE事故上报 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class IotAccidentReportRespVO {
+
+    @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "4798")
+    @ExcelProperty("主键id")
+    private Long id;
+
+    @Schema(description = "事件事件", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("事件事件")
+    private LocalDateTime actualTime;
+
+    @Schema(description = "事件级别", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("事件级别")
+    private String accidentGrade;
+
+    @Schema(description = "事件类型", example = "2")
+    @ExcelProperty("事件类型")
+    private String accidentType;
+
+    @Schema(description = "事件地址", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("事件地址")
+    private String accidentAddress;
+
+    @Schema(description = "部门id", example = "13049")
+    @ExcelProperty("部门id")
+    private Long deptId;
+
+    @Schema(description = "队伍名称", example = "李四")
+    @ExcelProperty("队伍名称")
+    private String deptName;
+
+    @Schema(description = "现场负责人")
+    @ExcelProperty("现场负责人")
+    private String dutyPerson;
+
+    @Schema(description = "事件损失情况")
+    @ExcelProperty("事件损失情况")
+    private String lossSituation;
+
+    @Schema(description = "现场采取措施")
+    @ExcelProperty("现场采取措施")
+    private String emergencyMeasure;
+
+    @Schema(description = "事件简要经过", example = "随便")
+    @ExcelProperty("事件简要经过")
+    private String description;
+
+    @Schema(description = "附件/现场图片")
+    @ExcelProperty("附件/现场图片")
+    private String pic;
+
+    @Schema(description = "创建时间")
+    @ExcelProperty("创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 当前处理人
+     */
+    private Long currentPerson;
+    /**
+     * 流程状态位
+     */
+    private String flowStatus;
+    /**
+     * 事件状态
+     */
+    private String status;
+
+    @Schema(description = "备注", example = "随便")
+    @ExcelProperty("备注")
+    private String remark;
+
+}

+ 73 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/qhse/accident/vo/IotAccidentReportSaveReqVO.java

@@ -0,0 +1,73 @@
+package cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.time.LocalDateTime;
+
+@Schema(description = "管理后台 - QHSE事故上报新增/修改 Request VO")
+@Data
+public class IotAccidentReportSaveReqVO {
+
+    @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "4798")
+    private Long id;
+
+    private Long accidentId;
+
+    @Schema(description = "事件事件", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "事件事件不能为空")
+    private LocalDateTime actualTime;
+
+    @Schema(description = "事件级别", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "事件级别不能为空")
+    private String accidentGrade;
+
+    @Schema(description = "事件类型", example = "2")
+    private String accidentType;
+
+    @Schema(description = "事件地址", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotEmpty(message = "事件地址不能为空")
+    private String accidentAddress;
+
+    @Schema(description = "部门id", example = "13049")
+    private Long deptId;
+
+    @Schema(description = "队伍名称", example = "李四")
+    private String deptName;
+
+    @Schema(description = "现场负责人")
+    private String dutyPerson;
+
+    @Schema(description = "事件损失情况")
+    private String lossSituation;
+
+    @Schema(description = "现场采取措施")
+    private String emergencyMeasure;
+
+    @Schema(description = "事件简要经过", example = "随便")
+    private String description;
+
+    @Schema(description = "附件/现场图片")
+    private String pic;
+
+    /**
+     * 当前处理人
+     */
+    private Long currentPerson;
+    /**
+     * 流程状态位
+     */
+    private String flowStatus;
+    /**
+     * 事件状态
+     */
+    private String status;
+
+    @Schema(description = "备注", example = "随便")
+    private String remark;
+
+}

+ 92 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/qhse/accident/IotAccidentReportDO.java

@@ -0,0 +1,92 @@
+package cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident;
+
+import lombok.*;
+import java.util.*;
+import java.time.LocalDateTime;
+import java.time.LocalDateTime;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.*;
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+
+/**
+ * QHSE事故上报 DO
+ *
+ * @author 超级管理员
+ */
+@TableName("rq_iot_accident_report")
+@KeySequence("rq_iot_accident_report_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class IotAccidentReportDO extends BaseDO {
+
+    /**
+     * 主键id
+     */
+    @TableId
+    private Long id;
+    /**
+     * 事件事件
+     */
+    private LocalDateTime actualTime;
+    /**
+     * 事件级别
+     */
+    private String accidentGrade;
+    /**
+     * 事件类型
+     */
+    private String accidentType;
+    /**
+     * 事件地址
+     */
+    private String accidentAddress;
+    /**
+     * 部门id
+     */
+    private Long deptId;
+    /**
+     * 队伍名称
+     */
+    private String deptName;
+    /**
+     * 现场负责人
+     */
+    private String dutyPerson;
+    /**
+     * 事件损失情况
+     */
+    private String lossSituation;
+    /**
+     * 现场采取措施
+     */
+    private String emergencyMeasure;
+    /**
+     * 事件简要经过
+     */
+    private String description;
+    /**
+     * 附件/现场图片
+     */
+    private String pic;
+    /**
+     * 当前处理人
+     */
+    private Long currentPerson;
+    /**
+     * 流程状态位
+     */
+    private String flowStatus;
+    /**
+     * 事件状态
+     */
+    private String status;
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 52 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/dataobject/qhse/accident/IotAccidentReportProcessDO.java

@@ -0,0 +1,52 @@
+package cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident;
+
+import lombok.*;
+import java.util.*;
+import java.time.LocalDateTime;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.*;
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+
+/**
+ * QHSE事故上报过程明细 DO
+ *
+ * @author 超级管理员
+ */
+@TableName("rq_iot_accident_report_process")
+@KeySequence("rq_iot_accident_report_process_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class IotAccidentReportProcessDO extends BaseDO {
+
+    /**
+     * 主键id
+     */
+    @TableId
+    private Long id;
+    private Long accidentId;
+    /**
+     * 操作人
+     */
+    private String operator;
+    /**
+     * 审批状态
+     */
+    private String status;
+    /**
+     * 审批建议
+     */
+    private String description;
+    /**
+     * 审批节点
+     */
+    private String nodeName;
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 38 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/qhse/accident/IotAccidentReportMapper.java

@@ -0,0 +1,38 @@
+package cn.iocoder.yudao.module.pms.dal.mysql.qhse.accident;
+
+import java.util.*;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportPageReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident.IotAccidentReportDO;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * QHSE事故上报 Mapper
+ *
+ * @author 超级管理员
+ */
+@Mapper
+public interface IotAccidentReportMapper extends BaseMapperX<IotAccidentReportDO> {
+
+    default PageResult<IotAccidentReportDO> selectPage(IotAccidentReportPageReqVO reqVO) {
+        return selectPage(reqVO, new LambdaQueryWrapperX<IotAccidentReportDO>()
+                .betweenIfPresent(IotAccidentReportDO::getActualTime, reqVO.getActualTime())
+                .eqIfPresent(IotAccidentReportDO::getAccidentGrade, reqVO.getAccidentGrade())
+                .eqIfPresent(IotAccidentReportDO::getAccidentType, reqVO.getAccidentType())
+                .eqIfPresent(IotAccidentReportDO::getAccidentAddress, reqVO.getAccidentAddress())
+                .eqIfPresent(IotAccidentReportDO::getDeptId, reqVO.getDeptId())
+                .likeIfPresent(IotAccidentReportDO::getDeptName, reqVO.getDeptName())
+                .eqIfPresent(IotAccidentReportDO::getDutyPerson, reqVO.getDutyPerson())
+                .eqIfPresent(IotAccidentReportDO::getLossSituation, reqVO.getLossSituation())
+                .eqIfPresent(IotAccidentReportDO::getEmergencyMeasure, reqVO.getEmergencyMeasure())
+                .eqIfPresent(IotAccidentReportDO::getDescription, reqVO.getDescription())
+                .eqIfPresent(IotAccidentReportDO::getPic, reqVO.getPic())
+                .betweenIfPresent(IotAccidentReportDO::getCreateTime, reqVO.getCreateTime())
+                .eqIfPresent(IotAccidentReportDO::getRemark, reqVO.getRemark())
+                .orderByDesc(IotAccidentReportDO::getId));
+    }
+
+}

+ 31 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/qhse/accident/IotAccidentReportProcessMapper.java

@@ -0,0 +1,31 @@
+package cn.iocoder.yudao.module.pms.dal.mysql.qhse.accident;
+
+import java.util.*;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportProcessPageReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident.IotAccidentReportProcessDO;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * QHSE事故上报过程明细 Mapper
+ *
+ * @author 超级管理员
+ */
+@Mapper
+public interface IotAccidentReportProcessMapper extends BaseMapperX<IotAccidentReportProcessDO> {
+
+    default PageResult<IotAccidentReportProcessDO> selectPage(IotAccidentReportProcessPageReqVO reqVO) {
+        return selectPage(reqVO, new LambdaQueryWrapperX<IotAccidentReportProcessDO>()
+                .eqIfPresent(IotAccidentReportProcessDO::getOperator, reqVO.getOperator())
+                .eqIfPresent(IotAccidentReportProcessDO::getStatus, reqVO.getStatus())
+                .eqIfPresent(IotAccidentReportProcessDO::getDescription, reqVO.getDescription())
+                .likeIfPresent(IotAccidentReportProcessDO::getNodeName, reqVO.getNodeName())
+                .betweenIfPresent(IotAccidentReportProcessDO::getCreateTime, reqVO.getCreateTime())
+                .eqIfPresent(IotAccidentReportProcessDO::getRemark, reqVO.getRemark())
+                .orderByDesc(IotAccidentReportProcessDO::getId));
+    }
+
+}

+ 57 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/accident/IotAccidentReportProcessService.java

@@ -0,0 +1,57 @@
+package cn.iocoder.yudao.module.pms.service.qhse.accident;
+
+import java.util.*;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportProcessPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportProcessSaveReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident.IotAccidentReportProcessDO;
+
+import javax.validation.Valid;
+
+/**
+ * QHSE事故上报过程明细 Service 接口
+ *
+ * @author 超级管理员
+ */
+public interface IotAccidentReportProcessService {
+
+    /**
+     * 创建QHSE事故上报过程明细
+     *
+     * @param createReqVO 创建信息
+     * @return 编号
+     */
+    Long createIotAccidentReportProcess(@Valid IotAccidentReportProcessSaveReqVO createReqVO);
+
+    /**
+     * 更新QHSE事故上报过程明细
+     *
+     * @param updateReqVO 更新信息
+     */
+    void updateIotAccidentReportProcess(@Valid IotAccidentReportProcessSaveReqVO updateReqVO);
+
+    /**
+     * 删除QHSE事故上报过程明细
+     *
+     * @param id 编号
+     */
+    void deleteIotAccidentReportProcess(Long id);
+
+    /**
+     * 获得QHSE事故上报过程明细
+     *
+     * @param id 编号
+     * @return QHSE事故上报过程明细
+     */
+    IotAccidentReportProcessDO getIotAccidentReportProcess(Long id);
+
+    /**
+     * 获得QHSE事故上报过程明细分页
+     *
+     * @param pageReqVO 分页查询
+     * @return QHSE事故上报过程明细分页
+     */
+    PageResult<IotAccidentReportProcessDO> getIotAccidentReportProcessPage(IotAccidentReportProcessPageReqVO pageReqVO);
+
+}

+ 76 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/accident/IotAccidentReportProcessServiceImpl.java

@@ -0,0 +1,76 @@
+package cn.iocoder.yudao.module.pms.service.qhse.accident;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportProcessPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportProcessSaveReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident.IotAccidentReportProcessDO;
+import cn.iocoder.yudao.module.pms.dal.mysql.qhse.accident.IotAccidentReportProcessMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+
+
+import javax.annotation.Resource;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+
+/**
+ * QHSE事故上报过程明细 Service 实现类
+ *
+ * @author 超级管理员
+ */
+@Service
+@Validated
+public class IotAccidentReportProcessServiceImpl implements IotAccidentReportProcessService {
+
+    @Resource
+    private IotAccidentReportProcessMapper iotAccidentReportProcessMapper;
+
+    @Override
+    public Long createIotAccidentReportProcess(IotAccidentReportProcessSaveReqVO createReqVO) {
+        // 插入
+        IotAccidentReportProcessDO iotAccidentReportProcess = BeanUtils.toBean(createReqVO, IotAccidentReportProcessDO.class);
+        iotAccidentReportProcessMapper.insert(iotAccidentReportProcess);
+        // 返回
+        return iotAccidentReportProcess.getId();
+    }
+
+    @Override
+    public void updateIotAccidentReportProcess(IotAccidentReportProcessSaveReqVO updateReqVO) {
+        // 校验存在
+        validateIotAccidentReportProcessExists(updateReqVO.getId());
+        // 更新
+        IotAccidentReportProcessDO updateObj = BeanUtils.toBean(updateReqVO, IotAccidentReportProcessDO.class);
+        iotAccidentReportProcessMapper.updateById(updateObj);
+    }
+
+    @Override
+    public void deleteIotAccidentReportProcess(Long id) {
+        // 校验存在
+        validateIotAccidentReportProcessExists(id);
+        // 删除
+        iotAccidentReportProcessMapper.deleteById(id);
+    }
+
+    private void validateIotAccidentReportProcessExists(Long id) {
+        if (iotAccidentReportProcessMapper.selectById(id) == null) {
+            throw exception(new ErrorCode(22,"不存在"));
+        }
+    }
+
+    @Override
+    public IotAccidentReportProcessDO getIotAccidentReportProcess(Long id) {
+        return iotAccidentReportProcessMapper.selectById(id);
+    }
+
+    @Override
+    public PageResult<IotAccidentReportProcessDO> getIotAccidentReportProcessPage(IotAccidentReportProcessPageReqVO pageReqVO) {
+        return iotAccidentReportProcessMapper.selectPage(pageReqVO);
+    }
+
+}

+ 57 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/accident/IotAccidentReportService.java

@@ -0,0 +1,57 @@
+package cn.iocoder.yudao.module.pms.service.qhse.accident;
+
+import java.util.*;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportSaveReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident.IotAccidentReportDO;
+
+import javax.validation.Valid;
+
+/**
+ * QHSE事故上报 Service 接口
+ *
+ * @author 超级管理员
+ */
+public interface IotAccidentReportService {
+
+    /**
+     * 创建QHSE事故上报
+     *
+     * @param createReqVO 创建信息
+     * @return 编号
+     */
+    Long createIotAccidentReport(@Valid IotAccidentReportSaveReqVO createReqVO);
+
+    /**
+     * 更新QHSE事故上报
+     *
+     * @param updateReqVO 更新信息
+     */
+    void updateIotAccidentReport(@Valid IotAccidentReportSaveReqVO updateReqVO);
+
+    /**
+     * 删除QHSE事故上报
+     *
+     * @param id 编号
+     */
+    void deleteIotAccidentReport(Long id);
+
+    /**
+     * 获得QHSE事故上报
+     *
+     * @param id 编号
+     * @return QHSE事故上报
+     */
+    IotAccidentReportDO getIotAccidentReport(Long id);
+
+    /**
+     * 获得QHSE事故上报分页
+     *
+     * @param pageReqVO 分页查询
+     * @return QHSE事故上报分页
+     */
+    PageResult<IotAccidentReportDO> getIotAccidentReportPage(IotAccidentReportPageReqVO pageReqVO);
+
+}

+ 126 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/qhse/accident/IotAccidentReportServiceImpl.java

@@ -0,0 +1,126 @@
+package cn.iocoder.yudao.module.pms.service.qhse.accident;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+import cn.iocoder.yudao.framework.common.exception.ServiceException;
+import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportPageReqVO;
+import cn.iocoder.yudao.module.pms.controller.admin.qhse.accident.vo.IotAccidentReportSaveReqVO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident.IotAccidentReportDO;
+import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.accident.IotAccidentReportProcessDO;
+import cn.iocoder.yudao.module.pms.dal.mysql.qhse.accident.IotAccidentReportMapper;
+import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+import cn.iocoder.yudao.module.system.api.permission.RoleApi;
+import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
+import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.time.LocalDateTime;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+
+
+import javax.annotation.Resource;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+
+/**
+ * QHSE事故上报 Service 实现类
+ *
+ * @author 超级管理员
+ */
+@Service
+@Validated
+public class IotAccidentReportServiceImpl implements IotAccidentReportService {
+
+    @Resource
+    private IotAccidentReportMapper iotAccidentReportMapper;
+    @Autowired
+    private DeptApi deptApi;
+    @Autowired
+    private AdminUserApi adminUserApi;
+    @Autowired
+    private RoleApi roleApi;
+
+    @Override
+    public Long createIotAccidentReport(IotAccidentReportSaveReqVO createReqVO) {
+        // 插入
+        IotAccidentReportDO iotAccidentReport = BeanUtils.toBean(createReqVO, IotAccidentReportDO.class);
+        Long loginUserDeptId = SecurityFrameworkUtils.getLoginUserDeptId();
+        iotAccidentReport.setDeptId(loginUserDeptId);
+        DeptRespDTO dept = deptApi.getDept(loginUserDeptId);
+        if (Objects.nonNull(dept)){
+            iotAccidentReport.setDeptName(dept.getName());
+        }
+        //设置状态为上报中
+        iotAccidentReport.setStatus("reporting");
+        //查找上一级的项目主管
+        iotAccidentReport.setDeleted(false);
+        iotAccidentReport.setFlowStatus("2");
+        //获取当前部门的上一级部门也就是项目部的项目经理
+        Long parentId = dept.getParentId();
+        List<AdminUserRespDTO> parentDeptUsers = adminUserApi.getUserListByDeptIdsNew(Collections.singleton(parentId));
+        List<Long> projectUserIds = roleApi.getRoleUserIds("项目经理");
+        Set<Long> currentUserIds = parentDeptUsers.stream().map(AdminUserRespDTO::getId)
+                .filter(projectUserIds::contains)
+                .collect(Collectors.toSet());
+        if (CollUtil.isEmpty(currentUserIds)){
+            throw new ServiceException(new ErrorCode(22,"未找到项目经理,无法完成事故上报"));
+        }
+        iotAccidentReport.setCurrentPerson(currentUserIds.stream().findFirst().get());
+        iotAccidentReportMapper.insert(iotAccidentReport);
+        //插入流程明细表
+        IotAccidentReportProcessDO processDO = new IotAccidentReportProcessDO();
+        processDO.setAccidentId(iotAccidentReport.getId());
+        String loginUserNickname = SecurityFrameworkUtils.getLoginUserNickname();
+        processDO.setOperator(loginUserNickname);
+        processDO.setDescription("发起事故事件上报");
+        processDO.setNodeName("发起人");
+        processDO.setCreateTime(LocalDateTime.now());
+        processDO.setStatus("提交上报");
+        // 返回
+        return iotAccidentReport.getId();
+    }
+
+    @Override
+    public void updateIotAccidentReport(IotAccidentReportSaveReqVO updateReqVO) {
+        // 校验存在
+        validateIotAccidentReportExists(updateReqVO.getId());
+        // 更新
+        IotAccidentReportDO updateObj = BeanUtils.toBean(updateReqVO, IotAccidentReportDO.class);
+        iotAccidentReportMapper.updateById(updateObj);
+    }
+
+    @Override
+    public void deleteIotAccidentReport(Long id) {
+        // 校验存在
+        validateIotAccidentReportExists(id);
+        // 删除
+        iotAccidentReportMapper.deleteById(id);
+    }
+
+    private void validateIotAccidentReportExists(Long id) {
+        if (iotAccidentReportMapper.selectById(id) == null) {
+            throw exception(new ErrorCode(11,"不存在"));
+        }
+    }
+
+    @Override
+    public IotAccidentReportDO getIotAccidentReport(Long id) {
+        return iotAccidentReportMapper.selectById(id);
+    }
+
+    @Override
+    public PageResult<IotAccidentReportDO> getIotAccidentReportPage(IotAccidentReportPageReqVO pageReqVO) {
+        return iotAccidentReportMapper.selectPage(pageReqVO);
+    }
+
+}