Explorar el Código

cpms优化
LO LC状态记录表

jiangbiao hace 1 año
padre
commit
8a7f1f96b9

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/project/process/controller/TLockValveController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.project.process.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.project.process.domain.TLockValve;
+import com.ruoyi.project.process.service.ITLockValveService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 阀门锁开锁关状态记录Controller
+ * 
+ * @author ruoyi
+ * @date 2024-04-03
+ */
+@RestController
+@RequestMapping("/process/valve")
+public class TLockValveController extends BaseController
+{
+    @Autowired
+    private ITLockValveService tLockValveService;
+
+    /**
+     * 查询阀门锁开锁关状态记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('process:valve:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TLockValve tLockValve)
+    {
+        startPage();
+        List<TLockValve> list = tLockValveService.selectTLockValveList(tLockValve);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出阀门锁开锁关状态记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('process:valve:export')")
+    @Log(title = "阀门锁开锁关状态记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TLockValve tLockValve)
+    {
+        List<TLockValve> list = tLockValveService.selectTLockValveList(tLockValve);
+        ExcelUtil<TLockValve> util = new ExcelUtil<TLockValve>(TLockValve.class);
+        util.exportExcel(response, list, "阀门锁开锁关状态记录数据");
+    }
+
+    /**
+     * 获取阀门锁开锁关状态记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('process:valve:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(tLockValveService.selectTLockValveById(id));
+    }
+
+    /**
+     * 新增阀门锁开锁关状态记录
+     */
+    @PreAuthorize("@ss.hasPermi('process:valve:add')")
+    @Log(title = "阀门锁开锁关状态记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TLockValve tLockValve)
+    {
+        return toAjax(tLockValveService.insertTLockValve(tLockValve));
+    }
+
+    /**
+     * 修改阀门锁开锁关状态记录
+     */
+    @PreAuthorize("@ss.hasPermi('process:valve:edit')")
+    @Log(title = "阀门锁开锁关状态记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TLockValve tLockValve)
+    {
+        return toAjax(tLockValveService.updateTLockValve(tLockValve));
+    }
+
+    /**
+     * 删除阀门锁开锁关状态记录
+     */
+    @PreAuthorize("@ss.hasPermi('process:valve:remove')")
+    @Log(title = "阀门锁开锁关状态记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tLockValveService.deleteTLockValveByIds(ids));
+    }
+}

+ 377 - 0
ruoyi-admin/src/main/java/com/ruoyi/project/process/domain/TLockValve.java

@@ -0,0 +1,377 @@
+package com.ruoyi.project.process.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;
+
+/**
+ * 阀门锁开锁关状态记录对象 t_lock_valve
+ * 
+ * @author ruoyi
+ * @date 2024-04-03
+ */
+public class TLockValve extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Long id;
+
+    /** 单元 */
+    @Excel(name = "单元")
+    private String unit;
+
+    /** 阀门标签号 */
+    @Excel(name = "阀门标签号")
+    private String vtNo;
+
+    /** PID管线号 */
+    @Excel(name = "PID管线号")
+    private String pidNo;
+
+    /** 位置描述 */
+    @Excel(name = "位置描述")
+    private String locationDes;
+
+    /** 介质 */
+    @Excel(name = "介质")
+    private String medium;
+
+    /** 阀门类型 */
+    @Excel(name = "阀门类型")
+    private String valveType;
+
+    /** 阀门尺寸 */
+    @Excel(name = "阀门尺寸")
+    private String valveSize;
+
+    /** 标识信息 */
+    @Excel(name = "标识信息")
+    private String identifier;
+
+    /** 阀位状态 */
+    @Excel(name = "阀位状态")
+    private String valvePosition;
+
+    /** 牢固固定 */
+    @Excel(name = "牢固固定")
+    private String firmlySecured;
+
+    /** 负责人 */
+    @Excel(name = "负责人")
+    private String responsibility;
+
+    /** 现场检查人 */
+    @Excel(name = "现场检查人")
+    private String checkedBy;
+
+    /** 开车前检查 */
+    @Excel(name = "开车前检查")
+    private String checkBeforeSu;
+
+    /** 开车前检查 */
+    @Excel(name = "开车前检查")
+    private String pidStatus;
+
+    /** 风险等级 */
+    @Excel(name = "风险等级")
+    private String riskLevel;
+
+    /** SHE Review */
+    @Excel(name = "SHE Review")
+    private String sheReview;
+
+    /** 检查日期 */
+     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @Excel(name = "检查日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date checkDate;
+
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remarks;
+
+    /** 删除标识 */
+    private Integer delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private String createrCode;
+
+    /** 创建日期 */
+     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 更新人 */
+    @Excel(name = "更新人")
+    private String updaterCode;
+
+    /** 更新日期 */
+     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @Excel(name = "更新日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    /** 部门编号 */
+    @Excel(name = "部门编号")
+    private Long deptId;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setUnit(String unit) 
+    {
+        this.unit = unit;
+    }
+
+    public String getUnit() 
+    {
+        return unit;
+    }
+    public void setVtNo(String vtNo) 
+    {
+        this.vtNo = vtNo;
+    }
+
+    public String getVtNo() 
+    {
+        return vtNo;
+    }
+    public void setPidNo(String pidNo) 
+    {
+        this.pidNo = pidNo;
+    }
+
+    public String getPidNo() 
+    {
+        return pidNo;
+    }
+    public void setLocationDes(String locationDes) 
+    {
+        this.locationDes = locationDes;
+    }
+
+    public String getLocationDes() 
+    {
+        return locationDes;
+    }
+    public void setMedium(String medium) 
+    {
+        this.medium = medium;
+    }
+
+    public String getMedium() 
+    {
+        return medium;
+    }
+    public void setValveType(String valveType) 
+    {
+        this.valveType = valveType;
+    }
+
+    public String getValveType() 
+    {
+        return valveType;
+    }
+    public void setValveSize(String valveSize) 
+    {
+        this.valveSize = valveSize;
+    }
+
+    public String getValveSize() 
+    {
+        return valveSize;
+    }
+    public void setIdentifier(String identifier) 
+    {
+        this.identifier = identifier;
+    }
+
+    public String getIdentifier() 
+    {
+        return identifier;
+    }
+    public void setValvePosition(String valvePosition) 
+    {
+        this.valvePosition = valvePosition;
+    }
+
+    public String getValvePosition() 
+    {
+        return valvePosition;
+    }
+    public void setFirmlySecured(String firmlySecured) 
+    {
+        this.firmlySecured = firmlySecured;
+    }
+
+    public String getFirmlySecured() 
+    {
+        return firmlySecured;
+    }
+    public void setResponsibility(String responsibility) 
+    {
+        this.responsibility = responsibility;
+    }
+
+    public String getResponsibility() 
+    {
+        return responsibility;
+    }
+    public void setCheckedBy(String checkedBy) 
+    {
+        this.checkedBy = checkedBy;
+    }
+
+    public String getCheckedBy() 
+    {
+        return checkedBy;
+    }
+    public void setCheckBeforeSu(String checkBeforeSu) 
+    {
+        this.checkBeforeSu = checkBeforeSu;
+    }
+
+    public String getCheckBeforeSu() 
+    {
+        return checkBeforeSu;
+    }
+    public void setPidStatus(String pidStatus) 
+    {
+        this.pidStatus = pidStatus;
+    }
+
+    public String getPidStatus() 
+    {
+        return pidStatus;
+    }
+    public void setRiskLevel(String riskLevel) 
+    {
+        this.riskLevel = riskLevel;
+    }
+
+    public String getRiskLevel() 
+    {
+        return riskLevel;
+    }
+    public void setSheReview(String sheReview) 
+    {
+        this.sheReview = sheReview;
+    }
+
+    public String getSheReview() 
+    {
+        return sheReview;
+    }
+    public void setCheckDate(Date checkDate) 
+    {
+        this.checkDate = checkDate;
+    }
+
+    public Date getCheckDate() 
+    {
+        return checkDate;
+    }
+    public void setRemarks(String remarks) 
+    {
+        this.remarks = remarks;
+    }
+
+    public String getRemarks() 
+    {
+        return remarks;
+    }
+    public void setDelFlag(Integer delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Integer getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setCreaterCode(String createrCode) 
+    {
+        this.createrCode = createrCode;
+    }
+
+    public String getCreaterCode() 
+    {
+        return createrCode;
+    }
+    public void setCreatedate(Date createdate) 
+    {
+        this.createdate = createdate;
+    }
+
+    public Date getCreatedate() 
+    {
+        return createdate;
+    }
+    public void setUpdaterCode(String updaterCode) 
+    {
+        this.updaterCode = updaterCode;
+    }
+
+    public String getUpdaterCode() 
+    {
+        return updaterCode;
+    }
+    public void setUpdatedate(Date updatedate) 
+    {
+        this.updatedate = updatedate;
+    }
+
+    public Date getUpdatedate() 
+    {
+        return updatedate;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("unit", getUnit())
+            .append("vtNo", getVtNo())
+            .append("pidNo", getPidNo())
+            .append("locationDes", getLocationDes())
+            .append("medium", getMedium())
+            .append("valveType", getValveType())
+            .append("valveSize", getValveSize())
+            .append("identifier", getIdentifier())
+            .append("valvePosition", getValvePosition())
+            .append("firmlySecured", getFirmlySecured())
+            .append("responsibility", getResponsibility())
+            .append("checkedBy", getCheckedBy())
+            .append("checkBeforeSu", getCheckBeforeSu())
+            .append("pidStatus", getPidStatus())
+            .append("riskLevel", getRiskLevel())
+            .append("sheReview", getSheReview())
+            .append("checkDate", getCheckDate())
+            .append("remarks", getRemarks())
+            .append("delFlag", getDelFlag())
+            .append("createrCode", getCreaterCode())
+            .append("createdate", getCreatedate())
+            .append("updaterCode", getUpdaterCode())
+            .append("updatedate", getUpdatedate())
+            .append("deptId", getDeptId())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-admin/src/main/java/com/ruoyi/project/process/mapper/TLockValveMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.process.mapper;
+
+import java.util.List;
+import com.ruoyi.project.process.domain.TLockValve;
+
+/**
+ * 阀门锁开锁关状态记录Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-04-03
+ */
+public interface TLockValveMapper 
+{
+    /**
+     * 查询阀门锁开锁关状态记录
+     * 
+     * @param id 阀门锁开锁关状态记录主键
+     * @return 阀门锁开锁关状态记录
+     */
+    public TLockValve selectTLockValveById(Long id);
+
+    /**
+     * 查询阀门锁开锁关状态记录列表
+     * 
+     * @param tLockValve 阀门锁开锁关状态记录
+     * @return 阀门锁开锁关状态记录集合
+     */
+    public List<TLockValve> selectTLockValveList(TLockValve tLockValve);
+
+    /**
+     * 新增阀门锁开锁关状态记录
+     * 
+     * @param tLockValve 阀门锁开锁关状态记录
+     * @return 结果
+     */
+    public int insertTLockValve(TLockValve tLockValve);
+
+    /**
+     * 修改阀门锁开锁关状态记录
+     * 
+     * @param tLockValve 阀门锁开锁关状态记录
+     * @return 结果
+     */
+    public int updateTLockValve(TLockValve tLockValve);
+
+    /**
+     * 删除阀门锁开锁关状态记录
+     * 
+     * @param id 阀门锁开锁关状态记录主键
+     * @return 结果
+     */
+    public int deleteTLockValveById(Long id);
+
+    /**
+     * 批量删除阀门锁开锁关状态记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTLockValveByIds(Long[] ids);
+}

+ 61 - 0
ruoyi-admin/src/main/java/com/ruoyi/project/process/service/ITLockValveService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.process.service;
+
+import java.util.List;
+import com.ruoyi.project.process.domain.TLockValve;
+
+/**
+ * 阀门锁开锁关状态记录Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-04-03
+ */
+public interface ITLockValveService 
+{
+    /**
+     * 查询阀门锁开锁关状态记录
+     * 
+     * @param id 阀门锁开锁关状态记录主键
+     * @return 阀门锁开锁关状态记录
+     */
+    public TLockValve selectTLockValveById(Long id);
+
+    /**
+     * 查询阀门锁开锁关状态记录列表
+     * 
+     * @param tLockValve 阀门锁开锁关状态记录
+     * @return 阀门锁开锁关状态记录集合
+     */
+    public List<TLockValve> selectTLockValveList(TLockValve tLockValve);
+
+    /**
+     * 新增阀门锁开锁关状态记录
+     * 
+     * @param tLockValve 阀门锁开锁关状态记录
+     * @return 结果
+     */
+    public int insertTLockValve(TLockValve tLockValve);
+
+    /**
+     * 修改阀门锁开锁关状态记录
+     * 
+     * @param tLockValve 阀门锁开锁关状态记录
+     * @return 结果
+     */
+    public int updateTLockValve(TLockValve tLockValve);
+
+    /**
+     * 批量删除阀门锁开锁关状态记录
+     * 
+     * @param ids 需要删除的阀门锁开锁关状态记录主键集合
+     * @return 结果
+     */
+    public int deleteTLockValveByIds(Long[] ids);
+
+    /**
+     * 删除阀门锁开锁关状态记录信息
+     * 
+     * @param id 阀门锁开锁关状态记录主键
+     * @return 结果
+     */
+    public int deleteTLockValveById(Long id);
+}

+ 93 - 0
ruoyi-admin/src/main/java/com/ruoyi/project/process/service/impl/TLockValveServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.process.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.process.mapper.TLockValveMapper;
+import com.ruoyi.project.process.domain.TLockValve;
+import com.ruoyi.project.process.service.ITLockValveService;
+
+/**
+ * 阀门锁开锁关状态记录Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-04-03
+ */
+@Service
+public class TLockValveServiceImpl implements ITLockValveService 
+{
+    @Autowired
+    private TLockValveMapper tLockValveMapper;
+
+    /**
+     * 查询阀门锁开锁关状态记录
+     * 
+     * @param id 阀门锁开锁关状态记录主键
+     * @return 阀门锁开锁关状态记录
+     */
+    @Override
+    public TLockValve selectTLockValveById(Long id)
+    {
+        return tLockValveMapper.selectTLockValveById(id);
+    }
+
+    /**
+     * 查询阀门锁开锁关状态记录列表
+     * 
+     * @param tLockValve 阀门锁开锁关状态记录
+     * @return 阀门锁开锁关状态记录
+     */
+    @Override
+    public List<TLockValve> selectTLockValveList(TLockValve tLockValve)
+    {
+        return tLockValveMapper.selectTLockValveList(tLockValve);
+    }
+
+    /**
+     * 新增阀门锁开锁关状态记录
+     * 
+     * @param tLockValve 阀门锁开锁关状态记录
+     * @return 结果
+     */
+    @Override
+    public int insertTLockValve(TLockValve tLockValve)
+    {
+        return tLockValveMapper.insertTLockValve(tLockValve);
+    }
+
+    /**
+     * 修改阀门锁开锁关状态记录
+     * 
+     * @param tLockValve 阀门锁开锁关状态记录
+     * @return 结果
+     */
+    @Override
+    public int updateTLockValve(TLockValve tLockValve)
+    {
+        return tLockValveMapper.updateTLockValve(tLockValve);
+    }
+
+    /**
+     * 批量删除阀门锁开锁关状态记录
+     * 
+     * @param ids 需要删除的阀门锁开锁关状态记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTLockValveByIds(Long[] ids)
+    {
+        return tLockValveMapper.deleteTLockValveByIds(ids);
+    }
+
+    /**
+     * 删除阀门锁开锁关状态记录信息
+     * 
+     * @param id 阀门锁开锁关状态记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTLockValveById(Long id)
+    {
+        return tLockValveMapper.deleteTLockValveById(id);
+    }
+}

+ 170 - 0
ruoyi-admin/src/main/resources/mapper/process/TLockValveMapper.xml

@@ -0,0 +1,170 @@
+<?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.project.process.mapper.TLockValveMapper">
+    
+    <resultMap type="TLockValve" id="TLockValveResult">
+        <result property="id"    column="id"    />
+        <result property="unit"    column="unit"    />
+        <result property="vtNo"    column="vt_no"    />
+        <result property="pidNo"    column="pid_no"    />
+        <result property="locationDes"    column="location_des"    />
+        <result property="medium"    column="medium"    />
+        <result property="valveType"    column="valve_type"    />
+        <result property="valveSize"    column="valve_size"    />
+        <result property="identifier"    column="identifier"    />
+        <result property="valvePosition"    column="valve_position"    />
+        <result property="firmlySecured"    column="firmly_secured"    />
+        <result property="responsibility"    column="responsibility"    />
+        <result property="checkedBy"    column="checked_by"    />
+        <result property="checkBeforeSu"    column="check_before_su"    />
+        <result property="pidStatus"    column="pid_status"    />
+        <result property="riskLevel"    column="risk_level"    />
+        <result property="sheReview"    column="she_review"    />
+        <result property="checkDate"    column="check_date"    />
+        <result property="remarks"    column="remarks"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createrCode"    column="creater_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updatedate"    column="updatedate"    />
+        <result property="deptId"    column="dept_id"    />
+    </resultMap>
+
+    <sql id="selectTLockValveVo">
+        select id, unit, vt_no, pid_no, location_des, medium, valve_type, valve_size, identifier, valve_position, firmly_secured, responsibility, checked_by, check_before_su, pid_status, risk_level, she_review, check_date, remarks, del_flag, creater_code, createdate, updater_code, updatedate, dept_id from t_lock_valve
+    </sql>
+
+    <select id="selectTLockValveList" parameterType="TLockValve" resultMap="TLockValveResult">
+        <include refid="selectTLockValveVo"/>
+        <where>  
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="vtNo != null  and vtNo != ''"> and vt_no = #{vtNo}</if>
+            <if test="pidNo != null  and pidNo != ''"> and pid_no = #{pidNo}</if>
+            <if test="locationDes != null  and locationDes != ''"> and location_des = #{locationDes}</if>
+            <if test="medium != null  and medium != ''"> and medium = #{medium}</if>
+            <if test="valveType != null  and valveType != ''"> and valve_type = #{valveType}</if>
+            <if test="valveSize != null  and valveSize != ''"> and valve_size = #{valveSize}</if>
+            <if test="identifier != null  and identifier != ''"> and identifier = #{identifier}</if>
+            <if test="valvePosition != null  and valvePosition != ''"> and valve_position = #{valvePosition}</if>
+            <if test="firmlySecured != null  and firmlySecured != ''"> and firmly_secured = #{firmlySecured}</if>
+            <if test="responsibility != null  and responsibility != ''"> and responsibility = #{responsibility}</if>
+            <if test="checkedBy != null  and checkedBy != ''"> and checked_by = #{checkedBy}</if>
+            <if test="checkBeforeSu != null  and checkBeforeSu != ''"> and check_before_su = #{checkBeforeSu}</if>
+            <if test="pidStatus != null  and pidStatus != ''"> and pid_status = #{pidStatus}</if>
+            <if test="riskLevel != null  and riskLevel != ''"> and risk_level = #{riskLevel}</if>
+            <if test="sheReview != null  and sheReview != ''"> and she_review = #{sheReview}</if>
+            <if test="checkDate != null "> and check_date = #{checkDate}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and createdate = #{createdate}</if>
+            <if test="updaterCode != null  and updaterCode != ''"> and updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and updatedate = #{updatedate}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+        </where>
+    </select>
+    
+    <select id="selectTLockValveById" parameterType="Long" resultMap="TLockValveResult">
+        <include refid="selectTLockValveVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTLockValve" parameterType="TLockValve" useGeneratedKeys="true" keyProperty="id">
+        insert into t_lock_valve
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="unit != null">unit,</if>
+            <if test="vtNo != null">vt_no,</if>
+            <if test="pidNo != null">pid_no,</if>
+            <if test="locationDes != null">location_des,</if>
+            <if test="medium != null">medium,</if>
+            <if test="valveType != null">valve_type,</if>
+            <if test="valveSize != null">valve_size,</if>
+            <if test="identifier != null">identifier,</if>
+            <if test="valvePosition != null">valve_position,</if>
+            <if test="firmlySecured != null">firmly_secured,</if>
+            <if test="responsibility != null">responsibility,</if>
+            <if test="checkedBy != null">checked_by,</if>
+            <if test="checkBeforeSu != null">check_before_su,</if>
+            <if test="pidStatus != null">pid_status,</if>
+            <if test="riskLevel != null">risk_level,</if>
+            <if test="sheReview != null">she_review,</if>
+            <if test="checkDate != null">check_date,</if>
+            <if test="remarks != null">remarks,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createrCode != null">creater_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</if>
+            <if test="deptId != null">dept_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="unit != null">#{unit},</if>
+            <if test="vtNo != null">#{vtNo},</if>
+            <if test="pidNo != null">#{pidNo},</if>
+            <if test="locationDes != null">#{locationDes},</if>
+            <if test="medium != null">#{medium},</if>
+            <if test="valveType != null">#{valveType},</if>
+            <if test="valveSize != null">#{valveSize},</if>
+            <if test="identifier != null">#{identifier},</if>
+            <if test="valvePosition != null">#{valvePosition},</if>
+            <if test="firmlySecured != null">#{firmlySecured},</if>
+            <if test="responsibility != null">#{responsibility},</if>
+            <if test="checkedBy != null">#{checkedBy},</if>
+            <if test="checkBeforeSu != null">#{checkBeforeSu},</if>
+            <if test="pidStatus != null">#{pidStatus},</if>
+            <if test="riskLevel != null">#{riskLevel},</if>
+            <if test="sheReview != null">#{sheReview},</if>
+            <if test="checkDate != null">#{checkDate},</if>
+            <if test="remarks != null">#{remarks},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createrCode != null">#{createrCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</if>
+            <if test="deptId != null">#{deptId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTLockValve" parameterType="TLockValve">
+        update t_lock_valve
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="unit != null">unit = #{unit},</if>
+            <if test="vtNo != null">vt_no = #{vtNo},</if>
+            <if test="pidNo != null">pid_no = #{pidNo},</if>
+            <if test="locationDes != null">location_des = #{locationDes},</if>
+            <if test="medium != null">medium = #{medium},</if>
+            <if test="valveType != null">valve_type = #{valveType},</if>
+            <if test="valveSize != null">valve_size = #{valveSize},</if>
+            <if test="identifier != null">identifier = #{identifier},</if>
+            <if test="valvePosition != null">valve_position = #{valvePosition},</if>
+            <if test="firmlySecured != null">firmly_secured = #{firmlySecured},</if>
+            <if test="responsibility != null">responsibility = #{responsibility},</if>
+            <if test="checkedBy != null">checked_by = #{checkedBy},</if>
+            <if test="checkBeforeSu != null">check_before_su = #{checkBeforeSu},</if>
+            <if test="pidStatus != null">pid_status = #{pidStatus},</if>
+            <if test="riskLevel != null">risk_level = #{riskLevel},</if>
+            <if test="sheReview != null">she_review = #{sheReview},</if>
+            <if test="checkDate != null">check_date = #{checkDate},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createrCode != null">creater_code = #{createrCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTLockValveById" parameterType="Long">
+        delete from t_lock_valve where id = #{id}
+    </delete>
+
+    <delete id="deleteTLockValveByIds" parameterType="String">
+        delete from t_lock_valve where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 1 - 1
ruoyi-generator/src/main/resources/vm/sql/sql.vm

@@ -1,6 +1,6 @@
 -- 菜单 SQL
 insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
-values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate(), '', null, '${functionName}菜单');
+values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', null, 'admin', sysdate(), '', null, '${functionName}菜单');
 
 -- 按钮父菜单ID
 SELECT @parentId := LAST_INSERT_ID();

+ 44 - 0
ruoyi-ui/src/api/process/valve.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询阀门锁开锁关状态记录列表
+export function listValve(query) {
+  return request({
+    url: '/process/valve/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询阀门锁开锁关状态记录详细
+export function getValve(id) {
+  return request({
+    url: '/process/valve/' + id,
+    method: 'get'
+  })
+}
+
+// 新增阀门锁开锁关状态记录
+export function addValve(data) {
+  return request({
+    url: '/process/valve',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改阀门锁开锁关状态记录
+export function updateValve(data) {
+  return request({
+    url: '/process/valve',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除阀门锁开锁关状态记录
+export function delValve(id) {
+  return request({
+    url: '/process/valve/' + id,
+    method: 'delete'
+  })
+}

+ 402 - 0
ruoyi-ui/src/views/process/valve/index.vue

@@ -0,0 +1,402 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="单元" prop="unit">
+        <el-input
+          v-model="queryParams.unit"
+          placeholder="请输入单元"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="阀门标签号" prop="vtNo">
+        <el-input
+          v-model="queryParams.vtNo"
+          placeholder="请输入阀门标签号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="PID管线号" prop="pidNo">
+        <el-input
+          v-model="queryParams.pidNo"
+          placeholder="请输入PID管线号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="阀位状态" prop="valvePosition">
+        <el-input
+          v-model="queryParams.valvePosition"
+          placeholder="请输入阀位状态"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['process:valve:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['process:valve:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['process:valve:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['process:valve:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="valveList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="单元" align="center" prop="unit" width="180"/>
+      <el-table-column label="阀门标签号" align="center" prop="vtNo" width="180"/>
+      <el-table-column label="PID管线号" align="center" prop="pidNo" width="180"/>
+      <el-table-column label="位置描述" align="center" prop="locationDes" width="180"/>
+      <el-table-column label="介质" align="center" prop="medium" width="180"/>
+      <el-table-column label="阀门类型" align="center" prop="valveType" width="180"/>
+      <el-table-column label="阀门尺寸" align="center" prop="valveSize" width="180"/>
+      <el-table-column label="标识信息" align="center" prop="identifier" width="180"/>
+      <el-table-column label="阀位状态" align="center" prop="valvePosition" width="180"/>
+      <el-table-column label="牢固固定" align="center" prop="firmlySecured" width="180"/>
+      <el-table-column label="负责人" align="center" prop="responsibility" width="180"/>
+      <el-table-column label="现场检查人" align="center" prop="checkedBy" width="180"/>
+      <el-table-column label="开车前检查" align="center" prop="checkBeforeSu" width="180"/>
+      <el-table-column label="开车前检查" align="center" prop="pidStatus" width="180"/>
+      <el-table-column label="风险等级" align="center" prop="riskLevel" width="180"/>
+      <el-table-column label="SHE Review" align="center" prop="sheReview" width="180"/>
+      <el-table-column label="检查日期" align="center" prop="checkDate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.checkDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" width="180"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['process:valve:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['process:valve:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改阀门锁开锁关状态记录对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body :close-on-click-modal="false">
+      <el-form ref="form" :model="form" :rules="rules" label-width="140px">
+        <el-form-item label="单元" prop="unit">
+          <el-input v-model="form.unit" placeholder="请输入单元" />
+        </el-form-item>
+        <el-form-item label="阀门标签号" prop="vtNo">
+          <el-input v-model="form.vtNo" placeholder="请输入阀门标签号" />
+        </el-form-item>
+        <el-form-item label="PID管线号" prop="pidNo">
+          <el-input v-model="form.pidNo" placeholder="请输入PID管线号" />
+        </el-form-item>
+        <el-form-item label="位置描述" prop="locationDes">
+          <el-input v-model="form.locationDes" placeholder="请输入位置描述" />
+        </el-form-item>
+        <el-form-item label="介质" prop="medium">
+          <el-input v-model="form.medium" placeholder="请输入介质" />
+        </el-form-item>
+        <el-form-item label="阀门类型" prop="valveType">
+          <el-input v-model="form.valveType" placeholder="请输入阀门类型" />
+        </el-form-item>
+        <el-form-item label="阀门尺寸" prop="valveSize">
+          <el-input v-model="form.valveSize" placeholder="请输入阀门尺寸" />
+        </el-form-item>
+        <el-form-item label="标识信息" prop="identifier">
+          <el-radio-group v-model="form.identifier">
+            <el-radio-button label="✔">✔</el-radio-button>
+            <el-radio-button label="✖">✖</el-radio-button>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="阀位状态" prop="valvePosition">
+          <el-radio-group v-model="form.valvePosition">
+            <el-radio-button label="LO">LO</el-radio-button>
+            <el-radio-button label="LC">LC</el-radio-button>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="牢固固定" prop="firmlySecured">
+          <el-radio-group v-model="form.firmlySecured">
+            <el-radio-button label="✔">✔</el-radio-button>
+            <el-radio-button label="✖">✖</el-radio-button>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="负责人" prop="responsibility">
+          <el-input v-model="form.responsibility" placeholder="请输入负责人" />
+        </el-form-item>
+        <el-form-item label="现场检查人" prop="checkedBy">
+          <el-input v-model="form.checkedBy" placeholder="请输入现场检查人" />
+        </el-form-item>
+        <el-form-item label="开车前检查" prop="checkBeforeSu">
+          <el-input v-model="form.checkBeforeSu" placeholder="请输入开车前检查" />
+        </el-form-item>
+        <el-form-item label="风险等级" prop="riskLevel">
+          <el-input v-model="form.riskLevel" placeholder="请输入风险等级" />
+        </el-form-item>
+        <el-form-item label="SHE Review" prop="sheReview">
+          <el-input v-model="form.sheReview" placeholder="请输入SHE Review" />
+        </el-form-item>
+        <el-form-item label="检查日期" prop="checkDate">
+          <el-date-picker clearable
+            v-model="form.checkDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择检查日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listValve, getValve, delValve, addValve, updateValve } from "@/api/process/valve";
+
+export default {
+  name: "Valve",
+  data() {
+    return {
+      // 页面高度
+      clientHeight: 300,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 阀门锁开锁关状态记录表格数据
+      valveList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        unit: null,
+        vtNo: null,
+        pidNo: null,
+        locationDes: null,
+        medium: null,
+        valveType: null,
+        valveSize: null,
+        identifier: null,
+        valvePosition: null,
+        firmlySecured: null,
+        responsibility: null,
+        checkedBy: null,
+        checkBeforeSu: null,
+        pidStatus: null,
+        riskLevel: null,
+        sheReview: null,
+        checkDate: null,
+        remarks: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = (document.body.clientHeight - 80) * 0.8
+    });
+  },
+  methods: {
+    /** 查询阀门锁开锁关状态记录列表 */
+    getList() {
+      this.loading = true;
+      listValve(this.queryParams).then(response => {
+        this.valveList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        unit: null,
+        vtNo: null,
+        pidNo: null,
+        locationDes: null,
+        medium: null,
+        valveType: null,
+        valveSize: null,
+        identifier: null,
+        valvePosition: null,
+        firmlySecured: null,
+        responsibility: null,
+        checkedBy: null,
+        checkBeforeSu: null,
+        pidStatus: null,
+        riskLevel: null,
+        sheReview: null,
+        checkDate: null,
+        remarks: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加阀门锁开锁关状态记录";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getValve(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改阀门锁开锁关状态记录";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateValve(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addValve(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除阀门锁开锁关状态记录编号为"' + ids + '"的数据项?').then(function() {
+        return delValve(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('process/valve/export', {
+        ...this.queryParams
+      }, `valve_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>