Parcourir la source

-检测计划改为手动添加
-统计分析修改图结构

jiangbiao il y a 3 ans
Parent
commit
a6119bb66b
25 fichiers modifiés avec 694 ajouts et 306 suppressions
  1. 7 0
      master/src/main/java/com/ruoyi/project/base/controller/TBasePointController.java
  2. 11 0
      master/src/main/java/com/ruoyi/project/base/domain/TBasePoint.java
  3. 3 0
      master/src/main/java/com/ruoyi/project/base/mapper/TBasePointMapper.java
  4. 3 0
      master/src/main/java/com/ruoyi/project/base/service/ITBasePointService.java
  5. 10 0
      master/src/main/java/com/ruoyi/project/base/service/impl/TBasePointServiceImpl.java
  6. 1 0
      master/src/main/java/com/ruoyi/project/check/mapper/TCheckCheckpointsMapper.java
  7. 1 0
      master/src/main/java/com/ruoyi/project/check/service/ITCheckCheckpointsService.java
  8. 6 0
      master/src/main/java/com/ruoyi/project/check/service/impl/TCheckCheckpointsServiceImpl.java
  9. 20 4
      master/src/main/java/com/ruoyi/project/statistics/controller/StatisticsController.java
  10. 89 2
      master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionPlanController.java
  11. 36 0
      master/src/main/java/com/ruoyi/project/task/domain/TTaskInspectionPlan.java
  12. 24 0
      master/src/main/resources/mybatis/base/TBasePointMapper.xml
  13. 12 0
      master/src/main/resources/mybatis/check/TCheckCheckpointsMapper.xml
  14. 0 0
      master/src/main/resources/mybatis/statistics/StatisticsMapper.xml
  15. 1 1
      ui/.env.development
  16. 1 1
      ui/.env.production
  17. 8 0
      ui/src/api/base/point.js
  18. 27 0
      ui/src/api/task/plan.js
  19. 11 3
      ui/src/views/check/lawitems/index.vue
  20. 52 45
      ui/src/views/statistics/pie/jplPieChart.vue
  21. 19 9
      ui/src/views/statistics/pie/pflPieChart.vue
  22. 15 5
      ui/src/views/statistics/pie/xllPieChart.vue
  23. 51 32
      ui/src/views/task/plan/index.vue
  24. 167 204
      ui/src/views/task/plan/planPoint.vue
  25. 119 0
      ui/src/views/task/plan/pointList.vue

+ 7 - 0
master/src/main/java/com/ruoyi/project/base/controller/TBasePointController.java

@@ -82,6 +82,13 @@ public class TBasePointController extends BaseController {
         return getDataTable(list);
     }
 
+    @GetMapping("/listByPlan")
+    public TableDataInfo listByPlan(TBasePoint tBasePoint) {
+        startPage();
+        List<TBasePoint> list = tBasePointService.selectTBasePointListByPlan(tBasePoint);
+        return getDataTable(list);
+    }
+
     /**
      * 导出密封点列表
      */

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

