Procházet zdrojové kódy

-添加统计分析页面
-检测计划改为手动添加

jiangbiao před 2 roky
rodič
revize
0c669275f0
24 změnil soubory, kde provedl 2561 přidání a 28 odebrání
  1. 1 1
      master/src/main/java/com/ruoyi/project/check/controller/TCheckRepairpointsController.java
  2. 9 0
      master/src/main/java/com/ruoyi/project/check/domain/TCheckCheckpoints.java
  3. 431 0
      master/src/main/java/com/ruoyi/project/statistics/controller/StatisticsController.java
  4. 456 0
      master/src/main/java/com/ruoyi/project/statistics/domain/Statistics.java
  5. 18 0
      master/src/main/java/com/ruoyi/project/statistics/mapper/StatisticsMapper.java
  6. 19 0
      master/src/main/java/com/ruoyi/project/statistics/service/IStatisticsService.java
  7. 45 0
      master/src/main/java/com/ruoyi/project/statistics/service/impl/IStatisticsServiceImpl.java
  8. 59 4
      master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionPlanController.java
  9. 15 3
      master/src/main/resources/mybatis/check/TCheckCheckpointsMapper.xml
  10. 82 0
      master/src/main/resources/mybatis/statistics/TBaseDeviceMapper.xml
  11. 2 1
      ui/package.json
  12. 0 0
      ui/src/api/echarts/echarts.min.js
  13. 24 0
      ui/src/api/statistics/statistics.js
  14. 1 1
      ui/src/assets/styles/element-ui.scss
  15. 3 0
      ui/src/main.js
  16. 232 0
      ui/src/views/statistics/index.vue
  17. 125 0
      ui/src/views/statistics/pflOfYearChart.vue
  18. 105 0
      ui/src/views/statistics/pie/jplPieChart.vue
  19. 105 0
      ui/src/views/statistics/pie/pflPieChart.vue
  20. 106 0
      ui/src/views/statistics/pie/xllPieChart.vue
  21. 128 0
      ui/src/views/statistics/plantCountChart.vue
  22. 132 0
      ui/src/views/statistics/ptCountChart.vue
  23. 66 18
      ui/src/views/task/plan/index.vue
  24. 397 0
      ui/src/views/task/plan/planPoint.vue

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

@@ -100,7 +100,7 @@ public class TCheckRepairpointsController extends BaseController {
     }
 
     @PreAuthorize("@ss.hasPermi('check:checkpoints:edit')")
