Procházet zdrojové kódy

add 应急预案和故障上报base source

459242451@qq.com před 3 roky
rodič
revize
2beb2e4a3b

+ 91 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/qdtl/TlIncidentFaultController.java

@@ -0,0 +1,91 @@
+package com.ruoyi.web.controller.qdtl;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.qdtl.domain.TlIncidentFault;
+import com.ruoyi.qdtl.service.ITlIncidentFaultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 应急故障事件管理Controller
+ *
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+@RestController
+@RequestMapping("/qdtl/fault")
+public class TlIncidentFaultController extends BaseController {
+    @Autowired
+    private ITlIncidentFaultService tlIncidentFaultService;
+
+    /**
+     * 查询应急故障事件管理列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(TlIncidentFault tlIncidentFault) {
+        startPage();
+        List<TlIncidentFault> list = tlIncidentFaultService.selectTlIncidentFaultList(tlIncidentFault);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出应急故障事件管理列表
+     */
+    @Log(title = "应急故障事件管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TlIncidentFault tlIncidentFault) {
+        List<TlIncidentFault> list = tlIncidentFaultService.selectTlIncidentFaultList(tlIncidentFault);
+        ExcelUtil<TlIncidentFault> util = new ExcelUtil<TlIncidentFault>(TlIncidentFault.class);
+        util.exportExcel(response, list, "应急故障事件管理数据");
+    }
+
+    /**
+     * 获取应急故障事件管理详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(tlIncidentFaultService.selectTlIncidentFaultById(id));
+    }
+
+    /**
+     * 新增应急故障事件管理
+     */
+    @Log(title = "应急故障事件管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TlIncidentFault tlIncidentFault) {
+        return toAjax(tlIncidentFaultService.insertTlIncidentFault(tlIncidentFault));
+    }
+
+    /**
+     * 修改应急故障事件管理
+     */
+    @Log(title = "应急故障事件管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TlIncidentFault tlIncidentFault) {
+        return toAjax(tlIncidentFaultService.updateTlIncidentFault(tlIncidentFault));
+    }
+
+    /**
+     * 删除应急故障事件管理
+     */
+    @Log(title = "应急故障事件管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(tlIncidentFaultService.deleteTlIncidentFaultByIds(ids));
+    }
+}

+ 91 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/qdtl/TlPlanController.java

@@ -0,0 +1,91 @@
+package com.ruoyi.web.controller.qdtl;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.qdtl.domain.TlPlan;
+import com.ruoyi.qdtl.service.ITlPlanService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 应急预案管理Controller
+ *
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+@RestController
+@RequestMapping("/qdtl/plan")
+public class TlPlanController extends BaseController {
+    @Autowired
+    private ITlPlanService tlPlanService;
+
+    /**
+     * 查询应急预案管理列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(TlPlan tlPlan) {
+        startPage();
+        List<TlPlan> list = tlPlanService.selectTlPlanList(tlPlan);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出应急预案管理列表
+     */
+    @Log(title = "应急预案管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TlPlan tlPlan) {
+        List<TlPlan> list = tlPlanService.selectTlPlanList(tlPlan);
+        ExcelUtil<TlPlan> util = new ExcelUtil<TlPlan>(TlPlan.class);
+        util.exportExcel(response, list, "应急预案管理数据");
+    }
+
+    /**
+     * 获取应急预案管理详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(tlPlanService.selectTlPlanById(id));
+    }
+
+    /**
+     * 新增应急预案管理
+     */
+    @Log(title = "应急预案管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TlPlan tlPlan) {
+        return toAjax(tlPlanService.insertTlPlan(tlPlan));
+    }
+
+    /**
+     * 修改应急预案管理
+     */
+    @Log(title = "应急预案管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TlPlan tlPlan) {
+        return toAjax(tlPlanService.updateTlPlan(tlPlan));
+    }
+
+    /**
+     * 删除应急预案管理
+     */
+    @Log(title = "应急预案管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(tlPlanService.deleteTlPlanByIds(ids));
+    }
+}

+ 226 - 0
ruoyi-system/src/main/java/com/ruoyi/qdtl/domain/TlIncidentFault.java

