Przeglądaj źródła

PSSR功能优化及bug修复

jiangbiao 5 miesięcy temu
rodzic
commit
3d517e2845

+ 0 - 5
master/pom.xml

@@ -405,11 +405,6 @@
             <artifactId>spring-boot-starter-freemarker</artifactId>
             <version>2.3.12.RELEASE</version>
         </dependency>
-        <dependency>
-            <groupId>fr.opensagres.xdocreport</groupId>
-            <artifactId>fr.opensagres.poi.xwpf.converter.pdf-gae</artifactId>
-            <version>1.0.6</version>
-        </dependency>
         <dependency>
             <groupId>com.itextpdf</groupId>
             <artifactId>itextpdf</artifactId>

+ 9 - 17
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrAirtightController.java

@@ -201,11 +201,17 @@ public class TPssrAirtightController extends BaseController {
             return AjaxResult.error("确认人不能为同一人,请重新选择!");
         }
         tPssrAirtight.setApproveStatus(0L);
+        check(tPssrAirtight);
+        return toAjax(tPssrAirtightService.insertTPssrAirtight(tPssrAirtight));
+    }
+
+    private void check(TPssrAirtight tPssrAirtight){
         try {
             String initialPressure = tPssrAirtight.getInitialPressure();//初始压力
             String finalPressure = tPssrAirtight.getFinalPressure();//最终压力
             //泄漏率=(初始压力-最终压力)/初始压力*100%
-            BigDecimal leakageRate = new BigDecimal(initialPressure).subtract(new BigDecimal(finalPressure)).divide(new BigDecimal(initialPressure), 3, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
+            BigDecimal leakageRate = new BigDecimal(initialPressure).subtract(new BigDecimal(finalPressure))
+                    .divide(new BigDecimal(initialPressure), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
             tPssrAirtight.setLeakageRate(String.valueOf(leakageRate.doubleValue()));//设置泄漏率
             if (leakageRate.compareTo(new BigDecimal(tPssrAirtight.getStandard())) <= 0) {//判断是否满足标准
                 tPssrAirtight.setUptoStandard("是");
@@ -213,9 +219,8 @@ public class TPssrAirtightController extends BaseController {
                 tPssrAirtight.setUptoStandard("否");
             }
         } catch (Exception e) {
-            e.printStackTrace();
+            tPssrAirtight.setUptoStandard("否");
         }
-        return toAjax(tPssrAirtightService.insertTPssrAirtight(tPssrAirtight));
     }
 
     /**
@@ -228,21 +233,8 @@ public class TPssrAirtightController extends BaseController {
         if (tPssrAirtight.getConfirm1().equals(tPssrAirtight.getConfirm2())){
             return AjaxResult.error("确认人不能为同一人,请重新选择!");
         }
+        check(tPssrAirtight);
         tPssrFileService.updateFileRelevance(tPssrAirtight.getFileIds(), forShort, tPssrAirtight.getId(), tPssrAirtight.getSubId());
-        try {
-            String initialPressure = tPssrAirtight.getInitialPressure();//初始压力
-            String finalPressure = tPssrAirtight.getFinalPressure();//最终压力
-            //泄漏率=(初始压力-最终压力)/初始压力*100%
-            BigDecimal leakageRate = new BigDecimal(initialPressure).subtract(new BigDecimal(finalPressure)).divide(new BigDecimal(initialPressure), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
-            tPssrAirtight.setLeakageRate(String.valueOf(leakageRate.doubleValue()));//设置泄漏率
-            if (leakageRate.compareTo(new BigDecimal(tPssrAirtight.getStandard())) <= 0) {//判断是否满足标准
-                tPssrAirtight.setUptoStandard("是");
-            } else {
-                tPssrAirtight.setUptoStandard("否");
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
         return toAjax(tPssrAirtightService.updateTPssrAirtight(tPssrAirtight));
     }
 

+ 11 - 3
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrBlindController.java

@@ -246,7 +246,7 @@ public class TPssrBlindController extends BaseController {
                 num++;
                 rowIndex++;
             }
-            filename = "PSSR_04_盲板"  + ".xlsx";
+            filename = "PSSR_04_盲板" + ".xlsx";
             out = new FileOutputStream(ExcelUtil.getAbsoluteFile(filename));
             wb.write(out);
             wb.close();
@@ -279,7 +279,7 @@ public class TPssrBlindController extends BaseController {
     @Log(title = "盲板", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPssrBlind tPssrBlind) {
-        if (StringUtils.isNotEmpty(tPssrBlind.getInConfirm1())&&tPssrBlind.getInConfirm1().equals(tPssrBlind.getInConfirm2())) {
+        if (StringUtils.isNotEmpty(tPssrBlind.getInConfirm1()) && tPssrBlind.getInConfirm1().equals(tPssrBlind.getInConfirm2())) {
             return AjaxResult.error("确认人不能为同一人,请重新选择!");
         }
         tPssrBlind.setApproveStatus(0L);
@@ -296,7 +296,15 @@ public class TPssrBlindController extends BaseController {
         if (tPssrBlind.getInConfirm1().equals(tPssrBlind.getInConfirm2())) {
             return AjaxResult.error("确认人不能为同一人,请重新选择!");
         }
-        if (StringUtils.isNotEmpty(tPssrBlind.getStartupStatus()) && !tPssrBlind.getStartupStatus().equals(tPssrBlind.getActualStatus())) {
+        if (StringUtils.isNotEmpty(tPssrBlind.getStartupStatus()) && StringUtils.isEmpty(tPssrBlind.getActualStatus())) {
+            tPssrBlind.setActualStatus(tPssrBlind.getStartupStatus());
+        } else if (StringUtils.isEmpty(tPssrBlind.getStartupStatus()) && StringUtils.isNotEmpty(tPssrBlind.getActualStatus())) {
+            tPssrBlind.setStartupStatus(tPssrBlind.getActualStatus());
+        }
+
+        if(StringUtils.isNotEmpty(tPssrBlind.getStartupStatus())&&tPssrBlind.getStartupStatus().equals(tPssrBlind.getActualStatus())){
+            tPssrBlind.setSatisfy("✔");
+        }else{
             tPssrBlind.setSatisfy("✖");
         }
         tPssrFileService.updateFileRelevance(tPssrBlind.getFileIds(), forShort, tPssrBlind.getId(), tPssrBlind.getSubId());

+ 41 - 15
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrCircuitController.java

@@ -82,12 +82,11 @@ public class TPssrCircuitController extends BaseController {
      */
     @PreAuthorize("@ss.hasPermi('pssr:circuit:add')")
     @PostMapping("/importData")
-    public AjaxResult importInterlockData(MultipartFile file, Long subId) throws IOException
-    {
+    public AjaxResult importInterlockData(MultipartFile file, Long subId) throws IOException {
         //获取操作人员ID
         Long userId = getUserId();
         //报错行数统计
-        List<Integer> failRow =new ArrayList<Integer>();
+        List<Integer> failRow = new ArrayList<Integer>();
         Workbook workbook = ExcelUtils.getWorkBook(file);
         Sheet sheet = workbook.getSheetAt(0);
         List<TPssrCircuit> list = new ArrayList<TPssrCircuit>();
@@ -130,9 +129,9 @@ public class TPssrCircuitController extends BaseController {
                 entity.setCreaterCode(userId.toString());
                 logger.info("entity:" + entity);
                 list.add(entity);
-            }catch (Exception e){
+            } catch (Exception e) {
                 failNumber++;
-                failRow.add(i+1);
+                failRow.add(i + 1);
             }
         }
         int successNumber = 0;
@@ -143,16 +142,16 @@ public class TPssrCircuitController extends BaseController {
             try {
                 this.add(t);
                 successNumber++;
-            }catch (Exception e){
+            } catch (Exception e) {
                 failNumber++;
                 logger.info("e:" + e);
-                failRow.add(failNum+1);
+                failRow.add(failNum + 1);
             }
         }
         logger.info("list:" + JSON.toJSONString(list));
-        logger.info("successNumber:" +String.valueOf(successNumber));
-        logger.info("failNumber:" +String.valueOf(failNumber));
-        logger.info("failRow:" +String.valueOf(failRow));
+        logger.info("successNumber:" + String.valueOf(successNumber));
+        logger.info("failNumber:" + String.valueOf(failNumber));
+        logger.info("failRow:" + String.valueOf(failRow));
         return AjaxResult.success("导入成功行数:" + String.valueOf(successNumber));
     }
 
@@ -240,7 +239,7 @@ public class TPssrCircuitController extends BaseController {
                 num++;
                 rowIndex++;
             }
-            filename = "PSSR_11_短接"  + ".xlsx";
+            filename = "PSSR_11_短接" + ".xlsx";
             out = new FileOutputStream(ExcelUtil.getAbsoluteFile(filename));
             wb.write(out);
             wb.close();
@@ -271,9 +270,24 @@ public class TPssrCircuitController extends BaseController {
     @Log(title = "短接", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TPssrCircuit tPssrCircuit) {
-        if (StringUtils.isNotEmpty(tPssrCircuit.getConfirm1())&&tPssrCircuit.getConfirm1().equals(tPssrCircuit.getConfirm2())) {
+        if (StringUtils.isNotEmpty(tPssrCircuit.getConfirm1()) && tPssrCircuit.getConfirm1().equals(tPssrCircuit.getConfirm2())) {
             return AjaxResult.error("确认人不能为同一人,请重新选择!");
         }
+        if (StringUtils.isNotEmpty(tPssrCircuit.getRightStatus()) && StringUtils.isEmpty(tPssrCircuit.getCurrentStatus())) {
+            tPssrCircuit.setCurrentStatus(tPssrCircuit.getRightStatus());
+            tPssrCircuit.setCurrentStatusRight("是");
+        } else if (StringUtils.isNotEmpty(tPssrCircuit.getRightStatus()) && StringUtils.isNotEmpty(tPssrCircuit.getCurrentStatus())) {
+            if (tPssrCircuit.getRightStatus().equals(tPssrCircuit.getCurrentStatus())) {
+                tPssrCircuit.setCurrentStatusRight("是");
+            } else {
+                tPssrCircuit.setCurrentStatusRight("否");
+            }
+        } else if (StringUtils.isEmpty(tPssrCircuit.getRightStatus()) && StringUtils.isNotEmpty(tPssrCircuit.getCurrentStatus())) {
+            tPssrCircuit.setRightStatus(tPssrCircuit.getCurrentStatus());
+            tPssrCircuit.setCurrentStatusRight("是");
+        } else {
+            tPssrCircuit.setCurrentStatusRight("否");
+        }
         tPssrCircuit.setApproveStatus(0L);
         return toAjax(tPssrCircuitService.insertTPssrCircuit(tPssrCircuit));
     }
@@ -285,10 +299,22 @@ public class TPssrCircuitController extends BaseController {
     @Log(title = "短接", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TPssrCircuit tPssrCircuit) {
-        if (tPssrCircuit.getConfirm1().equals(tPssrCircuit.getConfirm2())){
+        if (tPssrCircuit.getConfirm1().equals(tPssrCircuit.getConfirm2())) {
             return AjaxResult.error("确认人不能为同一人,请重新选择!");
         }
-        if (StringUtils.isNotEmpty(tPssrCircuit.getRightStatus())&&!tPssrCircuit.getRightStatus().equals(tPssrCircuit.getCurrentStatus())){
+        if (StringUtils.isNotEmpty(tPssrCircuit.getRightStatus()) && StringUtils.isEmpty(tPssrCircuit.getCurrentStatus())) {
+            tPssrCircuit.setCurrentStatus(tPssrCircuit.getRightStatus());
+            tPssrCircuit.setCurrentStatusRight("是");
+        } else if (StringUtils.isNotEmpty(tPssrCircuit.getRightStatus()) && StringUtils.isNotEmpty(tPssrCircuit.getCurrentStatus())) {
+            if (tPssrCircuit.getRightStatus().equals(tPssrCircuit.getCurrentStatus())) {
+                tPssrCircuit.setCurrentStatusRight("是");
+            } else {
+                tPssrCircuit.setCurrentStatusRight("否");
+            }
+        } else if (StringUtils.isEmpty(tPssrCircuit.getRightStatus()) && StringUtils.isNotEmpty(tPssrCircuit.getCurrentStatus())) {
+            tPssrCircuit.setRightStatus(tPssrCircuit.getCurrentStatus());
+            tPssrCircuit.setCurrentStatusRight("是");
+        } else {
             tPssrCircuit.setCurrentStatusRight("否");
         }
         tPssrFileService.updateFileRelevance(tPssrCircuit.getFileIds(), "dj", tPssrCircuit.getId(), tPssrCircuit.getSubId());
@@ -302,7 +328,7 @@ public class TPssrCircuitController extends BaseController {
     @Log(title = "短接", businessType = BusinessType.UPDATE)
     @PutMapping("/editBatch")
     public AjaxResult editb(@RequestBody TPssrCircuit tPssrCircuit) {
-        if (tPssrCircuit.getConfirm1().equals(tPssrCircuit.getConfirm2())){
+        if (tPssrCircuit.getConfirm1().equals(tPssrCircuit.getConfirm2())) {
             return AjaxResult.error("确认人不能为同一人,请重新选择!");
         }
         return toAjax(tPssrCircuitMapper.updateTPssrCircuitByIds(tPssrCircuit));

+ 16 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrNitrogenController.java

@@ -280,6 +280,7 @@ public class TPssrNitrogenController extends BaseController {
         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
                     && new BigDecimal(dewPoint).compareTo(new BigDecimal(dewPointValue)) == -1) {
@@ -287,12 +288,26 @@ public class TPssrNitrogenController extends BaseController {
             } else {
                 standard = "否";
             }
-        } else if (StringUtils.isNotEmpty(oxygen)&&StringUtils.isEmpty(dewPoint) ) {//判断氧气
+        } else if (StringUtils.isNotEmpty(oxygen)&&StringUtils.isEmpty(dewPoint)&&StringUtils.isEmpty(dewPointValue) ) {//判断氧气
+            //氧气不为空 露点值为空 标准也为空
             if (new BigDecimal(oxygen).compareTo(new BigDecimal(0.2)) == -1) {
                 standard = "是";
             } else {
                 standard = "否";
             }
+        } else if (StringUtils.isEmpty(oxygen)&&StringUtils.isNotEmpty(dewPointValue) ) {//判断氧气
+            //氧气为空 标准不为空
+            if (StringUtils.isEmpty(dewPoint)) {
+                standard = "否";
+            } else  {
+                if (new BigDecimal(dewPoint).compareTo(new BigDecimal(dewPointValue)) == -1) {
+                    standard = "是";
+                } else {
+                    standard = "否";
+                }
+            }
+        }else{
+            standard = "否";
         }
         tPssrNitrogen.setStandard(standard);
     }

+ 4 - 1
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrSubcontentController.java

@@ -13,6 +13,7 @@ import com.ruoyi.framework.config.RuoYiConfig;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.officeConvert.OfficeConvertController;
 import com.ruoyi.project.pssr.domain.TPssrAboveall;
 import com.ruoyi.project.pssr.domain.TPssrApprove;
 import com.ruoyi.project.pssr.domain.TPssrSubcontent;
@@ -70,6 +71,8 @@ public class TPssrSubcontentController extends BaseController {
 
     @Autowired
     private TaskService taskService;
+    @Resource
+    private OfficeConvertController officeConvertController;
 
     /**
      * 查询开车条件确认列表
@@ -114,7 +117,7 @@ public class TPssrSubcontentController extends BaseController {
         String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss"));
         String fileName = time + tPssrSubcontent.getAboveallId() + "_" + DateUtils.getDate() + ".docx";
         String wordPath = createWord(templatePath, fileDir, fileName, params, "pssr");
-        return AjaxResult.success(wordPath);
+        return AjaxResult.success(officeConvertController.wordTransPdf(wordPath));
 
     }
 

+ 9 - 1
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrBlindServiceImpl.java

@@ -59,8 +59,16 @@ public class TPssrBlindServiceImpl implements ITPssrBlindService
     @Override
     public int insertTPssrBlind(TPssrBlind tPssrBlind)
     {
-        if(StringUtils.isEmpty(tPssrBlind.getActualStatus())&&StringUtils.isNotEmpty(tPssrBlind.getStartupStatus())){
+        if (StringUtils.isNotEmpty(tPssrBlind.getStartupStatus()) && StringUtils.isEmpty(tPssrBlind.getActualStatus())) {
             tPssrBlind.setActualStatus(tPssrBlind.getStartupStatus());
+        } else if (StringUtils.isEmpty(tPssrBlind.getStartupStatus()) && StringUtils.isNotEmpty(tPssrBlind.getActualStatus())) {
+            tPssrBlind.setStartupStatus(tPssrBlind.getActualStatus());
+        }
+
+        if(StringUtils.isNotEmpty(tPssrBlind.getStartupStatus())&&tPssrBlind.getStartupStatus().equals(tPssrBlind.getActualStatus())){
+            tPssrBlind.setSatisfy("✔");
+        }else{
+            tPssrBlind.setSatisfy("✖");
         }
         return tPssrBlindMapper.insertTPssrBlind(tPssrBlind);
     }

+ 0 - 4
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrCircuitServiceImpl.java

@@ -59,10 +59,6 @@ public class TPssrCircuitServiceImpl implements ITPssrCircuitService
     @Override
     public int insertTPssrCircuit(TPssrCircuit tPssrCircuit)
     {
-        if (StringUtils.isEmpty(tPssrCircuit.getCurrentStatus())&&StringUtils.isNotEmpty(tPssrCircuit.getRightStatus())){
-            tPssrCircuit.setCurrentStatus(tPssrCircuit.getRightStatus());
-            tPssrCircuit.setCurrentStatusRight("是");
-        }
         return tPssrCircuitMapper.insertTPssrCircuit(tPssrCircuit);
     }
 

BIN
master/src/main/resources/static/word/pssr/pssrConfirm.docx


+ 164 - 153
ui/src/views/pssr/airtight/index.vue

@@ -43,7 +43,8 @@
           @click="handleAdd"
           v-hasPermi="['pssr:airtight:add']"
           v-if="isApprove==0"
-        >新增</el-button>
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -54,7 +55,8 @@
           @click="handleUpdate"
           v-hasPermi="['pssr:airtight:edit']"
           v-if="isApprove==0"
-        >修改</el-button>
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -77,18 +79,20 @@
           @click="handleDelete"
           v-hasPermi="['pssr:airtight:remove']"
           v-if="isApprove==0"
-        >删除</el-button>
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['pssr:airtight:edit']"
+          v-if="isApprove==0"
+        >导入
+        </el-button>
       </el-col>
-        <el-col :span="1.5">
-            <el-button
-                    type="info"
-                    icon="el-icon-upload2"
-                    size="mini"
-                    @click="handleImport"
-                    v-hasPermi="['pssr:airtight:edit']"
-                    v-if="isApprove==0"
-            >导入</el-button>
-        </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -97,7 +101,8 @@
           @click="handleExport"
           v-hasPermi="['pssr:airtight:export']"
           v-if="isApprove==0"
-        >导出</el-button>
+        >导出
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -133,19 +138,19 @@
         >驳回
         </el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
 
-
     <div style="width: 100%;text-align: center;margin-bottom: 15px">
       <h2>气密确认表</h2><br>
       <span>备注:气密检查,如果检查不符合要求,必须查找原因并立即整改。</span><br>
       <span>要求:试验时间为1小时,若泄漏率达标,即为合格。泄漏率=(保压始压力(kpa)-保压终压力(kpa))/保压始压力(kpa)×100%</span>
     </div>
 
-    <el-table v-loading="loading" :data="airtightList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
+    <el-table v-loading="loading" :data="airtightList" @selection-change="handleSelectionChange" :height="clientHeight"
+              border>
+      <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="审批状态" align="center" prop="approveStatus" width="100">
         <template slot-scope="scope">
           <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
@@ -160,7 +165,11 @@
       <el-table-column label="气密压力(kpa)" align="center" prop="airtightPressure" :show-overflow-tooltip="true"/>
       <el-table-column label="保压始压力(kpa)" align="center" prop="initialPressure" :show-overflow-tooltip="true"/>
       <el-table-column label="保压终压力(kpa)" align="center" prop="finalPressure" :show-overflow-tooltip="true"/>
-      <el-table-column label="泄露率" align="center" prop="leakageRate" :show-overflow-tooltip="true"/>
+      <el-table-column label="泄露率" align="center" prop="leakageRate" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.leakageRate">{{ scope.row.leakageRate }}%</span>
+        </template>
+      </el-table-column>
       <el-table-column label="合格标准(泄露率)" align="center" prop="standard" :show-overflow-tooltip="true"/>
       <el-table-column label="合格(是/否)" align="center" prop="uptoStandard" :show-overflow-tooltip="true"/>
       <!--<el-table-column label="确认人" align="center" prop="identifyingPerson" :show-overflow-tooltip="true"/>-->
@@ -183,7 +192,8 @@
       </el-table-column>
       <el-table-column label="驳回原因" align="center" prop="reason" :show-overflow-tooltip="true"/>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width" v-if="isApprove==0">
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width"
+                       v-if="isApprove==0">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -198,14 +208,16 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['pssr:airtight:edit']"
-          >修改</el-button>
+          >修改
+          </el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['pssr:airtight:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -222,25 +234,25 @@
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="单元" prop="unit">
-          <el-input v-model="form.unit" placeholder="请输入单元" />
+          <el-input v-model="form.unit" placeholder="请输入单元"/>
         </el-form-item>
         <el-form-item label="系统名称" prop="systemName">
-          <el-input v-model="form.systemName" placeholder="请输入系统名称" />
+          <el-input v-model="form.systemName" placeholder="请输入系统名称"/>
         </el-form-item>
         <el-form-item label="气密介质" prop="airtightMedium">
-          <el-input v-model="form.airtightMedium" placeholder="请输入气密介质" />
+          <el-input v-model="form.airtightMedium" placeholder="请输入气密介质"/>
         </el-form-item>
         <el-form-item label="气密压力(kpa)" prop="airtightPressure">
-          <el-input v-model="form.airtightPressure" placeholder="请输入气密压力(kpa)" />
+          <el-input v-model="form.airtightPressure" placeholder="请输入气密压力(kpa)"/>
         </el-form-item>
         <el-form-item label="保压始压力(kpa)" prop="initialPressure">
-          <el-input v-model="form.initialPressure" placeholder="请输入保压始压力(kpa)" />
+          <el-input v-model="form.initialPressure" placeholder="请输入保压始压力(kpa)"/>
         </el-form-item>
         <el-form-item label="保压终压力(kpa)" prop="finalPressure">
-          <el-input v-model="form.finalPressure" placeholder="请输入保压终压力(kpa)" />
+          <el-input v-model="form.finalPressure" placeholder="请输入保压终压力(kpa)"/>
         </el-form-item>
         <el-form-item label="合格标准(泄露率)" prop="standard">
-          <el-input v-model="form.standard" placeholder="请输入合格标准(泄露率)" />
+          <el-input v-model="form.standard" placeholder="请输入合格标准(泄露率)"/>
         </el-form-item>
         <el-form-item label="确认人1" prop="confirm1">
           <el-select v-model="form.confirm1" clearable filterable style="width: 100%;"
@@ -261,7 +273,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" />
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -312,39 +324,40 @@
         <el-button @click="cancelBatch">取 消</el-button>
       </div>
     </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-                <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
-                  <input name="type" :value="upload.type" hidden />
-                </form>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
+               append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+          <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+            <input name="type" :value="upload.type" hidden/>
+          </form>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
 
     <!-- 附件对话框 -->
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
@@ -352,15 +365,15 @@
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
     </el-dialog>
 
-  <!-- 驳回原因对话框 -->
+    <!-- 驳回原因对话框 -->
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="reason.open" append-to-body title="驳回"
                width="1000px">
-      <el-table  :data="items" border>
+      <el-table :data="items" border>
         <el-table-column label="单元" align="center" prop="unit" :show-overflow-tooltip="true"/>
         <el-table-column label="系统名称" align="center" prop="systemName" :show-overflow-tooltip="true"/>
         <el-table-column label="驳回原因" align="center" prop="reason" :show-overflow-tooltip="true">
           <template slot-scope="scope">
-              <el-input v-model="scope.row.reason" placeholder="请输入驳回原因"/>
+            <el-input v-model="scope.row.reason" placeholder="请输入驳回原因"/>
           </template>
         </el-table-column>
       </el-table>
@@ -369,7 +382,7 @@
         <el-button @click="reasonCancel">取 消</el-button>
       </div>
     </el-dialog>
-</div>
+  </div>
 </template>
 
 <script>
@@ -380,7 +393,6 @@ import {
   getAirtight,
   handleConfirmAirtight,
   handleTurnDownAirtight,
-  importTemplate,
   listAirtight,
   updateAirtight,
   updateAirtightBatch,
@@ -392,12 +404,11 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
 
 export default {
-  dicts:['pssr_approve_status'],
+  dicts: ['pssr_approve_status'],
   name: "Airtight",
-  components: { Treeselect },
+  components: {Treeselect},
   props: {
     subId: {
       type: Number,
@@ -444,29 +455,29 @@ export default {
       title: "",
       // 部门树选项
       deptOptions: undefined,
-      clientHeight:300,
+      clientHeight: 300,
       // 是否显示弹出层
       open: false,
       openBatch: false,
-        // 用户导入参数
-        upload: {
-          //下载模板请求地址
-          downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
-          //下载模板类型
-          type: 'airtight',
-            // 是否显示弹出层(用户导入)
-            open: false,
-            // 弹出层标题(用户导入)
-            title: "",
-            // 是否禁用上传
-            isUploading: false,
-            // 是否更新已经存在的用户数据
-            updateSupport: 0,
-            // 设置上传的请求头部
-            headers: { Authorization: "Bearer " + getToken() },
-            // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/pssr/airtight/importData?subId=" + this.subId
-        },
+      // 用户导入参数
+      upload: {
+        //下载模板请求地址
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        //下载模板类型
+        type: 'airtight',
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/pssr/airtight/importData?subId=" + this.subId
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -500,16 +511,16 @@ export default {
     };
   },
   watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
   created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight - 350
-      })
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 350
+    })
     this.getList();
     this.getTreeselect();
     getPssrUser().then(res => {
@@ -526,12 +537,12 @@ export default {
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -575,9 +586,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.items=selection;
+      this.items = selection;
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -620,54 +631,54 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delAirtight(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delAirtight(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有气密数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportAirtight(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportAirtight(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.$refs['downloadFileForm'].submit()
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = "用户导入";
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-        this.$refs['downloadFileForm'].submit()
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
-      },
     /** 确认按钮操作*/
     handleApprove() {
       doApprove(this.subId).then(res => {
@@ -699,7 +710,7 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
+      this.doc.fileList = []
       this.doc.open = true;
       this.doc.queryParams.itemId = row.id
       this.getFileList()
@@ -715,14 +726,14 @@ export default {
     reasonCancel() {
       this.reason.open = false;
     },
-    submitReasonForm(){
+    submitReasonForm() {
       handleTurnDownAirtight(this.items).then(res => {
         this.msgSuccess("驳回成功");
         this.reason.open = false;
         this.$emit('refreshHisList');
       })
     },
-    handleBatch(){
+    handleBatch() {
       this.reset();
       this.openBatch = true
     },

+ 8 - 8
ui/src/views/pssr/circuit/index.vue

@@ -160,13 +160,13 @@
       <el-table-column label="尺寸" align="center" prop="circuitSize" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="正确状态" align="center" prop="rightStatus" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="当前状态(连通/断开)" align="center" prop="currentStatus" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="当前状态正确(是/否)" align="center" prop="currentStatusRight" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="确认人1" align="center" prop="confirm1" :show-overflow-tooltip="true"
                        width="150">
         <template slot-scope="scope">
           <span>{{ scope.row.confirm1Name }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="当前状态正确(是/否)" align="center" prop="currentStatusRight" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="确认人2" align="center" prop="confirm2" :show-overflow-tooltip="true"
                        width="150">
         <template slot-scope="scope">
@@ -253,6 +253,13 @@
             <el-radio label="断开">断开</el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item label="当前状态正确" prop="currentStatusRight">
+
+          <el-radio-group v-model="form.currentStatusRight">
+            <el-radio label="是">是</el-radio>
+            <el-radio label="否">否</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="确认人1" prop="confirm1">
           <el-select v-model="form.confirm1" clearable filterable style="width: 100%;"
                      placeholder="请选择确认人1">
@@ -262,13 +269,6 @@
                        :key="user.userId"/>
           </el-select>
         </el-form-item>
-        <el-form-item label="当前状态正确" prop="currentStatusRight">
-
-          <el-radio-group v-model="form.currentStatusRight">
-            <el-radio label="是">是</el-radio>
-            <el-radio label="否">否</el-radio>
-          </el-radio-group>
-        </el-form-item>
         <el-form-item label="确认人2" prop="confirm2">
           <el-select v-model="form.confirm2" clearable filterable style="width: 100%;"
                      placeholder="请选择确认人2">

+ 27 - 17
ui/src/views/pssr/cleaning/index.vue

@@ -10,6 +10,18 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="设备类型" prop="devType">
+        <el-select v-model="queryParams.devType" @change="handleQuery" placeholder="请选择设备类型">
+          <el-option label="开工锅炉" value="开工锅炉"/>
+          <el-option label="裂解炉" value="裂解炉"/>
+          <el-option label="塔" value="塔"/>
+          <el-option label="罐" value="罐"/>
+          <el-option label="反应器" value="反应器"/>
+          <el-option label="干燥器" value="干燥器"/>
+          <el-option label="换热器" value="换热器"/>
+          <el-option label="冷箱" value="冷箱"/>
+        </el-select>
+      </el-form-item>
       <el-form-item label="检查内容" prop="checkContent">
         <el-input
           v-model="queryParams.checkContent"
@@ -151,8 +163,8 @@
       <el-table-column label="设备类型" align="center" prop="devType" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="位号" align="center" prop="devNo" :show-overflow-tooltip="true" width="180"/>
       <!-- 展开行 -->
-      <el-table-column  label="检查项目" align="center" width="600">
-        <template  slot-scope="scope">
+      <el-table-column label="检查项目" align="center" width="600">
+        <template slot-scope="scope">
           <el-table :data="scope.row.contentList" :show-header="false" style="width: 100%">
             <el-table-column label="编号" prop="num" align="center" width="80"/>
             <el-table-column label="检查内容" prop="content" align="center"/>
@@ -277,9 +289,9 @@
         </el-table-column>
         <el-table-column label="检查结果" prop="result" align="center">
           <template #default="{ row, column, $index }">
-<!--            <el-input v-model="row.result" @input="handleSubItemChange($index, row.result)"></el-input>-->
+            <!--            <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" @change="handleSubItemChange($index, row.result)" label="✖">✖</el-radio>
           </template>
         </el-table-column>
       </el-table>
@@ -315,7 +327,7 @@
                        :key="user.userId"/>
           </el-select>
         </el-form-item>
-        <el-form-item label="时间"  v-hasPermi="['pssr:date:edit']" prop="confirmationDate">
+        <el-form-item label="时间" v-hasPermi="['pssr:date:edit']" prop="confirmationDate">
           <el-date-picker clearable size="small" style="width: 200px"
                           v-model="form.confirmationDate"
                           type="date"
@@ -332,7 +344,7 @@
         <el-button @click="cancelBatch">取 消</el-button>
       </div>
     </el-dialog>
-      <!-- 用户导入对话框 -->
+    <!-- 用户导入对话框 -->
     <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
                append-to-body>
       <el-upload
@@ -357,7 +369,7 @@
           <!--是否更新已经存在的用户数据-->
           <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
           <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
-            <input name="type" :value="upload.type" hidden />
+            <input name="type" :value="upload.type" hidden/>
           </form>
         </div>
         <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
@@ -373,15 +385,15 @@
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
     </el-dialog>
-  <!-- 驳回原因对话框 -->
+    <!-- 驳回原因对话框 -->
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="reason.open" append-to-body title="驳回"
                width="1000px">
-      <el-table  :data="items" border>
+      <el-table :data="items" border>
         <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true" width="100"/>
         <el-table-column label="检查内容" align="center" prop="checkContent" :show-overflow-tooltip="true"/>
         <el-table-column label="驳回原因" align="center" prop="reason" :show-overflow-tooltip="true">
           <template slot-scope="scope">
-              <el-input v-model="scope.row.reason" placeholder="请输入驳回原因"/>
+            <el-input v-model="scope.row.reason" placeholder="请输入驳回原因"/>
           </template>
         </el-table-column>
       </el-table>
@@ -390,7 +402,7 @@
         <el-button @click="reasonCancel">取 消</el-button>
       </div>
     </el-dialog>
-</div>
+  </div>
 </template>
 
 <script>
@@ -401,7 +413,6 @@ import {
   getCleaning,
   handleConfirmCleaning,
   handleTurnDownCleaning,
-  importTemplate,
   listCleaning,
   updateCleaning,
   updateCleaningBatch,
@@ -412,7 +423,6 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
 
 export default {
   dicts: ['pssr_approve_status'],
@@ -602,7 +612,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.items=selection;
+      this.items = selection;
       this.ids = selection.map(item => item.id)
       this.single = selection.length !== 1
       this.multiple = !selection.length
@@ -715,7 +725,7 @@ export default {
       })
     },
     handleTurnDown(val) {
-        this.reason.open=true;
+      this.reason.open = true;
     },
     userFormat(userId) {
       for (let item of this.userOptions) {
@@ -728,14 +738,14 @@ export default {
     reasonCancel() {
       this.reason.open = false;
     },
-    submitReasonForm(){
+    submitReasonForm() {
       handleTurnDownCleaning(this.items).then(res => {
         this.msgSuccess("驳回成功");
         this.reason.open = false;
         this.$emit('refreshHisList');
       })
     },
-    handleBatch(){
+    handleBatch() {
       this.reset();
       this.openBatch = true
     },