Переглянути джерело

-修改错别字
-添加已修复未修复统计

jiangbiao 2 роки тому
батько
коміт
225f3284fc
22 змінених файлів з 111 додано та 36 видалено
  1. 1 1
      master/src/main/java/com/ruoyi/project/base/domain/TBasePoint.java
  2. 1 1
      master/src/main/java/com/ruoyi/project/check/controller/TCheckCheckpointsController.java
  3. 1 1
      master/src/main/java/com/ruoyi/project/check/controller/TCheckLawsController.java
  4. 3 3
      master/src/main/java/com/ruoyi/project/check/domain/TCheckCheckpoints.java
  5. 2 2
      master/src/main/java/com/ruoyi/project/check/domain/TCheckLawitems.java
  6. 3 3
      master/src/main/java/com/ruoyi/project/check/domain/TCheckRepairpoints.java
  7. 1 1
      master/src/main/java/com/ruoyi/project/check/service/impl/TCheckCheckpointsServiceImpl.java
  8. 12 1
      master/src/main/java/com/ruoyi/project/statistics/controller/StatisticsController.java
  9. 19 2
      master/src/main/java/com/ruoyi/project/statistics/domain/Statistics.java
  10. 4 0
      master/src/main/java/com/ruoyi/project/statistics/mapper/StatisticsMapper.java
  11. 5 0
      master/src/main/java/com/ruoyi/project/statistics/service/IStatisticsService.java
  12. 10 0
      master/src/main/java/com/ruoyi/project/statistics/service/impl/IStatisticsServiceImpl.java
  13. 24 0
      master/src/main/resources/mybatis/statistics/StatisticsMapper.xml
  14. 2 2
      ui/src/views/check/inspectionCheck/pointEnter.vue
  15. 3 3
      ui/src/views/check/lawitems/index.vue
  16. 1 1
      ui/src/views/check/repairCheck/repairEnter.vue
  17. 1 1
      ui/src/views/index.vue
  18. 8 4
      ui/src/views/statistics/index.vue
  19. 3 3
      ui/src/views/statistics/plantCountChart.vue
  20. 3 3
      ui/src/views/statistics/ptCountChart.vue
  21. 2 2
      ui/src/views/task/inspection/dividePoint.vue
  22. 2 2
      ui/src/views/task/plan/planPoint.vue

+ 1 - 1
master/src/main/java/com/ruoyi/project/base/domain/TBasePoint.java