-    @Log(title = "审核检测结果", businessType = BusinessType.UPDATE)
+    @Log(title = "审核维修结果", businessType = BusinessType.UPDATE)
     @PutMapping("/toApprove")
     public AjaxResult toApprove(@RequestBody TCheckRepairpoints tCheckRepairpoints) {
         int i = tCheckRepairpointsService.updateApproveStatusByIds(tCheckRepairpoints);

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

@@ -22,6 +22,7 @@ public class TCheckCheckpoints extends BaseEntity {
      * 唯一标识id
      */
     private Long checkId;
+    private Long planId;
 
     /**
      * 装置id
@@ -202,6 +203,14 @@ public class TCheckCheckpoints extends BaseEntity {
     @TableField(exist = false)
     private Long[] checkIds;
 
+    public Long getPlanId() {
+        return planId;
+    }
+
+    public void setPlanId(Long planId) {
+        this.planId = planId;
+    }
+
     public String getMediumType() {
         return mediumType;
     }

+ 431 - 0
master/src/main/java/com/ruoyi/project/statistics/controller/StatisticsController.java

@@ -0,0 +1,431 @@
+package com.ruoyi.project.statistics.controller;
+
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.project.statistics.domain.Statistics;
+import com.ruoyi.project.statistics.service.IStatisticsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+
+@RestController
+@RequestMapping("/statistics/statistics")
+public class StatisticsController extends BaseController {
+
+    @Autowired
+    private IStatisticsService statisticsService;
+
+    @GetMapping("/list")
+    public AjaxResult list(Statistics statistics) {
+        List<Statistics> resultList = new ArrayList<>();
+        // 根据装查询
+        List<Statistics> countPlant = statisticsService.countPlant(statistics);
+        for (Statistics plant : countPlant) {
+            Statistics result = new Statistics();
+            setStatistics(result);
+            result.setPlantName(plant.getPlantName());
+            result.setPlantCount(plant.getCount());
+//            统计设备数量
+            Statistics countDevice = statisticsService.countDevice(plant);
+            result.setDevCount(countDevice.getCount());
+//            根据密封点类型统计数量
+            int qyljCount = 0;//取样连接系统
+            for (Statistics countPoint : statisticsService.countPoint(plant)) {
+                switch (countPoint.getContent()) {
+                    case "泵":
+                        result.setbCount(countPoint.getCount());
+                        break;
+                    case "阀门":
+                        result.setFmCount(countPoint.getCount());
+                        break;
+                    case "法兰":
+                        result.setFlCount(countPoint.getCount());
+                        break;
+                    case "搅拌器":
+                        result.setJbqCount(countPoint.getCount());
+                        break;
+                    case "连接件":
+                        result.setLjjCount(countPoint.getCount());
+                        break;
+                    case "泄压设备":
+                        result.setXysbCount(countPoint.getCount());
+                        break;
+                    case "压缩机":
+                        result.setYsjCount(countPoint.getCount());
+                        break;
+                    case "开口阀或开口管线":
+                        result.setKkfCount(countPoint.getCount());
+                        break;
+                    case "取样连接系统(开口取样-无残液置换、处置措施)":
+                    case "取样连接系统(密闭取样-取样瓶长期与取样口连接)":
+                    case "取样连接系统(开口取样-有残液置换、处置措施)":
+                    case "取样连接系统(密闭取样-取样瓶不与取样口连接)":
+                        qyljCount += countPoint.getCount();
+                        break;
+                    case "其他":
+                        result.setQtCount(countPoint.getCount());
+                        break;
+                }
+            }
+            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()) {
+                    case "1":
+                        result.setWxlCount(countXlcd.getCount());
+                        break;
+                    case "2":
+                        result.setYbxlCount(countXlcd.getCount());
+                        break;
+                    case "3":
+                        result.setYzxlCount(countXlcd.getCount());
+                        break;
+                }
+            }
+//            未检测数量统计
+            result.setWjcCount(result.getPointCount() - result.getWxlCount() - result.getYbxlCount() - result.getYzxlCount());
+//            总数统记
+            result.setXlcdCount(result.getPointCount());
+//            查询所有检测点的净检测值
+            List<Statistics> countPfl = statisticsService.countPfl(statistics);
+
+            resultList.add(getCountValue(countPfl, result));
+        }
+
+        Statistics total = new Statistics();
+        setStatistics(total);
+        total.setPlantName("合计");
+        for (Statistics item : resultList) {
+            total.setPlantCount(item.getPlantCount() + total.getPlantCount());
+            total.setDevCount(item.getDevCount() + total.getDevCount());
+            total.setbCount(item.getbCount() + total.getbCount());
+            total.setYsjCount(item.getYsjCount() + total.getYsjCount());
+            total.setJbqCount(item.getJbqCount() + total.getJbqCount());
+            total.setFmCount(item.getFmCount() + total.getFmCount());
+            total.setXysbCount(item.getXysbCount() + total.getXysbCount());
+            total.setLjjCount(item.getLjjCount() + total.getLjjCount());
+            total.setFlCount(item.getFlCount() + total.getFlCount());
+            total.setKkfCount(item.getKkfCount() + total.getKkfCount());
+            total.setQyljCount(item.getQyljCount() + total.getQyljCount());
+            total.setQtCount(item.getQtCount() + total.getQtCount());
+            total.setPointCount(item.getPointCount() + total.getPointCount());
+            total.setWxlCount(item.getWxlCount() + total.getWxlCount());
+            total.setYbxlCount(item.getYbxlCount() + total.getYbxlCount());
+            total.setYzxlCount(item.getYzxlCount() + total.getYzxlCount());
+            total.setWjcCount(item.getWjcCount() + total.getWjcCount());
+            total.setXlcdCount(item.getXlcdCount() + total.getXlcdCount());
+            total.setXll(new BigDecimal(item.getXll()).add(new BigDecimal(total.getXll())).toString());
+            total.setJpl(new BigDecimal(item.getJpl()).add(new BigDecimal(total.getJpl())).toString());
+            total.setPfl(new BigDecimal(item.getPfl()).add(new BigDecimal(total.getPfl())).toString());
+            total.setSjpfl(new BigDecimal(item.getSjpfl()).add(new BigDecimal(total.getSjpfl())).toString());
+        }
+        resultList.add(total);
+        return AjaxResult.success(resultList);
+    }
+
+    private void setStatistics(Statistics total) {
+        total.setPlantCount(0);
+        total.setDevCount(0);
+        total.setbCount(0);
+        total.setYsjCount(0);
+        total.setJbqCount(0);
+        total.setFmCount(0);
+        total.setXysbCount(0);
+        total.setLjjCount(0);
+        total.setFlCount(0);
+        total.setKkfCount(0);
+        total.setQyljCount(0);
+        total.setQtCount(0);
+        total.setPointCount(0);
+        total.setWxlCount(0);
+        total.setYbxlCount(0);
+        total.setYzxlCount(0);
+        total.setWjcCount(0);
+        total.setXlcdCount(0);
+        total.setXll("0");
+        total.setJpl("0");
+        total.setPfl("0");
+        total.setSjpfl("0");
+    }
+
+    private Statistics getCountValue(List<Statistics> countPfl, Statistics result) {
+        //            设置当年时间
+        Calendar nc = Calendar.getInstance();//当年的1月1日
+        nc.set(nc.get(Calendar.YEAR), 0, 1, 0, 0, 0);
+        nc.set(Calendar.MILLISECOND, 0);//设置毫秒值为0否则会减掉 一天
+        Calendar nm = Calendar.getInstance();//次年的1月1日
+        nm.set(nm.get(Calendar.YEAR), 12, 1, 0, 0, 0);
+        nm.set(Calendar.MILLISECOND, 0);//设置毫秒值为0否则会减掉 一天
+        double zpfl = 0;//初始排放量
+        double sjpfl = 0;//实际排放量
+        double zxll = 0;//总泄漏量
+        long pid = 0;
+        double temp = 0;
+        for (int i = 0; i < countPfl.size(); i++) {
+            Statistics point = countPfl.get(i);
+            double netTestValue = Double.parseDouble(point.getNetTestValue());
+            if (netTestValue < 50) {
+                if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), point.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
+                    sjpfl += getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), point.getCheckDate()) * 24;
+                } else if (Objects.equals(countPfl.get(i - 1).getPointId(), point.getPointId())) {//如果前一条和当前这条是同一个点
+                    if (new BigDecimal(countPfl.get(i - 1).getNetTestValue()).compareTo(new BigDecimal("50")) < 0) { // 如果前一条检测值小于泄漏标准
+                        sjpfl += getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(point.getCheckDate(), countPfl.get(i - 1).getCheckDate()) * 24;
+                    }
+                }
+                if (i + 1 == countPfl.size() || !Objects.equals(countPfl.get(i + 1).getPointId(), point.getPointId())) {//如果下一条和当前这条不是同一个点
+                    sjpfl += getETOC(netTestValue, point.getPointType()) * (DateUtils.differentDaysByMillisecond(nm.getTime(), point.getCheckDate())) * 24;
+                }
+            } else {
+                if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), point.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
+                    sjpfl += getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), point.getCheckDate()) * 24;
+                } else if (Objects.equals(countPfl.get(i - 1).getPointId(), point.getPointId())) {//如果前一条和当前这条是同一个点
+                    sjpfl += getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(point.getCheckDate(), countPfl.get(i - 1).getCheckDate()) * 24;
+                }
+                if (i + 1 == countPfl.size() || !Objects.equals(countPfl.get(i + 1).getPointId(), point.getPointId())) {//如果下一条和当前这条不是同一个点
+                    sjpfl += getETOC(netTestValue, point.getPointType()) * (DateUtils.differentDaysByMillisecond(nm.getTime(), point.getCheckDate())) * 24;
+                } else {
+                    sjpfl += getETOC(netTestValue, point.getPointType()) * (DateUtils.differentDaysByMillisecond(countPfl.get(i + 1).getCheckDate(), point.getCheckDate())) * 24;
+                }
+            }
+            if (pid == point.getPointId()) {
+                continue;
+            }
+            if (netTestValue >= 50) {
+                pid = point.getPointId();
+                if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), point.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
+                    double pfl = getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), nm.getTime()) * 24;
+                    zxll += pfl;
+                    zpfl += pfl;
+                } else {
+                    double pfl = getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(countPfl.get(i - 1).getCheckDate(), nm.getTime()) * 24;
+                    zxll += pfl + (zpfl - temp);
+                    zpfl += pfl;
+                    temp = 0;
+                }
+            } else {
+                if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), point.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
+                    temp = zpfl;
+                    zpfl += getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), point.getCheckDate()) * 24;
+                } else if (Objects.equals(countPfl.get(i - 1).getPointId(), point.getPointId())) {//如果前一条和当前这条是同一个点
+                    zpfl += getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(point.getCheckDate(), countPfl.get(i - 1).getCheckDate()) * 24;
+                }
+                if (i + 1 == countPfl.size() || !Objects.equals(countPfl.get(i + 1).getPointId(), point.getPointId())) {//如果下一条和当前这条不是同一个点
+                    zpfl += getETOC(netTestValue, point.getPointType()) * (DateUtils.differentDaysByMillisecond(nm.getTime(), point.getCheckDate())) * 24;
+                }
+            }
+        }
+        // 排放量(t/年)
+        result.setPfl(new BigDecimal(String.valueOf(zpfl)).divide(new BigDecimal("1000"), 4, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+        // 泄漏量(t/年)
+        result.setXll(new BigDecimal(String.valueOf(zxll)).divide(new BigDecimal("1000"), 4, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+        // 减排量(t/年)
+        result.setJpl(new BigDecimal(String.valueOf(zpfl - sjpfl)).divide(new BigDecimal("1000"), 4, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+        result.setSjpfl(new BigDecimal(String.valueOf(sjpfl)).divide(new BigDecimal("1000"), 4, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+        return result;
+    }
+
+    @GetMapping("/xlcdByPoint")
+    public AjaxResult xlcdByPoint(Statistics statistics) {
+        Map<String, Statistics> map = new HashMap<>();
+        List<Statistics> xlcdByPoint = statisticsService.countXlcdByPoint(statistics);
+        Statistics result = null;
+        for (Statistics point : xlcdByPoint) {
+            String pointType = point.getPointType();
+            Integer count = point.getCount();
+            if (map.get(pointType) == null) {
+                result = new Statistics();
+            }
+            switch (point.getContent()) {
+                case "1":
+                    result.setWxlCount(count);
+                    break;
+                case "2":
+                    result.setYbxlCount(count);
+                    break;
+                case "3":
+                    result.setYzxlCount(count);
+                    break;
+            }
+            result.setPointType(pointType);
+            map.put(pointType, result);
+        }
+        return AjaxResult.success(map.values());
+    }
+
+    @GetMapping("/pflByPoint")
+    public AjaxResult pflByPoint(Statistics statistics) {
+        List<Statistics> resultList = new ArrayList<>();
+        // 根据装查询
+        List<Statistics> countPlant = statisticsService.countPlant(statistics);
+        for (Statistics plant : countPlant) {
+
+            statistics.setPlantId(plant.getPlantId());
+            List<Statistics> countPfl = statisticsService.countPfl(statistics);
+
+            // 设置当年时间
+            Calendar nc = Calendar.getInstance();//当年的1月1日
+            nc.set(nc.get(Calendar.YEAR), 0, 1, 0, 0, 0);
+            nc.set(Calendar.MILLISECOND, 0);//设置毫秒值为0否则会减掉 一天
+            Calendar nm = Calendar.getInstance();//次年的1月1日
+            nm.set(nm.get(Calendar.YEAR), 12, 1, 0, 0, 0);
+            nm.set(Calendar.MILLISECOND, 0);//设置毫秒值为0否则会减掉 一天
+            Statistics result = null;
+            double zpfl = 0;//初始排放量
+            double sjpfl = 0;//实际排放量
+            double zxll = 0;//总泄漏量
+            long pid = 0;
+            double temp = 0;
+            for (int i = 0; i < countPfl.size(); i++) {
+                Statistics item = countPfl.get(i);
+                //如果是第一条或者下一条的密封点类型和当前的密封点类型不一致
+                if (i == 0 || !countPfl.get(i).getPointType().equals(result.getPointType())) {
+                    result = new Statistics();
+                    result.setPointType(item.getPointType());
+                    zpfl = 0;//初始排放量
+                    sjpfl = 0;//实际排放量
+                    zxll = 0;//总泄漏量
+                }
+                result.setPlantName(plant.getPlantName());
+                double netTestValue = Double.parseDouble(item.getNetTestValue());
+                if (netTestValue < 50) {
+                    if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), item.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
+                        sjpfl += getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), item.getCheckDate()) * 24;
+                    } else if (Objects.equals(countPfl.get(i - 1).getPointId(), item.getPointId())) {//如果前一条和当前这条是同一个点
+                        if (new BigDecimal(countPfl.get(i - 1).getNetTestValue()).compareTo(new BigDecimal("50")) < 0) { // 如果前一条检测值小于泄漏标准
+                            sjpfl += getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(item.getCheckDate(), countPfl.get(i - 1).getCheckDate()) * 24;
+                        }
+                    }
+                    if (i + 1 == countPfl.size() || !Objects.equals(countPfl.get(i + 1).getPointId(), item.getPointId())) {//如果下一条和当前这条不是同一个点
+                        sjpfl += getETOC(netTestValue, item.getPointType()) * (DateUtils.differentDaysByMillisecond(nm.getTime(), item.getCheckDate())) * 24;
+                    }
+                } else {
+                    if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), item.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
+                        sjpfl += getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), item.getCheckDate()) * 24;
+                    } else if (Objects.equals(countPfl.get(i - 1).getPointId(), item.getPointId())) {//如果前一条和当前这条是同一个点
+                        sjpfl += getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(item.getCheckDate(), countPfl.get(i - 1).getCheckDate()) * 24;
+                    }
+                    if (i + 1 == countPfl.size() || !Objects.equals(countPfl.get(i + 1).getPointId(), item.getPointId())) {//如果下一条和当前这条不是同一个点
+                        sjpfl += getETOC(netTestValue, item.getPointType()) * (DateUtils.differentDaysByMillisecond(nm.getTime(), item.getCheckDate())) * 24;
+                    } else {
+                        sjpfl += getETOC(netTestValue, item.getPointType()) * (DateUtils.differentDaysByMillisecond(countPfl.get(i + 1).getCheckDate(), item.getCheckDate())) * 24;
+                    }
+                }
+                if (pid == item.getPointId()) {
+                    if (i != 0 && (i + 1 == countPfl.size() || !countPfl.get(i + 1).getPointType().equals(item.getPointType()))) {
+                        // 排放量(t/年)
+                        result.setPfl(new BigDecimal(String.valueOf(zpfl)).divide(new BigDecimal("1000"), 8, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+                        // 泄漏量(t/年)
+                        result.setXll(new BigDecimal(String.valueOf(zxll)).divide(new BigDecimal("1000"), 8, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+                        // 减排量(t/年)
+                        result.setJpl(new BigDecimal(String.valueOf(zpfl - sjpfl)).divide(new BigDecimal("1000"), 8, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+                        resultList.add(result);
+                    }
+                    continue;
+                }
+                if (netTestValue >= 50) {
+                    pid = item.getPointId();
+                    if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), item.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
+                        double pfl = getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), nm.getTime()) * 24;
+                        zxll += pfl;
+                        zpfl += pfl;
+                    } else {
+                        double pfl = getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(countPfl.get(i - 1).getCheckDate(), nm.getTime()) * 24;
+                        zxll += pfl + (zpfl - temp);
+                        zpfl += pfl;
+                        temp = 0;
+                    }
+                } else {
+                    if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), item.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
+                        temp = zpfl;
+                        zpfl += getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), item.getCheckDate()) * 24;
+                    } else if (Objects.equals(countPfl.get(i - 1).getPointId(), item.getPointId())) {//如果前一条和当前这条是同一个点
+                        zpfl += getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(item.getCheckDate(), countPfl.get(i - 1).getCheckDate()) * 24;
+                    }
+                    if (i + 1 == countPfl.size() || !Objects.equals(countPfl.get(i + 1).getPointId(), item.getPointId())) {//如果下一条和当前这条不是同一个点
+                        zpfl += getETOC(netTestValue, item.getPointType()) * (DateUtils.differentDaysByMillisecond(nm.getTime(), item.getCheckDate())) * 24;
+                    }
+                }
+                if (i != 0 && (i + 1 == countPfl.size() || !countPfl.get(i + 1).getPointType().equals(item.getPointType()))) {
+                    // 排放量(t/年)
+                    result.setPfl(new BigDecimal(String.valueOf(zpfl)).divide(new BigDecimal("1000"), 8, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+                    // 泄漏量(t/年)
+                    result.setXll(new BigDecimal(String.valueOf(zxll)).divide(new BigDecimal("1000"), 8, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+                    // 减排量(t/年)
+                    result.setJpl(new BigDecimal(String.valueOf(zpfl - sjpfl)).divide(new BigDecimal("1000"), 8, RoundingMode.HALF_UP).stripTrailingZeros().toString());
+                    resultList.add(result);
+                }
+            }
+        }
+        return AjaxResult.success(resultList);
+    }
+
+    /**
+     * 计算排放速率(kg/h)
+     *
+     * @param netTestValue
+     * @param pointType
+     * @return
+     */
+    public double getETOC(double netTestValue, String pointType) {
+        switch (pointType) {
+            case "泵":
+                if (netTestValue < 1) {
+                    return 2.4 * Math.pow(10, -5);
+                } else if (netTestValue >= 1 && netTestValue < 50000) {
+                    return 5.03 * Math.pow(10, -5) * Math.pow(netTestValue, 0.61);
+                } else {
+                    return 0.16;
+                }
+            case "阀门":
+                if (netTestValue < 1) {
+                    return 7.8 * Math.pow(10, -6);
+                } else if (netTestValue >= 1 && netTestValue < 50000) {
+                    return 2.29 * Math.pow(10, -6) * Math.pow(netTestValue, 0.746);
+                } else {
+                    return 0.14;
+                }
+            case "法兰":
+                if (netTestValue < 1) {
+                    return 3.1 * Math.pow(10, -7);
+                } else if (netTestValue >= 1 && netTestValue < 50000) {
+                    return 4.61 * Math.pow(10, -6) * Math.pow(netTestValue, 0.703);
+                } else {
+                    return 0.084;
+                }
+            case "连接件":
+                if (netTestValue < 1) {
+                    return 7.5 * Math.pow(10, -6);
+                } else if (netTestValue >= 1 && netTestValue < 50000) {
+                    return 1.53 * Math.pow(10, -6) * Math.pow(netTestValue, 0.735);
+                } else {
+                    return 0.03;
+                }
+            case "开口阀或开口管线":
+                if (netTestValue < 1) {
+                    return 2 * Math.pow(10, -6);
+                } else if (netTestValue >= 1 && netTestValue < 50000) {
+                    return 2.2 * Math.pow(10, -6) * Math.pow(netTestValue, 0.704);
+                } else {
+                    return 0.079;
+                }
+            default://其他
+                if (netTestValue < 1) {
+                    return 4 * Math.pow(10, -6);
+                } else if (netTestValue >= 1 && netTestValue < 50000) {
+                    return 1.36 * Math.pow(10, -5) * Math.pow(netTestValue, 0.589);
+                } else {
+                    return 0.11;
+                }
+        }
+    }
+}

+ 456 - 0
master/src/main/java/com/ruoyi/project/statistics/domain/Statistics.java

@@ -0,0 +1,456 @@
+package com.ruoyi.project.statistics.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+import java.util.Date;
+
+public class Statistics extends BaseEntity {
+    /**
+     * 装置名称
+     */
+    private String plantName;
+
+    /**
+     * 装置id
+     */
+    private Long plantId;
+
+    private Long repairId;
+
+    /**
+     * 密封点id
+     */
+    private Long pointId;
+
+    /**
+     * 密封点类型
+     */
+    private String pointType;
+
+    /**
+     * 装置统计
+     */
+    private Integer plantCount;
+
+    /**
+     * 设备统计
+     */
+    private Integer devCount;
+
+    /**
+     * 泵统计
+     */
+    private Integer bCount;
+
+    /**
+     * 压缩机统计
+     */
+    private Integer ysjCount;
+
+    /**
+     * 搅拌器统计
+     */
+    private Integer jbqCount;
+
+    /**
+     * 阀门统计
+     */
+    private Integer fmCount;
+
+    /**
+     * 泄压设备统计
+     */
+    private Integer xysbCount;
+
+    /**
+     * 连接件统计
+     */
+    private Integer ljjCount;
+
+    /**
+     * 法兰统计
+     */
+    private Integer flCount;
+
+    /**
+     * 开口阀统计
+     */
+    private Integer kkfCount;
+
+    /**
+     * 取样连接系统统计
+     */
+    private Integer qyljCount;
+
+    /**
+     * 其他统计
+     */
+    private Integer qtCount;
+
+    /**
+     * 合计
+     */
+    private Integer pointCount;
+
+    /**
+     * 未泄露统计
+     */
+    private Integer wxlCount;
+
+    /**
+     * 一般泄露统计
+     */
+    private Integer ybxlCount;
+
+    /**
+     * 严重泄漏统计
+     */
+    private Integer yzxlCount;
+
+    /**
+     * 未检测统计
+     */
+    private Integer wjcCount;
+
+    /**
+     * 合计
+     */
+    private Integer xlcdCount;
+
+    /**
+     * 泄漏量
+     */
+    private String xll;
+
+    /**
+     * 减排量
+     */
+    private String jpl;
+
+    /**
+     * 排放量
+     */
+    private String pfl;
+
+    /**
+     * 实际排放量
+     */
+    private String sjpfl;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date endTime;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 统计
+     */
+    private Integer count;
+
+    /**
+     * 归属机构
+     */
+    private String company;
+
+    private String netTestValue;
+
+    private String year;
+
+
+    public String getSjpfl() {
+        return sjpfl;
+    }
+
+    public void setSjpfl(String sjpfl) {
+        this.sjpfl = sjpfl;
+    }
+
+    public String getYear() {
+        return year;
+    }
+
+    public void setYear(String year) {
+        this.year = year;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date checkDate;
+
+    public Long getRepairId() {
+        return repairId;
+    }
+
+    public void setRepairId(Long repairId) {
+        this.repairId = repairId;
+    }
+
+    public String getPointType() {
+        return pointType;
+    }
+
+    public void setPointType(String pointType) {
+        this.pointType = pointType;
+    }
+
+    public Long getPointId() {
+        return pointId;
+    }
+
+    public void setPointId(Long pointId) {
+        this.pointId = pointId;
+    }
+
+    public String getNetTestValue() {
+        return netTestValue;
+    }
+
+    public void setNetTestValue(String netTestValue) {
+        this.netTestValue = netTestValue;
+    }
+
+    public Date getCheckDate() {
+        return checkDate;
+    }
+
+    public void setCheckDate(Date checkDate) {
+        this.checkDate = checkDate;
+    }
+
+    public String getPlantName() {
+        return plantName;
+    }
+
+    public void setPlantName(String plantName) {
+        this.plantName = plantName;
+    }
+
+    public Long getPlantId() {
+        return plantId;
+    }
+
+    public void setPlantId(Long plantId) {
+        this.plantId = plantId;
+    }
+
+    public Integer getPlantCount() {
+        return plantCount;
+    }
+
+    public void setPlantCount(Integer plantCount) {
+        this.plantCount = plantCount;
+    }
+
+    public Integer getDevCount() {
+        return devCount;
+    }
+
+    public void setDevCount(Integer devCount) {
+        this.devCount = devCount;
+    }
+
+    public Integer getbCount() {
+        return bCount;
+    }
+
+    public void setbCount(Integer bCount) {
+        this.bCount = bCount;
+    }
+
+    public Integer getYsjCount() {
+        return ysjCount;
+    }
+
+    public void setYsjCount(Integer ysjCount) {
+        this.ysjCount = ysjCount;
+    }
+
+    public Integer getJbqCount() {
+        return jbqCount;
+    }
+
+    public void setJbqCount(Integer jbqCount) {
+        this.jbqCount = jbqCount;
+    }
+
+    public Integer getFmCount() {
+        return fmCount;
+    }
+
+    public void setFmCount(Integer fmCount) {
+        this.fmCount = fmCount;
+    }
+
+    public Integer getXysbCount() {
+        return xysbCount;
+    }
+
+    public void setXysbCount(Integer xysbCount) {
+        this.xysbCount = xysbCount;
+    }
+
+    public Integer getLjjCount() {
+        return ljjCount;
+    }
+
+    public void setLjjCount(Integer ljjCount) {
+        this.ljjCount = ljjCount;
+    }
+
+    public Integer getFlCount() {
+        return flCount;
+    }
+
+    public void setFlCount(Integer flCount) {
+        this.flCount = flCount;
+    }
+
+    public Integer getKkfCount() {
+        return kkfCount;
+    }
+
+    public void setKkfCount(Integer kkfCount) {
+        this.kkfCount = kkfCount;
+    }
+
+    public Integer getQyljCount() {
+        return qyljCount;
+    }
+
+    public void setQyljCount(Integer qyljCount) {
+        this.qyljCount = qyljCount;
+    }
+
+    public Integer getQtCount() {
+        return qtCount;
+    }
+
+    public void setQtCount(Integer qtCount) {
+        this.qtCount = qtCount;
+    }
+
+    public Integer getPointCount() {
+        return pointCount;
+    }
+
+    public void setPointCount(Integer pointCount) {
+        this.pointCount = pointCount;
+    }
+
+    public Integer getWxlCount() {
+        return wxlCount;
+    }
+
+    public void setWxlCount(Integer wxlCount) {
+        this.wxlCount = wxlCount;
+    }
+
+    public Integer getYbxlCount() {
+        return ybxlCount;
+    }
+
+    public void setYbxlCount(Integer ybxlCount) {
+        this.ybxlCount = ybxlCount;
+    }
+
+    public Integer getYzxlCount() {
+        return yzxlCount;
+    }
+
+    public void setYzxlCount(Integer yzxlCount) {
+        this.yzxlCount = yzxlCount;
+    }
+
+    public Integer getWjcCount() {
+        return wjcCount;
+    }
+
+    public void setWjcCount(Integer wjcCount) {
+        this.wjcCount = wjcCount;
+    }
+
+    public Integer getXlcdCount() {
+        return xlcdCount;
+    }
+
+    public void setXlcdCount(Integer xlcdCount) {
+        this.xlcdCount = xlcdCount;
+    }
+
+    public String getXll() {
+        return xll;
+    }
+
+    public void setXll(String xll) {
+        this.xll = xll;
+    }
+
+    public String getJpl() {
+        return jpl;
+    }
+
+    public void setJpl(String jpl) {
+        this.jpl = jpl;
+    }
+
+    public String getPfl() {
+        return pfl;
+    }
+
+    public void setPfl(String pfl) {
+        this.pfl = pfl;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public String getCompany() {
+        return company;
+    }
+
+    public void setCompany(String company) {
+        this.company = company;
+    }
+}
+

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

@@ -0,0 +1,18 @@
+package com.ruoyi.project.statistics.mapper;
+
+import com.ruoyi.project.statistics.domain.Statistics;
+
+import java.util.List;
+
+public interface StatisticsMapper {
+    public List<Statistics> countPlant(Statistics statistics);
+
+    public Statistics countDevice(Statistics statistics);
+
+    public List<Statistics> countPoint(Statistics statistics);
+
+    public List<Statistics> countXlcd(Statistics statistics);
+
+    public List<Statistics> countPfl(Statistics statistics);
+    public List<Statistics> countXlcdByPoint(Statistics statistics);
+}

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

@@ -0,0 +1,19 @@
+package com.ruoyi.project.statistics.service;
+
+
+import com.ruoyi.project.statistics.domain.Statistics;
+
+import java.util.List;
+
+public interface IStatisticsService {
+    public List<Statistics> countPlant(Statistics statistics);
+
+    public Statistics countDevice(Statistics statistics);
+
+    public List<Statistics> countPoint(Statistics statistics);
+
+    public List<Statistics> countXlcd(Statistics statistics);
+
+    public List<Statistics> countPfl(Statistics statistics);
+    public List<Statistics> countXlcdByPoint(Statistics statistics);
+}

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

@@ -0,0 +1,45 @@
+package com.ruoyi.project.statistics.service.impl;
+
+import com.ruoyi.project.statistics.domain.Statistics;
+import com.ruoyi.project.statistics.mapper.StatisticsMapper;
+import com.ruoyi.project.statistics.service.IStatisticsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class IStatisticsServiceImpl implements IStatisticsService {
+    @Autowired
+    private StatisticsMapper statisticsMapper;
+
+    @Override
+    public List<Statistics> countPlant(Statistics statistics) {
+        return statisticsMapper.countPlant(statistics);
+    }
+
+    @Override
+    public Statistics countDevice(Statistics statistics) {
+        return statisticsMapper.countDevice(statistics);
+    }
+
+    @Override
+    public List<Statistics> countPoint(Statistics statistics) {
+        return statisticsMapper.countPoint(statistics);
+    }
+
+    @Override
+    public List<Statistics> countXlcd(Statistics statistics) {
+        return statisticsMapper.countXlcd(statistics);
+    }
+
+    @Override
+    public List<Statistics> countPfl(Statistics statistics) {
+        return statisticsMapper.countPfl(statistics);
+    }
+
+    @Override
+    public List<Statistics> countXlcdByPoint(Statistics statistics) {
+        return statisticsMapper.countXlcdByPoint(statistics);
+    }
+}

+ 59 - 4
master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionPlanController.java

@@ -123,7 +123,62 @@ public class TTaskInspectionPlanController extends BaseController {
     @PostMapping
     public AjaxResult add(@RequestBody TTaskInspectionPlan tTaskInspectionPlan) {
         tTaskInspectionPlan.setCreaterCode(getUserId());
-        return toAjax(tTaskInspectionPlanService.insertTTaskInspectionPlan(tTaskInspectionPlan));
+        if (tTaskInspectionPlanService.insertTTaskInspectionPlan(tTaskInspectionPlan) > 0) {
+            TBasePlant tBasePlant = tBasePlantService.selectTBasePlantById(tTaskInspectionPlan.getPlantId());
+            // 统计当前装置下的所有(动)密封点
+            QueryWrapper<TBasePoint> points = new QueryWrapper<TBasePoint>().eq("plant_id", tTaskInspectionPlan.getPlantId()).eq("del_flag", 0).eq("approve_status", 2);
+            List<TCheckLawitems> tCheckLawitems = tCheckLawitemsService.selectTCheckLawitemsByLawStatus();
+            // 匹配法规标准
+            if ("2".equals(tTaskInspectionPlan.getDetectionFrequency())) {
+                Set<String> pointTypes = new HashSet<>();
+                for (TCheckLawitems lawitem : tCheckLawitems) {
+                    if (lawitem.getPlantType().equals(tBasePlant.getPlantType()) && lawitem.getDetectionFrequency().equals("2")) {
+                        pointTypes.add(lawitem.getPointType());
+                    }
+                }
+                points.in("point_type", pointTypes);
+            }
+            Integer count = tBasePointMapper.selectCount(points);
+            tTaskInspectionPlan.setPointNum(count.toString());
+            tTaskInspectionPlan.setCreaterCode(getUserId());
+            tTaskInspectionPlan.setCreatedate(new Date());
+            tTaskInspectionPlan.setUpdaterCode(getUserId());
+            tTaskInspectionPlan.setUpdatedate(new Date());
+
+            // 新增检测点
+            List<TCheckCheckpoints> tCheckCheckpoints = new ArrayList<>();
+            List<TBasePoint> tBasePoints = tBasePointMapper.selectList(points);
+            for (TBasePoint tBasePoint : tBasePoints) {
+
+                TCheckCheckpoints tCheckCheckpoint = new TCheckCheckpoints();
+                tCheckCheckpoint.setPlanId(tTaskInspectionPlan.getId());
+                tCheckCheckpoint.setPointId(tBasePoint.getPointId());
+                tCheckCheckpoint.setPlantName(tBasePlant.getPlantName());
+                tCheckCheckpoint.setPlantId(tBasePlant.getPlantId());
+                // TODO:需要优化,将区域名称和设备信息在新增密封点时直接存进去
+                //                tCheckCheckpoint.setRegionName(tBaseRegionService.selectTBaseRegionById(tBasePoint.getRegionId()).getRegionName());
+                tCheckCheckpoint.setRegionId(tBasePoint.getRegionId());
+                tCheckCheckpoint.setLayer(tBasePoint.getLayer());
+                //                TBaseDevice tBaseDevice = tBaseDeviceService.selectTBaseDeviceById(tBasePoint.getDevId());
+                //                tCheckCheckpoint.setDevName(tBaseDevice.getDevDescribe());
+                //                tCheckCheckpoint.setDevCode(tBaseDevice.getDevCode());
+                tCheckCheckpoint.setDevId(tBasePoint.getDevId());
+                tCheckCheckpoint.setGroupCode(tBasePoint.getGroupCode());
+                tCheckCheckpoint.setExtendCode(tBasePoint.getExtendCode());
+                tCheckCheckpoint.setPointType(tBasePoint.getPointType());
+                tCheckCheckpoint.setCreaterCode(getUserId());
+                tCheckCheckpoint.setCreatedate(new Date());
+                tCheckCheckpoint.setUpdaterCode(getUserId());
+                tCheckCheckpoint.setUpdatedate(new Date());
+                tCheckCheckpoint.setPlantType(tBasePlant.getPlantType());
+                tCheckCheckpoint.setMediumType(tBasePoint.getMediumType());
+                tCheckCheckpoints.add(tCheckCheckpoint);
+            }
+            if (CollectionUtils.isNotEmpty(tCheckCheckpoints))
+                tCheckCheckpointsService.insertTCheckCheckpointsByList(tCheckCheckpoints);
+            return toAjax(tTaskInspectionPlanService.updateTTaskInspectionPlan(tTaskInspectionPlan));
+        }
+        return AjaxResult.error();
     }
 
     @PreAuthorize("@ss.hasPermi('task:plan:add')")
@@ -177,14 +232,14 @@ public class TTaskInspectionPlanController extends BaseController {
             if (nowQuarter == 1 && nowQuarter == 3) {
                 Set<String> pointTypes = new HashSet<>();
                 for (TCheckLawitems lawitem : tCheckLawitems) {
-                    if (lawitem.getPlantType().equals(tBasePlant.getPlantType())&&lawitem.getDetectionFrequency().equals("2")){
+                    if (lawitem.getPlantType().equals(tBasePlant.getPlantType()) && lawitem.getDetectionFrequency().equals("2")) {
                         pointTypes.add(lawitem.getPointType());
                     }
                 }
-                points.in("point_type",pointTypes);
+                points.in("point_type", pointTypes);
             }
             Integer count = tBasePointMapper.selectCount(points);
-            if (count==0){
+            if (count == 0) {
                 // 当前计划中没有密封点时,跳过此计划
                 continue;
             }

+ 15 - 3
master/src/main/resources/mybatis/check/TCheckCheckpointsMapper.xml

@@ -37,6 +37,7 @@
         <result property="updaterCode" column="updater_code"/>
         <result property="updatedate" column="updatedate"/>
         <result property="repairId" column="repair_id"/>
+        <result property="planId" column="plan_id"/>
     </resultMap>
 
     <sql id="selectTCheckCheckpointsVo">
@@ -70,12 +71,13 @@
                creater_code,
                createdate,
                updater_code,
-               updatedate
+               updatedate,
+               plan_id
         from t_check_checkpoints
     </sql>
 
     <select id="selectTCheckCheckpointsList" parameterType="TCheckCheckpoints" resultMap="TCheckCheckpointsResult">
-        select d.medium_type,d.plant_type,d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value,
+        select d.plan_id,d.medium_type,d.plant_type,d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value,
         d.net_test_value, d.plant_id,d.plant_name,
         d.region_id, d.layer, d.dev_id, d.group_code, d.extend_code, d.point_type, d.instrument_code,
         leakage_position, d.checker, d.check_date, d.leakage_degree, d.remarks, d.approve_status, d.approve_time,
@@ -115,6 +117,7 @@
             <if test="choose != null ">and d.inspection_id is null</if>
             <if test="repairId == null and repairId !=1">and d.repair_id is null</if>
             <if test="repairId != null and repairId !=1">and d.repair_id is not null</if>
+            <if test="planId != null">and d.plan_id=#{planId}</if>
             and d.del_flag = 0
         </where>
     </select>
@@ -151,12 +154,13 @@
             <if test="approveTime != null ">and d.approve_time = #{approveTime}</if>
             <if test="deptId != null ">and d.dept_id = #{deptId}</if>
             <if test="choose != null ">and d.inspection_id is null</if>
+            <if test="planId != null">and d.plan_id=#{planId}</if>
             and d.del_flag = 0
         </where>
     </select>
 
     <select id="selectPointsByIds" parameterType="String" resultMap="TCheckCheckpointsResult">
-        select d.medium_type,d.plant_type,d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value,
+        select d.plan_id,d.medium_type,d.plant_type,d.check_id,d.point_id, d.instrument_id, d.inspection_id, d.test_value,
         d.net_test_value, d.plant_id,d.plant_name,
         d.region_id, d.layer, d.dev_id, d.group_code, d.extend_code, d.point_type, d.instrument_code,
         leakage_position, d.checker, d.check_date, d.leakage_degree, d.remarks, d.approve_status, d.approve_time,
@@ -206,6 +210,7 @@
             <if test="updaterCode != null ">and d.updater_code = #{updaterCode}</if>
             <if test="updatedate != null ">and d.updatedate = #{updatedate}</if>
             <if test="choose != null ">and d.inspection_id is null</if>
+            <if test="planId != null">and d.plan_id=#{planId}</if>
             and d.del_flag = 0
         </where>
     </select>
@@ -250,6 +255,7 @@
             <if test="updaterCode != null">updater_code,</if>
             <if test="updatedate != null">updatedate,</if>
             <if test="plantType != null">plant_type,</if>
+            <if test="planId != null">plan_id,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="pointId != null">#{pointId},</if>
@@ -283,6 +289,7 @@
             <if test="updaterCode != null">#{updaterCode},</if>
             <if test="updatedate != null">#{updatedate},</if>
             <if test="plantType != null">#{plantType},</if>
+            <if test="planId != null">#{plan_id},</if>
         </trim>
     </insert>
 
@@ -305,6 +312,7 @@
             updatedate,
             plant_type,
             medium_type,
+            plan_id,
             repair_id,
         </trim>
         values
@@ -325,6 +333,7 @@
                 #{item.updatedate},
                 #{item.plantType},
                 #{item.mediumType},
+                #{item.planId},
                 <if test="item.repairId!=null">#{item.repairId},</if>
                 <if test="item.repairId==null">null,</if>
             </trim>
@@ -362,6 +371,7 @@
             <if test="updaterCode != null">updater_code = #{updaterCode},</if>
             <if test="updatedate != null">updatedate = #{updatedate},</if>
             <if test="plantType != null">plant_type = #{plantType},</if>
+            <if test="planId != null">plan_id = #{planId},</if>
         </trim>
         where check_id = #{checkId}
     </update>
@@ -380,6 +390,7 @@
             <if test="updaterCode != null">updater_code = #{updaterCode},</if>
             <if test="updatedate != null">updatedate = #{updatedate},</if>
             <if test="approveStatus != null">approve_status = #{approveStatus},</if>
+            <if test="planId != null">plan_id = #{planId},</if>
         </trim>
         where plant_name=#{plantName} and group_code=#{groupCode} and extend_code=#{extendCode} and
         inspection_id=#{inspectionId} and (approve_status is null or approve_status=0)
@@ -442,6 +453,7 @@
                 and d.inspection_id is null
                 <if test="repairId == null">and repair_id is null</if>
                 <if test="repairId != null">and repair_id is not null</if>
+                <if test="planId != null">and plan_id=#{planId}</if>
             </where>
             ) t)
         </if>

+ 82 - 0
master/src/main/resources/mybatis/statistics/TBaseDeviceMapper.xml

@@ -0,0 +1,82 @@
+<?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.statistics.mapper.StatisticsMapper">
+
+    <resultMap type="Statistics" id="StatisticsResult">
+        <result property="plantId" column="plant_id"/>
+        <result property="pointId" column="point_id"/>
+        <result property="repairId" column="repair_id"/>
+        <result property="company" column="company"/>
+        <result property="plantName" column="plant_name"/>
+        <result property="content" column="content"/>
+        <result property="count" column="num"/>
+    </resultMap>
+
+    <select id="countPlant" parameterType="Statistics" resultMap="StatisticsResult">
+        select plant_name, plant_id, count(1) num
+        from t_base_plant
+        <where>
+            and approve_status = 2
+            and del_flag = 0
+            <if test="company!=null and company!=''">and company like concat('%',#{company},'%')</if>
+        </where>
+        group by plant_name;
+    </select>
+
+    <select id="countDevice" parameterType="Statistics" resultMap="StatisticsResult">
+        select count(1) num
+        from t_base_device
+        where plant_id = #{plantId}
+          and approve_status = 2
+          and del_flag = 0;
+    </select>
+
+    <select id="countPoint" parameterType="Statistics" resultMap="StatisticsResult">
+        select point_type content, count(1) num
+        from t_base_point
+        where plant_id = #{plantId}
+          and approve_status = 2
+          and del_flag = 0
+        group by point_type;
+    </select>
+
+    <select id="countXlcd" parameterType="Statistics" resultMap="StatisticsResult">
+        select leakage_degree content, count(1) num
+        from t_check_checkpoints
+        where plant_id = #{plantId}
+          and approve_status = 2
+          and del_flag = 0
+          and leakage_degree is not null
+          and YEAR(check_date) = #{year}
+        group by leakage_degree;
+    </select>
+
+    <select id="countPfl" parameterType="Statistics" resultMap="StatisticsResult">
+        select d.plant_name,net_test_value,repair_id,point_id,point_type,check_date
+        from t_check_checkpoints d left join t_base_plant bp on bp.plant_id=d.plant_id
+        <where>
+            <if test="plantId!=null">and d.plant_id = #{plantId}</if>
+            and d.approve_status = 2
+            and YEAR(check_date) = #{year}
+            and leakage_degree is not null
+            <if test="company!=null and company!=''">and bp.company like concat('%',#{company},'%')</if>
+        </where>
+        ORDER BY d.plant_id,d.point_type,d.point_id,d.check_date;
+    </select>
+
+    <select id="countXlcdByPoint" parameterType="Statistics" resultMap="StatisticsResult">
+        select point_type,leakage_degree content, count(1) num
+        from t_check_checkpoints d left join t_base_plant bp on bp.plant_id=d.plant_id
+        <where>
+            and d.approve_status = 2
+            and d.del_flag = 0
+            and leakage_degree is not null
+            and YEAR(check_date) = #{year}
+            <if test="company!=null and company!=''">and bp.company like concat('%',#{company},'%')</if>
+        </where>
+        group by point_type,leakage_degree
+        order by point_type;
+    </select>
+</mapper>

+ 2 - 1
ui/package.json

@@ -40,6 +40,7 @@
     "axios": "0.24.0",
     "clipboard": "2.0.8",
     "core-js": "3.25.2",
+    "dayjs": "^1.11.7",
     "echarts": "4.9.0",
     "element-ui": "2.15.10",
     "file-saver": "2.0.5",
@@ -53,9 +54,9 @@
     "screenfull": "5.0.2",
     "sortablejs": "1.10.2",
     "vue": "2.6.12",
-    "vue-i18n": "8.14.1",
     "vue-count-to": "1.0.13",
     "vue-cropper": "0.5.5",
+    "vue-i18n": "8.14.1",
     "vue-meta": "2.4.0",
     "vue-router": "3.4.9",
     "vuedraggable": "2.24.3",

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
ui/src/api/echarts/echarts.min.js


+ 24 - 0
ui/src/api/statistics/statistics.js

@@ -0,0 +1,24 @@
+import request from "@/utils/request";
+
+export function listStatistics(query) {
+  return request({
+    url: '/statistics/statistics/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function xlcdByPoint(query) {
+  return request({
+    url: '/statistics/statistics/xlcdByPoint',
+    method: 'get',
+    params: query
+  })
+}
+export function pflByPoint(query) {
+  return request({
+    url: '/statistics/statistics/pflByPoint',
+    method: 'get',
+    params: query
+  })
+}

+ 1 - 1
ui/src/assets/styles/element-ui.scss

@@ -99,7 +99,7 @@
   /* 设置竖向滚动条的宽度 */
   width: 10px;
   /* 设置横向滚动条的高度 */
-  height: 10px;
+  height: 13px;
 }
 
 ::-webkit-scrollbar-thumb {

+ 3 - 0
ui/src/main.js

@@ -38,6 +38,8 @@ import VueMeta from 'vue-meta'
 // 字典数据组件
 import DictData from '@/components/DictData'
 import i18n from "@/api/lang";
+//echarts
+import echarts from '@/api/echarts/echarts.min.js'
 
 // 全局方法挂载
 Vue.prototype.getDicts = getDicts
@@ -49,6 +51,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
 Vue.prototype.selectDictLabels = selectDictLabels
 Vue.prototype.download = download
 Vue.prototype.handleTree = handleTree
+Vue.prototype.echarts = echarts
 
 // 全局组件挂载
 Vue.component('DictTag', DictTag)

+ 232 - 0
ui/src/views/statistics/index.vue

@@ -0,0 +1,232 @@
+<template>
+  <div style="padding: 5px">
+    <el-row>
+      <el-card style="height: 70px">
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
+          <el-form-item label="装置" prop="plantId">
+            <el-select v-model="queryParams.plantId" placeholder="请选择装置" clearable size="small"
+                       @change="handleQuery">
+              <el-option
+                v-for="dict in plantOperation"
+                :key="dict.plantId"
+                :label="dict.plantName"
+                :value="dict.plantId"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="统计年份" prop="year">
+            <el-date-picker
+              clearable
+              v-model="year"
+              @change="handleQuery"
+              type="year">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="归属机构" prop="company">
+            <el-input v-model="queryParams.company" placeholder="请输入归属机构" style="width: 200px"
+                      @input="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-card>
+    </el-row>
+    <el-row>
+      <el-card style="height: 600px">
+        <div class="bt"><span><i class="el-icon-coin i"></i> 基本信息统计</span></div>
+        <el-table :data="statisticsList" border height="540">
+          <el-table-column type="index" align="center" width="50"/>
+          <el-table-column label="装置名称" align="center" prop="plantName" width="130" :show-overflow-tooltip="true"/>
+          <el-table-column label="装置(个)" align="center" prop="plantCount" width="80" :show-overflow-tooltip="true"/>
+          <el-table-column label="设备(个)" align="center" prop="devCount" width="80" :show-overflow-tooltip="true"/>
+          <el-table-column label="密封点信息" align="center">
+            <el-table-column label="泵(个)" align="center" prop="bCount" width="80" :show-overflow-tooltip="true"/>
+            <el-table-column label="压缩机(个)" align="center" prop="ysjCount" width="90"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="阀门(个)" align="center" prop="fmCount" width="80" :show-overflow-tooltip="true"/>
+            <el-table-column label="泄压设备(个)" align="center" prop="xysbCount" width="100"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="连接件(个)" align="center" prop="ljjCount" width="90"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="法兰(个)" align="center" prop="flCount" width="80" :show-overflow-tooltip="true"/>
+            <el-table-column label="开口阀或开口管线(个)" align="center" prop="kkfCount" width="150"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="取样连接系统(个)" align="center" prop="qyljCount" width="130"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="其他(个)" align="center" prop="qtCount" width="80" :show-overflow-tooltip="true"/>
+            <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"
+                             :show-overflow-tooltip="true"/>
+            <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="wjcCount" width="100"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="合计(个)" align="center" prop="xlcdCount" width="80" :show-overflow-tooltip="true"/>
+          </el-table-column>
+          <el-table-column label="排放量核算" align="center">
+            <el-table-column label="泄漏量(t/a)" align="center" prop="xll" width="130"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="减排量(t/a" align="center" prop="jpl" width="130"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="排放量(t/a)" align="center" prop="pfl" width="130"
+                             :show-overflow-tooltip="true"/>
+          </el-table-column>
+        </el-table>
+      </el-card>
+    </el-row>
+    <el-row>
+      <el-card style="height: 570px;">
+        <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" shadow="hover">
+            <plant-count-chart v-if="show" :statistics="statisticsList"></plant-count-chart>
+          </el-card>
+        </el-col>
+        <el-col :span="12">
+          <el-card style="margin-top:0; margin-right:0;margin-bottom:0" shadow="hover">
+            <pt-count-chart v-if="show" :queryParams="queryParams"></pt-count-chart>
+          </el-card>
+        </el-col>
+      </el-card>
+    </el-row>
+    <el-row>
+      <el-card>
+        <div class="bt"><span><i class="el-icon-coin i"></i> 排放信息统计</span></div>
+        <pfl-of-year-chart v-if="show" :statistics="statisticsList"></pfl-of-year-chart>
+      </el-card>
+    </el-row>
+    <el-row>
+      <el-col :span="6">
+        <el-card>
+          <el-table :data="statisticsList" border height="470" @row-click="selectRow">
+            <el-table-column label="装置" align="center" prop="plantName"
+                             :show-overflow-tooltip="true" width="80" />
+            <el-table-column label="泄漏量(t/a)" align="center" prop="xll"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="减排量(t/a)" align="center" prop="jpl"
+                             :show-overflow-tooltip="true"/>
+            <el-table-column label="排放量(t/a)" align="center" prop="pfl"
+                             :show-overflow-tooltip="true"/>
+          </el-table>
+        </el-card>
+      </el-col>
+      <el-col :span="6">
+        <el-card>
+          <pfl-pie-chart v-if="showPoint" :pointList="pointCountList" :plant-name="plantName"></pfl-pie-chart>
+        </el-card>
+      </el-col>
+      <el-col :span="6">
+        <el-card>
+          <xll-pie-chart v-if="showPoint" :pointList="pointCountList" :plant-name="plantName"></xll-pie-chart>
+        </el-card>
+      </el-col>
+      <el-col :span="6">
+        <el-card>
+          <jpl-pie-chart v-if="showPoint" :pointList="pointCountList" :plant-name="plantName"></jpl-pie-chart>
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import PlantCountChart from "@/views/statistics/plantCountChart";
+import {getAllPlantName} from "@/api/base/plant";
+import {listStatistics, pflByPoint} from "@/api/statistics/statistics";
+import PtCountChart from "@/views/statistics/ptCountChart";
+import PflOfYearChart from "@/views/statistics/pflOfYearChart";
+import PflPieChart from "@/views/statistics/pie/pflPieChart";
+import XllPieChart from "@/views/statistics/pie/xllPieChart";
+import JplPieChart from "@/views/statistics/pie/jplPieChart";
+
+export default {
+  name: "statistics",
+  components: {JplPieChart, XllPieChart, PflPieChart, PflOfYearChart, PtCountChart, PlantCountChart},
+  data() {
+    return {
+      plantName: '',
+      show: false,
+      showPoint: false,
+      statisticsList: [],
+      pointCountList: [],
+      plantOperation: [],
+      year: new Date(),
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        plantId: null,
+        year: null,
+        startTime: null,
+        endTime: null,
+        company: null,
+      }
+    }
+  },
+  created() {
+    this.getList();
+    getAllPlantName().then(response => {
+      this.plantOperation = response.data;
+    });
+  },
+  methods: {
+    selectRow(row){
+      this.plantName=row.plantName;
+      this.showPoint=false;
+      this.$nextTick(() => {
+        this.showPoint=true
+      })
+    },
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    handleQuery() {
+      this.show = false;
+      this.showPoint = false;
+      this.getList();
+    },
+    getList() {
+      this.queryParams.year = this.year.getFullYear();
+      listStatistics(this.queryParams).then(response => {
+        this.statisticsList = response.data;
+        this.show = true;
+      })
+      pflByPoint(this.queryParams).then(response => {
+        console.log(response)
+        this.pointCountList = response.data;
+        this.showPoint = true;
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+.el-card {
+  margin: 5px;
+  height: 500px;
+}
+
+.bt {
+  margin-bottom: 10px;
+  /* 火狐 */
+  -moz-user-select: none;
+  /* Safari 和 欧朋 */
+  -webkit-user-select: none;
+  /* IE10+ and Edge */
+  -ms-user-select: none;
+  /* Standard syntax 标准语法(谷歌) */
+  user-select: none;
+}
+
+.i {
+  color: #00afff;
+}
+</style>

+ 125 - 0
ui/src/views/statistics/pflOfYearChart.vue

@@ -0,0 +1,125 @@
+<template>
+  <div id="pflOfYearChart" :style="{height:height,width:width}"/>
+</template>
+
+<script>
+
+export default {
+  props: {
+    statistics: {
+      type: Array,
+      default() {
+        return [];
+      }
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '490px'
+    },
+  },
+  data() {
+    return {
+      chart: null,
+      option: {
+        title: {
+          text: '年度总排放量(t/a)',
+          textStyle: {color: '#00c4ff', fontSize: 18, fontWeight: 'normal',},
+          left: 'center'
+        },
+        grid: {left: 10, top: 50, bottom: 60, right: 20, containLabel: true},
+        xAxis: {
+          type: 'category',
+          data: ['初始排放量', '泄漏量', '减排量', '最终排放量'],
+          axisLine: {lineStyle: {color: '#ccc'}},
+          axisTick: {length: 3},
+          axisLabel: {color: '#999'},
+        },
+        yAxis: {
+          type: 'value',
+          axisLine: {show: true, lineStyle: {color: '#ccc'}},
+          axisLabel: {color: '#999'},
+          splitLine: {lineStyle: {color: ['#CEEDFF'], type: [5, 8], dashOffset: 3}},
+        },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {type: 'shadow'},
+          textStyle: {color: '#424242'},
+          renderMode: 'html',
+          className: 'tooltip',
+          order: 'seriesDesc',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            mark: {show: true},
+            restore: {show: true},
+            saveAsImage: {show: true}
+          }
+        },
+        series:
+          {
+            name: '',
+            type: 'bar',
+            barWidth: 230,
+            itemStyle: {
+              normal: {
+                borderRadius: [5, 5, 0, 0],
+                show: true,
+                color: function (params) {
+                  let colorList = ['#FF6633', '#FFCC00', '#00CC33', '#FF6633'];
+                  const num = colorList.length;
+                  return colorList[params.dataIndex % num];
+                },
+              }
+            },
+            label: { //显示数值的地方
+              normal: {
+                position: 'top',
+                show: true,
+                formatter: function (res) {
+                  var label = res.name + res.value;
+                  return label
+                },
+                textStyle: { //数值样式
+                  color:'#666',
+                }
+              },
+            },
+
+            data: [],
+          },
+
+      }
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.statistics.forEach(item => {
+        if (item.plantName == '合计') {
+          this.option.series.data.push(parseFloat(item.pfl));
+          this.option.series.data.push(parseFloat(item.xll));
+          this.option.series.data.push(parseFloat(item.jpl));
+          this.option.series.data.push(parseFloat(item.sjpfl));
+        }
+      })
+      this.initChart();
+    })
+  },
+  methods: {
+    initChart() {
+      // 基于准备好的dom,初始化echarts实例
+      this.chart = this.echarts.init(document.getElementById('pflOfYearChart'))
+      this.chart.setOption(this.option)
+    }
+  }
+
+}
+</script>
+
+<style scoped>
+
+</style>

+ 105 - 0
ui/src/views/statistics/pie/jplPieChart.vue

@@ -0,0 +1,105 @@
+<template>
+  <div id="jplPieChart" :style="{height:height,width:width}"/>
+</template>
+
+<script>
+export default {
+  name: "jplPieChart",
+  props: {
+    pointList: {
+      type: Array,
+      default() {
+        return [];
+      }
+    },
+    plantName: {
+      type: String,
+      default: ''
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '490px'
+    },
+  },
+  data() {
+    return {
+      chart: null,
+      option: {
+      title: {
+        text:'减排量',
+        left: 'center'
+      },
+      tooltip: {
+        trigger: 'item',
+          formatter: '{a} <br/>{b} : {c} ({d}%)'
+      },
+      legend: {
+        orient: 'vertical',
+          left: 'left',
+          data: []
+      },
+      toolbox: {
+        show: true,
+          feature: {
+          mark: {show: true},
+          magicType: {
+            show: true,
+              type: ['funnel']
+          },
+          restore: {show: true},
+          saveAsImage: {show: true}
+        }
+      },
+      series: [
+        {
+          label: {
+            formatter: '{b}: ({d}%)'
+          },
+          name: '减排量',
+          type: 'pie',
+          radius: ['40%', '60%'],
+          selectedMode: 'single',
+          data: [          ],
+          emphasis: {
+            label: {
+              show: true,
+              fontSize: '13',
+              fontWeight: 'bold'
+            }
+          },
+        }
+      ]
+    },
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      for (let i = 0; i < this.pointList.length; i++) {
+          if (this.plantName != '合计' && this.plantName == this.pointList[i].plantName) {
+            this.option.legend.data[i] = this.pointList[i].pointType
+            this.option.series[0].data[i] = {value: this.pointList[i].jpl, name: this.pointList[i].pointType}
+          } else if (this.plantName == '合计'||this.plantName ==''){
+            this.option.legend.data[i] = this.pointList[i].pointType
+            this.option.series[0].data[i] = {value: this.pointList[i].jpl, name: this.pointList[i].pointType}
+          }
+      }
+      this.initChart();
+    })
+  },
+  methods: {
+    initChart() {
+      // 基于准备好的dom,初始化echarts实例
+      this.chart = this.echarts.init(document.getElementById('jplPieChart'))
+      this.chart.setOption(this.option)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 105 - 0
ui/src/views/statistics/pie/pflPieChart.vue

@@ -0,0 +1,105 @@
+<template>
+  <div id="pflPieChart" :style="{height:height,width:width}"/>
+</template>
+
+<script>
+export default {
+  name: "pflPieChart",
+  props: {
+    pointList: {
+      type: Array,
+      default() {
+        return [];
+      }
+    },
+    plantName: {
+      type: String,
+      default: ''
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '490px'
+    },
+  },
+  data() {
+    return {
+      chart: null,
+      option: {
+        title: {
+          text: '排放量',
+          left: 'center'
+        },
+        tooltip: {
+          trigger: 'item',
+          formatter: '{a} <br/>{b} : {c} ({d}%)'
+        },
+        legend: {
+          orient: 'vertical',
+          left: 'left',
+          data: []
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            mark: {show: true},
+            magicType: {
+              show: true,
+              type: ['funnel']
+            },
+            restore: {show: true},
+            saveAsImage: {show: true}
+          }
+        },
+        series: [
+          {
+            label: {
+              formatter: '{b}: ({d}%)'
+            },
+            name: '排放量',
+            type: 'pie',
+            radius: ['40%', '60%'],
+            selectedMode: 'single',
+            data: [],
+            emphasis: {
+              label: {
+                show: true,
+                fontSize: '21',
+                fontWeight: 'bold'
+              }
+            },
+          }
+        ]
+      },
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      for (let i = 0; i < this.pointList.length; i++) {
+        if (this.plantName != '合计' && this.plantName == this.pointList[i].plantName) {
+          this.option.legend.data[i] = this.pointList[i].pointType
+          this.option.series[0].data[i] = {value: this.pointList[i].pfl, name: this.pointList[i].pointType}
+        } else if (this.plantName == '合计'||this.plantName ==''){
+          this.option.legend.data[i] = this.pointList[i].pointType
+          this.option.series[0].data[i] = {value: this.pointList[i].pfl, name: this.pointList[i].pointType}
+        }
+      }
+      this.initChart();
+    })
+  },
+  methods: {
+    initChart() {
+      // 基于准备好的dom,初始化echarts实例
+      this.chart = this.echarts.init(document.getElementById('pflPieChart'))
+      this.chart.setOption(this.option)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 106 - 0
ui/src/views/statistics/pie/xllPieChart.vue

@@ -0,0 +1,106 @@
+<template>
+  <div id="xllPieChart" :style="{height:height,width:width}"/>
+</template>
+
+<script>
+export default {
+  name: "xllPieChart",
+  props: {
+    pointList: {
+      type: Array,
+      default() {
+        return [];
+      }
+    },
+    plantName: {
+      type: String,
+      default: ''
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '490px'
+    },
+  },
+  data() {
+    return {
+      chart: null,
+      option: {
+      title: {
+        text:'泄漏量',
+        left: 'center'
+      },
+      tooltip: {
+        trigger: 'item',
+          formatter: '{a} <br/>{b} : {c} ({d}%)'
+      },
+      legend: {
+        orient: 'vertical',
+          left: 'left',
+          data: []
+      },
+      toolbox: {
+        show: true,
+          feature: {
+          mark: {show: true},
+          magicType: {
+            show: true,
+              type: ['funnel']
+          },
+          restore: {show: true},
+          saveAsImage: {show: true}
+        }
+      },
+      series: [
+        {
+          label: {
+            formatter: '{b}: ({d}%)'
+          },
+          name: '泄漏量',
+          type: 'pie',
+          radius: ['40%', '60%'],
+          selectedMode: 'single',
+          data: [
+          ],
+          emphasis: {
+            label: {
+              show: true,
+              fontSize: '21',
+              fontWeight: 'bold'
+            }
+          },
+        }
+      ]
+    },
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      for (let i = 0; i < this.pointList.length; i++) {
+        if (this.plantName != '合计' && this.plantName == this.pointList[i].plantName) {
+          this.option.legend.data[i] = this.pointList[i].pointType
+          this.option.series[0].data[i] = {value: this.pointList[i].xll, name: this.pointList[i].pointType}
+        } else if (this.plantName == '合计'||this.plantName ==''){
+          this.option.legend.data[i] = this.pointList[i].pointType
+          this.option.series[0].data[i] = {value: this.pointList[i].xll, name: this.pointList[i].pointType}
+        }
+      }
+      this.initChart();
+    })
+  },
+  methods: {
+    initChart() {
+      // 基于准备好的dom,初始化echarts实例
+      this.chart = this.echarts.init(document.getElementById('xllPieChart'))
+      this.chart.setOption(this.option)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 128 - 0
ui/src/views/statistics/plantCountChart.vue

@@ -0,0 +1,128 @@
+<template>
+  <div id="plantCountChart" :style="{height:height,width:width}"/>
+</template>
+
+<script>
+
+export default {
+  props: {
+    statistics: {
+      type: Array,
+      default() {
+        return [];
+      }
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '490px'
+    },
+  },
+  data() {
+    return {
+      chart: null,
+      option: {
+        title: {
+          text: '按装置统计',
+          textStyle: {color: '#666', fontSize: 14, fontWeight: 'normal'},
+          padding: [5, 5, 5, 5],
+        },
+        legend: {
+          orient: 'horizontal',
+          top: 0,
+          itemWidth: 30,
+          itemHeight: 12,
+          data: ['严重泄漏', '一般泄露', '未泄露']
+        },
+        grid: {left: 10, top: 50, bottom: 20, right: 20, containLabel: true},
+        xAxis: {
+          type: 'value',
+          axisLine: {show: true, lineStyle: {color: '#ccc'}},
+          axisLabel: {color: '#999'},
+          splitLine: {lineStyle: {color: ['#CEEDFF'], type: [5, 8], dashOffset: 3}},
+        },
+        yAxis: {
+          type: 'category',
+          data: [],
+          axisLine: {lineStyle: {color: '#ccc'}},
+          axisTick: {length: 3},
+          axisLabel: {color: '#999'},
+        },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {type: 'shadow'},
+          textStyle: {color: '#424242'},
+          renderMode: 'html',
+          className: 'tooltip',
+          order: 'seriesDesc',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            mark: {show: true},
+            restore: {show: true},
+            saveAsImage: {show: true}
+          }
+        },
+        series: [
+          {
+            name: '严重泄漏',
+            type: 'bar',
+            stack: 'total', // ! 多条数据总计 => 堆叠
+            barWidth: 30,
+            color: '#f5804d',
+            itemStyle: {borderRadius: [5, 5, 5, 5]},
+            data: [],
+          },
+          {
+            name: '一般泄露',
+            type: 'bar',
+            stack: 'total', // ! 多条数据总计 => 堆叠
+            barWidth: 30,
+            color: '#FFC53D',
+            itemStyle: {borderRadius: [5, 5, 5, 5]},
+            data: [],
+          },
+          {
+            name: '未泄露',
+            type: 'bar',
+            stack: 'total', // ! 多条数据总计 => 堆叠
+            barWidth: 30,
+            color: '#8bd46e',
+            itemStyle: {borderRadius: [5, 5, 5, 5]},
+            data: [],
+          },
+        ],
+      }
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.statistics.forEach(item => {
+        if (item.plantName!='合计') {
+          this.option.series[0].data.push(item.yzxlCount);
+          this.option.series[1].data.push(item.ybxlCount);
+          this.option.series[2].data.push(item.wxlCount);
+          this.option.yAxis.data.push(item.plantName);
+        }
+      })
+      this.initChart();
+    })
+  },
+  methods: {
+    initChart() {
+      // 基于准备好的dom,初始化echarts实例
+      this.chart = this.echarts.init(document.getElementById('plantCountChart'))
+      this.chart.setOption(this.option)
+    }
+  }
+
+}
+</script>
+
+<style scoped>
+
+</style>

+ 132 - 0
ui/src/views/statistics/ptCountChart.vue

@@ -0,0 +1,132 @@
+<template>
+  <div id="ptCountChart" :style="{height:height,width:width}"/>
+</template>
+
+<script>
+
+import {xlcdByPoint} from "@/api/statistics/statistics";
+
+export default {
+  props: {
+    queryParams: {
+      type: Object,
+      default() {
+        return {};
+      }
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '490px'
+    },
+  },
+  data() {
+    return {
+      chart: null,
+      dataList:[],
+      option: {
+        title: {
+          text: '按密封点类型统计',
+          textStyle: {color: '#666', fontSize: 14, fontWeight: 'normal'},
+          padding: [5, 5, 5, 5],
+        },
+        legend: {
+          orient: 'horizontal',
+          top: 0,
+          itemWidth: 30,
+          itemHeight: 12,
+          data: ['严重泄漏', '一般泄露', '未泄露']
+        },
+        grid: {left: 10, top: 50, bottom: 20, right: 20, containLabel: true},
+        xAxis: {
+          type: 'value',
+          axisLine: {show: true, lineStyle: {color: '#ccc'}},
+          axisLabel: {color: '#999'},
+          splitLine: {lineStyle: {color: ['#CEEDFF'], type: [5, 8], dashOffset: 3}},
+        },
+        yAxis: {
+          type: 'category',
+          data: [],
+          axisLine: {lineStyle: {color: '#ccc'}},
+          axisTick: {length: 3},
+          axisLabel: {color: '#999'},
+        },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {type: 'shadow'},
+          textStyle: {color: '#424242'},
+          renderMode: 'html',
+          className: 'tooltip',
+          order: 'seriesDesc',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            mark: {show: true},
+            restore: {show: true},
+            saveAsImage: {show: true}
+          }
+        },
+        series: [
+          {
+            name: '严重泄漏',
+            type: 'bar',
+            stack: 'total', // ! 多条数据总计 => 堆叠
+            barWidth: 30,
+            color: '#f5804d',
+            itemStyle: {borderRadius: [5, 5, 5, 5]},
+            data: [],
+          },
+          {
+            name: '一般泄露',
+            type: 'bar',
+            stack: 'total', // ! 多条数据总计 => 堆叠
+            barWidth: 30,
+            color: '#FFC53D',
+            itemStyle: {borderRadius: [5, 5, 5, 5]},
+            data: [],
+          },
+          {
+            name: '未泄露',
+            type: 'bar',
+            stack: 'total', // ! 多条数据总计 => 堆叠
+            barWidth: 30,
+            color: '#8bd46e',
+            itemStyle: {borderRadius: [5, 5, 5, 5]},
+            data: [],
+          },
+        ],
+      }
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      xlcdByPoint(this.queryParams).then(response => {
+        this.dataList=response.data;
+        this.dataList.forEach(item => {
+          this.option.series[0].data.push(item.yzxlCount == null ? 0 : item.yzxlCount);
+          this.option.series[1].data.push(item.ybxlCount == null ? 0 : item.ybxlCount);
+          this.option.series[2].data.push(item.wxlCount == null ? 0 : item.wxlCount);
+          this.option.yAxis.data.push(item.pointType);
+        })
+        this.initChart();
+      })
+    })
+  },
+  methods: {
+    initChart() {
+      // 基于准备好的dom,初始化echarts实例
+      this.chart = this.echarts.init(document.getElementById('ptCountChart'))
+      this.chart.setOption(this.option)
+    }
+  }
+
+}
+</script>
+
+<style scoped>
+
+</style>

+ 66 - 18
ui/src/views/task/plan/index.vue

@@ -16,7 +16,7 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-<!--      <el-col :span="1.5">
+      <el-col :span="1.5">
         <el-button
           type="primary"
           plain
@@ -50,8 +50,8 @@
           v-hasPermi="['task:plan:remove']"
         >删除
         </el-button>
-      </el-col>-->
-      <el-col :span="1.5">
+      </el-col>
+<!--      <el-col :span="1.5">
         <el-button
           type="info"
           plain
@@ -60,7 +60,7 @@
           @click="handleDoPlan"
         >{{ $t('校验检测计划') }}
         </el-button>
-      </el-col>
+      </el-col>-->
       <el-col :span="1.5">
         <span style="color: #ff0000" v-if="checking"><i class="el-icon-loading" ></i>正在校验检测计划,请稍候...</span>
       </el-col>
@@ -69,7 +69,7 @@
 
     <el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange" :height="clientHeight"
               border>
-<!--      <el-table-column type="selection" width="55" align="center" fixed="left"/>-->
+      <el-table-column type="selection" width="55" align="center" fixed="left"/>
       <el-table-column label="装置名称" align="center" prop="plantName" width="130" :show-overflow-tooltip="true"/>
       <el-table-column label="检测计划编号" align="center" prop="inspectionPlanNo" width="200" :show-overflow-tooltip="true"/>
       <el-table-column label="检测计划名称" align="center" prop="inspectionPlanName" width="300" :show-overflow-tooltip="true"/>
@@ -84,16 +84,24 @@
           <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="检测点数" align="center" prop="pointNum" width="100" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建人" align="center" prop="creater" width="100" :show-overflow-tooltip="true"/>
+      <el-table-column label="检测点数" align="center" prop="pointNum" width="120" :show-overflow-tooltip="true"/>
+      <el-table-column label="创建人" align="center" prop="creater" width="120" :show-overflow-tooltip="true"/>
       <el-table-column label="创建时间" align="center" prop="createdate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-<!--      <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" width="130">
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" width="150">
         <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-s-order"
+            @click="openPlanPoint(scope.row)"
+          >计划检测点清单
+          </el-button>
+          <br>
           <el-button
             size="mini"
             type="text"
@@ -111,7 +119,7 @@
           >删除
           </el-button>
         </template>
-      </el-table-column>-->
+      </el-table-column>
     </el-table>
 
     <pagination
@@ -123,8 +131,8 @@
     />
 
     <!-- 添加或修改检测计划对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
         <el-form-item label="装置" prop="plantId">
           <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 100%">
             <el-option
@@ -142,7 +150,7 @@
           <el-input v-model="form.inspectionPlanName" placeholder="请输入检测计划名称"/>
         </el-form-item>
         <el-form-item label="检测频次" prop="detectionFrequency">
-          <el-select v-model="form.detectionFrequency" placeholder="请选择检测频次" clearable size="small" style="width: 100%">
+          <el-select v-model="form.detectionFrequency" @change="getEndTime" placeholder="请选择检测频次" clearable size="small" style="width: 100%">
             <el-option
               v-for="dict in detectionOperation"
               :key="dict.dictValue"
@@ -156,6 +164,7 @@
                           v-model="form.startTime"
                           type="date"
                           value-format="yyyy-MM-dd"
+                          @change="getEndTime"
                           placeholder="请选择检测起始时间">
           </el-date-picker>
         </el-form-item>
@@ -167,9 +176,6 @@
                           placeholder="请选择检测截止时间">
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="检测点数" prop="pointNum">
-          <el-input v-model="form.pointNum" placeholder="请输入检测点数"/>
-        </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注"/>
         </el-form-item>
@@ -179,16 +185,19 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+    <plan-point v-if="pointVisible" ref="planPointList" ></plan-point>
   </div>
 </template>
 
 <script>
 import {listPlan, getPlan, delPlan, addPlan, updatePlan, checkPlan} from "@/api/task/plan";
-import {MessageBox} from "element-ui";
+import dayjs from "dayjs";
 import {getAllPlantName} from "@/api/base/plant";
+import PlanPoint from "@/views/task/plan/planPoint";
 
 export default {
   name: "Plan",
+  components: {PlanPoint},
   data() {
     return {
       checking:false,
@@ -202,6 +211,7 @@ export default {
       ids: [],
       // 非单个禁用
       single: true,
+      pointVisible: false,
       // 非多个禁用
       multiple: true,
       // 显示搜索条件
@@ -235,7 +245,26 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {}
+      rules: {
+        plantId: [
+          {required: true, message: '请选择装置', trigger: "blur"}
+        ],
+        inspectionPlanNo: [
+          {required: true, message: '请输入检测计划编号', trigger: "blur"}
+        ],
+        inspectionPlanName: [
+          {required: true, message: '请输入检测计划名称', trigger: "blur"}
+        ],
+        detectionFrequency: [
+          {required: true, message: '请选择检测频次', trigger: "blur"}
+        ],
+        startTime: [
+          {required: true, message: '请选择检测起始时间', trigger: "blur"}
+        ],
+        endTime: [
+          {required: true, message: '请选择检测截止时间', trigger: "blur"}
+        ],
+      }
     };
   },
   created() {
@@ -252,6 +281,25 @@ export default {
     });
   },
   methods: {
+    openPlanPoint(row) {
+        this.pointVisible = true;
+        this.$nextTick(() => {
+          this.$refs.planPointList.openDialog(row)
+        })
+    },
+    getEndTime(){
+      if (this.form.startTime && this.form.detectionFrequency) {
+        if (this.form.detectionFrequency==1){
+          this.form.endTime=dayjs(new Date(this.form.startTime)).add(1,"month").subtract(1,'day').format("YYYY-MM-DD")
+        }else if (this.form.detectionFrequency==2){
+          this.form.endTime=dayjs(new Date(this.form.startTime)).add(3,"month").subtract(1,'day').format("YYYY-MM-DD")
+        }else if (this.form.detectionFrequency==3){
+          this.form.endTime=dayjs(new Date(this.form.startTime)).add(6,"month").subtract(1,'day').format("YYYY-MM-DD")
+        }else if (this.form.detectionFrequency==4){
+          this.form.endTime=dayjs(new Date(this.form.startTime)).add(1,"year").subtract(1,'day').format("YYYY-MM-DD")
+        }
+      }
+    },
     detectionFormat(row, column) {
       return this.selectDictLabel(this.detectionOperation, row.detectionFrequency);
     },

+ 397 - 0
ui/src/views/task/plan/planPoint.vue

@@ -0,0 +1,397 @@
+<template xmlns="http://www.w3.org/1999/html">
+  <div>
+      <el-dialog :visible.sync="dialog.dialogFormVisible" width="1800px" :close-on-click-modal="false"
+                 title='添加计划检测点'>
+        <el-row>
+          <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
+            <el-form-item label="装置" prop="plantId">
+              <el-select v-model="queryParams.plantId" @change="handleQuery"
+                         placeholder="请选择装置" clearable size="small" disabled>
+                <el-option
+                  v-for="plant in plantOperation"
+                  :key="plant.plantId"
+                  :label="plant.plantName"
+                  :value="plant.plantId"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="群组编码" prop="groupCode">
+              <el-input
+                v-model="queryParams.groupCode"
+                placeholder="请输入群组编码"
+                clearable
+                @keyup.enter.native="handleQuery"
+              />
+            </el-form-item>
+            <el-form-item label="密封点类型" prop="pointType" label-width="90px">
+              <el-select v-model="queryParams.pointType" @change="handleQuery" placeholder="请选择密封点类型" clearable
+                         size="small">
+                <el-option
+                  v-for="dict in pointOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </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>
+        <el-row>
+
+          <el-col :span="11" style="padding-right: 5px;text-align: center">
+            <el-table :data="leftData" style="width: 100%;" height="530px" border @selection-change="saveLeft"
+                      ref="leftData">
+              <el-table-column type="selection" align="center" fixed="left"></el-table-column>
+              <!--            <el-table-column label="检测值" align="center" prop="testValue" v-if="!checkAgain" width="80"/>
+                          <el-table-column label="复测值" align="center" prop="testValue" v-else width="80"/>
+                          <el-table-column label="净检测值" align="center" prop="netTestValue" width="80"/>-->
+              <el-table-column label="装置名称" align="center" prop="plantName" width="100"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="区域名称" align="center" prop="regionName" width="100"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="平台" align="center" prop="layer" width="100" :show-overflow-tooltip="true"/>
+              <el-table-column label="设备/管线名称" align="center" prop="devName" width="130"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="设备/管线编号" align="center" prop="devCode" width="130"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="群组编码" align="center" prop="groupCode" width="100"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="密封点扩展号编码" align="center" prop="extendCode" width="150"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="密封点类型" align="center" prop="pointType" width="100"
+                               :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"
+                                           :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"
+                                           :show-overflow-tooltip="true"/>
+                          <el-table-column label="泄漏程度" align="center" prop="leakageDegree" width="100"
+                                           :show-overflow-tooltip="true"/>-->
+            </el-table>
+            <pagination
+              v-show="leftTotal>0"
+              :total="leftTotal"
+              :page.sync="queryParams.pageNum"
+              :limit.sync="queryParams.pageSize"
+              @pagination="getList"
+            />
+          </el-col>
+
+          <el-col :span="2" style="margin-top: 10%;text-align: center">
+            <el-tooltip class="item" effect="dark" content="添加检查点" placement="right">
+              <el-button type="primary" icon="el-icon-arrow-right" :disabled="leftMultiple" @click="add"
+                         style="margin-bottom: 10px;width: 80%"
+                         size="large"></el-button>
+            </el-tooltip>
+            <br>
+            <el-tooltip class="item" effect="dark" content="移除检查点" placement="right">
+              <el-button type="primary" icon="el-icon-arrow-left" :disabled="rightMultiple" @click="remove"
+                         style="margin-top: 10px;margin-bottom: 10px;width: 80%"
+                         size="large"></el-button>
+            </el-tooltip>
+            <br>
+            <el-tooltip class="item" effect="dark" content="添加所有检查点" placement="right">
+              <el-button type="primary" icon="el-icon-d-arrow-right" :disabled="leftAll" @click="addAll"
+                         style="margin-top: 10px;margin-bottom: 10px;width: 80%"
+                         size="large"></el-button>
+            </el-tooltip>
+            <br>
+            <el-tooltip class="item" effect="dark" content="移除所有检查点" placement="right">
+              <el-button type="primary" icon="el-icon-d-arrow-left" :disabled="rightAll" @click="removeAll"
+                         style="margin-top: 10px;width: 80%"
+                         size="large"></el-button>
+            </el-tooltip>
+          </el-col>
+
+          <el-col :span="11" style="padding-left: 5px;text-align: center">
+            <el-table :data="rightData" style="width: 100%" height="530px" border ref="rightData"
+                      @selection-change="saveRight">
+              <el-table-column type="selection" align="center" fixed="left"></el-table-column>
+              <!--            <el-table-column label="检测值" align="center" prop="testValue" v-if="!checkAgain" width="80"/>
+                          <el-table-column label="复测值" align="center" prop="testValue" v-else width="80"/>
+                          <el-table-column label="净检测值" align="center" prop="netTestValue" width="80"/>-->
+              <el-table-column label="装置名称" align="center" prop="plantName" width="100"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="区域名称" align="center" prop="regionName" width="100"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="平台" align="center" prop="layer" width="100" :show-overflow-tooltip="true"/>
+              <el-table-column label="设备/管线名称" align="center" prop="devName" width="130"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="设备/管线编号" align="center" prop="devCode" width="130"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="群组编码" align="center" prop="groupCode" width="100"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="密封点扩展号编码" align="center" prop="extendCode" width="150"
+                               :show-overflow-tooltip="true"/>
+              <el-table-column label="密封点类型" align="center" prop="pointType" width="100"
+                               :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"
+                                           :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"
+                                           :show-overflow-tooltip="true"/>
+                          <el-table-column label="泄漏程度" align="center" prop="leakageDegree" width="100"
+                                           :show-overflow-tooltip="true"/>-->
+            </el-table>
+            <pagination
+              v-show="rightTotal>0"
+              :total="rightTotal"
+              :page.sync="rightQueryParams.pageNum"
+              :limit.sync="rightQueryParams.pageSize"
+              @pagination="getRightList"
+            />
+          </el-col>
+
+        </el-row>
+
+        <div slot="footer" class="dialog-footer" style="text-align: center">
+          <el-button @click="cancel">返回</el-button>
+        </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listCheckpoints, updateCheckpoints,
+} from "@/api/check/checkpoints";
+import {getAllPlantName} from "@/api/base/plant";
+import {listPoint} from "@/api/base/point";
+
+export default {
+  name: "planPoint",
+  data() {
+    return {
+      leftTotal: 0,
+      rightTotal: 0,
+      checkAgain: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        pointId: null,
+        inspectionId: null,
+        testValue: null,
+        netTestValue: null,
+        plantId: null,
+        plantName: null,
+        regionId: null,
+        regionName: null,
+        layer: null,
+        devId: null,
+        devName: null,
+        devCode: null,
+        groupCode: null,
+        extendCode: null,
+        pointType: null,
+        inspectionCode: null,
+        leakagePosition: null,
+        checker: null,
+        checkId: null,
+        checkDate: null,
+        leakageDegree: null,
+        remarks: null,
+        approveStatus: null,
+        approveTime: null,
+        deptId: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        reqairId: null,
+        choose: 1,
+      },
+      // 查询参数
+      rightQueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        pointId: null,
+        inspectionId: null,
+        testValue: null,
+        netTestValue: null,
+        plantId: null,
+        plantName: null,
+        regionId: null,
+        regionName: null,
+        layer: null,
+        devId: null,
+        devName: null,
+        devCode: null,
+        groupCode: null,
+        extendCode: null,
+        pointType: null,
+        inspectionCode: null,
+        leakagePosition: null,
+        checker: null,
+        checkId: null,
+        checkDate: null,
+        leakageDegree: null,
+        remarks: null,
+        approveStatus: null,
+        approveTime: null,
+        deptId: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        choose: null,
+      },
+      row: {},
+      rightData: [],
+      leftData: [],
+      right: [],   //右边选中的数据
+      left: [],  //左边选中的数据
+      leftMultiple: true,
+      rightMultiple: true,
+      leftAll: this.leftData == undefined || this.leftData == null || this.leftData.length <= 0,
+      rightAll: this.rightData == undefined || this.rightData == null || this.rightData.length <= 0,
+      dialog: {
+        dialogFormVisible: false,
+      },
+      inspectionId: null,
+      pointOptions: [],
+      plantOperation: [],
+    }
+  },
+  methods: {
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    pointFormat(row, column) {
+      return this.selectDictLabel(this.pointOptions, row.pointType);
+    },
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    cancel() {
+      this.leftData = [];
+      this.rightData = [];
+      this.dialog.dialogFormVisible = false;
+    },
+    openDialog(row) {
+      this.leftData = [];
+      this.rightData = [];
+      this.row = row;
+      this.rightQueryParams.inspectionId = row.id;
+      this.queryParams.plantId = row.plantId;
+      this.dialog.dialogFormVisible = true;
+      this.checkAgain = row.taskType == 2 ? true : false;
+      this.getList();
+      this.getRightList();
+      this.getDicts("point_type").then(response => {
+        this.pointOptions = response.data;
+      });
+      getAllPlantName().then(response => {
+        this.plantOperation = response.data;
+      })
+    },
+    /** 查询检测点列表 */
+    getList() {
+      if (this.row.taskType==2){
+        this.queryParams.repairId=0;
+      }else {
+        this.queryParams.repairId = null;
+      }
+      this.queryParams.inspectionId = null;
+      this.queryParams.approveStatus = 2;
+      listPoint(this.queryParams).then(response => {
+        this.leftData = response.rows;
+        this.leftTotal = response.total;
+        this.leftAll = this.leftData == undefined || this.leftData == null || this.leftData.length <= 0;
+      });
+    },
+    getRightList() {
+      if (this.row.taskType==2){
+        this.rightQueryParams.repairId=0;
+      }else {
+        this.rightQueryParams.repairId = null;
+      }
+      listCheckpoints(this.rightQueryParams).then(response => {
+        this.rightData = response.rows;
+        this.rightTotal = response.total;
+        this.rightAll = this.rightData == undefined || this.rightData == null || this.rightData.length <= 0;
+      });
+    },
+    saveLeft(rows) {
+      this.left = [];
+      console.log(rows)
+      if (rows) {
+        this.left = rows.map(row => row.checkId);
+        this.leftMultiple = !rows.length;
+      }
+    },
+    saveRight(rows) {
+      this.right = [];
+      if (rows) {
+        this.right = rows.map(row => row.checkId);
+        this.rightMultiple = !rows.length;
+      }
+    },
+    // 左边表格选择项移到右边
+    add() {
+      let data = {};
+      data.inspectionId = this.rightQueryParams.inspectionId;
+      data.checkIds = this.left;
+      data.choose = 1;
+      console.log(data)
+      // updateCheckpoints(data).then(response => {
+      //   this.getList();
+      //   this.getRightList();
+      // })
+    },
+    addAll() {
+      if (this.leftData) {
+        let data = this.queryParams;
+        data.inspectionId = this.rightQueryParams.inspectionId;
+        data.choose = 3;
+        if (this.row.taskType==2){
+          this.queryParams.repairId=0;
+        }else {
+          this.queryParams.repairId = null;
+        }
+        // updateCheckpoints(data).then(response => {
+        //   this.getList();
+        //   this.getRightList();
+        // })
+      }
+    },
+    // 右边表格选择项移到左边
+    remove() {
+      let data = {};
+      data.inspectionId = this.rightQueryParams.inspectionId;
+      data.checkIds = this.right;
+      data.choose = 2;
+      console.log(data)
+      // updateCheckpoints(data).then(response => {
+      //   this.getList();
+      //   this.getRightList();
+      // })
+    },
+    removeAll() {
+      if (this.rightData !== []) {
+        let data = {};
+        data.inspectionId = this.rightQueryParams.inspectionId;
+        data.choose = 4;
+        console.log(data)
+        // updateCheckpoints(data).then(response => {
+        //   console.log("this.queryParams")
+        //   console.log(this.queryParams)
+        //   this.getList();
+        //   this.getRightList();
+        // })
+      }
+    }
+  }
+}
+</script>

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů