浏览代码

SAI检查管理:SAI级别和类别添加到开项申请流程

wangggziwen 2 年之前
父节点
当前提交
d56e3ef439

+ 22 - 0
master/src/main/java/com/ruoyi/project/production/domain/TSaiApply.java

@@ -66,6 +66,12 @@ public class TSaiApply extends BaseEntity
 
     private String executorName;
 
+    /** SAI级别 */
+    private Long saiLevel;
+
+    /** SAI类别 */
+    private String category;
+
     /** 登记时间 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
     @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd")
@@ -134,6 +140,22 @@ public class TSaiApply extends BaseEntity
     @TableField(exist = false)
     private List<TSaiApproveFile> files;
 
+    public Long getSaiLevel() {
+        return saiLevel;
+    }
+
+    public void setSaiLevel(Long saiLevel) {
+        this.saiLevel = saiLevel;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
     public List<TSaiApproveFile> getFiles() {
         return files;
     }

+ 12 - 1
master/src/main/resources/mybatis/production/TSaiApplyMapper.xml

@@ -38,13 +38,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="veResult"    column="ve_result"    />
         <result property="remarks"    column="remarks"    />
         <result property="veItemOther"    column="ve_item_other"    />
+        <result property="saiLevel"    column="sai_level"    />
+        <result property="category"    column="category"    />
     </resultMap>
 
     <sql id="selectTSaiApplyVo">
         select d.sai_apply_id, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time, d.dept_id, d.apply_status, d.ap_no, d.process_id,
         d.applicant, d.assessor, d.executor, d.inspectors, d.applicant_dept, d.applicant_team, d.description,
         d.unsafe_status, d.unsafe_action, d.apply_date, d.task_id, d.task_name,d.remarks, d.ve_item_other,
-        d.handler, d.estimate_finish_date, d.actual_finish_date, d.is_recorded, d.record_no, d.reaction, d.need_ve, d.ve_items, d.ve_result
+        d.handler, d.estimate_finish_date, d.actual_finish_date, d.is_recorded, d.record_no, d.reaction, d.need_ve, d.ve_items, d.ve_result,
+        d.sai_level, d.category
         from t_sai_apply d
         left join sys_dept s on s.dept_id = d.dept_id
     </sql>
@@ -80,6 +83,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="veResult != null  and veResult != ''"> and ve_result = #{veResult}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             <if test="veItemOther != null  and veItemOther != ''"> and ve_item_other = #{veItemOther}</if>
+            <if test="saiLevel != null "> and sai_level = #{saiLevel}</if>
+            <if test="category != null  and category != ''"> and category = #{category}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -131,6 +136,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="veResult != null">ve_result,</if>
             <if test="remarks != null">remarks,</if>
             <if test="veItemOther != null">ve_item_other,</if>
+            <if test="saiLevel != null">sai_level,</if>
+            <if test="category != null">category,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="saiApplyId != null">#{saiApplyId},</if>
@@ -166,6 +173,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="veResult != null">#{veResult},</if>
             <if test="remarks != null">#{remarks},</if>
             <if test="veItemOther != null">#{veItemOther},</if>
+            <if test="saiLevel != null">#{saiLevel},</if>
+            <if test="category != null">#{category},</if>
          </trim>
     </insert>
 
@@ -211,6 +220,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remarks != null">remarks = #{remarks},</if>
             <if test="veItemOther != null">ve_item_other = #{veItemOther},</if>
             <if test="veItemOther == null">ve_item_other = null,</if>
+            <if test="saiLevel != null">sai_level = #{saiLevel},</if>
+            <if test="category != null">category = #{category},</if>
         </trim>
         where sai_apply_id = #{saiApplyId}
     </update>

+ 14 - 0
ui/src/views/approve/approveDetail/sai-apply-detail.vue

@@ -60,6 +60,20 @@
               <el-input :disabled="applyDisabled" v-model="dataForm.description" placeholder="请输入问题描述" type="textarea" :rows="3"/>
             </el-form-item>
           </el-descriptions-item>
+          <el-descriptions-item label="SAI级别" :span="1">
+          <el-form-item prop="saiLevel">
+              <el-select v-model="dataForm.saiLevel" placeholder="请选择SAI级别" :disabled="applyDisabled">
+                <el-option key="1" label="1" value="1"></el-option>
+                <el-option key="2" label="2" value="2"></el-option>
+                <el-option key="3" label="3" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI类别" :span="2">
+            <el-form-item prop="category">
+              <el-input v-model="dataForm.category" placeholder="请输入SAI类别" :disabled="applyDisabled"/>
+            </el-form-item>
+          </el-descriptions-item>
           <el-descriptions-item label="附件" :span="3">
             <el-table :data="doc.commonfileListApply" border>
               <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">

+ 16 - 1
ui/src/views/production/apply/all/index.vue

@@ -303,6 +303,20 @@
               <el-input v-model="form.description" placeholder="请输入问题描述" type="textarea" :rows="3" />
             </el-form-item>
           </el-descriptions-item>
+          <el-descriptions-item label="SAI级别" :span="1">
+            <el-form-item prop="saiLevel">
+              <el-select v-model="form.saiLevel" placeholder="请选择SAI级别">
+                <el-option key="1" label="1" value="1"></el-option>
+                <el-option key="2" label="2" value="2"></el-option>
+                <el-option key="3" label="3" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI类别" :span="2">
+            <el-form-item prop="category">
+              <el-input v-model="form.category" placeholder="请输入SAI类别" />
+            </el-form-item>
+          </el-descriptions-item>
           <el-descriptions-item label="隐患" :span="3">
             <el-radio v-model="unsafeChoice" label="1" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全状态</el-radio>
             <el-form-item prop="unsafeStatus" style="display: inline-block;">
@@ -1368,7 +1382,8 @@ export default {
             sai.actions = apply.reaction;
             sai.source = "装置";
             sai.deptId = 103;
-            sai.saiLevel = "1";
+            sai.saiLevel = apply.saiLevel;
+            sai.category = apply.category;
             sai.applicant = apply.applicant;
             sai.applicantName = apply.applicantName;
             this.saiList.push(sai);