浏览代码

pssr:
-设备清洁度添加删除检查内容操作
-氮气置换添加氧气标准值
-检查内容添加删除按钮

jiangbiao 3 月之前
父节点
当前提交
2aade203b6

+ 3 - 2
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrNitrogenController.java

@@ -311,12 +311,13 @@ public class TPssrNitrogenController extends BaseController {
      */
     private void verifySatndard(TPssrNitrogen tPssrNitrogen) {
         String oxygen = tPssrNitrogen.getOxygen();
+        String oxygenValue = tPssrNitrogen.getoxygenValue();
         String dewPoint = tPssrNitrogen.getDewPoint();
         String dewPointValue = tPssrNitrogen.getDewPointValue();
         String standard = "";
         // 氧气不为空并且露点不为空并且露点标准不为空的时候
         if (StringUtils.isNotEmpty(oxygen) && StringUtils.isNotEmpty(dewPoint) && StringUtils.isNotEmpty(dewPointValue)) {//判断氧气+露点
-            if (new BigDecimal(oxygen).compareTo(new BigDecimal(0.2)) == -1
+            if (new BigDecimal(oxygen).compareTo(new BigDecimal(oxygenValue)) == -1
                     && new BigDecimal(dewPoint).compareTo(new BigDecimal(dewPointValue)) == -1) {
                 standard = "是";
             } else {
@@ -324,7 +325,7 @@ public class TPssrNitrogenController extends BaseController {
             }
         } else if (StringUtils.isNotEmpty(oxygen) && StringUtils.isEmpty(dewPoint) && StringUtils.isEmpty(dewPointValue)) {//判断氧气
             //氧气不为空 露点值为空 标准也为空
-            if (new BigDecimal(oxygen).compareTo(new BigDecimal(0.2)) == -1) {
+            if (new BigDecimal(oxygen).compareTo(new BigDecimal(oxygenValue)) == -1) {
                 standard = "是";
             } else {
                 standard = "否";

+ 6 - 2
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSubcontentController.java

@@ -50,8 +50,6 @@ import java.util.Map;
 @RestController
 @RequestMapping("/pssr/subcontent")
 public class TPssrSubcontentController extends BaseController {
-    @Resource
-    private TPssrSubcontentMapper tPssrSubcontentMapper;
     @Autowired
     private ITPssrSubcontentService tPssrSubcontentService;
     @Autowired
@@ -362,6 +360,12 @@ public class TPssrSubcontentController extends BaseController {
     @Log(title = "开车条件确认", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
+        for (Long id : ids) {
+            TPssrSubcontent subcontent = tPssrSubcontentService.selectTPssrSubcontentById(id);
+            if (subcontent.getApproveStatus()!=0){
+                return AjaxResult.error("已发起审批的检查项不可删除!");
+            }
+        }
         return toAjax(tPssrSubcontentService.deleteTPssrSubcontentByIds(ids));
     }
 

+ 11 - 0
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrNitrogen.java

@@ -47,6 +47,9 @@ public class TPssrNitrogen extends BaseEntity
     @Excel(name = "氧气")
     private String oxygen;
 
+    @Excel(name = "氧气标准值")
+    private String oxygenValue;
+
     /** 合格(是/否) */
     @Excel(name = "合格(是/否)")
     private String standard;
@@ -369,6 +372,14 @@ public class TPssrNitrogen extends BaseEntity
         return approveStatus;
     }
 
+    public String getoxygenValue() {
+        return oxygenValue;
+    }
+
+    public void setoxygenValue(String oxygenValue) {
+        this.oxygenValue = oxygenValue;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 5 - 1
master/src/main/resources/mybatis/pssr/TPssrNitrogenMapper.xml

@@ -29,10 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="confirm2Name"    column="confirm2_name"    />
         <result property="dewPoint"    column="dew_point"    />
         <result property="dewPointValue"    column="dew_point_value"    />
+        <result property="oxygenValue"    column="oxygen_value"    />
     </resultMap>
 
     <sql id="selectTPssrNitrogenVo">
-        select d.id, d.dew_point, d.dew_point_value, u1.nick_name confirm1_name, u2.nick_name confirm2_name, d.sub_id, d.approve_id, d.system_name, d.sampling_date, d.sample_name, d.oxygen, d.standard, d.confirm1, d.confirm2, d.confirmation_date, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_nitrogen d
+        select d.id, d.dew_point, d.dew_point_value, d.oxygen_value, u1.nick_name confirm1_name, u2.nick_name confirm2_name, d.sub_id, d.approve_id, d.system_name, d.sampling_date, d.sample_name, d.oxygen, d.standard, d.confirm1, d.confirm2, d.confirmation_date, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_nitrogen d
       left join sys_dept s on s.dept_id = d.dept_id
       left join sys_user u1 on u1.user_id = d.CONFIRM1
       left join sys_user u2 on u2.user_id = d.CONFIRM2
@@ -96,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="samplingDate != null">sampling_date,</if>
             <if test="sampleName != null">sample_name,</if>
             <if test="oxygen != null">oxygen,</if>
+            <if test="oxygenValue != null">oxygen_value,</if>
             <if test="standard != null">standard,</if>
             <if test="confirm1 != null">confirm1,</if>
             <if test="confirm2 != null">confirm2,</if>
@@ -119,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="samplingDate != null">#{samplingDate},</if>
             <if test="sampleName != null">#{sampleName},</if>
             <if test="oxygen != null">#{oxygen},</if>
+            <if test="oxygenValue != null">#{oxygenValue},</if>
             <if test="standard != null">#{standard},</if>
             <if test="confirm1 != null">#{confirm1},</if>
             <if test="confirm2 != null">#{confirm2},</if>
@@ -145,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="samplingDate != null">sampling_date = #{samplingDate},</if>
             <if test="sampleName != null">sample_name = #{sampleName},</if>
             <if test="oxygen != null">oxygen = #{oxygen},</if>
+            <if test="oxygenValue != null">oxygen_value = #{oxygenValue},</if>
             <if test="standard != null">standard = #{standard},</if>
             <if test="confirm1 != null">confirm1 = #{confirm1},</if>
             <if test="confirm2 != null">confirm2 = #{confirm2},</if>

+ 14 - 14
ui/src/views/pssr/cleaning/index.vue

@@ -273,19 +273,23 @@
       <el-table :data="form.contentList" style="width: 100%">
         <el-table-column label="编号" prop="num" align="center" width="100">
           <template #default="{ row, column, $index }">
-            <el-input v-model="row.num" @input="handleSubItemChange($index, row.num)"></el-input>
+            <el-input v-model="row.num"></el-input>
           </template>
         </el-table-column>
         <el-table-column label="检查内容" prop="content" align="center">
           <template #default="{ row, column, $index }">
-            <el-input v-model="row.content" @input="handleSubItemChange($index, row.content)"></el-input>
+            <el-input v-model="row.content"></el-input>
           </template>
         </el-table-column>
-        <el-table-column label="检查结果" prop="result" align="center">
+        <el-table-column label="检查结果" prop="result" align="center" width="140">
           <template #default="{ row, column, $index }">
-            <!--            <el-input v-model="row.result" @input="handleSubItemChange($index, row.result)"></el-input>-->
-            <el-radio v-model="row.result" @change="handleSubItemChange($index, row.result)" label="✔">✔</el-radio>
-            <el-radio v-model="row.result" @change="handleSubItemChange($index, row.result)" label="✖">✖</el-radio>
+            <el-radio v-model="row.result" label="✔">✔</el-radio>
+            <el-radio v-model="row.result" label="✖">✖</el-radio>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作"  align="center" width="50">
+          <template #default="{ row, column, $index }">
+            <el-button type="text" @click="removeContentList($index)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -542,14 +546,10 @@ export default {
   },
   methods: {
     // 处理子项的编辑
-    handleSubItemChangeNum(index, newValue) {
-      this.form.contentList[index].num = newValue;
-    },
-    handleSubItemChangeContent(index, newValue) {
-      this.form.contentList[index].content = newValue;
-    },
-    handleSubItemChangeResult(index, newValue) {
-      this.form.contentList[index].result = newValue;
+    removeContentList(index){
+      console.log(this.form.contentList)
+      console.log(index)
+      this.form.contentList.splice(index,1);
     },
     /** 查询设备清洁列表 */
     getList() {

+ 10 - 0
ui/src/views/pssr/nitrogen/index.vue

@@ -152,6 +152,7 @@
       </el-table-column>
       <el-table-column label="样品名称" align="center" prop="sampleName" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="氧气(%vol)" align="center" prop="oxygen" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="氧气标准值(%vol)" align="center" prop="oxygenValue" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="露点" align="center" prop="dewPoint" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="露点标准值" align="center" prop="dewPointValue" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="合格(是/否)" align="center" prop="standard" :show-overflow-tooltip="true" width="180"/>
@@ -232,6 +233,9 @@
         <el-form-item label="氧气" prop="oxygen">
           <el-input v-model="form.oxygen" placeholder="请输入氧气"/>
         </el-form-item>
+        <el-form-item label="氧气标准值" prop="oxygenValue">
+          <el-input v-model="form.oxygenValue" placeholder="请输入氧气标准值"/>
+        </el-form-item>
         <el-form-item label="露点" prop="dewPoint">
           <el-input v-model="form.dewPoint" placeholder="请输入露点"/>
         </el-form-item>
@@ -475,6 +479,9 @@ export default {
         samplingDate: null,
         sampleName: null,
         oxygen: null,
+        oxygenValue: null,
+        dewPoint: null,
+        dewPointValue: null,
         standard: null,
         confirm1: null,
         confirm2: null,
@@ -547,6 +554,9 @@ export default {
         samplingDate: null,
         sampleName: null,
         oxygen: null,
+        oxygenValue: null,
+        dewPoint: null,
+        dewPointValue: null,
         standard: null,
         confirm1: null,
         confirm2: null,

+ 7 - 0
ui/src/views/pssr/subcontent/index.vue

@@ -79,6 +79,13 @@
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="操作" align="center" fixed="right" width="180" class-name="small-padding fixed-width">
         <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除
+          </el-button>
           <el-button
             size="mini"
             type="text"