@@ -38,7 +38,7 @@ public class TBasePoint extends BaseEntity {
     /**
      * 泄漏程度
      */
-    @Excel(name = "泄漏程度",readConverterExp = "1=不漏,2=一般泄,3=严重泄漏")
+    @Excel(name = "泄漏程度",readConverterExp = "1=不漏,2=一般泄,3=严重泄漏")
     private String leakageDegree;
 
 

+ 1 - 1
master/src/main/java/com/ruoyi/project/check/controller/TCheckCheckpointsController.java

@@ -209,7 +209,7 @@ public class TCheckCheckpointsController extends BaseController {
                             //检测值
                             entity.setTestValue(cellValue);
                         } else if (j == 4) {
-                            // 泄部位
+                            // 泄部位
                             entity.setLeakagePosition(cellValue);
                         } else if (j == 5) {
                             //检测仪器编号

+ 1 - 1
master/src/main/java/com/ruoyi/project/check/controller/TCheckLawsController.java

@@ -107,7 +107,7 @@ public class TCheckLawsController extends BaseController {
                     tCheckLawitem.setPlantType(plantType.getDictValue());
                     tCheckLawitem.setPointType(pointType.getDictValue());
                     tCheckLawitem.setMediumType(mediumType.getDictValue());
-                    // TODO 频率、泄标准、维修天数需确认
+                    // TODO 频率、泄标准、维修天数需确认
                     tCheckLawitem.setDetectionFrequency("3");
                     tCheckLawitem.setGeneral("50");
                     tCheckLawitem.setSerious("200");

+ 3 - 3
master/src/main/java/com/ruoyi/project/check/domain/TCheckCheckpoints.java

@@ -118,9 +118,9 @@ public class TCheckCheckpoints extends BaseEntity {
     private String instrumentCode;
 
     /**
-     * 泄部位
+     * 泄部位
      */
-    @Excel(name = "泄部位")
+    @Excel(name = "泄部位")
     private String leakagePosition;
 
     /**
@@ -139,7 +139,7 @@ public class TCheckCheckpoints extends BaseEntity {
     /**
      * 泄漏程度
      */
-    @Excel(name = "泄漏程度",readConverterExp = "1=不漏,2=一般泄,3=严重泄漏")
+    @Excel(name = "泄漏程度",readConverterExp = "1=不漏,2=一般泄,3=严重泄漏")
     private String leakageDegree;
 
     /**

+ 2 - 2
master/src/main/java/com/ruoyi/project/check/domain/TCheckLawitems.java

@@ -46,9 +46,9 @@ public class TCheckLawitems extends BaseEntity {
     private String mediumType;
 
     /**
-     * 一般泄标准
+     * 一般泄标准
      */
-    @Excel(name = "一般泄标准")
+    @Excel(name = "一般泄标准")
     private String general;
 
     /**

+ 3 - 3
master/src/main/java/com/ruoyi/project/check/domain/TCheckRepairpoints.java

@@ -80,8 +80,8 @@ public class TCheckRepairpoints extends BaseEntity
     @Excel(name = "仪器编号")
     private String instrumentCode;
 
-    /** 泄部位 */
-    @Excel(name = "泄部位")
+    /** 泄部位 */
+    @Excel(name = "泄部位")
     private String leakagePosition;
 
     /** 维修人员 */
@@ -94,7 +94,7 @@ public class TCheckRepairpoints extends BaseEntity
     private Date repairDate;
 
     /** 泄漏程度 */
-    @Excel(name = "泄漏程度",readConverterExp = "1=不漏,2=一般泄,3=严重泄漏")
+    @Excel(name = "泄漏程度",readConverterExp = "1=不漏,2=一般泄,3=严重泄漏")
     private String leakageDegree;
 
     /** 备注 */

+ 1 - 1
master/src/main/java/com/ruoyi/project/check/service/impl/TCheckCheckpointsServiceImpl.java

@@ -174,7 +174,7 @@ public class TCheckCheckpointsServiceImpl implements ITCheckCheckpointsService
                 tTaskInspection.setTaskUndoneNum(new BigDecimal(tTaskInspection.getTaskNum()).subtract(new BigDecimal(tTaskInspection.getTaskDoneNum())).toString());
                 tTaskInspectionMapper.updateTTaskInspection(tTaskInspection);
                 for (TCheckCheckpoints point : points) {
-                    // 如果当前检测点泄露程度不为未泄露,将该检测点添加到待维修点中
+                    // 如果当前检测点泄漏程度不为未泄漏,将该检测点添加到待维修点中
                     if (!point.getLeakageDegree().equals("1")) {
                         TCheckRepairpoints tCheckRepairpoint = new TCheckRepairpoints();
                         tCheckRepairpoint.setPointId(point.getPointId());

+ 12 - 1
master/src/main/java/com/ruoyi/project/statistics/controller/StatisticsController.java

@@ -82,7 +82,7 @@ public class StatisticsController extends BaseController {
             result.setQyljCount(qyljCount);
 //            计算总数量
             result.setPointCount(result.getbCount() + result.getYsjCount() + result.getJbqCount() + result.getFmCount() + result.getXysbCount() + result.getLjjCount() + result.getFlCount() + result.getKkfCount() + result.getQyljCount() + result.getQtCount());
-//            根据泄程度统计
+//            根据泄程度统计
             statistics.setPlantId(plant.getPlantId());
             for (Statistics countXlcd : statisticsService.countXlcd(statistics)) {
                 switch (countXlcd.getContent()) {
@@ -97,6 +97,13 @@ public class StatisticsController extends BaseController {
                         break;
                 }
             }
+            try {
+                result.setYxfCount(statisticsService.countYxf(statistics).getCount());
+                result.setWxfCount(statisticsService.countWxf(statistics).getCount());
+            } catch (Exception e) {
+                result.setYxfCount(0);
+                result.setWxfCount(0);
+            }
 //            未检测数量统计
             result.setWjcCount((result.getPointCount() - result.getWxlCount() - result.getYbxlCount() - result.getYzxlCount()));
 //            总数统记
@@ -127,6 +134,8 @@ public class StatisticsController extends BaseController {
             total.setQtCount(item.getQtCount() + total.getQtCount());
             total.setPointCount(item.getPointCount() + total.getPointCount());
             total.setWxlCount(item.getWxlCount() + total.getWxlCount());
+            total.setYxfCount(item.getYxfCount() + total.getYxfCount());
+            total.setWxfCount(item.getWxfCount() + total.getWxfCount());
             total.setYbxlCount(item.getYbxlCount() + total.getYbxlCount());
             total.setYzxlCount(item.getYzxlCount() + total.getYzxlCount());
             total.setWjcCount(item.getWjcCount() + total.getWjcCount());
@@ -158,6 +167,8 @@ public class StatisticsController extends BaseController {
         total.setYbxlCount(0);
         total.setYzxlCount(0);
         total.setWjcCount(0);
+        total.setWxfCount(0);
+        total.setYxfCount(0);
         total.setXlcdCount(0);
         total.setXll("0");
         total.setJpl("0");

+ 19 - 2
master/src/main/java/com/ruoyi/project/statistics/domain/Statistics.java

@@ -94,12 +94,14 @@ public class Statistics extends BaseEntity {
     private Integer pointCount;
 
     /**
-     * 未泄统计
+     * 未泄统计
      */
     private Integer wxlCount;
+    private Integer wxfCount;
+    private Integer yxfCount;
 
     /**
-     * 一般泄统计
+     * 一般泄统计
      */
     private Integer ybxlCount;
 
@@ -169,6 +171,21 @@ public class Statistics extends BaseEntity {
 
     private String year;
 
+    public Integer getYxfCount() {
+        return yxfCount;
+    }
+
+    public void setYxfCount(Integer yxfCount) {
+        this.yxfCount = yxfCount;
+    }
+
+    public Integer getWxfCount() {
+        return wxfCount;
+    }
+
+    public void setWxfCount(Integer wxfCount) {
+        this.wxfCount = wxfCount;
+    }
 
     public String getSjpfl() {
         return sjpfl;

+ 4 - 0
master/src/main/java/com/ruoyi/project/statistics/mapper/StatisticsMapper.java

@@ -14,6 +14,10 @@ public interface StatisticsMapper {
 
     public List<Statistics> countPoint(Statistics statistics);
 
+    public Statistics countYxf(Statistics statistics);
+
+    public Statistics countWxf(Statistics statistics);
+
     public List<Statistics> countXlcd(Statistics statistics);
 
     @DataScopePlant(deptAlias = "d")

+ 5 - 0
master/src/main/java/com/ruoyi/project/statistics/service/IStatisticsService.java

@@ -12,6 +12,11 @@ public interface IStatisticsService {
 
     public List<Statistics> countPoint(Statistics statistics);
 
+
+    public Statistics countYxf(Statistics statistics);
+
+    public Statistics countWxf(Statistics statistics);
+
     public List<Statistics> countXlcd(Statistics statistics);
 
     public List<Statistics> countPfl(Statistics statistics);

+ 10 - 0
master/src/main/java/com/ruoyi/project/statistics/service/impl/IStatisticsServiceImpl.java

@@ -42,4 +42,14 @@ public class IStatisticsServiceImpl implements IStatisticsService {
     public List<Statistics> countXlcdByPoint(Statistics statistics) {
         return statisticsMapper.countXlcdByPoint(statistics);
     }
+
+    @Override
+    public Statistics countYxf(Statistics statistics) {
+        return statisticsMapper.countYxf(statistics);
+    }
+
+    @Override
+    public Statistics countWxf(Statistics statistics) {
+        return statisticsMapper.countWxf(statistics);
+    }
 }

+ 24 - 0
master/src/main/resources/mybatis/statistics/StatisticsMapper.xml

@@ -55,6 +55,30 @@
         group by leakage_degree;
     </select>
 
+    <select id="countYxf" parameterType="Statistics" resultMap="StatisticsResult">
+        select count(*) num
+        from t_check_checkpoints d
+        where leakage_degree is not null
+          and leakage_degree != 1
+          and approve_status = 2
+          and plant_id = #{plantId}
+          and d.point_id in
+              (SELECT point_id from t_check_repairpoints b where b.approve_status = 2 and YEAR(b.repair_date) = #{year})
+          and YEAR(d.check_date) = #{year}
+    </select>
+
+    <select id="countWxf" parameterType="Statistics" resultMap="StatisticsResult">
+        select count(*) num
+        from t_check_checkpoints d
+        where leakage_degree is not null
+          and leakage_degree != 1
+          and approve_status = 2
+          and plant_id = #{plantId}
+          and d.point_id not in
+              (SELECT point_id from t_check_repairpoints b where b.approve_status = 2 and YEAR(b.repair_date) = #{year})
+          and YEAR(d.check_date) = #{year}
+    </select>
+
     <select id="countPfl" parameterType="Statistics" resultMap="StatisticsResult">
         select net_test_value,repair_id,point_id,point_type,check_date
         from t_check_checkpoints d

+ 2 - 2
ui/src/views/check/inspectionCheck/pointEnter.vue

@@ -120,7 +120,7 @@
           <el-table-column label="检测值" fixed="left" align="center" prop="testValue" v-if="!checkAgain" width="80"/>
           <el-table-column label="复测值" fixed="left" align="center" prop="testValue" v-else width="80"/>
           <el-table-column label="净检测值" fixed="left" align="center" prop="netTestValue" width="80"/>
-          <el-table-column label="泄程度" fixed="left" align="center" prop="leakageDegree" width="80"
+          <el-table-column label="泄程度" fixed="left" align="center" prop="leakageDegree" width="80"
                            :formatter="leakageFormat"/>
           <el-table-column label="审核状态" fixed="left" align="center" prop="approveStatus" width="80"
                            :formatter="approveStatusFormat" v-if="!checkAgain"/>
@@ -141,7 +141,7 @@
                            :show-overflow-tooltip="true"/>
           <el-table-column label="仪器编号" align="center" prop="instrumentCode" width="120"
                            :show-overflow-tooltip="true"/>
-          <el-table-column label="泄部位" align="center" prop="leakagePosition" width="120"
+          <el-table-column label="泄部位" align="center" prop="leakagePosition" width="120"
                            :show-overflow-tooltip="true"/>
           <el-table-column label="校准人员" align="center" prop="checker" width="120"
                            :show-overflow-tooltip="true"/>

+ 3 - 3
ui/src/views/check/lawitems/index.vue

@@ -103,7 +103,7 @@
                        :formatter="pointFormat"/>
       <el-table-column label="介质状态" align="center" prop="mediumType" :show-overflow-tooltip="true" width="130"
                        :formatter="mediumTypeFormat"/>
-      <el-table-column label="一般泄标准(ppm)" align="center" prop="general" :show-overflow-tooltip="true"
+      <el-table-column label="一般泄标准(ppm)" align="center" prop="general" :show-overflow-tooltip="true"
                        width="140"/>
       <el-table-column label="严重泄漏标准(ppm)" align="center" prop="serious" :show-overflow-tooltip="true"
                        width="140"/>
@@ -184,8 +184,8 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="一般泄标准(ppm)" prop="general">
-          <el-input v-model="form.general" placeholder="请输入一般泄标准"/>
+        <el-form-item label="一般泄标准(ppm)" prop="general">
+          <el-input v-model="form.general" placeholder="请输入一般泄标准"/>
         </el-form-item>
         <el-form-item label="严重泄漏标准(ppm)" prop="serious">
           <el-input v-model="form.serious" placeholder="请输入严重泄漏标准"/>

+ 1 - 1
ui/src/views/check/repairCheck/repairEnter.vue

@@ -97,7 +97,7 @@
                            :formatter="approveStatusFormat"/>
           <el-table-column label="净检测值" align="center" prop="netTestValue" width="80"/>
           <el-table-column label="泄漏程度" align="center" prop="leakageDegree" width="80" :formatter="leakageFormat"/>
-          <el-table-column label="泄部位" align="center" prop="leakagePosition" width="130"
+          <el-table-column label="泄部位" align="center" prop="leakagePosition" width="130"
                            :show-overflow-tooltip="true"/>
           <el-table-column label="维修方法" align="center" prop="repairFunc" width="130" :show-overflow-tooltip="true"/>
           <el-table-column label="维修状态" align="center" prop="repairType" width="130" :show-overflow-tooltip="true"/>

+ 1 - 1
ui/src/views/index.vue

@@ -5,7 +5,7 @@
 
     <el-row  style="background:#fff;margin-bottom:32px;">
       <el-card style="height: 570px">
-        <div class="bt"><span><i class="el-icon-coin i"></i> 泄程度统计</span></div>
+        <div class="bt"><span><i class="el-icon-coin i"></i> 泄程度统计</span></div>
         <el-col :span="12">
           <el-card style="margin:0 5px 0 0;height: 500px" shadow="hover">
             <plant-count-chart :statistics="xlcdList"></plant-count-chart>

+ 8 - 4
ui/src/views/statistics/index.vue

@@ -59,13 +59,17 @@
             <el-table-column label="合计(个)" align="center" prop="pointCount" width="80"
                              :show-overflow-tooltip="true"/>
           </el-table-column>
-          <el-table-column label="泄程度信息" align="center">
-            <el-table-column label="未泄(个)" align="center" prop="wxlCount" width="100"
+          <el-table-column label="泄程度信息" align="center">
+            <el-table-column label="未泄(个)" align="center" prop="wxlCount" width="100"
                              :show-overflow-tooltip="true"/>
-            <el-table-column label="一般泄(个)" align="center" prop="ybxlCount" width="100"
+            <el-table-column label="一般泄(个)" align="center" prop="ybxlCount" width="100"
                              :show-overflow-tooltip="true"/>
             <el-table-column label="严重泄漏(个)" align="center" prop="yzxlCount" width="100"
                              :show-overflow-tooltip="true"/>
+            <el-table-column label="已修复(个)" align="center" prop="yxfCount" width="100"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="未修复(个)" align="center" prop="wxfCount" width="100"
+                             :show-overflow-tooltip="true"/>
 <!--            <el-table-column label="未检测(个)" align="center" prop="wjcCount" width="100"-->
 <!--                             :show-overflow-tooltip="true"/>-->
             <el-table-column label="合计(个)" align="center" prop="xlcdCount" width="80" :show-overflow-tooltip="true"/>
@@ -83,7 +87,7 @@
     </el-row>
     <el-row>
       <el-card style="height: 570px;">
-        <div class="bt"><span><i class="el-icon-coin i"></i> 泄程度统计</span></div>
+        <div class="bt"><span><i class="el-icon-coin i"></i> 泄程度统计</span></div>
         <el-col :span="12">
           <el-card style="margin-top:0; margin-left:0;margin-bottom:0;height: 500px" shadow="hover">
             <plant-count-chart :statistics="statisticsList"></plant-count-chart>

+ 3 - 3
ui/src/views/statistics/plantCountChart.vue

@@ -38,7 +38,7 @@ export default {
           top: 0,
           itemWidth: 30,
           itemHeight: 12,
-          data: ['严重泄漏', '一般泄露', '未泄露']
+          data: ['严重泄漏', '一般泄漏', '未泄漏']
         },
         grid: {left: 10, top: 50, bottom: 20, right: 20, containLabel: true},
         xAxis: {
@@ -81,7 +81,7 @@ export default {
             data: [],
           },
           {
-            name: '一般泄',
+            name: '一般泄',
             type: 'bar',
             stack: 'total', // ! 多条数据总计 => 堆叠
             barWidth: 30,
@@ -90,7 +90,7 @@ export default {
             data: [],
           },
           {
-            name: '未泄',
+            name: '未泄',
             type: 'bar',
             stack: 'total', // ! 多条数据总计 => 堆叠
             barWidth: 30,

+ 3 - 3
ui/src/views/statistics/ptCountChart.vue

@@ -40,7 +40,7 @@ export default {
           top: 0,
           itemWidth: 30,
           itemHeight: 12,
-          data: ['严重泄漏', '一般泄露', '未泄露']
+          data: ['严重泄漏', '一般泄漏', '未泄漏']
         },
         grid: {left: 10, top: 50, bottom: 20, right: 20, containLabel: true},
         xAxis: {
@@ -83,7 +83,7 @@ export default {
             data: [],
           },
           {
-            name: '一般泄',
+            name: '一般泄',
             type: 'bar',
             stack: 'total', // ! 多条数据总计 => 堆叠
             barWidth: 30,
@@ -92,7 +92,7 @@ export default {
             data: [],
           },
           {
-            name: '未泄',
+            name: '未泄',
             type: 'bar',
             stack: 'total', // ! 多条数据总计 => 堆叠
             barWidth: 30,

+ 2 - 2
ui/src/views/task/inspection/dividePoint.vue

@@ -66,7 +66,7 @@
                                :show-overflow-tooltip="true"/>
               <!--            <el-table-column label="仪器编号" align="center" prop="inspectionCode" width="100"
                                            :show-overflow-tooltip="true"/>
-                          <el-table-column label="泄部位" align="center" prop="leakagePosition" width="100"
+                          <el-table-column label="泄部位" align="center" prop="leakagePosition" width="100"
                                            :show-overflow-tooltip="true"/>
                           <el-table-column label="校准人员" align="center" prop="checker" width="100" :show-overflow-tooltip="true"/>
                           <el-table-column label="校准日期" align="center" prop="checkDate" width="100"
@@ -133,7 +133,7 @@
                                :show-overflow-tooltip="true"/>
               <!--            <el-table-column label="仪器编号" align="center" prop="inspectionCode" width="100"
                                            :show-overflow-tooltip="true"/>
-                          <el-table-column label="泄部位" align="center" prop="leakagePosition" width="100"
+                          <el-table-column label="泄部位" align="center" prop="leakagePosition" width="100"
                                            :show-overflow-tooltip="true"/>
                           <el-table-column label="校准人员" align="center" prop="checker" width="100" :show-overflow-tooltip="true"/>
                           <el-table-column label="校准日期" align="center" prop="checkDate" width="100"

+ 2 - 2
ui/src/views/task/plan/planPoint.vue

@@ -66,7 +66,7 @@
                              :show-overflow-tooltip="true"/>
             <!--            <el-table-column label="仪器编号" align="center" prop="inspectionCode" width="100"
                                          :show-overflow-tooltip="true"/>
-                        <el-table-column label="泄部位" align="center" prop="leakagePosition" width="100"
+                        <el-table-column label="泄部位" align="center" prop="leakagePosition" width="100"
                                          :show-overflow-tooltip="true"/>
                         <el-table-column label="校准人员" align="center" prop="checker" width="100" :show-overflow-tooltip="true"/>
                         <el-table-column label="校准日期" align="center" prop="checkDate" width="100"
@@ -127,7 +127,7 @@
                              :show-overflow-tooltip="true"/>
             <!--            <el-table-column label="仪器编号" align="center" prop="inspectionCode" width="100"
                                          :show-overflow-tooltip="true"/>
-                        <el-table-column label="泄部位" align="center" prop="leakagePosition" width="100"
+                        <el-table-column label="泄部位" align="center" prop="leakagePosition" width="100"
                                          :show-overflow-tooltip="true"/>
                         <el-table-column label="校准人员" align="center" prop="checker" width="100" :show-overflow-tooltip="true"/>
                         <el-table-column label="校准日期" align="center" prop="checkDate" width="100"