@@ -0,0 +1,226 @@
+package com.ruoyi.qdtl.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 应急故障事件管理对象 tl_incident_fault
+ * 
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+public class TlIncidentFault extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 事件名称 */
+    @Excel(name = "事件名称")
+    private String name;
+
+    /** 事件内容 */
+    @Excel(name = "事件内容")
+    private String detail;
+
+    /** 事件等级 */
+    @Excel(name = "事件等级")
+    private String incLevel;
+
+    /** 事件类型 */
+    @Excel(name = "事件类型")
+    private String incType;
+
+    /** 上报人 */
+    @Excel(name = "上报人")
+    private String uploadUser;
+
+    /** 上报时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date happenTime;
+
+    /** 图片 */
+    @Excel(name = "图片")
+    private String pics;
+
+    /** 区域 */
+    @Excel(name = "区域")
+    private String area;
+
+    /** 我的位置 */
+    @Excel(name = "我的位置")
+    private String address;
+
+    /** 预案id */
+    @Excel(name = "预案id")
+    private String planId;
+
+    /** 接收人 */
+    @Excel(name = "接收人")
+    private String acceptUser;
+
+    /** 接收人姓名 */
+    @Excel(name = "接收人姓名")
+    private String acceptUserName;
+
+    /** 当前状态 */
+    @Excel(name = "当前状态")
+    private String status;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setDetail(String detail) 
+    {
+        this.detail = detail;
+    }
+
+    public String getDetail() 
+    {
+        return detail;
+    }
+    public void setIncLevel(String incLevel) 
+    {
+        this.incLevel = incLevel;
+    }
+
+    public String getIncLevel() 
+    {
+        return incLevel;
+    }
+    public void setIncType(String incType) 
+    {
+        this.incType = incType;
+    }
+
+    public String getIncType() 
+    {
+        return incType;
+    }
+    public void setUploadUser(String uploadUser) 
+    {
+        this.uploadUser = uploadUser;
+    }
+
+    public String getUploadUser() 
+    {
+        return uploadUser;
+    }
+    public void setHappenTime(Date happenTime) 
+    {
+        this.happenTime = happenTime;
+    }
+
+    public Date getHappenTime() 
+    {
+        return happenTime;
+    }
+    public void setPics(String pics) 
+    {
+        this.pics = pics;
+    }
+
+    public String getPics() 
+    {
+        return pics;
+    }
+    public void setArea(String area) 
+    {
+        this.area = area;
+    }
+
+    public String getArea() 
+    {
+        return area;
+    }
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+    public void setPlanId(String planId) 
+    {
+        this.planId = planId;
+    }
+
+    public String getPlanId() 
+    {
+        return planId;
+    }
+    public void setAcceptUser(String acceptUser) 
+    {
+        this.acceptUser = acceptUser;
+    }
+
+    public String getAcceptUser() 
+    {
+        return acceptUser;
+    }
+    public void setAcceptUserName(String acceptUserName) 
+    {
+        this.acceptUserName = acceptUserName;
+    }
+
+    public String getAcceptUserName() 
+    {
+        return acceptUserName;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("detail", getDetail())
+            .append("incLevel", getIncLevel())
+            .append("incType", getIncType())
+            .append("uploadUser", getUploadUser())
+            .append("happenTime", getHappenTime())
+            .append("pics", getPics())
+            .append("area", getArea())
+            .append("address", getAddress())
+            .append("planId", getPlanId())
+            .append("acceptUser", getAcceptUser())
+            .append("acceptUserName", getAcceptUserName())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("status", getStatus())
+            .toString();
+    }
+}

+ 140 - 0
ruoyi-system/src/main/java/com/ruoyi/qdtl/domain/TlPlan.java