@@ -23,6 +23,9 @@ public class TBasePoint extends BaseEntity {
      */
     private Long pointId;
 
+    @TableField(exist = false)
+    private Long planId;
+
     @TableField(exist = false)
     private Long[] pointIds;
 
@@ -279,6 +282,14 @@ public class TBasePoint extends BaseEntity {
     @Excel(name = "描述")
     private String remarks;
 
+    public Long getPlanId() {
+        return planId;
+    }
+
+    public void setPlanId(Long planId) {
+        this.planId = planId;
+    }
+
     public Long[] getPointIds() {
         return pointIds;
     }

+ 3 - 0
master/src/main/java/com/ruoyi/project/base/mapper/TBasePointMapper.java

@@ -31,6 +31,9 @@ public interface TBasePointMapper extends BaseMapper<TBasePoint>
      */
     public List<TBasePoint> selectTBasePointList(TBasePoint tBasePoint);
 
+    public List<TBasePoint> selectTBasePointListByPlan(TBasePoint tBasePoint);
+    public List<TBasePoint> selectTBasePointListNotInPlan(TBasePoint tBasePoint);
+
     /**
      * 新增密封点
      *

+ 3 - 0
master/src/main/java/com/ruoyi/project/base/service/ITBasePointService.java

@@ -32,6 +32,9 @@ public interface ITBasePointService {
      */
     public List<TBasePoint> selectTBasePointList(TBasePoint tBasePoint);
 
+    public List<TBasePoint> selectTBasePointListByPlan(TBasePoint tBasePoint);
+    public List<TBasePoint> selectTBasePointListNotInPlan(TBasePoint tBasePoint);
+
     /**
      * 新增密封点
      *

+ 10 - 0
master/src/main/java/com/ruoyi/project/base/service/impl/TBasePointServiceImpl.java

@@ -46,6 +46,16 @@ public class TBasePointServiceImpl implements ITBasePointService {
         return tBasePointMapper.selectTBasePointList(tBasePoint);
     }
 
+    @Override
+    public List<TBasePoint> selectTBasePointListByPlan(TBasePoint tBasePoint) {
+        return tBasePointMapper.selectTBasePointListByPlan(tBasePoint);
+    }
+
+    @Override
+    public List<TBasePoint> selectTBasePointListNotInPlan(TBasePoint tBasePoint) {
+        return tBasePointMapper.selectTBasePointListNotInPlan(tBasePoint);
+    }
+
     /**
      * 新增密封点
      *

+ 1 - 0
master/src/main/java/com/ruoyi/project/check/mapper/TCheckCheckpointsMapper.java

@@ -51,6 +51,7 @@ public interface TCheckCheckpointsMapper  extends BaseMapper<TCheckCheckpoints>
     public int updateTCheckCheckpointsByCheckIds(TCheckCheckpoints tCheckCheckpoints);
     public int updateTCheckCheckpointsByUpload(TCheckCheckpoints tCheckCheckpoints);
     public int updateApproveStatusByIds(TCheckCheckpoints tCheckCheckpoints);
+    public int deleteCheckpoints(TCheckCheckpoints tCheckCheckpoints);
 
     /**
      * 删除检测点

+ 1 - 0
master/src/main/java/com/ruoyi/project/check/service/ITCheckCheckpointsService.java

@@ -49,6 +49,7 @@ public interface ITCheckCheckpointsService
     public int updateTCheckCheckpointsByUpload(TCheckCheckpoints tCheckCheckpoints);
     public int updateTCheckCheckpointsByCheckIds(TCheckCheckpoints tCheckCheckpoints);
     public int updateApproveStatusByIds(TCheckCheckpoints tCheckCheckpoints);
+    public int deleteCheckpoints(TCheckCheckpoints tCheckCheckpoints);
 
     /**
      * 批量删除检测点

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

@@ -101,6 +101,12 @@ public class TCheckCheckpointsServiceImpl implements ITCheckCheckpointsService
         return tCheckCheckpointsMapper.updateApproveStatusByIds(tCheckCheckpoints);
     }
 
+    @Override
+    public int deleteCheckpoints(TCheckCheckpoints tCheckCheckpoints)
+    {
+        return tCheckCheckpointsMapper.deleteCheckpoints(tCheckCheckpoints);
+    }
+
     /**
      * 批量删除检测点
      *

+ 20 - 4
master/src/main/java/com/ruoyi/project/statistics/controller/StatisticsController.java

@@ -3,6 +3,8 @@ 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.check.domain.TCheckLawitems;
+import com.ruoyi.project.check.service.ITCheckLawitemsService;
 import com.ruoyi.project.statistics.domain.Statistics;
 import com.ruoyi.project.statistics.service.IStatisticsService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,6 +24,9 @@ public class StatisticsController extends BaseController {
     @Autowired
     private IStatisticsService statisticsService;
 
+    @Autowired
+    private ITCheckLawitemsService tCheckLawitemsService;
+
     @GetMapping("/list")
     public AjaxResult list(Statistics statistics) {
         List<Statistics> resultList = new ArrayList<>();
@@ -171,10 +176,11 @@ public class StatisticsController extends BaseController {
         double zxll = 0;//总泄漏量
         long pid = 0;
         double temp = 0;
+        Map<String, String> testValues = getTestValue();
         for (int i = 0; i < countPfl.size(); i++) {
             Statistics point = countPfl.get(i);
             double netTestValue = Double.parseDouble(point.getNetTestValue());
-            if (netTestValue < 50) {
+            if (netTestValue < Integer.parseInt(testValues.get(point.getPointType()))) {
                 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())) {//如果前一条和当前这条是同一个点
@@ -200,7 +206,7 @@ public class StatisticsController extends BaseController {
             if (pid == point.getPointId()) {
                 continue;
             }
-            if (netTestValue >= 50) {
+            if (netTestValue >= Integer.parseInt(testValues.get(point.getPointType()))) {
                 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;
@@ -267,6 +273,7 @@ public class StatisticsController extends BaseController {
         List<Statistics> resultList = new ArrayList<>();
         // 根据装查询
         List<Statistics> countPlant = statisticsService.countPlant(statistics);
+        Map<String, String> testValues = getTestValue();
         for (Statistics plant : countPlant) {
 
             statistics.setPlantId(plant.getPlantId());
@@ -297,7 +304,7 @@ public class StatisticsController extends BaseController {
                 }
                 result.setPlantName(plant.getPlantName());
                 double netTestValue = Double.parseDouble(item.getNetTestValue());
-                if (netTestValue < 50) {
+                if (netTestValue < Integer.parseInt(testValues.get(item.getPointType()))) {
                     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())) {//如果前一条和当前这条是同一个点
@@ -332,7 +339,7 @@ public class StatisticsController extends BaseController {
                     }
                     continue;
                 }
-                if (netTestValue >= 50) {
+                if (netTestValue >= Integer.parseInt(testValues.get(item.getPointType()))) {
                     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;
@@ -428,4 +435,13 @@ public class StatisticsController extends BaseController {
                 }
         }
     }
+
+    private Map<String, String> getTestValue() {
+        Map<String, String> map = new HashMap<>();
+        List<TCheckLawitems> tCheckLawitems = tCheckLawitemsService.selectTCheckLawitemsByLawStatus();
+        for (TCheckLawitems lawitem : tCheckLawitems) {
+            map.put(lawitem.getPointType(), lawitem.getGeneral());
+        }
+        return map;
+    }
 }

+ 89 - 2
master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionPlanController.java

@@ -18,9 +18,12 @@ import com.ruoyi.project.base.service.ITBasePointService;
 import com.ruoyi.project.base.service.ITBaseRegionService;
 import com.ruoyi.project.check.domain.TCheckCheckpoints;
 import com.ruoyi.project.check.domain.TCheckLawitems;
+import com.ruoyi.project.check.mapper.TCheckCheckpointsMapper;
 import com.ruoyi.project.check.service.ITCheckCheckpointsService;
 import com.ruoyi.project.check.service.ITCheckLawitemsService;
+import com.ruoyi.project.task.domain.TTaskInspection;
 import com.ruoyi.project.task.mapper.TTaskInspectionPlanMapper;
+import com.ruoyi.project.task.service.ITTaskInspectionService;
 import com.ruoyi.system.service.ISysDictTypeService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -54,6 +57,9 @@ public class TTaskInspectionPlanController extends BaseController {
     @Autowired
     private ITTaskInspectionPlanService tTaskInspectionPlanService;
 
+    @Autowired
+    private ITTaskInspectionService tTaskInspectionService;
+
     @Autowired
     private TTaskInspectionPlanMapper tTaskInspectionPlanMapper;
 
@@ -75,6 +81,9 @@ public class TTaskInspectionPlanController extends BaseController {
     @Autowired
     private ITCheckCheckpointsService tCheckCheckpointsService;
 
+    @Autowired
+    private TCheckCheckpointsMapper tCheckCheckpointsMapper;
+
     @Autowired
     private ITCheckLawitemsService tCheckLawitemsService;
 
@@ -86,6 +95,15 @@ public class TTaskInspectionPlanController extends BaseController {
     public TableDataInfo list(TTaskInspectionPlan tTaskInspectionPlan) {
         startPage();
         List<TTaskInspectionPlan> list = tTaskInspectionPlanService.selectTTaskInspectionPlanList(tTaskInspectionPlan);
+        list.forEach(item -> {
+            TTaskInspection tTaskInspection = new TTaskInspection();
+            tTaskInspection.setPlanId(item.getId());
+            if (CollectionUtils.isNotEmpty(tTaskInspectionService.selectTTaskInspectionList(tTaskInspection))) {
+                item.setHaveSub("1");
+            } else {
+                item.setHaveSub("0");
+            }
+        });
         return getDataTable(list);
     }
 
@@ -94,6 +112,13 @@ public class TTaskInspectionPlanController extends BaseController {
         return AjaxResult.success(tTaskInspectionPlanService.selectAllPlan());
     }
 
+    @GetMapping("/pointList")
+    public TableDataInfo pointList(TBasePoint tBasePoint){
+        startPage();
+        List<TBasePoint> list = tBasePointMapper.selectTBasePointListNotInPlan(tBasePoint);
+        return getDataTable(list);
+    }
+
     /**
      * 导出检测计划列表
      */
@@ -123,7 +148,7 @@ public class TTaskInspectionPlanController extends BaseController {
     @PostMapping
     public AjaxResult add(@RequestBody TTaskInspectionPlan tTaskInspectionPlan) {
         tTaskInspectionPlan.setCreaterCode(getUserId());
-        if (tTaskInspectionPlanService.insertTTaskInspectionPlan(tTaskInspectionPlan) > 0) {
+        if (tTaskInspectionPlanService.insertTTaskInspectionPlan(tTaskInspectionPlan) > 0 && !"5".equals(tTaskInspectionPlan.getDetectionFrequency())) {
             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);
@@ -178,7 +203,69 @@ public class TTaskInspectionPlanController extends BaseController {
                 tCheckCheckpointsService.insertTCheckCheckpointsByList(tCheckCheckpoints);
             return toAjax(tTaskInspectionPlanService.updateTTaskInspectionPlan(tTaskInspectionPlan));
         }
-        return AjaxResult.error();
+        return AjaxResult.success();
+    }
+
+    @PostMapping("/addCheckpoints")
+    public AjaxResult addCheckpoints(@RequestBody TTaskInspectionPlan tTaskInspectionPlan) {
+        TTaskInspection tTaskInspection = new TTaskInspection();
+        tTaskInspection.setPlanId(tTaskInspectionPlan.getId());
+        if (CollectionUtils.isNotEmpty(tTaskInspectionService.selectTTaskInspectionList(tTaskInspection))) {
+            return AjaxResult.error();
+        }
+        QueryWrapper<TBasePoint> points = new QueryWrapper<TBasePoint>().eq("del_flag", 0).eq("approve_status", 2).in("point_id", tTaskInspectionPlan.getPointIds());
+        List<TBasePoint> tBasePoints = tBasePointMapper.selectList(points);
+        TBasePlant tBasePlant = tBasePlantService.selectTBasePlantById(tTaskInspectionPlan.getPlantId());
+        // 新增检测点
+        List<TCheckCheckpoints> tCheckCheckpoints = new ArrayList<>();
+        for (TBasePoint tBasePoint : tBasePoints) {
+            TCheckCheckpoints tCheckCheckpoint = new TCheckCheckpoints();
+            tCheckCheckpoint.setPointId(tBasePoint.getPointId());
+            tCheckCheckpoint.setPlantName(tTaskInspectionPlan.getPlantName());
+            tCheckCheckpoint.setPlantId(tBasePoint.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());
+            tCheckCheckpoint.setPlanId(tTaskInspectionPlan.getId());
+            tCheckCheckpoints.add(tCheckCheckpoint);
+        }
+        if (CollectionUtils.isNotEmpty(tCheckCheckpoints))
+            tCheckCheckpointsService.insertTCheckCheckpointsByList(tCheckCheckpoints);
+
+        QueryWrapper<TCheckCheckpoints> wrapper = new QueryWrapper<TCheckCheckpoints>().eq("plan_id", tTaskInspectionPlan.getId());
+        Integer count = tCheckCheckpointsMapper.selectCount(wrapper);
+        tTaskInspectionPlan.setPointNum(count.toString());
+        tTaskInspectionPlan.setUpdaterCode(getUserId());
+        tTaskInspectionPlan.setUpdatedate(new Date());
+        return AjaxResult.success(tTaskInspectionPlanService.updateTTaskInspectionPlan(tTaskInspectionPlan));
+    }
+
+
+    @DeleteMapping("/removeCheckPoints")
+    public AjaxResult removeCheckPoints(@RequestBody TCheckCheckpoints tCheckCheckpoints) {
+        tCheckCheckpointsService.deleteCheckpoints(tCheckCheckpoints);
+        QueryWrapper<TCheckCheckpoints> wrapper = new QueryWrapper<TCheckCheckpoints>().eq("plan_id", tCheckCheckpoints.getPlanId());
+        Integer count = tCheckCheckpointsMapper.selectCount(wrapper);
+        TTaskInspectionPlan tTaskInspectionPlan = new TTaskInspectionPlan();
+        tTaskInspectionPlan.setId(tCheckCheckpoints.getPlanId());
+        tTaskInspectionPlan.setPointNum(count.toString());
+        tTaskInspectionPlan.setUpdaterCode(getUserId());
+        tTaskInspectionPlan.setUpdatedate(new Date());
+        return AjaxResult.success(tTaskInspectionPlanService.updateTTaskInspectionPlan(tTaskInspectionPlan));
     }
 
     @PreAuthorize("@ss.hasPermi('task:plan:add')")

+ 36 - 0
master/src/main/java/com/ruoyi/project/task/domain/TTaskInspectionPlan.java

@@ -133,6 +133,42 @@ public class TTaskInspectionPlan extends BaseEntity {
      */
     private Integer planCode;
 
+    @TableField(exist = false)
+    private Long[] pointIds;
+
+    @TableField(exist = false)
+    private String plantType;
+
+    /**
+     * 是否已生成检测任务
+     */
+    @TableField(exist = false)
+    private String haveSub;
+
+    public String getHaveSub() {
+        return haveSub;
+    }
+
+    public void setHaveSub(String haveSub) {
+        this.haveSub = haveSub;
+    }
+
+    public String getPlantType() {
+        return plantType;
+    }
+
+    public void setPlantType(String plantType) {
+        this.plantType = plantType;
+    }
+
+    public Long[] getPointIds() {
+        return pointIds;
+    }
+
+    public void setPointIds(Long[] pointIds) {
+        this.pointIds = pointIds;
+    }
+
     public String getPlanQuarter() {
         return planQuarter;
     }

+ 24 - 0
master/src/main/resources/mybatis/base/TBasePointMapper.xml

@@ -104,6 +104,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
+    <select id="selectTBasePointListByPlan" parameterType="TBasePoint" resultMap="TBasePointResult">
+    select d.point_id, d.net_test_value, d.leakage_degree, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code, d.region_id,br.region_code,br.region_name, d.dev_id,bd.dev_code,bd.`dev_describe` dev_name,d.medium, d.medium_type, d.point_type, d.layer, d.group_position, d.point_position, d.group_code, d.extend_code, d.sub_point_type, d.dia, d.unarrive, d.unarrive_reason, d.keep_warm, d.temperature, d.pressure, d.run_time, d.pid_no, d.pid_url, d.pic_no, d.pic_url, d.toc_mark, d.methane_mark, d.vocs_mark, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate
+    from t_base_point d
+             left join sys_user su on su.user_id = d.updater_code
+             left join t_base_plant bp on bp.plant_id = d.plant_id
+             left join t_base_region br on br.region_id = d.region_id
+             left join t_base_device bd on bd.dev_id = d.dev_id
+    where point_id in (select point_id
+                       from t_check_checkpoints
+                       where plan_id = #{planId})
+    </select>
+
+    <select id="selectTBasePointListNotInPlan" parameterType="TBasePoint" resultMap="TBasePointResult">
+        select d.point_id, d.net_test_value, d.leakage_degree, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code, d.region_id,br.region_code,br.region_name, d.dev_id,bd.dev_code,bd.`dev_describe` dev_name,d.medium, d.medium_type, d.point_type, d.layer, d.group_position, d.point_position, d.group_code, d.extend_code, d.sub_point_type, d.dia, d.unarrive, d.unarrive_reason, d.keep_warm, d.temperature, d.pressure, d.run_time, d.pid_no, d.pid_url, d.pic_no, d.pic_url, d.toc_mark, d.methane_mark, d.vocs_mark, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate
+        from t_base_point d
+                 left join sys_user su on su.user_id = d.updater_code
+                 left join t_base_plant bp on bp.plant_id = d.plant_id
+                 left join t_base_region br on br.region_id = d.region_id
+                 left join t_base_device bd on bd.dev_id = d.dev_id
+        where point_id not in (select point_id
+                           from t_check_checkpoints
+                           where plan_id = #{planId}) and d.del_flag=0 and d.plant_id= #{plantId}
+    </select>
+
     <select id="selectTBasePointById" parameterType="Long" resultMap="TBasePointResult">
         <include refid="selectTBasePointVo"/>
         where point_id = #{pointId}

+ 12 - 0
master/src/main/resources/mybatis/check/TCheckCheckpointsMapper.xml

@@ -462,4 +462,16 @@
         </if>
     </update>
 
+    <delete id="deleteCheckpoints" parameterType="TCheckCheckpoints">
+        <if test="choose == 2">
+            delete from t_check_checkpoints where check_id in
+            <foreach item="checkId" collection="checkIds" open="(" separator="," close=")">
+                #{checkId}
+            </foreach>
+        </if>
+        <if test="choose == 4">
+            delete from t_check_checkpoints where plan_id =#{planId}
+        </if>
+    </delete>
+
 </mapper>

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


+ 1 - 1
ui/.env.development

@@ -5,7 +5,7 @@ VUE_APP_TITLE = LDAR综合管理系统
 ENV = 'development'
 
 # 若依管理系统/开发环境
-VUE_APP_BASE_API = '/dev-api'
+VUE_APP_BASE_API = '/ldar'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 1 - 1
ui/.env.production

@@ -5,4 +5,4 @@ VUE_APP_TITLE = LDAR综合管理系统
 ENV = 'production'
 
 # 若依管理系统/生产环境
-VUE_APP_BASE_API = '/prod-api'
+VUE_APP_BASE_API = '/ldar'

+ 8 - 0
ui/src/api/base/point.js

@@ -9,6 +9,14 @@ export function listPoint(query) {
   })
 }
 
+export function listByPlan(query) {
+  return request({
+    url: '/base/point/listByPlan',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询密封点详细
 export function getPoint(id) {
   return request({

+ 27 - 0
ui/src/api/task/plan.js

@@ -9,6 +9,15 @@ export function listPlan(query) {
   })
 }
 
+export function pointList(query) {
+  return request({
+    url: '/task/plan/pointList',
+    method: 'get',
+    params: query
+  })
+}
+
+
 // 查询检测计划详细
 export function getPlan(id) {
   return request({
@@ -58,3 +67,21 @@ export function delPlan(id) {
     method: 'delete'
   })
 }
+
+export function addCheckpoints(data) {
+  return request({
+    url: '/task/plan/addCheckpoints',
+    method: 'post',
+    data: data
+  })
+}
+
+export function removeCheckPoints(data) {
+  return request({
+    url: '/task/plan/removeCheckPoints',
+    method: 'delete',
+    data: data
+  })
+}
+
+

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

@@ -49,6 +49,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
+          v-if="row.status!=1"
           v-hasPermi="['check:lawitems:add']"
         >新增
         </el-button>
@@ -61,6 +62,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
+          v-if="row.status!=1"
           v-hasPermi="['check:lawitems:edit']"
         >修改
         </el-button>
@@ -73,6 +75,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
+          v-if="row.status!=1"
           v-hasPermi="['check:lawitems:remove']"
         >删除
         </el-button>
@@ -124,6 +127,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['check:lawitems:edit']"
+            :disabled="row.status==1"
           >修改
           </el-button>
           <el-button
@@ -131,6 +135,7 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
+            :disabled="row.status==1"
             v-hasPermi="['check:lawitems:remove']"
           >删除
           </el-button>
@@ -150,7 +155,7 @@
     <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="140px">
         <el-form-item label="装置类别" prop="plantType">
-          <el-select v-model="form.plantType" placeholder="请选择装置类别" clearable size="small" style="width: 100%">
+          <el-select v-model="form.plantType" :disabled="edit" placeholder="请选择装置类别" clearable size="small" style="width: 100%">
             <el-option
               v-for="dict in plantTypeOptions"
               :key="dict.dictValue"
@@ -160,7 +165,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="密封点类型" prop="pointType">
-          <el-select v-model="form.pointType" placeholder="请选择密封点类型" clearable size="small" style="width: 100%">
+          <el-select v-model="form.pointType" :disabled="edit" placeholder="请选择密封点类型" clearable size="small" style="width: 100%">
             <el-option
               v-for="dict in pointOptions"
               :key="dict.dictValue"
@@ -170,7 +175,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="介质状态" prop="mediumType">
-          <el-select v-model="form.mediumType" placeholder="请选择介质状态" clearable size="small" style="width: 100%">
+          <el-select v-model="form.mediumType" :disabled="edit" placeholder="请选择介质状态" clearable size="small" style="width: 100%">
             <el-option
               v-for="dict in mediumTypeOptions"
               :key="dict.dictValue"
@@ -248,6 +253,7 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
+      edit: false,
       // 查询参数
       queryParams: {
         lawId: null,
@@ -376,12 +382,14 @@ export default {
       this.disabledBotton = false
       this.reset();
       this.open = true;
+      this.edit = false;
       this.title = "添加法规项";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.disabledBotton = false
       this.reset();
+      this.edit = true;
       const id = row.id || this.ids
       getLawitems(id).then(response => {
         this.form = response.data;

+ 52 - 45
ui/src/views/statistics/pie/jplPieChart.vue

@@ -29,63 +29,70 @@ export default {
     return {
       chart: null,
       option: {
-      title: {
-        text:'减排量',
-        left: 'center'
-      },
-      tooltip: {
-        trigger: 'item',
+        title: {
+          text: '减排量',
+          left: 'center'
+        },
+        tooltip: {
+          trigger: 'item',
           formatter: '{a} <br/>{b} : {c} ({d}%)'
-      },
-      legend: {
-        orient: 'vertical',
+        },
+        legend: {
+          orient: 'vertical',
           left: 'left',
           data: []
-      },
-      toolbox: {
-        show: true,
+        },
+        toolbox: {
+          show: true,
           feature: {
-          mark: {show: true},
-          magicType: {
-            show: true,
+            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: {
+            },
+            restore: {show: true},
+            saveAsImage: {show: true}
+          }
+        },
+        series: [
+          {
             label: {
-              show: true,
-              fontSize: '13',
-              fontWeight: 'bold'
-            }
-          },
-        }
-      ]
-    },
+              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}
+        let flag = true;
+        let j = 0
+        for (j; j < this.option.series[0].data.length; j++) {
+          if (this.option.series[0].data[j].name == this.pointList[i].pointType) {
+            flag = false;
+            break;
           }
+        }
+        if (flag && ((this.plantName != '合计' && this.plantName == this.pointList[i].plantName) || 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}
+        }else{
+          this.option.series[0].data[j] = {value: parseFloat(this.option.series[0].data[j].value)+ parseFloat(this.pointList[i].jpl), name: this.pointList[i].pointType}
+        }
       }
       this.initChart();
     })

+ 19 - 9
ui/src/views/statistics/pie/pflPieChart.vue

@@ -67,7 +67,7 @@ export default {
             emphasis: {
               label: {
                 show: true,
-                fontSize: '21',
+                fontSize: '13',
                 fontWeight: 'bold'
               }
             },
@@ -78,15 +78,25 @@ export default {
   },
   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}
+        for (let i = 0; i < this.pointList.length; i++) {
+          let flag = true;
+          let j = 0
+          for (j; j < this.option.series[0].data.length; j++) {
+            if (this.option.series[0].data[j].name == this.pointList[i].pointType) {
+              flag = false;
+              break;
+            }
+          }
+          if (flag && ((this.plantName != '合计' && this.plantName == this.pointList[i].plantName) || 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}
+          } else {
+            this.option.series[0].data[j] = {
+              value: parseFloat(this.option.series[0].data[j].value) + parseFloat(this.pointList[i].pfl),
+              name: this.pointList[i].pointType
+            }
+          }
         }
-      }
       this.initChart();
     })
   },

+ 15 - 5
ui/src/views/statistics/pie/xllPieChart.vue

@@ -68,7 +68,7 @@ export default {
           emphasis: {
             label: {
               show: true,
-              fontSize: '21',
+              fontSize: '13',
               fontWeight: 'bold'
             }
           },
@@ -80,12 +80,22 @@ export default {
   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 ==''){
+        let flag = true;
+        let j = 0
+        for (j; j < this.option.series[0].data.length; j++) {
+          if (this.option.series[0].data[j].name == this.pointList[i].pointType) {
+            flag = false;
+            break;
+          }
+        }
+        if (flag && ((this.plantName != '合计' && this.plantName == this.pointList[i].plantName) || 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}
+        } else {
+          this.option.series[0].data[j] = {
+            value: parseFloat(this.option.series[0].data[j].value) + parseFloat(this.pointList[i].xll),
+            name: this.pointList[i].pointType
+          }
         }
       }
       this.initChart();

+ 51 - 32
ui/src/views/task/plan/index.vue

@@ -51,18 +51,18 @@
         >删除
         </el-button>
       </el-col>
-<!--      <el-col :span="1.5">
-        <el-button
-          type="info"
-          plain
-          icon="el-icon-refresh"
-          size="mini"
-          @click="handleDoPlan"
-        >{{ $t('校验检测计划') }}
-        </el-button>
-      </el-col>-->
+      <!--      <el-col :span="1.5">
+              <el-button
+                type="info"
+                plain
+                icon="el-icon-refresh"
+                size="mini"
+                @click="handleDoPlan"
+              >{{ $t('校验检测计划') }}
+              </el-button>
+            </el-col>-->
       <el-col :span="1.5">
-        <span style="color: #ff0000" v-if="checking"><i class="el-icon-loading" ></i>正在校验检测计划,请稍候...</span>
+        <span style="color: #ff0000" v-if="checking"><i class="el-icon-loading"></i>正在校验检测计划,请稍候...</span>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -71,9 +71,12 @@
               border>
       <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"/>
-      <el-table-column label="检测频次" align="center" prop="detectionFrequency" width="130" :show-overflow-tooltip="true" :formatter="detectionFormat"/>
+      <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"/>
+      <el-table-column label="检测频次" align="center" prop="detectionFrequency" width="130"
+                       :show-overflow-tooltip="true" :formatter="detectionFormat"/>
       <el-table-column label="检测起始时间" align="center" prop="startTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
@@ -134,7 +137,8 @@
     <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-select v-model="form.plantId" :disabled="edit" placeholder="请选择装置" clearable size="small"
+                     style="width: 100%">
             <el-option
               v-for="dict in plantOperation"
               :key="dict.plantId"
@@ -150,7 +154,8 @@
           <el-input v-model="form.inspectionPlanName" placeholder="请输入检测计划名称"/>
         </el-form-item>
         <el-form-item label="检测频次" prop="detectionFrequency">
-          <el-select v-model="form.detectionFrequency" @change="getEndTime" placeholder="请选择检测频次" clearable size="small" style="width: 100%">
+          <el-select v-model="form.detectionFrequency" :disabled="edit" @change="getEndTime"
+                     placeholder="请选择检测频次" clearable size="small" style="width: 100%">
             <el-option
               v-for="dict in detectionOperation"
               :key="dict.dictValue"
@@ -185,7 +190,8 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-    <plan-point v-if="pointVisible" ref="planPointList" ></plan-point>
+    <plan-point v-if="pointVisible" ref="planPointList"></plan-point>
+    <point-list v-if="pointListVisible" ref="pointList"></point-list>
   </div>
 </template>
 
@@ -194,15 +200,16 @@ import {listPlan, getPlan, delPlan, addPlan, updatePlan, checkPlan} from "@/api/
 import dayjs from "dayjs";
 import {getAllPlantName} from "@/api/base/plant";
 import PlanPoint from "@/views/task/plan/planPoint";
+import PointList from "@/views/task/plan/pointList";
 
 export default {
   name: "Plan",
-  components: {PlanPoint},
+  components: {PointList, PlanPoint},
   data() {
     return {
-      checking:false,
-      plantOperation:[],
-      detectionOperation:[],
+      checking: false,
+      plantOperation: [],
+      detectionOperation: [],
       // 页面高度
       clientHeight: 300,
       // 遮罩层
@@ -212,6 +219,7 @@ export default {
       // 非单个禁用
       single: true,
       pointVisible: false,
+      pointListVisible: false,
       // 非多个禁用
       multiple: true,
       // 显示搜索条件
@@ -224,11 +232,13 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
+      edit: false,
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         plantId: null,
+        haveSub: null,
         inspectionPlanNo: null,
         inspectionPlanName: null,
         detectionFrequency: null,
@@ -282,21 +292,28 @@ export default {
   },
   methods: {
     openPlanPoint(row) {
+      if (row.haveSub == 1 || row.detectionFrequency != 5) {
+        this.pointListVisible = true;
+        this.$nextTick(() => {
+          this.$refs.pointList.init(row)
+        })
+      } else {
         this.pointVisible = true;
         this.$nextTick(() => {
           this.$refs.planPointList.openDialog(row)
         })
+      }
     },
-    getEndTime(){
+    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")
+        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")
         }
       }
     },
@@ -358,11 +375,13 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
+      this.edit = false;
       this.title = "添加检测计划";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
+      this.edit = true;
       const id = row.id || this.ids
       getPlan(id).then(response => {
         this.form = response.data;
@@ -393,7 +412,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除检测计划编号为"' + ids + '"的数据项?').then(function () {
+      this.$modal.confirm('是否确认删除数据项?').then(function () {
         return delPlan(ids);
       }).then(() => {
         this.getList();
@@ -407,7 +426,7 @@ export default {
         ...this.queryParams
       }, `plan_${new Date().getTime()}.xlsx`)
     },
-    /** 导出按钮操作 */
+    /** 校验按钮操作 */
     handleDoPlan() {
       this.$modal.confirm('是否确认校验检测计划?注意!在此之后新增的检测点将记入下次检测计划!').then(() => {
         this.checking = true;

+ 167 - 204
ui/src/views/task/plan/planPoint.vue

@@ -1,160 +1,154 @@
 <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-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-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-select>
+          </el-form-item>
+          <el-form-item label="群组编码" prop="groupCode">
+            <el-input
+              v-model="queryParams.groupCode"
+              placeholder="请输入群组编码"
+              clearable
+              @keyup.enter.native="handleQuery"
             />
-          </el-col>
+          </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="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-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="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-col :span="2" style="margin-top: 11%;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-left" :disabled="rightAll" @click="removeAll"
+                       style="margin-top: 10px;width: 80%"
+                       size="large"></el-button>
+          </el-tooltip>
+        </el-col>
 
-        </el-row>
+        <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>
 
-        <div slot="footer" class="dialog-footer" style="text-align: center">
-          <el-button @click="cancel">返回</el-button>
-        </div>
+      </el-row>
+
+      <div slot="footer" class="dialog-footer" style="text-align: center">
+        <el-button @click="cancel">返回</el-button>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -165,6 +159,7 @@ import {
 } from "@/api/check/checkpoints";
 import {getAllPlantName} from "@/api/base/plant";
 import {listPoint} from "@/api/base/point";
+import {addCheckpoints, pointList, removeCheckPoints} from "@/api/task/plan";
 
 export default {
   name: "planPoint",
@@ -178,6 +173,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         pointId: null,
+        planId: null,
         inspectionId: null,
         testValue: null,
         netTestValue: null,
@@ -207,13 +203,13 @@ export default {
         updaterCode: null,
         updatedate: null,
         reqairId: null,
-        choose: 1,
       },
       // 查询参数
       rightQueryParams: {
         pageNum: 1,
         pageSize: 10,
         pointId: null,
+        planId: null,
         inspectionId: null,
         testValue: null,
         netTestValue: null,
@@ -283,10 +279,8 @@ export default {
       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 => {
@@ -298,25 +292,16 @@ export default {
     },
     /** 查询检测点列表 */
     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.queryParams.planId = this.row.id;
+      pointList(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;
-      }
+      this.rightQueryParams.planId = this.row.id;
       listCheckpoints(this.rightQueryParams).then(response => {
         this.rightData = response.rows;
         this.rightTotal = response.total;
@@ -325,9 +310,8 @@ export default {
     },
     saveLeft(rows) {
       this.left = [];
-      console.log(rows)
       if (rows) {
-        this.left = rows.map(row => row.checkId);
+        this.left = rows.map(row => row.pointId);
         this.leftMultiple = !rows.length;
       }
     },
@@ -341,55 +325,34 @@ export default {
     // 左边表格选择项移到右边
     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();
-        // })
-      }
+      data.pointIds = this.left;
+      data.plantName = this.row.plantName;
+      data.id = this.row.id;
+      data.plantId = this.row.plantId;
+      addCheckpoints(data).then(()=>{
+        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();
-      // })
+      removeCheckPoints(data).then(()=>{
+          this.getList();
+          this.getRightList();
+      })
     },
     removeAll() {
       if (this.rightData !== []) {
         let data = {};
-        data.inspectionId = this.rightQueryParams.inspectionId;
+        data.planId = this.row.id;
         data.choose = 4;
-        console.log(data)
-        // updateCheckpoints(data).then(response => {
-        //   console.log("this.queryParams")
-        //   console.log(this.queryParams)
-        //   this.getList();
-        //   this.getRightList();
-        // })
+        removeCheckPoints(data).then(()=>{
+          this.getList();
+          this.getRightList();
+        })
       }
     }
   }

+ 119 - 0
ui/src/views/task/plan/pointList.vue

@@ -0,0 +1,119 @@
+<template>
+  <div>
+    <el-dialog width="1800px" :visible.sync="dialogFormVisible" :close-on-click-modal="false" title='计划检测点清单'>
+      <el-table v-loading="loading" :data="pointList" border height="650">
+        <el-table-column type="index" width="55" align="center"/>
+        <el-table-column label="装置名称" align="center" prop="plantName" :show-overflow-tooltip="true"/>
+        <el-table-column label="装置编码" align="center" prop="plantCode" :show-overflow-tooltip="true"/>
+        <el-table-column label="装置类别" align="center" prop="plantType" :formatter="plantTypeFormat"/>
+        <el-table-column label="区域名称" align="center" prop="regionName" :show-overflow-tooltip="true"/>
+        <el-table-column label="区域编码" align="center" prop="regionCode" :show-overflow-tooltip="true"/>
+        <el-table-column label="设备/管线名称" align="center" prop="devName" width="150" :show-overflow-tooltip="true"/>
+        <el-table-column label="设备/管线编码" align="center" prop="devCode" width="150" :show-overflow-tooltip="true"/>
+        <el-table-column label="介质" align="center" prop="medium" :show-overflow-tooltip="true"/>
+        <el-table-column label="介质状态" align="center" prop="mediumType" :formatter="mediumTypeFormat"
+                         :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="layer" :show-overflow-tooltip="true"/>
+        <el-table-column label="群组位置" align="center" prop="groupPosition" :show-overflow-tooltip="true"/>
+        <el-table-column label="密封点位置" align="center" prop="pointPosition" width="110"
+                         :show-overflow-tooltip="true"/>
+        <el-table-column label="群组编码" align="center" prop="groupCode" :show-overflow-tooltip="true"/>
+        <el-table-column label="扩展编码" align="center" prop="extendCode" :show-overflow-tooltip="true"/>
+        <el-table-column label="密封点子类型" align="center" prop="subPointType" width="110"
+                         :show-overflow-tooltip="true"/>
+        <el-table-column label="公称直径(mm)" align="center" prop="dia" width="110" :show-overflow-tooltip="true"/>
+        <el-table-column label="是否不可达点" align="center" prop="unarrive" width="110"
+                         :show-overflow-tooltip="true"/>
+        <el-table-column label="不可达原因" align="center" prop="unarriveReason" width="110"
+                         :show-overflow-tooltip="true"/>
+        <el-table-column label="是否保温/保冷" align="center" prop="keepWarm" width="110"
+                         :show-overflow-tooltip="true"/>
+        <el-table-column label="工艺温度(℃)" align="center" prop="temperature" width="110"
+                         :show-overflow-tooltip="true"/>
+        <el-table-column label="工艺压力(Mpa)" align="center" prop="pressure" width="110"
+                         :show-overflow-tooltip="true"/>
+        <el-table-column label="运行时间" align="center" prop="runTime" width="180">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.runTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="TOC质量分数" align="center" prop="tocMark" width="110" :show-overflow-tooltip="true"/>
+        <el-table-column label="甲烷质量分数" align="center" prop="methaneMark" width="110"
+                         :show-overflow-tooltip="true"/>
+        <el-table-column label="VOCs质量分数" align="center" prop="vocsMark" width="110" :show-overflow-tooltip="true"/>
+        <el-table-column label="描述" align="center" prop="remarks" width="180" :show-overflow-tooltip="true"/>
+      </el-table>
+
+
+      <div style="height: 50px">
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {listByPlan} from "@/api/base/point";
+
+export default {
+  name: "pointList",
+  data() {
+    return {
+      dialogFormVisible: false,
+      pointList: [],
+      plantTypeOptions: [],
+      mediumTypeOptions: [],
+      loading: false,
+      row: {},
+      total: 0,
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        planId: null,
+      }
+    }
+  },
+  methods: {
+    init(row) {
+      this.pointList= [],
+      this.dialogFormVisible=true;
+      this.row = row;
+      this.getDicts("plant_type").then(response => {
+        this.plantTypeOptions = response.data;
+      });
+
+      this.getDicts("medium_type").then(response => {
+        this.mediumTypeOptions = response.data;
+      });
+      this.queryParams.planId = row.id;
+      this.getList()
+    },
+    getList() {
+      this.loading = true;
+      listByPlan(this.queryParams).then(res => {
+        this.pointList = res.rows;
+        this.total = res.total;
+        this.loading = false;
+      })
+    },
+    mediumTypeFormat(row, column) {
+      return this.selectDictLabel(this.mediumTypeOptions, row.mediumType);
+    },
+    plantTypeFormat(row, column) {
+      return this.selectDictLabel(this.plantTypeOptions, row.plantType);
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>