@@ -0,0 +1,140 @@
+package com.ruoyi.qdtl.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 应急预案管理对象 tl_plan
+ * 
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+public class TlPlan extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 预案编号 */
+    @Excel(name = "预案编号")
+    private String planNo;
+
+    /** 预案名称 */
+    @Excel(name = "预案名称")
+    private String planName;
+
+    /** 预案类型 */
+    @Excel(name = "预案类型")
+    private String planType;
+
+    /** 预案状态。0-禁用;1-启用 */
+    @Excel(name = "预案状态。0-禁用;1-启用")
+    private String status;
+
+    /** 主要负责人 */
+    @Excel(name = "主要负责人")
+    private String majorUser;
+
+    /** 相关负责人 */
+    @Excel(name = "相关负责人")
+    private String minorUser;
+
+    /** 相关附件 */
+    @Excel(name = "相关附件")
+    private String files;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setPlanNo(String planNo) 
+    {
+        this.planNo = planNo;
+    }
+
+    public String getPlanNo() 
+    {
+        return planNo;
+    }
+    public void setPlanName(String planName) 
+    {
+        this.planName = planName;
+    }
+
+    public String getPlanName() 
+    {
+        return planName;
+    }
+    public void setPlanType(String planType) 
+    {
+        this.planType = planType;
+    }
+
+    public String getPlanType() 
+    {
+        return planType;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setMajorUser(String majorUser) 
+    {
+        this.majorUser = majorUser;
+    }
+
+    public String getMajorUser() 
+    {
+        return majorUser;
+    }
+    public void setMinorUser(String minorUser) 
+    {
+        this.minorUser = minorUser;
+    }
+
+    public String getMinorUser() 
+    {
+        return minorUser;
+    }
+    public void setFiles(String files) 
+    {
+        this.files = files;
+    }
+
+    public String getFiles() 
+    {
+        return files;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("planNo", getPlanNo())
+            .append("planName", getPlanName())
+            .append("planType", getPlanType())
+            .append("status", getStatus())
+            .append("majorUser", getMajorUser())
+            .append("minorUser", getMinorUser())
+            .append("files", getFiles())
+            .append("remark", getRemark())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/qdtl/mapper/TlIncidentFaultMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.qdtl.mapper;
+
+import java.util.List;
+import com.ruoyi.qdtl.domain.TlIncidentFault;
+
+/**
+ * 应急故障事件管理Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+public interface TlIncidentFaultMapper 
+{
+    /**
+     * 查询应急故障事件管理
+     * 
+     * @param id 应急故障事件管理主键
+     * @return 应急故障事件管理
+     */
+    public TlIncidentFault selectTlIncidentFaultById(Long id);
+
+    /**
+     * 查询应急故障事件管理列表
+     * 
+     * @param tlIncidentFault 应急故障事件管理
+     * @return 应急故障事件管理集合
+     */
+    public List<TlIncidentFault> selectTlIncidentFaultList(TlIncidentFault tlIncidentFault);
+
+    /**
+     * 新增应急故障事件管理
+     * 
+     * @param tlIncidentFault 应急故障事件管理
+     * @return 结果
+     */
+    public int insertTlIncidentFault(TlIncidentFault tlIncidentFault);
+
+    /**
+     * 修改应急故障事件管理
+     * 
+     * @param tlIncidentFault 应急故障事件管理
+     * @return 结果
+     */
+    public int updateTlIncidentFault(TlIncidentFault tlIncidentFault);
+
+    /**
+     * 删除应急故障事件管理
+     * 
+     * @param id 应急故障事件管理主键
+     * @return 结果
+     */
+    public int deleteTlIncidentFaultById(Long id);
+
+    /**
+     * 批量删除应急故障事件管理
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTlIncidentFaultByIds(Long[] ids);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/qdtl/mapper/TlPlanMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.qdtl.mapper;
+
+import java.util.List;
+import com.ruoyi.qdtl.domain.TlPlan;
+
+/**
+ * 应急预案管理Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+public interface TlPlanMapper 
+{
+    /**
+     * 查询应急预案管理
+     * 
+     * @param id 应急预案管理主键
+     * @return 应急预案管理
+     */
+    public TlPlan selectTlPlanById(Long id);
+
+    /**
+     * 查询应急预案管理列表
+     * 
+     * @param tlPlan 应急预案管理
+     * @return 应急预案管理集合
+     */
+    public List<TlPlan> selectTlPlanList(TlPlan tlPlan);
+
+    /**
+     * 新增应急预案管理
+     * 
+     * @param tlPlan 应急预案管理
+     * @return 结果
+     */
+    public int insertTlPlan(TlPlan tlPlan);
+
+    /**
+     * 修改应急预案管理
+     * 
+     * @param tlPlan 应急预案管理
+     * @return 结果
+     */
+    public int updateTlPlan(TlPlan tlPlan);
+
+    /**
+     * 删除应急预案管理
+     * 
+     * @param id 应急预案管理主键
+     * @return 结果
+     */
+    public int deleteTlPlanById(Long id);
+
+    /**
+     * 批量删除应急预案管理
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTlPlanByIds(Long[] ids);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/qdtl/service/ITlIncidentFaultService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.qdtl.service;
+
+import java.util.List;
+import com.ruoyi.qdtl.domain.TlIncidentFault;
+
+/**
+ * 应急故障事件管理Service接口
+ * 
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+public interface ITlIncidentFaultService 
+{
+    /**
+     * 查询应急故障事件管理
+     * 
+     * @param id 应急故障事件管理主键
+     * @return 应急故障事件管理
+     */
+    public TlIncidentFault selectTlIncidentFaultById(Long id);
+
+    /**
+     * 查询应急故障事件管理列表
+     * 
+     * @param tlIncidentFault 应急故障事件管理
+     * @return 应急故障事件管理集合
+     */
+    public List<TlIncidentFault> selectTlIncidentFaultList(TlIncidentFault tlIncidentFault);
+
+    /**
+     * 新增应急故障事件管理
+     * 
+     * @param tlIncidentFault 应急故障事件管理
+     * @return 结果
+     */
+    public int insertTlIncidentFault(TlIncidentFault tlIncidentFault);
+
+    /**
+     * 修改应急故障事件管理
+     * 
+     * @param tlIncidentFault 应急故障事件管理
+     * @return 结果
+     */
+    public int updateTlIncidentFault(TlIncidentFault tlIncidentFault);
+
+    /**
+     * 批量删除应急故障事件管理
+     * 
+     * @param ids 需要删除的应急故障事件管理主键集合
+     * @return 结果
+     */
+    public int deleteTlIncidentFaultByIds(Long[] ids);
+
+    /**
+     * 删除应急故障事件管理信息
+     * 
+     * @param id 应急故障事件管理主键
+     * @return 结果
+     */
+    public int deleteTlIncidentFaultById(Long id);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/qdtl/service/ITlPlanService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.qdtl.service;
+
+import java.util.List;
+import com.ruoyi.qdtl.domain.TlPlan;
+
+/**
+ * 应急预案管理Service接口
+ * 
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+public interface ITlPlanService 
+{
+    /**
+     * 查询应急预案管理
+     * 
+     * @param id 应急预案管理主键
+     * @return 应急预案管理
+     */
+    public TlPlan selectTlPlanById(Long id);
+
+    /**
+     * 查询应急预案管理列表
+     * 
+     * @param tlPlan 应急预案管理
+     * @return 应急预案管理集合
+     */
+    public List<TlPlan> selectTlPlanList(TlPlan tlPlan);
+
+    /**
+     * 新增应急预案管理
+     * 
+     * @param tlPlan 应急预案管理
+     * @return 结果
+     */
+    public int insertTlPlan(TlPlan tlPlan);
+
+    /**
+     * 修改应急预案管理
+     * 
+     * @param tlPlan 应急预案管理
+     * @return 结果
+     */
+    public int updateTlPlan(TlPlan tlPlan);
+
+    /**
+     * 批量删除应急预案管理
+     * 
+     * @param ids 需要删除的应急预案管理主键集合
+     * @return 结果
+     */
+    public int deleteTlPlanByIds(Long[] ids);
+
+    /**
+     * 删除应急预案管理信息
+     * 
+     * @param id 应急预案管理主键
+     * @return 结果
+     */
+    public int deleteTlPlanById(Long id);
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/qdtl/service/impl/TlIncidentFaultServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.qdtl.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.qdtl.mapper.TlIncidentFaultMapper;
+import com.ruoyi.qdtl.domain.TlIncidentFault;
+import com.ruoyi.qdtl.service.ITlIncidentFaultService;
+
+/**
+ * 应急故障事件管理Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+@Service
+public class TlIncidentFaultServiceImpl implements ITlIncidentFaultService 
+{
+    @Autowired
+    private TlIncidentFaultMapper tlIncidentFaultMapper;
+
+    /**
+     * 查询应急故障事件管理
+     * 
+     * @param id 应急故障事件管理主键
+     * @return 应急故障事件管理
+     */
+    @Override
+    public TlIncidentFault selectTlIncidentFaultById(Long id)
+    {
+        return tlIncidentFaultMapper.selectTlIncidentFaultById(id);
+    }
+
+    /**
+     * 查询应急故障事件管理列表
+     * 
+     * @param tlIncidentFault 应急故障事件管理
+     * @return 应急故障事件管理
+     */
+    @Override
+    public List<TlIncidentFault> selectTlIncidentFaultList(TlIncidentFault tlIncidentFault)
+    {
+        return tlIncidentFaultMapper.selectTlIncidentFaultList(tlIncidentFault);
+    }
+
+    /**
+     * 新增应急故障事件管理
+     * 
+     * @param tlIncidentFault 应急故障事件管理
+     * @return 结果
+     */
+    @Override
+    public int insertTlIncidentFault(TlIncidentFault tlIncidentFault)
+    {
+        tlIncidentFault.setCreateTime(DateUtils.getNowDate());
+        return tlIncidentFaultMapper.insertTlIncidentFault(tlIncidentFault);
+    }
+
+    /**
+     * 修改应急故障事件管理
+     * 
+     * @param tlIncidentFault 应急故障事件管理
+     * @return 结果
+     */
+    @Override
+    public int updateTlIncidentFault(TlIncidentFault tlIncidentFault)
+    {
+        tlIncidentFault.setUpdateTime(DateUtils.getNowDate());
+        return tlIncidentFaultMapper.updateTlIncidentFault(tlIncidentFault);
+    }
+
+    /**
+     * 批量删除应急故障事件管理
+     * 
+     * @param ids 需要删除的应急故障事件管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTlIncidentFaultByIds(Long[] ids)
+    {
+        return tlIncidentFaultMapper.deleteTlIncidentFaultByIds(ids);
+    }
+
+    /**
+     * 删除应急故障事件管理信息
+     * 
+     * @param id 应急故障事件管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTlIncidentFaultById(Long id)
+    {
+        return tlIncidentFaultMapper.deleteTlIncidentFaultById(id);
+    }
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/qdtl/service/impl/TlPlanServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.qdtl.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.qdtl.mapper.TlPlanMapper;
+import com.ruoyi.qdtl.domain.TlPlan;
+import com.ruoyi.qdtl.service.ITlPlanService;
+
+/**
+ * 应急预案管理Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2022-08-09
+ */
+@Service
+public class TlPlanServiceImpl implements ITlPlanService 
+{
+    @Autowired
+    private TlPlanMapper tlPlanMapper;
+
+    /**
+     * 查询应急预案管理
+     * 
+     * @param id 应急预案管理主键
+     * @return 应急预案管理
+     */
+    @Override
+    public TlPlan selectTlPlanById(Long id)
+    {
+        return tlPlanMapper.selectTlPlanById(id);
+    }
+
+    /**
+     * 查询应急预案管理列表
+     * 
+     * @param tlPlan 应急预案管理
+     * @return 应急预案管理
+     */
+    @Override
+    public List<TlPlan> selectTlPlanList(TlPlan tlPlan)
+    {
+        return tlPlanMapper.selectTlPlanList(tlPlan);
+    }
+
+    /**
+     * 新增应急预案管理
+     * 
+     * @param tlPlan 应急预案管理
+     * @return 结果
+     */
+    @Override
+    public int insertTlPlan(TlPlan tlPlan)
+    {
+        tlPlan.setCreateTime(DateUtils.getNowDate());
+        return tlPlanMapper.insertTlPlan(tlPlan);
+    }
+
+    /**
+     * 修改应急预案管理
+     * 
+     * @param tlPlan 应急预案管理
+     * @return 结果
+     */
+    @Override
+    public int updateTlPlan(TlPlan tlPlan)
+    {
+        tlPlan.setUpdateTime(DateUtils.getNowDate());
+        return tlPlanMapper.updateTlPlan(tlPlan);
+    }
+
+    /**
+     * 批量删除应急预案管理
+     * 
+     * @param ids 需要删除的应急预案管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTlPlanByIds(Long[] ids)
+    {
+        return tlPlanMapper.deleteTlPlanByIds(ids);
+    }
+
+    /**
+     * 删除应急预案管理信息
+     * 
+     * @param id 应急预案管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTlPlanById(Long id)
+    {
+        return tlPlanMapper.deleteTlPlanById(id);
+    }
+}

+ 132 - 0
ruoyi-system/src/main/resources/mapper/qdtl/TlIncidentFaultMapper.xml

@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.qdtl.mapper.TlIncidentFaultMapper">
+    
+    <resultMap type="TlIncidentFault" id="TlIncidentFaultResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="detail"    column="detail"    />
+        <result property="incLevel"    column="inc_level"    />
+        <result property="incType"    column="inc_type"    />
+        <result property="uploadUser"    column="upload_user"    />
+        <result property="happenTime"    column="happen_time"    />
+        <result property="pics"    column="pics"    />
+        <result property="area"    column="area"    />
+        <result property="address"    column="address"    />
+        <result property="planId"    column="plan_id"    />
+        <result property="acceptUser"    column="accept_user"    />
+        <result property="acceptUserName"    column="accept_user_name"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectTlIncidentFaultVo">
+        select id, name, detail, inc_level, inc_type, upload_user, happen_time, pics, area, address, plan_id, accept_user, accept_user_name, create_by, create_time, update_by, update_time, status from tl_incident_fault
+    </sql>
+
+    <select id="selectTlIncidentFaultList" parameterType="TlIncidentFault" resultMap="TlIncidentFaultResult">
+        <include refid="selectTlIncidentFaultVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="detail != null  and detail != ''"> and detail = #{detail}</if>
+            <if test="incLevel != null  and incLevel != ''"> and inc_level = #{incLevel}</if>
+            <if test="incType != null  and incType != ''"> and inc_type = #{incType}</if>
+            <if test="uploadUser != null  and uploadUser != ''"> and upload_user = #{uploadUser}</if>
+            <if test="happenTime != null "> and happen_time = #{happenTime}</if>
+            <if test="pics != null  and pics != ''"> and pics = #{pics}</if>
+            <if test="area != null  and area != ''"> and area = #{area}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="planId != null  and planId != ''"> and plan_id = #{planId}</if>
+            <if test="acceptUser != null  and acceptUser != ''"> and accept_user = #{acceptUser}</if>
+            <if test="acceptUserName != null  and acceptUserName != ''"> and accept_user_name like concat('%', #{acceptUserName}, '%')</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+        </where>
+    </select>
+    
+    <select id="selectTlIncidentFaultById" parameterType="Long" resultMap="TlIncidentFaultResult">
+        <include refid="selectTlIncidentFaultVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTlIncidentFault" parameterType="TlIncidentFault" useGeneratedKeys="true" keyProperty="id">
+        insert into tl_incident_fault
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="detail != null">detail,</if>
+            <if test="incLevel != null">inc_level,</if>
+            <if test="incType != null">inc_type,</if>
+            <if test="uploadUser != null">upload_user,</if>
+            <if test="happenTime != null">happen_time,</if>
+            <if test="pics != null">pics,</if>
+            <if test="area != null">area,</if>
+            <if test="address != null">address,</if>
+            <if test="planId != null">plan_id,</if>
+            <if test="acceptUser != null">accept_user,</if>
+            <if test="acceptUserName != null">accept_user_name,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="status != null">status,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="detail != null">#{detail},</if>
+            <if test="incLevel != null">#{incLevel},</if>
+            <if test="incType != null">#{incType},</if>
+            <if test="uploadUser != null">#{uploadUser},</if>
+            <if test="happenTime != null">#{happenTime},</if>
+            <if test="pics != null">#{pics},</if>
+            <if test="area != null">#{area},</if>
+            <if test="address != null">#{address},</if>
+            <if test="planId != null">#{planId},</if>
+            <if test="acceptUser != null">#{acceptUser},</if>
+            <if test="acceptUserName != null">#{acceptUserName},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="status != null">#{status},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTlIncidentFault" parameterType="TlIncidentFault">
+        update tl_incident_fault
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="detail != null">detail = #{detail},</if>
+            <if test="incLevel != null">inc_level = #{incLevel},</if>
+            <if test="incType != null">inc_type = #{incType},</if>
+            <if test="uploadUser != null">upload_user = #{uploadUser},</if>
+            <if test="happenTime != null">happen_time = #{happenTime},</if>
+            <if test="pics != null">pics = #{pics},</if>
+            <if test="area != null">area = #{area},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="planId != null">plan_id = #{planId},</if>
+            <if test="acceptUser != null">accept_user = #{acceptUser},</if>
+            <if test="acceptUserName != null">accept_user_name = #{acceptUserName},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="status != null">status = #{status},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTlIncidentFaultById" parameterType="Long">
+        delete from tl_incident_fault where id = #{id}
+    </delete>
+
+    <delete id="deleteTlIncidentFaultByIds" parameterType="String">
+        delete from tl_incident_fault where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 106 - 0
ruoyi-system/src/main/resources/mapper/qdtl/TlPlanMapper.xml

@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.qdtl.mapper.TlPlanMapper">
+    
+    <resultMap type="TlPlan" id="TlPlanResult">
+        <result property="id"    column="id"    />
+        <result property="planNo"    column="plan_no"    />
+        <result property="planName"    column="plan_name"    />
+        <result property="planType"    column="plan_type"    />
+        <result property="status"    column="status"    />
+        <result property="majorUser"    column="major_user"    />
+        <result property="minorUser"    column="minor_user"    />
+        <result property="files"    column="files"    />
+        <result property="remark"    column="remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectTlPlanVo">
+        select id, plan_no, plan_name, plan_type, status, major_user, minor_user, files, remark, create_by, create_time, update_by, update_time from tl_plan
+    </sql>
+
+    <select id="selectTlPlanList" parameterType="TlPlan" resultMap="TlPlanResult">
+        <include refid="selectTlPlanVo"/>
+        <where>  
+            <if test="planNo != null  and planNo != ''"> and plan_no = #{planNo}</if>
+            <if test="planName != null  and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
+            <if test="planType != null  and planType != ''"> and plan_type = #{planType}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="majorUser != null  and majorUser != ''"> and major_user = #{majorUser}</if>
+            <if test="minorUser != null  and minorUser != ''"> and minor_user = #{minorUser}</if>
+            <if test="files != null  and files != ''"> and files = #{files}</if>
+        </where>
+    </select>
+    
+    <select id="selectTlPlanById" parameterType="Long" resultMap="TlPlanResult">
+        <include refid="selectTlPlanVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTlPlan" parameterType="TlPlan" useGeneratedKeys="true" keyProperty="id">
+        insert into tl_plan
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="planNo != null">plan_no,</if>
+            <if test="planName != null">plan_name,</if>
+            <if test="planType != null">plan_type,</if>
+            <if test="status != null">status,</if>
+            <if test="majorUser != null">major_user,</if>
+            <if test="minorUser != null">minor_user,</if>
+            <if test="files != null">files,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="planNo != null">#{planNo},</if>
+            <if test="planName != null">#{planName},</if>
+            <if test="planType != null">#{planType},</if>
+            <if test="status != null">#{status},</if>
+            <if test="majorUser != null">#{majorUser},</if>
+            <if test="minorUser != null">#{minorUser},</if>
+            <if test="files != null">#{files},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTlPlan" parameterType="TlPlan">
+        update tl_plan
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="planNo != null">plan_no = #{planNo},</if>
+            <if test="planName != null">plan_name = #{planName},</if>
+            <if test="planType != null">plan_type = #{planType},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="majorUser != null">major_user = #{majorUser},</if>
+            <if test="minorUser != null">minor_user = #{minorUser},</if>
+            <if test="files != null">files = #{files},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTlPlanById" parameterType="Long">
+        delete from tl_plan where id = #{id}
+    </delete>
+
+    <delete id="deleteTlPlanByIds" parameterType="String">
+        delete from tl_plan where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>